About

Thank you for your visited

Selasa, 19 Juni 2012

Cari nilai huruf (menggunakan edit plus)




<html>
<head><title>JAVASCRIPT</title></head>
<body>
<form name='frm1' method='post'>
<table border=0 align=center>
<tr>
<td>Input Nilai Angka[0..100]</td>
<td> :</td>
<td><input type='text' name='nilai'></td>
</tr>
<tr>
<td colspan=3 align='center'><input type='button' value='Hitung' onclick='hitung();'><input type='reset' value='Baru'>
</td>
</tr>
<tr>
<td>Nilai Huruf</td>
<td> :</td>
<td> <input type='text' name='nhuruf' readonly></td>
</tr>
<tr>
<td>Predikat</td>
<td> :</td>
<td><input type='text' name='predikat' readonly></td>
</tr>
</table>
</form>
<script>
function hitung()
{
var na=document.frm1.nilai.value;
var nh='';
var pt='';
if(na<0)
{
alert('Tidak boleh negatif..!');
document.frm1.na.value=""
document.frm1.na.focus();
return false;
}
if(na>=85 && na<=100)
{ nh='A';
pt='Sangat Memuaskan';
}else if(na>=75 && na<85)
{ nh='B';
pt='Memuaskan';
}else if(na>=60 && na<75)
{ nh='C';
pt='Cukup';
}else if(na>=45 && na<60)
{ nh='D';
pt='Kurang';
}else
{ nh='E';
pt='Buruk';
}
document.frm1.nhuruf.value=nh;
document.frm1.predikat.value=pt;
return;
}
</script>
</body>
</html>

Minggu, 17 Juni 2012

Tugas Besar Praktikum.Visual II (Delphi)

From 1






procedure TForm1.Button1Click(Sender: TObject);
begin
if(Edit1.Text = 'teo') and
(Edit2.Text = '102325') then
form2.show
else
Application.MessageBox('Maaf user name dan password salah. . .!!','warning',0);
exit;
end;
end.
procedure TForm1.Button2Click(Sender: TObject);
begin
close;
end;
end.


Form 2





procedure TForm2.Exit1Click(Sender: TObject);
begin
close;
Application.MessageBox('Jangan lupa keluar','Warning',0);
exit;
end;
end.
procedure TForm2.ProgramPenjualanBarang1Click(Sender: TObject);
begin
form3.Show
end;
end.
procedure TForm2.Pencarian1Click(Sender: TObject);
begin
form4.show
end;
end.


Form 3







procedure TForm3.Button1Click(Sender: TObject);
begin
  adotable1.Post;
  messagedlg('Data telah tersimpan',mtinformation,[mbok],0);
  dbedit1.Text:='';
  dbedit1.Text:='';
  dbedit1.Text:='';
  dbedit1.Text:='';
  dbedit1.Text:='';
  dbedit1.Text:='';
end;

procedure TForm3.Button2Click(Sender: TObject);
begin
adotable1.Append;
end;

procedure TForm3.FormCreate(Sender: TObject);
begin
dbcombobox1.Items.Add('001');
dbcombobox1.Items.Add('002');
dbcombobox1.Items.Add('003');
dbcombobox1.Items.Add('004');
dbcombobox1.Items.Add('005');
end;

procedure TForm3.DBComboBox1Change(Sender: TObject);
begin
if dbcombobox1.ItemIndex=0 then
  begin
dbEdit1.Text:='notebook';
dbedit2.Text:='2000000';
  end
else if dbcombobox1.ItemIndex=1 then
  begin
dbEdit1.Text:='monitor';
dbedit2.Text:='800000';
  end
else if dbcombobox1.ItemIndex=2 then
  begin
dbEdit1.Text:='hardisk';
dbedit2.Text:='200000';
  end
else if dbcombobox1.ItemIndex=3 then
 begin
dbEdit1.Text:='cd-room';
dbedit2.Text:='20000';
  end
else if dbcombobox1.ItemIndex=4 then
  begin
dbEdit1.Text:='Keyboard';
dbedit2.Text:='50000';
  end;
end;
procedure TForm3.Button4Click(Sender: TObject);
begin
if dbEdit1.Text= '' then
  begin
  ShowMessage('Pilih dahulu barang yang ingin Anda hapus!');
  Exit;
  end;
  ADOTable1.Delete;
  ADOTable1.refresh;
end;
procedure TForm3.Button3Click(Sender: TObject);
begin
adoTable1.Edit;
AdoTable1.Refresh;
end;

procedure TForm3.Button5Click(Sender: TObject);
begin
close;
end;
procedure TForm3.Button6Click(Sender: TObject);
var
  i,j,total : integer;
  totbayar,diskon : real;
begin
  i:=strtoint(dbedit2.Text);
  j:=strtoint(dbedit3.Text);
  total:=i * j;
  dbedit4.Text:=IntToStr(total);
  if (total > 100000) and (total < 250000) then
  begin
    diskon:=0.5*total;
    dbedit5.Text:=FloatToStr(diskon);
  end
  else if (total > 250000) and (total < 500000) then
  begin
    diskon:=0.1*total;
    dbedit5.Text:=FloatToStr(diskon);
  end
else if (total > 500000) and (total <1000000) then
  begin
    diskon:=0.15*total;
    dbedit5.Text:=FloatToStr(diskon);
  end
else if (total > 1000000) then
begin
   diskon:=0.2*total;
    dbedit5.Text:=FloatToStr(diskon);
end;
    totbayar:=total-diskon;
    dbedit6.Text:=FloatToStr(totbayar);
end;



Form 4




procedure TForm5.Button1Click(Sender: TObject);
var
  kunci : string;
begin
  kunci := edit1.Text;
  if radiogroup1.ItemIndex = 0 then
  adotable1.IndexName:=''
  else if radiogroup1.ItemIndex=1 then
  adotable1.IndexName:= 'Nama barang';
if not adotable1.FindKey([kunci]) then
begin
MessageDlg(‘yang anda cari tidak ada’,mtinformation,[mbOK],0);
End;
adotable1.Refresh;
end;
procedure TForm5.Button2Click(Sender: TObject);
begin
close;
end;
end.

silahkan click gambar di bawah untuk download programnya





Sabtu, 09 Juni 2012

Tugas struktur data (Makalah)

ayo klik aja gambar dibawah ini:

Sabtu, 02 Juni 2012

menghubungkan 2 buah jaringan dengan menggunakan Cisco Packet Tracer

Hasil Peghubungan Dua Buah Jaringan



Ip Address Kelas C

Tugas mikrokontroller (Interrupt ^_^)


#include <mega8535.h>
#incude <delay.h>
Insigned char led
Void led_walk()
{
PortA = 0b1010;
Delay_ms (3000);
PortA = 0b0101;
Delay_ms (3000);

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Enterprise Project Management