Tuesday, March 3, 2015

How to extract files from msi file

Type in below command.

Syntax:
msiexec /a filepath to MSI file /qb TARGETDIR=filepath

For example:

msiexec /a C:\kondal\node-v0.10.13-x86.msi.exe /qb TARGETDIR=C:\kondal\test

Monday, March 2, 2015

GIT: some useful git commands for my reference

To delete a local branch:
> git branch -d <branch name>


To checkout to remote branch
> git fetch
> git checkout <branchname>

Friday, December 12, 2014

Editing PATH and JAVA_HOME variables in Mac OS X


Step 1: Open up a Terminal window (this is in your Applications/Utilites folder by default)

Step 2: Enter the follow commands:

touch ~/.bash_profile; open ~/.bash_profile

This will open the .bash_profile file in Text Edit (the default text editor included on your system). The file allows you to customize the environment your user runs in.

Step 3: Add the following line to the end of the file adding whatever additional directory you want in your path:

PATH=/Applications/Kony_Studio/Kony/Java/jdk1.7.0_67.jdk/Contents/Home/bin:/usr/bin:/bin:/usr/sbin:/sbin

export JAVA_HOME=/Applications/Kony_Studio/Kony/Java/jdk1.7.0_67.jdk/Contents/Home


Resources:
http://hathaway.cc/post/69201163472/how-to-edit-your-path-environment-variables-on-mac

Thursday, November 27, 2014

Eclispe Mac - Changing text file encoding

By default, mac eclipse is configured with US-ASCII text encoding, but this does not work out if your file is having some special characters.

When you try to save a file which is having some special characters, you will face the below problem.












By changing default text encoding from US-ASCII to UTF-8 will resolve the problem.

This can be changed from the eclipse preferences-> General -> Workspace.


Changing the Eclipse Java thread time out value


Did you ever face below kind of issue while starting your eclipse product ? 

!ENTRY org.eclipse.osgi 2 0 2014-11-28 11:17:57.835
!MESSAGE While loading class "com.kk.tool.model.KContainer", thread "Thread[main,6,main]" timed out waiting (5015ms) for thread "Thread[Thread-3,5,main]" to finish starting bundle "com.kk.tool_6.0.190.DEV_v201411271801 [664]". To avoid deadlock, thread "Thread[main,6,main]" is proceeding but "com.kk.tool.model.KContainer" may not be fully initialized.
!STACK 0
org.osgi.framework.BundleException: State change in progress for bundle "reference:file:dropins/com.kk.tool_6.0.190.DEV_v201411271801.jar" by thread "Thread-3


There are two majors reasons for this.
1. Real dead lock would have occurred
2. Your product might have lot of bundles and each one of them might have dependencies on other plugins startup. Because of this, eclipse startup will be delayed.

If it is (1), we need to identify the root cause for a dead lock and fix it.

In general, OSGI controlling java threads time out by 5000 ms by default. We can control this time out by osgi parameter which need to be configured in the config.ini file.

equinox.statechange.timeout=8000

You can find config.ini file in the configuration folder of eclipse directory.
<eclipse>/configuration/config.ini

Caution: Don't jump strait to the timeout solution with out really looking at the dead lock possibility, 99% of time problem might be there with our code only!!!!

Resources:



Locking mac pro system - Lock Screen

I am new to MacBook pro..it's for my reference..

http://www.howtogeek.com/howto/32810/how-to-lock-your-mac-os-x-display-when-youre-away/


>Applications > Utilities -> Key Chain Access -> Preferences -> General Tab -> Check 'Show status in Menu bar'

After this you will find lock menu bar on your screen and you can see "Lock Screen" option