PHP $_SERVER : Obtaining Server and Environment Information

The php $_SERVER array is a super global that contains information about the server and environment that the php script is running in. Within this array there are 3 indexes or values that behave similarly and it is often hard to know which one to utilize. They are: $_SERVER[ ‘PHP_SELF’ ] $_SERVER[ ‘SCRIPT_NAME’ ] $_SERVER[

// PHP //
Read More

Sybase Transact-SQL: Selecting data based on date manipulation functions

When querying or working with data based on datetime, date, or time values Sybase has a group of Date functions available to help perform arithmetic operations.  These functions include GETDATE, MONTH, YEAR, DATEADD, and DATEDIFF. To help illustrate some of these functions lets assume we have the following ITEM, ORDERS, and ORDERS_ITEM tables that contains

Code Snippets: Parsing a String into a Java Date Object

If a beginner coder you may get confused by the fact that Date.parse function has been deprecated. Not to worry though, it was deprecated for good reason as the DateFormat classes gives you a better way to convert strings into JAVA Date objects. The DateFormat class contains a parse method that will convert a String

Sybase Transact-SQL – Adding Columns to existing Tables

Over the lifespan of a database driven application you may find that your existing database schema is not sufficient for new functionality. To maintain the integrity of your existing data Sybase and other SQL Servers enable administrators to modify existing tables by adding columns and constraints. SQL Format The basic format for the add column

Code Snippets: Generating a Random Number for Flash ActionScript 3 (AS3)

Generating a random number for use in Flash is a common problem that many developers come across. Luckily the Math object provides static methods to help us perform this basic task.  Found below are two snippets of how to generate a random integer from 0 to a max number or for a range of values.

Code Snippets: How to duplicate an Array in ActionScript 3 (AS3)

Array duplication or copying is actually a very simple task with multiple methods of the Array class returning a new Array. The only drawback is that their is no clone, copy, or duplicate method that would make it obvious to first time users. Instead the Array class has the concat and slice function that can

Obtaining Stock Information: Utilizing AJAX, JSONP, and the YahooFinanceAPI library.

This short tutorial shows how to access Stock Information from Yahoo Finance through an AJAX call utilizing JSONP. For the tutorial the following information is required. JQuery – Javascript library with built in AJAX and JSONP functions YahooFinanceAPI – PHP library that utilizes Yahoo Finance to return stock information from an underlying call to download.finance.yahoo.com/d/qutoes.csv

JSON and JSONP: An Introduction to Javascript Data Interchange

JavaScript Object Notation or JSON for short is a data interchange format commonly used in AJAX Web Applications. The format is human readable and can represent simple data structures and Objects by use of associative arrays. Syntax Formatting The JSON format is lightweight in that the properties of the JSON Data Object are encoded by 

YahooFinanceAPI – A PHP Library for obtaining stock quote information from Yahoo Finance

YahooFinanceAPI is an open source php library for interacting with the Yahoo Finance Stock API. For those of you unfamiliar with Yahoo’s Stock API please review my previous post Yahoo Finance Stock API. This library contains an easy interface for obtaining information on one or more stocks. For a quick demo of the library feel

Sybase Transact-SQL: Utilizing the GROUP BY and HAVING clause

What is the GROUP BY Clause? The GROUP BY clause of T-SQL is used to divide the results returned into groups.  This technique is often utilized to obtain aggregate information from the table as in the number of users you have from each state or number of books an author has written. In addition you