
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 2193 Articles

karthikeya Boyini
390 Views
Let’s say the value you have set is 20 and you have to display a prime number less than this value i.e. 19 in this case.The following is an example that displays a prime number less than the given number −Example Live Demopublic class Demo { public static void main(String[] ... Read More

karthikeya Boyini
5K+ Views
To select first word in MySQL query, you can use SUBSTRING_INDEX(). Following is the syntax −select substring_index(yourColumnName, ' ', 1) as anyAliasName from yourTableName;Let us first create a table −mysql> create table DemoTable ( StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, StudentFullName varchar(40) ); Query OK, 0 rows affected ... Read More

karthikeya Boyini
3K+ Views
First, you need to open the CMD with the help of shortcut key Windows+R key.After typing cmd, press the OK button. On pressing, you will get a command prompt. The screenshot is as follows −After that, you need to reach the /bin directory. Follow the below instructions. If you are ... Read More

karthikeya Boyini
72 Views
An immutable copy of a LocalTime object where some seconds are added to it can be obtained using the plusSeconds() method in the LocalTime class in Java. This method requires a single parameter i.e. the number of seconds to be added and it returns the LocalTime object with the added ... Read More

karthikeya Boyini
1K+ Views
Rolling hash is a hash function in which the input is hashed in a window that moves through the input.Rabin-Karp is popular application of rolling hash. The rolling hash function proposed by Rabin and Karp calculates an integer value. For a string the integer value is numeric value of a ... Read More

karthikeya Boyini
512 Views
Let us first crate OutputStream with file input.txt −FileOutputStream fileStream = new FileOutputStream("E:/input.txt"); DataOutputStream dataStream = new DataOutputStream(fileStream);Now, the writeBytes() method writes out the string to the underlying output stream as a sequence of bytes.dataStream.writeBytes("Demo text!");Flush the output stream −dataStream.flush();The following is an example. Here, our file is “E:/input.txt” and ... Read More

karthikeya Boyini
6K+ Views
To display message from stored procedure on the basis of conditions, let us use IF-ELSE condition −mysql> DELIMITER // mysql> CREATE PROCEDURE showMessage(value int, Name varchar(20)) BEGIN IF(value > 100) then SELECT CONCAT("HELLO", " ", Name); ELSE ... Read More

karthikeya Boyini
496 Views
You can use LIMIT for this, which is used to fetch limited number of records. Let us first create a table −mysql> create table DemoTable ( Id int, Name varchar(20) ); Query OK, 0 rows affected (0.53 sec)Insert records in the table using insert command −mysql> insert into ... Read More

karthikeya Boyini
6K+ Views
To replace dot with comma on SELECT, you can use REPLACE(). Following is the syntax −select replace(yourColumnName, '.' , ', ' ) from yourTableName;Let us first create a table −mysql> create table DemoTable ( Value float ); Query OK, 0 rows affected (0.63 sec)Insert records in the table using insert ... Read More

karthikeya Boyini
456 Views
Let’s say the following is our HashMap −HashMapmap = new HashMap(); map.put(10, "A"); map.put(20, "B"); map.put(30, "C"); map.put(40, "D"); map.put(50, "E"); map.put(60, "F"); map.put(70, "G"); map.put(80, "H");To retrieve all the keys, iterator through each and every key-value pair −Setset = map.keySet(); Iteratori = set.iterator(); while (i.hasNext()) { Integer res ... Read More