Python multiprocessing

Python multiprocessing.

Python multithreading

Python multithreading. NOTE that although multiple threads can run within the python interpreter, ONLY one thread is being executed by the interpreter at any given time, which is ensured by the GIL (global interpreter lock) in python virtual machine. Python multithreading is more appropriate for I/O-bound applications than for CPU-bound applications as I/O releases GIL.

Java okhttp trustall certificate

Java okhttp client trustall certificate (for test only).

Java REPL

Java REPL

Java static class

In Java, static fields and static methods are common but how about static class? Here is an example.

Config postfix with gmail to send email from linux command line

A working example on how to config postfix with gmail smtp server to send email directly from linux command line and tested on vagrant vm with ubuntu precise 32.

Java multithreading

Java multithreading programming demo.

Javascript calendar

A javascript calendar.

Pretty print json

How to pretty print json usually for better visibility.

Regular expression commons

Common regular expression symbols, characters, and usage.