Tomcat 6 on Debian Lenny

I need to install Tomcat 6 for a school assignment. I thought the installation process was easy as counting 123, but it turned out to be a few hours long of head scratching. Well, the first start is to setup a few environment variables as required by Tomcat: CATALINA_HOME=/home/kenno/bin/apache-tomcat-6.0.13 export CATALINA_HOME; export CATALINA_BASE# JAVA_HOME and Path to java, javac JAVA_HOME=/usr/lib/j2sdk1.6-sun/bin export JAVA_HOME; export PATH=${JAVA_HOME}/bin:${PATH}:. It can be stored in a setEnv....

August 14, 2007 · 2 min · 227 words · kenno

Bash Command Shortcuts

How many times do you find yourself using arrow keys to scroll to the beginning or the end of line of the command line in bash terminal? Do you use backspace to delete every character of what you type to clear the command line? Well, if you answer “yes” to any of the two questions, continue reading. I, myself, have been doing this a lot because I couldn’t remember the shortcut keys to do those tasks....

July 4, 2007 · 1 min · 193 words · kenno

Installing Pidgin on openSUSE 10.2

If you’ve been using Gaim in the past, you probably know that it is no longer available now. The name of the program has been permanently changed to Pidgin. Even though Pidgin has been released for awhile, I’ve been still running Gaim Beta 2 until tonight. Well, not that I don’t want to install Pidgin, I just didn’t know how to do it. I tried to search for Pidgin openSUSE binary package in Google in the past for a few times without any success....

June 10, 2007 · 1 min · 186 words · kenno

How to kill defunct process

Defunct processes are corrupted processes that can no longer communicate between the parent and child one. Sometimes, they become “zombies” and remain in your system until you reboot your machine. You can try to apply “kill -9” command, but most of the time you’ll be out of luck. In order to kill theses defunct processes, you have two choices: Reboot your computer Continue reading… First, let’s find out if the system contains defunct process:...

April 4, 2007 · 2 min · 354 words · kenno

Airport Extreme and Fedora Core 6

Ever since Fedora Core 6 was installed on my PowerBook, I can only access the Internet via ethernet port. It is a not a big problem at home, however if I want to access my university’s network or the Internet from there, the Wireless access is the only way. There is almost no where on campus or in the lab that I could hook the ethernet cable in. So everytime I want to access the network there, I have to boot into Mac OS X....

March 9, 2007 · 2 min · 320 words · kenno

Enable Right-click & Middle-click with Fedora Core 6

The title should have been “How to enable right-click and middle click of PowerBook G4’s one-button-mouse in Fedora Core 6”. Since I’m not very keen in selecting a good title, I hope the one I wrote above made sense. My Apple PowerBook G4 comes with just one button mouse. It’s not a problem when using it in OS X because I can simply emulate the right click by holding “fn” key while clicking....

March 3, 2007 · 2 min · 238 words · kenno

មេរៀនទី២៖ បីជំហានដើម្បីបង្កើតយ៉ាវា

នៅក្នុងមេរៀនមុន យើងបានឃើញឧទាហរណ៍កម្មវិធីតូចមួយ សរសេរជាមួយយ៉ាវា។ យើងបានបញ្ចប់មេរៀន ដោយចោលសំនួរថា “ហេតុអ្វីក៏យើងជ្រើសបំបែកកម្មវិធីដ៏តូចនោះជាពីរឯកសារ?” តាមពិតទៅ វាពុំមានជាអ្វីសំខាន់ ណាស់ណាទេ វាគ្រាន់តែជាការគិតថា បើធ្វើយ៉ាងនោះ វាមានផ្តល់ភាពងាយស្រូល ក្នុងការពិនិត្យ​កូតដើម។ យ៉ាវាកូតដើម (source code) តែងតែមាន ចុងកន្ទុយ (extension) .java ហើយឈ្មោះរបស់ឯកសារនោះ គួរចាប់ផ្តើមដោយអក្សរធំ ដោយ convention។ ចំនុចសំខាន់មួយទៀត​ដែលគួរគាត់ចំណាំគឺ ឈ្មោះរបស់ឯកសារត្រួវតែដូចនឹងឈ្មោះរបស់ class ។ បើសិនឃ្លាចុងក្រោយនេះ​មិនមានន័យចំពោះអ្នក សូមកុំទាន់បារម្ភ អ្វីៗនឹងបានច្បាស់លាស់ក្នុងពេលអនាគត។ ជាសង្ខេប ដើម្បីបង្កើតកម្មវីធិយ៉ាវា យើងត្រូវធ្វើតាម ៣ ដំណាក់កាល៖ ១) សរសេរកូតដើម (source code) ២) កំផាយកូតដើម ៣) បញ្ជាកូដដែលបានកំផាយរួចហើយ (Execute or run the compiled program)

