peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

No, you need Tomcat or any other Java server/container, you have to provide proper folder structure for project to be deployed on server/container

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

The general notion is to have following project structure

  • src
    • main
      • java
        • top-package name
      • resources
        • daniweb.png
    • test

Then you can call images from resource directory directly like new ImageIcon(ClassLoader.getSystemResource("daniweb.png")); no need for directory changes (../../../daniweb.png)etc

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I think sourceforge.net will be the best option for finding the project right ??
There i can join mailing lists also but how will i get the bug database ??
Because generally it doesn't come with the project itself.

I do not want to sound negative, but sourceforge is not what it used to be. I would check also github, Google Code and Apache Projects

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I know this is old thread, but I couldn't resist to share my finding. As OP I was looking for concept to prevent a user to run simultaneously more instances of the same Java application, and I came across of this library JUnique

Happy coding!

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You can read an rss file with SimpleXML for example. Generating an rss feed is simply turning your records into a well-formed xml file.

OP was spammer, got busted...

Thread closed

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yes, you either adjust your "hosts" file to fake domain on your pc or just query localhost

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yes, if you provide Web Service

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Both section Java and Mobile Development have their own sticky posts where you can check on number of recommended resources

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
for(int i = 0 ; i < 10 ; i++){
  if(x == 0 ){
    System.out.println("Zero");
  }
  else if(x == 1 ){
    Syetem.out.println("One");
  }
}
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Since you are able to read your Ant build you are able to determinate absolute path of the file, that mean that you are able to get parent path. With this data and with info from build file you shouldn't have any problems.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Android emulator is little slow for start, so what you can do is have emulator running and minimize it. Then when your application successfully compile and you attempt to run it, IDE doesn't have to wait for emulator start and can immediately deploy your application. If you added ANDROID_HOME with links to tools and platform-tools directories to your PATH you can use following commands:
- to list all available avd devices android list avd sample output

Available Android Virtual Devices:
    Name: 2.3.3
    Path: /Users/peter/.android/avd/2.3.3.avd
  Target: Android 2.3.3 (API level 10)
     ABI: armeabi
    Skin: WVGA800
  Sdcard: 9M

- to run specific emulator by name emulator -avd 2.3.3 or shorthand emulator @2.3.3 where to 2.3.3 is the name of avd that you got listed from previous command

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I guess you are referring to "After you create one or more Android projects, an entry for "Android XML File" will also be available." I guess it is some background mechanics that will enable this option, since you had no reason to create "brand new" xml resource file this is not available yet. This option just let you use Android XML template when creating new resource file

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Can we possibly have pre-fix message to
Use the snippet textbox to post your working and fully tested code snippet. Do not use code tags as the snippet will automatically be Java syntax highlighted.
that is showed once member switch from Discussion Thread to Code Snippet something along the line of:
Please do not use Code Snippet for posting question. Code Snippets are reserved for sharing functional code with community. This should be in red colour to catch the attention

My reason, code snippets are mostly misused by new posters thinking that it is the way to post their question with some code included

TrustyTony commented: True +0
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yes, have look on embedded Derby tutorial

rahulrulez commented: Thank you! +1
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I've worked with MySQL, Access etc database along with Java. But is there any STRONG OFFLINE Database? How is Java DB? I need a simple GUI with only 2 forms and processing between them.

Your reasoning is weak, any of above can be used as "Offline database" if you leave them in default setup since they will be only accessible for local setup.
I suggest that you rethink your arguments and what you expect of this database.
You may look at it as having;

  1. server-bound database, database is not part of application, it is installed on local machine separetly and if you want to use it on different machine yu need to take back-up from a machine that is already running and import it on any new instance. Traditional databases like MySQL, MS SQL, Postgres are in this category
  2. serverless database, makes your application bigger because you need to include database, but then you can "hop" machines. SQLite, Java DB etc
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

If you actually check out the top post, Starting mobile development [SDK / tutorials / resources / faq], you wouldn't post this redundant question

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@warlord902 Quick peek on the project and what I found:

  • Broken build, your application class Database is broken. Make sure that before you commit you always check that project copiles and run. Broken builds are bad advertisment
  • You should provide some sort of README file tht will summirize basic requirments for the project (JDK version, installations of tools required by project etc)
  • You are missing any testing infracture to test that your application is fucntional and that while adding-editing-deleting you did not damaged existing structure. Test framework like JUnit, Mockito etc. should be used

Please do not take it personally, I just trying to give you some feedback so you can improve your work :)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

That looks like JSON output to me

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You need to search for Steganography, example here

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You should have mentioned that you want to connect with ODB file. It would have been different matter...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

As per rules

Do provide evidence of having done some work yourself if posting questions from school or work assignments

