ข้ามไปที่เนื้อหาหลัก

บทความ

กำลังแสดงโพสต์จาก ตุลาคม, 2008

increase font size in Eclipse

จดไว้เมื่อนานมาแล้ว scripts > editor > increase font sizes ตอนนี้ tab script มันหายไปไหนแล้วหว่า เอาใหม่ๆ อันนี้ work แน่นอน windows > preference ref : alagad see other eclipse topic .

To enforce the AIT Acceptable Use Policy of IT Services, access to some web sites is blocked.

AIT reduces a number of blocking sites lately, but still cannot distribute the Internet connection to individual students. How can he allow bittorrent from one student using bandwidth of the others ? The Internet inside this is very slow and sometimes timeout.

gedit tis-620

ถ้า Open จากตัวโปรแกรม gedit เอง มันจะเลือก encoding ได้ หรือ จะให้มัน auto ก็ $ gconf-editor /apps/gedit-2/preferences/encodings/auto_detected แล้ว เพิ่ม TIS-620 เข้าไป ย้ายให้มันไปอยู่บนสุด ... แค่นั้น reference : คุณ pongtawat

วิธีลง joomla

ทำ ตามนี้ แหละ 1. โหลดมาจาก joomla.org 2. unzip ไปลงไว้ที่ htdocs 3. สร้าง database ชื่ออะไรก็ได้แล่ะ ( ต้องสร้าง database ไว้ก่อน **) 4. แล้วก็เข้าหน้าที่ลงไว้ username ของ admin คือ admin น้ะจ้ะ ไม่ต้อง งง ว่าทำไมเขาให้กรอกแต่ email

how to add/remove program window vista

จะเปลี่ยนที่ทำ.. เร๊อะ

svn: PROPFIND request failed on

