Nugroho's blog.: 2013

Saturday, November 23, 2013

Lazarus on OS X 10.9

installing

fpc
fpc-src
lazarus

an all I got is this






it seems with Maverick, Apple introduced Xcode 5 and dropped GDB in favor of the LLDB debugger. Because Lazarus doesn't support LLDB (yet), Lazarus fails running compiled applications if the Debugger (Default: GNU debugger (gdb)) isn't disabled.

Thursday, November 21, 2013

Sumur tanpa Bayangan, Miring, Nol, dan Radioaktif


"Jadi cara menentukan keliling bumi dan sumur adalah dengan cara membandingkan bayangan yang jatuh di sumur kita di siang hari tepat jam duabelas dan sumur lain yang tidak punya bayangan di tempat lain.

"Jika kita tahu jarak kita ke tempat sumur tanpa bayangan tesebut maka kita bisa membuat perbandingan.





"Misal sudut bayangan yang jatuh di sumur kita adalah theta, maka perbandingannya adalah theta dengan 360 dan jarak ke tempat sumur tanpa bayangan dengan keliling bumi.

"Karena kita tahu nilai theta dan jarak ke sumur tanpa bayangan, maka keliling bumi dapat dihitung.

θ/360=jarakKeSumurTanpaBayangan/KelilingBumi

"Sehingga KelilingBumi=jarakKeSumurTanpaBayangan x 360/θ"

"Nol itu nilai apa pak?"

"Nol mana?"

"Di atas 360 itu"

"Oh itu bukan nol tapi theta"

"theta itu apa pak?"

"Theta itu sudut kemiringan sumur, baik saya ganti simbolnya menjadi alpha saja"

"Alpha itu zat radiokatif ya pak?"

"..." (hapus simbol alpha dan diganti dengan tulisan 'sudut')

(suasana di pelatihan guru pembimbing olympiade sains)


Monday, November 18, 2013

iBooks Author Supported Equation with Latex-style Input

Finally, the dream comes true :)

Tonight, I give iBooks Author a try, ehm..., actually second (alright third...) try. I have it since Mountain Lion (or maybe Lion) on my mid 09 13 inch aluminium unibody macbook pro, installed and never touched.

To be fair it's awesome, having simplicity of pages and keynote yet produce a powerfull, beautifull PDF (or ibooks) file.

And guess what... When I scrambling toward menu, there's "Equation" item under "Insert" menu.

Curious

Clicked it and...







"Insert Latex or XML equation ..."

Wow,... The awesomeness is level up several degree :)

Maybe it'll become my new main weapon replacing VIM+LaTeX combo to write book or publishing.

Maybe

Update:
-no footnote
-no bibliography

Thursday, November 14, 2013

Jerawat Programmer


"Eh, itu fotomu pas masih kuliah ya"

"iya"

"wah, jerawatmu kok banyak"

"begitulah"

"Kayaknya kamu banyak pikiran ya"

"err..., mungkin..., sepertinya iya"

"Jangan terlalu banyak mikir, ntar jerawatnya tambah banyak"

"..."

"Emang mikirin apa?"

"mikir kenapa kok aku punya banyak jerawat"

....

Saturday, November 9, 2013

Selalu Minta Struk di SPBU

Yeah, selalu minta struk di SPBU yang ada fasilitas print-out struknya. Karena ada beberapa SBPU, meskipun kita tidak minta struk, mereka tetap menge-print tuk di"simpan", apalagi jika kita beli bensin dalam jumlah banyak. Ada beberapa konsumen SPBU yang meminta struk bernilai besar padahal beli bensin cuma sedikit; buat laporan ke kantor untuk uang pengganti bensin.

Mari kita cegah korupsi semacam ini bersama-sama.

Friday, November 8, 2013

Beware of Apple ID Theft

I got this email
The Frequently Asked Question link is right, it point to official apple website. But when I clicked "Verify Now" all I got is this
...
(look at the pic below, notice the red oval). 


I stripped the address and just left the "http://vadhuvarmumbai.com" and I got this


:)

Thursday, November 7, 2013

Laggy Mavericks and QuickLook that Neither Quick nor Look on Anything

Don't know what happened, but my Maverick is getting slower and slower.

QuickLook can't preview .f,  .py and .tex files (and other files type too as I tried to "quick-looking" other type but fortran, python and latex  is what I "quick-looking" most).

Thursday, October 24, 2013

My new OS X Maverick

Just install it on my mid 2009 Macbook Pro 13 inch and well..., nothing change at the first look. It just like the old Mountain Lion appearance.

Wait, oh yeah, there is iBooks in the Dock and wow..., iOS Maps is there as well.

More importantly, the Safari is quite stable now, at least I didn't use Chrome for 3 hours now, :). Of course it's good signal of Safari direction,  I used to use Chrome in Mountain Lion and now glad I can switch back.

Monday, October 21, 2013

Studio Rekaman Tak Terduga

