Monday, 23 December 2013

Sunday, 22 December 2013

Microsoft Excel Basic Coding

Yang berhubungan dengan Cell

How to refer to one cell in a particular sheet?
Style1: Using range property
Use: Range property + A1 Notation

Example:

Sub onecell()
    Sheet1.Range("A1").Select
End Sub

Style 2: Using index number
Use: Row Index number, Column index number, cells property
Example:
Sub onecell()
    Sheet1.cells(1,1).Select
End Sub

Note: Also good for used with looping statement.

How to refer to one cell that relative to another active cell? (Relativity)
Use: offset property
Example:
This can be both do to style 1 and style 2

Sub onecell()
    Sheet1.cells(1,1).offset(1,2).Value = 10
end sub


How to refer to cells (more than one cell)
Style1: Using A1 Notation
Use: Range property + A1 Notation
Example:
Sub manycells1()
    Sheet1.Range("A1:A3").Select
End Sub

Style2: Using Range Object
Use: dim, set, object variable

Example:
sub manycells2()
    dim a as range
    set a = sheet1.range("A1:A3")
    a.select
end sub

Style3: Using shortcut notation
As the title implies, this is the shorcut of using Range word. That is, you don't have to type word Range or use Quotation marks anymore for shortcuts.

Use: [A1:A2] or [MyRange] if you have define those cells in name manager.

Example:
Sub manycells()
    Sheet1.[MyRange].Select
End sub

Note: You don't have to type word "Range" or use Quotation marks after Sheet1.

How to refer to all cell in a particular sheet
Use: cells
Example:
sub allcell()
    sheet1.cells.activate
end sub


Yang berhubungan dengan Sheet

How to refer a one sheet?
Style 1:
Use Worksheets name
Example:
Sub onesheet()
    Worksheets("sheet2").Select
End Sub

Style2: 
Use Worksheets index number
Example:
Sub onesheet()
    Worksheets(2).Select
End Sub

How to refer to more than one sheets?
Use: worksheets property and array function
Example:
Sub several_sheets()
    worksheets(Array("Sheet1","Sheet2")).Select
end sub

How to refer to all sheet in a workbook?
Use: Worksheets property without specifications.
Example:
Sub all_sheet()
    Worksheets.Select
End Sub

Yang berhubungan dengan Workbook

How to create a new workbook
Use: workbooks.add
Example:
Sub AddOne()
    Workbooks.add
End sub

How to activate a workbook
Use: workbooks properties and book name(for i.e. : "book1")
Example:
Sub ActivateOne()
    Workbooks("book1").activate
End sub

How to open a workbook
Use: Open method and, path to the file
Example:
Sub OpenUp()
    Workbooks.Open ("C:\Mybook")
End Sub
How to save a workbook
Use: saves or save and path to the file

Example:
Sub Save()
    Workbooks("Mybook").SaveAs ("E:\Mybook")
End Sub

Now you have enough tool to do these tasks:
1. Copy and paste from sheet1 to sheet2
Untuk pemilihan sel saya lebih prefer menggunakan keyword range daripada cells (lebih praktis) meskipun untuk seleksi satu sel saja saya tetap menggunakan keyword range.

Sub copy_paste()
    Sheet1.Range("A1:A2").Copy
    Sheet2.Range("A1:A2").PasteSpecial
End Sub

Well, you can implement those with macro recording though.

2. Adding a comment on a cell or cells
Sub

List of methods (function) of a cell

List of methods (function) of a cell, a block of cells (they are having same methods):
1. Activate
2. AddComment
3. AdvancedFilter
4. ApplyNames
5. ApplyOutlineStyles
6. AutoComplete
7. AutoFill
8. AutoFilter
9. AutoFit
10. AutoOutline
11. BorderAround
12. Calculate
13. CalculateRowMajorOrder
14. CheckSpelling
15. Clear
16. ClearComments
17. ClearContents
18. ClearFormats
19. ClearNotes
20. ClearOutline
21. ColumnDifferences
22. Consolidate
23. Copy
24. CopyFromRecordSet
25. CopyPicture
26. CreateNames
27. Cut
28. DataSeries
29. Delete
30. DialogBox
31. Dirty
32. EditionOptions
33. ExportAsFixedFormat
34. FillDown
35. FillLeft
36. FillRight
37. FillUp
38. Find
39. FindNext
40. FindPrevious
41. FunctionWizard
42. Group
43. Insert
44. InsertIndent
45. Justify
46. ListNames
47. Merge
48. NavigateArrow
49. NoteText
50. Parse
51. PasteSpecial
52. PrintOut
53. PrintPreview
54. RemoveDuplicates
55. RemoveSubtotals
56. Replace
57. RowDifferences
58. Run
59. Select
60. SetPhonetic
61. Show
62. ShowDependents
63. ShowErrors
64. ShowPrecedents
65. Sort
66. SortSpecial
67. Speak
68. SpecialCells
69. SubscribeTo
70. SubTotal
71. Table
72. TextToColumns
73. Ungroup
74. Unmerge

Saturday, 21 December 2013

Email component and their functions

MTA
1. Receives mail from client
2. forward mail between servers using SMTP

MDA
1. Resolves final delivery issues
2. performs actual delivery to user's mailbox

MUA
1.Client used to access and to read mail
2. retrieves mail using POP


DNS record type and the resources that it identifies

NS = Authoritative name server

CNAME = canonical or Fully Qualified Domain Name for an alias

MX = Maps a domain name to a list of mail exchange server for that domain

A = End device address

Cisco Packet Tracer 6.1 components

 Cisco Router:

1. Cisco 1841
2. Cisco 1941
3. Cisco 2620XM
4. Cisco 2621XM
5. Cisco 2811
6. Cisco 2901
7. Cisco 2911

Cisco Switch:

1. Cisco 2950-24
2. Cisco 2950T
3. Cisco 2960
4. Cisco 3560 24 PS

Server:

1. HTTP Server
2. DHCP server
3. TFTP server
4. DNS server
5. SYSLOG server
6. AAA server
7. NTP server
8. EMAIL server
9. FTP server
10. FIREWALL server
11. IPv6 FIREWALL


Router modules:

1. NM-1E
2. NM-1E2W
3. NM-1FE-FX
4. NM-1FE-TX
5. NM-1FE2W
6. NM-2E2W
7. NM-2FE2W
8. NM-2W
9. NM-4A/S
10. NM-4E
11. NM-8A/S
12. NM-8AM
13. NM-Cover
14. NM-ESW-161
15. HWIC-2T
16. HWIC-4ESW
17. HWIC-8A
18. HWIC-AP-AG-B
19. WIC-1AM
20. WIC-ENET
21. WIC-1T
22. WIC-2AM
23. WIC-2T
24. WIC-Cover


Friday, 20 December 2013

The 9 hardest things programmers have to do

1. Naming things
2. Explainning what I do and don't do
3. Estimating time to complete task
4. Dealing with other people
5. Working with someone else's code
6. Implementing functionality you disagree with
7. Writing documentation
8. Writing test
9. Designing a solution