~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I started out with C++ and never really understood it.

But you should, really. If not C++ (I admit C++ is a pretty complicated language when it comes to gotchas) then C and the basics of assembly programming to know *how* it works under the hood.

Does anybody know what that's called?

Programming with 'final' in Java to avoid destructive updates is kind of inspired by the "pure functional" languages where destructive updates are avoided. Another thing which can be achieved using final is immutability for your classes.

C# is a Windows thing (I'm almost positive)

No, it isn't.

and Python and JavaScript aren't precompiled at all.

Not entirely true, pyc files are the byte compiled version of your Python source file. Though something like this doesn't exist for Javascript ATM, I'm sure it isn't impossible. You have to understand that there is a difference between the language specification and its implementation though for most of the cases it would be safe to assume that you are talking about the standard implementation.

PS: Is Objective C is worth learning?

Depends on what you want to do with it?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Use the getResource() method of the ClassLoader class for loading resources in a location-independent manner relative to your classloader path. This path is normally the classpath which you set (-cp) when spawning the Java process.

This method is capable of loading any classpath resource, not just packaged resources. Hence you can either have a images directory which hosts the images or a "game.images" package. For e.g. lets assume that your JAR contains the entire folder structure for the class files based on the package name along with a images and sounds directory, something like:

JAR
  - pkg
    - spacewars
      - images
  - images (normal directory)

The methodology for loading the resources would stay the same:

final ClassLoader loader = getClass().getClassLoader();
final URL url = loader.getResource("images/one.png");
// OR
final URL url = loader.getResource("pkg/spacewars/images/one.png");

One suggestion: AFAIK, almost all games have the concept of "resource managers" which are contract (interface) driven classes which are solely responsible for loading game assets. For the time being you can have a singleton ResourceLoader class which loads the resources for you. This way you can abstract the resource loading and change the strategy your resources are loaded without a lot of pain. E.g. in the future you might want to pack your resources in a custom archive format and then read the resource from it. If you litter your code would all the getResource() calls, it might be a bit difficult and cumbersome to move to a custom archive format. But if you …

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Why is it hanging is because I did not close my telnet terminal.

IMO, testing this with a standalone Java client would be much more efficient since in that case you can also test multiple client connections in a loop. The code would be as simple as opening a socket to the server, sending data to server, reading it and closing the socket. This kind of test can also be run from your *local* machine (local windows box).

So this time I will open the telnet terminal send data and close the terminal ok or you want me to leave the terminal open. Give me some time to prepare for all this.

No, when I say test a client connection to your server, you should make sure that is a normal communication. Client sends a request, server responds to that request, client exits and server continues to serve other clients. That way we can be sure that the client has disconnected, the server has moved on to a new client and any more resources used by the server are resource leaks.

Besides that I have increase the ulimit to 2048 and this have done some help today.

Yes, if nothing, it would at least delay the occurrence of that IOException.

[root@localhost /]# netstat -nat |grep 9000 | awk '{print $6}' | sort | uniq -c | sort -n
1 LISTEN
5 SYN_RECV
7 LAST_ACK
16 CLOSE_WAIT
275 ESTABLISHED

BTW, what exactly is …

kvprajapati commented: Good discussion. Learn something new. +11
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Pick any members you find interesting and describe how you imagine them to look/act in real life.

OK, I guess I'll just describe a few members here with one liners:

Narue-chan: Someone who bullies everyone everywhere; be it a MMORPG or an interview. I've always imagined you as a woman with an evil gleam in her eye. Of course, YMMV. :-)

Rashakil: A mean geek who lives for the sole purpose of insulting lesser mortals and anyone who refuses to acknowledge Haskell. Doomed to get a doctoral in Math.

John A: I've always imagined Joey to be the next Mark Zuckerberg given his geeky nature and innate management/leadership skills.

Wolfpack: A Japanese guy who doesn't love anime, drinks a lot and lives a mysterious life. OK, maybe not the last one... :-P

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

AFAIK, `bind` accepts a tuple; just wrap those HOST and PORT in another pair of parentheses and you should be good to go.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Reason: not getting desired result. sorry I really tried.:)

You can always "view" what you have written by pressing the preview button. Given that you are learning, it would be worth it to *never* type out your responses in the "quick reply" editor (the small text area which you see at the bottom of every thread) and always use the "advanced editor" (Use Advanced Editor) button below the text area.

Pro tip: Don't try to take in all of it at once. Learn about one thing at a time. Thinking of too many things would have the end resulting of just confusing you, nothing else. Good luck. :-)

