Get Architecture Plainly Without Version In Android

If you want to just get plainly the architecture of system like “arm” or “x86” in your apps, then this post is just for you. So with this function that I’m gonna present, you will get 3 values, “arm”, “mips” or “x86” whether or not the system is 32 bit or 64 bit. Here is the function : public static String getArch() { String arch = System.getProperty("os.arch").substring(0, 3).toLowerCase(); if (arch.equals("aar")…

How To Install & Run Composer Binaries Globally

Take PHPUnit as an example. You can install it using Composer doing this : composer require phpunit/phpunit This will install a phpunit shortcut in vendor/bin directory. This obviously means you can run it. But, you would have to point to the exact location of the phpunit file to run :  /home/username/mysite/vendor/bin/phpunit phpunit.xml But, that’s long and uncomfortable. And you would have to install PHPUnit separately for each projects. I’m gonna…

Theme Version 2

If you are reading this post, you should have seen the new UI of my blog. It’s a custom made theme created in a week during the exams. It’s similar to the old theme because, I liked it colorful and dark at the same time. I’m a Batman fan and black is good for the eyes. As a programmer, you don’t want to hurt your eyes. The theme is named…

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…

Set Same Time Zone in PHP & MySQL

Time Zones are important if you’re creating a social app which will include chat, social network and others which is interacted with the society. There are many time zones and you have to choose one to set in your server. I would totally recommend using UTC instead of your time zone in server. Web Server and Database server are different and they each have their own configuration. This includes the…

jQuery Popping Up Text Effect

If you are creating a web app and there is conversation to the user without audio and just text, animations and effect will make the app better. In this short post, I’m introducing a simple text effect without any trouble at all. All it does is animate the text’s font size. But, the effect is like the text is popping up. Demo Here’s the code. It’s wrapped in a function…