Friday 17 January 2014

DLLs

- are the core of Windows architecture
- are the module that contains function and data

Combination

As with EXEs, DLLs can contain code, data, and resources, in any combination.

Stream




Stream sometimes called lazy list Source: http://srfi.schemers.org/srfi-41/srfi-41.html

Visual Basic untuk aplikasi

Visual Basic for applications adalah implementasi dari visual basic 6 (event-driven programming) microsoft dan Integrated Development Environment (IDE) nya yang terasosiasi.

Visual basic untuk aplikasi memungkinkan kamu untuk membuat user-defined function (udf) yaitu fungsi buatanmu sendiri, mengotomatisasi proses-proses dan mengakses API Windows dan fungsi low-level lainnya melalui DLL-DLL.

(sumber: http://en.wikipedia.org/wiki/Visual_Basic_for_Applications)


Visual basic untuk aplikasi memperluas kemampuan Word, Power Point, Excel ke taraf yang menyenangkan.



Pememupukkan (Event)

Komponen:
1. Jenis pupuk
2. Kapan (When)
Glass
Properties
- volume
- color

Methods/function
- Clean/wash
- fill
- drain

Code in Visual Basic Editor code window

COM object task

1. Create a reference to a COM object
2. Return a reference to a COM object

Referencing an object as COM
How?

Financial task

1. Calculate depreciation
2. Calculate future value
3. Calculate interest rate
4. Calculate internal rate of return
5. Calculate number of periods
6. Calculate payments
7. Calculate present value



Visual Basic How-To

1. How to read a file
 
Dim fileReader As String
fileReader = My.Computer.FileSystem.ReadAllText("C:\test.txt")
MsgBox(fileReader)
 
2.  

Subnetting visualization

/24 = hhhhhhhh
/25 = shhhhhhh
/26 = sshhhhhh
/27 = ssshhhhh
/28 = sssshhhh
/29 = ssssshhh
/30 = sssssshh
/31 = sssssssh
/32 = ssssssss


Rushing

Sometime people forget to fill information because they are rushing

Thursday 16 January 2014

Key concept: block size

Block size can be used as:
- last address (broadcast address)
- network address

What is that magic number (block size)?
The last span of subnetmask bit


Negara Equator

Benua Asia:
Negara:
Indonesia
Pulau:
- Sumatra
- Kalimantan
- Sulawesi
- Halmahera
- Waigeo (Papua Barat)

Benua Amerika
Negara:
- Equador
- Kolombia
- Brazil

Benua Afrika
Negara:
- Gabon
- Kongo
- Rwanda
- Kenya


Tuesday 14 January 2014

Membuat Usaha

1. Pengurusan surat-surat pendirian usaha



2. Skema Perhitungan Pajak
Hasil dari telp KRING PAJAK 500200 untuk perhitungan kasar PPH perbulan :
- 0-50 jt / thn >> PPH 5 %
- 50-250 jt / thn >> PPH 15 %
- 250-500 jt/ thn >> PPH 25 %
- > 500 jt/ thn >> PPH 30 

Microsoft word built-in features

Home
Clipboard
Font: Font face, Font size,
Paragraph
Styles
Editing

Insert
Pages
Tables
Illustrations
Links: Hyperlink, Bookmark, Cross-reference
Header & Footer:
Text: Text Box, Quick Parts, WordArt, Drop Cap, Signature Line, Date & Time, Object
Symbols

Pagelayout
Themes
Page Setup
Page Background
Paragraph
Arrange

Reference
Table of content
Footnotes
Citations and Bibliography
Captions
Index
Table of Authorities

Mailings
Create
Start Mail Merge
Write & Insert Fields
Preview Results
Finish

Review
Proofing
Comments
Tracking
Changes
Compare
Protect

View
Document views
Show/Hide
Zoom
Window

Developer
Code
Controls
XML
Protect
Templates

Monday 13 January 2014

VB language reference (Keywords) [List of functions/methods]

Source: http://msdn.microsoft.com/en-us/library/xw8td0cx.aspx

Arrays Summary (Visual Basic)
What can be do to array? Action:
1. Verify an array: IsArray
2. Declare and initialize an array: Dim, Private, Public, ReDim
3. Find the limits of an array: LBound, UBound
4. Reinitialize an array: Erase, ReDim

Collection
Actions:
1. Create a collection object
2. Add an item to a collection
3. Remove an object from collection
4. Reference an item in a collection
5. Return a reference to an IEnumerator interface

Compiler Directive summary
Actions:
1. Define a compiler constant: #Const directive
2. Compile selected blocks of code
3. Collapse and hide sections of code
4. Indicate a mapping between source lines and text external to the source

Control flow summary
Actions:
1. Branch: GoTo, On Error
2. Exit or pause the program: End, Exit, Stop
3. Loop: Do...Loop, For...Next, For Each...Next, While...End While, With
4. Make decisions: Choose, If ... Then ... Else, Select Case, Switch
5. Use procedures: Call, Function, Property, Sub

Conversion Summary
Actions:
1. Convert ANSI value to string
2. Convert string to lowercase or uppercase: Format, LCase, UCase
3. Convert date to serial number: DateSerial, DateValue
4. Convert decimal number to other base: Hex, Oct
5. Convert number to string: Format, Str
6. Convert one data type to another: CBool, CByte, CDate, CDbl, CDec, CInt, CLng, CSng, CShort, CStr, CType, Fix, Int
7. Convert date to day, month, weekday or year: Day, Month, Weekday, Year
8. Convert time to hour, minute, or second: Hour, minute, or second
9. Convert string to ASCII value: Asc, AscW
10. Convert string to number: Val
11. Convert time to serial number: TimeSerial, TimeValue

Data type summary

Dates and time summary
1. Get the current date or time: Now, Today, TimeOfDay
2. Perform date calculation: DateAdd, DateDiff, DatePart
3. Return a date: DateSerial, DateValue, MonthName, Weekdayname,
4. Return a time: TimeSerial, TimeValue
5. Set the date or time: 
6. Time a process: Timer


Declarations and Times summary
Action:
1. Assign a value: Get, Property
2. Declare variables or constants: Dim, Public, Private, Shadow, Protected, Shared, Const, Statc
3. 

Directories and files
Action:
1. Change a directory of files
2. Change the drive
3. Copy a file
4. Make a folder or make a directory
5. Remove directory or folder
6. Rename a file, rename a folder, rename folder
7. Remove a directory or folder
8. Return the current path
9. Return

Errors summary
1. Generate run-time errors
2. Get exceptions
3. Provide error information
4. Trap errors during run time
5. Provide line number of error
6. Provide system error code

Information and interaction summary
1. Run other programs: AppActivate, Shell (Ready)
2. Call a method or property: CallByName
3. Sound a beep from computer: Beep (Ready)
4. Provide a command-line string: Command
5. Manipulate COM object: CreateObject, GetObject
6. Retrieve color information: QBcolor, RGBColor
7. Control dialogboxes: InputBox, MessageBox


Input and Output summary
1. Access or create a file: Fileopen
2. Closefiles: fileclose, reset
3. Control output sequence
4. Copy a file
5. Get information about a file
6. Get or provide information from/to the user by means of a control dialog box.
7. Manage files
8. Read from a file
9. Return length of a file
10. Set or get file attributes
11. Set read-write position in a file
12. Write to a file

My reference
1. Accessing application information and services
2. Accessing the host computer and its resources, services and data
3. Accessing the forms in the current project
4. Accessing



Great Mind

1. 2 Suku kata tiap ingatan (memory)
2. List -->Pictures/Visualize (To get our vision) --> Contoh pemakaian
3. Start slowly at the speed that can be catched by your eyes

Web browser mine

Features:
1. Text highlighting
2. Text translation (pop-up)
3. Text notepadding

You want your software connect to the microsoft office programs?

Use COM and namespace
Because microsoft office contain code and dll

namespaces

What namespaces do they easier to organize the classes.

One namespace several different classes

The most basic concept of fluid

Sunday 12 January 2014

Instantiate object

Instatiating an object to a class is copying class's properties, copying class's method, copying class's sub module.
Contoh:
 Public Class Class1
    Public horizontal As Integer
    Public vertical As Integer

    Sub widen(ByVal scale As Integer)
        horizontal = horizontal + scale
        vertical = vertical + scale
    End Sub
End Class

Module Module1

    Sub Main()
        Dim square_a As Class1
        'next step, instatiate object square_a to class1
        square_a = New Class1
        square_a.horizontal = 1
        square_a.vertical = 1
        Console.WriteLine(square_a.horizontal & " " & square_a.vertical)
        square_a.widen(3)
        Console.WriteLine(square_a.horizontal & " " & square_a.vertical)
        Console.ReadLine()
    End Sub

End Module

Class

Untuk apa/bisa digunakan untuk apa?

Class bisa digunakan sebagai panduan pengisian. Seperti ngisi data di microsoft excel
Contoh perhatikan rani, sori perhatikan data berikut ini:


Nama Umur Suku Status
Saya      
Kamu      
Dia      

Begimana caranya?
1. Pertama defenisikan class
Public Class Orang
    'properties
    Public Umur As Integer
    Public Suku As String
    Public Status As String

End Class
 
2. Masukin saya sebagai orang, trus define(dim) umur saya, suku saya, status saya. Tampilkan status saya
Module Module1

    Sub Main()
        Dim saya As New Orang
        saya.Umur = 29
        saya.Suku = "Batak"
        saya.Status = "Belum Menikah"
        Console.WriteLine(saya.Status)
        Console.ReadLine()
    End Sub

End Module

What makes a man, man

What makes a man, man?
What makes a spirit, spirit?

Don't easily give up on your brain

Something may be difficult to grasp at first but should be easy enough if you stick at it.

Apa perbedaan sub procedure dengan function?

Simple, sub tidak return value, function return value.

Saturday 11 January 2014

Terminologi programming

Modules = class with super power
Class =
- is the blueprint
- container of related method
Contoh:
console
Object is an instance of a class

Looping

Components

Looping's components: (a = b x c)
(a) what to be looped(b)
(b) how many times (c)
- Unknown
- Known

(c) result
(d) exit condition or stop condition

Which one?
If you know what to be looped and how many times you loop and what to be looped, you can use for.
If you don't know how many times you loop but know what to be looped and the what result you want, you can use while.

For: a, b, c
While: d

Examples
Python looping
- Python For
Example (Python)
>>> for i in range (0,2):
    print i

  
0
1
- Python While
 Example (Python):
>>> x=1
>>> while x < 3:
    x = x + 1
    print x

  
2
3

C Looping
- For
Usage: for (start counter; end counter; how to get to end counter)

Example:

- While
 This the most basic loop in C.
check first, do last.

Example:



- do..While
do.. While loop is just like while except the condition to test is behind
do first, check later




Preposition

AT / IT / ON

Syarat property

Property access must assign to the property
or use its value

Event driven programming

What you act upon ,,,,,


Technology what you offer?

Routing = passing

Think of three router triangle.


Passing

Passing polos

Passing if (conditional)


Access-list technology
block certain packet with label ....
permit certain packet with label ....

Access-list standard: if you want examine only layer 3 use this type
Access-list extended: if you want to examine packet's at layer 3 (network, transport, application) and above use this type

NAT
translate certain packet with label ....
don't translate certain packet with label .....

Spanning-tree
: distributed technologies, means each switch process and tell other

OSPF
: distributed technologies


Berfikir (thinking) itu

Berfikir itu push-up 100 kali

What is the full binary tree?

Have you see a full binary tree below?

Is...

Visual basic

Isnothing
Return true if it is nothing

Isarray
Return true if it is an array

Isdate
Return true if it is date

IsDBNull

Iserror
Return true if it error

IsNumeric
Return true if it is a Numeric

IsReference
Return true if it is a reference

Microsoft built-in function
=Isblank
=Iserr
=Iserror
=Iseven
=IsLogical
=IsNA
=IsNontext
=IsNumber
=IsODD
=IsPMT
=Isref
=Istext

Friday 10 January 2014

Fakta yang menyejukkan

Gue gak bisa hardware!! Gue give up

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?