Mac OSX Kubernetes Run `brew link` on these: kubernetes-cli

July 26, 2020

You may see this error after installed Kubernetes and run “brew doctor”. Warning: You have unlinked kegs in your Cellar. Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run `brew link` on these: kubernetes-cli It can be solved by running below […]

ONLINE TUITION Fundamental of Microservices

March 26, 2020

Time: 1 hour Price: $50 Pre-requisites: A working computer with internet with Skype or Zoom meeting software installed. Knowledge of application development in any server-side language. Understand HTTP. Understand TCP/IP. Understand application API. This intermediate course included: What are microservices? Monoliths vs microservices Characteristics of microservices. Microservice Pros and Cons Q & A session. End […]

Symfony LswMemcacheBundle LoggingMemcache::get() should be compatible

June 16, 2015

When running Symfony application with LeaseWeb/LswMemcacheBundle, below error: Declaration of Lsw\MemcacheBundle\Cache\LoggingMemcache::get() should be compatible with Memcached::get($key, $cache_cb = NULL, &$cas_token = NULL, &$udf_flags = NULL) It is cause by php-memcached 2.2.x gives runtime notices and should be avoided! For those who used php-memcached 2.2.x, may uninstall it and install with php-memcached 2.1.0. Using php pecl, […]

Eclipse auto indent, auto formatting, auto alignment shortcut

September 25, 2014

Ctrl+Shift+F to invoke the Auto Formatter Ctrl+I to indent the selected part (or all) of you code. To format it automatically when you save the file, then Goto Window > Preferences > Java > Editor > Save Actions and configure your save actions. Along with saving, you can format, Organize imports,add modifier ‘final’ where possible […]

Best way to test if gzinflate process right string

September 2, 2014

If the string is not gzinflated, there will be error throwing. Simple way to test:

jQuery handle null value in PHP variable or array

August 6, 2014

Handling php array or variable inside javascript directly using json_encode, will result some value null. To check null using jquery in this case:

FuelPHP CRUD – Orm find all where with or & and criteria

March 12, 2014

FuelPHP orm find all criteria with WHERE OR & AND is easy to achieve is we understand the concept behind and built the correct array. The documentation stated as below without multiple criteria such as ‘WHERE (status = “single” OR status = “married”) AND name = “superman” ‘ My success example is as below:

jQuery Datepicker UI language translation implementation

March 11, 2014

There are already localized versions of the jQuery Datepicker. The datepicker includes built-in support for languages that read right-to-left, such as Arabic and Hebrew. For a multiple language website, the easiest way to do it is by loading the related language file which contain the range of rationalization options. After that set the datapicker […]

PHP difference between single-quoted and double-quoted strings/arrays

February 13, 2014

1.Single quoted strings will display things almost completely “as is.” Variables and most escape sequences will not be interpreted. The exception is that to display a literal single quote, you can escape it with a back slash \’, and to display a back slash, you can escape it with another backslash \\ (So yes, even […]

PHP check whether image exists on remote URL

February 12, 2014

The simplest and fastest way is to use curl if your host supports curl.