h1

Ruby 1.8.6 and 1.9.0 Diff on Methods

May 15, 2007

I am waiting my friend install Oracle 10g on our Development Server in SLES 10, so I grab my intermediate file of my Ruby Doc Browser and Compare it with the Ruby 1.9, and this is the result (screen-shoot) in my Open Office

Ruby Diff 1.8.6 to 1.9.0 Kernel
Read the rest of this entry »

h1

notepad++ my current editor

May 3, 2007

My Current editor for webdevelopment (check on Categories on this post)
NOTEPAD++
notepad.png

h1

Link (a href) untuk Delete Record yang aman

May 2, 2007
<a href="#" class="delrec" norec="1">
	<img src="del.gif");?>"/>
</a>
- - - - - -
<script type="text/javascript">
$().ready(function() {
	$(".delrec").click(function(){
		rec = $(this).attr("norec");
		if (confirm("Are you sure to delete this record:"+rec)) {
			location = "<?php e($this->webroot."ctrls/delete/");?>"+rec;
		}
	});
});
</script>
h1

Mercurial - adding some file match on ext ( hg - add glob regex -n )

May 2, 2007

some of the command are:

hg add -n "glob:**.ctp"    // it will show match file, doesnot execute the command
hg add "glob:**.ctp"       // this one will add to the next commit
hg revert -all             // this one will revert back to the last commit ( all files )
if you already change the file it will be have add ext .orig

Read the rest of this entry »

h1

Ruby Code Generator for CakePHP

May 2, 2007

Creating CakePHP Code using Ruby Code Generator from PostgresSQL or MySQL database just like scaffolding (but on steroids)

http://rubyforge.org/projects/rubycakephp/

masih dalam taraf bersih-bersih dulu biar ndak kebawa coding yang di kantor en restructure coding biar ruby way gituuu…

h1

CakePHP - classpath on cache error

April 30, 2007

when you have function like this and if it process rapidly (says like using timeout or timer) and if it the engine on the back-end query to database, sometimes the result of the cache for classpath got errors, so you must adjust how you call to the server using ajax!.

function ajaxReload(action,targetID) {
logEvent(’===>AJAX:Reload’+targetID);
$.ajax({
type: “POST”,
url: “webroot);?>boards/”+action,
data: “name=John&location=Boston”,
success: function(msg){
$(targetID).html(msg);
}
});
}

h1

Terbilang USD / IDR versi Indonesia

April 26, 2007

Is it Ruby-way ala coding…

def terbilang(angka)
satuan = [''] + %w{satu dua tiga empat lima enam tujuh delapan sembilan sepuluh sebelas}.collect{|x|x+’ ‘}
triple = [['puluh',10,20,100],['ratus',100,200,1000],['ribu',1000,2000,1000000],['juta',1000000,1000000,1000000000],['milyar',1000000000,1000000000,1000000000000]]
hasil = satuan[angka] if angka<12
hasil = terbilang(angka.divmod(10)[1]) +’belas ‘ if angka>=12 and angka<20
hasil = ’seratus ‘+terbilang(angka-100) if angka>=100 and angka<200
hasil = ’seribu ‘ +terbilang(angka-1000) if angka>=1000 and angka<2000
triple.each{|x|hasil=terbilang(angka.divmod(x[1])[0])+x[0]+’ ‘+terbilang(angka.divmod(x[1])[1]) if angka>=x[2] and angka<x[3]}
hasil
end

h1

Ruby Doc / Class Browser (methods, class / instance vars & constants)

April 23, 2007

Update ruby.doc.browser, this is the screen shoot…
arrayc.jpg
Read the rest of this entry »

h1

Ruby Doc / Class Browser (methods for now :-)

April 16, 2007

my development in ruby using editor that not have auto complete or intelisense, so when i need to know some of the methods is little bit difficult, I am not bother with it but after I have read discussion in our ruby mailling-list, Iam sure not only me have trouble like this , so after digging the ruby quiz, i got simple browser to check methods object of the core / lib / module.scshoot.gif

this is html file and it contains 415 files, pretty big huh, this file can be browse using index / content and iframe. or pick the html file with classname on it.

anyway this not ready but for my need it ok.

*Update
you can download this file in rubyforge.org/rubydocbrowser

h1

DSL can’t access share on Damm Small Linux - N

January 1, 2007

You might not have permission to use this network resource.
Contact administrator of this server to find out if you have access permissions.

The account is not authorized to log in from this station

this is the result if we try to logon to DSL ( dsl-n-01RC4.iso ) from windows XP
gues what, the problem is realy simple, the “/etc/samba/smb.conf” doesn’t have line in global says:

[global]
  encrypt passwords = true

Usually I am using Suse 10.1 and also testing on ubuntu 6.10 server, and the configuration was good on that distribution.

Ok I’ll show you the recent configuration of

DSL - N:
[global]
   workgroup = HOME
   server string = %h server (Samba, DSL)
   dns proxy = no
   log file = /var/log/log.%m
   max log size = 50
   syslog = 0
   encrypt passwords = true
   obey pam restrictions = yes
   invalid users = root
   socket options = TCP_NODELAY
ubuntu 6.10 - Server:
[global]
   workgroup = HOME
   server string = %h server (Samba, Ubuntu)
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   invalid users = root
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
   socket options = TCP_NODELAY