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

This problem can be easily solved if you are ready to pass around "type" tokens i.e. Class instances to methods. Let's say you want to create a generic "doSomething" method as mentioned in your first post. The generic version would look something along the lines of:

public <T> T doSomething(Object obj, Class<T> klass) {
    T someObject = klass.cast(map.get(obj));
    if(someObject == null) throw new SomeException();
    return someObject;
}

Also, when you instantiate any "generic" object using reflection, all the bets are off (given that you have used introspection and not regular constructs which are subject to compile time checks) and hence it might be a bit misleading to say that you created a "Map<String, String>" because under the hood, it's just a Map instance (given that generics are implemented using type erasure).

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

How do strings work? In C we must declare the size of a char array to represent a "string".
But in java we do not allocate memory for the size of a string. So how does the string work?
Is there a pre deterimed size assigned to strings from the compiler or what?

When it comes to Java, String type is a bit special. Even though it is a "proper" reference type like other classes out there, compiler offers additional support when it comes to handling strings.

For e.g. Java doesn't have operator overloading but permits "+" operator for String object concatenation (which decomposes to StringBuilder operations under the hood but still). It's also possible to create String objects without explicitly calling any static method or constructor i.e. compiler has built-in support for "string literals".

// "String" instance creation without new at compiler level
final String first = "something";
// concatenation; important: strings are immutable and hence a new "copy" is
// created for the result string instead of modifying the parameters to +
final String newString = first + " to be proud of";

Regarding the question about capacity, almost all regular methods for creating strings (apart from the ones mentioned above) automatically account for capacity, which is inferred from the passed in arguments. Let's assume you want to create a UTF-8 String instance from a sequence of bytes read from a Socket. The code would look like:

final byte[] bytes = readBytesFromSocket();
final …
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

BTW, just FYI, you can run Java in any compatibility mode. So, if you have JDK 6 and want to run it as 1.4, you can do "java -version:1.4 -version" and it'll print 1.4. Similarly, when starting your server, if you have access to the .bat or .sh file which starts the server, you can add a "-version:1.4" to it and it'll start up in 1.4 compatibility mode. What is the command line you are using to start the server?

serdas commented: you are great thank you for not giving up on me +3
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I meant replace "yum install glibc.i586 glibc-devel.i586" with "yum install glibc.i686 glibc-devel.i686" and try again.

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

Hmm...you seem to be using a pretty recent version of CentOS which might explain missing i586 packages. Can you try installing i686 packages for glibc and then run the installer?

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

OK, bit of progres. It seems that you can only use 32 bit libraries on 64 bit OS if you have the required 32 bit dependent libraries installed. The details for that are pretty much specific to the distro (CentOS in your case) so you would be better off asking on the official CentOS forums. In case you don't mind an "experimental" solution, try out the command mentioned here?

yum install glibc.i586 glibc-devel.i586
yum install libX*
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

AFAIK, 32 bit executable should be perfectly fine for a 64 bit OS. Here is the output of my box:

(proj)sanjayts@VirtualBox:~/stuff$ ls -l j2sdk-1_4_2_19-linux-i586.bin 
-rwxr-xr-x 1 sanjayts sanjayts 36387084 2011-12-22 00:04 j2sdk-1_4_2_19-linux-i586.bin

Can you do a fresh download of 2_19 (instead of 2_18) and try again? If it doesn't work, do a `ls -l` and check if the size is same as the one I posted above.

If all the above still doesn't work, we might have bigger problems but let's try this out first...

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

I was able to properly download and install it so either it's a corrupt download (try downloading again) or maybe the given binary package is not compatible with your linux installation (unlikely). Can you do a 'ls -ltr' of the bin file and post the results here?

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

You can download the self-extracting .bin file for 1.4.2_19 from http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase14-419411.html#j2sdk-1.4.2_30-sol-JPR

After the download is done, just fire:

chmod +x j2sdk-1_4_2_19-linux-i586.bin
./j2sdk-1_4_2_19-linux-i586.bin

