Posts

enets UMAPI V 1.3 NETSConfig.get NullPointerException Solve

I am setting up UMAPI v 1.3 from eNETs under Tomcat 7.0.21, Windows 7. If you encounter this error: java.lang.NullPointerException at com.wiz.enets2.transaction.umapi.NETSConfig.get(NETSConfig.java:69) The problem is that your CLASSPATH does not include the config files (which is strange, as CLASSPATH is used to set CLASS, not config...) So in your setenv.bat, I enter the following: set CATALINA_OPTS=-server -Xms256m -Xmx256m set CLASSPATH= C:\xampp\tomcat\webapps\ROOT\CLIENT\config ;C:\xampp\tomcat\webapps\ROOT\CLIENT\lib\* You should be fine, and I guess the same setting can be applied to Linux also. Hope it helps someone. I hate eNETs.

JMeter on Wordpress and Woocommerce

Image
I am using Apache JMeter  to do some stress tests on my server. (I am using ver 2.11) However, when I load and run the .jmx file generated from BadBoy , even if it runs smoothly the first few times, you will see "Session expired" message from JMeter later on. To fix this problem, I read this article about JMeter and found that if I add HTTP Cookie Manager : And configure like this: You will not see any session expired problem. Another message: "Action failed. Please refresh the page and retry." may be caused by Force SSL problem, you may see this thread in wordpress for details.

今晚放了小龜

今晚放了小龜 養了都有10多年了,關了這麼久,就當贖了前世的罪,今世獲得自由吧。 與你同住的大龜,沒來得及放生就去了,今次,就讓你走吧。 之後,就要看你自己的造化了。 再見了,小龜。

My prouduct launch notes

Surprisingly I spent a lot of time playing around with OptimizePress 2.0 Do a split test on sales page Driving FB PPC traffic to sales page.  And finally I understand this statement: You do not have any traffic problem.  It is true because you can always buy traffic from different source. Set your daily PPC budget at the maximum of your product price so that, if you have one sale a day, you just cover your PPC expense.  My product is $9.95 so that my daily PPC budget is $10. Later on it seems that it would be a good idea to create a free report first, then drive traffic to squeeze page, then create 3 email follow up on client. Using Ryan Deiss free email follow up as a template, you can rewrite it to deliver some value on your email, and at the end of email you add a link to your sales page.  E.g. if you want to learn more tips and tricks about this, you can go to website here. Frank Kern recently released an "article" promoting his advance training.  Th...

Linux Installing APR and Tomcat Native Library on Tomcat 7.0

Key notes: The objective: install APR and Tomcat Native Library on Tomcat 7.0.41.  I am using Icetea java 1.6 open JDK as when I download JAVA from Oracle, it has rt.jar missing on 1.6 and 1.7 The linux platform is RHEL 6.3 I download and compile tar source of APR (1.5) and APR util (1.5.3).  I found that when I use yum install, the apr library is incompleted. Need to yum install java openjdk.  I am using 1.6. Untar APR and follow readme to configure and compile.  make && make install Follow this (Eng) and this (S.Chi) to configure, compile and install Tomcat Native Library The command I use is: ./configure --with-apr=/usr/local/apr --with-java-home=/usr/lib/jvm/java-openjdk/ In setenv.sh (under <tomcat_dir>/bin, if not exists, create one), I set the following:  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib JAVA_HOME=/usr/lib/jvm/java-openjdk CLASSPATH=$CLASSPATH:/usr/local/tomcat7/webapps/ CATALINA_OPTS="-server ...

MySQL 5.6 Wordpress Optimization

My my.cnf I am setting the blog based on information from:  High Performance Wordpress SlideShare of Above link Use of mysqlreport # Config start key_buffer = 256M sort_buffer_size = 4M read_buffer_size = 4M innodb_buffer_pool_size = 256M innodb_log_buffer_size = 8M tmp_table_size = 32M max_heap_table_size = 32M table_open_cache = 128 thread_cache_size = 64 query_cache_type = 1 query_cache_limit = 1M query_cache_size = 32M skip-name-resolve # Set Log slow_query_log_file=/var/log/mysql-slow-query.log log_error=/var/log/mysql-error.log Hope it helps someone.

