Posts

Showing posts from 2014

Time-table for online examination

time-table for phase exams

Rules for writing an algorithm

Qualities of a good algorithm Inputs and outputs should be defined precisely. Each steps in algorithm should be clear and unambiguous. Algorithm should be most effective among many different ways to solve a problem. An algorithm shouldn't have computer code. Instead, the algorithm should be written in such a way that, it can be used in similar programming languages. Write an algorithm to add two numbers entered by user. Step 1 : Start Step 2 : Declare variables num1 , num2 and sum . Step 3 : Read values num1 and num2 . Step 4 : Add num1 and num2 and assign the result to sum . sum ← num1 + num2 Step 5 : Display sum Step 6 : Stop  

Rules for drawing a FLOWCHART

Image
Terminator All flowcharts start and end with the terminator or terminal shape. This is a rounded rectangle and is shown below. You use this same shape for both the start and the end. You will see some charts with slightly different terminal shapes. For example, sometimes an oval is used. This is because there is no golden standard for flowcharting. Different companies and different technical areas use different shapes. There are a few basic rules and, beyond that, you can create your own rules for your organization. If you add your own shapes, it is important that you explain what they are used for, so others can understand your chart. Just click on the terminator shape in the stencil and then type in the text.   To read a flowchart, you follow the arrows from shape to shape. To draw a line in RFFlow, click on the line in the stencil at the left and then drag the mouse to draw the line in your chart. It is faster to place all your shapes first and then

MA: (hello world alike) 64-bit

section .data:     input:db'Parashar',10     inputLen: equ $-input section .text     global _start     _start:         mov rax,1     mov rdi,1     mov rsi,input     mov rdx,inputLen     syscall     mov rax,60                ; The system call for exit (sys_exit)      mov rbx,0                ; Exit with return code of 0 (no error)      syscall   [apcoer@localhost ~]$ nasm -f elf64 parashar.asm [apcoer@localhost ~]$ ld -o parashar parashar.o [apcoer@localhost ~]$ ./parashar Parashar

MA: hello world(32 bit)

section .data     hello:db'Hello World',10     hellolen:equ $-hello section .text     global _start     _start:     mov eax,4;     mov ebx,1;     mov ecx,hello     mov edx,hellolen;     int 80h     mov     ebx,0               ;first syscall argument: exit code        mov     eax,1               ;system call number (sys_exit)         int     80h                ;call kernel [apcoer@localhost ~]$ nasm -f elf64 hellwrld.asm [apcoer@localhost ~]$ ld -o hellwrld hellwrld.o [apcoer@localhost ~]$ ./hellwrld Hello World

MA: addition of 2 numbers

section .data     input:db 'enter the number',10   ;        inputLen:  equ $-input           ;                                   ;     display:db 'entered number is:',10   ;        displayLen:  equ $-display       ;     addition:db 'addtion of number is',10;     additionLen: equ $-addition;                                   ; section .bss a resb 3   b resb 3 r resb 3 section .text     global _start _start:     mov rax,1         ;string:enter number     mov rdi,1            ;file discriptor     mov rsi,input        ;input     mov rdx,inputLen     ;lenght of input                          ;     syscall              ; Call the kernel        mov rax,0         ;input     mov rdi,0            ;standard input     mov rsi,a       ;     mov rdx,2          ;read only first two number                          ;     syscall              ;Call the kernel........               mov rax,1         ;string2     mov rdi,1            ;  

OSA: Lower case to upper case conversion and vice-versa

while(true) do echo " MENU ______________________________________________________________________________ 1)Create a file and write into it 2)Convert Lower to Upper case 3)Convert Upper to Lower case 4)open file 5)Exit" read choice case $choice in 1) echo " Create and Write ------------------------------------------------------------------------------ Enter the name of file to be created ->" read filename if [ -f $filename ]; then echo "filename $filename already exists,please try another filename" else touch $filename chmod 777 $filename # echo "Enter the data to be written into the file ->" # read data # cat>$filename fi ;; 2) echo " Convert from Lower to Upper ------------------------------------------------------------------------------ Loading and translating Existing file :- $filename " tr '[a-z]' '[A-Z]' <$filename ;; 3) echo "

OSA: Display O.S. name,login name,host-name

while(true) do echo " MENU ------------------------------------------------------------------------------ 1)Print O.S. name 2)Dispaly login name 3)Display host name 4)Exit Please enter your choice -> " read choice case $choice in 1) echo "OS name -> " uname    echo "OS version -> " cat /proc/version ;; 2) echo "Login name -> " whoami ;; 3) echo "Host name -> " hostname ;; 4) echo "program will be terminated " exit 0 ;; esac done

OSA: Process mangement

