Saturday, December 20, 2014

GIT - A Simple Reference


Assume a case where there is Master Branch and Development Branch.

$ git branch
*dev
master

GIT - Work Flow (To create a work flow/branch and work)
-----------------------------------------------------------------------

$ git flow init
$ git flow feature start <id>

After creating the Work flow, moves to feature branch(indicated by *)

$ git branch
   dev
* feature/<ID>
   master

$ git add "modified file names with spaces"
$ git commit -am "Meaningful comment"
$ git flow feature finish <id>


Reset to the head of the current branch
----------------------------------------
$ git reset --hard HEAD

To see the list of check-in's made
------------------------------------
$ git log - prints the list of check-in's made
commit  <SHA ID 1>
Author: name <name@domain.com>
Date:   <Date of commit>

To Delete a WorkFlow/Branch
------------------------------------
$ git branch -D  feature/<ID>

To update the feature branch changes to dev branch
--------------------------------------------------
$ git checkout dev
$ git fetch
$ git rebase -p origin/dev
$ git checkout feature/<id>
$ git rebase -p dev
$ git flow feature finish <id>

To Push the code to Origin/Remote dev
------------------------------------
-$ git push origin dev

Monday, November 24, 2014

How to write a make file(Android.mk) for Android Application when you build from Android Source Code?

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4 <UR-JAVA-Library>

LOCAL_PACKAGE_NAME := <APP-NAME>

LOCAL_SDK_VERSION := current

include $(BUILD_PACKAGE)

# Use the following include to make your own test apk.

include $(call all-makefiles-under,$(LOCAL_PATH))

Tuesday, November 18, 2014

Problem Solving: Improvise, Adapt, Overcome (Given a problem, what should I do??)

Given a problem, what should I do??

http://www.peakprosperity.com/blog/improvise-adapt-overcome/52001

C Debugging

What happens to the following program,

int main()
{
        char *a = malloc(sizeof(100));
        printf("a = %p\n",a);
        a++;
        printf("a = %p",a);
        free(a);
}

Sunday, August 10, 2014

Valgrind LEAK Summary

When you run val-grind for your application with tool=memcheck, then following information can be obtained.

Sample LEAK SUMMARY:

   definitely lost: 166,014 bytes in 22 blocks
   indirectly lost: 39 bytes in 2 blocks
     possibly lost: 132,081 bytes in 2 blocks
   still reachable: 92 bytes in 2 blocks
        suppressed: 0 bytes in 0 blocks