Skip to content

Instantly share code, notes, and snippets.

@cpamungkas
cpamungkas / gist:2964768
Created June 21, 2012 09:12
Generator Random Key
function GeneratePWDSecutityString: string;
const
Codes64 = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/';
var
i, x: integer;
s1, s2: string;
begin
s1 := Codes64;
s2 := '';
for i := 0 to 15 do
@cpamungkas
cpamungkas / gist:2964781
Created June 21, 2012 09:15
Example Trigger Before Insert
DELIMITER $$
DROP TRIGGER /*!50032 IF EXISTS */ `ujicobadb`.`tr_auto_jual`$$
CREATE
/*!50017 DEFINER = 'root'@'localhost' */
TRIGGER `tr_auto_jual` BEFORE INSERT ON `tx_jualan`
FOR EACH ROW BEGIN
UPDATE tm_produk SET nQtyJual = (nQtyJual - new.nQty) WHERE sIdProduk=new.sIdProdukfk ;
END;
@cpamungkas
cpamungkas / gist:2964788
Created June 21, 2012 09:17
Example Delphi Generator Key
procedure TForm1.btn2Click(Sender: TObject);
begin
Edit1.Text := GeneratePWDSecutityString();
end;
@cpamungkas
cpamungkas / index.html
Created September 15, 2022 06:46
LYmxVLw
<button>Glowing</button>