Wednesday, November 30, 2011
SRT Synchronizer
SRT (SubRip Subtitle File)
What is .SRT file ??
.SRT is Text file containing subtitles used by various video playback programs; supported by DivX, DVD, and other video formats; includes the time each subtitle should be displayed followed by the text of the subtitle.
Subtitle files are often named according to the language of the subtitles, i.e. "moviename.eng.srt" for English and "moviename.ger.srt" for German subtitles.
NOTE: SRT files are text files used in video playback. Therefore, they do not contain any video data.
Different movie files may has different time frame, in spite of the same movie content. So if we get the wrong SRT file, the dialogue will be displayed not in the right time. SRT Synchronizer is my homemade PHP application which can be used to synchronize the srt file which having issue with time frame.
Since SRT is a regular text file, you can be easily opened and edited using notepad.
Please visit my SRT Synchronizer at http://bayu.nasigudeg.com/srtsynch/
Tuesday, March 22, 2011
Katamari Ball on Browser
javascript:var i,s,ss=['http://kathack.com/js/kh.js','http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js'];for(i=0;i!=ss.length;i++){s=document.createElement('script');s.src=ss[i];document.body.appendChild(s);}void(0);
*for you who didn't know what is address bar, it is a text field where you usually put web address, such as http://bayukw.blogspot.com
Friday, May 21, 2010
to become a “great” writer
When asked to define "great" he said "I want to write stuff that the whole world will read!! Stuff that people will react to on a truly emotional level, stuff that will make them scream, cry, wail, howl in pain, desperation, and anger!"
He now works for Microsoft writing error messages.
PS: I got this joke from my colleague... :D
Saturday, April 24, 2010
Facebook Social Plugin - Like Button
Facebook akhir-akhir ini merilis Social Plugin. Jadi semacem Plugin yang bisa dipake untuk mengkonekan web application kita ke facebook. Basically menggunakan iFrame, tapi hadir juga dalam XFBML (subset FBML untuk Facebook connect). Social plugin nya itu ada banyak sih ga cuma like button, cuma aku ga akan ngejelasin semua. Bisa liat sendiri ya disini http://developers.facebook.com/pluginsPresentasi ku di MACO tentang Facebook Application
Aku habis presentasi tentang facebook application di MACO, komunitas sharing knowledge di kantor ku, tiap jumat jm 7.15 wita. Itu juga karena udah terlanjur meng-iya-kan untuk gantian mengisi maco jadi pembicara sekali-sekali, dan jatah ku jumat tadi malam.Kalo bwat aku sendiri sih yang namanya facebook application itu ya application yang ada di dalam facebook. Misalnya aja http://apps.facebook.com/bayulearnstorock/ . Ya sekedar membedakannya dengan aplikasi yang menggunakan facebook connect lah (misal: http://www.formspring.me/bayukw). Tapi sekali lagi ini anggapan aku aja.
Thursday, April 8, 2010
CSS Hack
Saturday, March 20, 2010
dunia persilatan (*koding) makin berbahaya....
duh padahal ilmu ku belum ada apa-apanya, gawat ini...
mungkin ada beberapa opsi sih...
udah gitu yang aku bikin cupu2 pula (bwat self learning aja soalnya), just click to see...
- cakePHP as PHP framework --> Semacem contact manager
- Axure --> prototype smacem Web 2.0 application (not yet uploaded)
- Adobe Flex --> semacem situ tebak-tebak / berbagi tebakan bersama teman
- Facebook Application --> semacem toko online (di combine pake cake php n paypal)
semoga ga jadi presentasi... :P
Monday, March 1, 2010
Mitrais Junior Programmer Recruitment
Here is what the email said:
----------------------------------------------------------------------------------------------
Dear all,
Kindly be informed that our next intake for Junior Programmer will start on 19th April 2010.
Please kindly check your contacts, friends or colleagues that would be interested to join us as Junior Programmer. The series of the recruitment roadshow is below:
Please inform them to apply online thru: http://careers.mitrais.com/default.aspx for Fresh Graduate position. For those who haven’t had chance to apply online, they could also attend on the day of the roadshow.
Thank you for your help.
-----------------------------------------------------------------------------------------------
For you who interested, come and join us...
for detailed program information, you can read here http://careers.mitrais.com/Page/InductionProgram.aspx
See you in Bali.... :)
Tuesday, February 9, 2010
Coding, ngetik, atau ngapain aja sambil dengerin and nonton video clip



