Change the HTML of ExtJS Panel
Posted in ExtJS with tags application development, Coding, ExtJS, internet explorer, JavaScript, programming, web development on March 10, 2010 by JoeyDownload the Java Virtual Machine (JVM)
Posted in Java with tags Java, programming, web development, application development, Coding, JRE, jvm on March 9, 2010 by JoeyThe Java Virtual Machine, also known by the initialism JVM, is the same thing as the Java Runtime Environment (JRE). Instructions for installing the JRE can be found here.
The JVM translates Java bytecode into code that can be understood by the platform on which the code is running. The bytecode that the JVM translates is typically generated from programs written in Java, although other programming languages can also be used to generate the Java bytecode for the JVM. The JVM executes compiled .class or .jar files.
When a JRE instance is created it runs as the JVM so these initialisms can be used interchangably.
Reading JSON Data with ExtJS
Posted in ExtJS with tags application development, Coding, ExtJS, JavaScript, programming, web development on March 8, 2010 by JoeyExtJS provides the decode() function to make reading JSON data easy.
For example, take the following JSON packet:
{“results”:1,”rows”:[{"PaintingName":"Fran"}]}
This JSON can be read as follows:
var paintingJSON = Ext.util.JSON.decode(responseObject.responseText.trim());
var paintingName = paintingJSON.rows[0].PaintingName;
console.log(paintingName);
Install the Java Runtime Enviroment (JRE)
Posted in Java with tags Java, JRE on March 6, 2010 by JoeyThe Java Runtime Environment (JRE) can be installed on your computer by following these steps:
- Go to http://www.java.com/en/download/manual.jsp
- Click on the link that is relevant to your computer setup (Windows, Linux, etc.)
- A popup dialog will appear. Click “Save File”
- The file will download to your computer. When it has completely download, open it.
- Click “Run” and follow the instructions.
- To verify that the install was successful, open a command prompt and type “java -version” or
Firebug console.log
Posted in JavaScript with tags programming, internet, web development, application development, JavaScript, Coding, firefox, internet explorer on March 5, 2010 by JoeyOccasionally I still run into developers who debug JavaScript by using series of alert statements. This is absolutely the most inefficient method of debugging JavaScript. If variable output and detection is needed, it is far better to use Firefox with Firebug and to use console.log, instead of alert.
For example, instead of:
alert(myVar);
Use:
console.log(myVar);
console.log is especially useful if you need to output a series of variables, such as in a loop. With console.log, all the variables are output at once, whereas with alert, you have to click the pesky “OK” button for each variable that is output.
Setting Up a Java Environment Variable
Posted in Java with tags environment variables, Java, java setup on March 4, 2010 by JoeyEnvironment variables are used to pass configuration information to applications. To set up a Java environment variable, access the environment variables dialog through the Windows Control Panel.
In Windows XP: Control Panel – System – Advanced Tab – Click on the “Environment Variables” Button
In Windows Vista/7: Control Panel – System and Maintenance – Advanced System Settings – Click on the “Environment Variables” button
Once the dialog has been accessed, in the “System Variables” section, specify a variable name and value. Typical values are listed below:
Variable name: JAVA_HOME
Variable value: c:\Program Files\java\jdk1.6.0_17 (Where Java is installed on your computer)
How to Fire the onFocus Event of the ExtJS HtmlEditor
Posted in ExtJS with tags Coding, ExtJS, JavaScript, programming on March 3, 2010 by JoeyHow to Tell Which Version of Java is Running on Your Machine
Posted in Java with tags application development, internet, Java, programming, web development on February 27, 2010 by JoeyTo tell which version of Java is running on your machine open the command window and at the prompt type the following:
java -version
Creating Constraints in Oracle
Posted in Oracle, SQL, pl/sql, programming with tags constraints, Database, Oracle on August 11, 2008 by JoeyConstraints define conditions about a database that must remain true. They are used to ensure data integrity. Commonly used constraints are primary key constraints, foreign key constraints, and unique constraints. Constraints are also used to enforce non-null column values.
A constraint is typically defined as part of the table definition as is created using something similar to the following syntax:
CREATE TABLE ORDERS (
ORDER_ID NUMBER(7) NOT NULL,
PRODUCT_ID NUMBER(7) NOT NULL,
PRODUCT_NAME VARCHAR2(100) NOT NULL,
CONSTRAINT ORDER_ID_PK
PRIMARY KEY(ORDER_ID),
CONSTRAINT PRODUCTS_PRODUCT_ID_FK
FOREIGN KEY(PRODUCT_ID)
REFERENCES PRODUCTS(PRODUCT_ID)
)
The preceding table definition creates two constraints: one for the primary key on the ORDER_ID column; and one for the PRODUCT_ID column foreign key.
Constraints can also be created on a table using the ALTER TABLE syntax, as follows:
ALTER TABLE ORDERS
ADD CONSTRAINT PRODUCTS_PRODUCT_ID_FK
FOREIGN KEY(PRODUCT_ID)
REFERENCES PRODUCTS(PRODUCT_ID)
Oracle varchar2 Data Type
Posted in Oracle, pl/sql on August 5, 2008 by Joey
The Oracle varchar2 data type allows for the storage of up to 4000 bytes of character data. It can be defined for a column as follows:
MyColumn varchar2(100) DEFAULT ‘MyString’ NOT NULL;
Note that the varchar data type is now deprecated in Oracle as it’s usage has become a synonym for varchar2, although this may change in future versions.

