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
Karthikeya Boyini has Published 2192 Articles
karthikeya Boyini
3K+ Views
The value of a duration in seconds can be obtained using the getSeconds() method in the Duration class in Java. This method requires no parameters and it returns the duration value in seconds.A program that demonstrates this is given as follows −Example Live Demoimport java.time.Duration; public class Demo { public ... Read More
karthikeya Boyini
6K+ Views
When there are more than one user who desire to access a shared network channel, an algorithm is deployed for channel allocation among the competing users. Dynamic channel allocation encompasses the channel allocation schemes where channels are allotted to users dynamically as per their requirements, from a central pool.Working PrincipleIn ... Read More
karthikeya Boyini
369 Views
The localhost means you can access from same machine while from % the remote host access is possible. The syntax is as follows to change the user password.SET PASSWORD FOR 'yourUserName'@'localhost' ='yourPassword';First check the user and host from MySQL.user table. The query is as follows −mysql> select user, host from ... Read More
karthikeya Boyini
9K+ Views
The current instant from the system UTC clock can be obtained using the now() method in the Instant class in Java. This method requires no parameters and it returns the current instant from the system UTC clock.A program that demonstrates this is given as follows −Example Live Demoimport java.time.*; public class ... Read More
karthikeya Boyini
243 Views
To rotate a list in Java, let us first create a List and add elements −List < Integer > list = new ArrayList < Integer > (); list.add(5); list.add(10); list.add(15); list.add(20); list.add(25); list.add(30); list.add(35); list.add(40); list.add(45);Now, rotate the list −Collections.reverse(list);Example Live Demoimport java.util.ArrayList; import java.util.Collections; import java.util.List; public class Demo { ... Read More
karthikeya Boyini
250 Views
First, you need to open my.cnf file. The following is the query to get the directory location of the config file on Windows −mysql> select @@datadir;Output+---------------------------------------------+ | @@datadir ... Read More
karthikeya Boyini
602 Views
An immutable copy of a instant where some seconds are added to it can be obtained using the plusSeconds() method in the Instant class in Java. This method requires a single parameter i.e. the number of seconds to be added and it returns the instant with the added seconds.A program ... Read More
karthikeya Boyini
2K+ Views
To get the last access time, try the following syntax −SELECT update_time FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'yourDatabaseName' AND table_name = 'yourTableName'The above syntax gives the last access information about MyISAM engine type.Here, our database is ‘business’ and we will be using the table with the name ‘twoprimarykeytabledemo'.To get last ... Read More
karthikeya Boyini
2K+ Views
To extract values from HashMap, let us first create a HashMap with keys and values −HashMapm = new HashMap();Now, add some elements to the HashMap −m.put(10, 20); m.put(30, 40); m.put(50, 60); m.put(70, 80); m.put(90, 100); m.put(110, 120); m.put(130, 140); m.put(150, 160);Now, extract the values from the HashMap −for (Integer i: ... Read More
karthikeya Boyini
201 Views
An immutable copy of a instant where some seconds are subtracted from it can be obtained using the minusSeconds() method in the Instant class in Java. This method requires a single parameter i.e. the number of seconds to be subtracted and it returns the instant with the subtracted seconds.A program ... Read More