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 *

Sunday, February 14, 2016

AM and FM (Additional information for DCCN)

As you know, we have to do additional readings for DCCN (Data Communication and Computer Networks) modules. This video will help you to understand how AM (Amplitude Modulation) and FM (Frequency Modulation) works. This is quite old video created by USA army, but really useful and simple one.