Wednesday 30 November 2011

Introduction to basic features in Ms. Word 2007

UFS103 PC COMPETENCY - SEPT2011
Member:

1. How to do paragraph setting (JOKER1 23-20110912345)

2. How to set page margin (JOKER2 23-20110912346)

3. How to insert WordArt   (JOKER3 23-20110912347) 
      
4. How to insert Watermark (JOKER4 23-20110912348)

5. How to check Spelling & Grammar (JOKER5 23-20110912349)

Tuesday 29 November 2011

Designing programs with flowchart (2)

You are required to design a flowchart for all programs below:-

Question 1
Design a flowchart for a program that accepts integer arguments and determines whether the passing integer is odd or even. (if-else)

Question 2 
Design a flowchart for a program that print the multiplication table for any number. (for loop)
eg:
What number? 2
2 x 1 = 2
2 x 2 = 4
2 x 3 = 6
2 x 4 = 8
2 x 5 = 10
2 x 6 = 12
2 x 7 = 14
2 x 8 = 16
2 x 9 = 18
2 x 10 = 20
2 x 11 = 22
2 x 12 = 24

Question 3
You are required to design a flowchart for a program to calculate your utility bill. The payment is based on the following table: (nested if-else)


The numbers of units are calculated based on the current meter reading and the previous meter reading. The bill also includes a fixed charge, which is RM35.00.

Example:
If the previous reading is 2300 and the current reading is 2800, then the payment is RM161.00.
Output: 


P/S: Your flowchart should be handwritten, 1 page for each question.
Deadline: 2nd December 2011,  before 12pm

Tuesday 22 November 2011

EDE124/201109 - FINAL PROJECT

Grading Rubric









Folio (Total 16 marks)
Chapter 1 : Introduction
Chapter 2 : System Overview
Chapter 3 : Goals and guidelines
Chapter 4 : Methodology
                 - Methods & techniques
                 - Flowchart
                 - Milestones, e.g:
                
Chapter 5 : Results
Chapter 6 : Discussion
                 - General constraints
                 - Successful results
Chapter 7 : Conclusion
                 - Future works


Poster (8 marks)

Monday 21 November 2011

UFS103 - FINAL PROJECT SCORE-SHEET

EDE124/201109 - PLANNER

EDE124 - ENGINEERING DESIGN & SIMULATION
Classcode: 23-201109D060024
Credit hours : 3


Following are your assessments evaluation:-

BASIC
Lab 1- Introduction (27 Sept 2011)
Lab 2- MATLAB Fundamentals : 10% (4 Oct 2011)
Lab 3- MATLAB-SIMULINK Fundamentals : 10% (11 Oct 2011)
Lab 4- Time and Frequency Responses of the DC motor (18 Oct 2011)

INTERMEDIATE
Lab 5- Vectors and Matrices in MATLAB : 10% (25 Oct 2011)
Lab 6- For Loops, While Loops and Conditional Statements : 10% (15 Nov 2011)
Lab 7- M-Files, Creating your own scripts and functions (22 Nov 2011)
Lab 8- Subroutines and Data Files in MATLAB (22Nov 2011)

DESIGN & APPLICATIONS
Lab 9- Detecting cars in a video of traffic : 20% (29 Nov 2011)

Final Project : 40%

Others:
Click here for your assignment format.
Click here for your Final Project format.

Sunday 20 November 2011

UFS103/201111 - PLANNER

UFS103 - PC COMPETENCY
Credit hours : 3

Group A
Classcode: 23-201111D040001
Day/Time: Monday (9-1pm)

Group B
Classcode: 23-201111D040002
Day/Time: Monday (2-6pm)

Click here for you Final Project score-sheet.

Lesson Plan:-

WEEK
DATE
COMPONENTS
ASSESSMENTS
MARKS
Week 7
14/11/2011
Introduction



Week 8
21/11/2011
Ms.Word
Assignment 1,2
20%
Week 10
05/12/2011
Ms.Excel
Assignment 3,4
20%
Week 11
12/12/2011
Ms.Excel
Assignment 5
20%
Week 12
19/12/2011
Ms.PowerPoint



