
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Ankith Reddy has Published 996 Articles

Ankith Reddy
662 Views
In order to find record by _id in MongoDB, you can use the following syntaxdb.yourCollectionName.find({"_id":yourObjectId});Let us create a collection with documents> db.findRecordByIdDemo.insertOne({"CustomerName":"Larry", "CustomerAge":26}); { "acknowledged" : true, "insertedId" : ObjectId("5c9dc2c875e2eeda1d5c3671") } > db.findRecordByIdDemo.insertOne({"CustomerName":"Bob", "CustomerAge":20}); { "acknowledged" : true, "insertedId" : ObjectId("5c9dc2d175e2eeda1d5c3672") } > db.findRecordByIdDemo.insertOne({"CustomerName":"Carol", "CustomerAge":22}); { ... Read More

Ankith Reddy
239 Views
The DoubleStream class in Java the following two forms of the of() methodThe following of() method returns a sequential DoubleStream containing a single element. Here is the syntaxstatic DoubleStream of(double t)Here, parameter t is the single element.The following of() method returns a sequential ordered stream whose elements are the specified ... Read More

Ankith Reddy
813 Views
You can use IF() to GROUP BY multiple columns. To understand the concept, let us create a table. The query to create a table is as followsmysql> create table MultipleGroupByDemo -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> CustomerId int, -> ProductName varchar(100) ... Read More

Ankith Reddy
1K+ Views
The response object is an instance of a javax.servlet.http.HttpServletResponse object. Just as the server creates the request object, it also creates an object to represent the response to the client.The response object also defines the interfaces that deal with creating new HTTP headers. Through this object, the JSP programmer can ... Read More

Ankith Reddy
729 Views
The Copy constructor and the assignment operators are used to initialize one object to another object. The main difference between them is that the copy constructor creates a separate memory block for the new object. But the assignment operator does not make new memory space. It uses reference variable to ... Read More

Ankith Reddy
337 Views
Before getting into example, we should know, What is radio group in android. Radio Group contains group of radio buttons. Using radio buttons we can select and un select according to user requirements.This example demonstrate about how to use radio group in android.Step 1 − Create a new project in ... Read More

Ankith Reddy
980 Views
In order to return only value of a field in MongoDB, you need to write a query and use forEach loop. Let us first create a collection with documents> db.returnOnlyValueOfFieldDemo.insertOne({"ClientName":"Larry"}); { "acknowledged" : true, "insertedId" : ObjectId("5c9ea537d628fa4220163b6e") } > db.returnOnlyValueOfFieldDemo.insertOne({"ClientName":"Chris"}); { "acknowledged" : true, "insertedId" : ... Read More

Ankith Reddy
153 Views
To get the number of elements in the queue, use the size() method of the ArrayBlockingQueue class.The syntax is as followsint size()To work with ArrayBlockingQueue class, you need to import the following packageimport java.util.concurrent.ArrayBlockingQueue;The following is an example to implement size() method of Java ArrayBlockingQueue classExample Live Demoimport java.util.concurrent.ArrayBlockingQueue; public class ... Read More

Ankith Reddy
619 Views
CookiesA webserver can assign a unique session ID as a cookie to each web client and for subsequent requests from the client they can be recognized using the received cookie.This may not be an effective way as the browser at times does not support a cookie. It is not recommended ... Read More

Ankith Reddy
4K+ Views
The Copy constructor and the assignment operators are used to initializing one object to another object. The main difference between them is that the copy constructor creates a separate memory block for the new object. But the assignment operator does not make new memory space. It uses the reference variable ... Read More