Yap, segitu aja. Rada jadul sih yang beginian tapi kadang aku suka lupa konfigurasinya kalo abiz install ulang. hehehe... :)
Monday, February 8, 2010
Friday, January 29, 2010
Menghilangkan objek pada gambar dan mengisinya dengan background
Ilustrasinya seperti ini
menjadi 
Cara kerjanya sebagai berikut:
1. Gambar di load.



Untuk perhitungan matriks dan vector tidak aku tampilkan disini karena aku yakin banyak kog artikel tentang itu dan mungkin lebih lengkap. Silakan searching sendiri.
Jadi ide dasarnya itu merecovery gambar yang hilang dengan menganalisis keseluruhan image untuk mendapatkan pola pengganti potongan image yang hilang. Cocok untuk mengembalikan foto2 tua yang sudah mbladus, jamuran, dan lain-lain. Tapi bisa juga khan di pakai untuk menghapus objek pada foto. Misalnya saja menghapus foto mantan dari gambar dan menggantinya dengan background. wkwkwkwkw.... :D
*lelucon sang presenter lho... bukan lelucon saya pribadi.... :P
Makasi utk senior ku Teguh Suryadi (anak UKDW juga angkatan 2001 tapi jadi ga sempet ketemu waktu kuliah karena dia udah lulus saat aku mulai kul di UKDW) udah mau bagi2 ilmu. Aku cuma mengulang materi yang dia sampaikan tadi.... :)
thanks for reading.
Monday, January 25, 2010
Tree Helper on Cake php
What we have to do is just add 3 columns with int type to save the tree structure information. Those three columns were parent_id (refer to the primary key of its parent), left and right (to save the next and previous node, I think). Once you have made this, don’t forget to configure the model and controller. I didn’t want to talk much about the code, because you can learn it by your self at cakePHP website, and it pretty easy to learn from there.
Data without parent_id will be treated as parent node and cake will seek the children where it has it primary key as parent_id on it. The parent_id is the only field that we must assign the value by ourselves and for the left and right column it will be automatically being populated by the cake.
It was so simple to manipulate and retrieve data from the tree. To alter the parent, we just to assign new value to parent_id and it done. Same also for the addition data, just give the value on parent_id. But be careful, when you delete a node, cake will also automatically delete its entire child. In my application, before deletion taking place, I assign the child’s parent_id to null in order to prevent the children being deleted.
Cake also provides you some function to get information of entire child of a node, including the children of its children. And there is also function to get the entire parent, including the parent’s parent. I used to manage tree of data in database too for my thesis. And this kind operation needs to be recursive and querying several times. But cake makes that looks easy. I’m pretty sure, that behind the cake function it also has the same complexity.
When you change or add parent information, we must extra careful because we can accidentally make a loop. For my thesis I used some kind of hand made complex function just to check is there any loop would happen if I alter / add the data. Just for preventing my application trapped in infinity loop in the future. In the cake, when I try to make a loop. It automagically deny to save. Quite smart framework didn’t it?... :D
The cake can also able print the tree structure but I admit that it is very ugly. Cake use spaces by default. But I successfully modify it using some kind of plugin, instead of spacer, it will use tag html for list. With little modification like that, now you can combine it with JQuery to make the tree looks more interactive.
you can click on the title and you will get redirected to cake php website
Friday, January 22, 2010
aku, ATM, dan Tips dari teman...

