Friday 31 January 2014

Drag and Drop

a = Shapes.AddEllipse(100,100)
GraphicsWindow.MouseMove = mousemove

Sub mousemove
  While Mouse.IsLeftButtonDown
    Shapes.move(a, GraphicsWindow.MouseX, GraphicsWindow.MouseY)
  Endwhile
endsub




ketika dua event berjibaku

gw pengen discover: apakah suatu eksekusi suatu event bisa di interupsi oleh eksekusi event lain?

GraphicsWindow.Show()
GraphicsWindow.MouseDown = mousedown
GraphicsWindow.KeyDown = keydown

Sub keydown
  TextWindow.WriteLine("aloha")
EndSub

Sub mousedown
  TextWindow.BackgroundColor = "red"
  For i = 0 To 100000
    TextWindow.WriteLine(i)
  EndFor
EndSub

diatas kmu bisa lihat bahwa ketika gw klik mouse diatas jendela grafik, program akan mulai menampilkan angka di jendela text (textwindow), angka ini gw perbanyak dari 0 sampai seratus ribu, untuk memperlama waktu eksekusi sub procedure mousedown. Ditengah eksekusi sub procedure mousedown ini, misalkan ketika angka baru sampai angka 10000, 10001, gw tekan sembarang tombol pada keyboard, dengan tujuan mengintrupsi proses perlakuan sub procedure mousedown diatas, tapi gw tidak melihat adanya tampilan kata aloha, yang gw lihat hanya penerusan angka-angka tersebut.

Setelah angka 100000 lah gw baru melihat kata aloha diatas. Dari pengujian ini gw bisa melihat bahwa yang pengintrupsian subprocedure tidak bisa dilakuka.

Gambar biar gw jangan dibilang hoax:





Putting a text in the middle of a rectangle's shape

graphicswindow.

Intinya: suatu shapes rectangel tidak bisa diubah caption/textnya dengan menggunakan shapes.settext

LAB menghitung volume pori-pori tanah

Alat-alat:
1. Timbangan dijital untuk mendapatkan nilai timbangan yang lebih halus
2. Alat pemanas
3. Cawan porslen
4. Alat pengukur volume

Controlling the opacity of a shape using mousemove event

a = Shapes.AddEllipse(100,100)
GraphicsWindow.MouseMove = mousemove

Sub mousemove
  If GraphicsWindow.MouseX <= 100 Then
    Shapes.SetOpacity(a, 100)
  Else
    Shapes.SetOpacity(a,50)
    endif
EndSub

It used to be:
a = Shapes.AddEllipse(100,100)
Shapes.SetOpacity(a,50)
GraphicsWindow.MouseMove = mousemove

Sub mousemove
  If GraphicsWindow.MouseX <= 100 Then
    Shapes.SetOpacity(a, 100)
  Else
    Shapes.SetOpacity(a,50)
    endif
EndSub

Final:

Thursday 30 January 2014

Ilmu Pertanian

Pertanian adalah usaha manusia dalam mengelola sumber daya hayati untuk menghasilkan bahan pangan, bahan baku industri, atau sumber energi.

Contoh bahan pangan: pertanian padi
Contoh bahan baku industri: pertanian karet sebagai bahan baku ban, pertanian sawit sebagai bahan baku mentega atau minyak makan.
Contoh sumber energi: pertanian tanaman jarak

Basic Electronic

Reading, writing, arithmatic and electronic

1. Bread board
2. Digital multimeter
3. Power supply: variabel power supply: 0 - 30v , dual power supply: -15 - + 15 v and fixed 0 to +5v power supply

Dissecting an engine

The basic parts and their function.

This concept can be applied to almost anything

16 DOHC (Dual Over Head Car) engine

Under the hood:
1. Four cylinder engine
2. Air filtering housing
3. Battery
4. Fuse boxes
5. Relay boxes
6. Alternator
7. Water pump
8. Radiator
9. Powersteering
10. Wipermotor
11. Horn
12. ABS

Menggambar bentuk dengan small basic

1. Menggambar elips dan bulat

