 
 Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP 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
Karthikeya Boyini has Published 2192 Articles
 
 
							karthikeya Boyini
125 Views
The immutable copy of a duration with the required nanoseconds is obtained using the method withNanos() in the Duration class in Java. This method requires a single parameter i.e. the number of nanoseconds and it returns the duration with the required nanoseconds that were passed as a parameter.A program that ... Read More
 
 
							karthikeya Boyini
265 Views
To work with time in PHP/ MySQL, you can use strtotime() function. The PHP code is as follows for the same −$timeValue='8:55 PM'; $changeTimeFormat = date('H:i:s', strtotime($timeValue)); echo("The change Format in 24 Hours="); echo($changeTimeFormat);The snapshot of PHP code is as follows −Here is the output.Here is the MySQL query to ... Read More
 
 
							karthikeya Boyini
2K+ Views
You can use the concept of toArray() to create array. Following is the syntax −db.yourCollectonName.find({}, {yourFieldName:1}).toArray();Let us create a collection with documents −> db.createArrayDemo.insertOne({"UserName":"Chris"}); { "acknowledged" : true, "insertedId" : ObjectId("5cbd6461de8cc557214c0e00") } > db.createArrayDemo.insertOne({"UserName":"David"}); { "acknowledged" : true, "insertedId" : ObjectId("5cbd6467de8cc557214c0e01") } > db.createArrayDemo.insertOne({"UserName":"Robert"}); { ... Read More
 
 
							karthikeya Boyini
817 Views
There is no equivalent of ROW_NUMBER() in MySQL for inserting but you can achieve this with the help of variable. The syntax is as follows −SELECT (@yourVariableName:=@yourVariableName + 1) AS `anyAliasName`, yourColumnName1, yourColumnName2, ...N FROM yourTableName ,(SELECT @yourVariableName:=0) AS anyAliasName;To understand the above syntax, let us create a table. The ... Read More
 
 
							karthikeya Boyini
747 Views
The range of values for a field can be obtained using the range() method in the Instant class in Java. This method requires a single parameter i.e. the ChronoField for which the range of values are required and it returns the range of valid values for the ChronoField.A program that ... Read More
 
 
							karthikeya Boyini
418 Views
You can use system variables character_set_server to know the default server character set in MySQL. Following is the syntax −SHOW VARIABLES LIKE 'character_set_server';Additionally, to u can use collation_server system variable to know the default collation in MySQL. Following is the syntax −SHOW VARIABLES LIKE 'collation_server';Let us execute the above syntaxes ... Read More
 
 
							karthikeya Boyini
77 Views
An immutable copy of a duration where some nanoseconds are removed from it can be obtained using the minusNanos() method in the Duration class in Java. This method requires a single parameter i.e. the number of nanoseconds to be subtracted and it returns the duration with the subtracted nanoseconds.A program ... Read More
 
 
							karthikeya Boyini
1K+ Views
The syntax is as follows to skip the duplicate value and select only one from the duplicated values −select min(yourColumnName1), yourColumnName2 from yourTableName group by yourColumnName2;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table doNotSelectDuplicateValuesDemo -> ... Read More
 
 
							karthikeya Boyini
379 Views
You can use $set operator for this Let us first create a collection with documents −> db.updateRecordDemo.insertOne({"StudentName":"Larry"}); { "acknowledged" : true, "insertedId" : ObjectId("5cbd6f95de8cc557214c0e0a") } > db.updateRecordDemo.insertOne({"StudentName":"David"}); { "acknowledged" : true, "insertedId" : ObjectId("5cbd6f9cde8cc557214c0e0b") } > db.updateRecordDemo.insertOne({"StudentName":"Mike"}); { "acknowledged" : true, "insertedId" : ObjectId("5cbd6f9dde8cc557214c0e0c") ... Read More
 
 
							karthikeya Boyini
104 Views
The addAtX() method is used to add value to the Septet Tuple. The index can be set here with the X i.e. the place where the value gets added.Let us first see what we need to work with JavaTuples. To work with Septet class in JavaTuples, you need to import ... Read More