.htaccess not working?

If you find that you have a proven/tested .htaccess file but for some unknown reasons, you cannot make it work on other server, one thing to check is that if you set "AllowOverride" to "All" instead of "None". "None" means .htaccess cannot be override. My example:  My web directory is under htdocs/: <Directory "/usr/local/apache2/htdocs">     #     # AllowOverride controls what directives may be placed in .htaccess files.     # It can be "All", "None", or any combination of the keywords:     #   AllowOverride FileInfo AuthConfig Limit     #     AllowOverride All </Directory> It costed me 1 day to find that out.... Hope it helps someone.

OptimizePress integrated with JVZoo Notes

If you did not receive email after test purchase, use WP Mail SMTP and WP Mail Log to see if you really can send out email.  Chances are your website is blocked from sending out email Tell your hosting service provider if you want to send out email.  They will help you. Follow the optimizepress JVZoo integration video and you should be fine. Do not enable customize email, it seems that it does not use the tinyurl.com to create a URL that buyers can use to register. Integration with JVZoo and Paypal (Non-US currency): I stuck in this part for quite some time.  If you cannot checkout with the $0.01 purchase, the problem is that you have a currency setting that includes both USD and your country currency.  Even though you set USD as your primary currency, when you check out using test purchase, Paypal will still automatically convert it to your country currency.  In Paypal, a $0.01 purchase cannot be converted to other currency because the amount is too littl...

Wordpress Load balancing: 2 web servers 1 MySQL without any Cloud services

Image
This is the exact config that I need to configure a load balancing without other cloud services like Amazon, rackspace or GoGrid, completely customized. I put my question on stackoverflow.com but no luck, so I put it on Quora.com and immediately I got response: My Notes: The load balancer is done by my colleagues so I am not sure what is the config of it.  But one thing to note: Your LB should enable "session stickiness" so that the session will follow visitor.  By the way, I am using Round-robins. Session: Actually I did not use session, but it seems that other plugins (like WPML) will use it.  If I use Apache load balancer, when I go to wp-admin through load balancing IP, I will not able to login, given the username and password is the same.  I will be redirected to login page.  So ask your load balancer providers or check your load balancer config and see how to manage the "Session Stickiness" issue. Shared folder: your wp-content/uploads folder...

Dean Jackson - I know I am successful when...

My successful list:  I know I am successful when I... Surrounded by kind, nice and wealthy people Ask myself: what I want to do today? My passive income is higher than my lifestyle needs Work when I want to, not I need to Creating valuable stuff and people's life are improved because of my stuff No deadline of my work Dress extremely casual in high level business meeting and I can still be myself Practising martial arts because I want to Go whereever I want and take a vacation whenever I want, and my business is still unaffected. I have my own comfortable home. I am looking forward to Monday my business is easy, lucrative, fun

Dan Sullivan Mess = O - C

Dan Sullivan said: Mess = Obligation - Commitment If you have Mess in your work, it means you are obligated to something, but you don't commit. If you have Mess in your Marriage, it means you have obligation (e.g. Child) but you don't commit.

1 question interview with Steve Jobs by Eben Pagan

Eben: Apple has launched so many successful products, home run after home run, what is the secret? Steve (and Bill Gates): Not everything we do succeed.  :P.   I think you got to "care" .

WPML & Woocommerce: How to select product of other languages in PHP?

