ubuntu comes accompanied android

Linux-based techniques that were previously rumored to make everyday life in mobile cellular phones and items not appearing most likely not last the wind conditions.

Module 2 Practical E-Commerce

STMIK AMIKOM Yogyakarta | Tohir Ismail | 2011 Module 2 Practical E-Commerce PHP-UP 1. CONTROL STRUCTURE a. FOR b. WHILE, DO .. WHILE c. IF, ELSE, ELSE IF d. SWITCH

Kinds of effects Jquery

jQuery is a small JavaScript library that emphasizes open-sourced on the interaction between JavaScript and HTML. This library was released in January 2006 at BarCamp NYC by John Resig and dual licensed under MIT and GPL

Understanding Array

ARRAY is the array variable or a structured type consisting of a number of components that have the same type. An array has a fixed number of components that number. The number of components in an array is shown by an index to distinguish one variable with another variable.

Example Of Making a dynamic PROGRAM

Add the following statement at the top of the code import java.io.BufferedReader; java.io.InputStreamReader import; import java.io.IOException; import java.io.*;

Tampilkan postingan dengan label PHP. Tampilkan semua postingan
Tampilkan postingan dengan label PHP. Tampilkan semua postingan

Sabtu, 07 April 2012

CRUD OPERATION

STMIK AMIKOM Yogyakarta | Tohir Ismail | 2011
PHP & MySQL Cheat Sheet Session I
Practical E-Commerce
CRUD OPERATION


Database Connection
                <? php
                $ server = "localhost";
                $ username = "root";
                $ password = "";
                $ database = "student";
                mysql_connect ($ server, $ username, $ password) or die ("Connection Failed");
                mysql_select_db ($ database) or die ("Can not open database");
                ?>

Add Data
                $ result = mysql_query ("INSERT INTO table (field1, field2) VALUES ('isi1', 'isi2')");
                if (! $ result) {
                echo "Unable to add data";
                }

Reading Form (POST method)
                $ name = $ _POST ['name'];

Read the Get Request
                $ action = $ _GET ['command'];

Data Displays
                $ result = mysql_query ("SELECT * FROM table");
                while ($ data = mysql_fetch_array ($ result)) {
                echo $ data ['name'];
                echo $ data ['subject'];
                }

Update Data
                $ result = mysql_query ("UPDATE table SET field1 = 'isifield1', field2 = 'isifield2' WHERE id =           'idtoupdate'");
                if (! $ result) {
                echo "Failed to convert data";
                }

Remove Data
                $ result = mysql_query ("DELETE FROM table WHERE id = 'idtodelete'");
                if (! $ result) {
                echo "Failed to delete data";
                }


Search for Data
                $ result = mysql_query ("SELECT * FROM table WHERE id = 'idtosearch'");
                if (! $ result) {
                echo "The data sought was not found";
                }
                else {
                while ($ data = mysql_fetch_array ($ result)) {
                echo $ data ['name'];
                echo $ data ['subject'];
                }
                }

Filtering / Paging
                $ result = mysql_query ("SELECT * FROM tabelWHERE id = 'idtosearch' LIMIT 5") / / get the record of 5 beginning of record
                $ result = mysql_query ("SELECT * FROM tabelWHERE id = 'idtosearch' LIMIT 10 15") / / get the 15 record
start record No. 11



source : STMIK AMIKOM YOGYAKARTA

Jumat, 30 Maret 2012

Kinds of effects Jquery

jQuery is a small JavaScript library that emphasizes open-sourced on the interaction between JavaScript and HTML. This library was released in January 2006 at BarCamp NYC by John Resig and dual licensed under MIT and GPL.

                < script src="jquery.min.js" <script type="text/javascript"> </ script>
               
< script src="animasi1.js" <script type="text/javascript"> </ script>
               
< script src="animasi2.js" <script type="text/javascript"> </ script>
               
< script src="animasi3.js" <script type="text/javascript"> </ script>
               
<style type="text/css">
                               
. Amdhas {
                                               
height: 232px; width: 432px; padding: 0; margin: 0; overflow: hidden;
                                               
-Webkit-box-shadow: 2px 2px 4px # 000;
                                               
-Moz-box-shadow: 2px 2px 4px # 000;
                                               
-Moz-border-radius: 10px;
                                               
-Webkit-border-radius: 10px;
                                               
}
                               
