- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Smita Kapse has Published 558 Articles
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
102 Views
In this section, we will see how to use the catch block for exception handling and the type conversion in C++.At first, let us see a code, and we will see what will be the output, and how they are generating.Example#include using namespace std; int main() { try{ ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
3K+ Views
Here we will see how to generate random number in given range using C. To solve this problem, we will use the srand() function. The current time will be used to seed the srad() function.This function cannot generate random number in any range, it can generate number between 0 to ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
197 Views
Let us first create a collection with documents −> db.multipleConditionDemo.insertOne({"_id":1, "Name":"John"}); { "acknowledged" : true, "insertedId" : 1 } > db.multipleConditionDemo.insertOne({"_id":2, "Name":"Carol"}); { "acknowledged" : true, "insertedId" : 2 } > db.multipleConditionDemo.insertOne({"_id":3, "Name":"Sam"}); { "acknowledged" : true, "insertedId" : 3 } > db.multipleConditionDemo.insertOne({"_id":4, "Name":"David"}); { "acknowledged" : true, "insertedId" : ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
393 Views
To create Horizontal slider in Java, use the Swing JSlider. Let us first create a frame and a Horizontal slider in it −JFrame frame = new JFrame("Frame with Slider"); JSlider slider = new JSlider(JSlider.HORIZONTAL, 0, 100, 70);Now, we will set the values for the slider. Display the ticks −slider.setMinorTickSpacing(5); slider.setMajorTickSpacing(20); ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
410 Views
Here we will see what are the differences between qsort() in C, and sort() in C++.The C provides qsort() function, that can be used for sorting an array. The function arguments and syntax is like below.void qsort(void *base, size_t num, size_t size, int (*comparator) (const void*, const void*));This function takes ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
2K+ Views
The semaphore is a concept of process or thread synchronization. Here we will see how to use the semaphores in real programs.In Linux system, we can get the POSIX semaphore library. To use it, we have to include semaphores.h library. We have to compile the code using the following options.gcc ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
870 Views
To retrieve a nested object in MongoDB, use $ operator. Let us first create a collection with documents −> db.queryNestedObject.insertOne( ... { ... "StudentName" : "James", ... "StudentSubjectScore" : [ ... {"StudentMongoDBScore":98}, ... {"StudentCScore":92}, ... ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
792 Views
To calculate timestamp difference, use aggregate framework. Let us first create a collection with documents −> db.timestampDifferenceDemo.insertOne({ "MovieBeginningTime": new ISODate("2019-05-12 10:20:30"), "MovieEndingTime":new ISODate("2019-05-12 12:30:20") }); { "acknowledged" : true, "insertedId" : ObjectId("5cd7ba1f6d78f205348bc644") } > db.timestampDifferenceDemo.insertOne({ "MovieBeginningTime": new ISODate("2019-05-12 04:00:00"), "MovieEndingTime":new ISODate("2019-05-12 07:10:00") }); { ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
1K+ Views
Here we will see how we can create a system, where we will create one client, and a server, and the client can send one string to the server, and the server will reverse the string, and return back to the client.Here we will use the concept of socket programming. ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
Smita Kapse
2K+ Views
This example demonstrate about How to schedule local notification in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following ... Read More