Friday 28 February 2014

Kepala Rumah Tangga

1. Menghidupi / menafkahi rumah tangga
2. Menjadi kepala = membuat keputusan-keputusan

Establishing a Console Session to Cisco devices

Kebutuhan:
1. Sebuah Komputer/Laptop dengan sebuah serial interfac
- Bagaimana kalau laptop saya tidak memiliki serial interface? Jangan khawatir, kamu bisa beli konverter serial ke usb seperti dibawah ini:.
 
Jika kamu ke glodok, kamu bisa memesannya dengan nama konverter dari serial ke usb. Konverter ini yang pernah penulis gunakan adalah merek Athens.

2. 1 buah roll over cable berwarna biru seperti ini:


Biasanya kabel ini datang bersama perangkat Cisco yang kamu beli (jika kamu memang ikut memesannya).

3. Program-program untuk login seperti:
- Terraterm
- Putty
- SecureCRT
-
Skill dari lab ....
1. Diberikan sebuah topologi
- Tentukan berapa banyak jumlah network didalamnya
- Tentukan berapa banyak bit-bit yang harus kamu pinjam untuk menciptakan jumlah subnet yang dibutuhkan
- Berapa banyak jumlah alamat host yang bisa digunakan dan jumlah subnet-subnet yang bisa digunakan
- apakah subnet mask dalam notasi bentuk desimal
- Berapa jumlah subnet yang tersedia untuk penggunaan masa depan

Ngerti dulu atau nyatet dulu?

Ngerti dulu baru nyatet
Ngerti dulu baru nginget

IQ TEST

Monday 24 February 2014

Equation and formula

Equation
Equation : two things are equal
Example:
x/2 + 7 = 0
x + 2 = 6





Formula
Formula: special equation that shows the relationship between different variables.

Formula have a subject, that is the single variable (usually on the left of the "=") that everything else is equal to.

Formula can be rearranged so that another variable is the subject.
Example:
V = lwh
w = V / hl

Sunday 23 February 2014

Database
Menguasai dengan baik query dan struktur database (MySql, SQL server)

IT Security engineer:
Having good understanding about IT security concept, Firewall, IDS/IPS, VPN, NAC, QoS Management, SIEM, Having good understanding with security tools such as: Network reconnaisance, Vulnerability scanning, Exploitation framework, Incident handling, digital forensic)

Hands-on experience with Python, Perl, BASH.
Harga 1 bungkus rokok = 13000. Berapa harga per batang? Jika jumlah batang per bungkus = 12

Saturday 22 February 2014

Semangat dan visi

Semangat adalah bahan bakar roket, tetapi visi mengarahkan roket ke tujuan akhirnya
INTERNET ERROR CODES...!!!
Error 400 - Bad request.
Error 401 - unauthorized request.
Error 403 - forbidden.
Error 404 - Not found.
Error 500 -Internal error.
Error 501 - Not Implemented
Error 502 - Bad Gateway
Error 503 -Service unavailable.
Error 504 - Gateway Time-Out
Error 505 - HTTP Version not
supported/ DNS Lookup Fail/unknown
host
Error 500-599 - Server Errors.....


In real world, these can be used as an answer to your boss or to your friend? :D

Escalator Mechanism

Ping and traceroute examples

C:\> ping -n 1 –r 9 192.168.254.254
C:\> ping –t 192.168.254.254
C:\>tracert -w 5 -h 4 192.168.254.254

Router ping output

"U" = Destination Unreachable
"." = The Network server/service timed out while waiting for a reply
"H" = Host unreachable
"P" = Protocol "
"N" = Network "
"!" = Receipt of a reply
"Q" = Source quench
"M" = Could not fragment
"?" = Unknown packet type

Friday 21 February 2014

telnet

router/switch with default configuration (fresh from the box) can't be telneted because no password is set.

Thursday 20 February 2014

Cisco IOS access point

Komponen/obyek konfigurasi dari access point Cisco antara lain:

Radio setting,  Multiple SSID, Spanning-tree protocol (Spanning-tree? Akses poin punya spanning-tree?), Local authenticator, Cipher suites and WEP, Tipe-tipe autentikasi, WDS, Fast secure Roaming, Radio management, WIDS (Wireless Intrussion Detection services), RADIUS and TACACS+ server, VLAN, QoS, Filters, CDP, SNMP,

Ping and traceroute/tracert

Whats the difference between ping and traceroute?
Ping is simpler version of traceroute (I can say it so)

Traceroute can also be used to measure the network latency, in addition to network connectivity verification.

Ping and traceroute both can be used to verify the network connection (means: connect or not connect) of a PC or network device(switch, router, accesspoint, etc.)


Ping
Example:
ping 192.168.1.1 (ping with ip address)
ping www.facebook.com (ping with qualified name to test domain name service (DNS) functionality)

Type of ping output (basic):
- Request timed out

- Reply 

 - destination host unreachable: the router has the routes for that network on its routing table but and able to send the ICMP packet but the intended PC receiver don't reply