ถ้าเครื่องเราเคยต่อกับ svn server ครั้งนึง แล้ว มันดันจำ username ไว้ ดังนั้น พอ svn co อันใหม่ ที่ต้องใช้ username อันใหม่ มันจะไม่ถาม username เลย ( เพราะว่าเครื่องมันจำไว้แล้ว ) แล้วพ่น error มาตามนี้ svn: PROPFIND request failed on '/svn/rock_factory' svn: PROPFIND of '/svn/rock_factory': 403 Forbidden (https://se.cs.ait.ac.th) วิธีแก้คือ เข้าไปลบ /home/dsin/.subversion/auth/svn.simple/ec3e38dfeace3042dac8d86f11a12849 สามารถเปิดเข้าไปดูได้ว่า ในไฟล์มันเก็บ username, password ของ SVN server ไหน แล้วลบให้ถูกอัน หรือ จะใช้ $ svn --username=dsin ci ก็ได้ ( เป็นการบอกว่า ใช้อีก username นึงนะ)

เปิด ubuntu รับไฟล์ที่ส่งผ่าน บลูทูธ จาก เครื่องอื่น หรือ โทรศัพท์มือถือ ( how to receive file from mobile phone via bluetooth using ubuntu linux )

ติ๊กที่ Receive files from remote devices แล้วรอรับไฟล์ได้เลย ถ้า 8.10 มันจะไม่มีแล้วนะ ไม่รู้หายไปไหน ให้ทำตามนี้ $ sudo aptitude install gnome-bluetooth bluez-utils python-bluez Applications > Accessories > Bluetooth file sharing เปิดไว้ หลังจากนั้นส่งไฟล์ แล้วมันจะถาม ถ้าตอบ ok ก็ส่งได้แล้วล่ะ ref : ubuntuforums

install php5, mysql, phpmyadmin in ubuntu

$ apt-get install php5 mysql-server-5.0 phpmyadmin - ตอนลง mysql-server-5.0 มันจะให้ตั้ง password ของ root ดังนี้ - phpmyadmin มันจะให้ เลือกได้ว่า จะให้ phpmyadmin config ตัวไหนให้ ก็เลือก apache ตัวที่ใช้อยู่ ในที่นี้คือ apache2

phpunit test installation

install pear first windows php5/go pear.bat install on local copy It will be installed on the php5 folder ubuntu linux $ apt-get install php-pear install phpunit วิธีลงทำ ตามนี้ pear channel-discover pear.phpunit.de pear install phpunit/PHPUnit ตัวอย่างโค้ด MyPhpClassTest.php Note : MyPhpClass.php คือ คลาสที่เราต้องการจะเทส <? require_once '../MyPhpClass.php'; require_once '/usr/share/php/PHPUnit/Framework/TestCase.php'; class MyPhpClassTest extends PHPUnit_Framework_TestCase{ private $myPhpClass = null; protected function setUp(){ $this->myPhpClass = new MyPhpClass(); } protected function tearDown(){ $this->myPhpClass = null; } public function testGetUserRank(){ $this->assertEquals(date('Y-m-d'), $this->myPhpClass->getDate()); } } ?> วิธีรันเทส $ phpunit MyPhpClassTest.php install phing ลง ตามนี้ $ pear channel-discover pear.phing.info $ pear install phing/phing สร้างไฟล์ build.xml เพื่อบอกว่าจะรัน unit test อะไร $ phing build.xml มั

how to create SVN respository

/home/sdm1$ mkdir mysvn /home/sdm1$ cd mysvn อย่างอันนี้ สร้าง respository ชื่อว่า rock_factory /home/sdm1/mysvn$ svnadmin create rock_factory /home/sdm1/mysvn$ cd rock_factory /home/sdm1/mysvn/rock_factory$ ls conf dav db format hooks locks README.txt ลอง checkout สิ $ svn co svn+ssh://unixUsername@web13.xx.xxx.xx.xx/home/sdm1/mysvn/rock_factory เหมือนว่า ถ้าใช้ ssh มันจะยึดเอา unixUsername เป็นคน submit เลยแหละ

proxy บน ubuntu

- ถ้าต้องการ apt-get โดยใช้ proxy ให้แก้ ~/.bashrc export http_proxy=http://proxy.xxx.xx.xx:3128 export ftp_proxy=http://proxy.xxx.xx.xx:3128 export https_proxy=http://proxy.xxx.xx.xx:3128 แล้ว $ source ~/.bashrc - ถ้าต้องการให้ snaptic ใช้ proxy System > Preperences > Network Proxy

How to set proxy in firefox

Edit -> Preferences -> Advanced > Network > Settings i.e. proxy01.ait.ac.th ( use inside school to go outside only )

Vista window update restart !?

พออัพเดตเสร็จ เล่นมาหลบมุม นับเวลาถอยหลังอยู่ที่มุมขวาล่างอะนะ เคยยุ่งๆไม่ได้สนใจมัน แป๊ปนึง แมร่ง รีสตาร์ทให้เองเฉยเลย !!

int(M) ของ mysql แปลว่าอะไร

INT(11) หรือ SMALLINT(7) คิดว่า 11 หรือ 7 เป็นความยาวตัวอักษรของตัวเลขเร๊อะ ผิดแล้ว !! INT ก็ยังคงเก็บได้เป็น INT คือ -2147483648 ถึง 2147483647 เหมือนกันหมด ถ้าเราสร้างคอลัมน์ INT(11) ZEROFILL, 100 จะแสดงผลดังนี้: 00000000100 ref : guelphdad

ubuntu fix ip วิธี fix IP address บนอุบันตู

แก้ไฟล์ /etc/network/interfaces จะยัดกี่ ip ลงในเครื่องก็ยัดไป [ เราสามารถใช้ eth0:0, eth0:1, eth0:2, eth0:N (ได้มากสุด 254). ( ref ) ] NOTE : gateway คือ IP address ของ router เช่น ถ้าเป็น linksys default คือ 192.168.1.1 auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.41.170.105 netmask 255.255.255.0 dns 192.41.170.15 gateway 192.41.170.23 auto eth0:1 iface eth0:1 inet static address 192.41.170.101 netmask 255.255.255.0 auto eth0:2 ... หลังจากนั้น $ sudo /etc/init.d/networking restart ถ้าเป็น DHCP, ดูตัวอย่างข้างล่าง auto lo iface lo inet loopback # primary network interface auto eth0 iface eth0 inet dhcp # address 192.168.122.2 # netmask 255.255.255.0 # network 192.168.122.0 ถ้าเป็น printer หรืออะไร ที่มันต้อง fix ip ก็ fix ip ที่ไม่อยู่ในช่วง DHCP แต่ต้อง Subnet Mask และ Default Gateway เดียวกัน เช่น ถ้าของ linksys ก็ใส่เป็น 192.168.1.2, 192.168.1.3, ... ต่อจาก 192.168.1.1 ซึ่งเป็น ip ของ router ได้เลย ถ้า fix ip แล้วมีปัญหา แบบว่า เข้าทาง dns ไม่ไ

apache set DNS

1. จับตาดู web05 ให้ดีนะเธอว์ /etc/apache2/apache2.conf ServerRoot "/etc/apache2" ServerName web05:80 # or localhost:80 ServerName web1:80 ServerName web07:80 2. $ cd /etc/apache2/sites-available $ sudo cp default web05 $ sudo vim web05 # or localhost NameVirtualHost web05:80 # or localhost:80 NameVIrtualHost web05:443 <VirtualHost web05:80> # or localhost:80 ServerAdmin webmaster@localhost DocumentRoot /var/www/web05 RailsBaseURI /ror # RailsBaseURI /mybasics <directory> Options FollowSymLinks AllowOverride None </directory> <Directory /var/www/web05> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <directory> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow

connect to mysql using mysql front

Connect fill in hostname, username, password, database name create table NOTE : It's not necessary to pay attention to default '' or default NULL , if you use GUI. If you use show create table customer , it will automatically generate that for you. import data from file ( .txt or .csv ) If you are using windows, the line must be terminated with \r\n. Normally, we ignore the first line, that is the description of the field. For example, part.txt "partNum","partDesc","onhand","warehouse" "AITAV13","Blade",40,"A" "AITAX12","Iron",104,"A" "AITAX44","Tray",33,"B" "AITAZ52","Dartboard",20,"B" "AITBH22","Cornpopper",95,"B" "AITVS23","Mixer",30,"C's" NOTE : From the first line, "partNum","partDesc","onhand","warehouse" &

ลอง vista share file to ubuntu

right click > shared.. เซต user กับ permission แล้วจะได้ที่อยู่มา มาฝั่ง ubuntu เลือก Connect to server... - เลือกเป็น windows share - ใส่ ip ของเครื่อง windows ลงไป - ช่อง folder ให้ย้อนกลับไปดูรูปบน ในที่นี้ใส่แค่โฟลเดอร์ users พอ - username ใส่ username ที่เราให้ permission ของฝั่ง windows ได้ล่ะ สังเกตว่ามันจะใช้ protocol smb ถ้า ubuntu อยาก share มั่ง Properties มันใช้ SAMBA เป็นเบื้องหลัง ดังนั้น วิธี connect ก็ต่อเข้ามาแบบ window share เหมือนกัน

OAI ?

suggest อะไรมาน่ะ กำลังทำงาน !!!!

sysdeo eclipse plugin configuration

โหลด tomcatPlugin ไปลงใน eclipse/plugins restart eclipse แล้ว config ตามนี้ ถ้าใช้ อิปุ่มแมวเหลือง ให้ใส่ JVM parameter เป็น -Xms120m -Xmx2048m -XX:MaxPermSize=1024m To start tomcat  - Select ' Tomcat' from the menu > 'Start Tomcat' - Check the ' Console' view at the bottom. If Tomcat was able to startup correctly, a ' INFO: Server startup in xxxxx ms' message should appear - Try http://localhost:8080/ ref : keyboardsamurais see other eclipse topic .

DSPACE javadoc

อยู่ ที่นี่ แล้ว หรือ สร้าง javadoc ของตัวเองก็ได้ โดยเข้าไปที่ [dspace-source]/dspace และรัน $ mvn javadoc:javadoc doc ทีสร้างเสร็จแล้วจะถูกเก็บไว้ที่ [dspace-source]dspace-api/target/site/apidocs/index.html เหรอ ? หาไม่เห็นเจอเลย แหะๆ ref : dspace

DELL 1310 ubuntu network card problem

เครื่องอื่นลงใช้ wired ได้ แต่ wireless ไม่ได้ แต่พอ update ubuntu แล้วก็ใช้ wireless ได้ไม่มีปัญหาอะไร แต่มีเครื่องนึงที่เจอ คือ wired ก็ใช้ไม่ได้ เข้าไปเซตที่ /etc/network/interfaces เพิ่มนี่ลงไป auto eth0 iface eth0 inet dhcp address 00:11:22:33:44:55:66 ( 00:11:22:33:44:55:66 คือ HWaddr ) แล้ว $ /etc/init.d/networking restart ผม restart ubuntu ไปรอบนึงด้วยแล่ะ เพราะว่า ผมเซต address ตอนแรกผิด แหะๆ เลยไม่รู้ว่า ทำเสร็จแล้วต้อง restart หรือเปล่า วิธีที่ง่ายกว่านั้นคือ แล้ว $ /etc/init.d/networking restart รู้สึกมันจะ fill ในไฟล์ interface ให้เองเลยนะ

Software Process

- The waterfall model - Incremental Process model deliver in each increment - Evolutionary Process model ( Iterative ) พัฒนาหลายๆรอบ เพิ่ม feature, ส่ง prototype ก่อนแล้วค่อยพัฒนาต่อ -- spiral model -- concurrent model - Specialize Process model -- component-based development -- formal methods -- Aspect-Oriented Software Development นิยาม crosscut ว่าจะให้ aspect นี้รันเมื่อไหร่ เช่น เมื่อมีการเรียกเมดธอดที่ขึ้นต้นด้วยคำว่า set และเมื่อออปเจกไหนเรียกเมดธอด set ดังกล่าว โค้ด advice ก็จะรัน ทำการล๊อกว่าออปเจกนี้ถูกเซตค่าจากอะไรเป็นอะไรเป็นต้น Rational Unified Process model ( RUP ) 1. Use case-driven ( Visual Modeling using UML ) UML, Business Use case Diagram, Use case Diagram, Activity Diagram, Class diagram, Interaction Diagrams ได้แก่ Sequence diagram และ Collaboration diagram 2. Incremental and Iterative development 3. Architecture-centric 4 phases 1. Inception - Objective 2. Elaboration - Architecture -- Logical view แบ่งเป็นส่วนหรือระบบย่อยอย่างไร -- Process view ค

Eclipse new servlet

new dynamic web project na see other eclipse topic .

design database zodb architype in Plone using ArgoUML

Installation ArgoUML 1. download ArgoUML from tigris 2. $ java -jar [ArgoUML path]/argouml.jar ArchGenXML 1. download from plone.org > product > development tools > ArgoGenXML Get ArchGenXML for all platforms (579KB) Python Egg 2. $ ln -s ~/src/ArchGenXML/ArchGenXML.py ~/bin/ArchGenXML $ rehash $ ArchGenXML --version How to use ArgoUML สร้าง class+attribute สร้าง relation สามารถเข้าไปแก้ได้โดย double click เบอร์ 3 เข้าไป ใส่ชื่อ และ ความสัมพันธ์ได้ ถ้า จะ เซฟ โปรเจค File > save project as .. ถ้า จะ export xmi, File > export XMI .. How to use ArchgenXML $ ArchGenXML ~/[filename].xmi ~/demo/Product/tt $ cd demo $ bin/runzope http://localhost:8080/

how to set tab indent in eclipse

window > preferences see other eclipse topic .

eclipse create view

new see other eclipse topic .

eclipse install

1. download Eclipse IDE for Java EE Developers (162 MB) from eclipse.org 2. extract to the directory $ tar xvzf Desktop/eclipse-jee-ganymede-SR1-linux-gtk.tar.gz 3. run eclipse 4. done ถ้า eclipse crash บ่อย เพิ่ม memory ให้มันซะ ~/eclipse/eclipse -vmargs -XX:MaxPermSize=128m -Xmx512m -Xms128m

วิธีเข้าห้องใน IRC

เอามาจาก triamudom /j #ชื่อห้อง อายว่ะ ฮาๆ วิธี register ถามจาก NickServ ละกัน /msg NickServ help register น่าจะเป็นประมาณนี้ /ns REGISTER <password> <email> verify โดยไปเช็คเมลก่อน เวลาล็อกอิน /ns identify <pass> หรือ ถ้าจะบังคับให้คนอื่นเปลี่ยนชื่อ /ns ghost <nick> <pass>