Practical Web Programming

Wednesday, October 31, 2007

Waiting for Adsense Payment

Yesterday, my Adsense earning have passed the 100 dollar mark (today it's $103.24). This means that it will be days from now and I will have my third Adsense check. Good thing that I can now get your earnings through Western Union. It's much faster than the regular mailed check.

Looking back at my previous Adsense earnings, it took me eight months before I received my first check and six months after that my second check. This third 100 dollar mark only took me three months to surpassed. This means that my earning is improving. Although my goal to make 10 dollars per day this year is slowly slipping, I still have two months to do it. Who knows next year I might get lucky.

My regular earner is a blog (not this one) and a website. I will not enumerate those two regular earners this time, maybe next.

Tuesday, October 30, 2007

Western Union Adsense Payout

Good news to Adsense publishers. You can now utilize the ease of Western Union Quick cash system.

Adsense publisher can now receive their Adsense revenue through Western Union. This service is only available, as of this writing, to publishers from the following countries: Argentina, Chile, China (Mainland), Colombia, Malaysia, Pakistan, Peru, the Philippines, and Romania. I'm sure they will broaden the country coverage in the days to come.

To receive your earnings by Western Union Quick Cash, here are the steps:

1. Sign in to your account at www.google.com/adsense.
2. Visit the My Account tab.
3. Click the ‘edit’ link adjacent to the ‘Payment Details’ header.
4. Select the Western Union Quick Cash radio button.
5. Click ‘Continue’.
6. Click ‘Save Changes’ to save your payment type.

Just make sure that the name on your account exactly matches that on the government issued ID card that you will bring to pick up your Western Union Quick Cash payments.

Monday, October 29, 2007

Stay Hungry. Stay Foolish.

This is one of the best inspirational text I've ever read. It makes me think of my current job. Is it well enough for me? I am happy with where I am now? Should I stay with the company?

The text I am referring to is the Commencement Address of Steve Job to graduates in a university in 2005. It made a big impact in me specially so that Steve Job is in the IT industry also (I'm a computer programmer and he's one of the founder of Apple).

I recommend reading this to everyone. Here the link: 'You've got to find what you love,' Jobs says.

Sunday, October 28, 2007

Disclosure Policy

This policy is valid from 29 October 2007

This blog is a personal blog written and edited by me. This blog accepts forms of cash advertising, sponsorship, paid insertions or other forms of compensation.

The compensation received will never influence the content, topics or posts made in this blog. All advertising is in the form of advertisements generated by a third party ad network. Those advertisements will be identified as paid advertisements.

The owner(s) of this blog is compensated to provide opinion on products, services, websites and various other topics. Even though the owner(s) of this blog receives compensation for our posts or advertisements, I always give my honest opinions, findings, beliefs, or experiences on those topics or products. The views and opinions expressed on this blog are purely mine. Any product claim, statistic, quote or other representation about a product or service should be verified with the manufacturer, provider or party in question.

This blog does contain content which might present a conflict of interest. This content may not will always be identified.

My PageRank Increased

Today I visited two of my blogs, this blog and my funny jokes and amusing stories, and noticed something very much significant for a website. My PageRank increased. This blog goes from 0 to 2 pagerank, while my funny jokes and amusing stories blog went to 4 from a long time 3.

For many who don't know, PageRank is very important for a website if you are just relying in the search engine, like Google, Yahho, MSN and etc., for you website's traffic source. It helps you get high rank in the SERP (Search Engine Result Page) - it's the results when you search for something in search engines.

Imagine if your website is always in the number #1 spot of a highly search word or phrases (ie: 'recipe') in search engines, you will get literally thousands or even millions of visitors per day. Which means, more visitors, more money in advertising revenue.

Saturday, October 27, 2007

Free Online Recipe Gadget

Yesterday, I uploaded my very first Google gadget, the Free Online Recipe gadget. Google Gadgets are mini-applications that work with iGoogle, Google Desktop, or any page on the web. They can range from simple HTML to complex applications, and can be a calendar, a weather globe, a media player, or anything else you can dream up.You can go to this link to know more about it.

My gadget displays free recipes from my Free Online Recipe Collections website. You can add this gadget to your websites or blogs, and best of all, you can customize it's appearance to fit your website's or blog's theme.


Screenshot

You can get the Free Online Recipe gadget below:
1) For blogs or website click here.
2) For iGoogle click here.