Sudah lama tidak take dan mixing lagu sendiri, kangen juga.

Malam-malam, semua sudah tidur. Buka laptop, buka aplikasi GarageBand dan take... action...

....

loh, kok?


Saking sensitifnya microphone si Mac, suara gemericik air kamar mandi pun sampai terdengar; juga rengekan si kecil yang minta "emak" dot.

Buyar

ups,..., gimana kalo...

akhirnya install GarageBand di iPhone, bawa gitar akustik nylon klasik ke mobil, tutup pintu dan... yes...tak terdengar suara dari luar.

just wait..., setelah ini akan muncul lagu-lagu baru dari super-mini-compact-portable-music-studio: Mazda 323f Astina, :)

Sunday, October 20, 2013

Urine Sapi, Rumput dan Kemarau

Saat ini rumput masih menjadi makanan utama sapi perah namun keberadaan rumput yang subur dan disukai sapi mulai jarang ditemukan secara bebas sehingga kegiatan "ngarit" (jawa: mencari rumput) sudah banyak ditinggalkan bagi pemilik sapi.

Bagi pemilik sapi perah, sekarang lebih mudah membeli rumput gajah daripada mencari rumput di sawah atau hutan yang keberadaannya semakin jarang. Menanam rumput gajah sendiri juga bukan sebuah pilihan yang menarik karena harus merawatnya dengan memupuk dan mengairi; sebuah hal yang sulit sekarang di mana pupuk relatif mahal dan musim kemarau yang berkepanjangan dengan datangnya hujan yang sulit diprediksi.



Di sisi lain, kotoran sapi selama ini telah menjadi pupuk kandang dan dipakai di berbagai daerah. Pertanyaannya kenapa tidak menanam rumput gajah dengan pupuk kotoran sapi saja? Jawabannya biasanya adalah kotoran sapi tersebut dijual sehingga tidak memungkinkan (tidak boleh) untuk digunakan sebagai pupuk kandang. Selain itu, agar kotoran sapi dapat menjadi pupuk, kotoran sapi harus dibiarkan dulu (fermentasi) beberapa minggu. Penggunaan langsung kotoran sapi pada tanaman berakibat tidak baik. Hal lain dari penggunaan kotoran sapi sebagai pupuk adalah, tanaman masih membutuhkan air sehingga sulit dilakukan saat musim kemarau.

Saat ini air kencing sapi menjadi limbah yang terbuang percuma karena tidak dapat dijual dan bermasalah bagi lingkungan karena menimbulkan polusi bau karena tempat pembuangannya biasanya dijadikan satu dengan kotoran sapi; kotoran sapi tidak lekas kering dan kotoran sapi yang basah baunya sangat menyengat. Padahal jika ditelaah, air kencing sapi memiliki kandungan urea yang cukup tinggi sehingga bagus untuk tanaman, terutama untuk pertumbuhan rumput gajah.

Penggunaan air kencing sapi sebagai pupuk untuk rumput gajah (makanan utama sapi) memiliki beberapa keuntungan. Pertama adalah bebas biaya karena merupakan limbah dari sapi itu sendiri.

Keuntungan kedua adalah menyelesaikan masalah bau dari pembuangan air kencing sapi. Selama ini air kencing sapi dibuang ke tempat yang sama dengan kotoran sapi sehingga kotoran sapi tidak lekas kering. Hal ini menimbulkan bau yang menyengat dan kotoran sapi yang masih basah tidak dapat dijadikan pupuk kandang. Dengan mengalirkan air kencing sapi ke lahan penanaman rumput gajah maka secara otomatis kotoran sapi tidak tercampur dengan urine sapi dan lebih cepat kering (lebih cepat terfermentasi menjadi pupuk kandang dan dapat dijual).

Keuntungan yang ketiga adalah meyelesaikan masalah ketiadaan air saat kemarau. Dengan menggunakan air kencing sapi, selain sebagai pupuk dengan kandungan urea yang tinggi, air kencing sapi juga berfungsi untuk mengairi rumput gajah sehingga tidak mengalami kekeringan.

Monday, October 14, 2013

Ini Takbir Keliling atau mp3 Player Keliling

Bawa truk, sound system menggelegar, diiringi puluhan motor bersuara keras dan digeber-geber gasnya. 

Tapi takbirnya dari mp3 player, hampir tak ada peserta konvoi (ups, takbir keliling :) ) yang bertakbir. Tak adakah pikiran bahwa Tuhan mungkin sampai bosan mendengar mp3 takbir yang itu-itu saja?

Bagi pengejar pahala? Apakah tidak terpikirkan bahwa yang mendapat pahala adalah yang suaranya terekam di mp3 takbir itu?

Bagi yang takbir keliling dengan motor. Adakah terlintas di pikiran bahwa berkendara di lalulintas padat bahkan sampai memakai lajur kanan meningkatkan peluang kecelakaan dan tidak memakai helm dapat meningkatkan peluang gegar otak?