Week 13
26/12/2011
Ms.PowerPoint



Week 14
02/01/2012
Presentation
Final Project
40%























TOTAL
100%

Thursday 27 October 2011

cin.get() not pausing??

As I wrote in one of my post - why you should use cin.get() when you test a program (apply to IDE that wont wait as you test a code and as soon as the code finished the window closes, leaving you without a glance on the result =p).

Let's look at this example:
#include <iostream>
using namespace std;
main()
{
    for(int x=0;x<20;x++)
    {
            cout<<x<<endl;
    }
    cin.get();
}

But sometimes, cin.get() might refuses to work, as in this example here:-
#include <iostream.h>
    main()
    {
        int hours, minutes, seconds;
       
        cout <<"Input hours: ";
        cin  >> hours;
        cout <<"Input minutes: ";
        cin  >> minutes;
       
        seconds=hours*3600+minutes*60;

        cout << "Time in seconds : "<<seconds<<endl; 
        cin.get();
        return 0; 
      }

The window closes taking all the data with it, and you not even get a chance to see the result.

What happen here actually? 
Why cin.get() works in the first example but not in the second?
In the second example, after the program read the value using cin, a \n is left in the buffer. Thus the cin.get() that you meant for pausing consumes that \n.

What you can do??
You may use two cin.get(). Which the first call to cin.get() is used to consumes that \n left in the buffer and the second cin.get() to pause your windows from closing.

Or, you may flush the \n from the buffer by using cin.ignore()

#include <iostream.h>
    main()
    {
        int hours, minutes, seconds;
       
        cout <<"Input hours: ";
        cin  >> hours;
        cout <<"Input minutes: ";
        cin  >> minutes;
       
        seconds=hours*3600+minutes*60;

        cout << "Time in seconds : "<<seconds<<endl; 
        cin.ignore();
        cin.get();
        return 0; 
      }

Why you should avoid system("pause") in C++

In windows, the system() function is used to execute any operating system command, like dir, ls, rename, etc. However, it is not encourage to use system("pause") to pause command windows from closing in C++. There are two main reasons why:-
  1. A call to system("pause") will pause the programs execution and make a system call and thus allocate unnecessary resources.
  2. Another reason it should be avoided is because it isn't portable. It works only on systems that have the PAUSE command at the system level, like DOS or Windows.
system("pause") is pretty popular and usually introduced to new beginners. It provides a clean and perfect pausing action. Also commonly used in debugging.

That means, when you do system("pause"), it does: Press any key to continue...

Just ANY key on your keyboard! Even an arrow or a space bar will do. 

Unlike cin.get(), it didn't show anything, or what you suppose to press to exit. Until you figure it out, you probably hit almost every key on your keyboard, and finally accidentally hit on the RETURN key. 

Of coz, both code: system("pause") and cin.get() does the same job, but quoting from a friend, using system("pause") is like using a bulldozer to open your front door. It works, but you can open your front door in an easy way, do you? So, why would you want to waste the unnecessary resources?

In spite of all the bad things most programmer would said about system("pause"), and how you shouldn't mix an operating system command with a C++ programming code, I reckon system("pause") is introduced to new beginner to make their life easier in learning  and exploring programming language. Just like how we were taught that gravity is equal to 10 when we were in primary school, and then few years later they told us that actually we should calculate gravity as 9.81.You wouldn't tell a little boy that he should calculate gravity as 9.81 while he is still struggling with multiplication involving decimal, would you??

So, it's your call if you wanna be a beginner and stay as a beginner, or evolve and be a professional =)

Friday 21 October 2011

UFS103/201109 - PLANNER

UFS103 - PC COMPETENCY
Credit hours : 3

Classcode: 23-201108D270029
Group A - Tuesday (9-1pm) 
Assignment 1  : 10% (20 Sept 2011)
Assignment 2  : 10% (4 Oct 2011)
Assignment 3  : 10% (11 Oct 2011)
Assignment 4  : 10% (18 Oct 2011)
Assignment 5  : 20% (25 Oct 2011)
Final Project   : 40% (23 Nov - 14 Dec 2011)