a.  Menggambar elips
- dengan menggunakan parent shape
Shapes.AddEllipse(100,50)

Output:

- dengan menggunakan parent graphicswindow
GraphicsWindow.DrawEllipse(0,0,100,50)

Output:

b. Menggambar bulat
- dengan menggunakan parent shape
Shapes.AddEllipse(100,100)

Output:

- dengan menggunakan parent graphicswindow
GraphicsWindow.DrawEllipse(0,0,100,100)

Output:

2. Menggambar petak (rectangle)

- dengan menggunakan parent shape
Shapes.AddRectangle(100,100)

Output:

- dengan menggunakan parent graphicswindow
GraphicsWindow.DrawRectangle(0,0,100,100)

Output:

3. Menggambar segitiga

 - dengan menggunakan parent shape
Shapes.AddTriangle(0,100,50,0,100,100)

Output:


- dengan menggunakan parent graphicswindow
GraphicsWindow.DrawTriangle(0,100,50,0,100,100)

Output:




Kesimpulan

- Kamu lihat bahwa menggambar bulat dan menggambar elips sama-sama menggunakan perintah elips?
- Kamu lihat bahwa menggambar dengan graphic window tidak mengarsir dan menggambar dengan shape selalu mengarsir?


Tambahan sedikit:

GraphicsWindow.BrushColor = "Black"
GraphicsWindow.PenColor = "red"
Shapes.AddEllipse(100,100)

Output:

 




Distance vector routing protocol
- RIP is product that inherit distance vector specification.

Loop avoidance
- Split horizon: prevent route information packet received from one interface to go
- don't turn it off.

Specific distance vector
- route poisoning


RIP
- doesn't converged quickly; the routers don't agree quickly


Routing troubleshooting tools:
1. show ip protocols
2. 

Wednesday 29 January 2014

Tipe pekerjaan

Pilih pekerjaan yang tidak ada dead-line

hidden picture

hjvkhv
jbkjbkjb
kjbkjbkjbk
jkjbkjbkjb
kjbkjbkjbkjb
kjbkjbkjbkjb
jkkjbkjbkjbkjbkjbkjb
kjbkjbkjb
kjbkjbkjb
kjbkjbkjbk
kjbkjbkjbkjbk
kjbkjbkjbkj
kjbkjbkjb
kjbkjbkjbkjb
kjbkjkjbkjbkjb

My-first add/subs click program

val = Controls.AddTextBox(0,0)
Controls.SetSize(val, 100, 50)
add = Controls.AddButton("+",300,0)
subs = Controls.AddButton("-",400,0)

Controls.ButtonClicked = process

Sub process
  If Controls.LastClickedButton = add then
    val1 = Controls.GetTextBoxText(val)
    val1 = val1 + 1
    Controls.SetTextBoxText(val, val1)
  Else
    val1 = Controls.GetTextBoxText(val)
    val1 = val1 - 1
    Controls.SetTextBoxText(val, val1)
  endif
 
EndSub

Tuesday 28 January 2014

File Input and output LAB

