Pas encore inscrit ? Creez un Overblog!

Créer mon blog
Ferey Cyril

Ferey Cyril

Ses blogs

The code in all its forms

Blog on development for developper to serve millions of page views
Ferey Cyril Ferey Cyril
Articles : 16
Depuis : 12/12/2014
Categorie : Technologie & Science

Articles à découvrir

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 it around the hour mark, which I've found help me pace myself during programming/study sessions.

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 for the columns in question, MySQL can quickly determine the position to seek to in the middle
php : Array_map

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 inside a class Use external function on another class Put some extra datas on parameters Simple usa

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 be worry. Docker is full documented and supported. You'll already found all version and software
Php filter array by columns

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"); $Filter

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 change the local Disadvantages You can have the benefits of a more imposing wiki, such as file stor
php : Convert an array to int only if all value could be cast in int

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) { return ($array === array_filter($array, 'is_int')?true:false); } Compact version $Serie =($Ser

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) as Number You could use a condition on fiel return by a query count(IF(field='CONDITIO

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 === Distribution of First-In-First-Out Latency (us) in TCP Receive Queue === min/avg/max: 1/1401/12761