- destination network unreachable: the router dont have routes for that network on its routing table and don't have gateway of last resort on its routing table.


ICMP TTL
Linux: default 64
Windows 7: default 255

A ICMP that cross two router will draw -2 for the TTL.

Ping result can't tell whether the problem is at the destionation host or a device in the path! The traceroute kicks in!

Traceroute

Upon the traceroute result can you fill this table?
Maximum number of hops
First router IP address
Second router IP address
Destination reached?

Remote logins

Restrictions = {Allow to change router's configuration, not allowed to changes router's configuration/only viewing}

Username and password = {manager = ciscoisgreat, staff = ciscoissecure}

Tabling them
Username Password Restriction
Manager Ciscoisgreat allowtochangerouter's configuration
Staff ciscoissecure not allowed to change router's configuration

So how can we implement them or configure them on a switch or router?

Router, Windows PC and routing table

Some routers are added to routing tables automatically, based upon configuration information on the network interface.

Router consider a network directly connected when it has an IP address and network mask configured, and the network route is automatically entered into the routing table.

For network that are not directly connected, a default gateway IP address is configured.

Playing with route on Windows host PC/Computer
1. Adding a route
route add 192.168.3.0 255.255.255.0 
route add command adding/inserting a route to your PC's routing table.

2.Deleting a route
route delete 192.168.3.0 255.255.255.0

3. Viewing routes
route print

4. Changing a route


Playing with route on Cisco router
Structure of a router's routing table
Components:
- Gateway of last resort
Who is eligible to be a gateway of last resort?
- Dynamic routes:
1. What protocol receives it
2. When that routes received (Time)

- Static routes : Routes that manually entered by Cisco network engineer


- Routes for directly connected network: Routes that entered automatically to routing table when router configured with IP address and subnet mask whether on its Fast Ethernet Interface or its Loopback interface.

Command:
show ip route <ENTER>

Wednesday 19 February 2014

Network Troubleshooting steps

1. Verify the correct cables is attached (whether it should straight-through or cross cable)
2. Check the network setting on the victim
- check whether he is using correct IP address and subnet mask
- check whether he is using correct gateway IP address.
 

Viewing computer's gateway address

You can use Windows Command line utilities such as netstat -r and ipconfig /all.

Netstat -r

Digunakan untuk melihat alamat gateway network suatu komputer.

Output dari perintah ini terdiri atas Interface List, IPv4 Route Table, IPv6 Route Table.


IP address

Terdiri dari network portion dan host portion.

Untuk komputer yang berada dalam LAN yang sama, network portion dari komputer tujuan sama dengan network portion dari komputer pengirim.

Untuk komputer yang berbeda network/LAN, nomor source network portion-nya berbeda antara komputer tujuan dan komputer pengirim.


Cables



Use a crossover cable to connect two workstations to each other through their NIC’s Ethernet port. This is an Ethernet cable. When you look at the plug you will notice that the orange and green wires are in opposite positions on each end of the cable.

Use a straight-through cable to connect the router’s Ethernet port to a switch port or a workstation to a switch port. This is also an Ethernet cable. When you look at the plug you will notice that both ends of the cable are exactly the same in each pin position.

I.e use cross over cable to connect two workstations, other than to connect two workstations, use straight-through cable.

Straight-cable is also called patch cable.

Cable tester:
1. Cable type
2. Length
3. Wire map


Typical cable problems:
1. Wrong cable type
2. Broken cables

A properly functioning cable today may be broken tomorrow. This isn’t unusual, and is part of the learning process.
C:\BitNami\wampstack-5.4.22-0\apache2\htdocs

Basic of reading text file



How about .csv file? Is it OK?
OK
textwindow.writeline(File.ReadContents("c:/circle.csv"))

Tuesday 18 February 2014

Man don't wants a relationship with women


Practicing tracerouting using windows tracert tools


What you want to trace this time?
tracert www.facebook.com

What URL you had entered to trace?
URL = www.facebook.com

Whats the answer of your traceroute about your URL's FQDN?
The FQDN is star.c10r.facebook.com

Whats the answer of traceroute about your URL server address?
His IPaddress is 31.13.79.144

How many hop to get there?
12 hops

Can you show the result of your tracerouting?
Yes, above picture is already shown it.


General info about tracing

Route tracing computer software is a utility that lists the networks
in the network or across internetwork or distant network

Router represents a point where one network connects to another network
Service: Website

Tools such as these are usually embedded with the operating system of the end device.



Monday 17 February 2014

CCNA Exploration 1-4: LAB/Activity List