Properties:
file.lasterror(

Operations:
file.readcontents
file.writecontents
file.readline
file.writeline
file.insertline
file.appendcontents
file.copyfile
file.deletefile
file.createdirectory
file.deletedirectory
file.getfiles
file.getdirectories
file.gettemporaryfilepath
file.getsettingsfilepath()

Bahan-bahan:
1. Sediakan sebuah file text kosong
2. Sediakan kata-kata yang akan dimasukkan

Remark:
1. jika file tidak ditemukan akan membuat file baru:
2. linefile dimulai dari angka 1
3

Write a program that performs the following steps:
  • Requests a suitable name for a directory from the user, and creates a directory of that name.
  • Downloads a file from the network, and copies it to the new directory.
  • Displays the contents of the downloaded file in the text window.
  • Accepts additional content from the user, and adds it to the file.
  • Displays the final content from the file in the text window.

Words: above, through, on, inside, up, within, down, beside, below placement


File lab

1. Read a file on a disk
How?


1. Sebelum n berubah nilai, lakukan apa yang harus dilakukan
jawab: sebelum nilai n berubah, nilai dari variable sum harus berubah

n = 0

- Program computer mempunyai kemampuan untuk mengambil nilai yang sebelumnya disimpan dan ditambahkan seperti ini: n = n + 1 atau ini: sum = sum + n

Dibandingkan dengan menggunakan array, cara seperti ini masih tergolong kurang efektif. Karena kamu hanya bisa mengambil satu nilai sebelum.

Jika menggunakan array, kamu bisa mengambil satu, dua, tiga nilai sebelum.






1. Pertama, asumsi,
2. Bangun tabel untuk memperlihatkan perubahan


Lihatkan perubahan:


Ambil kesimpulan

4.

Monday 27 January 2014

How to transform your hoodie into a cute computer sleeve?

1. Jumlah gaji = 4 juta 500 perbulan, berapa jumlah gaji perhari kerja perbulan seorang karyawan?
Solusi:
Satuan jawaban = Rupiah / hari
Cara 1 (gampang)
1 bulan = 4 minggu
kerja dari senin - jumat
45 juta /

2. Jika jam kerja Dodi dimulai dari jam 7, jam berapa Dodi pulang, jika dia kerja selama 8 jam?

Flowchart

1. sequential process to be done
2. Flowchart generally done in the early stage of programming a program

Plain

a = Shapes.AddEllipse(100,100)
GraphicsWindow.BrushColor = "red"
b = Shapes.AddEllipse(100,100)
GraphicsWindow.BrushColor = "Green"
c = Shapes.AddEllipse(100,100)
start:
Shapes.Move(a, 500, 0)
Shapes.Move(b,0,100)
Shapes.Move (c, 250,0)
progdel()
Shapes.Move(a, 400, 0)
Shapes.Move(b,100,100)
Shapes.Move (c, 250,100)
progdel()
Shapes.Move(a, 300, 0)
Shapes.Move(b,200,100)
Shapes.Move (c, 250,200)
progdel()
Shapes.Move(a, 200, 0)
Shapes.Move(b, 300,100)
Shapes.Move (c, 250,300)
progdel()
Shapes.Move(a, 100, 0)
Shapes.Move(b, 400,100)
Shapes.Move (c, 250,400)
progdel()
Shapes.Move(a,0,0)
Shapes.Move(b, 500,100)
Shapes.Move (c, 250,500)
progdel()
Shapes.Move(a,100,0)
Shapes.Move(b, 400,100)
Shapes.Move (c, 250,400)
progdel()
Shapes.Move(a,200,0)
Shapes.Move(b, 300,100)
Shapes.Move (c, 250,300)
progdel()
Shapes.Move(a,300,0)
Shapes.Move(b, 200,100)
Shapes.Move (c, 250,200)
progdel()
Shapes.Move(a,400,0)
Shapes.Move(b, 100,100)
Shapes.Move (c, 250,100)
progdel()
Shapes.Move(a,500,0)
Shapes.Move(b, 0,100)
Shapes.Move (c, 250,0)
progdel()
Goto start
Sub progdel
  Program.Delay(1000)
EndSub


HAPPY 500 blog post!

HAPPY 500 blog post!

Sunday 26 January 2014

Multiples of 9 works in reverse order!

Don't be a coward

Programan bergerak (animasi) dan small basic

1. Garis bergerak lurus
for i = 1 to 10000
x1 = i
y1 = 0
x2 = x1 + 1
y2 = 0
graphicswindow.drawline(x1, y1, x2, y2)
Program.Delay(100)
endfor

atau

For i = 0 To 1000
if i = 0 Then
  x1 = i
Else
  x1 = i * 10
EndIf
y1 = 10
x2 = x1 + 10
y2 = 10
Shapes.AddLine(x1, y1, x2, y2)
Program.Delay(10)
EndFor

2. Shape bergerak
- shape rectangle bergerak


- shape triangle bergerak



3.

Thursday 23 January 2014

Pembibitan sawit

Fase 1 - Polibek kecil
Masa: 3 Bulan
Treatment:
- Pupuk daun
- Pupuk hama
- Penyiraman = harian

Fase 2 - Polibek besar
Masa: 1 Tahun
Treatment:
- Penyiraman = harian

Wednesday 22 January 2014

Pronoun

Burung

Burung-burung membutuhkan tempat untuk makan (pangan), tempat untuk bermain, dan tempat untuk berlindung (papan).

Burung menyukai biji-bijian dan bunga yang bisa diserap madunya atau sebagai makananya. Berikut kompilasinya.

Pohon yang bisa memikat burung-burung untuk hinggap:
1. Sawo kecik,
2. Salam
3. Sarikaya
4. Nangka
5. Rambutan
6. Talok
7. Jambu ari
8. Jamblang
9. Durian
10. Jambu air
11. Belimbing
12. Kemang.

Tanaman hias yang disukai oleh burung:
1. Dadap merah
2. Bunga kupu-kupu
3. Sikat botol
4. Kamboja
5. Bambu kuning
6. Kenanga
7. Nusa indah
8. Palem merah
9. Asoka.

Pohon-pohon penyedia material sarang
1. Pohon aren
2. Cemara

Sunday 19 January 2014

Translator(compiler) vs interpreter

Interpreter
- Does what the program says to do

Compilers
- Convert from high-level, human readable language into a lower-level language (sometimes as low as native machine code)

CPU
- the fundamental operation of a CPU is to execute a sequence of stored instructions called a program. The program are kept in some kind of computer memory.
- CPU hanya mengerti bahasa biner (bahasa mesin). Jadi program perlu dikonversi ke bahasa mesin. Siapa yang mengkonversikan program itu ke bahasa biner?
- four steps: fetch, decode, execute, and writeback
: fetch: take the program from memory

RAM

- Instruction address
- Memory address

Chapter 9 Subroutine

Chapter 10 Array

Chapter 8 Turtle Graphics
- Moving and drawing
- Drawing square
- Changing color


Chapter 6 Beginning graphics

Showing graphicsWindow
GraphicsWindow.Show()

Setting up graphics window
Graphicswindow.backgroundcolor = "SteelBlue"
Graphicswindow.Title = "My Graphic Window"
GraphicsWindow.Width = 320
GraphicsWindow.Height = 200
GraphicsWindow.show()

We can draw line, shapes, text and picture.
Drawing lines
Example drawing line:
GraphicsWindow.DrawLine(0,0,10,10)

Drawing shapes:
Shapes = rectangle, ellipse, triangle

Example drawing rectangle:
GraphicsWindow.DrawRectangle(100,100,10,10)

Example drawing ellipse
GraphicsWindow.DrawEllipse(10,10,100,100)

Example drawing triangle
GraphicsWindow.drawtriangle(200,200,300,300,400,400)

Change shapes line color:
graphicswindow.


Filling shapes
Shapes = rectangle, ellipse, triangle

Example filling rectangle shapes:
GraphicsWindow.fillrectangle(

Example filling ellipse shapes:
GraphicsWindow.fillellipse(

Example filling triangle ellipse

Change shapes brush color
GraphicsWindow.Brushcolor = "Green"





Usage:
GraphicsWindow.Drawline(starting x coordinates, starting y coordinate, ending x coordinate, ending y coordinate)

Example:
- Changing pen color
GraphicsWindow.pencolor = "Green"
or
GraphicsWindow.pencolor = #FF0000

- Changing pen thickness
GraphicsWindow.PenWidth = 10

- Drawing and filling shapes
Draw operations, and
Filling operations

Draw operations: draw the outline of the shape using a pen
Filling opearations:  paint the shape using brush

Chapter 5 Loops
there are usually several ways of doing the same thing.

1. For.. Endfor
For loops run for a pre-defined number of times.

For i = 0 to 4
    textwindow.writeline(i)
endfor

for i = 0 to 4 step 2
    textwindow.writeline(i)
endfor

2. While loop
While loop runs until a given condition achieved / true.

Chapter 4 Conditions and branching
If(condition) then ... endif
If(condition) then ... endif

Chapter 3

Chapter 2 Understanding Our First Program

Chapter 1

 

What's the trick?

Study of the trick