February 19, 2007 · 1 min · 50 words · kenno

មេរៀនទី១៖ យ៉ាវា ភាសាកុំព្យូទ័រសំរាប់សរសេរកម្មវីធី

នៅក្នុងមេរៀនដំបូងនេះ យើងសន្មតថាលោកអ្នកបានបញ្ចូលយ៉ាវាកំផាយលើរទៅក្នុងមាស៊ីនកុំព្យូទ័រ រួចហើយ។ ដូច្នេះ យើងអាចចាប់ផ្តើមសរសេរកម្មវិធីដំបូងបំផុត ដែលជាកម្មវីធីដ៏ល្បីល្បាញជាងគេគឺ “Hello World”។ public class MyApplication { public static void main(String[ ] args) { HelloWorldProgram p = new HelloWorldProgram(); p.start(); } } សរសេរកូតដូចខាងលើ ហើយផ្ទុកវាជាឯកសារឈ្មោះ MyApplication.java បន្ទាប់មក សូមសរសេរកូចដូចខាងក្រោមនេះ ហើយផ្ទុកវាជាឯកសារមួយទៀតឈ្មោះ HelloWorldProgram.java public class HelloWorldProgram { public void start() { System.out.println("Hello World"); } } យើងកំផាយ (compile) ឯកសារទាំងពីរនោះដោយវាយពាក្យបញ្ជា៖ $ javac HelloWorldProgram.java $ javac MyApplication.java យើងអាចរត់ (run) កម្មវីធីដោយ៖ $ java MyApplication បើសិនជាអ្នកមានចម្ងល់ថា​ ហេតុអ្វីក៏យើងចាំបាច់បំបែកកម្មវិធីដ៏តូចនេះជាពីរចំនែក? ខ្ញុំនឹងបកស្រាយមូលហេតុនោះនៅពេលក្រោយ។ ចំពោះពេលនេះ សូមសាកល្បងកំផាយនិងរត់កម្មវិធី “Hello World”​នេះ។ បើសិនជាមានចម្ងល់អ្វី អ្នកអាចសួរមកបាន។

February 17, 2007 · 1 min · 70 words · kenno

Compiling C# Souce Code as a Dynamic Link Library

The following is the command to compile dllsource.cs as a dynamic link library instead of the executable file: $ mcs /target:library dllsource.cs We can also specify a different name of the binary with the /out option. For example: $ mcs /target:library /out:mylibrary.dll dllsource.cs Finally, if we want to compile a souce which depends on a dll file, we need to use the /reference option. $ mcs example.cs /reference:mylibrary.dll Note: mcs is the mono compiler....

February 16, 2007 · 1 min · 85 words · kenno

Sum of elements in list in Prolog

Recently I noticed that my prolog skill is becoming rusty for not putting it work for very long. For this reason, I’m going to randomly write some prolog snippets here and there. Let’s started with one predicate called “sum_list” which calculate the value of all elements in a list. `% The sum of all elements in list in prolog To run/test the above code, save it to a file called: list_sum....

February 4, 2007 · 1 min · 116 words · kenno