This will fire-off the installer and bring up a licence agreement screen which you will have to agree to. Once installation is done, you'll have a new folder called "j2sdk1.4.2_19" in the folder in which the installation was fired. This method also has the advantage of not clobbering your system wide Java installation. Just make sure that you properly set the $PATH to include this new java instead of using the system default 1.6.

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

You need to break up the regex you have posted and explain your reasoning behind putting the constructs which are there in your regex. Also, instead of posting "sample data" for the pattern you can looking for, it would be much for helpful for your own sake to frame the requirements in words. An e.g. the regex should accept any two alphabets followed by a colon and one or more digits.

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

> yes i found it and but it in jsk lib's but when i compile , that's error all imports of httpServlet does not existed

OK, you need to tell us:
* The location of the servlet api related JAR on your machine
* The command you are issuing on the shell to compile your servlet
* The exact error messages you are getting

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

> i have a java class extend Httpservlet when i'm where i can but the servlet APIs to compile it

If you have a servlet container like Tomcat/Jetty, you should be able to find these dependent JAR files (i.e. jar files part of servlet specification) somewhere in the Tomcat/Jetty directory (e.g. lib directory). Search for the servlet-api.jar file.

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

I have a large file (11 GB), that I want to extract information from.

At the risk of posting some off-topic, is using Python an absolute requirement? If not, and assuming you are on *nix, you can easily extract the probability using a one-liner:

cat tab.txt | sed '1d' | awk 'BEGIN{FS="\t"} {split($7,arr1,";"); split(arr1[3], arr2, "="); print arr2[2] }'
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Tip: The answer is not "option B"

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

On the REPL, when you type a name which exists (can be a variable, class name, function etc.), the output shown is the str() representation of that name. For e.g.

>>> s = "Hello\nWorld"
>>> s
'Hello\nWorld'
>>> s.__str__()
'Hello\nWorld'
>>> str(s)
'Hello\nWorld'

If you want to view the output of the interpolated string (after taking into consideration the escape sequences etc.), use the print construct.

>>> s = "Hello\nWorld"
>>> s
'Hello\nWorld'
>>> print s
Hello
World
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You can't change it yourself. Please provide us an username which you would like to get it changed to (assuming it's not already taken).

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

> shouldn't i just call in the main method something like this to create 100 thread?

Yes, except that you have a one-off error in your code; you are iterating 101 times, not 100 times. And make sure variables have logical name and not numbers tacked on to the end.

> and about the thread pool thing, she said that is how you create multi-threading....explain that please

Thread pools are the new abstraction offered by the standard library to replace the old Thread() construct for doing background activities and submitting tasks. But if your assignment specifically asks for 100 threads, creating a pool with 100 threads wouldn't be the same, because it is quite possible that when you submit the 50th task, it might be processed by the same thread that processed the first task. i.e. there is no guarantee that a new thread would be used. If this isn't a problem, go ahead and use the pooling approach. Otherwise, stick with the new Thread() stuff.

> so is this the ouput should be like?

That isn't something you should ask us. I would rather want you to test both sync and non-sync runs and draw the conclusion based on what you have learned.

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

Not exactly; all AtomicXXX classes use lock/wait free constructs whereas "synchronized", which is what the OP has to use, is inherently a lock based approach. Though I agree the article would be the next logical step i.e. going from synchronized to lock-free implementation.

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

Im not sure wht does the question want by meaning this “Each thread adds 1 to a variable sum that initially zero”…

First off; the question explicitly mentions "launching" threads which is bit different from creating a "pool" of threads. No need to extend the `Thread` class, just make your work class implement Runnable. Your logic is flawed in the sense that you are "not" sharing the MutableInteger between all those "work" instances. Each Runnable has its own "sum" variable and hence you don't see the effect of synchronization/non-synchronization since there is nothing shared.

You would have to:

  • create two "runnable" classes (classes which implement Runnable interface); in one you will call `sum.inc()` and in the other class you will call `sum.syncInc()`. Let's call them Work and WorkSync respectively.
  • These classes should have a constructor which takes a "MutableInteger" parameter.
  • You create a single "Mutable" integer and pass it to all the 100 instances of your Work class instance. After that, create a new Thread for each Runnable and launch that thread (call start on it).
  • Repeat the same for WorkSync class (make sure you start from scratch; i.e. create new Mutable integer, create new 100 threads etc.)
  • Observe the result and draw your conclusion
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> C:\HelloWorld.dll: Can't find dependent libraries

