This document contains a practical record file for programming language C++ and database SQL presented by a student. It includes 46 topics covering various C++ programs like array operations, searching and sorting algorithms, structure implementation, stack and queue implementation using arrays and linked lists. It also covers SQL topics like creating database and tables, inserting and selecting data, using where and order by clauses, updating and deleting records. Each topic is given a page number for easy reference in the index section.
Practical Class 12th (c++programs+sql queries and output) Aman Deep
Just download this and do some specific changes in the name section and roll no section . and submit it as it is to your teacher this will surely work and help you out your class 12th board practicals exam . no worries ! ENJOY :) !
Practical Class 12th (c++programs+sql queries and output) Aman Deep
Just download this and do some specific changes in the name section and roll no section . and submit it as it is to your teacher this will surely work and help you out your class 12th board practicals exam . no worries ! ENJOY :) !
Constructors, Destructors, call in parameterized Constructor, Multiple constructor in a class, Explicit/implicit call, Copy constructor, Dynamic Constructors and call in parameterized Constructor
Building Real Time Systems on MongoDB Using the Oplog at StripeMongoDB
MongoDB's oplog is possibly its most underrated feature. The oplog is vital as the basis on which replication is built, but its value doesn't stop there. Unlike the MySQL binlog, which is poorly documented and not directly exposed to MySQL clients, the oplog is a well-documented, structured format for changes that is query-able through the same mechanisms as your data. This allows many types of powerful, application-driven streaming or transformation. At Stripe, we've used the MongoDB oplog to create PostgresSQL, HBase, and ElasticSearch mirrors of our data. We've built a simple real-time trigger mechanism for detecting new data. And we've even used it to recover data. In this talk, we'll show you how we use the MongoDB oplog, and how you can build powerful reactive streaming data applications on top of it.
This is presentation, that covers all the important topics related to strings in python. It covers storing, slicing, format, concatenation, modification, escape characters and string methods.
The file attatched also includes examples related to the slides shown.
A namespace is a declarative region that provides a scope to the identifiers (the names of types, functions, variables, etc) inside it. It is used to organize code into logical groups and to prevent name collisions that can occur especially when our code base includes multiple libraries. Namespace provides a class-like modularization without class-like semantics
Constructors, Destructors, call in parameterized Constructor, Multiple constructor in a class, Explicit/implicit call, Copy constructor, Dynamic Constructors and call in parameterized Constructor
Building Real Time Systems on MongoDB Using the Oplog at StripeMongoDB
MongoDB's oplog is possibly its most underrated feature. The oplog is vital as the basis on which replication is built, but its value doesn't stop there. Unlike the MySQL binlog, which is poorly documented and not directly exposed to MySQL clients, the oplog is a well-documented, structured format for changes that is query-able through the same mechanisms as your data. This allows many types of powerful, application-driven streaming or transformation. At Stripe, we've used the MongoDB oplog to create PostgresSQL, HBase, and ElasticSearch mirrors of our data. We've built a simple real-time trigger mechanism for detecting new data. And we've even used it to recover data. In this talk, we'll show you how we use the MongoDB oplog, and how you can build powerful reactive streaming data applications on top of it.
This is presentation, that covers all the important topics related to strings in python. It covers storing, slicing, format, concatenation, modification, escape characters and string methods.
The file attatched also includes examples related to the slides shown.
A namespace is a declarative region that provides a scope to the identifiers (the names of types, functions, variables, etc) inside it. It is used to organize code into logical groups and to prevent name collisions that can occur especially when our code base includes multiple libraries. Namespace provides a class-like modularization without class-like semantics
A tour of Python: slides from presentation given in 2012.
[Some slides are not properly rendered in SlideShare: the original is still available at http://www.aleksa.org/2015/04/python-presentation_7.html.]
Refer to my progress on this assignment belowIn this problem you w.pdfarishmarketing21
Refer to my progress on this assignment below
In this problem you will make it “more” object-oriented in the following ways:
-You will change its name to SortedList
-You will change the constructor that takes no arguments to be more traditional and initialize the
member fields to dummy values.
-You will add a constructor that takes in an initialized array and a size
-You will add an insert function that adds a value to the list and maintains its sorted-ness
-You will add a quicksort function check the below code.
-You will make updates as necessary to the main function so that it still runs and tests your code.
The code below seems to sort correctly but it skips over some items in the array and I am not
sure what is happening. Please help! Thanks!
import java.util.Scanner;
class SortedList
{
private static int array[];
private static int n;
public SortedList()
{
Scanner in = new Scanner(System.in);
System.out.println(\"Enter number of elements\");
n = in.nextInt();
array = new int[n];
if(n == 0) {
System.out.print(\"Since no arguments array set to: \");
} else {
System.out.print(\"Creating array size \" + n + \": \");
}
for(int i = 0; i < n; i++)
{
array[i] = 0;
}
//System.out.println(\"Enter \" + n + \" integers in ascending order\");
/*for (c = 0; c < n; c++)
array[c] = in.nextInt();*/
for(int i = 0; i < n; i++)
{
System.out.print(array[i] + \" \");
}
System.out.print(\"\ \");
}
public SortedList(int a[], int size)
{
array = a;
n = size;
}
public int binsearch(int search)
{
int first, last, middle;
first = 0;
last = n - 1;
middle = (first + last)/2;
while( first <= last )
{
if ( array[middle] < search )
first = middle + 1;
else if ( array[middle] == search )
{
//System.out.println(search + \" found at location \" + (middle + 1) + \".\");
return middle+1;//+1 for the non-CS people who don\'t start counting at zero.
}
else
last = middle - 1;
middle = (first + last)/2;
}
return -1;
//System.out.println(search + \" is not present in the list.\ \");
}
public static int partition(int input[], int p, int r)
{
int pivot = input[r];
while(p < r)
{
while(input[p] < pivot)
{
p++;
}
while(input[r] > pivot)
{
r--;
}
if(input[p] == input[r])
{
p++;
}
else if(p < r)
{
int tmp = input[p];
input[p] = input[r];
input[r] = tmp;
}
}
return r;
}
public static void quicksort(int input[], int p, int r)
{
if(p < r)
{
int j = partition(input, p, r);
quicksort(input, p, j-1);
quicksort(input, j+1, r);
}
}
public static void insert(int value, int cell)
{
array[cell] = value;
quicksort(array, 0, n-1);
}
public static void main(String args[])
{
int c;
Scanner in = new Scanner(System.in);
SortedList b = new SortedList();
System.out.println(\"Input numbers\");
for(int i = 0; i < n; i++)
{
c = in.nextInt();
in.nextLine();
insert(c, i);
}
in.close();
for(int j = 0; j < n; j++)
{
System.out.print(array[j] + \", \");
}
}
}
Solution
//the whole program that you wrote is correct except one line , when you call the quicksort
everytime you insert a //value dont pass n pass the i.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
3. 3
INDEX
Sr No TOPIC Page No
1. Deletion In Array 3-5
2. Insertion In Array 6-9
3. Merging In Array 10-13
4. Binary Search 14-16
5. Linear Search 17-18
6. Selection Sort 19-21
7. Bubble Sort 22-24
8. Insertion Sort 25-27
9. Array Of Structure 28-30
10. Implementing Stacks Using Array 31-34
11. Implementing Queues Using Array 35-38
12. Implementing Stacks Using Linked Lists 39-44
13. Implementing Queues Using Linked Lists 45-50
14. To Write In A Text File 51-51
15. Data File Handling Using Classes 52-55
16. To find The Size Of A File 56-57
17. Copy Contents Of File To Another File 58-59
18. To Count Number Of Characters 60-61
19. To Count Number Of Words 62-63
20. To Read From Text File And Display It 64-65
21. Implementing constructors 66-68
22. INSERTION IN THE END OF LIST 69-72
23 DELETION FROM THE BEGINNING OF THE LIST 73-76
24. INSERTION IN THE BEGINNING OF A LIST 77-79
25. Reversing String 80-81
26. Ticket Booking System 82-84
27. Area Calculation 85-87
4. 4
28. Pattern Based Program 88-89
29. Truth Table for XY+Z 90-91
30. Use of Class and Objects for storing Info 92-94
31. SQL 95
32. Creating Database 96
33. Creating Table 97
34. Inserting Elements into Table 98
35. Select all elements 99
36. To display selected attribute 100
37. To display distinct element of selected attribute 101
38. Using where clause 102
39. Using AND & OR 103
40. Using ORDER BY 104
41. Updating Table Attribute 105
42. Deleting a Record 106
43. Pattern Search 107
44. IN command 108
45. To Alter Table 109
46. View Command 110
6. 6
1.)Deletion In Array
#include<iostream.h>
#include<conio.h>
#include<process.h>
int lsearch(int[],int,int);
void main()
{
clrscr();
int a[50],n,index,x;
cout<<"enter the sizeof array(max50):";
cin>>n;
cout<<"enter elements of array:n";
for(inti=0;i<n;i++)
cin>>a[i];
cout<<"enter element to be deleted:";
cin>>x;
index=lsearch(a,n,x);
if(index==-1)
cout<<"element not found";
else
{
9. 9
2.)Insertion In Array
#include<conio.h>
#include<iostream.h>
#include<process.h>
int findpos(int[],int,int);
void main()
{
clrscr();
int ar[50],x,n,index;
cout<<"enter the number of elements in array:";
cin>>n;
cout<<"enter the elements of arrays:n";
for(inti=0;i<n;i++)
{
cin>>ar[i];
}
char ch='y';
while(ch=='y'||ch=='Y')
{
cout<<"nenter element to be inserted:";
cin>>x;
13. 13
3.)Merging In Array
#include<conio.h>
#include<iostream.h>
#include<process.h>
void merge(int [],int[],int,int);
void main()
{
clrscr();
int ar1[50],ar2[50],ar[100],x,n,m,index;
cout<<"enter the number of elements in array 1:";
cin>>n;
cout<<"enter the elements of arrays:n";
for(inti=0;i<n;i++)
{
cin>>ar1[i];
}
cout<<"elements of array 1 are: ";
for(i=0;i<n;i++)
{
cout<<ar1[i];
}
14. 14
cout<<endl;
cout<<"enter the number of elements in array 2:";
cin>>m;
cout<<"enter the elements of arrays:n";
for(i=0;i<m;i++)
{
cin>>ar2[i];
}
cout<<"elements of array 2 are: ";
for(i=0;i<m;i++)
{
cout<<ar2[i];
}
cout<<endl;
merge(ar1,ar2,n,m);
getch();
}
void merge(int a1[],inta2[],intx,int y)
{
int mrg[100];
for(inti=0;i<x+y;i++)
{
17. 17
4.)Binary Search
#include<iostream.h>
#include<conio.h>
int bsearch(int[],int,int);
void main()
{
clrscr();
int a[50],n,index,x;
cout<<"enter the sizeof array(max50):";
cin>>n;
cout<<"enter elements of array:n";
for(inti=0;i<n;i++)
cin>>a[i];
cout<<"enter element to be searched:";
cin>>x;
index=bsearch(a,n,x);
if(index==-1)
cout<<"element not found";
else
cout<<"element found at
index:"<<index<<",position:"<<index+1<<endl;
20. 20
5.)Linear Search
#include<iostream.h>
#include<conio.h>
int lsearch(int[],int,int);
void main()
{
clrscr();
int a[50],n,index,x;
cout<<"enter the sizeof array(max50):";
cin>>n;
cout<<"enter elements of array:n";
for(inti=0;i<n;i++)
cin>>a[i];
cout<<"enter element to be searched:";
cin>>x;
index=lsearch(a,n,x);
if(index==-1)
cout<<"element not found";
else
cout<<"element found at index:"<<index;
cout<<",position:"<<index+1<<endl;
42. 42
12.)Implementing Stacks Using
Linked Lists
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
class node
{
public:
class node *next;
int data;
};
class stack : public node
{
node *head;
int tos;
public:
stack()
{
tos=-1;
43. 43
}
void push(intx)
{
if (tos < 0 )
{
head =new node;
head->next=NULL;
head->data=x;
tos ++;
}
else
{
node *temp,*temp1;
temp=head;
if(tos >= 4)
{
cout <<"stack over flow";
return;
}
tos++;
while(temp->next != NULL)
temp=temp->next;
46. 46
cout <<"n1.PUSHn2.POPn3.DISPLAYn4.EXITn enter ur choice:";
cin >> ch;
switch(ch)
{
case 1: cout <<"n enter a element";
cin >> ch;
s1.push(ch);
break;
case 2: s1.pop();
break;
case 3: s1.display();
break;
case 4: exit(0);
}
}
return (0);
}
48. 48
13.)Implementing Queues
Using Linked Lists
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
class node
{
public:
class node *next;
int data;
};
class queue : public node
{
node *head;
int front,rare;
public:
queue()
{
front=-1;
52. 52
int ch;
while(1)
{
cout <<"n1.PUSHn2.POPn3.DISPLAYn4.EXITn enter ur choice:";
cin >> ch;
switch(ch)
{
case 1:
cout <<"n enter a element";
cin >> ch;
s1.push(ch); break;
case 2: s1.pop();break;
case 3: s1.display();break;
case 4: exit(0);
}
}
return (0);
}
54. 54
14.)To Write In A Text File
#include<fstream.h>
int main()
{
ofstreamfout;
fout.open("out.txt");
char str[300] ="Time is a great teacher but unfortunately it kills all its pupils.
Berlioz";
fout << str;
fout.close();
return 0;
}
65. 65
19.)To Count Number Of
Words
#include<fstream.h>
#include<iostream.h>
#include<conio.h>
int main()
{
ifstreamfin;
fin.open("out.txt");
int count= 0;
char word[30];
while(!fin.eof())
{
fin>>word;
count++;
}
cout<<"Number of words in file are:"<<count;
fin.close();
getch();
return 0;
72. 72
22). INSERTION IN THE END OF
LIST
#include<iostream.h>
#include<conio.h>
struct Node
{
int info;
Node *next;
}*start,*nptr,*temp,*rear;
Node *creat_nod(int a)
{
nptr=new Node;
nptr->info=a;
nptr->next=NULL;
return nptr;
}
void insert(Node*np)
{
if(start==NULL)
start=rear=np;
94. 94
30) Use of Class and Objects
for storing Info
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
class library
{int bno,price,btotal,bissued;
char auth[100],bname[100],pub[100];
public :
library(char dname[],char dauth[],chardpub[],intdp,intdn,intdbi,int dt)
{
bno=dn;
price=dp;
btotal=dt;
bissued=dbi;
strcpy(auth,dauth);
strcpy(bname,dname);
strcpy(pub,dpub);
95. 95
}
~library()
{ cout<<"n Thanks. for using our program" ;}
void details()
{cout<<" ntttDetails of book : nnnn";
cout<<" Book name :tt"<<bname<<endl;
cout<<" Book no=tt"<<bno<<endl;
cout<<" Price of booktt"<<price<<endl;
cout<<" Total Books Availablet"<<btotal<<endl;
cout<<" Issued books : t"<<bissued;
cout<<" n Author :tt"<<auth;
cout<<" n Publisher :tt"<<pub;
}
library()
{cout<<" Hloon";}
};
void main()
{ clrscr();
char uname[100],uauth[100],upub[100];
int up,un,ubi,ut;
cout<<" Enter book name ,authors nameand publishers name :n";
100. 100
3.)Inserting elements into the
table
INSERT INTO Customers (CustomerID, CustomerName,
ContactName, Address, City, PostalCode, Country)
VALUES ('1','Cardinal','Tom B. Erichsen','Skagen
21','Stavanger','4006','Norway');