Classcode: 23-201108D270035
Group B - Wednesday (2-6pm)
Assignment 1 : 10% (21 Sept 2011)
Assignment 2 : 10% (5 Oct 2011)
Assignment 3 : 10% (12 Oct 2011)
Assignment 4 : 10% (19 Oct 2011)
Assignment 5 : 20% (9 Nov 2011)
Final Project : 40% (23 Nov - 14 Dec 2011)

Click here for your Final Project score-sheet.

Wednesday 19 October 2011

EDS105/201109 - PLANNER

EDS105 - FUNDAMENTAL OF PROGRAMMING
Classcode: 23-201109D060026
Credit hours : 3

Following are your assessments evaluation:
Assignment 1 (Quiz) : 10% (5 October 2011)
Assignment 2 (Lab 1,2) : 10% (Deadline : 16 October 2011, before 11:59pm)
Assignment 3 (Lab 3,4) : 10% (Deadline : 22October 2011, before 11:59pm)
Assignment 4 (Lab 5,6,7) : 20% (Deadline : 12 December 2011, before 11:59am)
Midterm (Ch 1 - 5) : 10% (3 November 2011, 4-5.30pm)
Final exam : 40% 

Others:
Click here for your assignment format.

LESSON PLAN

Week 1
14/09/2011
Introduction
Week 2
21/09/2011
Chapter 1
Week 3
28/09/2011
Chapter 2
Week 4
05/10/2011
Chapter 3
Week 5
12/10/2011
Chapter 4
Week 6
19/10/2011
Chapter 5





MIDTERM
02/11/2011
Chapter 1-5
BREAK
09/11/2011






Week 7
16/11/2011
Chapter 6
Week 8
23/11/2011
Chapter 7
Week 9
30/11/2011
Chapter 8
Week 10
07/12/2011
Chapter 9
Week 11
14/12/2011
Summary: Presentation
Week 12
21/12/2011
Revision 1: Compiling
Week 13
28/12/2011



Revision 2
Week 14
10/01/2012
Tuesday
10:30-12:30pm
Library
15ActiveStudents

Final Exam

Tuesday 18 October 2011

MinGW - Getting Started

What is MinGw??
MinGW (Minimalist GNU for Windows), formerly mingw32, is a native software port of the GNU Compiler Collection (GCC) and GNU Binutils for use in the development of native Microsoft Windows applications; 

MinGW can function either as a cross compiler targeting Windows or as a native toolchain run on Windows itself. It is deployed along with a set of freely distributable import libraries and header files for the Windows API.

Source : Wikipedia


First you have to be familiar with basic DOS command. Go here for basic cmd.
Before continue, make sure you have installed MinGW.


Open up an elevated command prompt window and set the current directory to where your *.cpp file is.

Example:
For the file calculator.cpp in the folder C:\doc, change your directory using the following command:

cd c:\doc

This is the compile command:

g++ calculator.cpp -o calculator.exe

The -o switch defines the name of the output file.
Now you can run your program by typing the name of the executable file:

calculator.exe


Monday 17 October 2011

Change the Title Tags in Blogger

  1. Go to Design>edit HTML in your Blogger dashboard.
  2. Search for tag: <title><data:blog.pageTitle/></title>
  3. Replace the tag with the following code:
  4. <b:if cond='data:blog.pageType == &quot;index&quot;'> <title><data:blog.title/></title> <b:else/> <title><data:blog.pageName/> | <data:blog.title/></title> </b:if>
  5. Save your new template.
  6. View your blog. You should see the results in your web browser as shown below.







Wednesday 12 October 2011

C++ in Bloodshed tips & shortcuts

In Bloodshed
To compile: ctrl + F9
To run: ctrl + F10
To compile & run: F9

To get your command prompt screen to stay open..
cin.get();
Click here for More about cin.get ();

system("pause");
Click here for Why you should avoid system("pause")

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

As you are trying to test several small scripts (that related to each other) ,some ppl tend to open new source file (ctrl+N) for every small scripts. Here is something you can try, run and test all the small scripts under one source file and isolate each scripts by using the block comment.