When you load a DLL, the dependent DLL's get loaded as well and if they are not found, this error is raised. The dependent DLL's should be in the PATH env variable or in -Djava.library.path system property. Assuming you are not using -Djava.library.path, do both of you have the same PATH env settings? Do you see any difference in there?

Also, do you have a conflicting version of DLL's in the directories on your PATH (i.e. you have a.dll ver 1 and your partner has got a.dll of ver 2 in system32 folder).

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

> Why doesnt it work on another PC?

More details as always. When you say "couldn't find library path", was is some linker exception? Which DLL/library did it say was missing? The one you created or a completely different one? Do both the computers have the same OS? You might also want to look at the other PC for old DLL's and do some cleanup if required.

BTW, it is not a requirement for the other PC to have Visual Studio installed on target machines, just the proper runtime would do.

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

> Fatal Error C1902: The program's data base administrator isnt the same; Please check the instalation.

What does a web search for the error code say? There are a lot of posts out there with th same question and solution; one of them might work out for you.

> What does SQL server have anything to do with this? It installs the express edition but why?

Not sure; during the installation, I unchecked everything.

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

> This might be a dumb question but would this make a normal C/C++ DLL or a C/C++ .NET DLL?

You would need a normal C/C++ DLL.

> And the C++ team pretty much have no clue how to make a .DLL

That's news. I hope you are not stuck with fresh-out-of-college-self-proclaimed C++ programmers...

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

> Could you be more especific when you say "setup the same thing in Visual studio"?

Simply set up a new DLL C project in Visual studio. Create new blank project. Right click project -> General -> Configuration Type set to Dynamic Library DLL

Right click Header folder -> add item -> add your header

Right click Source folder -> add item -> add your .c file

Right click project -> c/c++ -> Additional include directories -> add paths to java\include and java\include\win32

Right click project -> rebuild -> the output window will show you the location of the newly created dll

For more detailed instructions, you should probably speak with the C++ guys from your team since they should definitely be able to help you out with this one.

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

This is definitely something specific to your machine and related to spaces in path or newlines. But don't think I would be able to pin-point the solution sitting here.

Let's try another approach; can you setup the same thing in Visual studio?

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

What does this exactly mean in English?

LINK : fatal error LNK1181: no se puede abrir el archivo de entrada 'local\Temp\
_CL_1d74d141lk.obj'

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

What is the location of the directory from which you are invoking "cl.exe"? Also, can you try putting the -I paths in quotes? If that doesn't work, can you try:

cl.exe -I "c:\java\include" -I "c:\java\include\win32" -MD -LD mypkg_HelloWorld.c -Femypkg_HelloWorld.dll
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Sorry, can't help you out on that one; not even sure what that error message means... If you have made any PATH related temporary changes for making this run (e.g. copying DLLs to the current directory etc.), now would be the time to undo those. Do you have multiple VS installations?

Also, paste the command line you are using here.

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

What do you mean by "restart cmd"? After executing the bat file, you are supposed to use the same session for running cl.exe (assuming you have already added that particular folder to PATH) because changes made by the .bat file execution are transient and carry on only for that given session.

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