. Amdhas img {
                                               
height: 200px; width: 400px; padding: 15px;
                                               
border: 1px solid # ccc;
                                               
background-color: # f8f8ff;
                                               
-Webkit-border-radius: 10px;
                                               
-Moz-border-radius: 10px;
                                               
}
               
</ Style>

<div class="amdhas" id="ke2">
                <img height="200" src=" PICTURE URL HERE " width="400" />
                <img height="200" src=" PICTURE URL HERE " width="400" />
                <img height="200" src=" PICTURE URL HERE " width="400" />
</ Div>

<script type="text/javascript">
PLEASE CHOOSE ONE YOU LIKE THE CODE jquery code HERE THEN INPUT.
</ Script>

1.4.2 jquery drop down image effects
This effect can make a picture like falling down to the code given is:
$ ('# 2nd'). Cycle ({fx: 'scrollDown', speedIn: 2000, speedOut: 500, easeIn: 'bounceout', easeOut: 'backin', delay: -2000});

Jquery 1.4.2 speedin zoom effects, speedout
Jquery effect can make the picture be like the zoom, the code below:
$ ('# 2nd'). Cycle ({fx: 'zoom', speedIn: 2500, speedOut: 500, easeIn: 'bouncein', easeOut: 'easeout', sync: 0, delay: -4000});

Jquery 1.4.2 Slide diagonal
This effect will make the pictures into a slide a diagonal movement, the code that is given is:
$ ('# 2nd'). Cycle ({fx: 'custom', cssBefore: {left: 232, top: -232, display: 'block'}, animIn: {left: 0, top: 0}, animOut: {left: 232, top: 232}, delay: -3000});

Jquery 1.4.2 Slide the effect of vertical and horizontal
Effects of vertical and horizontal mengabungkannya be, please code below:
$ ('# 2nd'). Cycle ({fx: 'custom', sync: 0, cssBefore: {top: 0, left: 360, display: 'block'}, animIn: {left: 0}, animOut: { top: 232}, delay: -1000});

Jquery 1.4.2 opacity and zoom effects
It combines the effects of opacity and zoom, so when the picture disappears then suddenly there is another image that appears with a movement like the zoom. below:
$ ('# 2nd'). Cycle ({fx: 'custom', cssBefore: {left: 115, top: 115, width: 0, height: 0, opacity: 1, zIndex: 1}, animOut: {opacity: 0}, animIn: {left: 0, top: 0, width: 400, height: 200}, cssAfter: {zIndex: 0}, delay: -3000});

Jquery 1.4.2 Effect zoom in, zoom out
Jquery effect of this will make the picture be like the zoom in and zoom out to take turns, to the code are:
$ ('# 2nd'). Cycle ({fx: 'custom', cssBefore: {top: 0, left: 0, width: 0, height: 0, zIndex: 1}, animIn: {width: 400, height: 200}, animOut: {top: 200, left: 200, width: 0, height: 0}, cssAfter: {zIndex: 0}, delay: -1000});

JQuery 1.4.2 effects of jump or shuffle
If this effect is viewed as a frog jump, because these effects can make the picture be like to jump., And replaced with another image. For code that is given is:
$ ('# 2nd'). Cycle ({fx: 'shuffle', shuffle: {top: -280, left: 280}, easing: 'backinout', delay: -2000});

1.4.2 jquery horizontal curtain effect
Jquery effect it can create images like curtain. code:
$ ('# 2nd'). Cycle ({fx: 'curtainX', sync: false, delay: -2000});

JQuery 1.4.2 effects of vertical curtain
Vertical.
$ ('# 2nd'). Cycle ({fx: 'curtainY', sync: false, delay: -2000});

Jquery 1.4.2 covering the effects of image
This effect can make the image as a layered, if the view is not much different from the slide. Code is:
$ (Function () {$ ('# 2nd'). Cycle ({fx: 'cover', delay: -2000, cssBefore: {opacity: 1}, animOut: {opacity: 0}});});

Jquery 1.4.2 diagonal wipe effect
If the effect is like a window that was in the clear / wipe, very interesting if given a lot of pictures in it. Code that is given is:
$ ('# 2nd'). Cycle ('wipe');

