AkiVaMu Just tiny things come to mind...

CSS style override rules

This article will recap how one CSS rule override another CSS rule by example.

more...

Java HashMap principle

Been learning Java for a while and using HashMap many times, but today I read an article about HashMap’s buckets length and think I should dig deeper to understand it. This article is to summarize about HashMap, and how it works internally.

more...

Simple explanation about indexing data

Reference from SoF

more...

The best place to put script tags in HTML

When browsing a web page, browser will fetch HTML page. It then parses sequentially line by line, and shows HTML components to user (like title, head…). When encounters a <script> tag, browser has to request that script from URL, and during that time, nothing will be shown to user, not until browser finished requesting that script. It creates a blocking operation, which is bad in UX.

more...

Show code snippet with Google Prettify

Recently, I used SyntaxHighter to show source code in my blog. It works fine, but I feel something not very familiar. Just like the source code shown isn’t similar to other pages, like Github. I decided to change to Google Prettify, and wait to see if it’s better. It’s quite easy to setup, just follow official guide in Github. Here is a short summary:

  1. Embed Prettify into template:
    <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
more...