Thursday, March 19, 2015

Margin and Padding

Padding is the space inside the border, between the border and the actual view's content. Note that padding goes completely around the content: there is padding on the top, bottom, right and left sides (which can be independent).
Margins are the spaces outside the border, between the border and the other elements next to this view. In the image, the margin is the grey area outside the entire object. Note that, like the padding, the margin goes completely around the content: there are margins on the top, bottom, right, and left sides.
alt text

Android padding vs margin

Ref: http://stackoverflow.com/questions/4619899/difference-between-a-views-padding-and-margin?lq=1

Monday, March 9, 2015

Script

wget -r -nH --cut-dirs=5 -nc ftp://user:pass@server//absolute/path/to/directory

Note the double slash after the server name. If I don't put an extra slash the path is relative to the home directory of user.

  • -nH avoids the creation of a directory named after the server name 
  • -nc avoids creating a new file if it already exists on the destination (it is just skipped) 
  • --cut-dirs=5 allows me to take the content of /absolute/path/to/directory and to put it in the directory where I launch wget. The number 5 is used to filter out the 5 components of the path. The double slash means an extra component.
echo %date:~6,4%-%date:~3,2%-%date:~0,2%
2015-03-12



Ref: http://stackoverflow.com/questions/113886/how-do-you-recursively-ftp-a-folder-in-linux