SIP Register and Kamailio AoR
The RFC 3262 said: https://tools.ietf.org/html/rfc3261#section-10 The To header field contains the address of record whose registration is to be created, queried, or modified. That means TO contains AoR, and it…
quick sort
Quick sort High level code are quite simple ( divide/conque, recursively partition the array): void quickSort(int arr[], int low, int high) { if (low < high) { /* pi is…
Heap and Heapsort
Heap/Heapsort is not difficult to understand when you reading online articles/watching online videos, but without using it everyday, it is quite easy to forget the evil details. Here are some notes…
openstack
I spent several days to install openstack on debian 8 at one testing box with two NICs. Finally got a basic working system! It has with a controller node running neutron,…
docker
Finally I got some chances to package one application using docker, here are some useful commands docker images: docker build –rm -t my_tag docker_dir ( with Dockerfile) docker images ,…
Go Language vs C/C++
I have spent several days on Go. It is a little more similar to C, not C++. As it has no class concept, only structure. Also it has pointer (…
What’s the difference between BNF, EBNF, ABNF, ASN.1 ?
Abstract Syntax Notation One (ASN.1) is mainly for binary protocol, it is a standard and notation that describes rules and structures for representing, encoding, transmitting, and decoding data intelecommunications and…
C++11 std::unique_ptr as semantic value in Bison C++ mode
Recently I spent some time to write a DSL ( domain specific Language) lexer and parser. Without double flex, bison (C++) will be used. Bison ( version 3.0.2/3.04) generally support…
fp-tree and fp-growth in plain english
The normal use case is to discover interesting relations between variables in large databases, e.g: i(t) 1 ABDE 2 BCE 3 ABDE 4 ABCE 5 ABCDE 6 BCD the above…
Geocoding 40 millions US addresses totally free with PostGIS 2.1 on debian 8
Postgis 2.1 ( on debian 8) make geocoding US addresses ( about 40 Million ) quite easy, and it is totally free! Thanks for the PostGIS and PostGRESQL open source…