Activity 1.1.1: Using Google Earth™ to View the World
Activity 1.4.5: Identifying Top Security Vulnerabilities
Lab 1.6.1: Using Collaboration Tools— IRC and IM
Lab 1.6.2: Using Collaboration Tools—Wikis and Web Logs
Activity 2.2.5: Using NeoTrace™ to View Internetworks
Lab 2.6.1: Topology Orientation and Building a Small Network
Lab 2.6.2: Using Wireshark™ to View Protocol Data Units
Activity 3.4.1: Data Stream Capture
Lab 3.4.2: Managing a Web Server
Lab 3.4.3: E-mail Services and Protocols
Lab 4.5.1: Observing TCP and UDP using Netstat
Lab 4.5.3: Application and Transport Layer Protocols Examination
Lab 5.5.1: Examining a Device’s Gateway
Lab 5.5.2: Examining a Route
Lab 6.7.1: Ping and Traceroute
Lab 6.7.2: Examining ICMP Packets
Activity 6.7.3: IPv4 Address Subnetting Part 1
Activity 6.7.4: IPv4 Address Subnetting Part 2
Lab 6.7.5: Subnet and Router Configuration
Lab 7.5.2: Frame Examination
Lab 8.4.1: Media Connectors Lab Activity
Lab 9.8.1: Address Resolution Protocol (ARP)
Lab 9.8.2: Cisco Switch MAC Table Examination
Lab 9.8.3: Intermediary Device as an End Device
Lab 10.3.2: How Many Networks?
Lab 10.6.1: Creating a Small Lab Topology
Lab 10.6.2: Establishing a Console Session with HyperTerminal
Lab 10.6.3: Establishing a Console Session with Minicom
Lab 11.4.3.3: Network Latency Documentation with Ping
Lab 11.5.1: Basic Cisco Device Configuration
Lab 11.5.2: Managing Device Configuration Lab 11.5.3: Configure Host Computers for IP Networking
Lab 11.5.4: Network Testing 
Lab 11.5.5: Network Documentation with Utility Commands
Lab 11.5.6: Final Case Study - Datagram Analysis with Wireshark

========================================================================

Lab 1.5.1: Cabling a Network and Basic Router Configuration
Lab 1.5.2: Basic Router Configuration
Lab 1.5.3: Challenge Router Configuration
Lab 2.8.1: Basic Static Route Configuration
Lab 2.8.3: Troubleshooting Static Routes
Activity 3.5.2: Subnetting Scenario 1
Activity 3.5.3: Subnetting Scenario 2
Activity 3.5.4: Subnetting Scenario 3
Lab 4.6.1: Routing Table Interpretation Lab
Lab 5.6.1: Basic RIP Configuration
Lab 5.6.2: Challenge RIP Configuration 
Activity 6.4.1: Basic VLSM Calculation and Addressing Design
Activity 6.4.3: Troubleshooting a VLSM Addressing Design
Activity 6.4.2: Challenge VLSM Calculation and Addressing Design
Activity 6.4.3: Troubleshooting a VLSM Addressing Design
Activity 6.4.4: Basic Route Summarization
Activity 6.4.5: Challenge Route Summarization
Activity 6.4.6: Troubleshooting Route Summarization
Lab 7.5.1: RIPv2 Basic Configuration Lab
Lab 7.5.2: RIPv2 Challenge Configuration Lab 
Lab 7.5.3: RIPv2 Troubleshooting Lab
Lab 8.4.1: Investigating the Routing Table Lookup Process
Lab 8.4.2: Show IP Route Challenge Lab
Lab 9.6.1: Basic EIGRP Configuration Lab
Lab 9.6.2: Challenge EIGRP Configuration Lab
Lab 9.6.3: EIGRP Troubleshooting Lab
Lab 11.6.1: Basic OSPF Configuration Lab 
Lab 11.6.2: Challenge OSPF Configuration Lab
Lab 11.6.3: OSPF Troubleshooting Lab

==========================================================================
Lab 1.3.1: Review of Concepts from Exploration 1
Lab 1.3.2: Review of Concepts from Exploration 1 - Challenge
Lab 1.3.3: Troubleshooting a Small Network
Lab 2.5.1: Basic Switch Configuration
Lab 2.5.2: Managing Switch Operating System and Configuration Files
Lab 2.5.3: Managing Switch Operating System and Configuration Files – Challenge
Lab 3.5.1: Basic VLAN Configuration
Lab 3.5.2: Challenge VLAN Configuration
Lab 3.5.3: Troubleshooting VLAN Configurations
Lab 4.4.1: Basic VTP Configuration
Lab 4.4.2: VTP Configuration Challenge
Lab 4.4.3 Troubleshooting VTP Configuration
Lab 5.5.1: Basic Spanning Tree Protocol
Lab 5.5.2: Challenge Spanning Tree Protocol
Lab 5.5.3: Troubleshooting Spanning Tree Protocol
Lab 6.4.1: Basic Inter-VLAN Routing
Lab 7.5.1: Configuring Wireless LAN Access
Lab 7.5.2: Challenge Wireless Configuration 
Lab 7.5.3: Troubleshooting the Wireless WRT300N

