Monday, November 10, 2014

Take your android experience to the limit with third party Launcher applications.

 

What is a Launcher application?

Android launchers are apps that can spice up your phone's home screen or may act as a personal assistant. One of Android's best features is that you can design your phone's interface.
Unlike the iPhone, where Apple dictates how iOS looks and feels, you can personalize your Android home screen or app drawer with almost no effort. All you need is a launcher, also called a home-screen replacement, which is an app that modifies the software design and features of your phone's operating system without making any permanent changes.

Which one is the best?

I have only tested two launchers so far on my small memory device and my recommendation is C-Launcher  as it only takes a small memory and has a built in memory clean up widget! But if you have more memory, then i recommend GO Launcher EX  as it provides more flexibility and customization. Both you can use with out a penny from your pocket only need a way to download them!

 You can get them both at Google Play. And follow this link to download the .apk file for Go Launcher Ex directly.
http://file.appsapk.com/wp-content/uploads/downloads/GO%20Launcher%20EX.apk

But if you are looking a world wide comparison of android launcher products then take a look here.
13 best Android launcher apps by Android Authority!

Until next time, Stay safe!

Monday, November 3, 2014

Git and Empty Directories

Hello people!

I am not much of a blogger, I'm just getting started with it! But I wanted to share my learning experience  with the world and create my first opensource project!

How to Stage empty directories?


Anyone who works with git know the trouble I'm talking about. Git doesn't index directories (folder for windows users). It tracks content and directories are not exactly contents. Some might say why should i track empty directories any ways! I don't argue with them if they don't need them. But for me using gits caused me a lot of clathpath errors. It took me a hour of google to see that git will never index my directories until i put something in it! So the answer to the above question is you can't!

How to Trick git in to Staging empty Directories?

You can't tell git to index directories. There is just no way to do that! The only solution is to put something you don't even care about inside the directories. Then add those files! Job done!

Talking about putting something in it, what should i put? Well,  here is a convention programmers came up with. Put .gitkeep file in it! Other files are also alternative such as README and .gitignore! README is fine but .gitignore is not a good option because it is actually checked by git, so the more u have the more it could cause lags. Therefore I am sticking with the .gitkeep file.

So, Here is the problem I have a couple of hundred directories that i am not sure if empty or not! i can't just put .gitkeep everywhere! Ow' crap! that is a trouble that has just the simplest solution. 

Put your programming skill to use! I wrote a small programm to put .gitkeep file in every directory starting from the root of the project, that way i don't have to be bugged about any of the troubles!


Here is the code for the solution, just copy, past, change the root path then compile and run! Or go to git hub, fork modify it to be better and create a pull request! (Consider it my first opensource project, i know that is dumb)!

package gitkeep;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class Walker {

 public static void main(String[] args) {
  // TODO Auto-generated method stub
  String rootFolder = "E:/Projects/Ongoing/Grails/AdeStyles/";

  File root = new File(rootFolder);

  System.out.println(root.isDirectory());
  walkTree(root);
  // root.listFiles();

 }

 public static void walkTree(File root) {
  if (root.isFile()) {
   return;
  } else if (root.isDirectory()) {
   // put an empty .keep file here
   File gitKeep = new File(root.getAbsolutePath()+"/.gitKeep");
   try {
    FileWriter w = new FileWriter(gitKeep);
    w.write("#This file is not ment to do anything!" 
                                         + " It is used to make empty directories"
             + " stay in the git repository so that classpath"
                                         + " error doesn' occur!");
    w.close();
   } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
   }
   System.out.println(root.getName());
   for(File file:root.listFiles()){
    walkTree(file);
   }
  } else {
   return;
  }
 }

}


Here, is a link to the github! amexboy/gitkeeper Please fork and make it better! And let us build a better world for our selves!