you are expected to show some effort and not just copy&paste assignment.

Thread closed

If you still wish to get some help you are more then welcome to repost, but you MUST provide some evidence of work

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

If you tell me where in your PreGUI you call DrawClass and I will tell you why it is not drawing.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@Netcode if you do not have anything constructive to discussion then please do not comment

jonsca commented: Thank you. +0
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Since we are already mentioned in few projects ;) could we get official account where we may actually upload tutorials and link them in posts?
That will also mean that someone will have to actively monitored or perhaps mods or selected members would be contributors.

~s.o.s~ commented: +1; not sure why someone would downvote this... +0
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

1) I do wonder if you did direct copy or paste since your interface Date class is wrong java.Util.Date
2) You should have used java.sql.Date 3) I received up-vote from you for MVC tutorial, so I would have expected from you to use PreparedStatement instead of single & double quote hell
4) If you get exception it is always best to post exact error

SagarSe7en commented: Thanks Friend for the useful post! :-) +3
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Will this work in Netbeans IDE? I really don't know how to input your code using netbeans>.<

That's good, at least you cannot submit it as your own work...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Does anyone can recommend some application to play Blu-ray on pc? I have CyberLink PowerDVD 8 that came with optical drive, but often there is a lag (visible stop in playback). I would love if VLC player people added BR support to application, but at the moment libbluray is more of trouble then success

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I did not said to move out of main method I said move it at the end of last if/else. Dead simple...

import java.util.Scanner;
public class minNmax
{
	public static void main(String args[])
	{
		Scanner input = new Scanner(System.in);
		int n1, n2, n3, n4, n5, Num2Digit=0, Num3Digit=0,Max=0, Min=0;
		int Num2Sum, Num3Sum;
		 Num2Sum=Num2Digit;
		 Num3Sum=Num3Digit;
		System.out.print("Enter first number: ");
		n1 = input.nextInt();
		System.out.print("Enter second number: ");
		n2 = input.nextInt();
		System.out.print("Enter third number: ");
		n3 = input.nextInt();
		System.out.print("Enter forth number: ");
		n4 = input.nextInt();
		System.out.print("Enter fifth number: ");
		n5 = input.nextInt();
		if(n1 >= 10)
		{
                           n1=Num2Digit;
			Num2Sum += n1;
			Min +=1;
		}
                  else if (n1 > 99)
		{
			n1=Num3Digit;
			Num3Sum += n1;
			Max +=1;
		}
                  else if(n2 >= 10)
		{
			n2=Num2Digit;
			Num2Sum += n2;
			Min +=1;
		}
                  else if (n3 > 99)
		{
			n2=Num3Digit;
			Num3Sum +=n2;
			Max +=1;
		}
                  else if(n3 >= 10)
		{
			n3=Num2Digit;
			Num2Sum += n3;
			Min +=1;
		}
                  else if (n3 > 99)
		{
			n3=Num3Digit;
			Num3Sum +=n3;
			Max +=1;
		}
                  else if(n4 >= 10)
		{
			n4=Num2Digit;
			Num2Sum += n4;
			Min +=1;
		}
                  else if (n4 > 99)
		{
			n4=Num3Digit;
			Num3Sum += n4;
			Max +=1;
		}
                  else if(n5 >= 10)
		{
			n5=Num2Digit;
			Num2Sum += n5;
			Min +=1;
		}
                 else if (n5 > 99)
		{
			n5=Num3Digit;
			Num3Sum += n5;
			Max +=1;
		}
	System.out.println("Sum of tow-digit numbers is ---> " + Num2Sum);
	System.out.println("Sum of three-digit numbers is ---> " + Num3Sum);
	System.out.println("There are total " + Num2Digit + " two digits numbers");
	System.out.println("There are total " + Num3Digit + " three digits …
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

There is no JVM for iPhone so no chance (read this)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Where did you placed this JAR file? Two options available TOMCAT_DIR/lib if you want library to be available globally to any project deployed on this server or TOMCAT_DIR/webapps/YOUR_PROJECT/WEB-INF/lib to be available to only your project

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Hmmm, seems that NetBeans did change lately and one cannot run single file as it has been in the past.
Ok, do following

  • Create new project - Lab2
  • Create new package - lab2 - inside this project
  • Create new class -Lab2.java - inside above package
  • Press "Run" button (big green triangle on top menu bar), it will tell you it hasn't got set main class set for project, so if just confirm default of "lab2.Lab2" if you followed above instructions

Next time you will need to copy whole project structure and open project instead of single file.

918_Nix commented: Spot On! +1
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I have a couple of questions regarding Mobile Development, are all mobile apps developed using xcode and objective C ?
>> First think coming to my mind is "WAKE UP DUDE!" there are other things then iPhone, such as Android that is Java based with XML configs and BlackBerry with Java Microedition and of course Nokia's Qt plus there is Python for most of them and you can use also HTML5 with some JavaScripting

I take it these are zipped up and offered as a download on an app store so to speak at a small cost ?
>> They are packaged in their respective file types

Is it possible to make a mobile app out of web based technologies and then offer as a download or would it have to be through a subscription service ?
>> Many commercial websites do browser detection and if mobile device detected they offer download of application (often based on WURFL library)

Or would the website have to act as the game and the users would just visit the site and view it as normal website on a mobile device.
>> See above

PS - Mobile Development is all new to me, and I keep on getting companies phoning saying they want the latest developers with HTML5 experience.
>> Of course everyone want HTML5 experienced people as they want to use potential of it and ditch often hopeless designs hard to upgrade

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

1) Welcome to the forum
2) You need to be more specific on issues, as from Phonegap -Get started Guide I do not see any difficulties. Its reasonably simple step-be-step tutorial
3) You need to stop writing in sms/chat speak or improve on English language as it is forum requirment

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

