Author Archives: onegazhang

mmap and vm.max_map_count

mmap failed with error message: Cannot allocate memory (12). The root cause is the process reached vm.max_map_count limit. Then number of virtual memory areas (VMAs) can be found in /proc/<pid/maps file. This post demonstrated how to read map count and … Continue reading

Posted in Computer and Internet | Leave a comment

Data Structures and Algorithms

500 Data Structures and Algorithms interview questions and their solutions Top 10 algorithms in Interview Questions Data Structures and Algorithms: Annotated Reference with Examples 2018 Competitive Programmer’s Handbook by Antti Laaksonen Longest Increasing Subsequence Size (N log N) Sparse table … Continue reading

Posted in Books | Leave a comment

Algorithms

backtracking 2002 Backtracking by David Matuszek dynamic programming dynamic programming lecture Generating Permutations The Median-of-Medians Algorithm In-Place Merge Sort 2016 Quicksort Using Median of Medians as Pivot by Aviral Khattar Master Theorem 2014 NP completeness lecture Boyer-Moore algorithm Greedy algorithm … Continue reading

Posted in Uncategorized | Leave a comment

count number of bits

int countbits1(int n) { int res = 0; while(n) { ++res; n = n&(n-1);//change the right most bit to 0 } return res; } int countbits(int n) { int res = 0; for(;n;++res, n=n&(n-1)); return res; }

Posted in CPP | Leave a comment

Graph

2015 Route Planning in Transportation Networks Fast and Exact Route Planning What algorithms compute directions from point A to point B on a map? 2011 Andrew Goldberg: Shortest Path Algorithms: Theory and Practice A Hub-Based Labeling Algorithm for Shortest Paths … Continue reading

Posted in Computer and Internet | Leave a comment

Tree

Binary Search Trees Ternary Search Trees By Jon Bentley and Bob Sedgewick Ternary search trees for autocompletion and spell checking 2015-09-28 Tree traversal – wikibooks.org Segment tree Binary Indexed Tree segment tree vs binary indexed tree vEB tree O(lg lg … Continue reading

Posted in Computer and Internet | Leave a comment

Auto completion and spell checker

2016 A Survey of Query Auto Completion in Information Retrieval 2015 Neural Networks for Text Correction and Completion in Keyboard Decoding 2015 Ternary search trees for autocompletion and spell checking 1000x Faster Spelling Correction algorithm (2012) – Wolf Garbe 2011 … Continue reading

Posted in Computer and Internet | Leave a comment

Indexing reference

Search engine indexing Inverted Index construction Index compression Variable-Byte Encoding Is Now Space-Efficient Too Partitioned Elias-Fano Indexes BitFunnel: Revisiting Signatures for Search The Case for Learned Index Structures Latent Semantic Indexing directed acyclic word graph Using Finite State Transducers in … Continue reading

Posted in Database | Leave a comment

Build wxPython on Ubuntu 17.10

On Ubuntu 16.04, wxPython can be installed via the following commands. sudo apt update sudo apt-get -y install python3-pip sudo pip3 install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 wxPython sudo apt-get install libsdl-ttf2.0-0 There is no wxPython release for Ubuntu 17.10 yes, the … Continue reading

Posted in Uncategorized | Leave a comment

build gede

build gede on Ubuntu 16.04 xenial with Qt5.8 Install qt-unified-linux-x64-2.0.5-2-online.run Download gede-2.0.3.tar.xz from http://acidron.com/gede/pmwiki.php?n=Downloads.Releases tar xf gede-2.0.3.tar.xz cd ~/oss/gede-2.0.3/src ~/Qt/5.8/gcc_64/bin/qmake Info: creating stash file ~/oss/gede-2.0.3/src/.qmake.stash ~/oss/gede-2.0.3/src$ make

Posted in CPP, GUI, QT | Leave a comment