It's been a while since the we had welcome 2010 last January 1 2010. And now here we go again, welcoming the Year that is about to come, the 2011. Last year many promises were made and as the year ends they were just proven to be broken. Isn't it real? People make promises just to break it. It made the majority of us to believe that promises are just made just to be broken. On the other hand some people making promises before somebody forces them to make it. So those people took a hard time to fulfill their promises and as expected, the promises that they made was broken also.
For this year to come, may all of us be filled with blessings coming from up above. And may all of us not break their so called, "New Year's Resolution".
Happy new year everyone. Have a great year. Thank you and God Bless. :-)
Friday, December 31, 2010
Wednesday, December 29, 2010
For the newbie programmers.
I heard someone saying to a student programmer who is better than him, "If only i got a PC in my house, maybe i can create programs that he can do." You know what? it is not bad to have a thinking like that. In Fact, it can be your ladder for you to grow up in the Field of Computer Programming. But sometimes the others just using their situations that they have no own PC at home as an escape goat for them not to do their programming assignments, activities and etc. Wait before you think like that, have you ever asked to yourself, Is there anyone who forced me to take this course? Or, is there somebody forces me to get into this course? if there is, then stop. your not for this course.You know programming is for those who have patience to learn the things they didn't fully knew. And For those who are willing to learn new things. Besides knowledge cannot be found by just looking up on the sky. To achieve it, we need to try our best. No one has the right to say, "If only i got a PC in my house, maybe i can create programs that as he can do." Because as Mr. Rico Blanco said in his song, "Kung ayaw may dahilan, Kung gusto maraming paraan." If you have no PC then look for some alternatives. And if you have no internet connections, then goto your school's library or buy a book. You see there are plenty of resources to learn. There's no reason to always copy to someone's work and pretend that you are the one who done that. If you are doing that then you are not wise as think. You are just playing trick to yourself.
"It is ok to cheat, but be sure its worthy. A good programmer cheats. The great programmer studies what he cheats."
"It is ok to cheat, but be sure its worthy. A good programmer cheats. The great programmer studies what he cheats."
Hello world in C Programming
Hello guyz! This time i'm gonna show you the basic in C.
I'm gonna show you the Popular "hello world" in C.
To make the long story short, Let's go immediately to the main point.
In this tutorial were gonna display something. To do that we need to include the Library call Standard Input/Output. To do that, we're going to type this on the most upper part.
#include<stdio.h>
Ok., letz move on in making the Body
#include<stdio.h>
main()
{
clrscr();
printf("Hello world");
getch();
}
maybe you're wondering where are getch() and clrscr() for.
getch() is for us to see the program we did. It slows down the Process of the program to display.
clrscr() is for clearing the screen.
The output would be. like this.
Hello World
//===========================
Ok thanks for reading...
I'm gonna show you the Popular "hello world" in C.
To make the long story short, Let's go immediately to the main point.
In this tutorial were gonna display something. To do that we need to include the Library call Standard Input/Output. To do that, we're going to type this on the most upper part.
#include<stdio.h>
Ok., letz move on in making the Body
#include<stdio.h>
main()
{
clrscr();
printf("Hello world");
getch();
}
maybe you're wondering where are getch() and clrscr() for.
getch() is for us to see the program we did. It slows down the Process of the program to display.
clrscr() is for clearing the screen.
The output would be. like this.
Hello World
//===========================
Ok thanks for reading...
Bored!!!
All day long i've been using my computer, searching for whatever i might think. how to do an email server in PHP. And how to shutdown other PC form my PC in a network where I am connected. I've been searching continuously, with an expectation in my mind that in any minute i would find the solutions that would satisfy the things that i am thinking. But i found myself wrong in a sense that even i found the things that i need, i am still not satisfied. i am wondering why. I can't figured out how to satisfy my ownself.
One time on that day, i sat down and think, away from my PC. One thing came to my mind. I feel like this because i myself was gone far away from the real me. So i've come to a conclusion that i need to go back to where i might be. I need to be me again.. i need to get back to where i really belong. To my childhood. I really missed my childhood a lot. Very much...
<<Crying!!!>>
One time on that day, i sat down and think, away from my PC. One thing came to my mind. I feel like this because i myself was gone far away from the real me. So i've come to a conclusion that i need to go back to where i might be. I need to be me again.. i need to get back to where i really belong. To my childhood. I really missed my childhood a lot. Very much...
<<Crying!!!>>
Monday, December 27, 2010
How connect MS Access database with VB6.0 Using ADODB
Hello everyone!
Here is my technique on how to connect MS Access database with VB6.0 using ADODB.
Ok.
I assume that you already know the basics of vb6.
Note: This is not a full tutorial about connecting MS Access database with VB6.0 using ADODB. I will only show my personal technique on how i do this.
Ok.. Here it is,,
The first thing i do is this.
In you VB6 IDE, On the Menu bar Click on "Project>References" then put a check on the "Microsoft ActiveX Data Object 2.0 Library". Without this you cannot access the ADODB. So, for us to use the ADODB we must check this.
Ok after checking.
Firstly, we must declare a connection.
(In this case we are going to declare an objects which are accessible only in a form. So we are going to use "Dim")
Do this:
'Type this on the top of the Coding Area of your form
Dim cn as new ADODB.Connection 'This is for the connection
Dim rs as new ADODB.Connection 'This is for the recordset that we are going to use
'-----
Let say we have a database named mydb.mdb. And inside our db, we have a table named sampledata.
'put this to the Private Sub Form_Load()
Private Sub Form_Load()
on error goto ErrorHandler
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source = " & App.Path & "\mydb.mdb;"
rs. Open "Select * From sampledata", cn, adopenstatic, adlockoptimistic
if rs.Eof = true then
msgbox "Table has no content."
else
msgbox "Table has contents."
end if
set rs = nothing
set cn = nothing
exit sub
ErrorHandler:
msgbox Err.Description
End Sub
'Note: we have to put our database inside the directory where our project is located.
'The program will display a msgbox saying "Table has no content" or "Table has contents" if it is connected and the table exists. But if the connection is incorrect and the table does not exists, there will be a msgbox saying the error description.
Ok that's how i connect access database with vb6.0 using adodb.
Thank you.
Here is my technique on how to connect MS Access database with VB6.0 using ADODB.
Ok.
I assume that you already know the basics of vb6.
Note: This is not a full tutorial about connecting MS Access database with VB6.0 using ADODB. I will only show my personal technique on how i do this.
Ok.. Here it is,,
The first thing i do is this.
In you VB6 IDE, On the Menu bar Click on "Project>References" then put a check on the "Microsoft ActiveX Data Object 2.0 Library". Without this you cannot access the ADODB. So, for us to use the ADODB we must check this.
Ok after checking.
Firstly, we must declare a connection.
(In this case we are going to declare an objects which are accessible only in a form. So we are going to use "Dim")
Do this:
'Type this on the top of the Coding Area of your form
Dim cn as new ADODB.Connection 'This is for the connection
Dim rs as new ADODB.Connection 'This is for the recordset that we are going to use
'-----
Let say we have a database named mydb.mdb. And inside our db, we have a table named sampledata.
'put this to the Private Sub Form_Load()
Private Sub Form_Load()
on error goto ErrorHandler
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source = " & App.Path & "\mydb.mdb;"
rs. Open "Select * From sampledata", cn, adopenstatic, adlockoptimistic
if rs.Eof = true then
msgbox "Table has no content."
else
msgbox "Table has contents."
end if
set rs = nothing
set cn = nothing
exit sub
ErrorHandler:
msgbox Err.Description
End Sub
'Note: we have to put our database inside the directory where our project is located.
'The program will display a msgbox saying "Table has no content" or "Table has contents" if it is connected and the table exists. But if the connection is incorrect and the table does not exists, there will be a msgbox saying the error description.
Ok that's how i connect access database with vb6.0 using adodb.
Thank you.
Hello World in PHP.
A php(Hypertext Processor) is a server-side Programming Language. Meaning, any program made in PHP can only run in a server machine. So, first thing you need to do is to have a server computer. Sounds hard right. But it is not. Now a days, there were several applications that can be used to make your computer a server computer. XAMPP and WAMP are some of those.
Ok, let's move on.
- in this case, i'm gonna choose xampp. if you are using linux you may use wampp..
(well anyway, you can use any of the two. But in my case i'm gonna choose xampp)
To download XAMPP Go to this link.
- http://www.apachefriends.org/en/xampp-windows.html
And here is how to install it.
- http://www.apachefriends.org/en/xampp-windows.html#522
Ok.,, Assuming that you hve already installed the xampp.
(A Brief info about xampp: It has already have PHP, and MySQL and Apache. In our case, in this tutorial, we just need the Apache.)
Open xampp and then activate the PHP and Apache.
Ok. when the XAMPP is installed. Goto to this directory on your disk drive
c:\xampp\htdocs\
-And then create a text file and name it myphpbasic and then save it as .PHP
and then once you have already created it.
open it through notepad.
and then type the following code.
<?php
echo "Hello world!";
?>
and then open a web browser (firefox, opera, or google chrome)
and on the address bar, type this: http://localhost/myphpbasic.php
And you'll see the output.
//=================================
Sample Ouput:
Hello world!
//=================================
Thank you folks.
Hope you enjoyed reading my tutorial.
Ok, let's move on.
- in this case, i'm gonna choose xampp. if you are using linux you may use wampp..
(well anyway, you can use any of the two. But in my case i'm gonna choose xampp)
To download XAMPP Go to this link.
- http://www.apachefriends.org/en/xampp-windows.html
And here is how to install it.
- http://www.apachefriends.org/en/xampp-windows.html#522
Ok.,, Assuming that you hve already installed the xampp.
(A Brief info about xampp: It has already have PHP, and MySQL and Apache. In our case, in this tutorial, we just need the Apache.)
Open xampp and then activate the PHP and Apache.
Ok. when the XAMPP is installed. Goto to this directory on your disk drive
c:\xampp\htdocs\
-And then create a text file and name it myphpbasic and then save it as .PHP
and then once you have already created it.
open it through notepad.
and then type the following code.
<?php
echo "Hello world!";
?>
and then open a web browser (firefox, opera, or google chrome)
and on the address bar, type this: http://localhost/myphpbasic.php
And you'll see the output.
//=================================
Sample Ouput:
Hello world!
//=================================
Thank you folks.
Hope you enjoyed reading my tutorial.
Friday, December 24, 2010
How to do a simple calculator in Java.
Hello guys, here is my tutorial on how to do a simple calculator in Java.
in this tutorial i assume that you already have a Jcreator pro a the JDK.
How to get those item(It was mentioned in my first Java Tutorial the Basic Hello world.)
Ok let's start.
First and foremost i'm gonna show you how to do simple addition in Java.
We'll gonna our file "MySimpleCalculator".
First thing we need to do is to access the object called Scanner by importing the Library called java.util.Scanner, because we will let the user to input two numbers.
And of course in calculator, we all know that in a basic calculator there were 4 operations. Those were Addition, Subtraction, Multiplication, and Division.
//-----------------------------------------------
import java.util.Scanner;
public class MySimpleCalculator
{
public static void main(String[]args)
{
Scanner input = new Scanner(System.in);
int ChooseOperation = 0, num1 = 0, num2 = 0;
System.out.print("Please choose operation \n[1] Addition\n[2] Subtraction\n[3] Multiplication\n[4] Division\nEnter your Choice: ");
ChooseOperation = input.nextInt();
if(ChooseOperation == 1)
{
System.out.print("Enter number 1: ");
num1 = input.nextInt();
System.out.print("Enter number 2: ");
num2 = input.nextInt();
System.out.print("The Sum is " + (num1 + num2));
}
else if(ChooseOperation == 2)
{
System.out.print("Enter number 1: ");
num1 = input.nextInt();
System.out.print("Enter number 2: ");
num2 = input.nextInt();
System.out.print("The Difference is " + (num1 - num2));
}
else if(ChooseOperation == 3)
{
System.out.print("Enter number 1: ");
num1 = input.nextInt();
System.out.print("Enter number 2: ");
num2 = input.nextInt();
System.out.print("The Product is " + (num1 * num2));
}
else if(ChooseOperation == 4)
{
System.out.print("Enter number 1: ");
num1 = input.nextInt();
System.out.print("Enter number 2: ");
num2 = input.nextInt();
System.out.print("The Quotient is " + (num1 / num2));
}
else
{
System.out.print("Invalid Choice!");
}
}
}
//------------------------------------------
The output would be:
Please choose operation
[1] Addition
[2] Subtraction
[3] Multiplication
[4] Division
Enter your Choice: 1
Enter number 1: 10
Enter number 2: 10
The Sum is 20
//------------------------------------------
Ok.. That's it for this time..
Hope this would help you..
thanks...
in this tutorial i assume that you already have a Jcreator pro a the JDK.
How to get those item(It was mentioned in my first Java Tutorial the Basic Hello world.)
Ok let's start.
First and foremost i'm gonna show you how to do simple addition in Java.
We'll gonna our file "MySimpleCalculator".
First thing we need to do is to access the object called Scanner by importing the Library called java.util.Scanner, because we will let the user to input two numbers.
And of course in calculator, we all know that in a basic calculator there were 4 operations. Those were Addition, Subtraction, Multiplication, and Division.
//-----------------------------------------------
import java.util.Scanner;
public class MySimpleCalculator
{
public static void main(String[]args)
{
Scanner input = new Scanner(System.in);
int ChooseOperation = 0, num1 = 0, num2 = 0;
System.out.print("Please choose operation \n[1] Addition\n[2] Subtraction\n[3] Multiplication\n[4] Division\nEnter your Choice: ");
ChooseOperation = input.nextInt();
if(ChooseOperation == 1)
{
System.out.print("Enter number 1: ");
num1 = input.nextInt();
System.out.print("Enter number 2: ");
num2 = input.nextInt();
System.out.print("The Sum is " + (num1 + num2));
}
else if(ChooseOperation == 2)
{
System.out.print("Enter number 1: ");
num1 = input.nextInt();
System.out.print("Enter number 2: ");
num2 = input.nextInt();
System.out.print("The Difference is " + (num1 - num2));
}
else if(ChooseOperation == 3)
{
System.out.print("Enter number 1: ");
num1 = input.nextInt();
System.out.print("Enter number 2: ");
num2 = input.nextInt();
System.out.print("The Product is " + (num1 * num2));
}
else if(ChooseOperation == 4)
{
System.out.print("Enter number 1: ");
num1 = input.nextInt();
System.out.print("Enter number 2: ");
num2 = input.nextInt();
System.out.print("The Quotient is " + (num1 / num2));
}
else
{
System.out.print("Invalid Choice!");
}
}
}
//------------------------------------------
The output would be:
Please choose operation
[1] Addition
[2] Subtraction
[3] Multiplication
[4] Division
Enter your Choice: 1
Enter number 1: 10
Enter number 2: 10
The Sum is 20
//------------------------------------------
Ok.. That's it for this time..
Hope this would help you..
thanks...
Wednesday, December 22, 2010
Programming with Java. The Basic "Hello World".
Hi dudes. i'm addressing this tutorial to the newbies in java programming. I'm talking about the one's who are not yet been using java in their entire life.
Alright. If you are new to Java, probably you don't have any compiler yet. First thing you have to do is to have in your machine a jcreator pro and the java jdk.
you can have the latest JDK @ http://java.com/en/
just try to look for it within that site.
and the JCREATOR PRO, you can have it by browsing @ google.com just look for it on google.
Here is how to display a text in Java.
public class sampleDisplayText
{
public static void main(String[]args)
{
System.out.print("Hello World");
}
}
In Jcreator pro, click compile and then click run or press F5 to run
The output would be.
-----------------------
Hello world.
Press any key to continue....
-----------------------
Ok that's it for this time. thanks alot.
any comments would be highly appreciated.
Twisted Mind
Have you ever experience like you've been thinking about something and you never came up to the idea of what you wanted to do. Its quite annoying, right? Like in computer programming when you are doing a program, the main thing that you want the most is to run your program flawlessly. And when you found your codes didn't follow your idea, your mind will be twisted right? And then suddenly, time will come where in you'll be wanting to quit but the challenge of what you are doing forces you to continue what you have started. If you are going to stop, there would be an enemy that would rise against you. Its yourself.
Just go on. Just continue on doing what you want, according to your plans and just wait for the results. Don't be confused of what to do because the more nervous you feel, the less the opportunity to succeed.
So whenever there is something that you want to do, care to pay your full effort on it. And be satisfied on whatever the result might be.
Just go on. Just continue on doing what you want, according to your plans and just wait for the results. Don't be confused of what to do because the more nervous you feel, the less the opportunity to succeed.
So whenever there is something that you want to do, care to pay your full effort on it. And be satisfied on whatever the result might be.
Subscribe to:
Posts (Atom)