
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
804 Views
To convert from String to date data type, you need to write some script. Let us first create a collection with documents>db.stringToDateDataTypeDemo.insertOne({"CustomerName":"Carol", "ShippingDate":"2019- 01-21"}); { "acknowledged" : true, "insertedId" : ObjectId("5ca2071d66324ffac2a7dc60") } >db.stringToDateDataTypeDemo.insertOne({"CustomerName":"Bob", "ShippingDate":"2019- 02-24"}); { "acknowledged" : true, "insertedId" : ObjectId("5ca2073566324ffac2a7dc61") } >db.stringToDateDataTypeDemo.insertOne({"CustomerName":"Chris", "ShippingDate":"2019- 04-01"}); ... Read More

Ankith Reddy
3K+ Views
You can use SET command for temporary variable assignment.The syntax is as followsSET @anyVariableName=(SELECT yourColumnName FROM yourTableName WHERE yourCondition);To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table tempVariableAssignment -> ( -> Id int NOT NULL AUTO_INCREMENT ... Read More

Ankith Reddy
12K+ Views
In this program we will see how to multiply two 8-bit numbers.Problem StatementWrite 8086 Assembly language program to multiply two 8-bit numbers stored in memory address offset 500 and 501.DiscussiontIn 8086 there is MUL instruction. So the task is too simple. Here we are taking the numbers from memory and ... Read More

Ankith Reddy
188 Views
To iterate through Decade Tuple, work it like any other collection in Java i.e. using a for loop, iterate and display the elements. Let us first see what we need to work with JavaTuples. To work with Decade class in JavaTuples, you need to import the following packageimport org.javatuples.Decade;Note: Download ... Read More

Ankith Reddy
263 Views
You can use $in operator instead of $elemMatch on first level array. The syntax is as followsdb.yourCollectionName.find({yourFieldName:{$in:["yourValue"]}}).pretty();Let us first create a collection with documents>db.firstLevelArrayDemo.insertOne({"StudentName":"Chris", "StudentTechnicalSkills":["Mongo DB", "MySQL", "SQL Server"]}); { "acknowledged" : true, "insertedId" : ObjectId("5ca2360f66324ffac2a7dc71") } >db.firstLevelArrayDemo.insertOne({"StudentName":"Robert", "StudentTechnicalSkills":["C", "J ava", "C++"]}); { "acknowledged" : true, ... Read More

Ankith Reddy
218 Views
The exception object is a wrapper containing the exception thrown from the previous page. It is typically used to generate an appropriate response to the error condition.When you are writing a JSP code, you might make coding errors which can occur at any part of the code. There may occur ... Read More

Ankith Reddy
362 Views
Use CAST() in MAX() to get max id from varchar type and values in numeric. Let us first create a table. Here, we have a column with varchar type −mysql> create table DemoTable ( UserMarks varchar(20) ); Query OK, 0 rows affected (0.77 sec)Insert some records in the table ... Read More

Ankith Reddy
3K+ Views
You can use COALESCE() along with aggregate function MAX() for this.The syntax is as followsSELECT COALESCE(MAX(`yourColumnName`), 0) FROM yourTableName;To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table avoidNullDemo -> ( -> `rank` int -> ); ... Read More

Ankith Reddy
105 Views
The get() method of the AbstractSequentialList class is used to display the element at the specified position in this list.The syntax is as followspublic E get(int index)Here, index is the location from where you want to get the element.To work with the AbstractSequentialList class in Java, you need to import ... Read More

Ankith Reddy
3K+ Views
To query on top N rows in MongoDB, you can use aggregate framework. Let us create a collection with documents> db.topNRowsDemo.insertOne({"StudentName":"Larry", "Score":78}); { "acknowledged" : true, "insertedId" : ObjectId("5ca26eee6304881c5ce84b91") } > db.topNRowsDemo.insertOne({"StudentName":"Chris", "Score":45}); { "acknowledged" : true, "insertedId" : ObjectId("5ca26ef66304881c5ce84b92") } > db.topNRowsDemo.insertOne({"StudentName":"Mike", "Score":65}); { ... Read More