OK, you have to make sure that:

  1. javah is in your path (at least temporary; so that you can directly invoke it without being in java\bin)
  2. You need to be in a directory just outside the "mypkg" directory which contains your HelloWorld.class file before invoking javah. To do this, search for where the HelloWorld.class is generated (should be autogenerated if build-automatically is on in Eclipse)
  3. Open up "CMD" and CD to a directory just one level above the mypkg directory which contains HelloWorld.class.
  4. Assuming your class is generated in the following directory strucure "c:\testproject\target\classes\mypkg\HelloWorld.class"; CD to the directory "c:\testproject\target\classes" and then invoke the javah command as "javah -jni mypkg.HelloWorld". There is another way by which you can set the classpath but I'll not mention it to avoid confusion.
  5. If you have followed till now, you "should" have a .h file generated in the "classes" directory. If it still doesnt' work; show me your entire CMD session.
  6. If it works, continue with the step 3 in my previous post.
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Well, surprise surprise, I was able to do it with the command line compiler as well so I guess I'll just show you the steps in brief.

  1. Create an eclipse Java project and inside that create a class which has the same contents as that of the tutorial. Just make sure it is in some package like "mypkg" etc.
  2. Generate the JNI header file using the "javah" utility as mentioned in the tutorial
  3. Create a new folder elsewhere which contains this header file along with the .C file in the tutorial. Make sure that the function definition in the header is the same as the one mentioned in the .C file (which you will have to change since our class is now in a package and package name is part of JNI function signature)
  4. Open the shell (CMD) and navigate to the newly created directory.
  5. Assuming visual studio is installed at default location; execute C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat . This will set the environment variables required for executing cl.exe.
  6. Now execute the cl.exe commands specified in the tutorial and make sure you use your own Java path for includes.
  7. If everything went out well, you should see a bunch of files in your newly created directory and a HelloWorld.dll
  8. Now right click on your class in Eclipse -> Run As -> Run Configurations -> Environment Tab -> Click New -> Add "PATH" as name and "newly created directory location which contains dll" as value -> OK -> Run
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I'm not sure what exactly are you doing there. After reaching home, it took me 30 mins to run the hello world example. Are you sure you are able to properly build the DLL file? The steps in the tutorial might be a bit problematic in case you are using Visual Studio. Did you make sure you add "jvm" headers and "jvm" libraries to the linker when building the project?

You might need to jot down here "what" steps you are taking when using Visual Studio Express Edition to build the DLL down to the minute details.

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

OK, you should never have to add any random DLL to your path so for the time being forget about manually adding DLL's. How are you building the wrapper project: using IDE or command line? Using Visual Studio? How is your library distributed, as a DLL or LIB?

This is how our project is structured wrt dependencies (Windows):

  • Additional libraries included on the path:
    • %JAVA_HOME%\lib\jvm.lib
    • path\to\your\graphics\library\something.lib
  • Additional header includes directory:
    • %JAVA_HOME%\include
    • %JAVA_HOME%\include\win32
    • path\your\graphics\project\header\files
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

And at 2.6 it always gives a error about a .dll missing (and it is there) No matter what I modify in the PATH it always asks for another and another....

I need more details; which part of step 2.6? The part where you try to load your wrapper DLL or the part where you try to create your wrapper DLL?

To create your own wrapper DLL, you'll need to specify the headers (.h files) and libraries (.lib files) for the JVM and your own C++ project.

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

By this I imagine that you mean that nearly all the calculations in classes, functions, procedures, etc must be turned basically into usable functions in a C++ library right?

Basically all classes and functions you create specifically for the purpose of JNI wrapping will go in this project. So you'll have two projects: the first one will be your original C++ library, the second one will be the C++ wrapper project.

The bridge method is this, right:

Yes

The problem is that I see that as C++ read from a Java library. I need Java to read from a C++ library.

Once you are in that function, you are already in C++/native code land. You can freely call any C++ function from your JNI wrapper function and mix-and-match JNI and normal native calls as you please. It is as simple as reading the arguments passed in to the Java method, using them in some way to decide which C++ methods to call. It would be a bit difficult to explain this all here so you might want to read up on some official stuff (i.e. JNI examples by scrouging the internet or get a JNI book).

I simply load the C++ library in my Java project and it should load and I should be able to read the functions as I have implanted the JNI standards. Thats what I understood.

Not really. You load *your* "wrapper library" and the Java runtime will automatically load your C++ library …

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

> Is it "difficult" to do?

It depends, but yes, in general I wouldn't shy from using the words "laborious" and "verbose" when it comes to wrapping native code. The process goes something along these lines:

  1. Create a new C or C++ project which would act as a "wrapper" for your library
  2. This project would contain the "bridge" methods in the sense that they would use the JNI specification to call Java methods from C++ and passing Java invocations to the corresponding C++ methods.
  3. This project would depend on your libraries and their respective headers along with the JNI specific stuff. The dynamic library created from this project would be placed on the java library path along with the dependent libraries.
  4. In your code, you'll need to load the native library you created before using the functionality provided by your wrapped code.

