October 2017 | VirtualSpecies

Display Alphabets by setInterval() Function

This page is built based on one and half year old tiny person's idea. My son AARON loves reading alphabets. I thought I could show alphabets one by one with a time interval and of course with bigger fonts. I used setInterval() function to write a little script to make him happy.


United States Time Zones

HTML Code Decoder

We talked about HTML encoding and create a handy tool on HTML Code Encoder post. We talked about why encoding is important and why we can't ignore that. However, decoded HTML code is also needed in many cases. Specially, we need to decode our old code to update or modify to make it more user friendly. If we want to update our cool project on blog or site, we need a decoder for encoded code.



Check out HTML Code Encoder.

HTML Code Encoder

Encoding HTML code is important in many cases. We know that browsers may get the encoding wrong. Symbols might get mixed up or might show as unknown character. Encoding data converts potentially unsafe characters into their HTML-encoded equivalent. If you just paste 3 byte characters of some encoding into your HTML code without escaping them, things might get ugly. Its good habit to encode your HTML code. Below is a little tool to help you out. Copy your HTML code in the textbox, encode using encode button and click or focus the textbox to select encoded version of your code to copy. Its that simple!



Check out HTML Code Decoder.

Find 'bin' Folder on Mac

Before talking about finding bin folder on Mac, we should know something simple. There is a unique behavior of UNIX system. System directories (/usr, /var, /etc) are always hidden on Mac by default, and this is the reason why we can not navigate to these directories through Finder. If you are an advanced user, you need to get into these folders sometime since these hold many license and configuration files inside. Below are some ways to get into these directories quickly_ 

_Open Finder and press COMMAND+SHIFT+G. Following dialog box opens_
Find 'bin' Folder on Mac

JavaScript setInterval() Method

JavaScript setInterval() method either call a function evaluates an expression at specified number of milliseconds. This method continues to call/evaluate the expression until window is called. Another way to stop this method is by calling clearInterval() method. Below is a working demo of this useful method.

Hit start..

How to Edit the Hosts File on Mac

In many cases, we need to know whats going on with internet on our Mac. Well, we can take a look at DNS (Domain Name System) and associated cache file. There is another way to get this task done, using Hosts file. Hosts file is always hidden on Mac's /etc folder. It carries hostnames with certain IP address. Our OS and browsers come and check this file for desired hostname with IP address. In particularly, once we write URL on browser's address bar, OS gets in this file for corresponding mapping before going to the DNS server to look for IP address. By the way, hosts file can be used to override the default DNS information.

     Most of the Mac users don't need to worry or touch the Hosts file. Its always ready to get done what it meant to do. However, we need to touch this file in certain cases. We know, it can redirect a domain. Suppose, we are testing a developing server and we don't want others to access it using DNS. We can use Hosts file to make a domain redirect to local address on our machine, we will be able to test our code offline before it becomes online for users.

JavaScript Output

There are several ways to generate output in JavaScript. Each and every scenario depends on our need. These are_

     innerHTML
     document.write()
     console.log()
     window.alert()

Mac Functions for Need of Snipping Tool

Snipping Tool is very popular little utility for Windows users. You can take screenshot with required dimension with it. Is there any option on Mac that can replace this tool?
Well, absolutely. Mac has Grab, which does the same. We will talk about Grab in detail on other post. Right now, we will list couple of options below that are pretty handy_

    Full Screen:  By pressing COMMAND+SHIFT+3, we can save a screenshot for entire screen to the Desktop.
    Part of Screen: We can snip a specific area of the screen to the Desktop by pressing COMMAND+SHIFT+4 simultaneously. Once the cursor icon changes to " + ", we need to create a box around the desired section of the screen and release.
    The third option is GRAB that we mentioned earlier. Its a very light but very useful tool that is the best alternative for Windows Snipping Tool.

Triangular Number


Triangular Number

Triangular Form: [A x (A + 1) / 2]
A =
=>
=>