i have three div1,div2,div3 ,all divs consist of textbox
when div1 is active the other two div2,div3 are hide....
the problem is that....im using jquery for textbox validatation(mean not empty)...
the code working on div1..when i appy on div2,div3 which is hide,then submit button not working....
its mean the jquery is working in hide div2,div3.............how can i fixed this problem......that it will work only in active div1 or active div2.....
im using php+jquery
print serieskirti srivastava June 5, 2011 at 6:11 PM
Could you please let me know the difference between volatile,transient and native methods?
Also if access specifiers are considered in class overloading?
public class OverloadTest {
public void computeMethod( int x, float y, byte z) {}
}
Which of the following is considered as overloaded computeMethod ?
private int computeMethod( int x, float y, byte z) {}
private int computeMethod( float x, int y, byte z) {return y;}
public float computeMethod( int x, float y, byte z) {return y;} //answer
public void computeMethod( int a, float b, byte c) {} //y this has become invalid........
could you please explain the above question
there is a file product.txt whose content are
sn product price city
1 sugar 25 jaipur
2 wheat 20 ajmer
3 sugar 16 kota
4 corn 30 delhi
5 wheat 50 jodhpur
6 corn 23 udaupur
7 sugar 19 bikaner
read this using stringtokenizer and enter a product name from file and comapre its price with its differnt occurance..after finding smallest price return city name..
for example/if user enter sugar it should compare prices 25,16 and 19..get the ans 16..and return kota corrosponding to 16.... its immidite..after solving this i will get real project....
i want to design a desktop based appln for balance sheet analysis i have used memo fields and write the block of text into text files is it opossible in java
I have the following code in JSP. The purpose of the code is to add items to list box from database. The behavior of the code is not correct. It is not showing up all the items in the list box. Help and guidence is appreciated.
------------------------------------------
<body>
<tr><td>Mapped Roles</td></tr><br>
<select onchange=ShowRevisedMenu(this.value);>
<option value="-1">Select Role</option>
<% for(int i=0; i < tRoleDescSize ;i++){
String tRoleID = coredbclass.RoleID.get(i).toString();
String tRoleDesc = coredbclass.RoleDesc.get(i).toString();
System.out.println("Role ID : " + tRoleID + " Role Desc : " + tRoleDesc);
%>
<option value=<%=tRoleID%>><%= tRoleDesc%></option>
<%} %>
</select>
</body>
develop a java program that can be used to do the following
- Display all the available processes on the system (computer)
- Display the system properties (RAM,CPU, ...)
- Shutdown or restart the machine
- Checks whether the machine is connected to internet or not. If connected, it should proceed to list the information about the ip address( ip address, DNS Server address, default get way ....)
- Lauch applications through your program (begin with ms word and MS excel)
- Make a directory
Design consideration:
You can use a number (or letters/strings) to control the interactivity of your program—e.g Enter 1 to shutdown machine, 2 to display system properties ...)
I am creating a program in Netbeans.
Code a java class for an Object SONG, that has as a minimum the following attributes:- SONG Title (a String) , SONG Group/artist (a String ), SONG genre (a String â?? â??Popâ??, â??Jazzâ??, â??Hard Rockâ?? etc., SONG price (double), SONG duration (int number of seconds). Code all accessor and mutator methods for the SONG class.
2) Code a GUI program that has the following functionality:-
Load SONGâ??s - Create four SONG Objects (the data is hard coded as literals in your program code) and place the SONG objects in an array. Load SONGâ??s will always create a new array that holds the same four SONGs.
Display - Display all SONGâ??s in the array
Add - Add a new SONG object to the end of the array (prompt for the user to enter all data in order to create the SONG object).
Save - Save all the SONGâ??s in the array to the text file. Name this text file SONGDATA.TXT. The data is to be presented as strings in the text file so that it can be displayed. Do NOT place a path on your text file name.
Exit - Close the GUI and terminate the application.
Hi,
I am working on a project and as per requirement from client i have to sort a table based on the ID Column.
I want the table to be sorted as per ID Column once it's loaded.
I found many programs of HTML table sorting where sorting happenes whenever user clicks on column header which i dont want.
Please suggest as what approach i should follow to implement the same.
Many Thanks in Advance
Modify the program of project 3 to calculate statistics about letters. The new program should start by asking the user to enter the name of an input text file. It should keep asking the user to enter a proper file name until the user entres the name of a file that exists.
Your program should then read all characters in the text file and print to the screen and to a text file all letters that occurred in the input file (including space, punctuation and other symbols), with the number of times each character occurred. The name of the file for statistics about letters should be â??Letters1.txtâ??. It should also print all words that occurred in the input file as well as to a file â??Words1.txtâ??.
The program should also ask the user for N, the level of N-grams that should be calculated. It should then print to separate text files all N-grams and the number of occurrence of each N-gram. The name of the file for statistics about an N-gram should start with the word â??Lettersâ?? followed by the level of the N-Gram for letters. As for words the filename should start with the word â??Wordsâ?? followed by the level of the N-Gram of words. Thus for bigrams the files should be named â??Letters2.txtâ?? and â??Words2.txtâ??, for trigrams the file should be named â??Letters3.txtâ?? and â??Words3.txtâ??, etcâ?¦
create a class named triange_type and write a program in java to accept three sides of triangle. compute and print whether the triangle is equilateral or isoscelesor scalene traingle.
An electronic shop has annonced following seasonal discounts.
Purchase discount on laptop discount on desktop
0 to 25000 0% 5%
25001 to 57000 5% 7.5%
57001 to 100000 7.5% 10%
more than 100000 10% 15%
input name , type of purchase , ( L for laptop & D for
desktop) & amount of purchase & print the net amount with name.
Use inputstreamreader & if construct(don't use scanner).
The factorial of a positive integer N, denoted by N!, is defined by the following:
N! = 1 * 2 * ..... * N (Note: 0! = 1)
Using subprograms and functions, create a recursive program to compute N!. The user should input a positive integer and a subprogram should check that the input is correct ( a positive integer). Then use recursion to computer the factorial. Create a subprogram that will call itself to do the multiplication until N = 1. Then display the result in the main program.
Draw a flowchart and write a pseudo code for this program.
public class Switch2_OP
{
final static short x = 2;
public static int y = 0;
public static void main(String [] args)
{
for (int z=0; z < 3; z++)
{
switch (z)
{
case y: System.out.print("0 "); /* Line 11 */
case x-1: System.out.print("1 "); /* Line 12 */
case x: System.out.print("2 "); /* Line 13 */
}
}
}
}
hi all,
i have a problem.
the problem is ,I have a file i want that this file is given to power builder application by java or jsp program.
If anybody hava solution please let me know.
thanks in advance..............
import java.util.Scanner; //uses Scanner class
public class Shapes // Class name same as program name
{
private int radius;
public int Shapes( int R )
{
radius=R;
}
public void setRadius( int R )
{
radius= R;
}
public int getRadius()
{
return radius;
}
public void report()
{
double areaCircle;
Scanner input = new Scanner( System.in );
System.out.print( "Enter an integer for radius:" );
radius = input.nextInt();
areaCircle = Math.PI*Math.pow(radius, 2);
System.out.print( "The area is:" +areaCircle);
}
public static void main ( String[] args )
{
Shapes myShapes = new Shapes();
myShapes.report();
}
}
it says C:\Users\Suman>javac Shapes.java
Shapes.java:16: missing return statemen
}
^
1 error
1. the formula for converting a temperature from Fahrenheit to Celsius is : C = (5(F - 32))/9
where F is the Fahrenheit temperature as an argument. The method should return the temperature, converted to Celsius.
2.Demonstrate the method by calling it in loop that displays a table of Fahrenheit temperature 0 though 20 and their Celsius equivalents.
hello! can any please help me?i have here my problem
Operator '&' is not defined for type 'Byte()' and string "|".
in Img = (dr(1)) & "|"
here's y codes
Dim Img As Image
Dim comm As New OdbcCommand
Dim dr As OdbcDataReader
conn.Open()
comm.Connection = conn
comm.CommandText = "select a.imgcatdesc, b.image from gallerycat_tbl a, gallery_tbl b where a.imgcatid = b.imgcatid"
dr = comm.ExecuteReader
countRec = 0
While dr.Read
descrec = (dr(0)) & "|"
Img = (dr(1)) & "|"
allRec.Add(descrec & Img)
countRec += 1
End While
comm.Dispose()
dr = Nothing
conn.Close()
please!
Write a program to display the grade of student:distinction, merit, pass, referil based on the input given by user.
marks>70%= distinction
marks>60%= merit
marks>50%=pass
marks<40%=referil
i want to see if an element is repeated in an arrayList (named error_dub) print it ONCE
here is my code
for(x=0;x<error_dub.size()-1;x++){
for(h=x+1;h<error_dub.size()-1;h++){
if(error_dub.get(x).equals(error_dub.get(h)) && x!=h){
out.writeBytes(error_dub.get(x)+" is a duplicate label"+"\r\n");
}
}
}
A person is rich if following confitions are satisfied:
His name should be of at least 10 characters not counting the spaces in the name.
His name must end with one of the following: "Tata", "Birla", "Ambani", "Adani", "Mittal", "Oberoi" or "Gandhi"
He should have atleast 3 cars from the following list "Mercedes", "Ferrari", "BMW", "Macbacth"
He should have atleast 10 cars in total.
His income Last Year should be more than 100 million dollars if he is a NRI. If he is a polititian, his income last year must be greater than 500 million dollars.
His last months income should be atleast 20% more than the last year's average monthly income.
Write a programming in java language.
create a class named triangle_type and write a programe in java to accept three sides of a triangle. compute and print whether the triangle is equilateralor isoscelesor scalene triangle.
create a class named triangle_type and write a programe in java to accept three sides of a triangle. compute and print whether the triangle is equilateralor isoscelesor scalene triangle.
jquery textbox validate on hide divwilson May 28, 2011 at 8:02 PM
i have three div1,div2,div3 ,all divs consist of textbox when div1 is active the other two div2,div3 are hide.... the problem is that....im using jquery for textbox validatation(mean not empty)... the code working on div1..when i appy on div2,div3 which is hide,then submit button not working.... its mean the jquery is working in hide div2,div3.............how can i fixed this problem......that it will work only in active div1 or active div2..... im using php+jquery
print serieskirti srivastava June 5, 2011 at 6:11 PM
all problems to print series
Java doubt- Please clarify it as soon as possible.Sandhya July 7, 2011 at 11:03 AM
Could you please let me know the difference between volatile,transient and native methods? Also if access specifiers are considered in class overloading? public class OverloadTest { public void computeMethod( int x, float y, byte z) {} } Which of the following is considered as overloaded computeMethod ? private int computeMethod( int x, float y, byte z) {} private int computeMethod( float x, int y, byte z) {return y;} public float computeMethod( int x, float y, byte z) {return y;} //answer public void computeMethod( int a, float b, byte c) {} //y this has become invalid........ could you please explain the above question
java coredevender kumar June 19, 2011 at 8:37 PM
import java.lang.reflect.*; class loan { public boolean loanStatus() { return true; } }; class houseloan extends loan { public void houseLoneInterest() { System.out.println("house loan intersest is 10%"); } public int getX() { return 10; } } class bikeloan extends loan { public void bikeLoanInterest() { System.out.println("bke loan interst is 20%"); } } class bankapp { void loanprocess(loan l) { Class c=l.getClass(); System.out.println(c.getName()+"methods are"); Method marr[]=c.getMethod(); for(int i=0;i<marr.length;i++) { System.out.println(marr[i]); } } } class getclass { public static void main(String[] args) { bankapp ba=new bankapp(); loan l=new houseloan(); ba.loanprocess(l); } } error in this step.plz clarify...........and explain plz Method marr[]=c.getMethod();
javashubham June 22, 2011 at 8:22 PM
there is a file product.txt whose content are sn product price city 1 sugar 25 jaipur 2 wheat 20 ajmer 3 sugar 16 kota 4 corn 30 delhi 5 wheat 50 jodhpur 6 corn 23 udaupur 7 sugar 19 bikaner read this using stringtokenizer and enter a product name from file and comapre its price with its differnt occurance..after finding smallest price return city name.. for example/if user enter sugar it should compare prices 25,16 and 19..get the ans 16..and return kota corrosponding to 16.... its immidite..after solving this i will get real project....
java desktop applnvivek pare June 30, 2011 at 10:51 PM
i want to design a desktop based appln for balance sheet analysis i have used memo fields and write the block of text into text files is it opossible in java
Adding Items to List BOX in JSPJagan July 4, 2011 at 5:30 PM
I have the following code in JSP. The purpose of the code is to add items to list box from database. The behavior of the code is not correct. It is not showing up all the items in the list box. Help and guidence is appreciated. ------------------------------------------ <body> <tr><td>Mapped Roles</td></tr><br> <select onchange=ShowRevisedMenu(this.value);> <option value="-1">Select Role</option> <% for(int i=0; i < tRoleDescSize ;i++){ String tRoleID = coredbclass.RoleID.get(i).toString(); String tRoleDesc = coredbclass.RoleDesc.get(i).toString(); System.out.println("Role ID : " + tRoleID + " Role Desc : " + tRoleDesc); %> <option value=<%=tRoleID%>><%= tRoleDesc%></option> <%} %> </select> </body>
How to call servlet from JSF bean ?Hebatu Allah fahmy February 4, 2012 at 1:44 AM
I have JSF bean , and I want to call a servlet with paramter from that bean . any help ??
How to call servlet from JSF ?Hebatu Allah fahmy February 4, 2012 at 1:46 AM
I have a jsf bean , and I want to call a servlet with parameter from that bean , how can I do that ?? any help ??
computervishal February 9, 2012 at 6:35 PM
i have problem
SMS APIpratik parmar March 5, 2012 at 12:05 PM
I am searching for an API that can send messages through HTML form. Recipient numbers are taken from the database..Please suggest...
clear errors aarif March 5, 2012 at 3:42 PM
#include<stdio.h> #include<conio.h> void main() { int a[100],n; int i,j,small,Pos; clrscr(); printf("\nEnter number of elements"); scanf("%d",&n); printf("\nEnter array elements\n"); for(i=0;i<n;i++) scanf("%d",&a[i]); printf("\nThe UnSorted list is \n"); for(i=0;i<n;i++) printf("\t%d",a[i]); printf("\n"); for(i=0;i<n-1;i++) { small = a[i]; Pos = i; for(j=i+1;j<n;j++) if(a[j] < small) { small=a[j]; Pos = j; } a[Pos] = a[i]; a[i] = small; } printf("\n The Sorted list is \n"); for(i=0;i<n;i++) printf("\t%d",a[i]); printf("\n"); getch(); }
java tutorialsaeed March 15, 2012 at 2:27 AM
how to set the cursor in a jtextarea in a java program
pbt javashahfiq March 27, 2012 at 7:27 PM
what means of java?
JAVAKAKOOZA JOSEPH April 4, 2012 at 6:08 PM
develop a java program that can be used to do the following - Display all the available processes on the system (computer) - Display the system properties (RAM,CPU, ...) - Shutdown or restart the machine - Checks whether the machine is connected to internet or not. If connected, it should proceed to list the information about the ip address( ip address, DNS Server address, default get way ....) - Lauch applications through your program (begin with ms word and MS excel) - Make a directory Design consideration: You can use a number (or letters/strings) to control the interactivity of your program—e.g Enter 1 to shutdown machine, 2 to display system properties ...)
Array and ObjectsLungisani February 1, 2013 at 2:08 PM
I am creating a program in Netbeans. Code a java class for an Object SONG, that has as a minimum the following attributes:- SONG Title (a String) , SONG Group/artist (a String ), SONG genre (a String â?? â??Popâ??, â??Jazzâ??, â??Hard Rockâ?? etc., SONG price (double), SONG duration (int number of seconds). Code all accessor and mutator methods for the SONG class. 2) Code a GUI program that has the following functionality:- Load SONGâ??s - Create four SONG Objects (the data is hard coded as literals in your program code) and place the SONG objects in an array. Load SONGâ??s will always create a new array that holds the same four SONGs. Display - Display all SONGâ??s in the array Add - Add a new SONG object to the end of the array (prompt for the user to enter all data in order to create the SONG object). Save - Save all the SONGâ??s in the array to the text file. Name this text file SONGDATA.TXT. The data is to be presented as strings in the text file so that it can be displayed. Do NOT place a path on your text file name. Exit - Close the GUI and terminate the application.
HTML Table Sortindheeraj lalwani April 19, 2012 at 11:59 PM
Hi, I am working on a project and as per requirement from client i have to sort a table based on the ID Column. I want the table to be sorted as per ID Column once it's loaded. I found many programs of HTML table sorting where sorting happenes whenever user clicks on column header which i dont want. Please suggest as what approach i should follow to implement the same. Many Thanks in Advance
strings and charactarsMohammad Doush May 3, 2012 at 4:02 AM
Modify the program of project 3 to calculate statistics about letters. The new program should start by asking the user to enter the name of an input text file. It should keep asking the user to enter a proper file name until the user entres the name of a file that exists. Your program should then read all characters in the text file and print to the screen and to a text file all letters that occurred in the input file (including space, punctuation and other symbols), with the number of times each character occurred. The name of the file for statistics about letters should be â??Letters1.txtâ??. It should also print all words that occurred in the input file as well as to a file â??Words1.txtâ??. The program should also ask the user for N, the level of N-grams that should be calculated. It should then print to separate text files all N-grams and the number of occurrence of each N-gram. The name of the file for statistics about an N-gram should start with the word â??Lettersâ?? followed by the level of the N-Gram for letters. As for words the filename should start with the word â??Wordsâ?? followed by the level of the N-Gram of words. Thus for bigrams the files should be named â??Letters2.txtâ?? and â??Words2.txtâ??, for trigrams the file should be named â??Letters3.txtâ?? and â??Words3.txtâ??, etcâ?¦
java programsarup May 17, 2012 at 8:22 PM
create a class named triange_type and write a program in java to accept three sides of triangle. compute and print whether the triangle is equilateral or isoscelesor scalene traingle.
java switchcase & ifPradipta Das May 19, 2012 at 1:39 PM
An electronic shop has annonced following seasonal discounts. Purchase discount on laptop discount on desktop 0 to 25000 0% 5% 25001 to 57000 5% 7.5% 57001 to 100000 7.5% 10% more than 100000 10% 15% input name , type of purchase , ( L for laptop & D for desktop) & amount of purchase & print the net amount with name. Use inputstreamreader & if construct(don't use scanner).
ProgrammingBree June 15, 2012 at 8:55 PM
The factorial of a positive integer N, denoted by N!, is defined by the following: N! = 1 * 2 * ..... * N (Note: 0! = 1) Using subprograms and functions, create a recursive program to compute N!. The user should input a positive integer and a subprogram should check that the input is correct ( a positive integer). Then use recursion to computer the factorial. Create a subprogram that will call itself to do the multiplication until N = 1. Then display the result in the main program. Draw a flowchart and write a pseudo code for this program.
Q : Predict the output with Explanation.Patange August 3, 2012 at 2:47 PM
public class Switch2_OP { final static short x = 2; public static int y = 0; public static void main(String [] args) { for (int z=0; z < 3; z++) { switch (z) { case y: System.out.print("0 "); /* Line 11 */ case x-1: System.out.print("1 "); /* Line 12 */ case x: System.out.print("2 "); /* Line 13 */ } } } }
Javakartik Keshri August 14, 2012 at 1:01 PM
hi all, i have a problem. the problem is ,I have a file i want that this file is given to power builder application by java or jsp program. If anybody hava solution please let me know. thanks in advance..............
reading name email dob from resume Munish December 26, 2012 at 5:21 PM
reading name email,date of birth contact no from cv and print it in java
netbeans interfacehamza August 30, 2012 at 4:58 PM
how to ceate a browse button in the graphical interface netbeans ??
help in javaSunil September 8, 2012 at 2:02 AM
import java.util.Scanner; //uses Scanner class public class Shapes // Class name same as program name { private int radius; public int Shapes( int R ) { radius=R; } public void setRadius( int R ) { radius= R; } public int getRadius() { return radius; } public void report() { double areaCircle; Scanner input = new Scanner( System.in ); System.out.print( "Enter an integer for radius:" ); radius = input.nextInt(); areaCircle = Math.PI*Math.pow(radius, 2); System.out.print( "The area is:" +areaCircle); } public static void main ( String[] args ) { Shapes myShapes = new Shapes(); myShapes.report(); } } it says C:\Users\Suman>javac Shapes.java Shapes.java:16: missing return statemen } ^ 1 error
object-oriented programmingfatin September 21, 2012 at 5:19 PM
1. the formula for converting a temperature from Fahrenheit to Celsius is : C = (5(F - 32))/9 where F is the Fahrenheit temperature as an argument. The method should return the temperature, converted to Celsius. 2.Demonstrate the method by calling it in loop that displays a table of Fahrenheit temperature 0 though 20 and their Celsius equivalents.
asp.net vb.netbenjie September 26, 2012 at 9:32 PM
hello! can any please help me?i have here my problem Operator '&' is not defined for type 'Byte()' and string "|". in Img = (dr(1)) & "|" here's y codes Dim Img As Image Dim comm As New OdbcCommand Dim dr As OdbcDataReader conn.Open() comm.Connection = conn comm.CommandText = "select a.imgcatdesc, b.image from gallerycat_tbl a, gallery_tbl b where a.imgcatid = b.imgcatid" dr = comm.ExecuteReader countRec = 0 While dr.Read descrec = (dr(0)) & "|" Img = (dr(1)) & "|" allRec.Add(descrec & Img) countRec += 1 End While comm.Dispose() dr = Nothing conn.Close() please!
Java program writingSameer Mainali December 11, 2012 at 2:20 PM
Write a program to display the grade of student:distinction, merit, pass, referil based on the input given by user. marks>70%= distinction marks>60%= merit marks>50%=pass marks<40%=referil
JavaRAKESH October 16, 2012 at 2:44 PM
Hello Sir I am fresher to java so i need some help to clarify my doubts
print duplicates in arrayListmemo December 24, 2012 at 3:49 PM
i want to see if an element is repeated in an arrayList (named error_dub) print it ONCE here is my code for(x=0;x<error_dub.size()-1;x++){ for(h=x+1;h<error_dub.size()-1;h++){ if(error_dub.get(x).equals(error_dub.get(h)) && x!=h){ out.writeBytes(error_dub.get(x)+" is a duplicate label"+"\r\n"); } } }
javamanas ranjan dash April 7, 2013 at 12:36 PM
A person is rich if following confitions are satisfied: His name should be of at least 10 characters not counting the spaces in the name. His name must end with one of the following: "Tata", "Birla", "Ambani", "Adani", "Mittal", "Oberoi" or "Gandhi" He should have atleast 3 cars from the following list "Mercedes", "Ferrari", "BMW", "Macbacth" He should have atleast 10 cars in total. His income Last Year should be more than 100 million dollars if he is a NRI. If he is a polititian, his income last year must be greater than 500 million dollars. His last months income should be atleast 20% more than the last year's average monthly income. Write a programming in java language.
java programsarup May 17, 2012 at 8:26 PM
create a class named triangle_type and write a programe in java to accept three sides of a triangle. compute and print whether the triangle is equilateralor isoscelesor scalene triangle.
java programsarup May 17, 2012 at 8:27 PM
create a class named triangle_type and write a programe in java to accept three sides of a triangle. compute and print whether the triangle is equilateralor isoscelesor scalene triangle.
Post your Comment