Blogs

11

Total

Git Push an Existing Repo to a New Remote Repo

Clone the existing repository to the local machine and create a new repository. git clone <existing repo URL> Rename the repo to upstream: git remote rename origin upstream Add the new repo URL ......

Git

Upgrade MySQL on EC2 instance

I upgraded MySQL from 5.5 to 5.7 on an EC2 instance using the following commands......

Reservoir Sampling

We would like to select k items from a data stream of unkown size n and all the items in the stream should be equally likely to be choosen. However, there is no sufficient memory to save......

Mistakes to Avoid when Connecting to Kafka on VirtualBox

I installed Apache Kafka on CentOS7 using VirtualBox. When I used Java APIs on Windows to connect to Kafka, I ran into some problems. Here are some tips to avoid connection errors.......

Z algorithm - string searching

Assume that we have a string s of length n. Z algorithm runs in linear time O(n) to calculate the lengths of the longest substringd starting from s[i] (i=0, 1...n-1) which is also a prefix of s[0..n-1......