How to strikethrough text in Excel

To strikethrough cells in Excel, do the following:

1. select the cells
2. Select Format > Cells
3. Click on the Font tab
4. Click on strikethrough


XML Protocols

RSS, XML-RPC, and SOAP are XML protocols. They define machine-to-machine exchange of information will take place across the Internet over HTTP. RSS is based on RDF.


XML Applications

An XML application is a specific XML vocabulary that contains particular elements and attributes.


Accessing last element in a PHP array

Since PHP array are indexed from 0, the last element at any given time has the index count of array minus one. Following is a code example:

// accessing last element in an array


Adding current date to query

In DB2, CURRENT DATE gets the date from the server's clock at the time the query is run. It also us to use the current date in a query. Example:


Changing font size in Eclipse

To change the font size on eclipse temporarily, simply use ctrl++ and ctrl--. If you wish to change is permanently, do the following:

1. select Window > Preferences


PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings.

If a default timezone is not set in your php.ini, then you get the following warning:


is_dir not working

The is_dir() function in PHP allows users to check whether a file is a directory. It returns true if the file is a directory.


Step Into, Step Over, and Step Out

Step into, step over, and step out are debugging options. A debugger allows programmers to step through code i.e. execute code line by line and see the contents of memory at each step.


Websphere: profile path length exceeds the maximum allowed length

If you get the following error message:

*** Creating the application server profile...
The following validation errors were present with the command line arguments:


Checking for empty cell in Excel

Following formula can be used to check for empty cells and then do something based on the return.

=if(A1 = "", 0, 1)

If the cell A1 is empty, print 0 else print 1.


Converting primitive wrapper objects to String

The following example shows how to convert objects of primitive wrapper classes to String.

public class PrimitiveWrapperToString {
	
	public static void main(String[] args) {
          
  

DB2 substring

DB2 provides a substr function for substrings. It takes three parameters. The first is the column name. The second is the index of the character. Note that DB2 index begins with 1, not 0.


Removing enclosing quotes in Java

The following code would remove enclosing quotes from Java Strings

s = s.replaceAll("(^\")|(\"$)","");


Escaping single quotes in DB2

Unlike most programming languages and database management systems, DB2 does not use the backslash to escape a quote. Instead, replace a single quote with two single quote to escape.