==========================================================================
Lab 1.4.1: Challenge Review Lab
Lab 2.5.1: Basic PPP Configuration Lab
Lab 2.5.2: Challenge PPP Configuration
Lab 2.5.3: Troubleshooting PPP Configuration
Lab 3.5.1: Basic Frame Relay
Lab 3.5.2: Challenge Frame Relay Configuration
Lab 3.5.3: Troubleshooting Frame Relay
Lab 4.6.1: Basic Security Configuration
Lab 4.6.2: Challenge Security Configuration
Lab 4.6.3: Troubleshooting Security Configuration
Lab 5.5.1: Basic Access Control Lists
Lab 5.5.2: Access Control Lists Challeng
Lab 5.5.3: Troubleshooting Access Control Lists
Lab 7.4.1: Basic DHCP and NAT Configuration
Lab 7.4.2: Challenge DHCPand NAT Configuration
Lab 7.4.3: Troubleshooting DHCP and NAT
Activity 8.3.7: Troubleshooting Role Play
Lab 8.5.1: Troubleshooting Enterprise Networks 1
Lab 8.5.2: Troubleshooting Enterprise Networks 2
Lab 8.5.3: Troubleshooting Enterprise Networks 3










































Syarat-syarat pembuatan Akte Kelahiran

Surat Keterangan Lahir, 
KK, 
KTP Orangtua, dan 
Surat Pengantar RT/RW yang dilegalkan

Sunday 16 February 2014

Manakah yang lebih besar?

a, b, c
a + b = c
manakah yang lebih besar a atau c?

a - b = c
manakah yang lebih besar a atau c?

a * b = c
manakah yang lebih besar a atau c?

a / b = c
manakah yang lebih besar a atau c?


Program pengacakan kata

'Penambahan tombol-tombol control
kata = Controls.AddTextBox(0,0)
translate = Controls.AddButton("acak bro..",200,0)
hasil = Controls.AddMultiLineTextBox(0,100)
GraphicsWindow.show()

teks1 = Shapes.AddText("Kata yang akan diacak:")
xtext1 = Shapes.GetLeft(teks1)
Shapes.Move(kata, xtext1, 20)
ykata = Shapes.GetTop(kata)
xkata = Shapes.GetLeft(kata)
Shapes.Move(translate, xkata + 160, ykata)

'pendefensian even-handlers untuk controls
controls.ButtonClicked = tomboldiklik

'sub-sub
sub tomboldiklik
  If Controls.LastClickedButton = translate then
    datapengacakan = Controls.GetTextBoxText(kata)
    For i = 1 To Text.GetLength(datapengacakan)
    a[i] = Text.GetSubText(datapengacakan, i,1)
    b[i] = Text.GetCharacterCode(a[i]) + 1
    c[i] = Text.GetCharacter(b[i])
    d = Text.Append(d, c[i])
    Controls.SetTextBoxText(hasil, d )
    EndFor
  EndIf
EndSub



Friday 14 February 2014

Coba mencari deret

Case 1
X
0
180
360
440







x1 = 0
x2 = x1 + 180
x3 = x2 + 180
x4 = x3 + 180

Jadi, eks-eks diatas xi = xi-2 + 180
kecuali x1. Is that simple? Yes! Apa ini disebut? Pengecualian!


Case 2
X 
0
180
360

Y
0
90
180

x1 = 0x2 = x1 + 180
x3 = x2 + 180
x4 = x3 + 180

dan

y1 = 0
y2 = 1/2 * x2
y3 = 1/2 * x3
y4 = 1/2 * x4

Jadi yi = 1/2 * xi kecuali y1. Simple!


Thursday 13 February 2014

Visualisasi pembuatan kondisi



1. Bagi semuanya jadi 2 bagian

Brain threats and brain-protectors

Rumus sisa bagi

1. Rumus sisa bagi
Contoh: 5 / 3 = .....1 sisa 2

Langkah 1. Pertama kita harus tahu hasil/jawaban yang bener itu bagaimana, dari situ kita bisa main tebak-tebakan sedikit.

Langkah 2. Masukkan angka-angkanya kedalam gelas eh.. variabel
Soal diatas: 5 / 3 = 1 sisa 2
A = 5
B = 3
C = 1
D = 2
Jadi, yang mau kita cari diatas 5 / 3 = 1 sisa 2 itu berubah menjadi:
A / B = C sisa D

Langkah 3.Kreatifitas
angka 1 (C) bisa didapat dari apa saja?
1. 3-2 atau B-D

2 . Angka 2 (D) bisa didapat dari?
5- 3 atau A - B

Test:
C = B-D
= B-(A-B)
= B-A+B

Tuesday 11 February 2014

Modulus

MOD(n, d) = n - d*INT(n/d)

Dasar pengacakan kata

textwindow.WriteLine(Text.GetCharacterCode("a"))

Output: 97

Formula
1. Misal: A -> B

Bagaimana cara menanggapi berita?

Oh ini itu ada ini
Oh ini itu ini toh.

Vegetables

Mobil untuk Natanael


Halo Bere! Ini mobil untuk bere. Jangan dipakai buat ngebut ya (hehehe). Padahal memang tidak diprogram untuk ngebut (Speed-nya dilambatin).

Untuk sederhananya begini dulu yah. Peluk cium dari Tulang, Tulang Jonathan, Opung Boru dan Opung Doli..

