No Matter what you do there will be critics.
earlybirdsean commented: Nice +1
stbuchok commented: LMGTFY, I love it +7
No Matter what you do there will be critics.
Try and fail, but don’t fail to try.
- Stephen Kaggwa
Obviously , it goes into infinite loop and that's why the compiler reports an error message.
But the SCJP book says that this should work fine
I assume you are talking about SCJP by kathy sierra.
Can you say at which page of the book , they said that it will work fine.
Even for the backspace and enter key , you should handle the events for it.
However you need to know the ascii value of backspace and enter to compare what key have been pressed. But you can do that only if you handle the events....
because we dont want to compare the value with itself..
I know of two curl and libtorrent
Could you post or share your information regarding that because even i am curious regarding what libraries they use in C/C++ as I have some idea on how to do that in java.
Let me know if you are updated with any information regarding that..
Clarification..
You mentioned that it is shared folder. Cant you directly copy and paste the file it in your shared computer?.
Do you want to programatically set password for the shared folder?
You can achieve the above functionality also by using some third party softwares...
Disable all unused services by going to run->msconfig->services .
Another best way is..
In task manager you can find out the memory usage of each process. Look for the process which is taking more amount of memory and close it if it's an unwanted or unused process.
It may also be due to virus.
Use a good antivirus and scan your computer..
That's it....
I executed your code. you are getting all 0's in your output.
There's nothing to do with min in your program.
Your ascending logic is not correct. Simply swap the numbers if a value is greater than others.
Here's how you do this..
for (int j=0; j<10; j++){
for (int i=j+1; i<10; i++)
if (list[j]>list[i]){
int temp=list[i];
list[i]=list[j];
list[j]=temp;
}
}
Now even there's no need of list1 .
Simply print list.
for (int j=0; j<10; j++)
System.out.println(list[j] + "");
You can create an array of objects similar to how you create an array of primitive data.
Subscriber s[]=new Subscriber[10];
The above creates an array of 10 Subscriber objects.
However you should initialize those objects by using any loop .
for(int i=0;i<10;i++)
{
s[i]=new Subscriber();
}
Java is a sandbox environment lanugage.It will not allow you to access out of the box.
You will definitely end up with using some other language like C or C++.
Ok. I'll give you a simple example..
Can you can develop a simple keylogger entirely in pure java ?
If you say yes , then the answer for your question is also yes..
As i am from java background ,generallly you'll get a NullPointerException when you try to access the object if it is null.
So whether you go for 1st option or 2nd option , one and the same and has same meaning.
I think remember hearing someplace that returning in the middle of a method is bad for some reason.
Your compiler will not feel anything bad about you whether you go for ist option or 2nd option because both will be equivalent to it..:)
So dont be sentimental..:)
My favourate language doesn't help me to make Keylogger..
Should i shift to other language just to make a silly keylogger..
No way.:)
But i'll look out traditional languages(C/C++)..:)
If we google KEYLOGGER IN JAVA , the very first link takes you to here (daniweb) itself. :)
http://www.daniweb.com/software-development/java/threads/29684
Keylogger in pure java is just im"POSSIBLE"..
@Taywin.. you are right..
It may be keylogger..but leave that aside...
I have the same question from long time.. How can we make a java program listen to our keystrokes without any window.
As all of us know we can add keylistener to frame or any window. But is it POSSIBLE in java to make it listen the keystrokes without registering to frame or any component..(intention may be to make keylogger or whatever . its secondary thing)..
I know that it is NOT possible..(as far as i know)..
Are there any nerds who says POSSIBLE....
Waiting for replies......
Hmm...Too many expressions...
First of all, you need to know how antivirus works?. What antivirus definitions you should use?.
Then any one programming language to implement your thoughts..
The former one is tougher than the later..
I have already answered the question.
You have multiple choices and it depends on your type of application and requirements.
Still...for your satisfaction.. check the very first link in this page
The Dates topic is already posted by previous folks and it is answered.
Just search in daniweb.
If you need to increase the count value whenever you press a key and decrease the count when you press backspace . For that You need to know Event Handling.
Google signal or event handling in C/C++ and you'll find what you want.
I dont know much about signal handling in C but java makes that task easier.
Your title of the post and your question does not have any relation..
What is the best programming language to use to make application for Mac OS X?
How can you say that a particular programming language is best for a particular OS.
The programming language that you need to use depends on the type of the application you want to develop.Some languages are best suited for some features.
Overall , every programming language has its own uniqueness.
You find a lot of tutorials if you just browse through the net.
Hint :
Start the loop
Divide the number with 10 until it becomes single digit number
Get the last digit everytime by modulus operator
Append the next last digit of number and iterate the loop till num becomes single digit
@anonymousi ask if you have any specific question..
your post looks like a client telling his requirements to software engineer..:)
One more thing..
the code should be able to run in netbeans
:)
What do you mean by that?. A java program will run anywhere provided there should be a JVM/JRE.
If you only do what you know you can do – you never do very much.
- Tom Krause
The irritating part if we use setbounds is that we need to spend time to make it look how we want it to be by applying trial-error method
textfield.setBounds(x,y,width,height);
where
x - new x-coordinate
y - new y-coordinate
width- width of textfield
height- Your desired height
What's big deal ..resend it again ..
If still the problem exists, let me know..
In simple terms...
The application which does not uses any internet connection can be called as Stand-alone application..
Always be smarter than the people who hire you.
Be what you are. This is the first step toward becoming better than you are.
Go through the Java API . Look for Date class or Calender..
Did you tried using the AppletViewer ?
Try to paint some error messages in catch block so that you can see in your browser applet when error occurs and you can know where exactly the exception is raising..
Guys,i want to wait or sleep statement in a Java Desktop application when button press.I used thread.sleep & wait().But it doesn't work.I have a doubt that those functions are working only for console applications.Is it? or can i use it?Plz help me....
Its not about type of applcation. Whether it is console or GUI , it doesn't matter.
Thread.sleep will work for all..
I guess you have some mess in your code. Post your code if you want to resolve your issue...
What software is drawing to the screen when the Robot class gets a black image?
It is just a full screen game.
My problem is half-solved...
I made it to capture the game with slight changes.
Previous code:-
Dimension screenDims = Toolkit.getDefaultToolkit().getScreenSize();
Rectangle screenRect = new Rectangle(0,0, screenDims.width, screenDims.height);
After changing the width and height as follows --
Rectangle screenRect = new Rectangle(0,0, 800,600);
Now , it works ..
What happened is that any game when shifted to full screen mode will reduces its pixels value .
I mean the program sleeps() for 30 seconds and captures the screen for every 30 seconds.
But my problem is not about how to make it background.
The real issue is that it is unable to take the snapshot when i play a Game.
A black image is captured when it captures while i am playing a game.
When i do some other task (such as watching movies, browsing etc) , it does its job and there is no problem.
Can you spot the reason and tell me the solution..
That's what i did...
My application takes snapshot and stores the image for every 30 seconds running in background..
Everything works fine but If i play a game then it will cant capture....
Dont post such hypothetical questions like that. :)
It all depends on your requirements and time to decide which methodology to use..
As far as i know RAD is all about coding directly without proper planning...
Use whatever xyz development methodology you want and come back if you are stuck anywhere in coding..
That's all i can say..
Hi guys..
The method createScreenCapture() in Robot class made me to post this question.
The method works absolutely fine and it does the functionality of capturing screen as it asked to do. Now the problem comes here when i take the snapshot of my screen while i play a game.
Why cant the method not able to capture the screen when i play a game...
Whats happening..
@Onlineshade
What do you mean by which compiler.?
Since it is a java code , you need java compiler..
Looks like something went wrong...
You dont need to change any connections..
I will attach the entire working version of code if you would like to have...
If you dont want the window not to close when user selects NO or CANCEL.
you should use
setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
@sathya88
I think this is what you are looking for
frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
place the above code in line 13 and 17.
No..You cannot use the shortcut method. :)
You need to specify the access specifier for each member variable separately with patience..
But it will be nice if oracle make changes like what you have said..
One more thing .. If you have a firewall like Zonealarm etc , ignore the firewall warnings and allow your program to access smtp..
You can use JavaMail(javax.mail) for sending mail. you should provide your maid id and password in the program.
Check out this...
http://www.javacommerce.com/displaypage.jsp?name=javamail.sql&id=18274
@ harinath_2007:
So what is your question..?
Be clear in what you say and ask the questions in a precise mannersorry for not clearly asking the question, what i meant was since i have no expirience in developing application of larger scale, is it possible for someone like me to develop it? or should i wait until i have enough expirience to turn the idea i have into a real working software or preferable give it to someone who has the right expirience becauase my fear is not finishing it due to complexity of the problems that need to be solved while coding and time since i am still a student.
All it depends on the type of the software and seriousness of software( i mean whether the software will be developed for real time use or is it just a academic project)..
Even if it is a large scale application , why not give it a try??
If you think you are weak in coding , give yourself a considerable amount of time for preparing basics and syntax perfectly.
If you are stuck anywhere , There are many professionals here to help you ..
So prepare yourself and carry on.....
So what is your question..?
Be clear in what you say and ask the questions in a precise manner.
@caswimmer2011 What you want to say ?.
From your posts i understand that you want to use robot class for pressing the function keys (like f1,f2 etc) programatically.
For that you need not worry about your OS or computer type(laptop etc).
IF you want to press function keys for example f1
Here's how you do this..
Robot r=new Robot();
r.keyPress(KeyEvent.VK_F1);
For other keys refer KeyEvent class.
I am assunming that there is no way to extract it using windows zip?
If you are talking about .zip file , then you can unzip it using windows unzip command.
If you want , you can check it manually using command prompt
Open your command prompt and go to the diretory where the zip file is present and use the unzip command.
Ex. unzip hello.zip
The above command works perfectly and even it wont asks for user conformation .
You can write the same command in your java program.....Why going for another 7zip application.?
Are you talking about .zip file or .rar file?
If it is zip file , you can use the unzip command.
unzip mydir.zip