MATLAB SIMULINK tips & shortcut

Connecting blocks:
  1. Right-click on signal and drag to create several connections emerging from same block
  2. Left-click and drag to reroute lines
  3. Shift-left-click to create breakpoint
  4. Left-click on breakpoint to move breakpoint
  5. Alt+Ctrl+left-click to connect 2 blocks
Viewing model:
  1. Hot key r to zoom in
  2. Hot key v to zoom out
  3. Spacebar to see whole model in window

Basic DOS command tricks

Basically these are just simple cmd.exe commands for beginner to get started. Actually most people don't even know what is cmd and as soon as you open it, they're like 'oh no! what's this?? where is the icon, color and everything??' (the GUI stuff). But once you get used to the environment, you will find it useful especially when your computer get stuck with the heavy-beautifully-designed-colourful-GUI at the back =p


1. To open cmd
win+R > cmd


2. Manipulating directory

To change directory. (If you are unsure on the exact spelling of a folder, press TAB and use the up and down arrows to scroll through the folders that finish what you started typing.
cd c:\doc


To go up 1 level
cd ..


To list all of the directories
dir


3. New look for your cmd
Sometimes you may want to impress your girlfriend. How about a different look of cmd from everyone else??

C:\Users\angelKeshet>color y

C:\Users\angelKeshet>color 0a

Check on the list of color listed. The first number represents the background color, and the second character represents text color. Now you can play as Keanu Reeves in the The Matrix =p


4. ping
This is a famous command that allow you to check if the host you pinging is 'alive'. A simple check of your internet connection.
C:\Users\angelKeshet>ping google.ca

5. ipconfig
This command will show your IP address, gateway, DNS in use etc.
C:\Users\angelKeshet>ipconfig

6. Others
Clear screen

cls

To quit cmd
exit





Assignment format

Pls use the given format here for your assignment submission

Monday 26 September 2011

MS. Word - Assignment 1

Here is a guide to assist students in completing MS. Word - Assignment 1

Step 1: Adding border
On "page border" tab:
4--> Setting : Box
6--> Color : Green
7--> Width : 1 1/2pt
8--> Apply to : This section - First page only



















Step 2: Insert header & footer
1--> Insert tab
2--> Click on Header
3--> Choose Blank Header

With Design tab active:-
4--> Tick on Different first page
5--> Tick on Show document text
6--> Header from top  : 0.5"
        Footer from bottom : 0.5"

8--> Click Page number
9--> Choose Bottom of page
10--> Choose Plain Number 1 




















Step 3: Insert Word Art
1--> Insert tab
2--> Click on Word Art
4--> Font : Monotype Corsiva
5--> Size : 48
7--> Click OK













 

Step 4: Insert text box
1--> Insert tab
2--> Click on Text Box
3--> Choose Cubicles Sidebar
        With text box active, go to Format tab and set the Shadows Effect accordingly.

Saturday 24 September 2011

Create a blog - A step by step guide for beginners (2)

Now, let's try our first posting

Step 1: Type the following: (* In the text editor, you may use the 'numbered list' function on the top)
Title: 1st Assignment: Things I like to do
Things I like to do:
  1. Sleeping
  2. Reading
  3. Dreaming
















Step 2: Now, let's try insert an image. Click on the "insert image" button, and browse your desired image and click "Add selected"














Step 3: Click on the "preview" button to preview your blog. This will open a new tab for your preview. You can just close this page when you are done, and go back to your previous page.















Step 4: After editing and correction whatever that's necessary, you can publish your post by clicking the "publish" button.

Create a blog - A step by step guide for beginners (1)

This is a very simple tutorial in creating a blog for a total beginner. In this tutorial we gonna create a blog in blogger.com

Step 1: Go to this link here and click on get started.















Step 2: Fill in your details.
If you don't have an account yet, you may opt for a new gmail account here.



























Step 3: Next you have to name your blog. Your blog title will be appeared at your window's title. Don't worry, you still can change your blog title and address later.















Step 4: Choose your template and click continue.


















Voila! Now you have created your blog, so let's start posting








Click here to start posting~

Friday 23 September 2011