Saturday, May 28, 2016

How To Get a Good GPA

This is my 1st blog post after a long while.By this post I will tell you how to obtain a good GPA.Results of 1st year 1st semester Finals was released on 26th of May.As I expected I was able to obtain a good GPA.

DCCN CF ENG IPE MIT GPA
A- A A A+ A+ 3.94

Getting good marks for Mid term exam and for continuous assessments is important.Then you don't have to work really hard in the final exam.This really helped me to achieve this sought of result.Attend the lectures continuously and go through the lecture slides before hand.Getting a GPA of 4 is not that hard unless if you doesn't work.1st Year 1st semester is the easiest time to get the maximum GPA as the workload is minimum.if you really want a good result in IPE you have to practice them rather than byhearting all the codes.It won't make any sense.Also really focus on English as it will also get counted for GPA.There were few friends of mine who had got good results for other subjects but not for the English.That made their GPA lower than they expected.Finally what I want to say is that කරන එක හරියට කරපල්ලා.වරදින්නැ.:)





Sunday, April 17, 2016

PastPaper Answers For 1st Year 1st Semester(Final)

Year

Subject

2008 MIT
2009 IPE
MIT
CF
2010 IPE
MIT
CF
DCCN
2011 IPE
MIT
CF
DCCN
2012 IPE
MIT
CF
DCCN
2013 IPE
MIT
CF
DCCN
2014 IPE
MIT
CF
DCCN
2015 IPE
MIT
CF
DCCN
Note:Contributors aren't responsible for any mistakes in the answers as these are not actual marking schemes and do not get too attached and depend on given sample answers. Use them with your own risk.

Wednesday, March 2, 2016

Batch Programming

LEARN BATCH PROGRAMMING FOR FUN!

Step 1:

 So, what is Batch

For those who don't know, a Batch file is a text file containing a series of commands to be executed by Command Prompt (CMD). When a batch file is run, CMD reads the file and executes its commands.

To open your CMD, click START > RUN > type "CMD" > OK
(some of you may need to type "CMD.EXE")
(or you can click START > ALL PROGRAMS > ACCESSORIES > COMMAND PROMPT).

Step 2:
These are some VERY basic commands you need to know:
(please try out some of these commands in your CMD).

@echo off - This gets rid of that "c:\documents...etc"

echo - This displays a message, (e.g "echo hello" = "hello") because if you type "hello" into CMD it will interpret "hello" as the command

cls - Clears the CMD of all text.

color - Changes the color (type "help color" for a list of colors).

goto - Goes to a particular word in your text (you will learn more later)

pause - Pauses the command prompt and displays the message: "Press any key to continue..."

More Lessons comming soon...



Tuesday, February 23, 2016

VIM editor useful shortcuts

Obviously, these little shortcuts will save your time.
Following shortcuts should be used in escape mode (After pressing  Esc).

Task Key
Create a new line above current line SHIFT + O
Create a new line below current line
Copy current line or selection SHIFT + Y
copy a line yy
Paste after cursor p
Paste before cursor SHIFT + P
Delete a line dd

Monday, February 22, 2016

Basic shapes in Ncurses

First of all I will give you a brief introduction about the Ncurses.
It is a special library in C++ where you need to get downloaded from internet.It is a GUI toolkit provided that the output is not given out from normal terminal(terminal independent).It provides functions to move the cursor, create windows, produce colors, play with mouse and provide several GUI features.Hope you'll search for more details :)

Color Codes
COLOR_BLACK           0
COLOR_RED                1
COLOR_GREEN          2
COLOR_YELLOW       3
COLOR_BLUE             4
COLOR_MAGENTA   5
COLOR_CYAN            6
COLOR_WHITE         7


1)
#include<ncurses.h>
Output
 int main(){
initscr();
start_color();
init_pair(1,3,4);
attrset(COLOR_PAIR(1));
int row=5,no=1;
for(int i=1;i<=5;i++){//i=no of rows
move(row,10);
for(int j=1;j<=no;j++){
//j=no of columns
printw("* ");
}
no+=2;
//each line increment by 2 *