Thursday, April 30, 2009

ftp to a server

ftp
open servername
username
password
cd dirname
put filepath/filename . (to copy file to server)
get anotherfilename (to get file from server)
close
! (to quit)

#

Keyboard shortcuts for Mac OSX

Control-F2 : Move focus to the menu bar

Shift-Command-H : Go Menu Home

http://support.apple.com/kb/HT1343

http://www.danrodney.com/mac/index.html

http://creativebits.org/keyboard_shortcuts_in_os_x

#

Wednesday, April 29, 2009

few vi commands:

Deleting from cursor to end of line
D


Selecting text for further copy/paste/delete etc
  • enter visual mode per character using v or per line using V;
  • use motion commands like h, j, k, l to select text;
  • use the selected text to yank/delete etc;

Move to the beginning next "word delimited by space"
W (w is for any next word)


Move to the beginning of previous "word delimited by space"
B (b is for any previous word)


Tuesday, April 28, 2009

to search for a particular table in Oracle database:
select * from dba_objects where object_type = 'TABLE' and object_name like '%THAT_TABLE%';

Add owner name to limit query to a schema name.


to find a particular column by name:
select * from all_tab_columns where column_name like '%COLUMN_NAME%' ;

Thursday, April 23, 2009

Index Sheet in Workbook

This vba code creates a new first sheet called index. Index sheet contains serial number and names with hyperlinks of the worksheets in the workbook.




Sub create_index()

' Creates a new sheet called index and
' makes it the first sheet.
' This macro counts the number of sheet and
' creates a hyperlink to the sheet and
' places in index sheet

flg = 1

For Each varsheet In Worksheets
If varsheet.Name = "Index" Then
flg = 0
Exit For
End If
Next varsheet

If flg = 0 Then
MsgBox "Index Exists"
Else
MsgBox "Adding Index"
Worksheets.Add.Name = "Index"
'updated on 05/12
'Worksheets.Move before:=Worksheets(1)
Worksheets("Index").Move before:=Worksheets(1)
sheetcnt = ActiveWorkbook.Sheets.Count

For i = 2 To sheetcnt
Sheets("Index").Select
j = i + 3
Range("E" & j) = i - 1
Range("F" & j) = Sheets(i).Name
Range("F" & j).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:="'" & _
Range("F" & j).Value & "'!A1"
Next i
End If

End Sub

Friday, April 3, 2009

Fieldset

Note - If you want to test this html, replace all "< " with "<".

< html>
< body>
< fieldset>

< legend style="font-family:verdana ;font-size:30px;color:blue;align=center" >
Menu
< /legend>
< form action="">
< /br>
Bread < input type="checkbox" />
< /br>
Gravy < input type="checkbox" />
< /br>
Wine < input type="checkbox" />
< /br>
Dessert < input type="checkbox" />
< /br>
< /form>
< /fieldset>
< /body>
< /html>

Output


Wednesday, April 1, 2009

Link and Image

<html>
<body>
<h1>
This is heading one
</h1>
<h2>
This is heading two
</h2>
<h3>
This is heading three
</h3>
<p>
This is a paragraph
</p>
<p>
<a href="http://google.com/" >googly linky</a>
</p>
<p>
<a href="page2.htm" >Link to Page2</a>
</p>
<img src="http://www.iacuc.arizona.edu/training/cats/images/Tabby1-DomesticCat-Closeup.jpg" alt="Arizona Cat" width="100" height="100"/>
<p> This is Arizonian cat img
</p>
</body>
</html

alt in img - if the image does not load alt lets user know what is missing on the page.