Convert Seconds To Hours, Minutes in PHP

Say you’re running a process that runs in the background. It’s better to not let the user lose their patience and tell them when it will finish. But, you have the time remaining in seconds. If we show the user : 567 seconds to complete He/she (user) would have to take a calculator and convert it into minutes or hours. Or if the guy/gal is not a math genius, he would close the UI and say “What the Hell ?

[READ MORE]

Convert Bytes To KB, MB, GB in PHP

Say you were displaying the size of a file in PHP. You obviously get the file size in Bytes by using filesize(). You won’t have any idea what the file size is if you read it in Bytes. Bytes is useful for file transmission in a network, but not for human usage. So, it’s better to convert it to human readable form.The circled areas show the converted size from Bytes.

[READ MORE]

Create Table Rows With Alternate Colours in PHP

If you have a lot of rows on a table, users will find it difficult to find which cell is in what row. This is because all the rows have the same colour. If we alternate the colours, then the table will be more understandable. We can alternate colours odd-even wise or by 3 rows etc. It can be easily done in PHP. I will tell you two ways to do it.

[READ MORE]

16 Years of Revolving Around The Sun

So I revolved around the sun 16 years. Yes, I turned 16. It seems like I just turned 15 yesterday. As age increases, life becomes harder. This direct proportionality is making me closer to the answer of life. This post is an analysis of myself of what I did and what I plan to do. “Birthdays are a constant reminder of how I wasted time” Past 1 Year As A Student I got full A+ in the 10th grade exam and is now in 11th grade as a C.

[READ MORE]

Finding The Value Of Pi

Everyone must have heard of Pi, the irrational number that never ends. It goes by this : 3.14159265... I have been learning about Pi since I was in 8th grade. All the time in school, I was curious about to which Pi extends. Now, I know the extend – Infinity :P. I dedicated my precious Christmas vacation for finding the useless value of Pi. Why ? Curiosity. Simply, the curiosity made me want to do this.

[READ MORE]

Parts Of My Life

A programmer, a teenager, a student, an adventurer – 4 components in my life. When you get all of these at once, I feel a little pressure in my life. Let me explain these 4 parts : Programmer I have been a programmer for 5 years. I started when I was 10 years old. I know these languages : PHP, Python, Bash, HTML, CSS, JavaScript My primary language is PHP.

[READ MORE]

Uploading Images Using AJAX In HTML5

In a post that was published some years ago, I explained how to upload an image using AJAX. But, it is an old trick when HTML5 was not standardized. But, now browsers have evolved and almost every person in the world has an HTML5 supported browser. Besides, the old trick used a JS file which is about 15KB. If we used HTML5 mechanism instead, then you can save about 14KB.

[READ MORE]

Ubuntu Dekko

This post is part of the Google Code in 2015. The task was to Build the dekko app and run all testsuites. You can see the task here. My System Xubuntu 15.10 Wily Werewolf :Xubuntu 15.10 Wily Werewolf Dependencies Installation First of all, I downloaded Ubuntu SDK with the help of this guide. Then, I got the source code URL from Ubuntu Developers Site : git clone https://git.launchpad.net/dekko The source code was about 29 MB.

[READ MORE]

The Anagram Game

As you know, I have made Lobby – The localhost OS. I am in the process of adding more and more apps to it. This post explains how I created the Anagram game and the algorithm used for it. You can download the app from here or search for “Anagram” in the Lobby Store. The full source code is available on GitHub.Anagram Game How It Works ? There is a dictionary file containing many english words.

[READ MORE]

logSys Admin

After the release of logSys in May 2014, many have been asking for an admin panel of logSys. It’s finally here. I’m extremely happy to release logSys Admin as an app of Lobby.logSys Admin Logo You can find the app here on Lobby. Installation Download & Install Lobby. Open Lobby Open Lobby Store and search for “logSys Admin”. Click Install button. Usage Open App from the Lobby Dashboard and click “Go To Admin” button.

[READ MORE]