karena maraknya pembobolan ATM maka hari ini aku berniat mencek saldo ATM ku. Tadinya aku gak begitu khawatir karena sebagian besar korban adalah nasabah BCA. Tapi tadi siang aku baca-baca berita di detik yang menyebutkan bahwa ada juga sebagian korban dari bank lain yaitu salah satunya BNI. Karena lokasinya juga di Bali, aku jadi semakin was-was. jadi ya sudah di cek saja.
Siang sebelumnya salah satu temanku memberi tahu kalo salah satu cara yang aman agar tidak bisa terbajak ATM kita adalah dengan cara memasukan kembali kartu kita menekan tombol pin acak dan tekan cancel untuk membatalkan. Hal ini dimaksudkan untuk membuat cache (sisa data yang masih tersimpan pada memory) angka pin kita jadi ikut teracak. Aku juga sempat mencari2 artikel pembobolan ATM tersebut dan aku mendapatkan salah satu cara mereka adalah menggunakan magnetik card (harganya cuma 1 jt-an). Sang penulis artikel mengaku sering mencurangi pelaksanaan ujian (mengkloning kartu mahasiswa), dan kata dia hal itu juga bisa diterapkan untuk mesin ATM. Jadi intinya, tanpa kartu ATM kita pun mereka bisa login dengan magnetik card tersebut ke ATM. Satu-satu nya hal yang menghalangi mereka dari mencuri uang kita adalah nomor PIN... nah nomor pin ini disinyalir oleh pihak terkait di dapat dengan cara mengintip saat kita memasukan nomor atau memasang kamera tersembunyi dan yang paling buruk... memanfaatkan cache PIN pengunjung ATM sebelumnya yang masih tersimpan. Meski cache ini hanya mampu menyimpan satu informasi PIN tapi cukup berbahaya jika kita tepat mengantri didepan sang pencuri. Oleh sebab itu lah teman ku memberikan rekomendasi untuk memasukan ulang kartu, menekan tombol acak utk pin, lalu tekan cancel.
Bermodal motor pinjaman teman aku meluncur sepulang kerja sore ini. aku mencek saldo ke ATM dekat kost. Sambil setengah ngantuk (semalem kurang tidur) dan setengah was-was aku mencek informasi saldo. Alhamdulillah tidak terjadi apa-apa. mumpung di ATM aku pun sekalian inisiatif mengambil sejumlah uang. Aku hampir lupa dengan tips teman ku tadi tapi aku ingat tepat di detik-detik terakhir. Lalu aku pun memasukan kembali kartu, menekan sembarang pin sampai maksimal (pin di bank ku maksimal 6 karakter). Tepat setelah 6 karakter ternyata langsung keluar pilihan ganti pin atau lanjutkan seperti biasa. Sesuai instruksi aku pun tidak melanjutkan dan menekan cancel. Waw ternyata benar ya. Aku pencet asal-asalan dia tetep masuk. Berarti apa yang di katakan temanku ada benarnya.
Untuk sekedar memastikan aku iseng memasukan kartu lagi dan menekan tombol acak dengan harapan, terjadi pesan error. Tapi coba tebak. Ternyata masih tetap keluar pilihan ganti pin atau lanjutkan. padahal ini sudah kali ketiga aku memasukan kartu dan kali kedua aku memasukan pin acak. Lalu kenapa masih bisa masuk ya?????....
Benar-benar aneh.. jangan2 memang tidak bisa menghapus cache pin di mesin ATM hanya dengan memasukan pin sembarangan. Menurutku ini sangat berbahaya. Apalagi kalo orang yang antri dibelakangku memiliki magnetik card.
Dengan terbingung-bingung aku bersiap beranjak dari ATM. Lalu aku teringat, oia aku khan tadi ambil uang. Aku pun mengintip di bagian dari ATM ini yang biasa mengeluarkan uang. Tapi tidak ada uang yang terjepit disitu. Gara2 ngelamunin ATM dan beberapa kali login ATM jangan-jangan uang itu ditarik/masuk lagi ke badan ATM. gawat... benar2 gawat...
dengan wajah lunglai sedih aku keluar ATM....
aku kemudian mampir toko swalayan untuk beli beberapa barang. Lalu aku liat dompet ku dan berusaha mengingat-ingat. Oia, ternyata benar seharusya di dompetku uangnya tidak segini, seharusnya lebih sedikit. Sepertinya tanpa sadar pikiranku ternyata multi tasking mengambil uang dari drawer ATM sambil memikirkan pembersihan cache pin di dalam ATM tadi. untunglah... :D
( --- Revision -- )
Tulisan dibawah ini ku tambahkan sehari setelah posting yg diatas...
Pagi nya aku mau ke kantor pos bwat kirim barang. Lalu ketika lewat di deket ATM kemarin ra penasaranku muncul lagi. Apa iya sistem keamannya selemah itu?
sepulang dari kantor pos aku mampir ke ATM dan men-cek saldo dan mengambil uang. Ya sekalian jaga2 lah kalo2 ada hacker yang menguasai dunia kayak di film2 atau ATM di seluruh Bali tiba2 down, aku masih punya uang di dompet. Coz kebiasaanku itu didompet duitnya nge-press kalo butuh ya ke ATM... :P
Setelah traksaksi, aku mencoba tips teman ku itu lagi. Aku masukan kartunya dan menekan sembarang pin. Kali ini aku menekan lanjutkan dan keluarlah berbagai macam menu2 traksaksi itu. Lalu aku coba pilih salah satu transaksi. ternyata pesan error pin salah keluar setelah kita menjalankan salah satu transaksi.
Jadi kemungkinan si ATM selalu menyimpan informasi pin di memorynya karena dia harus mengirimkan nomor pin ketika dia merequest permintaan service ke server. Itu lah mengapa dia perlu selalu menyimpan pin dan pesan error baru keluar setelah kita akan melakukan transaksi. Jadi memang sih kita masih bisa menjelajah menu2 dengan pin salah, tapi saat request service untungnya error.
Ya dengan begini sedikit memberikan rasa aman lah... :)
E-mail Obfuscator
apa itu E-mail Obfuscator??....
lalu aku coba googling saja dan menemukan...
E-mail Obfuscator is an online tool for webmasters that obfuscates e-mail addresses that you enter, making them less vulnerable to spammers who use e-mail harvesting software, also called spam-bots.
jadi semacem tool yg dipakai bwat menyamarkan alamat email yang kita masukan agar tidak mudah di sadap oleh spammers.
spammer itu bots yg biasanya membaca alamat email yang lalu lalang terus dia menyimpan-nya. kemudian mengirimkan email spam (email gak penting kayak promosi, email tipu2 menang kuis, dll) ke semua alamat email yg dia punya.
(*niat promosi tapi malah mengotori inbox email saja)
(*bots --> web robots, aplikasi yg berjalan otomatis melakukan tugas2 rutin berulang di Internet)
Lalu bagaimana obfuscator berkerja?
dia merubah text email jadi tag html khusus yang enggak gampang di copy paste sama spammer itu tadi tapi tetap dapat di baca dengan baik oleh browser.
misal abcd@abcd.abc
dirubah jadi \u0061\u0062\u0063\u0064\u0040\u0061\u0062\u0063\u0064\u002e\u0061\u0062\u0063
perhatikan polanya...
a --> \u0061
b --> \u0062
c --> \u0063
mirip2 pola ascii, tapi kalo nggak salah yg beginian namanya itu unicode
kalo mau coba2 enkripsi obfuscator bisa buka ini...
http://www.codehouse.com/webmaster_tools/email_obfuscator/
tapi ada juga pola yang beda
misal
sam@sam.com dirubah jadi:
sam@sam.com
s --> s
a --> a
m --> m
artikel pola yg ini bisa di baca di
http://encyclopedia2.thefreedictionary.com/e-mail+obfuscator
tapi aku sendiri juga engga tau itu valid apa enggak?...
tolong beritahu jika salah... :D
My Current Work…
I’m programmer armed with basic programming ability and some networking things. My programming language was just C++, php, and java. My collegians also get some .NET technology but unfortunately I never had one because my majority was networking. Why I become a programmer and not a network practice? That also a big question for myself. Maybe because I like it somehow. Hahaha… I should know it from the beginning, not turning at the very end of study.
I was graduated at November 2009 I got my job at October 2009. Me and my friends usually make a joke that when we graduate from college, the actual meaning of Rector move the “hat string of toga” is change your status from student into unemployed, But I got lucky back then. I just skip my unemployed phase. J
At that October I was accepted in an IT corporate in Bali. The real mother of this corporate is a big mining company in aussie. Then they made a mining company branch in other country, such as Indonesia. Since the software request is quite huge for this Indonesian mining company, so the Indonesian mining company made a branch that specially handle the software development. As the profit from developing software was getting bigger and bigger, the IT branch ate her own mother (taking over the company). So actually it is a kind of big local IT corporation but manage by the Australian. Our clients usually are also Australians.
They gave me three month training. This training standardizes their entire programmer at the same minimum level of every programming language. This is good because I had the opportunity to learn .Net technology (I’m complete now). Beside language skill, they also teach us development pattern that usually used for enterprise scale application with large groups of programmer. They open my eyes into framework technology with Model-View-Controller Concept and “3 layers” concept (Data Access, Business Logic, and Presentation). Usually we just didn’t care the theory at college, now I see why the lecturer told us this is important.
I had my java skill upgrade by implementing hibernate, spring, and struts framework. Some php framework (I told you later). Play around with .Net technology (including the newest technology: WPF and silverlight). And the old prehistoricall cobol language.
After the long long training, I was assign to WTP division. It’s not “What The Puck” but “Web Technology Programmer”. Hmm… Three month training just sends me back to Web again. From the entire trainee, It just me who assigned there. This division has very few programmers, imagine, it even less than twenty. But the senior next to my cubicle was a monster, he master the php frameworks such zend, symfony, and he now build application for iPhone. I’m so junior here.
At this January, this is my actual day of work. Since there is no new project, so my manager told me to learn PHP Framework called CakePHP. I ever use this kind of framework named code igniter. The basic use of MVC framework is we don’t use the old style spaghetti code where we mix the html tag, the logic (like user authentification), and data access (querying) into one single file. Now, we split it into 3 kind components. The Controller was acting as the main brain, the model is the data access, and view as the presentation. For example when we called a page to show our profile, the controller will examine whether the user has been login or not, if not user will be redirected to login form, if already login, the controller will call the model to retrieve data from table with specific username and load data into view and give us the view contain data.
There are some extra features such as scaffolding. This feature will read the database and give you access to CRUD (create read update delete) data in tables. If you use apache mySql, it just like the phpMyAdmin page, but this one is generated by the framework. Actually this is done by just enabling (on/off) on the framework. Both CI (code Igniter) and Cake (cake PHP) have this feature. If you think it over again, it doesn’t really useful right. Because there are no actual pages that created so we can’t modify anything. We can’t edit the logic, can’t edit the themes, add or remove some fields from being shown.
Cake has a console mode and in this mode there are some commands. One of my favorite commands is to generate the CRUD pages. Just few configurations to set the database connection and every models, views, and controllers for any table are automagically done. We can modify these pages as we want. Unfortunately CI didn’t have this feature, but you can install a third party plugin called code crafter if you want to generate CRUD. But I didn’t know whether CI Code Crafter able to read the join relation between tables like cake did. Cake also has ACL (Access Control List) features to control which group of user are allowed to access a specific controller function. This is useful to handle the group user that you want to give privileges. For example if you only want group of admin that able to add and delete a post, just set the ACL. ACL can be configured using “ini” file or using database. In my assignment I used database because if we have hundreds functions, It would be pain to set one by one.
My “self learning” about cake basic and ACL is making a simple contact manager where admin can add and delete new contact. Everyone who has a contact can login and edit his/her profile but not the username and group (it will be ridiculous if regular user can edit his/her group, coz everyone would like to be an admin). Admin can manage group’s information and edit everyone’s profile. I also add some JQuery for displaying profile photo on username link tool tip and some datepicker. I found some troubles back there where linking image on css and javascript because both didn’t refer the cake webroot as default root, but I solved it using vHost setting on my apache. My simple application was finished at previous Thursday. Now, I am learning to use nested directory feature. I don’t know why my manager wants me to dig deeper into cake. Maybe he want his team has at least one expert for each framework because my senior also expert on specific framework like zend, simfony, code igniter, etc.
(dipindah dari blog yg lama, original Posted : January 16, 2010)
Data Disaster……
Banyak bencana alam yg menelan banyak korban jiwa seperti gempa, tsunami, dan sebagainya. Tapi Bagi orang IT ada satu jenis bencana lagi yang menelan banyak korban Data yaitu “Data Disaster…”. Saya sendiri merupakan saksi hidup dalam Data Disaster yang menimpa komputer kesayangan saya beberapa hari lalu.Bencana ini dah yg kedua kali menimpa komputer ku dan tragisnya dengan modus operandi yang sama. Di sore hari yg cerah, aku menyalakan kompi ku tercinta. Biasanya dia memainkan sepotong mp3 saat masuk fase logon. Tapi kali ini dia diam membisu. Seketika aku menganalisis penyebab dia diam membisu, dan menghasilkan beberapa kemungkinan :
- Kabel speaker belum nancep ke saklar listriknya
- Jack output dari kompi ke speaker kecabut
- Sound card kompi ku error
- Data lagu tidak ditemukan
Dan begitu horror saat kita mengetahui kebenaran nomor 4. Ternyata secondary hardisk ku yg dipake bwat nyimpen data itu tidak terbaca dan minta diformat. “gile aje!!, masak aku harus format data kuliah, kerja praktek, hasil koreksi asisten, dan proposal kolokium ku yg blum di back up“. Ku coba recovery pake tools yang biasa ku pake teryata tetep gak mempan.
komputerku adalah komputer sejuta umat. Semua temen2ku datang dan memakai sekehendak hati. Jadi akan sulit untuk mengidentifikasi pengguna yg cocok untuk dikambing hitamkan bersama.
Aku berpikir “Kita harus selamatkan data ini hingga titik darah penghabisan, tapi ga mau kalau harus sampai titik dompet penghabisan”. Lalu aku bersama teman IT ku mengunjungi salah satu kios komputer di jogja yang menerima servis. Sampai di sana aku ngobrol sama teknisinya (lebih praktis dari pada ngobrol sama orang awam seperti penjaga toko mengenai masalah yang sedang kita hadapi). Ternyata dia dah ga terima recovery data lagi coz banyak job. dia recommend di tempat lain. Saat aku isenk tanya “Mas, biasanya recovery data hardisk habis berapa ya?”, ternyata itu tergantung besarnya HD kita dan untuk ukuran HD ku ternyata biayanya cukup nampar (beyond my imagination).
Tak mudah putus asa, ku batalkan niatku merecovery hardisku di teknisi (lho?). Entah kenapa aku kepikiran, “kenapa gak coba recovery sendiri pake tools yg lebih powerfull?”. Lalu aku pergi ke “Kuil Sumber Pengetahuan IT” alias “rental sofware”. Langsung deh cari CD recovery, sewa, dan pulang. Di dalemnya ada banyak software, dari recovery data kehapus sampai recovery data yg di encrypt di windows. Harap2 cemas, ku buka folder software itu satu per satu. Mataku melirik pada salah satu software sepertinya cocok utk kasus yg ku hadapi.
Berbekal kompi temen (thanks to yehtro), aku install dan lakukan prosedural recovery HD ku dengan seksama dan dalam tempo yang sesingkat-singkatnya. Dataku tenyata terbaca satu demi satu. Bahagianya hatiku kala itu. Data kembali dan aku cuma spent duid dikit bgt bwat sewa software doank.
Semoga rental-rental kayak gini masih tetep ada di jogja terus (coz di jakarta dah di sweeping dan tutup). Benar-benar membantu mahasiswa. Saya dapat ilmu baru (merecovery HD sediri) dan gak perlu spent banyak duid bwat hal-hal yang bisa kita lakukan sendiri.
Thanks to Allah SWT (for everythings), My Family, My Friends, teknisi (dah mau share ilmu), yehtro (dah mau minjemin kompinya), dan tak lupa rental-rental Software dan film di Jogja. I Love Jogja…^^
(dipindah dari blog yg lama, original Posted : October 16, 2008 )

