Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
27% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
2 Commented Posts
0 Endorsements
Ranked #3K
~18.7K People Reached
Favorite Tags

17 Posted Topics

Member Avatar for Xeros606

I have done it by putting the array in a ArrayList.However I had to take the initial array as an Object[]. [CODE] import java.util.ArrayList; import java.util.List; /* remove zeroes from an array without using another array * * use ArrayList, then * * */ public class ArrRemoveElmZero { static Object[] …

Member Avatar for JamesCherrill
0
3K
Member Avatar for AbhikGhosh

Hi I have a simple jsp page in which there is an ajax call on an input string which returns the upper case of the string in json. This is working for the first time but not on successive requests. I am using the GET method. Why is it not …

Member Avatar for AbhikGhosh
0
380
Member Avatar for AbhikGhosh

Hi I am not been able to receive URL parameters passed from my ajax code in my jsp. Here is the code [CODE] function showDetails() { document.detailsForm.sltdUser.value = selectedUserID; alert('selectedUserID' + selectedUserID); var httpRequest; var url = 'showDetails.jsp?sltdUser = ' + selectedUserID; if (window.XMLHttpRequest) { // Mozilla, Safari, ... httpRequest …

Member Avatar for Thirusha
0
738
Member Avatar for AbhikGhosh

Hi I am unable to pass value from one jsp to popup jsp. Code [CODE] <form name="detailsForm" method="post" onsubmit="return showDetails(this); "> <input type="hidden" name="sltdUser"> <input type="submit" value="Details"> </form> function showDetails(detailsForm) { detailsForm.sltdUser.value = selectedUserID; alert('selectedUserID :' + detailsForm.sltdUser.value); // works fine window.open('showDetails.jsp?abc =' + detailsForm.sltdUser.value); } [U]showDetails.jsp[/U] <% String abc …

Member Avatar for javaAddict
0
138
Member Avatar for AbhikGhosh

Hi Can anyone please help me as to how to print in java? Please tell me the basics first and then how to change the configurations.Actually I need to print in a thermal paper for issuing tickets. Can anyone please help? Thanks Abhik

Member Avatar for AbhikGhosh
0
352
Member Avatar for AbhikGhosh

Hi I am using tomcat 5.5 and I am unable to connect to mysql server(Wamp2.0i). Here is my code: [CODE] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@ page import="java.sql.*"%> <%@ page import="java.io.*"%> <html> <head> <title>Connection with mysql database</title> </head> <body> <h1>Connection status</h1> <% String connectionURL = "jdbc:mysql://localhost:3306/names"; Connection …

Member Avatar for AbhikGhosh
0
172
Member Avatar for xxunknown321

put the lists in a single arraylist(say arrlist) and use Collections.sort(arrlist)

Member Avatar for BestJewSinceJC
0
160
Member Avatar for need

hi pls check my post at this thread [URL="http://www.daniweb.com/forums/thread253670.html"]http://www.daniweb.com/forums/thread253670.html[/URL] this is already solved

Member Avatar for AbhikGhosh
0
162
Member Avatar for anevins

[QUOTE=anevins;1110078]I need to use the valueOf method to return a string representation of a boolean arguement but I don't know how to use this method. Here is my code at the moment, if the inputted file name ends with .txt then 'true' is returned, if not then 'false' is returned. …

Member Avatar for thekashyap
0
164
Member Avatar for indu_ss4

you can try the DocumentBuilderFactory and use : [CODE] Element elm = new Element("publishers"); document.createElement(elm); [/CODE]

Member Avatar for AbhikGhosh
0
7K
Member Avatar for ceyesuma
Member Avatar for AbhikGhosh
0
157
Member Avatar for vampgirl13

> `private static String[] alphabet2 = new String[alphabet.length];` You need to change the size of this array alphabet2 to alphabet.length + 1.Otherwise how can you accomodate the extra " " string?

Member Avatar for AbhikGhosh
0
3K
Member Avatar for Namrata.Bibodi

You can try Collections.binarySearch(list,elementToSearch); However you need to sort the list first. So you can use: [CODE] Collections.sort(arrayList); Collections.binarySearch(arrayList,elementToSearch); [/CODE] If the element is found, then it will return the index,else it will return (-X-1),where X is the position that the element will take in the sorted list.

Member Avatar for Andreas Hollman
0
75
Member Avatar for checho

Hi I have written the following code and it runs fine.It takes user input and stores it in an ArrayList of student beans. It prints the students in descending order of grades.Hope it helps. [CODE] import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class SortStudentsByGrade …

Member Avatar for Andreas Hollman
0
505
Member Avatar for Dearster

Hi I have written the code for this.It works fine.Hope it helps. [CODE] import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; public class StringEx { int count = 0; String text; public static void main(String[] args) { StringEx s = new StringEx(); s.readFileToGetFileDescription(); } private void readFileToGetFileDescription() { …

Member Avatar for stultuske
1
132
Member Avatar for xShankZ

It might be because of the equals you are using in the if statements.Try to convert it into toString() first eg: if(e.getActionCommand().toString().equals("Okay")) you are comparing an object with a string,you should compare 2 strings instead. Hope this solves your problem

Member Avatar for musthafa.aj
0
120
Member Avatar for m_sam6

Hi I have written this code and it runs successfully . Hope it helps. [CODE] import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.regex.Matcher; import java.util.regex.Pattern; public class SearchText { public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter Text: "); try { String text = br.readLine(); …

Member Avatar for AbhikGhosh
0
3K

The End.