Tapi meninggal saat takbir kan masuk surga, iya kan!

Benarkah? 

Eh, anu, maksudku benarkah saat itu anda membaca bacaan takbir dan bukan sibuk memutar-mutar gas motor dan membunyikan klakson?

Thursday, October 3, 2013

Tutup Radiator dan Reservoir

Barang kecil dan murah namun jika rusak dan tidak segera diganti akan jadi mahal, karena harus ganti radiator atau malah ganti mesin.

Hal yang terjadi jika tutup radiator rusak:
-radiator tidak dapat mempertahankan tekanan di dalam radiator; seharusnya lebih tinggi dari udara luar. Tekanan yang lebih tinggi menyebabkan titik didih coolant/air radiator juga tinggi sehingga pertukaran panas lebih efektif. Kalo fungsi ini gagal, air radiator akan mendidih di suhu 100 atau di bawahnya; pertukaran panas tidak efektif. 

Karena mendidih (dan tentu saja menguap), maka air radiator akan cepat habis

Hal lain yang terjadi jika tutup radiator rusak, air radiator akan keluar menuju reservoir saat panas (hal yang normal, karena air volumenya bertambah saat panas) namun tidak mau kembali ke radiator saat dingin karena tidak diijinkan oleh klep di tutup radiator; air radiator akan berkurang (dan air di reservoir akan bertambah banyak bahkan sampai tumpah). Normalnya air di reservoir akan kembali ke radiator setelah mesin dingin, sehingga volume air di dalam radiator tetap.

Hal lain yang kadang lolos dari perhatian adalah selang di tutup reservoir yang masuk ke dalam reservoir. Jika selang ini longgar, maka udara akan ikut masuk saat radiator menyedot air kembali ke radiator sehingga jika dicek, air radiator akan berkurang meskipun air di reservoir masih ada (bahkan sampai tumpah)

Friday, August 30, 2013

Tombo Ati (Carnaval Version)

Tamba ati iku lima sak wernane ... (backing vocal: GOYANG THITHIK JOSS...)

Maca Al Qur'an angen-angen sak maknane

Kaping pindho shalat wengi lakonana (backing vocals: BUKAK SITHIK JOSS )

.....


Kayaknya lagu-lagu sekarang lebih mementingkan irama daripada isi. Lirik boleh apapun asal irama easy listening (atau 'itu-itu saja').

Pernah juga dengar lagu religi koplo satu album iramanya ya satu pola itu tok, beda lirik. Semakin aneh lagi karena disetel di masjid yang kosong tidak ada kegiatan; semata-mata agar terlihat religius (religius koplo?).

Thursday, August 29, 2013

Lunch; Madhang

Alpha's learning to eat by himself, :) 



Sunday, August 25, 2013

Front Row Replacement on Mountain Lion

I realized that OS X Mountain Lion didn't have Front Row anymore; in fact, it deprecated since release of Lion.

I just got RowMote Pro on my iPhone and want to test it on Front Row and... nothing happenned.


I searched and there is a way to install back Front Row on Lion and (more complicated) on Mountain Lion, but most they suggest to use XBMC instead.

I installed it from XBMC site and Rowmote detect it instatantly and so does XBMC; it can be controlled through rowmote. I don't know what happened but the XBMC icon just appear on my iPhone Rowmote apps.

As bonus, we can install official XBMC apps for iOS to from iTunes

Saturday, August 24, 2013

Timer For Sleepy Eyes on Retractor Headlight

Here's the application of previous post on PCB dot matrix. I don't applied it to my Mazda 323F Astina Popup yet.







Friday, August 23, 2013

Timer for Sleepy Eyes

Here my search result of IC 555 application that very close to what I want; the Pivot Headlight Retractor like Sleepy Eyes on my Mazda 323F Astina
the 555 timer is set to turn on the buzzer when the push switch is pressed; the buzzer sounds for approximately 8 seconds. This is a monostable circuit as it works only once. The switch must be pressed again for the buzzer to sound again.

Well, almost there, but I do need more...
 It have to
  • turn on when the headlight goes off after on
  • turn off after certain seconds (more or less half second)
  • reset timer when headlight goes on
The schematic above didn't meet the requirement as the push button act as trigger while my 'trigger' is the headlight off condition. So if it applied directly, the timer will run continuosly since the trigger is always on and the 'reset' is above 0.7 V.

So, here is my mod

oops, what's wrong? oh, it's like pin 4 must go to Batt, not headlight, :)



Thursday, August 22, 2013

IC 555

Setelah muter-muter cari diagram persamaan untuk Pivot Retractor Headlight untuk bikin Sleepy Eyes di Astina tanpa hasil, akhirnya berkesimpulan, kenapa tidak buat timer sendiri saja? 

Browsing dan ...

