Looking for good programming challenges?

Use the search below to find our solutions for selected questions!

All posts in Implementation

Setup WordPress on an AWS EC2 Instance

Step 1: create db user CREATE USER ‘blog_user’@’%’; GRANT ALL PRIVILEGES ON blog_db.* To ‘blog_user’@’%’ IDENTIFIED BY ‘s3cret’; To change it later you can use: SET PASSWORD FOR ‘blog_user’@’%’ = PASSWORD(‘xxxx’); Step 2: install WordPress Login into your AWS instance and run the following: wget http://wordpress.org/latest.tar.gz mv wordpress blog mv . . . Read more

Cronjob to renew Let’s Encrypt Certificate

In this post I have described how to manually renew Let’s Encrypt SSL certificate. Here I describe how to configure a cronjob to automatically renew my certificates when they are about to expire. Setup default AMI editor to nano: crontab -e Add the following: 17 */12 * * * mv . . . Read more

Random video chat website using WebRTC

Seing as how many people are interested in my video-conference-webrtc project, I have decided to develop a random video chat website using WebRTC. The project is called rtcrandom and is hosted on GitHub. A live demo is also available at test.tengmo.chat. Pitch RTCRandom is an online (video)chat website that allows . . . Read more

Reading SPIEGEL Plus articles

DISCLAIMER: The information below is for information purposes only. I happened to be browsing on SPIEGEL Online the other day and noticed that articles published for non SPIEGEL Plus subscribers were still partially available on the article’s page in readable form while the largest portion of the text was blurred . . . Read more

Simple token field for AngularJS

I was searching the net for a very, very simple token field for AngularJS the other day to use on a side project that I was working on. Unfortunately I couldn’t find anything that suits my requirements. So I implemented my own. Here is how to use it. (Optional) Install . . . Read more

Implement a ceil() function

In this post I will explain a less intuitive approach of implementing a ceil() function in Java, that is faster than known comparison approaches. A few known facts Fact 1 Dividing two integers and in Java will always floor the result: int a, b; int ans = a/b; // is . . . Read more

Next word

Problem statement Given a word , consisting of characters a-z, A-Z and 0-9, compute the next lexicographical word , with 0-9 < A-Z < a-z. Sample Input hLPk7 Output hLPk8 Solution import sys def nextWord(w): word = list(w) cursor = len(w) – 1 carry = True while carry and cursor . . . Read more

Read CSV – Java

The following code reads a CSV file and converts it to List<Map<String, String>> in Java. Each row is represented by a Map<String, String> entry in the resulting List. Map<String, String> maps column name (header value) to value.