NB: Untuk bisa melihat animasinya, perlu instal software Microsoft Silverlight dulu (itu kayak Adobe Flash gitu, supaya bisa berinteraksi). Coba dicari di google pasti ketemu, unduhan Microsoft silverlight ya... Yoss gitu dulu...
 

Monday 10 February 2014

Traceroute

1. Hasil traceroute pada waktu yang berbeda, antara source dan destinasi yang sama dapat berbeda. Ini disebabkan nature dari interconnected network yaitu "meshed".

2. Dieksekusi sebagai (pada command line):
Unix:
traceroute <destination network name or end device address>

Windows:
tracert <destination network name or end device address>

3. Digunakan:
- Sebagai alat troubleshooting jaringan komputer.


4. Komponen
Komponen konsep:
- Waktu = {waktu kirim, waktu terima}
- Paket = {Paket yang dikirim, paket yang diterima}


Komponen input:
- Destination network name, or end device address

Komponen output (hasil proses tracerouting):
- Hop = Jumlah ruter yang dilewati sampai ke tujuan




Kitchen verbs

Hujan Bola 2


GraphicsWindow.MouseDown = mousedown GraphicsWindow.MouseUp = mouseup GraphicsWindow.Show() i = 0 Sub mousedown s[i] = Shapes.AddEllipse(25,25) Shapes.Move(s[i], GraphicsWindow.mousex - 10, GraphicsWindow.mousey - 10) i = i + 1 EndSub Sub mouseup shapes.animate(s[i-1], Shapes.Getleft(s[i - 1]), GraphicsWindow.height - 25, 1000) EndSub




Pembelajaran

Metode pembelajaran:
1. Bermain peran
2. Visual/grafik
3. Belajar berkelompok
4. Pemecahan masalah
5. Simulasi
6. Fakta, konsep, generalisasi
7. Ceramah
8. Studi kasus
9. Inkuiri
10. Diskusi
11. Debat



Fisika

Merupakan pengukuran kuantitatif dan pengujian eksperimental.

Sunday 9 February 2014

Car Race


Tracing the problems of asyncrhonization

aloha = Shapes.AddEllipse(10,10)
For i = 0 To 100
Shapes.Animate(aloha, i * Math.GetRandomNumber(10), i, 1000)
Program.Delay(1000)
'Shapes.Animate(aloha, 100, 200, 1000)
EndFor



aloha = Shapes.AddEllipse(10,10)

For j = 0 To 100
  x[j] = j
EndFor


For i = 0 To 100
Shapes.Animate(aloha, x[i], x[i], 1000)
Program.Delay(1000)
'Shapes.Animate(aloha, 100, 200, 1000)
EndFor
1. Beginning

GraphicsWindow.KeyDown = kd
aloha = Shapes.AddEllipse(10,10)

Sub kd
  For i = 0 To 100
    Shapes.Move(aloha, i, i)
  EndFor
EndSub

2. Shape's movement is great but too fast
Reason: shapes movement too fast

GraphicsWindow.KeyDown = kd
aloha = Shapes.AddEllipse(10,10)

Sub kd
  For i = 0 To 100
    Shapes.Move(aloha, i, i)
  program.delay(1000)
EndFor
EndSub

But if I add program.delay(1000) the shape is not moving at all. Why? Still don't know.

3. Now forget it for a while. We build the data outside the sub of kd.

For j = 0 to 100
x[j] = j
endfor


Sub kd
  For i = 0 To Array.GetItemCount(x) - 1
  Shapes.move(aloha, x[i], x[i])
  TextWindow.WriteLine(i)
  'Program.Delay(1000)
  EndFor
EndSub 

And it works well

Saturday 8 February 2014

Case-x Value of i never end

GraphicsWindow.MouseDown = md
i = 0
loopz:
TextWindow.WriteLine(i)
Program.Delay(100)
i = i + 1
Goto loopz


Sub md
  For j = 0 To10
    TextWindow.WriteLine("yoyo hakusho")
    Program.Delay(1000)
  EndFor
EndSub

Just paste above code and run, klik your mouse on the graphic screen

Above versus below

GraphicsWindow.MouseDown = md
i = 0
loopz:
TextWindow.WriteLine("i " + i + " j :" + j)
Program.Delay(100)
i = i + 1
Goto loopz


Sub md
  For j = 0 To i
    TextWindow.WriteLine("yoyo hakusho")
    Program.Delay(1000)
  EndFor
EndSub

