Monday, November 17, 2014

Delphi: Click a Cell on Stringgrid to Toggle its Value

Here we are. The code below is a part of (unfinished) array of JK flip-flop that draw the output on stringgrid. The problem is, we want to change input (J and K) at  the runtime which is easy if the code is not flexible (just add several button), but as we can see, the code is flexible so there is big no no for the manually added button. So we want to click the corresponding cell and the value changed (in this case toggled, 1 to 0 or otherwise).

Here the code

Sunday, November 16, 2014

Digital Counter with Reset and Preset/Clear

This code's updated version from flexible one (whic is by itself is updated version from this) :) .

It has added feature so we could reset the counter if it reach a certain denary (decimal, it is :) ) and preset it to certain denary.

To be able to do that we have to convert the denary to binary and distribute it among Q[0] to Q[n-1].

Arsip Elektronika Digital

(Untuk mempercepat waktu load di laman Digital)

Digital in Delphi

Berikut adalah kode counter normal 3 bit. (Kode terbaru untuk counter dengan procedure rekursif dan jumlah bit yang fleksibel dapat dilihat di sini

Friday, November 14, 2014

Discrete Fourier Transform

It's not flexible one.

Discrete Fourier Transform in Delphi (in progess)

Here we go...

I plan to coding it in a way that it has flexibility in term of function. So I create two variable ft and ff, represent time domain and frequency domain function as two dimensional array, with the first index as 'function name' so it can be (in future) ft[0,i] as rect(x), ft[1,i] as cos(x) and so on.

Thursday, November 13, 2014

Flexible Digital Counter using Delphi (with Recursive Procedure)

Updated version from before


Recursive Procedure on Delphi.

Yup, recursive procedure (not recursive function, :) ).

I use it to create a simulation about digital asynchronous binary n-bit counter, complete with the denary representation.

n-bit means it's very flexible, you can change n and its output (stringgrid, thats it) automatically adjust itself, :)

Here's the code


Monday, November 10, 2014

Blend It, :)

I like pineapple, apple too, uhm, guava yeah, red watermelon, yellow watermelon and mango. 

Yeah, I could eat them all day long. I still can stand it; even there's no any rice to eat, provided I have access to that heavenly fruits, :)

I urge you to eat that too, one at a time. Unlike me, blend it together, :)

Eh, wanna try? Don't, :D


Friday, November 7, 2014

iOS and OS X's Note

Want to edit Pages document 'on the fly' but don't have a Pages on iPhone? It's OK.

Copy the content of your Page document by select all -> copy, then paste to Note app on OS X. Wait a moment, it will sync with the Note app on iPhone, complete with the formatting and the images, :)


Tuesday, November 4, 2014

Dangerous Move

Pagi ini, saat berangkat ngampus, di pintu keluar Lembah Dieng ada penumpukan kendaraan karena ada yang pengendara sepeda motor menyeberang dengan cara eksotis, tidak tengok kiri-kanan.

Mungkin hal yang biasa bagi dia menyeberang seperti itu, dan dia beruntung masih hidup hingga kini. Tentu saja ada efeknya bagi kami, pengguna jalan lain. Sebuah Ayla kinclong mengerem secara mendadak dan, mungkin karena gugup atau memang baru belajar nyetir (Ayla baru :) ), mobil itu mati mendadak. Panik susah hidup dan macetlah jalan.

Nah, ada seorang bapak muda tanpa helm mengajak anaknya naik sepeda motor matic, umur sekitar satu setangah tahun, tanpa helm juga. Tentu saja terjebak kemacetan kecil itu, menyuruk mencari celah-celah sempit sehingga berakhir tepat disampingku, setengah meter lebih jauh dari tempat sebelumnya, :)


Friday, October 31, 2014

My New Toys, :)

Action Script3

(just for self documentation)

Notice how it differs from ActionScript 2, onRelease, onEnterFrame stuff.

Anyway, I'll tinker with this for next couple days, because it could be published as androidApps.apk via Adobe Air, for iOS too.