Tuesday, September 11, 2007

FIRST AJAX

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr" lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<script language="JavaScript">

function submitForm()

{

var req = null;

document.ajax.dyn.value="Started...";

if(window.XMLHttpRequest)

req = new XMLHttpRequest();

else if (window.ActiveXObject)

req = new ActiveXObject(Microsoft.XMLHTTP);


req.onreadystatechange = function()

{

document.ajax.dyn.value="Wait server...";

if(req.readyState == 4)

{

if(req.status == 200)

{

document.ajax.dyn.value="Received:" + req.responseText;

}

else

{

document.ajax.dyn.value="Error: returned status code " + req.status + " " + req.statusText;

}

}

};

req.open("GET", "data.xml", true);

req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

req.send(null);

}

</script>

</head>


<body>

<FORM name="ajax" method="POST" action="">

<input type="BUTTON" value="Submit" ONCLICK="submitForm()">

<input type="text" name="dyn" size="32" value="">

</FORM>

</body>

</html>

MENYIASATI FORMAT HTML PADA FPDF

Setelah berjalan beberapa ujicoba menggunakan Fpdf, ada hal ganjil yang saya temukan, yakni fpdf mencetak apa adanya variable yang dimasukkan. Misalnya kita memiliki variable seperti ini:
$var = “Tebal”;
Maka output yang keluar juga Tebal, sama persis dengan apa yang dimiliki, tidak dikonvert dulu ke format html. Untuk itu, format variable yang dimasukkan harus diubah menjadi format HTML dengan fungsi substr($var), baru kemudian dijadikan parameter untuk dicetak. Selamat mencoba

Sunday, September 9, 2007

FPDF

Aku barusan nyoba FPDF, yang berasal dari www.phpclasses.org. sebenarnya aku nyoba ini setelah putus asa mencoba PDFLib, yang setelah saya coba hanya berhasil melakukan generating file pdf dengan script PHP tanpa bisa saya buka. Setelah setengah mati nyobain pdflib dan selalu gagal, akhirnya di phpclasses.org saya menemukan fpdf yang lebih stabil daripada pdflib. Hebatnya lagi fpdf memiliki feature page compression yang membuat ukuran pdf menjadi kecil dan cepat didownload. Fpdf ini memiliki beberapa feature sebagai berikut:
- Choice of measure unit, page format and margins
- Page header and footer management
- Automatic page break
- Automatic line break and text justification
- Image support (JPEG and PNG)
- Colors
- Links
- TrueType and encoding support (Central European, Cyrillic and Greek)
- Page compression

Thursday, September 6, 2007

XAJAX the AJAX Framework

Saya kemarin ditawarin teman untuk mencoba dua framework untuk AJAX, yang pertama dia menawari sajax dan yang kedua xajax. Sebelumnya saya pernah mencoba2 prado, yang sedikit banyak juga sudah mendukung AJAX, dan menggunakan pendekatan object dalam pengembangan. pertama saya mencoba sajax, namun setelah sedikit coba-coba, saya tidak terlalu suka dengan paradigma yang digunakan. percobaan pertama gagal, dan tidak menghasilkan apapun kecuali error. setengah putus asa, saya mencoba banting setir ke xajax. saya sempat kaget dengan pendekatan yang dipakai, sebab pendekatan ini jauh lebih sederhana daripada pendekatan yang dipakai prado. Sebenarnya mirip, namun xajax
benar-benar memudahkan pengguna dalam pengembangan. programmer hanya perlu meng'include'kan file utama xajax, lalu melakukan register fungsi, selanjutnya memanggil fungsi tersebut pada HTML atau javascript. Sangat sederhana, semua business logic dilakukan dalam fungsi yang diregister, dan respon dikembalikan tanpa perlu meng'generate' satu halaman penuh. Saya berhasil tadi pagi sekitar jam 8, setelah mencoba belajar AJAX 2 hari lamanya. wah, benar-benar coooollllllllll!

Saturday, September 1, 2007

Going Started

I just going to have a work, to do anything with a tendency, improvement of skill. It no matter where is the place, even i had to go to the other planet. First, i had to get anything of knowledge in order to start work. Ajax is waiting, javascript is must, and php is tool. now, there is nothing except code and code. Except saturday and sunday, it is holiday, just for refresh my mind. Another five days is work and learn to live! Let's do it!

Thursday, June 7, 2007

Optimis

Last, we have gathering at prodi office, talking about possibility of migration to GNU Linux. we got some points. First, migration of terminal public. This terminal is a box outside of 3rd campus of UAD, used to access internet by students. As planned, we will install Ubuntu desktop, but we will check the hardware, because Ubuntu need high performance hardware. It is impossible to install Ubuntu with 128 MB RAM. It like suicide. Second, reincarnation of KSL to new generation. Actually, the cause is that we think that KSL nowdays has passive movement, till we have to give new motivation to the new generation. Third, migration all of computer laboratory to Linux. But, this point is not taken extremely, because of couple reason. We can not order the student exremely move to free software for practical lesson without new module. Then, we have to make a module based to free software we make. Fourth, development for desktop operating system for end user. Paradigm used for this is that they would not use the cammand line to operate it. Fifth, is our participate to IBM software competition.

Networking at VirtualBox

Working with virtualbox is not as easy as i was imagine. I had to make a network for my friend last literate domonstration, but i cant connect one to another guest operating system. I tried a night, and no result. Because of this cause, my friend can not demonstrate his application. I have no problem with my application, but my friends application need my application to demonstrate. Hehehe, like dependency in linux package. And now? I still trying.