Saturday, October 31, 2015

Easy method learning PHP Porgramming



Welcome to my article, in regard to Easy  method learning PHP Porgramming

Here  you are on my first  post about the PHP programming in this site . now , we will discuss a simple program.
I just wanna say "Welcome to Amin Setiawan Lahagu blog!"
Then, open the file in notepad and type the following program:

 <?
    
$ yourname = "Amin Setiawan Lahagu";
    
echo "Welcome $ yourname in my world!" ;
?>

1stexperience.php save the name and place in the folder c: \ apache \ htdocs \ test \
Make sure you have made a test folder in c: \ Apache \ htdocs
 
To run the program above, then steps:
1. Run the service by clicking the Start | Program | PHPTriad/xamp server/wamp | Apache | Start Apache
2. Open Muzzila firefox
3. In the MF Address type //Localhost/test/1stexperience.php
4. See the result is going to be like this?

http://iwasindesa.blogspot.co.id/

Explanation:
1. <? This symbol is an escort writing PHP program
2.?>  End symbol To close the program writing php
3. Program PHP always given .php extension, this is because service of web server will execute the file with ext.
4. $ yourname -> define variables so there is a $ sign yourname
5.; each statement ends with a semicolon command.
6. echo "SENTENCE THAT WANT DISPLAYED" useful for displaying the sentence. Now you notice in appearance Welcome FOLLOW variables: $ yourname displayed contents. So it will display a welcome Amin Setiawan Lahagu in my world!
7. // localhost / test is a test that is in the folder in c: / apache / htdocs. Localhost means the server name that is active, that is your own computer.

Hopefully , be patient for my next article about php programming. click here

Friday, October 30, 2015

Easy and complex material of the Data Type



Easy and complex material of the Data Type

What for we use and exist Data type as example:
BYTE, INTEGER, shortint, REAL, longint, STRING, CHAR, BOOLEAN, WORD.
Well, I hope you all have understand before the reason of limiter data type but for you still do’t know. I wish you happy for my this article.
Below is theReason why need data type:

BYTE: requires 1 byte of memory
INTEGER: requires 2 bytes of memory
SHORINT: requires 1 byte of memory
STRING: requiring how in a message, eg  STRING [10] means size 10 Byte
CHAR: only 1 byte
BOOLEAN: only 1 Byte
WORD: 2 Byte
Longint: between 4 to 6 Byte Memory
REAL: between 6-10 bytes

Then example:
Salary: = 5000000;
1st Test: = 70;
Total Test: = 'C';
if we implemented data type here with this command:

VAR
Salary: longint;
1st Test: longint;
Total Test: String;
it will require as much memory as 5 + 5 + 255 is 265 bytes

but if we use like below this command:

VAR
Salary: longint;
1st teast: Byte;
Total test: Char;
it will require as much memory as 5 + 1 + 1 that is 6 bytes

Then, can you think of Car Pickup carrying 263 sacks of Rice with 6 sacks Car Pickup carrying rice, which is more fastttttttttttttttttttttttttt Its speed ...
sure, which carries 6 sacks of rice right.
So in conclusion the use of name / data type to help a programmer to create a program to make the program more efficient in need of computer memory and the program will be quickly processed by the computer.

Congratulations for your I implementation, hope it is useful!

chatting with me here