Knowledge Base

Batch Processing and MS SQL ASYNC_NETWORK_IO Wait Type

I encountered this problem recently while developing a batch processing software component. I spent three days testing, running traces, and doing network diagnosis. Here is what I discovered and I really hope it can help some else and avoid three lost days. The background The client is built in java and calls a stored procedure on MS SQL 2008. ... read more

FLASH Dynamic Bezier Animation...

..or my path to animating along non-existent paths and curves. Three months ago I set out to have some fun with Flash and generate dynamic curves and lines to then animate along them. Here is the outcome of dynamic path animation. This was a quick build for testing and sampling, however the possibilities are limitless. ... read more

Updates! Flash AS3 Resize, Scale and SMOOTH!

If you have followed my previous post on FLASH AS3 Load, Resize, and Scale you might have noticed some pixelation and un-desirable results on the re-size. Now, let's take care of that using Flash AS3 and the built-in bitmap class. This is really easy to do. The below functions are staring with the loadedImage function. ... read more

Automate PGP decryption with Bouncy Castle

There seems to be some errors in much of the code floating around regarding Bouncy Castle and PGP. I slogged through a few examples but kept failing on the private key, and in a few other spots! I solved the problem and wanted to share the correct set up and usage. This works great and is in several production level applications clients are running. ... read more

Xterminal and OpenOffice on Boot up.

In my previous post we discussed OpenOffice on Headless Linux, and now we can talk about launching on re-boot. This is really simple...go back to my previous post and get those start up commands. Now...lets go to /etc/init.d/ and make some start up files. For this you will need vi, vim, or nano. ... read more

Convert Documents to PDF for Distribution and Security

By this point you have OO running and listening on your localhost at a specified port. If not, you need to check out my previous posts - OpenOffice on Headless Linux - otherwise let's dive in. Often user uploaded documents need to be converted to pdf files for multi-platform distribution, security reasons, ... read more

Converting Multiple Documents to PDF

Now that you have read and followed how to Convert documents to PDF for Distribution we can now look at converting multiple documents. This will rely on the previous code, and simply implement one of the methods. Please note, I am writing this based on CentOS with vhosts be sure to modify accordingly. ... read more

FLASH AS3 Load, Resize, and Scale

You can have one image and meet several needs all while reducing overhead with some simple scaling. Flash has some really great image display capabilities, and I am going to expose some right now. By using the scaleX and scaleY methods in AS3 we are going to take one image loaded from xml and set the following: ... read more

Updates! Tips on OpenOffice

When running open office for document conversion you can certainly run into some real issues. Here are a few tips on avoiding these problems and making conversions cleaner, faster, and less memory intensive. One best practice, especially when running headless and "behind the scene". To avoid a conversion prompt we supply a UTF8 filter for . ... read more

Generate SQL Scripts for Disabling Constraints

While working with Oracle databases there are times when you want to disable the constraints you have created for the tables. This way you can quickly and easily truncate or manipulate some test data. This is something I would suggest be done ONLY with test data - unless you are utterly fearless. ... read more

Enhancing PDF files

You have converted a document to a pdf file, and perhaps even multiple documents to one single pdf file. But maybe you want more information attached to the pdf file - say a cover sheet or some page numbers and footers. Please refer to my previous post Converting Multiple Documents to PDF if you have any questions. ... read more

Connecting to LDAP bind, querying and authenticate via JAVA

Querying LDAP for user data is great for portal applications, secure company sites, and general log in uses. Active Directory (AD) contains a fair amount of information about your users, so tapping into that information can be invaluable. For this example I am going to assume we are logging someone into a company portal, ... read more

Generating SQL Scripts for Granting Privileges in Oracle

I work a lot with Oracle databases and often run two users - one for admin and one for web transactions. The web user generally has far less, if not customized, privileges on a per table basis. I find this to be an added layer of security, and DBAs tend to agree with me. Depending on who is writing code with you, ... read more

OpenOffice Notes on Document Conversions

During development of a recent application I encountered an issue with OpenOffice and plain text files (*.txt). The conversion never takes place and just flat out fails. I ran a few tests and found that I needed to apply a character set to the filters for opening the document. When OO attempts to load from url, ... read more