|
Hello Friends ,
I'm in Final year of computer science .so , i want to developed a project which is based on Real motion of video.
Plz help me ab dat project code.............
I want ready project in which source code in java.]
project title is that.........
" Real-time Motion Trackig and Object Detection in Surveillance Video"
plz send me ready code for this project title...........
ok
bye.......
|
|
|
|
|
Did you read the guidelines above?
Part of # 2 says:
Don't ask "can someone send me the code to create an application that does 'X'.
# 11 says:
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
Given these two points, you are not going to get what you are asking from this forum. Look around and you will see many replies saying the same thing.
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
public class Sample
{
public static void main(String[] args)
{
System.out.println("Real-time Motion Tracking and Object Detection in Surveillance Video");
}
}
That should get you started.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
No.
If you want some help here, you're going to ask specific questions and show that you did something on your own. Nobody is going to do your work for you. Besides, if you never learn by yourself, you'll need to be assisted for your future work too.
And oh, please stop using txt spk, this is really annoying.
|
|
|
|
|
Some years ago I ordered just this task to a grant-holder who was also in his last year of computer science and, you know, he did it. So I guess, if he could, you can. Good luck.
|
|
|
|
|
Can anyone help me to build a java Console/SWING application named calculator that evaluates a given expression. Matter of fact this expression should be an input from the user
|
|
|
|
|
There are lots of samples on subjects like this; just try a Google search or go to the Java Tutorials pages.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
I Want to change foreground color, background color ,and font of text of JTable cell. How can I achieve that .
Trioum
|
|
|
|
|
|
Hello, I have created a do-while loop which is supposed to re-run if the user enters "y" or quit if the user enters "n".
It's about a number guessing game. The user must guess the computer's number and if he chooses to quit or if he guesses correctly, he's given the option to replay.The game is supposed to accept as many guesses are necessary until the number is found but when I run it I'm only able to enter one number. On the second attempt I get the error "Exception in thread "main" java.lang.NullPointerException
at Doloop2.main(Doloop2.java:60)"
Can someone help me out? I would appreciate any help.
I am posting my code hoping that it will make things clearer.
import java.util.*;
public class Doloop2
{
public static void main (String[] args)
{
final int MAX = 100;
int answer, guess, attempt = 0;
String replay = null;
Scanner scan = new Scanner (System.in);
Random generator = new Random();
answer = generator.nextInt(MAX) + 1;
System.out.print("I am thinking of a number "
+ "between 1 and 100. Enter your guess (0 to guit):");
guess = scan.nextInt();
do
{
if (guess > answer)
{
attempt++;
System.out.print ("Try a smaller number (0 to quit): ");
guess = scan.nextInt();
}
if (guess < answer)
{
attempt++;
System.out.print ("Try a bigger number (0 to quit): ");
guess = scan.nextInt();
}
if (guess == answer)
{
attempt++;
System.out.println ("You got it!");
System.out.println ("Number of total attempts:" + attempt);
System.out.println ();
System.out.print("Play again? (y/n)");
replay = scan.nextLine();
}
if (guess == 0)
{
System.out.println ("You ended the game. Play again? (y/n):");
replay = scan.nextLine();
}
}
while (replay.equals("y") || replay.equals("Y"));
}
}
modified on Wednesday, October 20, 2010 11:07 PM
|
|
|
|
|
Hey ur program had a couple of bugs after i removed the null pointer error. Fixed it
Code
-------------------------------------
import java.util.*;
public class Guess
{
public static void main (String[] args)
{
final int MAX = 100;
int answer, guess, attempt = 0;
String replay = "Y";
Scanner scan = new Scanner (System.in);
Random generator = new Random();
answer = generator.nextInt(MAX) + 1;
System.out.print("I am thinking of a number "
+ "between 1 and 100. Enter your guess (0 to guit):");
guess = scan.nextInt();
do
{
if(guess == 101){
answer = generator.nextInt(MAX) + 1;
System.out.print("I am thinking of a number "
+ "between 1 and 100. Enter your guess (0 to guit):");
guess = scan.nextInt();
}
if (guess == 0)
{
System.out.println ("You ended the game. Play again? (y/n):");
replay = scan.next();
guess = 101;
attempt = 0;
}
else{
if (guess > answer)
{
attempt++;
System.out.print ("Try a smaller number (0 to quit): ");
guess = scan.nextInt();
}
if (guess < answer)
{
attempt++;
System.out.print ("Try a bigger number (0 to quit): ");
guess = scan.nextInt();
}
}
if (guess == answer)
{
attempt++;
System.out.println ("You got it!");
System.out.println ("Number of total attempts:" + attempt);
System.out.println ();
System.out.print("Play again? (y/n)");
replay = scan.next();
guess = 101;
attempt = 0;
}
}while (replay.equals("y") || replay.equals("Y"));
}
}
|
|
|
|
|
1. Don't use 'txtspk'.
2. Do use <pre></pre> tags.
Just because questions don't look professional does not mean that answers should follow a similar pattern.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Thanks. This works right but could you please explain the logic behind guess = 101 and guess == 101?
|
|
|
|
|
Go back to your basic documentation on assignments and expressions.
guess = 101;
is an assignment statement which sets the variable guess to the value 101.
guess == 101
is an expression which yields the boolean value TRUE if the variable guess contains the value 101, otherwise FALSE .
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Thanks for your response. I know about the assignment operator (=) and the boolean expression (==). My question should had been why "101"? What's the logic behind "101" in particular? What do we want to achieve by this number?
|
|
|
|
|
Hi guys,
I edited the code a little more yesterday. The logic behind "guess=101" are the following reasons.
1:When the user gives the correct answer or when the user chooses "0" to quit the variable has to be reset to some value, in this case i used "101" but now i ve made a small edit and changed it "guess = MAX+1", just to make the program a little more dynamic.
2:Also, i have included a condition saying if "guess = MAX+1" then the game restarts again prompting the user to guess a number.
Im pasting the edited code below for your reference. I believe now the program is bug clear. I have fun playing
import java.util.*;
public class Guess
{
public static void main (String[] args)
{
final int MAX = 100;
int answer, guess, attempt = 0;
String replay = "Y";
Scanner scan = new Scanner (System.in);
Random generator = new Random();
answer = generator.nextInt(MAX) + 1;
System.out.print("I am thinking of a number "
+ "between 1 and "+ MAX+". Enter your guess (0 to guit):");
guess = scan.nextInt();
do
{
if(guess == MAX + 1){
answer = generator.nextInt(MAX) + 1;
System.out.print("I am thinking of a number "
+ "between 1 and "+ MAX+". Enter your guess (0 to guit):");
guess = scan.nextInt();
}
if (guess == 0)
{
System.out.println ("You ended the game. Play again? (y/n):");
replay = scan.next();
guess = MAX + 1;
attempt = 0;
}
else{
if (guess > answer)
{
attempt++;
System.out.print ("Try a smaller number (0 to quit): ");
guess = scan.nextInt();
}
}
if (guess == 0)
{
System.out.println ("You ended the game. Play again? (y/n):");
replay = scan.next();
guess = MAX + 1;
attempt = 0;
}
else{
if (guess < answer)
{
attempt++;
System.out.print ("Try a bigger number (0 to quit): ");
guess = scan.nextInt();
}
}
if (guess == answer)
{
attempt++;
System.out.println ("You got it!");
System.out.println ("Number of total attempts:" + attempt);
System.out.println ();
System.out.print("Play again? (y/n)");
replay = scan.next();
guess = MAX + 1;
attempt = 0;
}
}while (replay.equals("y") || replay.equals("Y"));
System.out.println("\nThanks for playing - GUESS THE NUMBER");
}
}
|
|
|
|
|
I welcome your help and appreciate the work you invest. But i also think it isn't really good to edit the code completly and just throw it back.
This, and much more of the questions here are from students, trying to get behind "the secrets" of OOP. I'd rather like to explain the particular problem, than to post a complete solution.
regards
Torsten
I never finish anyth...
|
|
|
|
|
Hi,
I get your point, it will be more helpful if they understand and do it on their own. I will be more prudent next time.
|
|
|
|
|
Torsten makes a very valid point. I always think it is best at first to spend some time just watching the forums and looking at the answers posted by some of the regulars to see what the general protocol is. That way we can try and maintain a consistent way of responding to people. I know it can be confusing when you start (I made (and still make) plenty of mistakes) but it is time well spent.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
hi friends...
i am getting the following error while doing a program.....its a runtime error....can u please suggest a solution...also please tell me the reason for the same so that won't repeat the same next time also..
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at testThread.main(testThread.java:78)
My code is as following:
import java.io.*;
import java.lang.*;
import java.awt.*;
import java.awt.event.*;
class testThread extends Frame implements ActionListener,Runnable
{
int lower,upper;
Label l1=new Label("ODD");
Label l2=new Label("EVEN");
List lb1=new List();
List lb2=new List();
Button b2=new Button("EXIT");
void test(int low,int up)
{
lower = low;
upper = up;
setLayout(new FlowLayout());
setSize(700,700);
setTitle("Thread Demo");
setVisible(true);
add(l1);add(lb1);add(l2);add(lb2);add(b2);
b2.addActionListener(this);
Thread t=new Thread(this);
t.start();
addWindowListener(
new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{ System.exit(0); }
}
);
}
public void actionPerformed(ActionEvent ae)
{
if(ae.getSource()==b2)
System.exit(0);
}
public void run()
{
try
{
if((lower % 2) != 0)
{
lower = lower + 1;
}
while(lower <= upper)
{
Thread.sleep(1000);
lb2.add(String.valueOf(lower));
lower += 2;
Thread.sleep(500);
}
}catch(Exception e){}
}
public static void main(String[] args)
{
testThread obj=new testThread();
int lower,upper;
lower = Integer.parseInt(args[0]);
upper = Integer.parseInt(args[1]);
obj.test(lower,upper);
if((lower % 2) == 0)
{
lower = lower + 1;
}
try
{
while(lower <= upper)
{
Thread.sleep(1000);
obj.lb1.add(String.valueOf(lower));
lower = lower + 2;
Thread.sleep(500);
}
}
catch(Exception e){}
}
}
|
|
|
|
|
- do you use eclipse? it is able to debug and shows you where you get stuck.
Your code works here. be shure to give arguments to the programm - first int low, second int a high number. it does not validate, if the arguments are in right order.
regards
Torsten
I never finish anyth...
|
|
|
|
|
i am not using eclipse ..i want that to be run from command prompt...can u suggest a change in code that could rectify the error....
|
|
|
|
|
"ArrayIndexOutOfBoundsException" says, that you try to read a value that does not exist from an array.
"ArrayIndexOutOfBoundsException: 0" says the first value does not exist (computers and all creatures except mankind do intend to count from 0!).
The only array i can see in your code is the argument array the main-method needs. So you're probably not giving the arguments to your app.
Please use eclipse or netbeans. it will enhance your code and make it easier for you to program.
regards,
Torsten
I never finish anyth...
|
|
|
|
|
now its clear Torsten.....thanks for ur suggestion too....
|
|
|
|
|
hi....
Let me tell firstof all that i am a beginner in Java ,can anyone help me to understand the following piece of code...also to elaborate this class a bit so as to get an output...
class A
{
int a;
A()
{
this(10);
}
A(int x)
{
a=x;
}
}
|
|
|
|