2019. 11. 24.

convert array to list in java

convert array to list in java

Long [] array_values = new Long[] {0L,0L,0L,0L,0L} ;
//constructor 에 집어 넣는다. 
ArrayList<Long> list_data = new ArrayList<Long>(Arrays.asList(array_values)); 


November 24, 2019 at 01:05PM

2019. 9. 30.

remove leading zero in bash

remove leading zero in bash

leading=“000100”
no_leading=$((10#$leading))

## no_leading —> 100





September 30, 2019 at 11:03AM

2019. 9. 19.

find by size

find by size

find ./ -type file -size +500M 

option: 
b - 512 block
c - byte
w - two bytes words
k - kilo
M - mega
G - giga

# find and display size. human readable

find ./ -type file -size +500M -exec ls -lh {} \;


September 19, 2019 at 02:22PM

2019. 9. 15.

UFW config ( ubuntu firewall config )

firewall config 

## install 
sudo apt-get install ufw 

## add port 
sudo ufw allow 22
sudo ufw allow 8081
sudo ufw allow 8082

## enable ufw
sudo ufw enable 

## check status
sudo ufw status

## delete allow port

Sudo ufw delete allow 2022   # 2022 allow를 삭제함.  

2019. 5. 12.

Making tab and spaces visible in vi editor

while typing python code in vi editor,   space and tab make compile errors.

By using 'set list' , user can check tab and space characters.

# Normal mode



:set list

:set list listchars=tab:\|\-    #last char is space.

:set list!   #off  command