Posts

Showing posts from June, 2010

Django model

1.when u create 'sample_field' field in model with field attribute 'related_name'. 2.u can backward retrieve data with 'sample_fields' will check later

Tips for django, python

python function argument for example : def func(input1, *input2, **input3) *input2 > tuple **input3 > dict for concrete example: def bucha(name, *things_have,**dudu): print name print things_have print dudu yh get result by call bucha('sirs','duma','dugu',damn='kin') sirs ('duma','dugu') {'damn':'kim'} django models Q > LIKE keyword F > for compare model field with another field in that model -> one to one -> models.OneToOneField() -> many to many -> models.ManyToManyField()

Idea for php, python in one server

P'Pai guide In 1 server we should use... 1.mod_fastcgi for php 2.mod_wsgi for python/django (apache server)

Uninstall Xcode

After google and other mac information web, I get sudo /Developer/Library/uninstall-devtools –mode=all

Matlab's Tip for tonight

Don't know type of variable in Matlab? use function >> classe( ) example >> class( 'thie amrko'); >> ans = >> char >> class(cell(1,1)); >> ans = >> cell

Beginning of my VIM

Change tabs to space in vim Temporarily :set tabstop=4 :set expandtab do command :retab # after set expandtab to activate above command Permanently add above command by vi ~/.vimrc

SVN External

http://beerpla.net/2009/06/20/how-to-properly-set-svn-svnexternals-property-in-svn-command-line/

About Javascript

aha === - jquery have plugin that can pop-up image 'fancy box' or use jquery-ui instead. - selenium and windmill are quite interested - can use command 'typeof' to detect type of object in javascript (done by firebug console) but need to check version of javascript before do something crazy. - mad damn problem may occur!!! about loading order of javascript file in html page, I think last one will override above same keyword. Beware of it

Create patch file

1.diff -crB src dest > patchfile # c-output num, r-recursive, B-ignore blankline 2.patch -p0 -i patchfile

If you want to do something, Do its the best.

อืม วันนี้ ดูรายการ the idol เหมือนว่าเขาจะเสนอประวัติของผู้บริหารอาวุโส ของ โตโยต้า ถึงได้ดูนิดเดียวก่อนจบเหมือนจะได้ ยืนคำว่า "ถ้าจะทำอะไรแล้วต้องทำให้มันดีที่สุด" เริ่มมีพลังขึ้นมาอีกแล้ว ในการเป็นช่างเทคนิคที่เก่งที่สุดในโลก (ทางด้านซอฟทแวร์คอมพิวเตอรหละนะ) :)

Install Full Feature PIL

before install PIL we must... sudo aptitude install build-essential libpng-dev libjpeg-dev libpq-dev python-dev (thank joe)

Tutorial from Svn's Goddess

General todo before merge code - svn ci -m 'message' - svn log --stop-on-copy from working branch for get revision number from to - svn up from trunk - svn merge -r from:to from trunk -> if something conflict , there have some choice to 1.choose one is mine 2.choose others 3.postpone (leave conflict file there) if choose 3 : go to that file to remove unwanted line - then >> svn resolved filename - svn st for check everything allright - svn ci -m 'message' (very thank air)