Saturday, September 13, 2014
Thursday, September 11, 2014
Professional Practice: Day 02
I. Examples of Unethical Behaviour
- Incorrectly billing time
- Sharing confidential information about a client
- Being negative about a competitor
- Embellishing your resume
- Failure to report an error discovered in plans and specifications
- Accepting gifts from contractors or vendors
- Being involved in a project that will have significant adverse environmental or safety impact
- Participating in a deceptive presentation to obtain work
- Failure to disclose relationships
- Conflict of interest
References1. BE103/BN201/MN501, Professional Practice, Melbourne Institute of Technology (MIT) Lecture Notes, 2014.
Monday, September 8, 2014
Sunday, September 7, 2014
Data communications Day 2
I Error correction via Retransmission
1.1 Stop-and Wait ARQ (Automatic Repeat reQuest)
The sender stops and waits for a response from the receiver after each data packet.
1.2 Continuous ARQ (Automatic Repeat reQuest)
The sender does not wait for an acknowledgement after sending a message, it immediately sends the next one.
II. TCP Sequences
The client on either side of a TCP session maintains a 32-bit sequence number it uses to keep track of how much data it has sent. This sequence number is included on each transmitted packet, and acknowledged by the opposite host as an acknowledgement number to inform the sending host that the transmitted data was received successfully.
III Network Layer 3 IP Layer
3.1
What does a DNS server do? - to translate name and IP address and vice versa
What does a DHCP server do? - to assign an IP address for a local network computer.
What is the purpose of the default gateway? - to connect to Internet (out of the local area network).
3.2
Output the physical and IP address mappings
arp -a
Show a record of the sites you have visited
ipconfig /displaydns > c:\temp\dnscache.txt
3.3
Show TCP/IP statistics and details about TCP and UDP connections
netstat -a
To view PC's routing table
netstat -r
3.4
Test a PC's connectivity to the network
ping 127.0.0.1 to check that CP/IP layers are working
3.5 Maximum Segment Size
1460 bytes + 20 bytes typical TCP header length + 20 bytes typical IP header length + 18 bytes Ethernet header and CRC = 1518 bytes. That is the maximum allowable packet size on an Ethernet network.
References
[1]. Jerry Fitzgerald, Alan Dennis and Alexandra Durcikova, Business Data Communications and Networking, 11th Edition, John Wiley & Sons, Inc.
1.1 Stop-and Wait ARQ (Automatic Repeat reQuest)
The sender stops and waits for a response from the receiver after each data packet.
1.2 Continuous ARQ (Automatic Repeat reQuest)
The sender does not wait for an acknowledgement after sending a message, it immediately sends the next one.
- The packets that are retransmitted may be only those containing an error (called Link Access Protocol for Modems [LAP-M]. This is better because it is more efficient.
- The first packet with an error and all those that followed it (call Go-Back-N ARQ).
II. TCP Sequences
The client on either side of a TCP session maintains a 32-bit sequence number it uses to keep track of how much data it has sent. This sequence number is included on each transmitted packet, and acknowledged by the opposite host as an acknowledgement number to inform the sending host that the transmitted data was received successfully.
III Network Layer 3 IP Layer
3.1
What does a DNS server do? - to translate name and IP address and vice versa
What does a DHCP server do? - to assign an IP address for a local network computer.
What is the purpose of the default gateway? - to connect to Internet (out of the local area network).
3.2
Output the physical and IP address mappings
arp -a
Show a record of the sites you have visited
ipconfig /displaydns > c:\temp\dnscache.txt
3.3
Show TCP/IP statistics and details about TCP and UDP connections
netstat -a
To view PC's routing table
netstat -r
3.4
Test a PC's connectivity to the network
ping 127.0.0.1 to check that CP/IP layers are working
3.5 Maximum Segment Size
1460 bytes + 20 bytes typical TCP header length + 20 bytes typical IP header length + 18 bytes Ethernet header and CRC = 1518 bytes. That is the maximum allowable packet size on an Ethernet network.
References
[1]. Jerry Fitzgerald, Alan Dennis and Alexandra Durcikova, Business Data Communications and Networking, 11th Edition, John Wiley & Sons, Inc.
Friday, August 29, 2014
Open-ended questions to start a conversation
I. Ask an open-ended question.
1. "What sort of books do you like?",
2. "What did you study?",
3. "Which is your favorite season? Why?",
4. "What are you doing right now?",
5. What types of movies do you like?
II. Know how to combine general remarks with open-ended questions.
1. That's a nice handbag, where did you get it?
2. What an amazing buffet! Which is your favorite dish?
3. Fantastic turnout! Which of the lecturers is your favorite?
4. I love your costume. What are your favorite sci-fi movies?
5. I love your shirt. Where do you usually go for clothes shopping?
III. Talk about the current events
1. Hey, did you hear about that helicopter crash? That was pretty crazy.
IV. Draw on previous discussions
For example, their kid’s milestone, one of their projects, or some bad news that they shared with you.
V. Ask questions that are easy to answer.
What are you up to? meaning, What are you doing today? or What is your schedule for today?
"Remember, whoever you are talking to, you always have something in common. We all experience the weather, like good food, and enjoy a good laugh. When in doubt, just talk to them about what they are there for. For example, if you meet them at a bus stop, ask them where they are going. If they are from out of town, ask them about their life at home [1]."
"Take a mental note of some amusing things that you saw or heard throughout the day. For example, something funny someone said, a fun activity you did with your friends, or anything interesting. This can give way to future conversation [1]."
"Developing your interests. It's easier to start interesting conversations when you invest in developing your own interests. Be familiar with your interest so that you can articulate them. Broaden and deepen your interests by having the attitude that you are interested in everything. Another way to broaden and deepen your interests is to ask questions about others' interests. If your friend loves baseball, ask him which teams and players look good this year or ask him questions that clarify the league structure [1]."
References
1. http://www.wikihow.com/Start-a-Conversation-When-You-Have-Nothing-to-Talk-About accessed date 29/08/2014
1. "What sort of books do you like?",
2. "What did you study?",
3. "Which is your favorite season? Why?",
4. "What are you doing right now?",
5. What types of movies do you like?
II. Know how to combine general remarks with open-ended questions.
1. That's a nice handbag, where did you get it?
2. What an amazing buffet! Which is your favorite dish?
3. Fantastic turnout! Which of the lecturers is your favorite?
4. I love your costume. What are your favorite sci-fi movies?
5. I love your shirt. Where do you usually go for clothes shopping?
III. Talk about the current events
1. Hey, did you hear about that helicopter crash? That was pretty crazy.
IV. Draw on previous discussions
For example, their kid’s milestone, one of their projects, or some bad news that they shared with you.
V. Ask questions that are easy to answer.
What are you up to? meaning, What are you doing today? or What is your schedule for today?
"Remember, whoever you are talking to, you always have something in common. We all experience the weather, like good food, and enjoy a good laugh. When in doubt, just talk to them about what they are there for. For example, if you meet them at a bus stop, ask them where they are going. If they are from out of town, ask them about their life at home [1]."
"Take a mental note of some amusing things that you saw or heard throughout the day. For example, something funny someone said, a fun activity you did with your friends, or anything interesting. This can give way to future conversation [1]."
"Developing your interests. It's easier to start interesting conversations when you invest in developing your own interests. Be familiar with your interest so that you can articulate them. Broaden and deepen your interests by having the attitude that you are interested in everything. Another way to broaden and deepen your interests is to ask questions about others' interests. If your friend loves baseball, ask him which teams and players look good this year or ask him questions that clarify the league structure [1]."
References
1. http://www.wikihow.com/Start-a-Conversation-When-You-Have-Nothing-to-Talk-About accessed date 29/08/2014
Thursday, August 28, 2014
Editing guidelines
The following shows a checklist for editing your own work [1].
1. Check spelling, grammar, constructions
2. Enhance visual impact
3. Consider practical details
4. Get second opinion
5. Back up
Please note: effective writing is clear, coherent, concise and accurate.
References
[1]. MN501 Professional Practice Lecture Notes, Melbourne Institute of Technology, Trimester 2, 2014.
1. Check spelling, grammar, constructions
2. Enhance visual impact
3. Consider practical details
4. Get second opinion
5. Back up
Please note: effective writing is clear, coherent, concise and accurate.
References
[1]. MN501 Professional Practice Lecture Notes, Melbourne Institute of Technology, Trimester 2, 2014.
Friday, August 22, 2014
Database Day 06: sqlplus Oracle commands (2)
1. Purge vs cascade constraints options
purge and cascade constraints options in drop table command
purge clause is used to remove table completely, without purse the deleted tables are still recoverable.
Specify CASCADE CONSTRAINTS to drop all referential integrity constraints that refer to primary and unique keys in the dropped table. If you omit this clause, and such referential integrity constraints exist, then the database returns an error and does not drop the table [3].
"Oracle Database 10g introduces a new feature for dropping tables. When you drop a table, the database does not immediately release the space associated with the table. Rather, the database renames the table and places it in a recycle bin, where it can later be recovered with the FLASHBACK TABLE statement if you find that you dropped the table in error. If you want to immediately release the space associated with the table at the time you issue the DROP TABLE statement, then include the PURGE clause as follows. DROP TABLE employees PURGE; Specify PURGE only if you want to drop the table and release the space associated with it in a single step. If you specify PURGE, then the database does not place the table and its dependent objects into the recycle bin. NOTE: You cannot roll back a DROP TABLE statement with the PURGE clause, and you cannot recover the table if you drop it with the PURGE clause. This feature was not available in earlier release."[1].
2. Format of the Date object
Date storage is often a problem with various DBMS's - for Oracle use the date data format of: 'DD-MMM-YYYY' in single quotes within an insert statement eg. '09-AUG-2014'.
3. Update statement
E.g.
4. Date related SQL statements
4.1 To format date as 'DD-MM-YYYY' on display
E.g. SELECT ProductName, Price, FORMAT(Now(),'DD-MM-YYYY') AS PerDate
FROM Products;
4.2 The Oracle/PLSQL TO_DATE function converts a string to a date.
E.g. to_date('2014-08-22', 'yyyy-mm-dd') would return a date value of August 22, 2014
E.g. TO_DATE('2014/08/22', 'yyyy/mm/dd') would return a date value of August 22, 2014
E.g. TO_DATE('082214', 'MMDDYY') would return a date value of August 22, 2014
E.g. TO_DATE('20140822', 'yyyymmdd') would return a date value of August 22, 2014
5. "Columns defined with the VARCHAR2 datatype store variable-length alphanumeric data (including text, numbers, and special characters). The maximum length of the data is specified in the parentheses. VARCHAR2 is the most commonly used datatype and can store up to 4,000 bytes.
In contrast, the CHAR datatype (not shown in Figure 7) allows for fixed-length alphanumeric data only and stores a maximum of 2,000 bytes.
I recommend choosing VARCHAR2 over CHAR when you select an alphanumeric datatype to define text columns. With VARCHAR2, particularly if you choose an appropriate maximum length for your columns, you won’t waste storage space.
(Choosing a maximum of 4,000 bytes makes sense only if you truly believe that your column will ever contain data values that reach that size limit.) CHAR can waste storage space, because the data is always padded with blank space to the specified fixed length before it is stored." [2].
6. SQL data types
7. Oracle data types
--list all current tables in the db
select * from cat;
References:
[1]. http://stackoverflow.com/questions/7713432/difference-between-drop-and-drop-purge-in-oracle, accessed date 22 August 2014.
[2]. http://www.oracle.com/technetwork/issue-archive/2011/11-nov/o61sql-512018.html, accessed date 22 August 2014.
[3]. http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9003.htm, accessed date 22 August 2014.
[4]. http://www.w3schools.com/sql/sql_datatypes_general.asp accessed date 25/08/2014.
purge and cascade constraints options in drop table command
purge clause is used to remove table completely, without purse the deleted tables are still recoverable.
Specify CASCADE CONSTRAINTS to drop all referential integrity constraints that refer to primary and unique keys in the dropped table. If you omit this clause, and such referential integrity constraints exist, then the database returns an error and does not drop the table [3].
"Oracle Database 10g introduces a new feature for dropping tables. When you drop a table, the database does not immediately release the space associated with the table. Rather, the database renames the table and places it in a recycle bin, where it can later be recovered with the FLASHBACK TABLE statement if you find that you dropped the table in error. If you want to immediately release the space associated with the table at the time you issue the DROP TABLE statement, then include the PURGE clause as follows. DROP TABLE employees PURGE; Specify PURGE only if you want to drop the table and release the space associated with it in a single step. If you specify PURGE, then the database does not place the table and its dependent objects into the recycle bin. NOTE: You cannot roll back a DROP TABLE statement with the PURGE clause, and you cannot recover the table if you drop it with the PURGE clause. This feature was not available in earlier release."[1].
Date storage is often a problem with various DBMS's - for Oracle use the date data format of: 'DD-MMM-YYYY' in single quotes within an insert statement eg. '09-AUG-2014'.
3. Update statement
E.g.
4. Date related SQL statements
4.1 To format date as 'DD-MM-YYYY' on display
E.g. SELECT ProductName, Price, FORMAT(Now(),'DD-MM-YYYY') AS PerDate
FROM Products;
4.2 The Oracle/PLSQL TO_DATE function converts a string to a date.
E.g. to_date('2014-08-22', 'yyyy-mm-dd') would return a date value of August 22, 2014
E.g. TO_DATE('2014/08/22', 'yyyy/mm/dd') would return a date value of August 22, 2014
E.g. TO_DATE('082214', 'MMDDYY') would return a date value of August 22, 2014
E.g. TO_DATE('20140822', 'yyyymmdd') would return a date value of August 22, 2014
5. "Columns defined with the VARCHAR2 datatype store variable-length alphanumeric data (including text, numbers, and special characters). The maximum length of the data is specified in the parentheses. VARCHAR2 is the most commonly used datatype and can store up to 4,000 bytes.
In contrast, the CHAR datatype (not shown in Figure 7) allows for fixed-length alphanumeric data only and stores a maximum of 2,000 bytes.
I recommend choosing VARCHAR2 over CHAR when you select an alphanumeric datatype to define text columns. With VARCHAR2, particularly if you choose an appropriate maximum length for your columns, you won’t waste storage space.
(Choosing a maximum of 4,000 bytes makes sense only if you truly believe that your column will ever contain data values that reach that size limit.) CHAR can waste storage space, because the data is always padded with blank space to the specified fixed length before it is stored." [2].
6. SQL data types
![]() |
| SQL data types referene [4]. |
- numeric
- number
- char
- varchar
- date
8. set echo on and off commands
Add set echo on to allow commands to be echoed during execution
Add set echo on to allow commands to be echoed during execution
set echo on
add set echo off to turn off
set echo off
9. Roles and privileges
--select all the role name and granted role
select *
from role_role_privs
order by 1;
--Show role for the current user
SELECT * FROM USER_ROLE_PRIVS;
--Show role for username 'FOO'
select *
from user_role_privs
where username='FOO';
--show all the privileges for 'TUTORROLE'
select *
from role_sys_privs
where role='TUTORROLE'
order by 1;
--show all the priviledges for 'TUTORROLE'
select *
from role_sys_privs
where role='STUDENTROLE'
order by 1;
--select all the role name and granted role
select *
from role_role_privs
order by 1;
--Show role for the current user
SELECT * FROM USER_ROLE_PRIVS;
--Show role for username 'FOO'
select *
from user_role_privs
where username='FOO';
--show all the privileges for 'TUTORROLE'
select *
from role_sys_privs
where role='TUTORROLE'
order by 1;
--show all the priviledges for 'TUTORROLE'
select *
from role_sys_privs
where role='STUDENTROLE'
order by 1;
--list all current tables in the db
select * from cat;
References:
[1]. http://stackoverflow.com/questions/7713432/difference-between-drop-and-drop-purge-in-oracle, accessed date 22 August 2014.
[2]. http://www.oracle.com/technetwork/issue-archive/2011/11-nov/o61sql-512018.html, accessed date 22 August 2014.
[3]. http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9003.htm, accessed date 22 August 2014.
[4]. http://www.w3schools.com/sql/sql_datatypes_general.asp accessed date 25/08/2014.
Subscribe to:
Posts (Atom)
Mounting USB drives in Windows Subsystem for Linux
Windows Subsystem for Linux can use (mount): SD card USB drives CD drives (CDFS) Network drives UNC paths Local storage / drives Drives form...
-
Windows Subsystem for Linux can use (mount): SD card USB drives CD drives (CDFS) Network drives UNC paths Local storage / drives Drives form...
-
1. Judging chocolate cookies [1] 2. Judging group work [2] 2.1 Features of a good rubric Clearly worded and easy to understand fr...


