~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
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Good luck with your project. :-)

~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

> It returns true in this case since the character sequence "mat" matches the "onomatopoeia".

Really? Have you tried running the example you posted? If yes, post a working code which proves your point.

> I want it to return true only and only if the whole word onomatopoeia is in the String a followed or preceded by however many chars.

That's exactly how contains() works. http://ideone.com/LflVb

~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

The term you should be looking for is Java RESTful framework. These frameworks basically allow you to create xml/json/XXX enabled HTTP services by mapping your output object to XML/JSON elements. There are a few frameworks which I'm aware of (but never used):
* Restlet
* Resteasy
* Jersey

The tutorial which uses RestEasy can be found here.

EDIT: Found that this was cross-posted at: http://stackoverflow.com/questions/8229718/webservice-return-a-xml-json-file

~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

Yes, your will receive all updates on the course front. The courses actually start in 2012 so there is some time before you get the stream of alerts.

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

In case you are not not aware, Stanford has started offering free online courses (as in real courses and not just video lectures) for topics like Database design, analysis of algorithms, CS 101 etc. Classes like database class, AI class and machine learning class are already live and a host of new courses are offered starting Jan 2012.

These classes are a good supplement for experienced developers who could never take a formal CS course as well as for the beginners starting out with computing. The enrollment for the "Design and Analysis of Algorithms I" has started with many other classes (like cryptography, CS 101 etc.)

If interested, you can register for the Algorithm class here along with the other offerings given by Stanford.

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

This is actually a bug/enhancement request which was fixed in JDK 7. Previously, adding a single non-comparable element to the TreeSet didn't cause any problem but as soon as a second one was added, it caused ClassCastException because the existing object was cast to Comparable to determine the location of the new one.

AFAIK, in JDK 7, adding a non-comparable element to TreeSet without a custom Comparator causes a runtime exception.

~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

hi am making project..i have entered the record in 8 columns of table using jdbc and 9th column is automatically icremented as primary..so after putting the record and executin query i want to check primary no which i get..i want to show it in text box..what can be the query...??

Use the `getGeneratedKeys()` method of the statement object.

Just make sure that when executing the statement you pass in the "Statement.RETURN_GENERATED_KEYS" flag as the second parameter. Follow the instructions here and make sure that you have created a table which explicitly has a auto-incrementing column.

~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

AFAIK, a mail is sent out to members periodically if they don't visit the site for a long time which also contains the link to all the threads they had started and the replies they have received. But many members are "against" receiving such mails and hence the threads wherein members ask the question of "how to delete the account". Allowing a user action to send out a mail to some other member won't be acceptable IMO.

Regarding the separate page for moderators, all the reported posts are viewed by the Daniweb members. So if any member feels that a certain thread should be marked as solved, we would be more than happy to look into the thread and act accordingly.

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

Happy B'day Dani; hope you had a great time with everyone! :)

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

> 2. If reading in from a file, bufferedreader, because it's faster.

That's a non-issue unless you are reading a lot of pretty big files. For reading one-off files in an application (which are around a few KiB's), I go with Scanner just because it's less typing.

An implementation detail which the users of Scanner class need to keep in mind is that it is memory/cpu heavy (at least when compared to BufferedReader) because it internally uses "regular expressions" for matching your "nextXXX" as opposed to just reading everything till the end of line as in the case of a regular Reader.

~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

Are you able to ping the given IP address? Can you connect to the database using a SQL explorer like MySQL workbench on the given port? How are you confirming that the database really is alive?

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

> And what do most websites use these days?

OpenID providers which pretty much brings down the possibility of mass registrations since the spammers would now be up against OpenID providers for spamming rather than Daniweb itself.

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

Is it the person who posted the solution or the lurker who made the last (but not helpful) post?

Everyone who posted to the thread before it was "marked as solved" gets their solved thread count incremented. It's not a perfect way to manage "solved thread" count but works pretty well.

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

cwarn23, please don't sidetrack the topic in consideration but posting off-topic replies. You have officially diverted the "RIP John" thread with comments which would be thought of by some as "borderline online stalking".

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

But /how/ do I encrypt it? In PHP there's a simple md5() function, isn't there some equivalent in Java?

MD5 is not encryption but just a one-way/irreversible hashing algorithm. You have two different issues here: storing password in secure format and sending across password over the network in a secure manner.

For the first one, look into the sample code for encrypting/decrypting the file.

As for the second one, look into this article for the relevant switches of the JDBC URL for MySQL. AFAICT, the approach in the article doesn't use certificates which makes things even messier. Searching around for "MYSQL jdbc ssl" should bring up some links on the MySQL documentation on the steps to set up JDBC over SSL with a certificate.

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

Hi, I not long ago create a youtube video titled "How to RTFM for Dummies" and so far I have 10 dislikes and 0 likes from 59 views. So does this mean people don't like to read the manual anymore or is it that they don't like being told to read the manual. I thought it would have made a perfect video but looks like people don't like watching videos on how to read the manual. Any feedback on your reasons as to why you might give a negative response to a video titled "How to RTFM for Dummies"?
Also I have received on comment which is as follows:

Thanks.

I think you are losing out on the charm as seen in this tutorial. ;-)

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

Indeed; RIP John and thanks a lot for your contributions to the computing world. :(

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

Indeed; Happy Diwali to all the Daniweb members out there! :)

~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

There isn't much background to comment on. Sure, Java + JDBC works pretty good for accessing almost all kinds of RMDSes. Things you might want to keep in mind? To start off (assuming you are new to JDBC):
1) Use Type 4 JDBC thin driver (pure Java driver) instead of JDBC ODBC bridge
2) If you have a healthy number of transactions per sec/min, consider using a connection pool instead of grabbing the connection every time from the database.
3) Make sure you go through: http://download.oracle.com/javase/tutorial/jdbc/TOC.html
4) If you are submitting/requesting a *lot* of bulk data, consider setting the fetch size so that all data is retrieved in a single go instead of making a lot of round trips.

~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

The ideal way would be to use some sort of artifact manager like Maven or Ivy to manage your libraries. If you aren't aware of any of those and want to get started as quickly as you can, visit: http://mvnrepository.com/artifact/jfree and download the latest versions of "jcommon" and "jfreechart". Put those JAR files in your project's classpath (I'm assuming you are using some sort of IDE like Netbeans/Eclipse) and you should be good to go in terms of running JFreeChart snippets.

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

My Hibernate is rusty but after a bit of searching, it seems that you have an incorrect value for the "hibernate.hbm2ddl.auto" property in your configuration XML file. Just remove it or change it to 'create-drop' from 'validate' so that your existing table will be dropped and created new everytime. Also, read this for more details.

~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.