Tentu saja yang muncul paling atas adalah IC klasik 555 yang tersohor itu. Sempat bingung karena lama tidak otak-atik perangkat elektronika, tapi sleepy eyes harus berhasil, :). Karena itu saya menyempatkan diri buka datasheet IC 555 dan mempelajari karakteristik IC timer ini.




Dari diagram terlihat bahwa GND jelas ke ground dan Vcc ke power supply DC, Vcc bisa bernilai 3V hingga 15 V.

OUT merupakan output dari IC ini dengan nilai sekitar 1.7 V dibawah Vcc atau GND

OUT menjadi tinggi (high; ada output; output terjadi) jika TRIG memiliki tegangan dibawah 1/2 tegangan CTRL yang biasanya bernilai 1/3 Vcc. Saat OUT aktif dan mengalirkan arus, maka timer akan mulai berjalan.

Timer dapat direset dengan menyambungkan RESET ke GND, namun timer tidak dapat aktif kembali jika RESET memiliki tegangan dibawah 0.7 V.

Timer berhenti (OUT berhenti mengalirkan arus) saat THR lebih besar dari CTRL.

DIS berfungsi untuk mengosongkan kapasitor.


Tuesday, August 20, 2013

CMS dan Keamanan Website


Saat ini sedang populer penggunaan CMS pada berbagai laman web. Kita sudah tidak begitu asing dengan blogger, wordpress, moodle dan joomla.

CMS (Content Management System) adalah sebuah sistem komputer yang dapat mempublikasi, menyunting, memodifikasi konten, melakukan pengaturan dan pemeliharaan sebuah halaman web dari sebuah halaman saja tanpa perlu pengetahuan bahasa pemrograman web.



CMS menyediakan sekumpulan menu untuk menambah halaman web, mengubah background, membuat menu/link di sidebar dan berbagai fitur web lainnya.

CMS menawarkan berbagai kemudahan. Seorang blogger hanya perlu fokus pada tulisan yang dia buat tanpa disibukkan oleh kode-kode CSS atau HTML. Pengajar online hanya perlu menyediakan dan mengupload bahan ajar beserta ujiannya tanpa perlu pusing-pusing mengembangkan sistem anti contek karena CMS Moodle dapat mengacak urutan soal dan urutan jawaban beserta timernya.

Ada berbagai macam jenis CMS berdasarkan fungsinya: blog, forum, e-learning, portal bahkan toko online.

CMS dengan berbagai kemudahannya telah membuat aktivitas publishing di dunia maya menjadi lebih mudah dan menyenangkan. Meski demikian ada hal-hal yang perlu diwaspadai saat kita memutuskan untuk menggunakan CMS untuk halaman web kita yaitu keamanan.

Karena CMS gratis tersedia secara bebas, sebuah CMS dapat dipelajari kode sumbernya dan pihak tertentu mungkin menemukan celah keamanan yang dapat digunakan untuk men-deface sebuah alamat web yang menggunakan CMS tersebut.

Update terbaru sebuah CMS mungkin dapat menambal sebuah celah keamanan namun karena sifat free dari CMS tersebut, maka setiap orang dapat beramai-ramai mendownloadnya dan beberapa pihak mungkin memfokuskan diri untuk mencari celah keamanan lain.

Subdomain um.ac.id pernah di-deface dengan memanfaatkan exploit dari sebuah free-CMS. Apakah ini berarti jaringan internet UM tidak aman? Jawabnya adalah: hal tersebut tidak ada hubungannya dengan jaringan.

Jika jaringan diibaratkan jalan dan pintu sebuah rumah. Maka halaman web dapat diibaratkan sebagai penghuni rumah yang membawa tas berisi uang. Sebuah CMS yang memiliki celah keamanan ibarat tas yang berlubang atau sobek. Seseorang hacker bisa saja mengganti uang di dalamnya dengan daun (mengubah konten web) atau mengambil semua uang hingga tasnya kosong ( menghapus isi web). Sebuah free CMS adalah sebuah tas yang desainnya (dan tempat sobeknya) diketahui oleh umum.

Kenapa tidak ditutup saja pintu rumahnya agar aman? Tentu saja bisa, namun dengan demikian maka pengunjung tidak dapat masuk ke dalam rumah (halaman web tidak dapat diakses).

Bagaimana agar aman? Tentu saja kita harus menutup celah keamanan dengan cara kita sendiri. Cara lainnya adalah dengan menggunakan CMS premium yang tidak tersedia secara bebas atau mengembangkan CMS sendiri sehingga kode sumber tidak dapat dipelajari oleh umum.

Karena itu, sedang ditelaah sebuah peraturan untuk keamanan website yang berada dibawah domain UM; pada tahun 2013 halaman web yang berada di domain um.ac.id wajib mengembangkan interface halaman web sendiri atau menggunakan CMS premium.

