PHP official documents say: Generators provide an easy way to implement simple iterators without the overhead or complexity of implementing a class that implements the Iterator interface. Before understanding Generator, we should be understand Object Iteration. We usually use foreach…
Excelize - Go Language Library for Reading and Writing Spreadsheet Documents
Last week I create a Go language spreadsheet document library named Excelize. Sometimes we want to generate a spreadsheet document (XLSX / XLSM / XLTM) without Excel application, .Net or Java applications, according to assessment of some popular open-source library,…
WebSocket Server Go Implementation
In 2001, C10k problem are raised, there are already many ways to solve this problem. In this post, I will implement related problem to create a WebSocket server by Go. A WebSocket server is a TCP application listening on any…
LRU and LFU Cache Algorithms
Least Recently Used (LRU) Discards the least recently used items first. This algorithm requires keeping track of what was used when, which is expensive if one wants to make sure the algorithm always discards the least recently used item. General…