while(true) do echo " MENU ------------------------------------------------------------------------------ 1)Display current shell 2)Display information of processes 3)Display global priority of processes 4)Change a priority of a process 5)Exit Enter your choice -> " read choice case $choice in 1) echo " displaying current shell ------------------------------------------------------------------------------ " ps ;; 2) echo " Information of processes ------------------------------------------------------------------------------ " ps -al ;; 3) echo " Display global priority of processes ------------------------------------------------------------------------------ " ps -ecl ;; 4) echo " Change priority ------------------------------------------------------------------------------ " ps -ecl echo "Enter process ID" read PID echo "Enter new priority valu

OSA: Directory- create,delete,display PWD and change directory

while(true) do echo " MENU ------------------------------------------------------------------------------ 1)Make a new directory 2)Delete a directory 3)Display current working directory 4)Change directory" read choice case $choice in 1) echo " New directory ============================================================================== Enter name of directory to be created ->" read name if [ -d $name ]; then echo "directory already exists, please try another name" else mkdir $name echo "directory has been created successfully" fi ;; 2) ls echo " Delete directory ============================================================================== Enter the name of directory to be deleted ->" read dname if [ -d $dname ]; then rmdir $dname echo "directory has been deleted  " else echo "invalid name, please try a valid directory name" fi ;; 3) ech

OSA: User- add,delete,change access permissions for a file

while(true) do echo " MENU ------------------------------------------------------------------------------ 1)Super User 2)Add user 3)Delete user 4)Change access permissions 5)Exit" read choice case $choice in 1) echo "act as super user inorder to add user ==============================================================================" su sh 3.sh s ;; 2) echo " add user ============================================================================== Enter the User name -> " read name useradd $name echo "User added successfully" ;; 3) echo " Delete user ============================================================================== Enter the name of user to be deleted -> " read username userdel userdel $username echo "the user has been deleted" ;; 4) echo " change access permissions ==============================================================

OSA: File management (Create,rename,delete and list the file's in present working directory)

while(true) do echo  " Enter operation you want to perform ------------------------------------------------------------------------------ 1)Create a File 2)Rename a File 3)Delete a File 4)List File's " echo "enter your choice->" read choice case $choice in 1) echo "Enter the name of file to be created" read filename if [ -f $filename ]; then echo "file already exists,please try another name" else touch $filename echo "file has been created successfully" fi # ;; 2) echo "Enter the name of File to be renamed " read oldfilename if [ -f $oldfilename ]; then echo "enter the new file name to be assigned " read newfilename mv $oldfilename $newfilename else echo "file doesn't exist please try an existing filename" ls fi # ;; 3) echo "Enter name of File to be deleted " read name if [ -f $name ]; then rm -f $name echo "file ha

This is exactly what i was expecting!!

Image
!hope i don't get this kinda output during EXTERNALS!

OSA: [Grp C-1] CPU MANUFACTURER INFO

while(true) do echo "CPU INFORMATION       1.CPU CORES AND THREADS       2.CPU MANUFACTURER       3.EXIT" read a; case $a in 1)echo "CPU INFORMATION.." dmidecode -t processor ;; 2)echo "CPU MANUFACTURER.." dmidecode -s processor-manufacturer    ;; 3)echo "stopped...."   exit 0 ;; esac; done

OSA:[Grp B-15] CONVERT FILE INFO INTO LOWER/UPPER CASE

while true do echo "1.Create files :"; echo "2.To Upper :"; echo "3.To Lower"; echo "4.Exit"; echo "Enter your choice : "; read ch; case $ch in 1) echo "Please enter File1 name : "; read dirr; touch $dirr.txt chmod 777 $dirr.txt echo "Open and write into $dirr.txt file manually" ;; 2) echo "Upper Case is: "; tr '[a-z]' '[A-Z]' < $dirr.txt #tr '[:lower:]' '[:upper:]' < $dirr.txt ;; 3) echo "Lower Case is: "; tr '[A-Z]' '[a-z]' < $dirr.txt #tr '[:upper:]' '[:lower:]' < $dirr.txt ;; 4) exit 0; ;; esac done #OUTPUT [root@localhost apcoer]# sh upper.sh 1.Create files : 2.To Upper : 3.To Lower 4.Exit Enter your choice : 1 Please enter File1 name : roro Open and write into roro.txt file manually 1.Create files : 2.To Upper : 3.To Lower 4.Exit Enter your choice : 2 Uppe

OSA:[GRP A-5] PROCESS INFO

while (true) do echo "enter your choice     1.current shell     2. process information     3.global priority     4.change priority of process     5. exit"; read a; case $a in 1)echo"current shell"; read b; ps b; ;; 2)echo" process information"; read c; ps -f $c; ;; 3)echo"global priority"; read d; ps -ao tty nice $d; ;; 4)echo"change priority of process"; read e; ps -f $e; echo"which want to change priority of process"; read f; echo"enter parent id"; read g; renice $f$g; ;; 5)exit 0 ;; esac; done