Nugroho Adi
(Pernah di post oleh penulis di http://berkarya.um.ac.id)



Saturday, August 17, 2013

Relay Single Pole Double Throw

'Mas, ada relay'
'Ada'
(Ambil box berisi macam-macam relay, disodorkan satu)
'Yang lima kaki' 
...
'Yang ada 'a'nya atau tidak'
[yes, lega]
'Iya iya, yang ada 'a'nya'
'OK, berarti sampeyan mengerti'
(Ambil box satunya sambil senyum ceria)
'Memang kenapa mas?'
'Biasanya kalo jawabnya 'terserah' atau gak bawa contoh, saya gak menjual yang lima kaki, takutnya salah'
'...'
'harganya 30rb mas karena ada 'a'nya, kalo yang tidak ada cuma 25rb'
'Beli DUA mas'
...


Demikian sekilas percakapan di sebuah toko part mobil setelah muter-muter di toko lain tidak menemukan relay yang dimaksud. Relay yang akan saya gunakan untuk menata ulang pengkabelan untuk motor retractor popup 323F astina saya.

Ada apa dengan huruf 'a'? Kenapa bisa lebih mahal padahal sama-sama lima kaki?

Relay yang saya cari adalah relay Single Pole Double Throw dengan lima kaki.

85 arus kecil
86 ground
30 sumber arus 
87 tersambung ke 30 jika ada arus dari 85 ke 86
87a tersambung ke 30 jika TIDAK ADA arus dari 85 ke 86 (kaki 87a ini biasanya terletak di tengah)

Relay lima kaki yang biasa memiliki dua kaki 87 (

Thursday, August 15, 2013

Wednesday, August 14, 2013

Retractor Headlight on My Mazda 323F Astina

My Mazda 323F popup headlight suddenly refuse to retract. While the servicemanual book provide everything about it, I couldn't place the 'retractor unit' in my Astina. So I guest it's some kind of relay and decided to rewiring it.

My new retractor wiring depends exclusively on headlamp, either normal or beam. When the lights on, the retractor will 'up', and retract 'down' when lights are off.

Several diode present to prevent a mixed current and 'fireback' such as normal and beam headlight on in the same time or  the relay active while the ignition is switched off.

(MX 5 / miata or RX 7 may have different cable colour)

(here the update using single SPDT relay)



Tuesday, August 13, 2013

Percy Jackson and the Singer of Apollo

It's part of Other Worlds, a compilation book by Rick Riordan, Shaun Tan, Ray Bradbury, Neal Shusterman and ...

However, being a fan of Percy Jackson series, Heroes of Olympus series and Kane Chronicles, I wish I could get just the Rick's tale since this is the only story I want to read in this one, :)

Monday, August 12, 2013

Merpatiku buat sarang lagi horee...

Tanda mau bertelur, :)

Semoga anaknya gak dimakan kucing tetangga lagi (resiko memiliki tetangga yang punya berpuluh kucing)


Friday, August 9, 2013

Fisika FluidDynamic Masjid

Walaupun beberapa masjid sudah mulai ber-AC, meski tampan aneh dengan tiadanya air-blocker di pintu masuk sehingga udara dingin jadi lolos keluar, sebagian besar masjid 'besar' masih menggunakan kipas angin sebagai fitur plus-nya.

Secara konstruksi bangunan tidak masalah, dengan lubang udara di bawah kubah yang dimaksudkan agar udara panas bisa keluar.

Namun secara praktek ada yang aneh, aliran udara kipas mengarah ke bawah! Akibatnya udara panas dari jemaah (tiap orang rata-rata setara dengan lampu 100watt) yang seharusnya naik dan keluar lewat lubang udara dipaksa kembali ke bawah oleh kipas, efeknya udara panas malah masuk dari atas dan ruang jadi tambah panas, efek lainnya adalah jemaah jadi masuk angin terkena hembusan kipas, setidaknya saya.

Seharusnya aliran udara kipas mengarah ke atas agar udara panas yang secara alami bergerak ke atas bisa keluar lewat lubang udara bawah kubah, udara relatif segar masuk dari pintu dan jendela, dan jemaah tidak masuk angin terkena hempasan udara kipas.

Wednesday, August 7, 2013

Soliloquy

hei

Namaku ...tapi biasa dipanggil Gepeng trus merambat jadi Peng kadang Cipeng juga Meng, nDul

Sekolah, kabur, lebih enak di jalan

Gitar, nyanyi, gak penting lagu apa

pake ecek-ecek, kadang gak perlu repot nyanyi

kalo 'rajin' bisa dapat lumayan

LSM yang ngurusi anak jalanan, ngajak kembali sekolah. 

Bagiku yang pernah sekolah, jalanan lebih menarik. 

Matematika? Aku tahu hutang yang harus kubayar di warung mbok Yem pas ngecer rokok pagi-pagi sebelum 'dinas' di perempatan.

Geografi? Sudah pernah kemana-mana numpang truk atau pick-up bak terbuka kalo pas ke stadion atau lihat konser underground atau sekedar pengin naik, terserah mau diturunkan di mana.

Kimia? Aku tahu campuran yang bagus untuk oplosan yang bikin cepat 'tinggi' ataupun oplosan yang pas buat rame-rame.

Mungkin mereka lebih cocok mengajak si Panjul tetanggaku yang gak pernah sekolah.

Hasil sejam bisa buat nge-game online di warnet pojok perempatan. penjaga warnet ok saja, malah senang dapet uang receh buat kembalian pelanggan.

tindik

mabuk gratis

nge-lem

rambut

sepatu

preman kemanusiaan, menodong sisi kemanusiaan

di bawah koordinasi

slot tempat mangkal. kalo untung bisa dijual lagi dengan harga tinggi. Cari tempat yang kira-kira nanti jadi ramai.


Tuesday, July 16, 2013

XFCE Display Manager with Opera on FreeBSD

Here is it, from the screenshot below you'll know that I'm trying download chrome but it apparently i got .exe chrome file installer for window albeit it's tell that I'll got linux (Debian, Ubuntu, Fedora, OpenSuSE)









Thursday, July 4, 2013

FreeBSD on VBox with OS X Host

I use boot-only-iso 64 bit and the problem instantly arise because of my impatience.


Yup, I use 32 bit architecture on OS version setting (the first prompt in virtual box when we create new virtual machine). So change to 64-bit solved the problem, in some case, delete the vm and create whole new vm guarantee it.





Nothing special on the installation so, here is it:








Friday, May 3, 2013

Stuck on DFU or Recovery Mode or Connect to Itunes Logo Loop on iPhone




In the recent months, we've seen reports here and there of iPhones getting stuck in a restart loop. The black screen with the Apple logo shows up, holds for a while, and then disappears again; repeat ad infinitum. While it's not clear yet exactly what's triggering the issue (the complainants suspect that it may be a recent application update to blame), there is a tried and true way to get your iPhone, iPod touch, iPad or older iPod back to square one: either use recovery mode or do a DFU restore


DFU (Device Firmware Update) mode is a means to getting your iPhone to interface with iTunes without iTunes automatically loading the latest version of iOS onto it (it skips the iBoot bootloader, for jailbreak aficionados). Differing from recovery mode -- where iTunes restores your iPhone to its original factory settings but with the latest iOS and firmware -- DFU mode allows you to change and choose the firmware you want to install onto your iPhone. For instance, you would use DFU mode if you want to install a previous version of iOS, jailbreak your iPhone or unlock your SIM. If (for whatever reason) standard recovery isn't working for you to get your device back to working condition, DFU may help you out.



Remember, if you restore your phone in any fashion (via the iTunes 'Restore' button, recovery mode or DFU) you will lose any modifications made to unsynced content or in-app data since your last iTunes sync (game states, voice memos, notes etc.). Be cautious.

So, here's the basic info on how to enter DFU mode (and it works for your iPod touch, too). Instructions may vary slightly by year or model.



  • Connect your iPhone to your computer via USB and launch iTunes.
  • Now turn your iPhone off. Hold down the sleep / power button at the top right of your iPhone, then slide your finger across the "slide to power off" button on your iPhone's screen. (If it won't turn off, press Home and Sleep/Power until the screen goes dark, then release.)
  • Once your iPhone is off, hold down both the sleep / power button as well as the home button for 10 seconds. Once 10 seconds has elapsed, release the sleep / power button on your iPhone, but continue to hold the home button until the the above message has appeared in iTunes telling you that your iPhone has been detected in recovery mode. (If you just want to go to recovery mode, skip the 10- second hold on both buttons and simply connect the phone while holding down Home, then wait for 'Connect to iTunes' screen on the phone.)