Apart from this there are a few subtle things which you need to keep in mind like translating from your Java data structures to C++ ones (in the wrapper C++ code), memory management (in case there is a one-to-one mapping between your live instance of your class and a C++ object) and the re-entrant behaviour of your library (can it be safely called from multiple Java threads?).

There are a few helpful libraries out there (both paid and free), which relieve the developer the pain of manual wrapping by providing helper annotations but AFAIK, they are slower than the pure JNI counterpart so …

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

That is because you are pretty much ignoring the exception it throws (line 28 and line 39) which is a bad thing. Never catch exceptions only to replace them with "print" statements or worst, with an empty catch block. Till you incorporate a logger in your application (which IMO every non-trivial application should have), your best bet would be to dump the entire stack trace at the time the exception was thrown.

Do a 'e.printStackTrace()' of the exception and post the entire exception text here.

peter_budo commented: Who need to listen for exceptions, their are pointless ;) +16
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

$ is used as a separation marker for denoting inner classes. For e.g. consider the following class:

public class MyWidget {
	
	static class Oh {
	}
	
	public void doIt() {
		final Runnable r1 = new Runnable() {
			@Override
            public void run() {
            }
		};
		final Runnable r2 = new Runnable() {
			@Override
            public void run() {
            }
		};
		r1.run();
		r2.run();
	}
	
}

Here; four class files would be created:

  1. MyWidget
  2. MyWidget$Oh.class
  3. MyWidget$1.class
  4. MyWidget$2.class

Basically, the format is: OuterClassName$(InnerClassName or number in case of anonymous class).class. In the above case, since we have two anonymous Runnables created, we have $1.class and $2.class.

In case you are unaware of nested classes, more details at: http://download.oracle.com/javase/tutorial/java/javaOO/nested.html

iamcreasy commented: Perfect answer! +3
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

There are three ways in which you can access a static public enum from a different package:

  1. Import the enum as a regular import. e.g. import your.pkg.Card.Rank;
  2. Import the enum using a static import. e.g. import static your.pkg.Card.*;
  3. Import the Card class and refer the Rank class the way you would access any other static member of a class. e.g.
    import your.pkg.Card;
    
    // somewhere down in your code
    Card.Rank rank = null;

Another cool thing worth noting is that as per JSL 8.9 and 9.5, nested enums for classes and interfaces are implicitly static but you are free to explicitly specify the static modifier. So:

public class Test {
  public enum Rank { ONE, TWO }
}

// is same as
public class Test {
  public static enum Rank { ONE, TWO }
}
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Your Deck class contains a lot of compile time errors. You can't call "add" on an array in Java. Did you mean to use ArrayList class? Also, there is no reason why enums inside the Card class should be non-static since they anyways are not dependent on the instance of a Card class but are still related to the Card class. Just make them static, import them in the Deck class and you should be good to go.

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

You can get the latest drivers for your specific database version from this page.

I'm a bit confused; in your original post you used the port 8080 whereas in the previous post you have 1521. What port is your database actually running on? Have you changed the port number or is it a default installation? What actually is "slyvronline" ? Your database name? SID? Service name? When connecting to your database using SQLDeveloper, which text field do you put "slyvronline" in?

Also, can you try to connect to your database from a standalone JDBC code which doesn't use Hibernate.

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

What JDBC driver version? Are you able to the database using a database explorer software like SQLDeveloper? Also, instead of the connection URL you are using, can you try using the one mentioned in this article?

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

