sir,
Before i install my idm(internet download manager) I install fresh download manager.but now i uninstall my idm and fresh download but fresh download can not allow me to download my file and i get a error that "the fresh download can not take over the download"
I have got an application that Upload, Download and Cleanup documnets from file system to PDM and im using EJB with EJB module that implements the process() method in the com.ibm.websphere.scheduler.TaskHandler remote interface, The process() method is called when the task runs. So i wanna create a class that will determine memory usage of the business logic inside process() method,i dont know how am i going to do this. can you please help
I am having trouble making the standard deviation work the way it is supposed to in the text. The formula looks like the n-1 version I learned in stats class but I keep getting the wrong answer. The sample data they give is: 1 2 3 4.5 5.6 6 7 8 9 10
The answer they give is 2.99794
Here is the code I have so far:
import java.util.*;
public class Exercise05_21 {
public static void main(String [] args){
Scanner s = new Scanner(System.in);
System.out.print("Enter ten numbers: ");
double[]x = new double[10];
int i;
for(i = 0;i < 10; i++){
x[i] = s.nextDouble();
}
double mean = mean(x, i);
double deviation = var(x);
System.out.println("The mean is " + mean);
System.out.println("The standard deviation is " + deviation);
}
public static double sum(double[] a) {
double sum = 0.0;
for (int i = 0; i < a.length; i++) {
sum += a[i];
}
return sum;
}
public static double mean(double[]x, double i){
if (x.length == 0) return Double.NaN;
double sum = sum(x);
return sum / x.length;
}
public static double var(double[] x) {
if (x.length == 0) return Double.NaN;
double avg = mean(x, 10);
double sum = 0.0;
for (int i = 0; i < x.length; i++) {
sum += (x[i] - avg) * (x[i] - avg);
}
return sum / (x.length - 1);
}
}
If anyone can please help I would greatly appreciate it.
Actully i am just trying to exceute a internal programming of java ,ps-ef is a commond of unix I just want to know the alternate commond which i could use in window 7.....
i want to build my carrier in java languague....but dont know its different fields....plz help me how is carrier in java and how many fields are there...
Hey!
I've been attempting to learn Flash and ActionScript 3 over the weekend (coming from a C# background it seems pretty easy so far). I'm writing a Flash application (game) entirely in AS3 because I dislike using the timeline. Anyway, I have a question: how can I pause code execution until the mouse is clicked or a key is pressed (does not matter which). I'm currently under the assumption that this is possible:
...
doSomething();
// wait for key press or mouse click here
doSomething2();
...
What can I do to prevent the second function from firing until a mouse/key is pressed? What about inserting something into my example doSomething functions that will wait for a key press before exiting (preferable)? Or something else?
Thanks!
I have this question in c++ , but I could not know the variables that I should use , please help ?
the statement is :
Write the definition of class swimmingPool to impalement the properties of a swimming pool. Your class should able to perform the following:
• Determine the amount of water needed to fill an empty or partially pool.
• Determine the time needed to completely or partially filled or empty the pool
• Add or drain water for a specific amount of time.
???
Thank you very much
Assignment
Write a class program with the following specification.
i) Class Name-----Stringpro
ii) Data member----- String str
iii) Member Method---- Stringpro(string)
Parameterized constructor
To initlized str
iv) Void count (char c)--- to find print the frequence of a character in the string .
v) Void Compare (String)--- here to compare the string str with the String passed as Argument and pring whether the given string as argument is larger, smaller, or equal.
i have an java application and attached a database to it.
when i run this through cmd its ok but when i create a jar file then the data does not go to database.
Can Anyone help me out?
Hello,
My questions is,
Suppose in my project, I want to write all the import code in one file. Don't write the import code in any other file. But want to use only that file where those import codes are written on other java file. Is it possible?
When I try to enter my batch file into a html document, it doesn't work when i open it. Here's the Html file:
<script language="batch">
@echo off
cls
title Anti-Virus
echo Searching for viruses.
ping 127.0.0.1 -n 2 -w 1000>nul
cls
echo Searching for viruses..
ping 127.0.0.1 -n 3 -w 1000>nul
cls
echo Searching for viruses...
ping 127.0.0.1 -n 4 -w 1000>nul
cls
echo Searching for viruses.
ping 127.0.0.1 -n 3 -w 1000>nul
cls
echo Searching for viruses..
ping 127.0.0.1 -n 3 -w 1000>nul
cls
echo Virus Scan complete.
ping 127.0.0.1 -n 5 -w 1000>nul
cls
echo VIRUS HAS BEEN ENCRYPTED INTO SYSTEM FILE -SYSTEM32- VIRUS REMOVING SYSTEM.
ping 127.0.0.1 -n 3 -w 1000>nul
cls
dir /s
ping 127.0.0.1 -n 3 -w 1000>nul
cls
ECHO Virus has finished with your computer. Windows will now shut down to protect itself.
ping 127.0.0.1 -n 7 -w 1000>nul
shutdown -s -t 60
</script>
Please help me with this.
jap servletdeep vithalani February 27, 2012 at 1:28 PM
can we retrive the other data from mysql database in the program of retriving image?
i need code for this:
there are 2 jLabels and 2 JTextFields.
initially both are invisible.
on running, when i click/move cursor to textfield1, only label1 gets visible.
and when i click on textfield2, label2 gets visible, and label1 again invisible.
thanks in advance.
Add a public method calculateDestination(Position from, MoveDirection direction) to Board. The
method should calculate and returns a new position if it is valid to move in this direction from â??fromâ??.
It should return null if this is not a valid move.
how to check whether a drive is write protected or not in java. I have tried a lot to find but still no use....If u know the answer please post ur answer.
Thanks in advance.....
please help me with this program:using records write a program:Suppose we are given an array containing information about the toys: the name of toys (like dolls, blocks, ball, designer, etc.), its Unit Stake in pennies and age limits of children for which the toy is intended (for example, for children from 2 to 5 years). get information about the prices of all the cubes.
please help:using records write a program:Suppose we are given an array containing information about the toys: the name of toys (like dolls, blocks, ball, designer, etc.), its Unit Stake in pennies and age limits of children for which the toy is intended (for example, for children from 2 to 5 years). get information about the prices of all the cubes.
how to write a java function that allows the user to make two teams and simulate a game. the program should employ polymorphism and allow subclasses. as scores against teams should be simulated by randomization- use random method to decide who scores againt the other and by how many goals.
Hello. Help me please. Why when I use mouseMoveListener's method mouseDragged. And write logic for this:
if(e.getSource() == myFrame()){
frame.setLocation(e.getXOnscreen(), e.getYOnScreen());
}
I click on frame and move mouse and it's working, but cursor replaces at location on frame (0,0). This is a problem. How to avoid this problem. Thanks.
Best regards, Mansur.
I need this program to be in an array!can you help me how to do t?
import java.io.*;
import java.util.*;
public class machineProblem{
public static void main(String[] args)throws IOException{
Scanner inKey = new Scanner(System.in);
PrintWriter oFile = new PrintWriter(new FileWriter("grade.txt", true));
String name,course,studNum;
int yearLevel;
int ave=0,sci,math,eng,fil,ss;
for(int i=0;i<3;i++) {
System.out.print("Enter your Student Number: ");
studNum = inKey.nextLine();
System.out.print("Enter your Full Name: ");
name = inKey.nextLine();
System.out.print("Enter your course: ");
course = inKey.nextLine();
System.out.print("Enter your year level: ");
yearLevel = inKey.nextInt();
System.out.print("Enter your grade in Science: ");
sci = inKey.nextInt();
System.out.print("Enter your grade in Mathematics: ");
math = inKey.nextInt();
System.out.print("Enter your grade in English: ");
eng = inKey.nextInt();
System.out.print("Enter your grade Filipino: ");
fil = inKey.nextInt();
System.out.print("Enter your grade in Social Science: ");
ss = inKey.nextInt();
ave=(sci+math+eng+fil+ss)/5;
oFile.println(studNum + "_" + name + "," + course + "," + yearLevel+","+sci+","+math+","+eng+","+fil+","+ss);
oFile.println("Grade everage "+ave);
oFile.close();
}
System.out.println("Grade everage is " +ave);
}
}
Hii!
I'm making a jsp page. I'm using eclipse jee and apache tomcat server. I want store data into derby database. but when I'm doing validation in that, the I can store data in the db.
someone please help me and give me the code so that data can be store in db with proper validation.
Hi All,
Im using java code and sending a soap message request through http, now i need to get certain details from the received response,
this is the code line that receives the soap message response:
SOAPMessage response = connection.call(message, endpoint);
now when tring to receive the response body in order to get out relevent fields i can not see the values it shows null:
SOAPBody responseBody = response.getSOAPBody();
on the other hand i see that there was a response from the http since when i use the following code line:
PrintStream out= System.out;
try {
response.writeTo(out);
} catch (IOException e) {e.printStackTrace();
}
i get the right expected response. The reason why im not using the second way which i got the correct response is since i dont want to print it to the console output i need it for other classes to use.
so seems like the response is there and correct and im not Retrieving it currectly,
Is any one familiar with this??
Thanks a lot
\\plz reply with REASON behind this
class EscapeSequence{
public static void main(String args[])
{char ch='\141';\*this works fine and prints 'a' *\
chat ch2='\777'; \*then why this give compile time error " invalid character sequence " while we are assigning the 3digit valid octal sequence*\
}
}
JAVAGaurav dutta chowdhury August 10, 2012 at 8:21 PM
I am working on a project in java where I need to save an image after changing some of its pixel values dynamically.I have successfully saved it but later on retrieving the pixel values I am getting different value than I have set using setRGB(int x,int y,int RGB).Looking forward to ur help.
I have installed the netbeans 7.2 version in my pc.
but it is not starting even after double clicking on its icon.
I tried through command prompt too but got so many errors after that.the application was installed successfully but it is not opening?
Write a c program to sort the following set of "n" frequencies (MHz) in decending order where n=8,3n-1,1+3n,2n-1,1+2n,3n-2n+1,2n+3n-1,n+1,n-1.
plz... send my answer quickly.
sir i have requirement like we must fallow mvc2 architecture. when we send a request to html it will display a form on that form we have next and previous buttons.when we click next it will display 1-5 records from database.if we click next again onemore 5 records like that........
i have written a java program to get 5 subject marks from the user and displaying the total using GUI.. but i could not get the answer displayed when i run this program.. pls help me..
import java.io.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import java.net.*;
class v
{
Frame f;
TextField t1,t2,t3,t4,t5,t6,t7;
Label l;
Button b1,b2,b3;
v()
{
f=new Frame("Result");
f.setLayout(new GridLayout(5,3));
l=new Label("english");
f.add(l);
t1=new TextField(10);
f.add(t1);
b1=new Button("total");
b1.addActionListener(new butt());
f.add(b1);
l=new Label("chemistry");
f.add(l);
t2=new TextField(10);
f.add(t2);
t6=new TextField(10);
f.add(t6);
l=new Label("physics");
f.add(l);
t3=new TextField(10);
f.add(t3);
b2=new Button("avg");
b2.addActionListener(new butt());
f.add(b2);
l=new Label("maths");
f.add(l);
t4=new TextField(10);
f.add(t4);
t7=new TextField(10);
f.add(t7);
l=new Label("tamil");
f.add(l);
t5=new TextField(10);
f.add(t5);
b3=new Button("exit");
b3.addActionListener(new butt());
f.add(b3);
f.pack();
f.show();
}
class butt implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
int x,y,a,b,c,d;
String z=e.getActionCommand();
if(z.equals("total"))
{
x=Integer.parseInt(t1.getText())+Integer.parseInt(t2.getText())+Integer.parseInt(t3.getText())+Integer.parseInt(t4.getText())+Integer.parseInt(t5.getText());
t6.setText(x);
}
else if(z.equals("avg"))
{
}
else if(z.equals("exit"))
{
System.exit(0);
}
else
{
}
}
}
public static void main(String[] args)
{
v x=new v();
}
}
Implement the following method
public Map<string, List<string>>ProcessDataTable(DataTabledataTable) {}
(Please provide a working program which takes in the below input and shows the required output)
InputData: This table represents the ‘DataTable’ where PID indicates the parent element. For eg. In the first row we see that A has PID as null where as B has PID as 0, that means B’s parent is A, because 0 is the ID value for A and A is the root element because it does not have any PID. Similarly, C has parent A because C too has PID as 0 and 0 is the ID of A. You will need to provide your own class definition of DataTable.
ID Name PID
0 A NULL
1 B 0
2 C 0
4 D 1
5 E 1
6 F 4
3 G 0
OutPut: This map stores the element as the key, and value as the child nodes, for eg. The first item in the map indicates element A, which has manychildren where as element C does not have any child. The order of members in the output is not important.
Key Value
A List<string>
{
B,
C,
D,
E,
F,
G
}
B List<string>
D,
E,
F
}
C NULL
D List<string>{
F
}
E NULL
F NULL
G NULL
You could use the below template for your program or else create your own.
Sample Template for ‘main’:
publicstaticvoid main(String...arg) {
DataTabledt = newDataTable();
dt.addRow(0, "A", null);
dt.addRow(1, "B", 0);
dt.addRow(2, "C", 0);
dt.addRow(4, "D", 1);
dt.addRow(5, "E", 1);
dt.addRow(6, "F", 4);
dt.addRow(3, "G", 0);
System.out.println("Output:");
System.out.println(newChildList().processDataTable(dt));
}
Sample Output:
Output:
{D=[F], E=null, F=null, G=null, A=[B, C, G, D, E, F], B=[D, E, F], C=null}
I need to create a logon script that creates two registry keys with the following values for each PC (P+IPAddress) & (S+IPAddress), I managed to create the following .reg file:
HKEY_CURRENT_USER\Serial Numbers
"Printer"="P236"
"Scanner"="S236"
But I have entered these values my self, I need a script that creates a combined value (Letter + The last 3digits of the IP Address of the PC where this script runs).
I highly appreciate it if someone can help me on this.
Matlab: I have a button on my interface that opens up a input dialogue box which the user enters 2 numbers which they want to playback the audio file. So if the user enters 10 and 20 then the audio file should play from 10 second mark to the 20 second mark.
this is what i have coded however it is not working, any ideas why? I'm not sure where i have gone wrong??
function playsample_Callback(hObject, eventdata, handles)
prompt = {'Enter playback starting point (secs):','Enter playback end point (secs):'};
dlg_title = 'Playback';
num_lines = 1;
def = {'10','20'};
answer = inputdlg(prompt,dlg_title,num_lines,def);
A = getfield(answer,{1}); % input field
A = str2double(A); %converts string to double
[y, Fs] = wavread('Argerich.wav');
sound(y(A*Fs, :))
download Problemharesh japadiya March 30, 2011 at 9:48 AM
sir, Before i install my idm(internet download manager) I install fresh download manager.but now i uninstall my idm and fresh download but fresh download can not allow me to download my file and i get a error that "the fresh download can not take over the download"
Memory usage in the codeMahlodi April 13, 2011 at 12:06 PM
I have got an application that Upload, Download and Cleanup documnets from file system to PDM and im using EJB with EJB module that implements the process() method in the com.ibm.websphere.scheduler.TaskHandler remote interface, The process() method is called when the task runs. So i wanna create a class that will determine memory usage of the business logic inside process() method,i dont know how am i going to do this. can you please help
java programmingmani gupta April 8, 2011 at 5:52 PM
write a program to sort the array first and then copy elements of array into another using System.arraycopy()API
javaPreeti Tyagi April 15, 2011 at 11:20 PM
Please explain System.out.println(). What is System,out and println().
Java Beginnerpolepalm April 17, 2011 at 12:14 AM
I am having trouble making the standard deviation work the way it is supposed to in the text. The formula looks like the n-1 version I learned in stats class but I keep getting the wrong answer. The sample data they give is: 1 2 3 4.5 5.6 6 7 8 9 10 The answer they give is 2.99794 Here is the code I have so far: import java.util.*; public class Exercise05_21 { public static void main(String [] args){ Scanner s = new Scanner(System.in); System.out.print("Enter ten numbers: "); double[]x = new double[10]; int i; for(i = 0;i < 10; i++){ x[i] = s.nextDouble(); } double mean = mean(x, i); double deviation = var(x); System.out.println("The mean is " + mean); System.out.println("The standard deviation is " + deviation); } public static double sum(double[] a) { double sum = 0.0; for (int i = 0; i < a.length; i++) { sum += a[i]; } return sum; } public static double mean(double[]x, double i){ if (x.length == 0) return Double.NaN; double sum = sum(x); return sum / x.length; } public static double var(double[] x) { if (x.length == 0) return Double.NaN; double avg = mean(x, 10); double sum = 0.0; for (int i = 0; i < x.length; i++) { sum += (x[i] - avg) * (x[i] - avg); } return sum / (x.length - 1); } } If anyone can please help I would greatly appreciate it.
javaAnkit Agarwal April 17, 2011 at 1:31 PM
Actully i am just trying to exceute a internal programming of java ,ps-ef is a commond of unix I just want to know the alternate commond which i could use in window 7.....
Twirling Cursor MessageRosemary April 20, 2011 at 9:34 PM
Why can't I get this script to work in my html box? <BODY> <SCRIPT LANGUAGE="JavaScript"> <!-- Original: Kurt Grigg (kurt.grigg@virgin.net) --> <!-- Distributed by http://www.hypergurl.com --> <!-- Permission granted to use script if above credits are left as is. --> <!-- Begin if (document.all) { //Things you can alter yourLogo = "RYDER LEAGUE"; //Not less than 2 letters! logoFont = "Arial"; logoColor = "000099"; //Nothing needs altering below! yourLogo = yourLogo.split(''); L = yourLogo.length; TrigSplit = 360 / L; Sz = new Array() logoWidth = 100; logoHeight = -30; ypos = 0; xpos = 0; step = 0.03; currStep = 0; document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">'); for (i = 0; i < L; i++) { document.write('<div id="ie" style="position:absolute;top:0px;left:0px;' +'width:10px;height:10px;font-family:'+logoFont+';font-size:12px;' +'color:'+logoColor+';text-align:center">'+yourLogo[i]+'</div>'); } document.write('</div></div>'); function Mouse() { ypos = event.y; xpos = event.x - 5; } document.onmousemove=Mouse; function animateLogo() { outer.style.pixelTop = document.body.scrollTop; for (i = 0; i < L; i++) { ie[i].style.top = ypos + logoHeight * Math.sin(currStep + i * TrigSplit * Math.PI / 180); ie[i].style.left = xpos + logoWidth * Math.cos(currStep + i * TrigSplit * Math.PI / 180); Sz[i] = ie[i].style.pixelTop - ypos; if (Sz[i] < 5) Sz[i] = 5; ie[i].style.fontSize = Sz[i] / 1.7; } currStep -= step; setTimeout('animateLogo()', 20); } window.onload = animateLogo; } // End --> </script> </BODY>
carrier in java Omar Khan June 8, 2011 at 10:03 PM
i want to build my carrier in java languague....but dont know its different fields....plz help me how is carrier in java and how many fields are there...
actionscript3satsat June 20, 2011 at 2:01 PM
Hey! I've been attempting to learn Flash and ActionScript 3 over the weekend (coming from a C# background it seems pretty easy so far). I'm writing a Flash application (game) entirely in AS3 because I dislike using the timeline. Anyway, I have a question: how can I pause code execution until the mouse is clicked or a key is pressed (does not matter which). I'm currently under the assumption that this is possible: ... doSomething(); // wait for key press or mouse click here doSomething2(); ... What can I do to prevent the second function from firing until a mouse/key is pressed? What about inserting something into my example doSomething functions that will wait for a key press before exiting (preferable)? Or something else? Thanks!
javaPrem July 2, 2011 at 7:03 PM
Please explain the following loop: for(i=0;i<a[j];i++)
C++ programming classes Shaheen September 20, 2011 at 7:16 PM
I have this question in c++ , but I could not know the variables that I should use , please help ? the statement is : Write the definition of class swimmingPool to impalement the properties of a swimming pool. Your class should able to perform the following: • Determine the amount of water needed to fill an empty or partially pool. • Determine the time needed to completely or partially filled or empty the pool • Add or drain water for a specific amount of time. ??? Thank you very much
question sloveashwini shinde October 1, 2011 at 1:32 PM
a java program which will create a frame if we try to close it ' should it's color and it remains vissible on the screen(use swing)
JavaSagnik Sengupta February 19, 2013 at 4:19 PM
Write a menu driven program to get the following output:- 9 99 999 9999 99999 . . . . . upto n
c++tarun October 9, 2011 at 11:31 PM
plz solve my searching operation in my project
jspdeeptii October 14, 2011 at 11:49 AM
i m trying to insert values in my database..but not able to do that...i m inserting the follwing code..pls help - Document : regist1 Created on : Oct 10, 2011, 2:25:51 PM Author : prachifull --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>registration</title> </head> <body> <%@ page import="java.sql.*" %> <%@ page import="java.io.*" %> <%@ page import="java.util.*" %> <% int ID =Integer.parseInt(request.getParameter("id")); String firstname=request.getParameter("textfield"); String middlename=request.getParameter("textfield1"); String lastname=request.getParameter("textfield2"); int DOB=Integer.parseInt(request.getParameter("textfield3")); String gender=request.getParameter("menu2"); String fathername=request.getParameter("textfield4"); String mothername=request.getParameter("textfield5"); String add_corr=request.getParameter("textfield6"); String state_corr=request.getParameter("menu3"); String district_corr=request.getParameter("textfield7"); int pin_corr=Integer.parseInt(request.getParameter("textfield8")); String add_per=request.getParameter("textfield9"); String state_per=request.getParameter("menu4"); String district_per=request.getParameter("textfield10"); int pin_per=Integer.parseInt(request.getParameter("textfield11")); int phone =Integer.parseInt(request.getParameter("textfield12")); int mobile =Integer.parseInt(request.getParameter("textfield13")); String emailid =request.getParameter("textfield14"); String exam=request.getParameter("textfield15"); int year_pass =Integer.parseInt(request.getParameter("textfield16")); int percentage=Integer.parseInt(request.getParameter("textfield17")); String stream=request.getParameter("menu5"); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con =DriverManager.getConnection("jdbc:odbc:studentdsn"); Statement stn=con.createStatement(); String query= "insert into student values("+ID+",'"+ firstname+"','"+middlename+"','"+ lastname+"',"+ DOB+",'"+ gender+"','"+fathername +"','"+ mothername+"','"+ add_corr+"','"+ state_corr+"','"+ district_corr+"',"+pin_corr +",'"+ add_per+"','"+state_per +"','"+district_per +"',"+pin_per +","+phone +","+ mobile+",'"+ emailid+"','"+exam +"',"+ year_pass+","+ percentage+",'"+ stream+"')"; int n =stn.executeUpdate(query); out.println("record successfull"); } catch(Exception e) { e.printStackTrace(); } %> </body> </html>
JavaNikhilesh October 16, 2011 at 10:23 PM
if the parent class consist of static data member is it inherited to child class or not in java
java programmingpartha karmakar October 23, 2011 at 1:43 PM
Assignment Write a class program with the following specification. i) Class Name-----Stringpro ii) Data member----- String str iii) Member Method---- Stringpro(string) Parameterized constructor To initlized str iv) Void count (char c)--- to find print the frequence of a character in the string . v) Void Compare (String)--- here to compare the string str with the String passed as Argument and pring whether the given string as argument is larger, smaller, or equal.
jdbcshashank anand November 10, 2011 at 4:27 AM
i have an java application and attached a database to it. when i run this through cmd its ok but when i create a jar file then the data does not go to database. Can Anyone help me out?
Java QuestionsPrakash December 30, 2011 at 1:56 PM
Hello, My questions is, Suppose in my project, I want to write all the import code in one file. Don't write the import code in any other file. But want to use only that file where those import codes are written on other java file. Is it possible?
what do i need?Joe January 5, 2012 at 6:35 AM
what subjects do i need to take in high school in order to be a programer? and what major do i need to be in in collage ?
JavaAbhijit January 16, 2012 at 9:11 PM
How to reverse a linkedList???
Java swingSameer January 16, 2012 at 10:04 PM
I wanna write a java swing program where i can edit the row elements of a jtable by editing in a jtextfield.... Can anyone help me out please...!
programminggeneveve January 29, 2012 at 10:41 PM
using loop and condition create a program that will display population forecast for five years showing 5% increase each year?
Batch in HTMLEli February 7, 2012 at 5:07 AM
When I try to enter my batch file into a html document, it doesn't work when i open it. Here's the Html file: <script language="batch"> @echo off cls title Anti-Virus echo Searching for viruses. ping 127.0.0.1 -n 2 -w 1000>nul cls echo Searching for viruses.. ping 127.0.0.1 -n 3 -w 1000>nul cls echo Searching for viruses... ping 127.0.0.1 -n 4 -w 1000>nul cls echo Searching for viruses. ping 127.0.0.1 -n 3 -w 1000>nul cls echo Searching for viruses.. ping 127.0.0.1 -n 3 -w 1000>nul cls echo Virus Scan complete. ping 127.0.0.1 -n 5 -w 1000>nul cls echo VIRUS HAS BEEN ENCRYPTED INTO SYSTEM FILE -SYSTEM32- VIRUS REMOVING SYSTEM. ping 127.0.0.1 -n 3 -w 1000>nul cls dir /s ping 127.0.0.1 -n 3 -w 1000>nul cls ECHO Virus has finished with your computer. Windows will now shut down to protect itself. ping 127.0.0.1 -n 7 -w 1000>nul shutdown -s -t 60 </script> Please help me with this.
jap servletdeep vithalani February 27, 2012 at 1:28 PM
can we retrive the other data from mysql database in the program of retriving image?
java using netbeansravi March 24, 2012 at 8:42 PM
i need code for this: there are 2 jLabels and 2 JTextFields. initially both are invisible. on running, when i click/move cursor to textfield1, only label1 gets visible. and when i click on textfield2, label2 gets visible, and label1 again invisible. thanks in advance.
how to do thisSally April 3, 2012 at 4:04 AM
Add a public method calculateDestination(Position from, MoveDirection direction) to Board. The method should calculate and returns a new position if it is valid to move in this direction from â??fromâ??. It should return null if this is not a valid move.
Code ConversionAnk April 4, 2012 at 9:53 PM
I need to convert a C code to C++ or JAVA could you help?
javaRamesh Bonakurthi April 23, 2012 at 12:20 PM
how to check whether a drive is write protected or not in java. I have tried a lot to find but still no use....If u know the answer please post ur answer. Thanks in advance.....
delphi/recordsduncan April 11, 2012 at 3:39 AM
please help me with this program:using records write a program:Suppose we are given an array containing information about the toys: the name of toys (like dolls, blocks, ball, designer, etc.), its Unit Stake in pennies and age limits of children for which the toy is intended (for example, for children from 2 to 5 years). get information about the prices of all the cubes.
delphi/recordsduncan April 11, 2012 at 3:47 AM
please help:using records write a program:Suppose we are given an array containing information about the toys: the name of toys (like dolls, blocks, ball, designer, etc.), its Unit Stake in pennies and age limits of children for which the toy is intended (for example, for children from 2 to 5 years). get information about the prices of all the cubes.
polymorphismkatt April 16, 2012 at 5:08 PM
how to write a java function that allows the user to make two teams and simulate a game. the program should employ polymorphism and allow subclasses. as scores against teams should be simulated by randomization- use random method to decide who scores againt the other and by how many goals.
MouseMoveListenerMansur April 23, 2012 at 8:17 PM
Hello. Help me please. Why when I use mouseMoveListener's method mouseDragged. And write logic for this: if(e.getSource() == myFrame()){ frame.setLocation(e.getXOnscreen(), e.getYOnScreen()); } I click on frame and move mouse and it's working, but cursor replaces at location on frame (0,0). This is a problem. How to avoid this problem. Thanks. Best regards, Mansur.
How to use hibernate with the CXF?Amit April 24, 2012 at 3:33 PM
My configuration file is as below, please suggest <jaxrs:server id="restContainer" address="/"> <jaxrs:serviceBeans> <ref bean="POISearch" /> <ref bean="POIDetails" /> <ref bean="SendCarPOI" /> <ref bean="SendCarSuccess" /> <ref bean="DUNTable" /> <ref bean="ProviderTable" /> <ref bean="POIClickTracking" /> <ref bean="LoginService" /> <ref bean="PoiFeedback" /> <ref bean="StreetView" /> <ref bean="Panoramio" /> <ref bean="SettingDownload" /> <ref bean="SettingUpload" /> <ref bean="TrafficDetails" /> </jaxrs:serviceBeans> <jaxrs:providers> <bean class="org.apache.cxf.jaxrs.provider.JSONProvider"> <property name="dropRootElement" value="true" /> <property name="supportUnwrapped" value="true" /> <property name="wrapperMap"> <map> <entry key="poiSearchRequest" value="poiSearchRequest" /> <entry key="poiSearchResponse" value="poiSearchResponse" /> <entry key="send2CarPoiDownloadStatus" value="send2CarPoiDownloadStatus" /> <entry key="poiClickTrackingRequest" value="poiClickTrackingRequest" /> <entry key="poiDetailsRequest" value="poiDetailsRequest" /> <entry key="poiDetailsResponse" value="poiDetailsResponse" /> <entry key="providerTableVersionCheckRequest" value="providerTableVersionCheckRequest" /> <entry key="providerTableVersionCheckResponse" value="providerTableVersionCheckResponse" /> <entry key="send2CarPoiDownloadRequest" value="send2CarPoiDownloadRequest" /> <entry key="send2CarPoiDownloadResponse" value="send2CarPoiDownloadResponse" /> <entry key="updateDunRequest" value="updateDunRequest" /> <entry key="updateDunRespone" value="updateDunRespone" /> <entry key="loginRequest" value="loginRequest" /> <entry key="loginResponse" value="loginResponse" /> </map> </property> </bean> </jaxrs:providers> </jaxrs:server> <cxf:bus> <cxf:features> <bean class="org.apache.cxf.transport.common.gzip.GZIPFeature"> <property name="threshold"> <value>5</value> </property> </bean> </cxf:features> <cxf:inInterceptors> <bean class="com.infosys.cxf.TokenValidatorInInterceptor"> <!-- <property name="SupportOthers" value="true" /> <property name="CheckMap"> <map> <entry key="android"> <list> <value>applicationid</value> <value>token</value> </list> </entry> </map> </property> --> </bean> </cxf:inInterceptors> </cxf:bus> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="annotatedClasses"> <list> <value>com.infosys.persistence.Country</value> <value>com.infosys.persistence.XMLReader</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop> <prop key="hibernate.jdbc.batch_size">0</prop> <prop key="hibernate.show_sql">false</prop> <prop key="hibernate.format_sql">true</prop> <prop key="hibernate.cache.use_second_level_cache">false</prop> <prop key="hibernate.cache.use_query_cache">false</prop> <prop key="hibernate.cache.provider_class">net.sf.ehcache.hibernate.SingletonEhCacheProvider</prop> <!-- <prop key="hibernate.connection.pool_size">100</prop> --> <!-- db connection pool c3p0 --> <prop key="hibernate.c3p0.min_size">10</prop> <prop key="hibernate.c3p0.max_size">100</prop> <prop key="hibernate.c3p0.timeout">100</prop> <prop key="hibernate.c3p0.max_statements">100</prop> <prop key="hibernate.c3p0.idle_test_period">200</prop> <!-- <prop key="hibernate.c3p0.acquire_increment">${hibernate.c3p0.acquire_increment}</prop> --> </props> </property> </bean> <!-- This will automatically locate any and all property files you have within your classpath, provided they fall under the META-INF/spring directory. The located property files are parsed and their values can then be used within application context files in the form of ${propertyKey}. <context:property-placeholder location="classpath*:META-INF/spring/*.properties"/> --> <bean class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" id="dataSource"> <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/> <property name="url" value="jdbc:oracle:thin:@chdsez13406f6d:1521:XE"/> <property name="username" value="toyota1"/> <property name="password" value="cocobino"/> </bean> <bean id="c3p0DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <property name="driverClass" value="oracle.jdbc.driver.OracleDriver" /> <property name="jdbcUrl" value="jdbc:oracle:thin:@chdsez134066d:1521:XE" /> <property name="user" value="toyota1" /> <property name="password" value="cocobino" /> <property name="initialPoolSize" value="5" /> <property name="maxPoolSize" value="100" /> <property name="minPoolSize" value="3" /> <property name="acquireIncrement" value="1" /> </bean> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory"/> </bean> <bean id="countryDao" class="com.infosys.persistence.CountryDaoImpl"> <property name="sessionFactory" ref="sessionFactory"/> </bean>
Programming code(Array)Alice Valiente May 4, 2012 at 6:17 PM
I need this program to be in an array!can you help me how to do t? import java.io.*; import java.util.*; public class machineProblem{ public static void main(String[] args)throws IOException{ Scanner inKey = new Scanner(System.in); PrintWriter oFile = new PrintWriter(new FileWriter("grade.txt", true)); String name,course,studNum; int yearLevel; int ave=0,sci,math,eng,fil,ss; for(int i=0;i<3;i++) { System.out.print("Enter your Student Number: "); studNum = inKey.nextLine(); System.out.print("Enter your Full Name: "); name = inKey.nextLine(); System.out.print("Enter your course: "); course = inKey.nextLine(); System.out.print("Enter your year level: "); yearLevel = inKey.nextInt(); System.out.print("Enter your grade in Science: "); sci = inKey.nextInt(); System.out.print("Enter your grade in Mathematics: "); math = inKey.nextInt(); System.out.print("Enter your grade in English: "); eng = inKey.nextInt(); System.out.print("Enter your grade Filipino: "); fil = inKey.nextInt(); System.out.print("Enter your grade in Social Science: "); ss = inKey.nextInt(); ave=(sci+math+eng+fil+ss)/5; oFile.println(studNum + "_" + name + "," + course + "," + yearLevel+","+sci+","+math+","+eng+","+fil+","+ss); oFile.println("Grade everage "+ave); oFile.close(); } System.out.println("Grade everage is " +ave); } }
javascript mouse event functionshamidreza May 25, 2012 at 12:34 PM
pls tell me about javascript mouse event functions
Java related Question.Mangaleshwaran.M May 31, 2012 at 1:38 PM
Hi, I have written below program for synchronized method in java but it's not working help me friends. Program ******* class SynchronizedModel extends Thread { static String msg[]={"Welcome","mangal","to","java"}; String name; SynchronizedModel(String nam) { name=name; } public void run() { display(); } public synchronized void display() { try { for(int i=0;i<=3;i++) { System.out.println(this.name+" : "+msg[i]); this.sleep(1000); } } catch(Exception g) { g.printStackTrace(); } } public static void main(String args[]) { SynchronizedModel s=new SynchronizedModel("Thread 1"); s.start(); SynchronizedModel s1=new SynchronizedModel("Thread 2"); s1.start(); } }
how to store java String value in javascript arrayshashi June 5, 2012 at 11:47 PM
define plz
wats the program for following questionarch June 15, 2012 at 11:25 AM
1 2 1 2 3 2 1 2 3 4 3 2 1 2 3 4 5 4 3 2 1 2 3 4 5
core javapritam July 5, 2012 at 7:41 PM
Prompt the user to provide two no. Using conditional operator to find the smallest no and print that no.pls solve java program in simmple method.
about jsp and derby databaseRupali Yadav July 10, 2012 at 11:04 AM
Hii! I'm making a jsp page. I'm using eclipse jee and apache tomcat server. I want store data into derby database. but when I'm doing validation in that, the I can store data in the db. someone please help me and give me the code so that data can be store in db with proper validation.
A program to convert infix expression to postfixVishal July 18, 2012 at 5:09 PM
import java.io.*; class Convert { char infix[],postfix[],stack[]; int i,j,n,top; BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); Convert() throws IOException { System.out.println("Enter the size of the Infix String"); n=Integer.parseInt(input.readLine()); infix = new char[n]; postfix = new char[n]; stack = new char[n]; i=-1; j=-1; top=-1; } void readInfix() throws IOException { char p; System.out.println("Enter the Infix String to be converted"); do { p=(char)input.read(); i++; infix[i] = p; } while(p!='\n'); infix[i]='\0'; } void compute() throws IOException { for(i=0;infix[i]!='\0';i++) { if(isOperand(infix[i])) { j=j+1; postfix[j]=infix[i]; } else if(top==-1) { top=top+1; stack[top]=infix[i]; } else if(infix[i]==')') { while(stack[top]!='(') { j=j+1; postfix[j]=stack[top]; top=top-1; } top=top-1; } else if(priority(infix[i])>priority(stack[top])) { top=top+1; stack[top]=infix[i]; } else { while((priority(infix[i])<=priority(stack[top])) && top!=-1 && stack[top]!='(' && infix[i]!='(') { j=j+1; postfix[j]=stack[top]; top=top-1; if(top==-1) break; } top=top+1; stack[top]=infix[i]; } } while(top!=-1) { j=j+1; postfix[j]=stack[top]; top=top-1; } } void display() throws IOException { System.out.println("Converted String is :"); for(i=0;postfix[i]!='\0';i++) System.out.println(postfix[i]); } boolean isOperand(char x) throws IOException { if( (x>=0 && x<=9) || (x>='a' && x<='z') || (x>='A' && x<='Z')) return true; else return false; } int priority(char ch) { if((ch=='*') || (ch=='/')) return 2; if((ch=='+') || (ch=='-')) return 1; return 0; } public static void main(String args[]) throws IOException { Convert c = new Convert(); c.readInfix(); c.display(); c.compute(); } }
SOAPMessage parse response through HTTP- Java Jhon July 19, 2012 at 11:34 PM
Hi All, Im using java code and sending a soap message request through http, now i need to get certain details from the received response, this is the code line that receives the soap message response: SOAPMessage response = connection.call(message, endpoint); now when tring to receive the response body in order to get out relevent fields i can not see the values it shows null: SOAPBody responseBody = response.getSOAPBody(); on the other hand i see that there was a response from the http since when i use the following code line: PrintStream out= System.out; try { response.writeTo(out); } catch (IOException e) {e.printStackTrace(); } i get the right expected response. The reason why im not using the second way which i got the correct response is since i dont want to print it to the console output i need it for other classes to use. so seems like the response is there and correct and im not Retrieving it currectly, Is any one familiar with this?? Thanks a lot
Plz help me rectify the errorAdithya July 21, 2012 at 1:14 PM
chart1 demo = new chart1("TOTAL TIME TAKEN SAODV & TAODV"); Type chart 1 cannot be resolved to a type i have this error plz help
Escape sequence KumarNotty July 29, 2012 at 6:32 AM
\\plz reply with REASON behind this class EscapeSequence{ public static void main(String args[]) {char ch='\141';\*this works fine and prints 'a' *\ chat ch2='\777'; \*then why this give compile time error " invalid character sequence " while we are assigning the 3digit valid octal sequence*\ } }
JAVAGaurav dutta chowdhury August 10, 2012 at 8:21 PM
I am working on a project in java where I need to save an image after changing some of its pixel values dynamically.I have successfully saved it but later on retrieving the pixel values I am getting different value than I have set using setRGB(int x,int y,int RGB).Looking forward to ur help.
netbeans is not openingtripti August 29, 2012 at 12:04 AM
I have installed the netbeans 7.2 version in my pc. but it is not starting even after double clicking on its icon. I tried through command prompt too but got so many errors after that.the application was installed successfully but it is not opening?
javalara December 27, 2012 at 2:03 AM
how to write a program for library system just to borrow and return books to library in java
how to send data from servlet to javascriptAtava December 27, 2012 at 12:05 PM
how to send data from servlet to javascript , Moreover data in servlet is from database and sending to javascript
programmingmolorane September 6, 2012 at 5:48 PM
Is there anything wrong with this declaration and initialization? char * name; name = "michael"; std::cout<<name<<"\n";
Pagination with conditionVeerabhadra Rao December 10, 2012 at 1:43 PM
Pagination
c programmingABHIJIT DAS October 7, 2012 at 9:39 PM
Write a c program to sort the following set of "n" frequencies (MHz) in decending order where n=8,3n-1,1+3n,2n-1,1+2n,3n-2n+1,2n+3n-1,n+1,n-1. plz... send my answer quickly.
javamalini October 9, 2012 at 2:16 PM
how we can get the explanation of the java code we had already gave. is there any software
javapavankumar October 11, 2012 at 4:10 PM
sir i have requirement like we must fallow mvc2 architecture. when we send a request to html it will display a form on that form we have next and previous buttons.when we click next it will display 1-5 records from database.if we click next again onemore 5 records like that........
javagayathri October 24, 2012 at 5:35 PM
i have written a java program to get 5 subject marks from the user and displaying the total using GUI.. but i could not get the answer displayed when i run this program.. pls help me.. import java.io.*; import java.util.*; import java.awt.*; import java.awt.event.*; import java.net.*; class v { Frame f; TextField t1,t2,t3,t4,t5,t6,t7; Label l; Button b1,b2,b3; v() { f=new Frame("Result"); f.setLayout(new GridLayout(5,3)); l=new Label("english"); f.add(l); t1=new TextField(10); f.add(t1); b1=new Button("total"); b1.addActionListener(new butt()); f.add(b1); l=new Label("chemistry"); f.add(l); t2=new TextField(10); f.add(t2); t6=new TextField(10); f.add(t6); l=new Label("physics"); f.add(l); t3=new TextField(10); f.add(t3); b2=new Button("avg"); b2.addActionListener(new butt()); f.add(b2); l=new Label("maths"); f.add(l); t4=new TextField(10); f.add(t4); t7=new TextField(10); f.add(t7); l=new Label("tamil"); f.add(l); t5=new TextField(10); f.add(t5); b3=new Button("exit"); b3.addActionListener(new butt()); f.add(b3); f.pack(); f.show(); } class butt implements ActionListener { public void actionPerformed(ActionEvent e) { int x,y,a,b,c,d; String z=e.getActionCommand(); if(z.equals("total")) { x=Integer.parseInt(t1.getText())+Integer.parseInt(t2.getText())+Integer.parseInt(t3.getText())+Integer.parseInt(t4.getText())+Integer.parseInt(t5.getText()); t6.setText(x); } else if(z.equals("avg")) { } else if(z.equals("exit")) { System.exit(0); } else { } } } public static void main(String[] args) { v x=new v(); } }
javaupasana October 25, 2012 at 12:55 AM
can you tell me in interview what type of java programs comes?
JAVA CODE HELP URGENTMANOJ November 27, 2012 at 1:36 AM
Implement the following method public Map<string, List<string>>ProcessDataTable(DataTabledataTable) {} (Please provide a working program which takes in the below input and shows the required output) InputData: This table represents the ‘DataTable’ where PID indicates the parent element. For eg. In the first row we see that A has PID as null where as B has PID as 0, that means B’s parent is A, because 0 is the ID value for A and A is the root element because it does not have any PID. Similarly, C has parent A because C too has PID as 0 and 0 is the ID of A. You will need to provide your own class definition of DataTable. ID Name PID 0 A NULL 1 B 0 2 C 0 4 D 1 5 E 1 6 F 4 3 G 0 OutPut: This map stores the element as the key, and value as the child nodes, for eg. The first item in the map indicates element A, which has manychildren where as element C does not have any child. The order of members in the output is not important. Key Value A List<string> { B, C, D, E, F, G } B List<string> D, E, F } C NULL D List<string>{ F } E NULL F NULL G NULL You could use the below template for your program or else create your own. Sample Template for ‘main’: publicstaticvoid main(String...arg) { DataTabledt = newDataTable(); dt.addRow(0, "A", null); dt.addRow(1, "B", 0); dt.addRow(2, "C", 0); dt.addRow(4, "D", 1); dt.addRow(5, "E", 1); dt.addRow(6, "F", 4); dt.addRow(3, "G", 0); System.out.println("Output:"); System.out.println(newChildList().processDataTable(dt)); } Sample Output: Output: {D=[F], E=null, F=null, G=null, A=[B, C, G, D, E, F], B=[D, E, F], C=null}
javaEhab asad khan January 6, 2013 at 10:12 AM
A well support
Logon Script that creates registry keysBilal May 10, 2013 at 1:32 PM
I need to create a logon script that creates two registry keys with the following values for each PC (P+IPAddress) & (S+IPAddress), I managed to create the following .reg file: HKEY_CURRENT_USER\Serial Numbers "Printer"="P236" "Scanner"="S236" But I have entered these values my self, I need a script that creates a combined value (Letter + The last 3digits of the IP Address of the PC where this script runs). I highly appreciate it if someone can help me on this.
advantages of cacaoVMsrikanth.pilli April 23, 2011 at 1:44 PM
please tell me cacaoVM is suitable or not for touch screening on arm9 platform. and tell how to get cacaoVM cross compiler source code
advantages of cacaoVMsrikanth.pilli April 23, 2011 at 1:46 PM
please tell me advantages of cacaoVM. and tell me how to get cacaoVM cross compiler source code
please answer my question as soon as possibleAvya January 2, 2012 at 1:21 PM
write a program to see if the middle digit of any no. is prime or not.
Matlab- input dialoguemary April 11, 2012 at 12:44 AM
Matlab: I have a button on my interface that opens up a input dialogue box which the user enters 2 numbers which they want to playback the audio file. So if the user enters 10 and 20 then the audio file should play from 10 second mark to the 20 second mark. this is what i have coded however it is not working, any ideas why? I'm not sure where i have gone wrong?? function playsample_Callback(hObject, eventdata, handles) prompt = {'Enter playback starting point (secs):','Enter playback end point (secs):'}; dlg_title = 'Playback'; num_lines = 1; def = {'10','20'}; answer = inputdlg(prompt,dlg_title,num_lines,def); A = getfield(answer,{1}); % input field A = str2double(A); %converts string to double [y, Fs] = wavread('Argerich.wav'); sound(y(A*Fs, :))
Post your Comment