If you see the Apple logo or the "connect to iTunes" screen on your iPhone, you're not in DFU mode. DFU leaves the screen of the iPhone completely black.

To exit DFU mode, simply hold down the sleep / power button and the home button together until your iPhone disappears from the device list in iTunes, then turn on the iPhone as normal.

Again, for most purposes (save jailbreaking) there's no practical difference between DFU and a regular restore, except and unless you're in a situation where your phone won't go into restore mode normally.

Now, what if iPhone stuck on restore loop instead of restart loop? It often happen if we upgrade the iOS.  I've tried to exit it using "just" DFU mode with no result. Apparently it needs more step, ... and it is...

While in DFU mode

  • while you plugged your iPhone and opening the itunes go to windows/system32/drivers/etc and open "hosts" file as administrator with notepad (Mac user: use Shift+Command+G and type /etc than open hosts file using TextEdit)
  • remove the last to lines with word apple in it (or add # at the begining of line)
  • safe the change
  • go to itunes shift+ restore choose the custom ipsw (Mac user: alt+ restore)
  • enjoy the restore with out any errors no 3014 or 1600 or any other error
Maybe, on Mac, we couldn't safe the change of hosts file or even worse, couldn't open it. In this case, 

open Terminal Apps
type
sudo cp /etc/hosts ./Desktop (enter your password)
sudo chmod 777 ./Desktop/hosts
edit hosts file in Desktop using TextEdit and safe it, back to Terminal
sudo rm /etc/hosts /etc/hostsOld
sudo cp ./Desktop/hosts /etc/hosts





Thursday, May 2, 2013

Monte Carlo PI

 
c calculating pi by throwing stones
c
PROGRAM stones
IMPLICIT none
c
c declarations
REAL*8 area, x, y, DRAND48
INTEGER i, max, pi, seed
c
c set parameters (number of stones, seed for generator)
max = 1000
seed = 11168
c
c open file, set initial value, seed generator
OPEN(6, FILE='pif.dat')
pi=0
call seed48(seed)
c
c execute
DO 10 i=1, max
x = DRAND48()*2-1
y = DRAND48()*2-1
IF ((x*x + y*y) .LT. 1) THEN
pi = pi+1
ENDIF
area = 4.0 * pi/REAL(i)
WRITE(6,*) i, area
10 CONTINUE
STOP
END

PI on MPI

still trying...
 program main
include "mpif.h"
double precision PI25DT
parameter (PI25DT = 3.141592653589793238462643d0)
double precision mypi, pi, h, sum, x, f, a
integer n, myid, numprocs, i, ierr
c function to integrate
f(a) = 4.d0 / (1.d0 + a*a)

call MPI_INIT(ierr)
call MPI_COMM_RANK(MPI_COMM_WORLD, myid, ierr)
call MPI_COMM_SIZE(MPI_COMM_WORLD, numprocs, ierr)


10 if ( myid .eq. 0 ) then
print *, 'Enter the number of intervals: (0 quits) '
read(*,*) n
endif
c broadcast n
call MPI_BCAST(n,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr)
c check for quit signal
if ( n .le. 0 ) goto 30
c calculate the interval size
h = 1.0d0/n
sum = 0.0d0
do 20 i = myid+1, n, numprocs
x = h * (dble(i) - 0.5d0)
sum = sum + f(x)
20 continue
mypi = h * sum
c collect all the partial sums
call MPI_REDUCE(mypi,pi,1,MPI_DOUBLE_PRECISION,MPI_SUM,0,
& MPI_COMM_WORLD,ierr)
c node 0 prints the answer.
if (myid .eq. 0) then
print *, 'pi is ', pi, ' Error is', abs(pi - PI25DT)
endif
goto 10
30 call MPI_FINALIZE(ierr)
stop
end

Wednesday, April 24, 2013

Mencari Pi



Nilai Pi

Mencoba tanpa webworker. Pi dapat dihitung dengan kode berikut

var Pi=0, n=1, c=100000;
for (var i=0;i<=c;i++) {
Pi=Pi+(4/n)-(4/(n+2));
n=n+4;
}

perintah dalam tag <script> adalah sebagai berikut



function HitungPi()
{
var loop = document.getElementById("loop");
var c = parseInt(loop.value);
var f = parseFloat(loop.value);
var Pi=0, n=1;

try {
if (isNaN(c) || f != c ) {
throw("errInvalidNumber");
} else if (c<=0) {
throw("errNegativeNumber");
}

for (var i=0;i<=c;i++) {
Pi=Pi+(4/n)-(4/(n+2));
n=n+4;
}
document.getElementById("PiValue").innerHTML = Pi;
} catch (e) {
var msg = "Input Error: ";
if (e=="errInvalidNumber")
msg += "harus angka.";
else if (e=="errNegativeNumber")
msg += "Input harus positif.";
else
msg += e.message;

alert(msg);
}
}

.
Perintah dalam <body>

<label for="loop">Jumlah iterasi:</label>
<input id="loop" type="number" value="100" />
<input type="button" onclick="HitungPi()" value="Hitung Pi" />
<div id="PiValue">Nilai Pi</div>

Hello Canvas World

canvas's not supported
Back to first again
Tulisan di atas ditulis dalam canvas seperti kode di bawah. Di sini perintahnya adalah

context.fillText('Hello Canvas World',canvas.width/2-150,canvas.height/2+15);

context adalah '2d' dari canvas, dalam hal ini context kotak yang menyimpan perintah-perintah '2d' canvas seperti contoh diatas, yaitu menulis text.

fillText('tulisan', posisi_x,posisi_y) adalah perintah untuk menampilkan tulisan dengan warna sesuai fillStyle, yaitu 'green'

strokeText('tulisan', posisi_x,posisi_y) adalah perintah untuk menampilkan tulisan dengan warna 'tepi' sesuai strokeStyle yaitu 'red'



var canvas = document.getElementById('canvasexample'),
context = canvas.getContext('2d');

context.font = '38pt Arial';
context.fillStyle = 'green';
context.strokeStyle = 'red';

context.fillText('Hello Canvas',canvas.width/2-150,canvas.height/2+15);
context.strokeText('Hello Canvas',canvas.width/2-150,canvas.height/2+15);

Sunday, April 7, 2013

My Blackberry Experience (part3)

In term of ease of use, I prefer non qwerty phone, thus, I prefer other devices than blackberries (but z10, maybe)



Why I don't like qwerty phone, because I didn't use to it. My first smartphone has candybar form factor, w960i, and I barely use it keyboard because I prefer its handwriting method using stylus.



I still like it and hope iPhone include this feature (unfortunatelly Apple don't bother to include it). I think it's possible cause google applied it in its search engine (work on i Phone too)



I start to used dvorak on my macbook pro in 2009, and since then I "abuse" my home PC, my HP tx2100us, and two server at work keyboards to became dvorak layout. It's simpler and more balance (right and left stroke). Of course blackberry, with its infamous qwerty keyboard, slow me down a bit.



Unfortunately, it applies to iPhone too. Although it allows for changing layout, it don't provide dvorak. Nevertheless, I still prefer iPhone over blackberry because its ability to change its keyboard layout. I'm currently use azerty layout on iPhone.







http://aravir-rose.blogspot.com

My Blackberry Experience (part 2)

So, how about the Blackberry killer app, Blackberry Messenger?



I personally don't know what's so great about it and what's really different with others messenger apps.



My sister in law tell me that BBM benefit is ability to block people and prevent his/her to contact us. Because BBM connect people through PIN, blocked people won't be able to contact via phone number if didn't know our number or we change our number.



I though of that and feel that it's ridiculous. We know yahoo messenger, google talk, whatsapp and other messenger have blocking feature as well.



Another problem is PIN itself. It's tied to one device. While it comes handy as we don't need to create new account as we have new number, it ties us to just one device. If we get another blackberry device, we have to reinvite our contacts again (or just export it? IDK).



Sure whatsapp or LINE is very vulnerable, anyone had our number is able to contact us but what's so bad about it? They still able to text or call us, don't they? And it have (along yahoo, gtalk and other) great portability; we're free to change device and still use same account, even use it in desktop computer.



Maybe it's just me but I don't want to be tied with one device. (Don't you want to upgrade your blackberry device?)



Blackberry Messenger is still great app though, with million users of course, every blackberry owner use it. But in the end, I still found whatsapp or other traditional instant messenger come handy in term of portability.







http://aravir-rose.blogspot.com

Saturday, April 6, 2013

My Blackberry Experience (part 1)

After trying my sister-in-law's blackberry, I feel the urge to compare it with my 4S. This is the first post about it

Maybe it's not fair to compare that two device, iPhone is touch based device while blackberry is scroll-point-click based device, but I'm curious about why blackberry is so famous and became de-facto in business (at least in the past). Well, here is it...

My reaction the first time I grab the blackberry is, confused.

Maybe I used to touch my iPhone to make it work but the blackberry OS confuse me about almost anything. I don't even know how to unlock its display at first because "mute" button is "play" button, :).

The home screen displays few apps and when I want to open apps that not in home screen I have to scroll it down but wait,... it don't scroll. Apparently I have to click "all" first and then scroll it down. While it may easy but the problem is I have to highlight "all" first to click it. iPhone have fewer step to go to anything.

The first app I want to open is mail, it's app that make blackberry powerfull among businessman anyway and guess what? It is...

The push feature is great, it delivers email as "send" is clicked, and receives email as soon as the email sent by sender (whoever it is) thank to BIS.

Yeah, blackberry mail is ok but I found facebook for bb is terrible (second apps I opened after mail). Try to read a twenty lines comment and you know what I mean, you read several lines and when you scroll to read next lines, it goes to last lines, and few lines before last line, there is no way to read 'middle' line

....

Sure iPhone can't transfer file via bluetooth, or download music (or anything) outside app store, but it worth it, faster, smoother and I'll stick with it.


http://aravir-rose.blogspot.com
323f (5) amp (1) android (12) apple (7) arduino (18) art (1) assembler (21) astina (4) ATTiny (23) blackberry (4) camera (3) canon (2) cerita (2) computer (106) crazyness (11) debian (1) delphi (39) diary (286) flash (8) fortran (6) freebsd (6) google apps script (8) guitar (2) HTML5 (10) IFTTT (7) Instagram (7) internet (12) iOS (5) iPad (6) iPhone (5) java (1) javascript (1) keynote (2) LaTeX (6) lazarus (1) linux (29) lion (15) mac (28) macbook air (8) macbook pro (3) macOS (1) Math (3) mathematica (1) maverick (6) mazda (4) microcontroler (35) mountain lion (2) music (37) netbook (1) nugnux (6) os x (36) php (1) Physicist (29) Picture (3) programming (189) Python (109) S2 (13) software (7) Soliloquy (125) Ubuntu (5) unix (4) Video (8) wayang (3) yosemite (3)