Posts

Showing posts from August, 2014

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

OSA:System information c++

#include <iostream> #include <sys/utsname.h> using namespace std; int main(){ struct utsname sysinfo; uname(&sysinfo); cout << "System Name: "<<sysinfo.sysname<<endl; cout << "Host Name: "<<sysinfo.nodename<<endl; cout << "Release(Kernel) Version: "<<sysinfo.release<<endl; cout << "Kernel Build Timestamp: "<<sysinfo.version<<endl; cout << "Machine Arch: "<<sysinfo.machine<<endl; cout << "Domain Name: "<<sysinfo.domainname<<endl; return 0; }

OSA: System info shell program

while(true) do echo "CPU INFORMATION       1.CPU CORES AND THREADS       2.CPU MANUFACTURER       3.PROCESSOR FAMILY       4.PROCESSOR VERSION       5.PROCESSOR FREQUENCY       6.SYSTEM MANUFACTURER       7.BIOS VERSION       8.RAM INFO        9.EXIT" read a; case $a in 1)echo "CPU INFORMATION.." dmidecode -t processor ;; 2)echo "CPU MANUFACTURER.." dmidecode -s processor-manufacturer    ;; 3)echo "PROCESSOR FAMILY.." dmidecode -s processor-family ;; 4)echo "PROCESSOR VERSION.." dmidecode -s processor-version    ;; 5)echo "PROCESSOR FREQUENCY.." dmidecode -s  processor-frequency    ;; 6)echo "SYSTEM MANUFACTURER.." dmidecode -s  system-manufacturer ;; 7)echo "BIOS VERSION.." dmidecode -s bios-version ;; 8)echo "RAM INFO.." dmidecode -t memory ;; 9)echo "stopped...."   exit 0 ;; esac; done how to execute: 1.copy code and paste in gedit 2.sav

DSPS: Revised version of GRAPHS (BFS)

#include<iostream> using namespace std; #define size 10 #define true 1 #define false 0 class graph { public:     int g[size][size];     int visit[size],rear,front,q[size];     int n,e; public:     graph();     void getmatrix();     void displaygraph();     void bfs(int); }; graph::graph() {  for(int i=0;i<size;i++)      {          for(int j=0;j<size;j++)          {              g[i][j]=false;          }      }  for(int i=0;i<size;i++)      {      visit[i]=false;      } } void graph::getmatrix() {     int v1,v2;     cout<<"Enter no. of nodes:";     cin>>n;     cout<<"Enter no. of edges:";     cin>>e;     for(int i=0;i<e;i++)     {         cout<<"Enter edge in the form of V1 and V2:";         cin>>v1>>v2;         g[v1][v2]=g[v2][v1]=true;     }     cout<<"Entered Graph is"<<endl;     for(int k=0;k<n;k++)          {        

DELD: All experiments

http://www.sriengg.com/wp-content/uploads/2013/07/DIGITAL-LABMANUAL.pdf

Top 10 OS for hacking

1. BackTrack 5r3 : This is one of the most loved and best known Linux-based hacking distributions. Based on Canonical’s Ubuntu operating system, Backtrack’s logo says, “The quieter you become, the more you are able to hear.” With version 5, the GNOME desktop environment was added along with the usual KDE desktop environment. 2. Nodezero : This is another Ubuntu-based hacking, which is used for penetration testing. Every time you get a patch for bugs in the Ubuntu OS, Nodezero also gets updated. 3. BackBox Linux : This is yet another Ubuntu-based distro being used for hacking. According to the developers, the OS has been designed to create a penetration testing distro that is fast and easy to use. It also gets update with new ethical hacking tools regularly using repositories. 4. Blackbuntu : Ubuntu itself may not be a hacking distro, but there are plenty that are based on it. This distribution comes with categories such as Network Mapping, Information Gathering, Pen

OSA: linux commands(terminal)

An A-Z Index of the Bash command line for Linux. alias Create an alias • apropos Search Help manual pages (man -k) apt-get Search for and install software packages (Debian/Ubuntu) aptitude Search for and install software packages (Debian/Ubuntu) aspell Spell Checker awk Find and Replace text, database sort/validate/index b basename Strip directory and suffix from filenames bash GNU Bourne-Again SHell bc Arbitrary precision calculator language bg Send to background break Exit from a loop • builtin Run a shell builtin bzip2 Compress or decompress named file(s) c cal Display a calendar case Conditionally perform a command cat Concatenate and print (display) the content of files cd Change Directory cfdisk Partition table manipulator for Linux chgrp Change group ownership chmod Change access permissions chown Change file owner and group chroot Run a comm

DSPS: Shopping mall

//============================================================================ // Name        : queue.cpp // Author      : Parashar // Version     : Final // Copyright   : Do not try this at home // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostream> #include<string.h> using namespace std; #define size 5 class fruit { public:     char name[10];     int count;     int price; }; class vegetables { public:     char name[10];     int count;     int price; }; class QUEUE {     fruit F[size];     vegetables V[size];     int ffront,frear,vfront,vrear; public:     QUEUE();     void finsert();     void fdisplay();     int fqfull();     int fqempty();     void vinsert();     void vdisplay();     int vqfull();     int vqempty(); }; QUEUE::QUEUE() {     ffront=frear=vfront=vrear=-1; } int QUEUE::fqfull() {     if(frear>=size-1)         return

DSPS: CDLL (final update with output)

//============================================================================ // Name        : cdll.cpp // Author      : Parashar // Version     : // Copyright   : Do not try this at home ;P // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostream> using namespace std; class cdll     {       public:            struct node              {                int data;                struct node *next,*prev;              }*head;       public:            void create();            void display();            void addbeg();            void addafter();            void del();            cdll();     }; cdll::cdll()        {         head=NULL;        } void cdll::create() {     char ans='y';     struct node *temp,*p;         do{            p=new node;            p->next=p->prev=NULL;            cout<<"Enter data"<<endl;            cin>>p->data;            if(hea

DSPS: Vegetable_vendor

//============================================================================ // Name        : p_queue.cpp // Author      : Parashar // Version     : // Copyright   : Do not try this at home ;P // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostream> #include<string.h> using namespace std; #define size 5 class fruit { public:     char name[10];     int count;     int price; }; class vegetables { public:     char name[10];     int count;     int price; }; class QUEUE {     fruit F[size];     vegetables V[size];     int ffront,frear,vfront,vrear; public:     QUEUE();     void finsert();     void fdisplay();     int fqfull();     int fqempty();     void vinsert();     void vdisplay();     int vqfull();     int vqempty(); }; QUEUE::QUEUE() {     ffront=frear=vfront=vrear=-1; } int QUEUE::fqfull() {     if(frear>=size-1)         return