Friday, November 9, 2007

MOUSE PONTER DETECTION WITH TRANSPARENT DINAMIC DIV

<html>

<head>

<title></title>

<script type="text/JavaScript" language="JavaScript">

<!--

function cleanup(e) {

if (typeof(loopid) != "undefined")

clearInterval(loopid);


document.onmousemove = null;

document.getElementById("malih").style.display = "none";



return true;

}


function trackMove(e) {

if (arguments.length == 0) e = event;


if (document.layers) {

document.f.mX.value = e.pageX;

document.f.mY.value = e.pageY;

}

else {

document.f.mX.value = e.clientX;

document.f.mY.value = e.clientY;

}

document.getElementById("malih").style.display = "block";

document.getElementById("malih").style.left = e.clientX+10;

document.getElementById("malih").style.top = e.clientY+10;

}


function init() {

clickStarted = false;

document.onmousemove = trackMove;

if (document.layers) {

document.captureEvents(Event.MOUSEMOVE);

}

}

//-->

</script>


</head>


<body>


<a href="#" onMouseOver="init();" onMouseOut="cleanup()">ARAHKAN MOUSE KESINI</a>

<form name="f">

MouseMove X: <input type="text" name="mX" value="0" size="4"><br>

MouseMove Y: <input type="text" name="mY" value="0" size="4"><br>


<br><br>


</form>

<div id="malih" style="border:1px solid #000000;position:absolute;width:100px;display:none; background:#cccccc;opacity:0.8;"><br>Tampilan yang harusnya keluar</div>


</body>

</html>

TRANSPARENT DIV

HTML:

<div id="container">

<div id="opaquetext">

This is a normal text

on a translucent background

</div>

</div>

CSS:


#container {

background-color: #ffffff; /* the background */

filter:alpha(opacity=50); /* Internet Explorer */

-moz-opacity:0.5; /* Mozilla 1.6 and below */

opacity: 0.5; /* newer Mozilla and CSS-3 */

}

#opaquetext {

filter:alpha(opacity=100); /* discarded */

-moz-opacity:1.0; /* discarded */

opacity: 1.0; /* discarded */

}

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.

Wednesday, May 23, 2007

Full Metal Alchemist

PEOPLE CANNOT GAIN ANYTHING WITHOUT SACRIFICING SOMETHING

YOU MUST PRESENT SOMETHING OF EQUAL VALUE TO GAIN SOMETHING

A story about two brother alchemists. Actually not real alchemist, but a little fantasy with fun stories about these two. The story began with their mother death, and the little brother body lost. The mother death was because of fever. They make an experiment to return the mother soul. But it was failed, and caused the little brother lost his body. To prevent worst, the old brother put his soul to an armor. This accident was not only caused lost of little brother body, but also caused lost of old brother arm and leg. To return this lost, they need sorcerer stone (ah, this is like in Harry Potter story). The journey began, and the adventure of these two are an unique, fun, and full humor story to be watched.

My PC Crash

I confused about my PC. It was began with AMD Athlon 1700+ trouble. When it was boot, no HDD nor optical drive detected. Beside i had a seagate 80GB and a liteOn DVD ROM. I still suspicious to the mainboard. Usually this thing was the source of trouble. But the fact was different. The problem was my mentari 450 wattage power suply, the worst power supply i had ever have. Simply, Rp. 195.000 was the only solution to have an Extreme 450 wattage power supply. The result? Hehehehe, more better system than before.

Tuesday, May 22, 2007

Virtual Box Didn't Run Yet

Uh, looking for libxerces27, for depend of my virtual box. My libxerces27 for edgy is not satisfied for dapper, because of it dep too. Ah, I still miss this virtual machine, because I need for my TA (Last Literature??). I hope, after this i can run my virtual box. i have download libxerces27 for Dapper, and i hope this is the last depend.

Love Ubuntu?

Ah, so glad to see many friends use Ubuntu. Willy, Luthfi, Rizal, Mr. Ardi (need some repo, mister?) and some people. They said that they love Ubuntu so much. Ah, I love it. But i still don't understand about their love. first, most of people like KDE and not Gnome, including them. The reason is that KDE have more nice looking than Gnome. But, when using Ubuntu, they said that they love Ubuntu. Is it acceptable? Ah, so weird, just because of Human theme (the default theme on Ubuntu), they love Ubuntu. How if they try to use OSX theme? Hohohoho, i think their love will change, not love, but fanatic, totally! How did I sure? Because I used it!

Thursday, May 3, 2007

ISO MOUNT

root@masyusuf:/home/masyusuf/master/ubuntu-6.06# mount -o loop ubuntu-6.06-server-i386.iso /mnt/
root@masyusuf:/home/masyusuf/master/ubuntu-6.06# ls /mnt/
dists install md5sum.txt pool README.diskdefines
doc isolinux pics preseed ubuntu
ealaaaaaaaaaaahhhhhhhhhh, i just know today. hikikikikikikik

Saturday, April 28, 2007

VIRTUAL BOX ERROR

I installed virtual box on my Ubuntu edgy, but after using once, i could not used it again. some error appear during creating new virtual machine. I don't know what happen, but after reinstallation, i still found the same error as before. ah, maybe i had to try at Dapper, coz libqt i used in edgy is still for Dapper.

Monday, April 23, 2007

VIRTUAL BOX

Not about this package, it's dep make me a bit crashmind. I have to do, coz of my friend Virtual Machine on Win$. I don't have any lisence to use bother Win$ nor VM Ware. That why i have to install Virtual Box on my Edgy. To have it in my PC i have to go to warnet several times. libxalan is first dep, and libxerces27 is the second. I hope my Edgy can run Virtual Box as well as my friend VM Ware...

AH.... MY FIRST BLOG

Finally i have a blog. I know it is new for me, writing some thing to be read by another people. Event it just as simple as write and publish, but my hand was so heavy to do. It is not only just write and publish, but also a wish to share, event just a bit of word. Ah, my first blog, it is not as simple as write and publish, but a wish to share with other. Like open source? Hehehehehe, I don't think so...