If you are looking for a way that, by using PHP, you want to find out what product ID of other languages are, here is the code: if(function_exists('icl_get_languages')){     $available_langs = icl_get_languages('skip_missing=0'); foreach($available_langs as $lang){ $lang_post_id = icl_object_id($existing_post_id, 'product', true, $lang['language_code']); if(empty($lang_post_id) == FALSE){ /** * Do whatever you want here... /**/ } } } Here is how this work: Check if WPML is installed by checking if icl_get_languages exists. I am getting all langs here (skip_missing=0). Use icl_get_languages to get ALL languages Use a loop to check existing language with language code. If that product exists, it will return a product ID, otherwise, it is NULL ( Source ). Use conditional statement to continue processing if $lang_post_id is not NULL Hope it helps someone.

Using wget bypass htaccess username password 401 authorization

Here is the command to access a website where using htaccess username and password to protect itself. wget -O /dev/null --user="_any_htaccess_user_name_" --password="_htaccess_user_password_" http://www.google.com Resource:   http://stackoverflow.com/questions/8841187/wget-and-htaccess-username-only By the way, you can use wget to simulate a visitor access to website.  Often time it is used to trigger a cron job. Another resource: http://pogidude.com/2011/use-linux-cron-to-trigger-wordpress-cron-scheduler/ http://bitswapping.com/2010/10/using-cron-to-trigger-wp-cron-php/ Hope it helps someone.

Wordpress - Separate PHP page call WPML function

If you just like me who need to create a new empty PHP page inside Wordpress, and you need to call that page inside wordpress, together with using WPML, here is the way:  Assume that your brand new PHP file is under wp-content/themes/your-theme/new_file.php This new_file.php will receive data from other wordpress page. Now: # require_once wp-load.php to use all wordpress functions  require_once dirname(dirname(dirname(dirname(__FILE__)))).'/wp-load.php'; if(!function_exists('any_new_function')){      function any_new_function(lang){          $lang = $_POST['lang_from_previous_wordpress_page'];          return $lang;     }      # if you are using WPML 3.0 or later, you will see this icl_set_current_language filter      # I am not sure if version prior to 3.0 will have it or not, just search in sitepress.class.php to find out.      add_filter('...

In response to "8 Sentences That Drive Bosses Crazy"

In response to this article about "8 Sentences That Drive Bosses Crazy" Every employee said something for a reason and a history behind it.  If your employee said those to your boss, it is (most of the time) the boss problem not (always) employee. Here are why: 1. "Exactly how do you want me to do this?" Boss's best response: "I don't care how you do it, just get it done." Employee replied: Then don't ask me to give you a full report on why I am doing that later on, because you don't care. 2.  "This is my idea so I want full credit for it." Boss's best response: "If you want this to happen, we'll all need to own it." Employee replied: You are stealing my idea and claim that it is "us"?   3.  "I'll try to get it done on time." Boss's best response: "Do. Or do not. There is no try." Employee replied: DO NOT, unless you give us a REASONABLE schedule, or you tell ...

Definition of Selling - The Dan Sullivan Way

Dan Sullivan definition of Selling: Getting someone to intellectually engaged in the future result that is good for them and getting them to emotionally committed to an action to achieve that result .

Post Affiliate Pro - My Checklist

- Using Multi-tier commission: your affiliate should be associated with a campaign.  i.e. when you login to an affiliate account, you must see a campaign and banner available. - If you are using Private campaign AND multi-tier commission: MAKE SURE the parent aff and sub aff are all IN one private campaign.  Otherwise multi-tier commission would not display correctly.  It will ONLY display the one in that campaign, sub-affiliate is NOT calculated. - Using affiliate ID (a_aid) only without using banner (a_bid) seems not tracking at all.

What is Value? How to add more value to your customer?

I just wrote a blog post about what is value and how to add value to customer. Those are questions that are often told by a lot of marketers but not fully illustrated. Check this out:   What is Value? How do you add more value to your customer?

果皮止咳

果皮 + 瘦肉數條放入飯碗中,加飲用水入飯碗,放入已加水的鑊中。先大火煲滾鑊中水,待水滾後轉慢火煲/燉1小時。