Friday, October 16, 2015

puttycm opens putty in separate window instead of tab

PuttyCm is a good utility to open mutiple putty sessions in the same window across tabs. However there are certain problems when instead of opening in a new tab the putty session opens in a new window which is cumbersome and annoying.

There are three ways to fix this problem:
1) Timeout option
2) Windows compatibility option
3) Windows registry settings

For "Timeout option"
Tools -> Options -> Select the check-box “Enable additional timing for PuTTY capture (ms)” -> set the value to 500 ms. Try even with value of 10,000ms (~10 secs)

If that does not work then try the above with "Windows compatibility option" as indicated by this blog post
  • Right-click the executable file and go to Compatibility tab.
  • Choose compatibility for Windows (as per your operating system).
  • Toward the bottom of the Compatibility tab, tick "Run this program as an administrator".

If both the above solutions do not work then its possible that you do not have local admin priviledges. As each time puttycm tries to open a session in a new tab then it makes an entry in the windows registry. Check with your administrator if you have local admin rights granted. Once its granted puttyCm will open new sessions in a new tab.

Friday, August 15, 2014

Android scrollview hiding top content in layout

Based on the screen layout in your Android application, some of the text in a TextView widget may not be visible i.e looks like its hidden/scrolled off at the top of the screen.

In the definition of the TextView in your layout xml, check to see if the below tag is present. This layout_gravity attribute is the problem why some of the text is not visible. Removing it from the TextView definition will display all data in the TextView widget.

android:layout_gravity="center_horizontal|center_vertical"

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <ScrollView
        android:id="@+id/scrollView1"
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1.04"
        android:fillViewport="true"
        android:keepScreenOn="true"
        android:scrollbarStyle="insideInset"
        android:scrollbars="vertical"
        android:visibility="visible" >

        <TextView
            android:id="@+id/detailsText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            <!--android:layout_gravity="center_horizontal|center_vertical" -->      android:layout_marginTop="30dip" />
    </ScrollView>

Replace end of line (CR/LF carriage return/new line) characters in a file or string using java

Replace end of line (CR/LF) characters in string with another character 'A'

desc = desc.replaceAll("\\r?\\n", "A");
where desc is a String variable.

Wednesday, July 23, 2014

Bangalore Open Air 2014 - metal concert

Bangalore Open Air takes place on September 13th, 2014 at CounterCulture, Bengaluru.

Three international headline acts
  • Destruction - German thrash metallers
  • Rotting Christ - Greek extreme metal band
  • Cadaver Mutilator - Italian brutal death metal band

Three Indian metal bands,
  • Threinody
  • The Down Troddence
  • Armament


Entry: 
Rs 2,000 (early bird)
Rs 2,500 on the day of the event.

Event location:
CounterCulture
2D2, 4th Cross, Dyavasandra Industrial Area,
ITPL Main Road, Whitefield, Bangalore

Event details
http://bangaloreopenair.com/

Saturday, June 21, 2014

Adding/integrating Google play services with Android app project

When adding the below element tag to AndroidManifest.xml file

<meta-data  android:name="com.google.android.gms.version"
 android:value="@integer/google_play_services_version" />
 

If you see the below error message then it means that Google play services library is not present for the current Android project.
The error is:
   No resources found that match the given name (at 'value' with value '@integer/google_play_services_version').


 To add Google play services lib, follow the below steps
1)      Select File -> Import
2)      browse to the folder where ‘Google play services library’ is present
3)      Note: ‘Google play services library’ is located in \sdk\extras\google\google_play_services
4)      select ‘Google play services library’ and ‘copy project into workspace’
Note: “copy project into workspace” must be selected so that the lib does not get modified
5)      right on your project -> properties -> android -> library and select the Google play services lib
6)      Rebuild your project which will clear the error







.

Saturday, May 3, 2014

How to play music play music from microphone input

If you have forgotten your headphone/earphones and still need to listen to music on the go and have a laptop and your favourite audio device then you can follow the steps below to listen to music.

You will need to have
1) windows 7 installed
2) 3.5mm male to male audio stereo cable
3) your favourite music player ipod, mp3 player, etc

Steps:
1) click on 'control panel' and navigate to your 'sound settings'
2) click on the 'microphone' then 'properties'
3) Tick mark 'Listen to this device'
4) make sure that 'playback through this device" is set to "default playback device"
5) click "apply" then "ok"
6) connect the 3.5mm cable from your music player to the microphone input of your laptop/desktop
7) start playing music and adjust the volume from your laptop/desktop as necessary.





3.5mm male to male audio cable.
3.5mm male to male audio cable.
3.5mm male to male audio cable.

Wednesday, April 30, 2014

Adding external/third party jars to Android project in libs folder


  1. Download the jar files to your computer.
  2. Create a new folder, libs, in your Eclipse/Android project (if it does not exist)
  3. Right-click libs and choose Import -> General -> File System, then Next, Browse in the filesystem to find the parent directory where the jar(s) were downloaded.
  4. Click OK, then click the directory name (not the checkbox) in the left pane, then check the relevant JAR in the right pane. This puts the library into your project.
  5. Right-click on your project, choose Build Path -> Configure Build Path, then click the Libraries tab, then Add JARs..., navigate to your new JAR in the libs directory and add it.This step is when the new jar gets converted to a Dalvik-converted JAR that can be used with the Android project.