1.4.2 jquery horizontal wipe effect
Jquery horizontal wipe effect is not much different from the diagonal only in the given speed, delay and clip. For the code is simple as below.
$ ('# 2nd'). Cycle ({fx: 'wipe', speed: 1000, timeout: 6000, delay: -4000, clip: 'L2R'});

Jquery 1.4.2 clip zoom effect
Effect on the clip and also as shown in the zoom. the code below.
$ ('# 2nd'). Cycle ({fx: 'wipe', speed: 1000, timeout: 6000, clip: 'zoom'});


Reference Code :




Module 2 Practical E-Commerce


STMIK AMIKOM Yogyakarta | Tohir Ismail | 2011
Module 2 Practical E-Commerce

PHP-UP

1. CONTROL STRUCTURE
            a. FOR
            b. WHILE, DO .. WHILE
            c. IF, ELSE, ELSE IF
            d. SWITCH

2. USER FUNCTION

3. INTERNAL FUNCTIONS
            a. STRING PARSING
                        i. Explode, implode
                        ii. Strlen, substr
            b. STRING formating
                        i. Printf, sprintf
                        ii. Str_replace, STR_IREPLACE
                        iii. Htmlentities, html_entity_decode, htmlspecialchars
            c. MATHEMATICS
                        i. ABS, ceil, FLOOR, MAX, MIN, ROUND, RAND, FMOD
            d. DATE & TIME
                        i. DATE & TIME formating
                        ii. OPERATION DATE
            e. Sending MAIL

A. CONTROL STRUCTURE

            1.1. FOR
                        for ($ i = 1; $ i <= 10; $ i + +) {
                        echo $ i;
                        }

            1.2. WHILE
                        $ I = 1;
                        while ($ i <= 10) {
                        echo $ i + +;
                        }

            DO ... WHILE
                        $ I = 0;
                        do {
                        echo $ i;
                        } While ($ i> 0);

            1.3. IF
                        if ($ a> $ b)
                        echo "a is greater than b";

            ELSE
                        if ($ a> $ b) {
                        echo "a is greater than b";
                        Else {}
                        echo "a is not greater than b";
                        }

            ELSE IF
                        if ($ a> $ b) {
                        echo "a is greater than b";
                        } Elseif ($ a == $ b) {
                        echo "a equal to b";
                        Else {}
                        echo "a is smaller than b";
                        }

            1.4. SWITCH
                        switch ($ i) {
                        case 0:
                        echo "i equals 0";
                        break;
                        case 1:
                        echo "i equals 1";
                        break;
                        case 2:
                        echo "i equals 2";
                        break;
                        }
                        switch ($ i) {
                        case "apple":
                        echo "i contents apples";
                        break;
                        case "orange":
                        echo "i it orange";
                        break;
                        case "barked":
                        echo "i it barked";
                        break;
                        }


2. USER FUNCTION
                        function multiply ($ num1, $ num2)
                        {
                        return $ num1 * $ num2;
                        }
                        echo multiplication (3.4) / / output '12 '.
           