Tuesday, October 23, 2007

Should You Quit Your Job?

Should you quit your job? Maybe this simple test can help you decide. (^_^)

Here's my result, what's yours?

Your Job Dissatisfaction Level is 39%

Your job is not bad, but it's probably not a long term thing.
You're just not happy enough to stick around for too long...
And there's little that can change how you feel.
Start looking around for other options, but only quit for something really good!

How To Connect To A Database In Java

This source codes, written in Java, demonstrates how to connect to a database using JDBC and ODBC. The source codes is well commented for you to follow easily.

import java.sql.*;

public class jdbcConnect {
//CLASS CONSTRUCTOR
public jdbcConnect() {
}

//THIS PROC WILL SET THE CONNECTION TO THE DATABASE,
//QUERY AND PRINT THE RESULT TO THE STANDARD OUTPUT
private void loadData()
{
Connection con = null;
Statement stmt = null;
ResultSet rst = null;

//SET ERROR TRAP FOR CONNECTION TO THE DATABASE
try
{
//FOR ODBC CONNECTION
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
//dsn_employee = data source name(dsn)
//un = username
//pw = password
con = DriverManager.getConnection("jdbc:odbc:dsn_employee;
UID=un;PWD=pw");

//CHECK IF THE CONNECTION TO THE DATABASE IS SUCCESSFUL
if(!con.isClosed())
{
//MAKE THE ACTUAL CONNECTION TO THE DATABASE
stmt = con.createStatement(rst.TYPE_SCROLL_SENSITIVE,
rst.CONCUR_READ_ONLY);
//EXECUTE THE SQL QUERY
rst = stmt.executeQuery("SELECT fullname FROM employee");

//CHECK IF CURRENT ROW IS THE LAST
while(!rst.isLast())
{
//SET THE ERROR TRAP FOR READING THE RECORDSET
try
{
//GO TO THE NEXT RECORD OF THE RECORDSET
rst.next();
//PRINT THE RECORD TO THE STANDARD OUTPUT
System.out.println(rst.getInt("fullname"));
}
//HANDLE TRAPPED ERROR ON READING THE RECORDSET
catch(Exception e)
{
//PRINT THE ERROR MESSAGE
System.out.println("ERROR: " + e.getMessage());
}
}
}
}
//HANDLE TRAPPED ERROR ON DATABASE CONNECTION
catch(Exception e)
{
//PRINT THE ERROR MESSAGE
System.err.println("ERROR: " + e.getMessage());
}
finally
{
try
{
if(con != null)
{
//CLOSE THE CONNECTION
con.close();
}
}
catch(SQLException e)
{
//PRINT THE ERROR MESSAGE
System.out.println("ERROR: " + e.getMessage());
}
}
}

//START OF PROGRAM
public static void main(String[] args) {
jdbcConnect dbConnect = new jdbcConnect();
dbConnect.loadData();
}
}

Monday, October 22, 2007

How to Connect to an Oracle Database in Visual Basic

This is ready to use function written in Visual Basic 6. This function will connect to an oracle database. See the sourcecodes below.

'Procedure: ConnectOracle
'Language: Visual Basic 6
'Parameter: strUN = username,
' strPW = password,
' strHost = host string
'Purpose: This procedure will connect to a Oracle database
'Usage: Call ConnectOracle("scott", "tiger", "oradb")

Public Sub ConnectOracle(strUN As String, _
strPW As String, _
strHost As String)
Dim Conn = New ADODB.Connection
Conn.Open "Provider=OraOLEDB.Oracle.1;" & _
"Persist Security Info=False;" & _
"User ID='" & strUN & "';" & _
"Data Source='" & strHost & "';" & _
"Password= '" & strPW & "'"
End Sub

Tuesday, October 16, 2007

No Right-Click Script

Forget long Javascript codes that disables the right-click or the context menu in your webspage. Here's a simple script that you can use to disable the right-click or the context menu in you website.

oncontextmenu="return false;

Add the Javascript codes above in the opening <body> tag of your webpage. See the example below.

<body oncontextmenu="return false;">
Put you contents here...
</body>

Take note that some browser ignores it. An example is the Opera browser, which ignores all of the no right click scripts including the no right-click script above. Likewise, it will not prevent the user from seeing your webpage's sourcecodes by using the View>Page Source or View>Source menu.

My advise is to test the script with your target users browser or with major browser around.

Wednesday, October 10, 2007

Pinoy Transformers

Move away Captain Barbel and Darna, here comes the new breed of Pinoy heroes. The Pinoy Transformers.


Monday, October 08, 2007

How Change Your Website's Shortcut Icon

One way to personalize you website is change it's shortcut icon. And doing it is very easy. All you have to do is put the following HTML code in the <HEAD> section of every page of your website:

<link rel="shortcut icon" href="http://img.cooks.com/favicon.ico" />


Just change the <b>href</b> attribute value with the URL of the icon you intend to use. See the complete example below:

<html>
<head>
<title>Shortcut Icon</title>
<link rel="shortcut icon" href="http://img.cooks.com/favicon.ico" />
</head>
<body>
Put body text here...
</body>
</html>

Will To Win: Pacqiuao Upsets Barrera

Yesterday, the Philippines literally stopped to watch Will To Win: Pacqiuao vs Barrera 2. I was one of them (^_^).

Pacquiao upsets Barrera in the fight which lasted 12 rounds via a unanimous decision. Although I was a little bit disappointed because I was expecting a knockout that didn't happen, still I was happy that Pacquiao won the fight. One more Mexican left to demolish, Juan Manuel Marques. I hope Pacquiao finishes him like what he did to Morales and Barrera. (^_^)

During the Fight
Post Fight

Friday, October 05, 2007

Will To Win: Pacqiuao vs Barrera 2


Pacquiao versus Barrera 2 will be aired tomorrow on GMA tv. I'm already excited. I miss seeing Pacquiao fighting. It has been months since I his last fight and I'm sure I share this feelings to all Filipinos and boxing fans around the world.

Tomorrow, Filipinos will unite again. They'll be less traffic congestions and low crime rate. The Philippines will come to a halt literally. Since I'm alone at home, no one will urge me to change the channel. The last fight of Pacquiao (Pacquiao and Morales III), I was really pissed off because my sister and niece told me ahead that Pacquiao won the match. Now, I'll be cautious. No cellphone, no telephone and no changing of channel. (^_^)


















Manny Pacquiao | WBC Int'l Super Featherweight Champion | W 44 (35 ko's)  |  L 3  |  D 2  | Total 48 Marco Antonio Barrera | Former WBC Featherweight Champion | W 63 (42 ko's) | L 5 | D 0 | Total 68
Sex:MaleMale
Nationality:FilipinoMexican
Alias:PacManBaby Faced Assassin
Birth Name:Emmanuel D. PacquiaoMarco Antonio Barrera Tapia
Hometown:General Santos City, PhilippinesGuadalajara, JA, Mexico
Birthplace:Bukidnon, PhilippinesMexico City, DIF, Mexico
Rated at:Super FeatherweightSuper featherweight
World Rank:1 / 9473 / 947
Date of Birth: 1978-12-171974-01-17
Age:2833
Reach:67"70"
Stance:SouthpawOrthodox
Height:5'6"½5'6"


Weigh in

Monday, October 01, 2007

Unwinding in the Paradise Island

Yesterday, three of my officemates and I went to Paradise Island, one of many beach in the Island Garden City of Samal (IGACOS), to unwind and get away from the busy city of Davao.

We departed at six in the morning and went back home at around one in the afternoon. It was my second time in the place. The resort was nice, clean seawater, white sand and good amenities.

Going to Paradise
Food for Brunch
Beach Area
Boarding for Home
On the Boat to Home
On the Car to Home

More pictures here

Recent Post