"Apple","b"=>"Bananas","c"=>"Caroub","d"=>"diops","e"=>"electron","f"=>"first");..."> Php filter array by columns
Convert big array to smaller I have a big array to read or a really big array to copy severall time .... in memory and finaly I use only four columns. That a usualy case, while it's so simple to avoid extra informations. Use filter Example $List[] = array("a"=>"Apple","b"=>"Bananas","c"=>"Caroub","d"=>"diops","e"=>"electron","f"=>"first");...
php : Convert an array to int only if all value could be cast in int
Convert an array to int only if all value could be cast in int. Yes very usefull if you use some graphic. Readable version $Serie= range(0,5) ; $Serie = array_is_numeric($Serie) ?array_map('intval',$Serie):$Serie; function array_is_numeric(array $array)...
php : Array_map
Array_map send each value of an array to a function, multiply each value by itself, and return an array with the new values. Simply, but not simple Ok, one function one usage. Not really true, you could really use this function for another usage Call...
Heard this music for better programming
Heard this music for better programming Note from the author "Just a few tracks from games and a movie that I've found to be excellent to listen to while programming. I could have expanded this mix by several other tracks from Deus Ex, but tried to keep...
Docker : Read, use and host your own server like my grandma
Docker is an open-source program that enables a Linux application and its dependencies to be packaged as a container. Docker is not a VM, you could use system that has different dependency with docker on same os. Ok, but what should I do ? First, don't...
TiddlyWiki : Standalone wiki
TiddlyWiki TiddlyWiki is a simple wiki, fast does not use a database. Interests You can easily host on a local directory without server You can use Dropbox to host THE file. In this case public URL allows you to share your wiki in read-only mode, you...
Focus : Index on MySQL 5.6
Indexes are used to find rows with specific column values quickly. Without an index, MySQL must begin with the first row and then read through the entire table to find the relevant rows. The larger the table, the more this costs. If the table has an index...
MySQL : Avoid count with subquery
In SQL we often used subquery or joins to obtain a number of element (count) and especially when there are several numbers to get in a single query. Fortunately, in some cases we can use a "trick" on function count() by passing conditions. Syntax count(condition)...
Nginx : Real time analysis
You have an nginx server and you use echo to watch vars ? Please use this tools instead. You can track active request full stack of filter debug LUA trace lua Perf trace file access https://github.com/openresty/nginx-systemtap-toolkit Screen shot ===...
Focus : Add circular menu to your web site
Add share actions on your site with small button that can deploy like a circular menu http://sarasoueidan.com/tools/circulus/