Agapelove68 commented: You are absolutely right. This was confusing me and didn't let me edit before 30 min were up. Thank you for your encouragement! :) +0
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Thoroughly read the Javadocs of the Thread class; do you still think your answers are correct? If yes, give reasons rather than just saying "I think A,C,D are correct".

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

The regular expression: ([.,!?:;'\"-]|\\s)+ should do the trick. It is read as "for one or more occurrences of either a whitespace or punctuation". The important part here is to make sure that the '+' is kept outside the alternation, since we can have a mix of white-spaces and punctuations.

The problem with your regular expression was that you didn't take into consideration punctuations and whitespaces, but rather punctuation followed by whitespaces. If you have a 'this or that' situation, use alternation. Writing patterns one after another just increases the matching requirement; your pattern read "match any punctuation *followed* by zero or more whitespace characters" which isn't what you wanted. Hence all it did was match punctuations but blew up when faced with white-spaces.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I've never worked on Swing/AWT but there are a couple of universal things you should know about single threaded UI toolkit (and Swing is one of them); all UI updates should be done on the rendering thread (EDT - Event dispatcher thread in case of Swing).

The problem with your code is that even though you have the motivation for running a background task, that task is very heavily involved with mutating the UI (getting the text from text area, finding highlights and highlighting them). And since you end up adding highlights in a background thread, it violates the principle of "UI updates only in the EDT. This is the reason you are getting a freeze or technically speaking a "deadlock". I'll also show you how to find out such deadlocks.

Assuming you are running JDK 6, it already comes bundled with a profiling tool called Visual VM in the bin directory. If not, just download it from the official site (google visual vm, it shouldn't be hard). Now, fire up your application and wait for it to freeze. After it has frozen/stopped responding, start Visual VM. After it has started, in the left panel of Visual VM under the "Local" category, you should see the classname of your application. Right click on it and click "Thread Dump". This should give you the thread dump of the currently executing threads. This feature also has the capability of detecting deadlocks. Just navigate to the bottom of that thread dump …

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

OK, I just looked at the source code of the Socket classes and it seems that closing any one of those three (InputStream, OutputStream, Socket) terminates the connection so that really shouldn't be a problem in your case. But the error message you posted really implies that your system has run out of file descriptors to allocate. If you run into this problem again, make sure you get the entire stack trace for it (based on my previous suggestion of using e.printStackTrace(System.out) .

Another thing you should do is find out the current open file descriptor limit on your machine and see the number of file descriptors used when your server process is running. For all we know, it might be a genuine issue of 'low defaults'. I'm no pro-system admin so you might also want to consult your system administrator for the same.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You can create and edit a SQL file which contains all the initialization statements (CREATE, INSERT etc.) using a text editor like Notepad++ which supports SQL highlighting and execute the same in MySQL console using the information provided on this page. The advantage here is that whenever you need to reproduce your entire database environment on a clean MySQL install, you just execute this script and you are done! :-)

MySQL workbench looks awesome in case you are not interested in writing SQL scripts in a text editor and executing them at the console.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

It seems that I must define UTF8 for each column of all tables or even recreate the DB and tables with UTF8

This doesn't actually surprise me since we are actually talking about changing the charset here.

which is very rutine task

I'm not sure about the routine part. You are a programmer, it won't be too difficult to whip up a script which does all this for you. :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Don't compare Strings using the == operator; when used with primitives it compares values whereas when used with reference types it compares references. If you need a logical comparison (comparing values), use the `equals()' method for objects (which falls back to reference comparison if the object in consideration doesn't override the `equals()' method of the Object class).

Also, why are you creating a new 'Car' object just for display purposes? A simple loop over the existing Car array should do the trick. Regarding the size of the new temporary array, is it really required that you use an array? Whenever acceptable, using a List instead of an array is much more easier to work with and flexible. Something simple like this should do the trick:

final StringBuilder buf = new StringBuilder();
for(final Car car : cars) {
  buf.append('Color: ').append(car.getColor()).append('\n');
}
textView.setText(buf.toString());
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

It's also a possibility that "ping" is disabled on that machine which leads to dropped packets hence the timeouts. Another thing you can try out is "telnet". Try the command telnet <host> <port> for your MySQL and FTP ports. If it works for MySQL and not for FTP server, we might have something there. In any case, post the entire IOException stacktrace.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

But how could I delete the file exactly after closing Notepad (or any other lookup program)?

In that case, you need to ditch the Desktop class and look into the Process/ProcessBuilder classes and the `waitFor()' method. Some sample code:

public class ProcessTest {

    public static void main(final String[] args) throws Exception {
        final ProcessBuilder pb = new ProcessBuilder("notepad", args[0]);
        final Process p = pb.start();
        System.out.println("Starting wait");
        System.out.println("Wait status: " + p.waitFor());
        System.out.println("Wait complete");
        new File(args[0]).delete();
    }

}
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

...says the person who ranks 4th. Hah. [j/k ;-)]

AndreRet commented: Thanks for the "stick" +0
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

A few articles you might be interested in:

A few comments:

  • Your use of pseudo code is kind of confusing; I think using a language like Java, Python etc. might be more clear
  • Try using LaTeX for writing down equations or at least write them in [icode]

    [/icode] tags for clarity. The way it is right now, it seems really cluttered.

E.g. in LaTeX, i=2^x looks like [TEX]i=2^x[/TEX]

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Tip: Try breaking your posts into logical paragraphs and adding additional line breaks for better readability. The way it is written as of now, it seems like a big "wall of text". :-)

Agapelove68 commented: Thank you for bringing that to my attention. Good advise. +0
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Are you directly serving pages via Tomcat or using some sort of webserver as front end (e.g. Apache web server, Nginx etc.)?

If you are using Apache, use something along the lines of mod_rewrite for Apache. I've never personally used it but heard that it can do wonders when it comes to manipulating URL's. I'm sure something similar exists for Nginx. If you are using a pure servlet front end, you might want to look into the UrlRewriteFilter. Please refer the appropriate documentation and relevant forum for finer configuration details or for help in getting started with the same.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

The reason for having that link on your profile page as opposed to the site "header" is that it presents you with a personalized view of the ranking at Daniweb. It is a metric which is similar to *your* upvoted posts, your post distribution in different forums, your reputation power etc.

A new link can be added at the top but I feel that it is currently at the right place. Another place would to be place it similar to how reputation and solved thread count are shown on hovering over the avatar, but some might argue about the cluttered interface. So yeah... :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

The "Top Members by Rank" link next to the member count in the left hand corner at the top of the page works for me, though it doesn't give you the same "relative" personalized view as the one given by your profile page.

But then again, since I'm on the first page, it works out well for me.

┐( ̄3 ̄)┌

WASDted commented: helpful answer :) +0
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Never recommend Roseindia; it hosts bad code examples and genuinely sucks. On top of that those guys are content thieves who snag articles from other reputable sites without proper attribution.

http://forums.oracle.com/forums/thread.jspa?threadID=1139242&tstart=148
http://balusc.blogspot.com/2008/06/what-is-it-with-roseindia.html

kvprajapati commented: N/A +11
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Two options:

  1. Write your custom XML marshaller/unmarshaller which would work with your domain specific objects using the standard XML API's offered by Java (e.g. writing a class which converts a Person instance to its XML representation)
  2. Use existing O/X mappers like JAXB; the learning curve might be a bit steep but the gains would be lesser code and ease of understanding and maintainability. E.g. Marshalling to XML/Unmarshall from XML

Your choice would depend on how much time you are planning on investing in this task (learning curve for JAXB, remember?) plus whether the task explicitly requires you to not use any mapper. BTW, a reference JAXB implementation comes pre-packaged with JDK 6 so it should take care of the "no third party libraries" limitation.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Indeed, I shouldn't have answered this question; from your posting history it seems that you have a knack for biting the hand which tries to help you. Enjoy the ignorance and the bliss which comes with it I guess...

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Pro tip: when posting in forums avoid use of words like "ASAP", "urgent", "plz plz plz" etc. in your post title or post content. Writing "ASAP" gives the members an impression that you don't care about the priorities of those who would be willing to help you out and sounds more like an order than a request.

Give out as much details as possible and try to communicate across the issue with minimum possible complexity. Rather than saying "I've got n files and I have to find out a pattern IP_ADDR in them", logically decompose the pattern and ask something like "I have a file with a single line IP_ADDR and I would like to read its value". Asking too much too soon results in disaster IMO.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Yes, something along those lines. For e.g. a enum like:

enum Suit {

    HEART(1) {
        @Override
        public void doIt() {
            System.out.println("I'm a HEART");
        }
    },
    SPADE(2) {
        @Override
        public void doIt() {
            System.out.println("I'm a SPADE");
        }
    },
    CLUB(3) {
        @Override
        public void doIt() {
            System.out.println("I'm a CLUB");
        }
    },
    DIAMOND(4);


    private Suit(int i) {
        this.i = i;
    }

    private final int i;
    
    public void doIt() {
        System.out.println("HI");
    }

}

would be translated to something along the lines of:

class SuitClass {

    public static final SuitClass HEART;
    
    public static final SuitClass SPADE;

    public static final SuitClass CLUB;

    public static final SuitClass DIAMOND;

    private String enumName;

    private int pos;

    private int i;

    static {
        HEART = new SuitClass("HEART", 0, 1) {
            public void doIt() {
                System.out.println("I'm a HEART");
            }
        };
        SPADE = new SuitClass("SPADE", 1, 2) {
            public void doIt() {
                System.out.println("I'm a SPADE");
            }
        };
        CLUB = new SuitClass("CLUB", 2, 3) {
            public void doIt() {
                System.out.println("I'm a SPADE");
            }
        };
        DIAMOND = new SuitClass("DIAMOND", 3, 4);

    }

    private SuitClass(String enumName, int pos, int j) {
        this.enumName = enumName; // teh enum name
        this.pos = pos; // the enum position
        this.i = i; // the instance variable of enum
    }

    public void doIt() {
        System.out.println("HI");
    }

}
NewOrder commented: well understood. thank you +0
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Use the Scanner class for the same. I think this tutorial does a fair job of explaining the same.

NewOrder commented: thanks s.o.s +0
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Look into the java.text.MessageFormat class. Also, read this.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Because arrays get special treatment as per the specs:

The public method clone, which overrides the method of the same name in class Object and throws no checked exceptions. The return type of the clone method of an array type T[] is T[].

Ezzaral commented: Nice find. +14
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Not true if you want to keep your files in top level, meaning classes folder. At that time you do not need package declarations.

...which unfortunately is a really bad idea in case anyone reading this thread thinks that it would be a convenient one. As of Java 1.4, unnamed namespaced classes can't be imported by namespaced classes i.e. are effectively invisible to namespaced classes.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

@Override ensures that you don't end up *supposedly* overriding a super-class method and wondering why it doesn't work. E.g. every object inherits a toString() method from the Object class. A small typo in your toString() implementation might leave you scratching your head as to why your toString is not being called.

public String toSTring() {
  // something; notice the uppercase T
}

Compilation of the above code leads to no compile time errors. Contrast it with this piece of code:

@Override
public String toSTring() {
  // something
}

The above piece of code won't compile since there is no super-type method by the name of toSTring(). Something that would have normally got caught at runtime can now be caught at compile time. Much better.

Simply put, @Override just makes your intents much more clear to the compiler.

EDIT: Beaten!

tux4life commented: Marvelous explanation :) +8
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

:)

Nick Evan commented: Thanks +0
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

The servlet container creates a single instance of the servlet and reuses the same for every request. This has the implication that your instance variables in your Servlet would be shared across all reqests thereby resulting in the `accBalance` being shared across all accounts. You can of course synchronize all the actions which operate on the `accBalance` variable but that would effectively mean only a "single" client would be able to work with the `accBalance` variable thereby killing any chances of concurrent requests being processed. The solution? Use session variables for maintaining balance for each "account"/"client".

public class MyServlet extends HttpServlet {
    protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        String action = getAction(req);
        double amt = Double.parseDouble(req.getParameter("amt"));
        HttpSession session = req.getSession(true);
        synchronized(session) {
            Double oldAmt = session.getAttribute("accBalance");
            Double newAmt = // add old amt and amt
            session.putAttribute("accBalance", newAmt);
        }
    }
}

Also, delegate your view rendering to a JSP instead of embedding the HTML rendering in your servlet; any more complicated view logic and your servlet would become unmaintainable. Read up the official servlet/JSP tutorial; http://download.oracle.com/javaee/1.4/tutorial/doc/ (assuming you are using java ee 1.4)

More recommended reading:
http://stackoverflow.com/questions/2183974/difference-each-instance-of-servlet-and-each-thread-of-servlet-in-servlets
http://www.velocityreviews.com/forums/t388103-how-servlet-works.html

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

The error says that you are trying to invoke the method setAttribute with parameters (String, double) whereas the expected types are (String, Object). Simply put, the compiler expects the second parameter to be of any reference type but definitely not a primitive. Convert the `double` primitive value to `Double` and it should work out fine. Look into the Javadoc of the `Double` class.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You can also use PreparedStatement which utilizes wildcards; just make sure that the "pin" you are setting already has those wildcard characters.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Make sure you have the required libraries on your runtime classpath. Are you packaging your app as a JAR file or as class files? If you are running your app as a packaged JAR file make sure you have all the required dependencies present in the JAR file. If you are running a class file make sure you specify the -cp or -classpath argument to the Java process.

Edit: I just noticed you have created a lot of posts over the past few days but not marked them as solved. If your problem has been solved, please mark your posts as solved so that it might be easier for someone with the same query to find a solution.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
BestJewSinceJC commented: very helpful +5
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

From this site which is a *very* reliable source:

Oracle has changed the naming for all sun certifications,to fit existing oracle certification names,effective September 1st

Note that this is just a name change,nothing will change regarding the certifications themselves

Naming of the certifications before and after the change


for example SCJP 6 will be called "Oracle Certified Professional, Java SE 6 Programmer" from now on

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Database Design certainly doesn't seem like a catch-all term. Come to think of it, having a single "Databases" forum for some time would help us evaluate whether we really do need a separate forum for each specific database.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Your suggestion does not take into consideration idiotic answers, forum trolls etc. Plus, idiots have a knack of posting on "popular"/"useful" threads which makes down-voting it something which is against the spirit of voting, so yeah... ;-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

On behalf of the moderators here I think I've already given a fairly good reply to your query via PM as to "why" we don't delete threads on user request. Unfortunately, creating a thread in the Community Feedback section won't change it since rules are rules which have to be followed by mods and admins alike. If you *still* are unconvinced, you can get in touch with the site owner "cscgal" though I'm pretty sure that won't change a thing.


BTW, I hope your TA understands the situation here and you get the credit which you deserve for completing the assignment on your own.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Search the codebase for "new BookDBAO(" ? But ideally, since you are retrieving the DAO from teh servlet context, the instantiation should have happened in the class which ServletContextListener. Look into your web.xml if you have any listener tags and search in those classes.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

It is always a good solution to google for the base exception message. Chances are that someone else has already encountered this error and found a solution for the same. Searching around, it seems that using Glassfish + Eclipse has some problems when it comes to dealing with object persistence when the entity class is updated. Are you using Glassfish with eclipse? If that blog post doesn't solve your issue, then read some other articles and see if that helps.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Is there a quick way to create a constructor, or any method for that matter, where the type of data structure created is decided when the method is called

Yes, the new Java collections API is full of examples of the same. Pick any class from the collections API and look at its source to get a feel of how things are done. Read a bit about generics and you are good to go.

comSysStudent commented: concise, to the point, excellent links +1
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
I know there's more to this than just helping the OP, etc. But seriously, could this be done? The profile panel of an idiot would then have some sort of icon (only visible to the idiot-applying user of course).

Use the ignore list feature provided by vBulletin. If I've added a member to the ignore list, all the posts by that user would be hidden by default and a message would be shown. Something like:

Access the ignore list feature here .

BTW, you are not on my ignore list, it was just for demonstration purposes. ;-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Would it be possible to have a tutorials forum where people can post tutorials where admin can sort through to transfer/edit/delete into the appropriate positions

Unfortunately that would attract more spammers/content thieves than members who are genuinely interested in posting tutorials. More like one more forum to moderate for spam with the additional responsibility of checking the content for its originality.

Also another idea which I have brought up before is daniweb open source projects

You can of course start this initiative but it would IMO turn out to be a nightmare for the one who is mentoring. If no mentor is present for the project, it would be more like the "blind leading the blind". Not to mention being spammed by college kids for "enhancing" the project for their own use.

Of course I'm being a big pessimist here. But given that the developer community here at Daniweb isn't large, dedicated and experienced when compared to the "consumers", it would be difficult to pull off the stuff you are mentioning. But if you are planning on continuing with the open-source thing, good luck. :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

== compares object references or stands for reference equality which would never hold true for objects which are loaded from a serialized file after being saved. The serialization mechanism uses the serialized byte stream to create a *new* object having the same state as the original saved object. Override the equals method of the Object class for your custom classes if you need logical equality.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

The difference between having promotional links in your signature and in each of your posts is that signatures can be disabled site-wide. This is extremely useful in case you want to do away with all the promotional links placed in signature in one go (e.g. when you ban the member and disable his sig), as opposed to editing each post and removing the link spam.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

First suggestion; instead of making forum members download a file from "mediafire", host it on site open-source code hosting sites like Google code. After doing so, you'd be a bit comfortable with version control in general (which is the heart of every development) and people would be able to view your code online instead of downloading it on their own computer.