Code Snipetts: How to use JQuery to submit a form on enter

Often as a User we don’t want to use our mouse or tab to the submit button to submit a form on a Web page, instead we may just want to press the enter key on our keyboard. This functionality can be easily completed by performing a bit of JavaScript, personally I find that utilizing

Sybase T-SQL: How to keep your indexes up-to-date with update statistics

After inserting, modifying, or deleting a large amount of records in a table that contains indexes performance of queries can be increased by use of the update statistics query. The update statistics query creates or replaces statistics on a column and stores them in the system tables systabstats and sysstatistics. Sybase utilizes these statistics when

How to define a SQL Like statement in iBATIS sqlMaps

When utilizing the iBATIS Framework as the persistence layer of your applications, you may get stumped as to why your LIKE statements are not being handled correctly and throws errors. When at first glance the errors have to do with other parameters in the query. The solution to this problem is to program the %

// Java // SQL //
Read More

Passing Arguments or Variables to a Bash Script from the Command Line

Often when working with Bash scripts we find that we want to add some options to the script by way of arguments or variables. Easily enough Bash command line arguments can be accessed by $1, $2, etc within the script where $1 is the first argument or variable and #2 is the second etc. Example:

Java Code Snippet: Converting a Float or Decimal to Currency Formatted String

Java provides multiple Text Formatting classes to enable easy conversion of integers, decimals, floats, and etc into Strings. The DecimalFormat class enables the formatting of Floats and Decimals and can be used to easily display percentages and currency amounts. Example: Converting a Float into Dollars formatted String import java.text.DecimalFormat; … float amount = 100453.23f; DecimalFormat

Tips & Tricks – Sybase T-SQL: <> does not match null values

When writing SQL we may find that we need to write a WHERE clause that checks if a columns is not a certain value. To do this we have the <> operator that means does not equal. However you may be surprised that you are not getting all the results you expected, this is because

PHP Wrapper Library for Harvest API – Update: 0.2 Released !!

New Version released ! Get it Here. I’ve been making enhancements since the initial release of the PHP Wrapper Library for the Harvest API, that I first released a week ago in my entry PHP Wrapper Library for the Harvest API. This 0.2 version of the wrapper library contains bug fixes for some issues that

// Harvest // PHP //
Read More

Tips & Tricks: How to use a variable in a TOP clause of T-SQL

You may find that when developing Select queries for an Application that you may want to dynamically limit the results returned from a Stored Procedure. Upon first inspection you may think oh lets use a TOP clause with a limit variable passed in when the stored procedure is called. CREATE PROCEDURE getROWS @limit INT AS

Tips & Tricks: Comparing Text Files in Unix with DIFF command

When working in a unix environment you may find the need to compare the contents of 2 files. To do this unix provides the diff command. The diff command takes 2 files as an argument and outputs the differences between them in a simple easy to understand format using a simple change notation using numbers

How to run a Java Application from Bash Script

As one that seldom finds himself having to run Java Applications from a Unix Bash Script, I thought it would be helpful to share the appropriate commands i use to execute the code and to notify the user of success or failure. For reference the folder structure I use is: app_name – lib – config

// Java // Unix //
Read More