Friday, 10 January 2014

Fleming's right-hand rule (Dynamo Rule)

Penyakit yang disebabkan oleh suhu dingin

Antara lain:
1. Frostbite (Radang dingin)
2. Hipotermia

Visual Basic

Creating ur first visual basic program
Notepad + command line compiler

Array
Create an array

Dim number(0 to 2) as integer
    number(0) = 1
    number(1) = 2


Function
Create function/method

1.Function that return a method but not take parameter
function sandirahasia() as String
    return "Aloha!"
end function

2. Function that return an output and take parameter

function sandirahasia2(ByVal name as String) as String
    return "Aloha" & name
end function


Call our function
Style 1:
sub main()
    dim my_string = sandirahasia() as String
    console.writeline(my_string)
end sub

Style2:
sub main()
    console.writeline(sandirahasia())
end sub

Style1 and style 2 the result is the same

While

Contoh 1: While sederhana

Module Module1

    Sub Main()
        Dim perutgue As Integer = 0
        While perutgue < 10
            perutgue = perutgue + 1
        End While
        Console.WriteLine("Gue kenyang!")
        Console.ReadLine()
    End Sub
End Module

If

Module Module1

    Sub Main()
        Dim lampu = Console.ReadLine()
start:
        If lampu = "merah" Then
            Console.WriteLine("Berhenti")
        ElseIf lampu = "kuning" Then
            Console.WriteLine("Hati-hati")
        ElseIf lampu = "hijau" Then
            Console.WriteLine("Maju")
        End If
        Console.ReadLine()
        If jawab == "y" Then GoTo start
        else console.readline()
        End if

    End Sub

End Module

Server application and client application

Server application
The application will "listen" on a designated port.
When client makes a connection request, the server can then accept request and thereby complete the connection.
Once the connection is complete, the client and server can freely communicate with each other.



Windows programming with C

Hungarian notation used for naming variables.
Hungarian notation requires that a variable be prefixed with an abbreviation of its data type.
Example:
putting letter "P" in front of a data type, or "p" in front of variable usually indicates that the variable is a pointer.

The letter LP stands for "long pointer"

Handle
Handle = a unique identifier
A handle is actually a pointer to a pointer to a memory location.
Handles are unsigned integers that Windows uses internally to keep track of objects in memory.

HWND
What is?
data types that keep tracks of the various object that appear on the screen.

How?


Visual Studio

Visual studio adalah koleksi dari alat-alat dan layanan untuk membantu kamu menciptakan sebuah varietas yang luas dari aplikasi-aplikasi, baik untuk Platform Microsoft dan diatasnya.

Using the winsock control

http://msdn.microsoft.com/en-us/library/aa733709%28v=vs.60%29.aspx

1. Selecting protocol
2. Set the protocol
3. Determining the name of our computer
4. TCP connection basics
5. Accepting more than one connection request
6. UDP basics
7. About bind method