Jan
28
2010
0

Pentaho Kettle database cache

Sometimes when you changed a table design, in kettle you clicked “get fields”, and it still loading the old design, then it’s time to clean the DB cache.
1. open a transformation or job
2. expand the database connections
3. right click on the database connection and choose “Clear DB Cache of”
4. that’s all, you shall now getting the latest database fields in the steps
kettle_clear_dbcache

Written by hkai in: Uncategorized | Tags:
Jan
27
2010
0

The answer to “Why Do ‘Cool Kids’ Choose Ruby or PHP to Build Websites Instead of Java?”

This morning I’d read an article with the title: “Why Do ‘Cool Kids’ Choose Ruby or PHP to Build Websites Instead of Java?”, and I think I may have some opinions on this kind of topic.

Please discuss the following questions with the website owner or business owner first
1. What is your budget and dead line for this website project?
2. How many developers/designers involved ?

If there’s system architect, ask the following questions
1. What is his/her preferred architect/framework/OS etc.
2. What is the hosting environment?
3. What is the scale and stability requirement?
4. What is the last successful project used?

After you have those questions answered, you might find the programming language was already decided and there won’t be much choices for you. If you still have, here’s some ideas I can provide:
1. If the project is an important one, choose the language that you(or your team) are most familiar with and have successful experiences
2. If the project is a bleeding edge, all brand new stuff to you, choose the same language that a competitor website used
3. If the project is a small/tiny one with a strong focus on the design instead of back-end functionality, choose a programming language that support easy template engine so designer don’t give you a hard time to convert it
4. If you still can’t decide, please write a comment here and I’ll help you

Written by hkai in: Uncategorized | Tags:
Oct
23
2009
0

Replacing text in multiple files

I need to replace an IP address for a sever switch, here’s the command for it:


find . -name "*.php" -print | xargs sed -i 's/192.168.0.10/192.168.0.11/'

Written by hkai in: Uncategorized | Tags:
Sep
24
2009
1

Install function list plugin for notepad++ 5.4

I’d been using notepad++ since 3.x, function list is one of my favorite feature. However when I upgrade to recent version, the function list plugin v2.0 requires extra step to install on Vista.

1. download FunctionList_2_0_UNI_dll.zip
2. copy FunctionList.dll to c:\program files\Notepad++\plugins
3. copy C++.flb and FunctionListRules.xml to C:\Users\username\AppData\Roaming\Notepad++\plugins\config

Note: change the “username” to your login user name

Written by hkai in: Uncategorized | Tags:
Sep
22
2009
0

PHP, the No. 3 most popular programming languages

Here’s the chart of the analysis

1. The beginning
I started my PHP experience at 2003, when I’m helping a friend to fix some issues of his website which is using PHP4. I downloaded the PHP reference, and read the tutorial for 30 min, then started coding.

2. Using PEAR
Soon I found PEAR has most of the libs I needed, so I started using PEAR whenever possible. When I develop command line scripts, I use Console_Getopt and Log.

3. ADODB and Smarty
Compared with PEAR::DB, I prefer ADODB, it’s easier and support mssql better (I guess). When coming to template engine, I use Smarty a lot, it’s easy to split designer’s work with coder’s work and making the testing of the design easier.

4. Framework
Recently the application framework becoming very popular, I use CodeIgniter and also Yii recently. For they are easy to learn and use. You don’t have to read a book before you write a “hello world”.

Written by hkai in: Uncategorized | Tags:
Sep
21
2009
0

SQL Server 2005 using more than 2GB memory

You can configure SQL Server to use more than 2GB by enabling the “Use AWE to allocate memory” option

sqlserver_memory

Written by hkai in: Uncategorized | Tags:
Sep
21
2009
0

Upgrade Zabbix Agentd on Windows

I’m going to upgrade zabbix agentd from 1.1.4 to 1.4.4 on all my Windows servers.

1. stop the zabbix win32 agent service:
c:\>zabbixw32 stop
Zabbix Win32 Agent service stopped successfully

2. uninstall the service
c:\>zabbixw32 remove
Zabbix Win32 Agent service deleted successfully
Event source “Zabbix Win32 Agent” uninstalled successfully

3. download the new zabbix_agentd.exe and save it to c:\
4. install zabbix_agentd as a service
C:\>zabbix_agentd -i
zabbix_agentd [6264]: ZABBIX Agent service created successfully.
zabbix_agentd [6264]: Event source “ZABBIX Agent” installed successfully.

5. start zabbix_agentd service
C:\>zabbix_agentd -s
zabbix_agentd [8048]: ZABBIX Agent service started successfully.

Wait about 30 min, check the zabbix web interface, the “Version of zabbix_agent(d) running” should changed to 1.4.4

Written by hkai in: Uncategorized | Tags:
Sep
06
2009
0

Configure OpenVPN on Debian Lenny

This is the original artiche
In my configuration, my server’s network is 10.1.1.0 and my VPN is 10.1.10.0, in order to access the server side networks, you need to enable the forwarding and masquerading, here’s the steps:

$echo 1 > /proc/sys/net/ipv4/ip_forward
$iptables -t nat -A POSTROUTING -s 10.1.10.0/24 -o eth0 -j MASQUERADE

*Assuming your nic is eth0 and your vpn network is 10.1.10.0

Written by hkai in: Uncategorized | Tags: ,
Sep
05
2009
1

Change OpenERP Web Client upper left Logo

1. use find command to get the openerp_big.png location

# find / | grep openerp_big.png
/usr/lib/python2.5/site-packages/openerp_web-5.0.3_1-py2.5.egg/openerp/static/images/openerp_big.png
/opt/openerp-web-5.0.3/openerp/static/images/openerp_big.png

2. in the images dir, put your logo as company_logo.png
3. reload the web page and your logo is changed

Written by hkai in: Uncategorized | Tags:
Sep
05
2009
0

OpenERP Web Client: howto change files after installation

After installed OpenERP Web Client, it copies the files onto
/usr/lib/python2.5/site-packages/openerp_web-5.0.3_1-py2.5.egg/openerp
So if you need to change some images, it’s in the static/images directory.

Written by hkai in: Uncategorized | Tags:

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes