Tuesday, March 16, 2010
TR (bash)
Can use tr to remove all carriage returns and Ctrl-z ( ^Z ) characters from a Windows file by entering:
tr -d '\15\32' < winfile.txt > unixfile.txt
tr '\r' '\n' < web_to_print_compare-edited.csv > unixfile.csv
Note: cannot use tr to convert a document from Unix format to Windows
tr -d '\15\32' < winfile.txt > unixfile.txt
tr '\r' '\n' < web_to_print_compare-edited.csv > unixfile.csv
Note: cannot use tr to convert a document from Unix format to Windows
Thursday, March 11, 2010
sort and remove duplicates in file
sort and uniq will quickly and easily remove duplicates, lsit only the dupilcates or only the unique data.
sort myfile.txt | uniq
sort myfile.txt | uniq
Wednesday, March 10, 2010
Metaphone or Double Metaphone
Methaphone / Double Metaphone is an algorithm to match words that are spelled differently, but sound the same. Its useful for avoiding duplicated names in a database.
VIM helpful commands
:sort u (remove duplicate line)
:g/pattern/d (delete line)
:g/^$/d (delete blank lines)
:%s/.*/\U&/ (UPPER CASE)
:%s/.*/\L&/ (LOWER CASE)
:g/pattern/d (delete line)
:g/^$/d (delete blank lines)
Friday, March 5, 2010
same origin policy
Aa web page served from domain1.com CANNOT normally connect to or communicate with a server other than domain1.com
POST
- POST is safer than GET
- No restrictions in size
- No Format restrictions. Binary data is also allowed.
- The browser ussually alerts the user that data need to be resubmitted.
- multipart/form-data or application/x-www-form-urlencoded
GET
- GET is less secure compared to POST
- Data in the URL and URL length is restricted
- GET requests are re-executed (Back button/re-submit behavior)
- Only ASCII characters allowed
- application/x-www-form-urlencoded
Tuesday, March 2, 2010
lads
a male person of any age between early boyhood and maturity.
Dicrionary: Lads
Dicrionary: Lads
Friday, February 5, 2010
ergo
A Latin word meaning "therefore." In logic, ergo means the conclusion of a preceding argument.
Subscribe to:
Posts (Atom)