First off, there is a equals() and hashCode() contract you must be aware of which states that if two objects are equal, they should have the same hashCode() which implies that if you are overriding equals method, you need to override the hashCode() method. In your case, it would be simply be a matter of returning the hashCode() of the `name' field. Not critical for your application, but something you must be aware of.

public class Application {
    public boolean equals(Object obj) {
        return this.name.equals(((Application)obj).name);
    }

    public int hashCode() {
        return this.name.hashCode();
    }
}

Second; in the flagIt method, it makes sense to first check for the already flagged status rather than checking for equality and classname since the flag check is very trivial as compared to the other two i.e. check for flagged == true first. Also, for booleans, you can leave off the equality check and just write if (flagged[i] && elementList[i].equals(anElement)) .

Also, as previously mentioned, using the getClassName() before equality checks is just wrong. This check needs to ideally go in the equals() method i.e.

public class Application {
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof Application)) {
            return false;
        }
        return this.name.equals(((Application)obj).name);
    }

    public int hashCode() {
        return this.name.hashCode();
    }
}

Also, hashCode() based containers are pretty good with existence checks i.e. if you use a secondary HashSet<Element> in your ElementSet class, you can get wicked fast existence checks since it internally uses …

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

Once again, thank you for your help. It's greatly appreciated.

You are welcome; if your queries are answered, please mark the thread as solved so that it might help others who have similar needs.

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

You still haven't answered the question I asked in my previous post:

Are you sure your TA wants you to use `getClassName()' ?

Regarding your suggestion, binary search works for sorted arrays and since there is no inherent order in your "element set", I'm not sure how it will help you out. You already have a a boolean array which keeps track of "flagging" the elements. Also, why does your ElementSet code hard-references "Subscriber" in the sysout text? Isn't it supposed to keep track of "generic" Elements rather than just the subscriber?

So my counter question would be, for what kind of sample code does your flagIt method fail? What does the following code print?

// untested code
public static void main(final String [] args) {
    final ElementSet set = new ElementSet();
    final Subscriber sub1 = new Subscriber("sub1");
    final Subscriber sub2 = new Subscriber("sub1");
    set.add(sub1);
    set.flatIt(sub2);
}

Your flagIt() method could use a bit of tuning but correctness first...

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

All I need to know is if the input username and password is valid and if it is valid then how many posts the user has and how many posts per day the user has. I'm not sure if daniweb already has such an api in existence so I thought I would ask.

I'm 99% sure Daniweb doesn't expose any sort of API to the general audience.

If you plan on writing your own blog sort of thing and want to authenticate user access, you can look into Facebook/Twitter/Gmail based login system using OpenID. E.g. Livejournal which supports Google/Twitter/Facebook etc. for OpenID options.

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

Too long a question and many queries lumped together in a single post. You might want to post the minimum code required for presenting the question and add more code if requested. Plus, posting queries in code snippet as comments in a bad idea and I'm pretty sure those who had a look at this thread were wondering what the question was.

Anyways,

Here I am told to add a @Override annotation for this statement and each subsequent clone function declarations in each class, why is this?

@Override annotation enforces at compile time that the method on which this annotation is present either overrides a method of the super-class or implements a method of the implemented interface. In your case, you are overriding the `clone' method of your Element class. This annotation isn't mandatory but is quite helpful since it counters surprises in case you think you have "overridden" but actually you didn't.

class Super {
    public abstract void doIt();
}

class Sub1 {
    
    // notice the typo here; the compiler won't help you out with this one and
    // unless you are using an IDE, you won't be able to find it
    public void doIT() {}

}

class Sub1 {
        
    // will result in compile time error since you are not overriding the 
    // super-class doIt() method
    @Override
    public void doIT() {
    }

}

it returns an error "cannot find symbol" on the calling line; is the function not integrated into the other classes? Why would …

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

> but I would like to know that I haven't been abandoned.

Maybe because those who visit the feedback section are not too much into fancy graphs and charts? Honest question: given the kind of resource investment (programming/hardware/maintenance) this requires, what does adding this/these features buy to the site as a whole?

I can't speak for others but I'm pretty happy with giving the solved thread/reputation points a passing glance. Too many details presented would be an overkill IMO for both the parties.

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

I don't have a Netbeans installation handy with me but can you try to rebuild the entire project (after cleaning the project) and then right click on the UseDir class and then select run? Also, are you sure that you have different code inside the main() method of both the classes?

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

RIP Steve. Such is cancer I guess. :-(

BTW, for those wondering about the new iPhone 4S, it's iPhone for Steve. Also, I'll just leave this here.