3. INTERNAL FUNCTIONS
            3.1. STRING PARSING
            3.1.1. Explode
                        Syntax: array explode (string $ delimiter, string $ string [, int $ limit])
                        Example:
                                    $ Yogyakarta = "Yogyakarta, Sleman, Bantul, South Mountain,                                                      Kulonprogo";
                                    $ District = explode (",", $ Yogyakarta);
                                    echo $ district [0]; / / Yogyakarta
                                    echo $ district [3]; / / Gunungkidul

                        Implode
                                    Syntax: string implode (string $ glue, array $ pieces)
                        Example:
                                    $ Array = array ('module', 'Practice', 'E-Commerce');
                                    $ Join = implode ("-", $ array);
                                    echo $ join; / / module-Lab-E-Commerce


            3.1.2. Strlen
                                    Syntax: int strlen (string $ string)
                        Example:
                                    $ Str = 'E-Commerce';
                                    echo strlen ($ str) / / 10

            SUBSTR
                                    Syntax: string substr (string $ string, int $ start [, int $ length])
                        Example:
                                    $ Rest = substr ("abcdef", -1); / / result: "f"
                                    $ Rest = substr ('abcdef', -2); / / result: "ef"
                                    $ Rest = substr ("abcdef", -3, 1); / / result: "d"
                                    $ Rest = substr ("abcdef", 0, -1); / / result: "abcde"
                                    $ Rest = substr ("abcdef", 2, -1); / / result: "CDE"
                                    $ Rest = substr ("abcdef", 4, -4); / / result: ""
                                    $ Rest = substr ("abcdef", -3, -1); / / result: "de"

            3.2. STRING formating

            3.2.1. Printf, sprintf
                        Example 1:
                                    $ Number = 12345;
                                    $ Tulisan1 = 'PHP';
                                    $ Tulisan2 = 'E-Commerce';
                                    $ Format = '% s Learning to learn% s lucky number
                                    % D ';
                                    printf ($ format, $ tulisan1, $ tulisan2, $ number);

                        Example 2:
                                    <? Php
                                    $ S = 'amikom';
                                    $ T = 'amikom student';
                                    printf ("[% s] \ n", $ s); / / output common
                                    printf ("[% 15s] \ n", $ s); / / 15 characters with spaces flush right
                                    printf ("[%-15s] \ n", $ s); / / 15 characters with spaces left flat
                                    printf ("[% 015s] \ n", $ s); / / 15 characters padding 0
                                    printf ("[% '# 15s] \ n", $ s); / / 15 characters padding #
                                    printf ("[% 15.10s] \ n", $ t) / / 15 characters cut of 10 characters
                                    ?>
                        Results:
                                    [Amikom]
                                    [Amikom]
                                    [Amikom]
                                    [000000000amikom]
                                    [# # # # # # # # # Amikom]
                                    [Student]

                        Example 3:
                                    $ Uang1 = 68.75;
                                    $ Uang2 = 54.35;
                                    $ Money = $ + $ uang2 uang1;
                                    / / Echo $ money will output "123.1";
                                    echo $ money;
                                    $ Formatted = sprintf ("Rp.% 01.2f", $ currency);
                                    / / Echo $ formatted output "Rp.123.10"
                                    echo $ formatted;

            3.2.2. Str_replace, STR_IREPLACE
                        Example 1:
                                    $ BodyTag = str_replace ("% body%", "black", "<body                                                                    text='%body%'>");

                        Example 2:
                                    $ Vowels = array ("a", "e", "i", "o", "u", "A", "E", "I", "O", "U");
                                    $ Gantivokal = str_replace ($ vowels, "o", "Learning E-Commerce");
                                    echo $ gantivokal;

                        Example 3:
                                    $ Phrase = "You must learn to courtship, the streets, watching movies
                                    to college. ";
                                    $ Goodness = array ("PHP", "MySQL", "SEO");
                                    $ Ugliness = array ("going out", "the streets", "movies");
                                    $ Kalimatbaru = str_replace ($ evil, $ good, $ sentence);
                                    echo $ kalimatbaru;
                                    STR_IREPLACE str_replace just NOT the same as CASE SENSITIVE.

            3.2.3. Htmlentities
                        Example:
                                    $ Str = "A sign of 'quotation', written by <b> bold </ b>";
                                    / / Output: A sign of 'quotation', written by
                                    <b> bold </ b>
                                    echo htmlentities ($ str);
                                    / / Output: A sign of 'quotation', written by
                                    <b> bold </ b>
                                    echo htmlentities ($ str, ENT_QUOTES);

            3.2.4. Html_entity_decode
                        Example:
                                    $ Orig = "A sign \" quote \ "written by <b> bold </ b>";
                                    $ A = htmlentities ($ orig, ENT_QUOTES);
                                    $ B = html_entity_decode ($ a);
                                    echo $ a; / / A sign of "quotation" written by
                                    <b> bold </ b>
                                    echo $ b; / / A sign of "quotation" written by <b> bold </ b>

            3.2.5. Htmlspecialchars
                        Example:
                                    $ Code = htmlspecialchars ("Fit & Proper <a href='test'>
                                    Test </ a> ", ENT_QUOTES);
                                    echo $ code; / / <a href='test'> Fit & Proper
                                    Test </ a>

3.3. MATHEMATICS (To Be Continued ....)
            3.3.1. ABS
            3.3.2. Ceil
            3.3.3. FLOOR
            3.3.4. MAX
            3.3.5. MIN
            3.3.6. ROUND
            3.3.7. RAND
            3.3.8. FMOD
            3.4. DATE & TIME
            3.5. Sending MAIL

Statistik