1. Above code only show how you load data for initial display, doesn't tell us what rest of the code is doing and how the above method is integrated in that code
2. You should call a dedicated method that will return table data in correct format instead of establishing connection inside display method each time that method is called

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

you're asking us to give you information that can be used to break the law in a public forum.
Even if you yourself aren't going to do so (and we only have your word as to that), someone else will and you will have implicated us in crimes.

At least over here, helping someone plan or commit a crime is a crime in itself.

Come on you can not be always negative when the question like this pop-ups. Little differentiating would be nice. Am I criminal jut because I'm reading HACKING EXPOSED WEB APPLICATIONS, 3rd Edition: Web Application Security Secrets and Solutions? I do not think so. OP is not first time poster here and did not asked "how do I break in someone system". He made silly mistake of giving wrong name, but that is all. Many of us been interested in security, wanted to do simple pranks at some early stage of our programming ;)

Majestics commented: Thank you. +0
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

And where is your html for applet? Something like this

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@skatamatic what you expect given one sided opinion on 5 years kid asked why he likes sweeties instead of broccoli. Beside if you not troll you will leave your comment with out and wait for someone else to up-vote you if you believe that you did nothing wrong.
PS: Googling is essential at the beginning as long you understand what you trying to achieve.

@himanshu091 what you been told could be correct in your country, but wouldn't held for example in Europe as if you can prove you have strong interest in the field (participating in open source project, running your own pet project, blogging about latest stuff) you have chance. It was my case, when I ended uni and got interviews and job offer at the end without any previous work experiences in the field

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

There is no DataBaseHelper constructor, therefore error.

PS: As Taywin pointed out assignment part of line 9 new DataBaseHelper(null) should be replaced by new DataBaseHelper(CONTEXT); .
PS2: You can have look at this sample I put on github few weeks back. It is from Pro Android 3 book

kvprajapati commented: Thanks! It helped me a lot :) +15
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

James I suspect that OP is more of signature spammer, given the "brainac" question

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

This should be dependent on what is to be done. But just as Rashakil Fol stated, for starters, PHP would do you good.

You may want to re-read his statement, I sense some irony...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You cannot use primitive type like int, double, float etc with Collection, you need to to use wrapper classes like Integer, Double etc

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You can try to use Selenium

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

If you say that MVC is not part of your requirement , would you be able to explain me principles of DAO?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

If you want to keep your score somewhere permanently then you have to store it somewhere or it will be lost once you close your application. Your two options are either to work with files or with database. Simple file example can be used from Oracle Java tutorial - Reading, Writing, and Creating Files

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Why don't you get count at the beginning, store it in a variable and then simple refer to it instead of running query every time you refresh view.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Official Java tutorial - Modifying the Look and Feel

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Hi, I made this thread for our groups assignment. We are suppose to get 3 program codes, at least 250 lines each, from anyone that created one. As soon as we retrieve them, we are supposed to evaluate them and find out what type of things they used and how they program it for ex abstract methods, interfaces. It's like a research paper just that we research on something we don't know about. If you supply your code could you please erase the comments you involved and include your name in your post because we are suppose to make a Work Cited. It doesn't have to be your full name a nick name is fine. Thanks.

Your request does force me to ask simple question. Why didn't you check any open source project on sourceforge.net, github or similar projects repository?

JeffGrigg commented: Insightful answer to a student's lazy question. +5
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yes, a person object

public class Person{
  private String name;
  private int age;
  private double aValue;

 //class constructors and getters to be added
}

put this object in collection and magic done

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Most commonly know as observer pattern (Head First Design Pattern, very handy book for fresh developers)