CREATE TABLE test1(a1 INT);
CREATE TABLE test2(a2 INT);
CREATE TABLE test3(a3 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
CREATE TABLE test4(
a4 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
b4 INT DEFAULT 0
);
create trigger employee_BI BEFORE INSERT
on employee
FOR EACH ROW
BEGIN
INSERT INTO employee2 values (NEW.employee_id, NEW.name, NEW.birthdate,
NEW.marriage_status, NEW.phone_number1, NEW.phone_number2, NEW.address);
END;
http://dev.mysql.com/doc/refman/5.0/en/triggers.html
CrystalReportViewer1.ReportSource = CR
With CR
.Refresh()
.PrintOptions.PrinterName = “EPSON TM-T88III Receipt”
.PrintToPrinter(1, False, 1, 1)
End With
Paul Timmerman
Pertama kita mesti aktifkan dulu CUPS dan pastikan aktifkan juga pilihan START AT BOOT-nya. Defaultnya pclinuxos mematikan cups. Caranya K–configuration–pclinuxos control centre–system–configure system service.
Setelah cups terinstall baru kita tambahkan printer. Masuk ke menu setting–control center–periperal printer. Karena aku pake print server pada sistem windows so aku pilihnya ‘protokol’ LPD dgn queue lpt1.
Hanya sekedar dokumentasi…
1. Make sure your system is up to date, and includes the necessary tools to compile the new kernel modules:
sudo apt-get update sudo apt-get upgrade sudo apt-get install build-essential
2. Get the patched source:
wget http://www.cakey.de/acerhk/archives/acerhk-0.5.35.tgz wget http://snapshots.madwifi.org/special/madwifi-ng-r2756+ar5007.tar.gz
3. Build the new Madwifi modules, to enable support for the Atheros AR5007EG card:
tar xfvz madwifi-ng-r2756+ar5007.tar.gz cd madwifi-ng-r2756+ar5007 make sudo make install
4. Build the new acerhk module, needed to enable the wireless button on the machine:
cd .. tar xfvz acerhk-0.5.35.tgz cd acerhk-0.5.35 make sudo make install
5. Create a file containing instructions which the system will carry out when the acerhk module is loaded – see comments in the file:
sudo gedit /etc/modprobe.d/amilo_special_keys.modprobe
and paste the following into the file, save and exit
# set up kernel module acerhk to enable Fujitsu Siemens Amilo Li1718 special keys # and enable wireless when the module is inserted. # NOTE: to have the wireless hardware disabled until you press the wireless key on the laptop, # simply replace "echo 1" with "echo 0" in the command below. install acerhk /sbin/modprobe --ignore-install acerhk force_series=6805 autowlan=1; echo 1 > /proc/driver/acerhk/wirelessled
6. Remove the acerhk module which is shipped with Ubuntu:
sudo rm /lib/modules/2.6.22-14-generic/ubuntu/misc/acerhk.ko
7. Rebuild the module dependencies database
sudo depmod -a
8. Tell the system to load the acerhk module at boot time – it won’t otherwise, as it’s not actually an Acer laptop!
sudo gedit /etc/modules
add on a new line at the end of this file, then save and exit:
acerhk
9. restart your machine and you should have a working wifi card.
________________________________ TIPS _______________________________________
_____________________
2.Pilih menu EditReplace. Ketik Hide pada kolom Find, namun kosongkan kolom Replace With, klik Replace All. Tujuannya untuk menghapus semua kata Hide dalam file ini. Setelah selesai, tutup dan simpan file.
_______________________________
2.Supaya koneksi dial-up tetap berjalan meski Fast User Switching di-enable, masuk ke registry di direktori HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon.
3.Klik kanan pada panel sebelah kanan dan pilih New String Value. Beri nama KeepRasConnections dan beri nilai 1. Restart komputer.
Pengaturan Multiple User
________________________________
_______________________ STEP BY STEP _________________________________________
1. Buka Control Panel, pilih Add/Remove Program dan klik Add/Remove Windows Component. Enable Fax Services dan klik Next.
2. Klik StartAll ProgramsAccessoriesCommunicationFaxFax Console untuk menjalankan Fax Configuration Wizard. Atur semua setting, termasuk nomor faks dan modem yang digunakan serta pengaturan incoming fax.
3. Buat semua faks dari Fax Console. Periksa semua isi sebelum dikirim, termasuk setting dan sebagainya.
Mengatur Kualitas Cetak
Memunculkan Penampakan Fitur Tersembunyi
_____________________________ Desktop ____________________________
Desktop
[Windows] + [M] Minimize semua window
[Windows] + [Shift] + [M] Restore semua window yang di-minimize
[Windows] + [Ctrl] + [F] Mencari komputer dalam jaringan
[Windows] + [F1] Menampilkan halaman Help
[Windows] + [Break] Memunculkan window System
Properties
[Windows] + [Tab] Scroll tombol di Taskbar
Jika Anda menggunakan keyboard lama yang tidak dilengkapi dengan tombol Windows, gunakan paduan tombol Ctrl + Esc.
______________________ Kinerja Komputer -_________________________________________
AVG(ekpresi) ==> Nilai rata – rata dari colom yang tidak nul
Count ==> menghitung jumlah baris data dalam tabel
Count(ekpresi) ==> menghitung jumlah baris data dalam tabel yang tidak null
count (distinct ekpresi) ==> count hanya menghitung colom yang unik
Max(expresi) ==> Mencari Nilai tertinggi
Min(expresi) ==> Mencari nilai terendah
Sum(ekpresi) ==> Menjumlahkan baris nilai data dalam tabel yang bukan null
stdev(ekpresi) ==> Menghitung standar deviasi dari nilai kolom yang bukan nilai null
stdevp(ekpresi) ==> Menghitung standardeviasi dari suatu populasi colom yang bukan null
Var(ekpresi) ==> Menghitung varian dari nilai colom yang bukan null
Contoh ::
Group By
contoh :
select
city,
count(*) as jumlah_cust
from customer
group by city
Having
contoh :
select city,
count(*) as jumlah_cust from customer
Group by city
Having count (*)>1
subquery
contoh ::
select product_name from product where unit_price = (select unitprice from product where product name = ‘outback lager’)
UNION
Contoh ::
s elect company_name, contact_name from suplier where country = ‘tasik’
union
select company_name, contact_name from customer where country = ‘USA’ order by company_name
JavaScript Button Coding a JavaScript button by yourself JavaScript buttons can give nice effects to your web page. If done properly, JavaScript buttons give very impressive look and feel. This article shows you the creation of a JavaScript button in simple steps. The working of a JavaScript Button The JavaScript button effects are created using images. The JavaScript button requires three images for the different stages (normal, active and clicked). When the user moves the mouse over the image, the image is switched to the ‘active’ image. When the user clicks the image, the image is switched to ‘clicked’ image This in effect creates the feeling of a button. JavaScript buttons are also known as Mouse over buttons. The image object In order to display an image, the HTML code is:
To refer this image in the JavaScript, you need to give a name to the image using the ‘name’ attribute.
The HTML code for the image is ready. Now our button will look as shown below: javascript button Accessing the Image From JavaScript Once the image object is inserted in the HTML page, you can access it using the name you have given. var myimgobj = document.images["jsbutton"]; There are many properties for the JavaScript image object. However, the property that we are interested is the ’src’ property. This property contains the image file name. So if you change the src property of the image object to another file, the image will change. Handling the Mouse-Over Event We need to change the image when the user moves the mouse over the image. So we have to handle the event that the browser sends when the user moves the mouse over the image. However, the image object does not support onMouseOver event. The workaround is to include the image within the anchor ( ) tag and handle the mouse over event. We need to correct the HTML for the image as
We have defined the handler for the mouse over event as changeImage() function. Now we need to define this function. function changeImage() { document.images["jsbutton"].src=”buyit15u.jpg”; return true; } The function (that we defined as the mouse over handler) just changes the src attribute to another image file. The example is available here: JavaScript button Example 1 Click the link above and the code working. Move the mouse over the button; the image changes. Handling the Mouse-Out Event But as you can see, even when you move the mouse out, the image is not changing back to the old image. For changing back to the old image, we need to handle the onMouseOut event also.
The changeImageBack() event handler has to take care of changing the image when the user moves the mouse cursor out of the image. The modified code is as shown below: function changeImage() { document.images["jsbutton"].src=”buyit15u.jpg”; return true; } function changeImageBack() { document.images["jsbutton"].src=”buyit15.jpg”; return true; } See the modified example file: JavaScript button Example 2 Handling the Mouse Click Event You may also want to change the image when the button is pressed. The Mouse Down and the Mouse Up messages are to be handled for creating this effect. The code below handles the Mouse up and Mouse down messages also:
function changeImage() { document.images["jsbutton"].src=”buyit15u.jpg”; return true; } function changeImageBack() { document.images["jsbutton"].src=”buyit15.jpg”; return true; } function handleMDown() { document.images["jsbutton"].src=”buyit15d.jpg”; return true; } function handleMUp() { changeImage(); return true; } The example file is here: JavaScript button Example 3 Navigating to Another Page You can give the URL in the ‘href’ attribute of the anchor ( ) tag to navigate to that page when the user clicks the button. For example: Image Pre-fetching Image pre-fetching is a technique to make the browser load and decode the image early. Image pre-fetching could be used to create smooth image transition effects. You might have noticed that for the first time the button transition is not smooth, in the examples above. The solution is to make the browser load the image and keep it in cache. You can use the Image() JavaScript object to make the browser pre-fetch the images. The javascript code for creating the image object goes like this: upimage = new Image(); upimage.src=”buyit15u.jpg”; downimage = new Image(); downimage.src=”buyit15d.jpg” The image objects are created while loading the page. This forces the browser to load the images from the site and decode it. The button code we developed, with image pre-fetching support, is given below:
upImage = new Image(); upImage.src=”buyit15u.jpg”; downImage = new Image(); downImage.src=”buyit15d.jpg” normalImage = new Image(); normalImage.src=”buyit15.jpg”; function changeImage() { document.images["jsbutton"].src= upImage.src; return true; } function changeImageBack() { document.images["jsbutton"].src = normalImage.src; return true; } function handleMDown() { document.images["jsbutton"].src = downImage.src; return true; } function handleMUp() { changeImage(); return true; }
1.Include gen_validatorv2.js in your html file just before closing the HEAD tag
<script language="JavaScript" src="gen_validatorv2.js" type="text/javascript"></script>
</head>
2. Just after defining your form, Create a form validator object passing the name of the form
<FORM name='myform' action="">
<!----Your input fields go here -->
</FORM>
<SCRIPT language="JavaScript">
var frmvalidator = new Validator("myform");
....
3. Now add the validations required
frmvalidator.addValidation("FirstName","alpha");
the first argument is the name of the field and the second argument is the validation descriptor, which specifies the type of validation to be performed.
You can add any number of validations. The list of validation descriptors are provided at the end of the documentation.
The optional third argument is the error string to be displayed if the validation fails.
frmvalidator.addValidation("FirstName","alpha");
frmvalidator.addValidation("FirstName","req","Please enter your First Name");
frmvalidator.addValidation("FirstName","maxlen=20",
"Max length for FirstName is 20");
4. Similarly, add validations for the fields where validation is required.
That’s it! You are ready to go.
The example below will make the idea clearer
<form action="" name="myform" >
<table cellspacing="2" cellpadding="2" border="0">
<tr>
<td align="right">First Name</td>
<td><input type="text" name="FirstName"></td>
</tr>
<tr>
<td align="right">Last Name</td>
<td><input type="text" name="LastName"></td>
</tr>
<tr>
<td align="right">EMail</td>
<td><input type="text" name="Email"></td>
</tr>
<tr>
<td align="right">Phone</td>
<td><input type="text" name="Phone"></td>
</tr>
<tr>
<td align="right">Address</td>
<td><textarea cols="20" rows="5" name="Address"></textarea></td>
</tr>
<tr>
<td align="right">Country</td>
<td>
<SELECT name="Country">
<option value="" selected>[choose yours]
<option value="008">Albania
<option value="012">Algeria
<option value="016">American Samoa
<option value="020">Andorra
<option value="024">Angola
<option value="660">Anguilla
<option value="010">Antarctica
<option value="028">Antigua And Barbuda
<option value="032">Argentina
<option value="051">Armenia
<option value="533">Aruba
</SELECT>
</td>
</tr>
<tr>
<td align="right"></td>
<td><input type="submit" value="Submit"></td>
</tr>
</table>
</form>
<script language="JavaScript" type="text/javascript">
var frmvalidator = new Validator("myform");
frmvalidator.addValidation("FirstName","req","Please enter your First Name");
frmvalidator.addValidation("FirstName","maxlen=20",
"Max length for FirstName is 20");
frmvalidator.addValidation("FirstName","alpha");
frmvalidator.addValidation(“LastName”,”req”);
frmvalidator.addValidation(“LastName”,”maxlen=20″);
frmvalidator.addValidation(“Email”,”maxlen=50″);
frmvalidator.addValidation(“Email”,”req”);
frmvalidator.addValidation(“Email”,”email”);
frmvalidator.addValidation(“Phone”,”maxlen=50″);
frmvalidator.addValidation(“Phone”,”numeric”);
frmvalidator.addValidation(“Address”,”maxlen=50″);
frmvalidator.addValidation(“Country”,”dontselect=0″);
</script>
Adding Custom ValidationIf you want to add a custom validation, which is not provided by the validation descriptors, you can do so. Here are the steps: function DoCustomValidation() frmvalidator.setAddnlValidationFunction("DoCustomValidation"); The custom validation function will be called automatically after other validations. If you want to do more than one custom validations, you can do all those validations in the same function.
Clear All ValidationsIn some dynamically programmed pages, it may be required to change the validations in the form at run time. For such cases, a function is included which clears all validations in the validator object.
this function call clears all validations you set. Table of Validation Descriptors
<!– 21 Oct 2006 Blocking link to simfatic.com
Example Page |