Programmer's Blog

Programmer's reference

Monthly Archives: September 2014

[Solaris] Set tab autocomplete

In the Linux OS the tab autocompletion is turned on so that when you press tab, the path is auto-completed. However, this feature is disabled in the Soalris by default, to turn on autocomplete

# tcsh
# set autolist
Advertisements

[Shell] remove a lines of text if matches

if grep -Fxq "keyword" file.txt
then
sed -i '/keyword/d' file.txt
fi

[Java] Multiple Hash map for hierarchical data

import java.util.*;
import java.lang.*;
import java.io.*;

class myClass
{
 public static void main (String[] args) throws java.lang.Exception
 {
 
 HashMap<Integer, String> inHash = new HashMap<Integer, String>();
 HashMap<Integer, HashMap<Integer, String>> myHash = new HashMap<Integer, HashMap<Integer, String>>();

 inHash.put(1,"Hello");
 myHash.put(1,inHash);
 
 System.out.println(myHash.get(1).get(1));
 }
}

Remote desktop call

dos> mstsc -v 10.0.0.23