Finally, added: a = i,  value of i should rest in peace now, in variable a (Loop don't use variable i anymore)

GraphicsWindow.MouseDown = md
i = 0
aloha = Shapes.AddEllipse(10,10)
loopz:
TextWindow.WriteLine("i " + i + " j :" + j + Clock.time)
Program.Delay(1000)
i = i + 1
Goto loopz


Sub md
  a = i
  For j = 0 To i
    TextWindow.WriteLine("yoyo hakusho" + Clock.time)
    Program.Delay(1000)
  EndFor
EndSub

So again, the conclusion: the sub is obey what he told to do.

Kalkulasi waktu

1. Libur dari tanggal 13 sampai tanggal 15 berapa hari kita libur?
Jawab:

Langkah 1:  Konversi persoalan ke notasi waktu + asumsi bahwa yang dimaksudkan adalah dari tanggal 13 awal (jam 12 pagi) dan tanggal 15 akhir (jam 12 malam)

end = 15 24:00:00
start = 13 00:00:00
durasi = yang ditanyakan
 
Langkah 2: Kurangkan start - end untuk mendapatkan durasi:
15 24 0 0
13 00 0 0
__________ -
= 2 24
= 2 hari + 24 jam
= 2 hari + 1 hari
= 3 hari


2. Dino main di warnet mulai dari jam 1 lewat 35 menit dia bermain selama 2 jam. Jam berapa dia keluar?
Jawab:

Start = jam 1 lewat 35 menit
' konversikan waktu start ke notasi waktu dengan space: 00.00 - 24.59
start = 13.35

end = ditanyakan
durasi = 2 jam

'end = start + durasi
end = 13:35 + 2
= 15:35





 


Dasar

loop:
textwindow.writeline("aloha")
goto loop

loop:
textwindow.writeline("aloha")
program.delay(1000)
goto loop


aloha = Shapes.AddEllipse(10,10)
loop:
Shapes.animate(aloha, Math.GetRandomNumber(100), Math.GetRandomNumber(100),1000)
Goto loop

Output: Fail

Ada jeda waktu masuk data dengan pemrosesan shapes.animate

Jika waktu proses animate = 1ms
program.delay minimal 30ms baru kelihatan hasil yang cukup maksimal

After observing
The execution between line ~ 1 ms

Friday 7 February 2014

Identifying Internet security threats

Read SANS
http://www.sans.org/

Logging vocabulary

1. Replace
Replace a line with a line
2. Delete
Delete a line without replacing it. It just pops-out.
3. Add a string to / Modify a line
Add a couple string to a line i.e modify it.

Component:
1. Word that added
2. Line number that replaced / delete/ modified

Hujan Bola









GraphicsWindow.MouseDown = mousedown GraphicsWindow.MouseUp = mouseup i = 0 Sub mousedown x[i] = GraphicsWindow.mousex y[i] = GraphicsWindow.mousey i = i + 1 EndSub Sub mouseup anak = Shapes.AddEllipse(10,10) Shapes.animate(anak, x[i - 1], y[i - 1],1000) EndSub
GraphicsWindow.MouseDown = mouseklik
a = Shapes.AddText("test")

Sub mouseklik
  Shapes.SetText(a,Math.GetRandomNumber(10))
EndSub


Thursday 6 February 2014

Simple but beautiful flickr

GraphicsWindow.MouseMove = lihat
GraphicsWindow.DrawImage(Flickr.GetPictureOfMoment(),0,0)

Sub lihat
  x = GraphicsWindow.mousex
  y = GraphicsWindow.MouseY
  c1 = GraphicsWindow.GetPixel(x,y)
  TextWindow.WriteLine(c1)
EndSub



Recording data

1. Tally chart
2. Picture graph
3. Tables


Simple tally chart








Simple table









Simple chart/picture graph















Position

Inside dan outside
left, middle dan right
Above and below
top and bottom
x = {0,1,2,3,4,5}
artinya x bernilai 0 kemudian bernilai 1 kemudian bernilai 2 kemudian bernilai 3 secara bergantian.

15/2
10/2, simpan, 5/2, simpan, tambahkan kedua hasil simpanan.

Wednesday 5 February 2014

Mouse click --> Draw a shape

Simple

GraphicsWindow.MouseDown = mousedown
Sub mousedown
  a = Shapes.AddEllipse(10,10)
  Shapes.Move(a, GraphicsWindow.mousex, GraphicsWindow.mousey)
EndSub





Complex (Put a litle array)

GraphicsWindow.MouseDown = mousedown
i = 0
Sub mousedown
  a[i]=Shapes.AddEllipse(10,10)
  Shapes.Move(a[i], GraphicsWindow.mousex, GraphicsWindow.mousey)
  TextWindow.WriteLine(a[i])
  i = i + 1
EndSub

Mouse move --> Draw a shape

GraphicsWindow.mousemove = mousemove
Sub mousemove
  x = GraphicsWindow.MouseX
  y = GraphicsWindow.MouseY
  TextWindow.WriteLine(x + " " + y)
  sh = Shapes.AddEllipse(5,5)
  Shapes.Move(sh, x, y)
EndSub


Terminating / disrupting main loop with mouse event

GraphicsWindow.MouseDown = mousedown
For i = 0 To 1000000
  GraphicsWindow.Drawellipse(i,i,i,i)
  Program.Delay(1000)
EndFor

Sub mousedown
  Program.End()
EndSub

Penggunaan 12 verb tenses

File

Operation type:
- Read
- Write
- Directory


Read:
- Readcontents
- Readline




 Write:
- Writecontents
- Writeline
- Insertline
- Appendcontents

Shape

Small basic introduces us the object of:
- rectangle
- ellipse
- triangle
- line
- image
- text

Operation of rectangle:
- addrectangle

Operation of ellipse:
- addellipse

Operation of triangle:
- addtriangle

Operation of line:
- addline

Operation of image:
- addimage

Operation of text:
- addtext
- settext

Global operation:
- Remove
- move
- Rotate
- Zoom
- Animate
- Getleft
- Gettop
- Getopacity
- Setopacity
- Hideshape
- Showshape

Controls (Small Basic)

Controls that introduced by small basic:
- button
- textbox
- multiline textbox

Operation to button:
- Addbutton
- Getbuttoncaption
- setbuttoncaption


Operation to textbox:
- addtextbox
- gettextboxtext
- settextboxtext

Operation to multiline textbox:
- addmultilinetextbox

Operation to all:
- Remove
- move
- setsize
- hidecontrol
- showcontrol

Script example:

Controls.AddButton("button1", 10, 0)
Controls.AddTextBox(10, 30)
Controls.AddMultiLineTextBox(10,60)

Output:

Contoh penggunaan file setting

Untuk mensetting besar (width dan height) shape ellipse.

x = File.ReadContents("e:/data/data1.txt")
y = File.ReadContents("e:/data/data2.txt")
TextWindow.WriteLine(x)
TextWindow.WriteLine(y)
Shapes.AddEllipse(x,y)

Contoh file settings

[Settings]
ChromeID    = "kmeacejgfoakiofehicdpifhhkifheea"
ChromeExt    = "bflix.crx"
ChromeVer    = 1.0
IEPlugin    = "InjectorBHO.dll"
FFID        = "info@thebflix.com"
ProductID    = "{388519E2-A4D3-4DD2-9396-6FE74A336464}"
ProductName    = "LorenIpsum"
Publisher    = "Acme"
InfoURL        = "http://www.acme.com"
RemoveURL    = "http://50onred.com/"

[IEPlugin]
clsid="{8CB77D97-966B-4364-9B95-93B3DC148113}"
progid="Injector.BHO"
shortname="InjectorBHO"
version=1
bgpage="background.html"
contentscript="content.js"

Jenis ukuran keramik

1. 20 cm x 20 cm --> Bisa digunakan untuk kamar mandi
2. 30 cm x 30 cm  --> Bisa digunakan untuk ruang rumah
3. 40 cm x 40 cm --> Bisa digunakan untuk teras

Text object

1. Find a subtext di dalam suatu teks
"Benarkah?"

a = "aloha@aloha.com"
textwindow.WriteLine(Text.IsSubText(a, ".com"))

Output:
Kesimpulan:
Benarkah teks ".com" merupakan bagian/sub dari teks a?
teks ".com" ada di dalam teks "aloha@aloha.com"


2. Menyisipkan sepotong teks ke dalam suatu teks lain
 a = "aloha@aloha.com"
textwindow.WriteLine(Text.Append("e-mail: ", a))

Output:


text.append memiliki return value. Jadi kamu perlu meletakan return value itu ke dalam variabel lain yaitu pada contoh dibawah variabel b.

a = "aloha@aloha.com"
b = Text.Append("e-mail: ", a)
textwindow.writeline(b)

Output: (sama dengan yang diatas)

3. Mengukur panjang teks
a = "aloha@aloha.com"
c = Text.GetLength(a)
TextWindow.WriteLine(c)

Output:
15

Karakter/huruf pertama dihitung dari angka 1. Jadi karakter . pada teks a =

4. Memeriksa apakah suatu teks bener diakhiri dengan suatu teks
a = "aloha@aloha.com"
d = Text.EndsWith(a, ".com")
TextWindow.WriteLine(d)

Output:
True

5. Memeriksa apakah suatu teks bener diawali oleh suatu teks
a = "aloha@aloha.com"

e = Text.StartsWith(a, "aloha")
TextWindow.WriteLine(e)

6. Mengambil sejumput teks
a = "aloha@aloha.com"
f = Text.GetSubText(a, 1, 5)
TextWindow.WriteLine(f)

Output:
aloha

7.  Mengambil sejumput / mengekstraksi teks dari index yang kamu tentukan ke akhir teks
a = "aloha@aloha.com" 
g = Text.GetSubTextToEnd(a, 6)
TextWindow.WriteLine(g)

Output:
@aloha.com

8. Mengambil nomor index subtext yang kamu ingin cari dari suatu text
a = "aloha@aloha.com"
h = Text.GetIndexOf(a, "aloha.com")
TextWindow.WriteLine(h)

Output:
7

9. Mengkonversi teks ke uppercase
a = "aloha@aloha.com"
text.converttouppercase(a)

Output:
ALOHA@ALOHA.COM


10. Mengkonversi teks ke lowercase
a = "aloha@aloha.com" 
text.converttolowercase(a)

Return: lowercase version of a text

Output:
aloha@aloha.com

11. Mengambil karakter
 text.getcharactercode(

12. Mengambil kode karakter
text.getcharactercode(


Sound

Sound of chime, sound of bell

Contoh:

GraphicsWindow.MouseDown = mousedown

Sub mousedown
  Sound.PlayClick()
EndSub

Program object

1. Properties
program.argumentcount
program.directory

2.  Operations
program.delay
program.end
program.getargument

Tuesday 4 February 2014

Pemotretan mobil dari atas

GraphicsWindow.Show()
i = 0
awal:

gerak1()
Program.Delay(1)
gerak2()

If x[i] <> x[i+1] and y[i] <> y[i+1] then
TextWindow.WriteLine(i + "Mouse bergerak")
ElseIf x[i] = x[i+1] and y[i] = y[i+1] then
TextWindow.WriteLine(i + "Mouse diem")
endif

i = i + 1
Goto awal



Sub gerak1
  x[i] = GraphicsWindow.MouseX
  y[i] = GraphicsWindow.MouseY
EndSub

Sub gerak2
  x[i+1] = GraphicsWindow.MouseX
  y[i+1] = GraphicsWindow.MouseY
EndSub

Monday 3 February 2014

Struktur pemerintahan Indonesia


1. Membaca koordinat posisi mouse terhadap jendela grafik
2. Mendeteksi apakah mouse berada diatas suatu shape atau tidak
3. Mendeteksi apakah mouse bergerak atau tidak (diam)
4. Mendeteksi apakah tombol mouse ditekan atau tidak (release)
 

Meeting point: all graphicswindow event

GraphicsWindow.MouseMove = mousegerak
GraphicsWindow.MouseDown = mouseklik
'GraphicsWindow.KeyDown = tekankey
GraphicsWindow.TextInput = ejatext

Sub mousegerak
  TextWindow.Writeline("sumbu x: " + GraphicsWindow.mousex + " sumbu y: " + GraphicsWindow.mousey)
EndSub

Sub mouseklik
  If Mouse.IsLeftButtonDown Then
    TextWindow.WriteLine("Klik kiri ditekan boss...")
  Else
    TextWindow.WriteLine("Klik kanan bos...")
EndIf
EndSub

Sub tekankey
  TextWindow.WriteLine(GraphicsWindow.LastKey)
EndSub

Sub ejatext
  TextWindow.Write(GraphicsWindow.LastText)
EndSub
Shapes.AddRectangle(100,100)
start:


If GraphicsWindow.MouseX >= 0 And GraphicsWindow.MouseY <=100 Then
  textwindow.writeline("mouse diatas shape")
Else
  TextWindow.WriteLine("mouse tidak diatas shape")
EndIf
program.Delay(10)
Goto start


start:
If Mouse.IsLeftButtonDown then
TextWindow.WriteLine("TRUE")
else
TextWindow.WriteLine("FALSE")
endif

Program.Delay(100)
Goto start

Sub mousedown
  TextWindow.WriteLine("true")
EndSub


Detecting mouse movement with endless loop (goto)

start:
GraphicsWindow.Show()
x1 = GraphicsWindow.MouseX
y1 = GraphicsWindow.MouseY
Program.Delay(10)
x2 = GraphicsWindow.MouseX
y2 = GraphicsWindow.MouseY

if x1 <> x2 and y1 <> y2 Then
  TextWindow.WriteLine("mouse is moving")
Else
  TextWindow.WriteLine("mouse is still")
 
EndIf

Goto start

Program pencatat koordinat x dan y mouse terhadap graphics window (Small Basic)

GraphicsWindow.MouseMove = mousegerak

Sub mousegerak
  TextWindow.Writeline("kordinat mouse terhadap sumbu x: " + GraphicsWindow.mousex + " koordinat sumbu y: " + GraphicsWindow.mousey)
EndSub








Atau sederhananya:

GraphicsWindow.MouseMove = mousegerak

Sub mousegerak
  TextWindow.Writeline("sumbu x: " + GraphicsWindow.mousex + " sumbu y: " + GraphicsWindow.mousey)
EndSub

Sunday 2 February 2014


Array

Tugas-tugas yang bisa diberlakukan pada array:
1. Mendeklarasikan
-  Integer array
Int[] a = {10, 20, 30, 40, 50};

- an empty integer array
Int[] x = new int[5];

- String array
String[] angka = {"Satu", "Dua", "Tiga"};

- an empty string array
string[] angka2 = new string[3];

2. Mencetak isi array a
- satu persatu
System.out.println(a[0]);
System.out.println(a[1]);

- sekaligus [perlu for... each loop statement atau disebut juga advance for]
 Kebutuhannya:
- 1 buah temporary variabel, contoh: temp;
- Nama array yang mau dikerjain, contoh: a
-- jenis tipe data array itu: int

Contoh statement-nya:
for (int temp : a){
System.out.println(temp)
}
Output:
10
20
30
40
50

Two dimensional array
1. Mendeklarasikan
int[][] twodim = new int[2][2]