In this short tutorial, I’m going to write a simple Haskell program to calculate the density of characters in a given text. For instance, in “hello” we have . The return format of our application would be a list of tuples String -> To make the problem easier to solve, I’m going to break …
Posts
Well, sometimes a blog simple tip can save a day. That’s why I created this blog and contributing to open-source projects. In this post, I’m going to show a simple way to fix Library not loaded: libmysqlclient.18.dylib error. It could happen when you upgrade your MySQL to the latest version (here it’s 5.7.10). Just run …
I experienced many programming contests and olympiads but this one was really different. In a programming contest on Hacker Rank, I faced with a challenging problem and it was the main reason I failed the test. That question made me nervous and stressful so I gave up. When I found the solution after the test, …
MongoDB has a aggregate operator that help programmers to define complex type of queries and combine operators such as group, match and find to build a complete result set. Unfortunately, this operator doesn’t have enough tutorials and examples so I decided to explain it in better words. Aggregate is a pipeline First of all, you …
MongoDB is one of NoSQL pioneers and it has a great community. Nowadays, most of startups prefer to use MongoDB as the main database because of its simplicity. Configuring scheduled backup for a database is really important to keep the last updated data somewhere and restore it in case of database crash. In this post …
Sometimes you need to use objects for the keys of a dictionary (let’s say, another object). Assume this code: var keys = ; var dic = {}; //add a new key to the dictionary dic] = 'boo'; dic] = 'foo'; Above code yields this result: console.log(dic); //Object {: "foo"} …
Since some of ECMAScript 6 features looks weird to old-fashioned JavaScripters, I’m going to write a series of blog posts to describe the main idea of some common ECMAScript 6 features. In this posts I’d like to explain the usage of block scope variables. The keyword let enables you to create a block scope variable …
Since some of ECMAScript 6 features looks weird to old-fashioned JavaScripters, I’m going to write a series of blog posts to describe the main idea of some common ECMAScript 6 features. In this posts I’d like to explain the usage of block scope variables. The keyword let enables you to create a block scope variable …
Suppose you have two options to implement a solution using a programming language, what are important factors to select one of options? I do believe one of concerns for a programmer would be performance benchmark between those options. In this short blog post I’d like to share my simple code and results for performance benchmark …
Since all other articles about using Redis as a session store for ExpressJS are out of date due to latest update of connect-redis, I’m going to write this short article to show how to use Redis as session store for ExpressJS. In order to use Redis as session store for ExpressJS, first of all install …