OSA: ADD & DELETE USER

while (true) do echo "enter your choice      1. add user      2. delete user      3.exit"; read a; case $a in     1) echo"enter user name to be add:";  read c;  useradd $c; ;;    2)echo"enter user name to be delete:";  read b;  userdel $b;  echo"device delete successfully"; read d; ;;   3)exit 0 ;; esac; done

OSA: MOUNT & UNMOUNT

while(true) do echo    "  MENU ------------------------------------------------------------------------------         1)Display mounted devices 2)Mount a device 3)Unmount a device 4)See physical name and instance number 5)Exit" read choice case $choice in 1) echo "Mounted devices are -> " mount ;; 2) echo " MOUNT ------------------------------------------------------------------------------- Enter the name of device -> " read name    echo "Enter the mount point -> " read point mount $name $point echo "the device has been mounted successfully" ;; 3) echo " Unmount ------------------------------------------------------------------------------- enter source of device ->" read devsource umount -f  $devsource echo "the device has been unmounted successfully" ;; 4) echo " Physical name and instance number --------------------------------------

Finally 1k PAGEVIEWS

Thank YOU guys for your support. I would like to Thank my partner HAMMERSTIEN for uploading his unique programs!

GENERAL:String

//============================================================================ // Name        : pi.cpp // Author      : Rohit More //============================================================================ #include <iostream> #include <string.h> using namespace std; int main() {     char * string2="C++ Programming With Parazhar";     int n = strlen(string2);     for(int i=1;i<n;i++)     {         cout.write(string2,i);         cout<<"\n";     }     for(int i=n;i>n;i++)     {         cout.write(string2,i);         cout<<"\n";     }     cout.write(string2,n);     cout<<"\n";     return 0; } /*  * OUTPUT  C C+ C++ C++ C++ P C++ Pr C++ Pro C++ Prog C++ Progr C++ Progra C++ Program C++ Programm C++ Programmi C++ Programmin C++ Programming C++ Programming C++ Programming W C++ Programming Wi C++ Programming Wit C++ Programming With C++ Programming With C++ Pr

GENERAL:Value of PI

//============================================================================ // Name        : pi.cpp // Author      : Rohit More //============================================================================ #include <iostream> using namespace std; int main() {     float pi=22.0/7.0;     int i;     cout<<"Val of pi:";     for(i=1;i<20;i++)     {         cout.width(i+1);         cout.precision(i);         cout<<pi<<"\n";     }     return 0; } /*  * OUTPUT  * Val of pi: 3 3.1 3.14 3.143 3.1429 3.14286 3.142857 3.1428571 3.14285707 3.142857075 3.1428570747 3.14285707474 3.142857074738 3.1428570747375 3.14285707473755 3.142857074737549 3.1428570747375488 3.14285707473754883 3.142857074737548828  *  */

University of Pune: Syllabus for SE computer Engineering

Syllabus(pdf)

DSPS: paper boy (dfs traversal_graph)

//============================================================================ // Name        : newpaper_boy.cpp // Author      : Parashar // Version     : // Copyright   : Do not try this at home // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostream> using namespace std; #define True 1 #define False 0 #define size 10 class graph { public:     int n,e;     int g[size][size],q[size];     int front,rear;     int visit[size]; int dist; public:     graph();     void create();     void dfs(int);     void visited(); }; graph::graph() {     front=rear=-1;     for(int v1=0;v1<size;v1++)     {         for(int v2=0;v2<size;v2++)         {             g[v1][v2]=g[v2][v1]=False;         }     } }     void graph::visited() {     for(int i=0;i<size;i++)         visit[i]=False;     dist=0; } void graph::create() {     int v1,v2,dist;     cout

DELD: 8:1 mux (IC 74151)

Image
 

Earthquake

Image
reference-wikipedia The following table lists the approximate energy equivalents in terms of TNT explosive force – though note that the earthquake energy is released underground rather than overground. [ 19 ] Most energy from an earthquake is not transmitted to and through the surface; instead, it dissipates into the crust and other subsurface structures. In contrast, a small atomic bomb blast (see nuclear weapon yield ) will not, it will simply cause light shaking of indoor items, since its energy is released above ground. 31.6227 to the power of 0 equals 1, 31.6227 to the power of 1 equals 31.6227 and 31.6227 to the power of 2 equals 1000. Therefore, an 8.0 on the Richter scale releases 31.6227 times more energy than a 7.0 and a 9.0 on the Richter scale releases 1000 times more energy than a 7.0. Thus, Approximate Magnitude Approximate TNT for Seismic Energy Yield Joule equivalent Example -0.2 7.5 g 31.5 kJ Energy released by lighting 30 typical mat