Sourcing a file in Unix/Linux evaluates the file as a list of commands and executes them in the current context. Most people might have used this technique when updating the configurations for their terminals.

1
2
. ~/.bash_profile
source ~/.bash_profile
Read more »

Q: How do I programmatically quit my iOS application?
A: There is no API provided for gracefully terminating an iOS application.

On the iPhone there is no concept of quitting an app. The only action that should cause an app to quit is touching the Home button on the phone, and that’s not something developers have access to.

Read more »

Like music, databases can be categorized into genres onto one or more styles. The first chapter of Seven Databases in Seven Weeks leads us into the exploration of five main database genres. In this section, I quote those descriptions from the book below.

Read more »

In computing, a newline, also known as a line ending, end of line (EOL), or line break, is a special character or sequence of characters signifying the end of a line of text and the start of a new line.

Read more »

The java.util.concurrent package provides a fine-designed ConcurrentHashMap which enables efficient concurrent access to objects in a map container. However, there is a lack of concurrent Set in this package.

Read more »

Here is a convenient method to check whether an Android device is connected to the Internet. Note that not all network has Internet access, for example, we could be further asked to sign-in the Starbucks’ wifi. This method not only checks the connection to a network, but also checks whether this network routes to the Internet.

Read more »