Posts

Change the Heap Size and Stack size in Java's JVM

In order to change the heap size, there are two parameters that need to be updated : -Xms512m -Xmx1024m These parameters can be found in eclipse.ini file in the eclipse folder. To change the stack size, there is a parameter that need to be updated : -Xss512m

Code for reversing a string in Java

package com.reverse; public class ReverseWords { public static String reverseTheString(String input) { if(input.length()>1) return input.substring(input.length()-1, input.length()) + reverseTheString(input.substring(0,input.length()-1)); else { return input.substring(0, 1); } } public static void main(String args[]) { System.out.println(reverseTheString("hello")); } }

Enable java plugin for firefox in Ubuntu

The java run time environment can be downloaded from the java site. Run the command for make the plugin work for Firefox in Ubuntu $cd /usr/lib/mozilla/plugins $sudo ln -s /usr/lib/jvm/jre1.6.0_30/plugin/i386/ns7/libjavaplugin_oji.so

Use Tata photon + in Ubuntu 10.04

unplug and plug Tata photon + and execute the command $ sudo usb_modeswitch -c /etc/usb_modeswitch.d/12d1:1446 The usb_modeswitch needs to be installed in the ubuntu 10.04

Play AVI,MP3 and all media file in UBUNTU

$ sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list $ sudo apt-get --quiet update $ sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring $ sudo apt-get --quiet update $ sudo apt-get install non-free-codecs $ sudo apt-get install libdvdcss2 $ sudo apt-get install w32codecs $ sudo apt-get install vlc mplayer

Download Mplayer

http://rpmfind.net/linux/rpm2html/search.php?query=mplayer-skins&submit=Search+...&system=&arch= http://rpmfusion.org/Configuration/ http://www.mjmwired.net/resources/mplayer-fedora.html#config2

Change Repository from Livna to Freshrpms in FEDORA 8

Follow some simple steps: # sudo rpm -hiv http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/8/freshrpms-release/freshrpms-release-1.1-1.fc.noarch.rpm #sudo rpm --import http://freshrpms.net/RPM-GPG-KEY-freshrpms