- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Daniol Thomas has Published 212 Articles
Daniol Thomas
2K+ Views
This is C++ program to implement Sieve of Eratosthenes to Generate Prime Numbers Between Given Range. In this method, an integer array with all elements initializes to zero.It follows where each non-prime element’s index is marked as 1 inside the nested loops. The prime numbers are those whose index is ... Read More
Daniol Thomas
160 Views
The month name for a particular MonthDay can be obtained using the getMonth() method in the MonthDay class in Java. This method requires no parameters and it returns the month name in the year.A program that demonstrates this is given as followsExample Live Demoimport java.time.*; public class Demo { public ... Read More
Daniol Thomas
50 Views
The month of the year is obtained using getMonthValue() method in the MonthDay class in Java. This method requires no parameter and it returns the month of the year which may be in the range of 1 to 12.A program that demonstrates this is given as followsExample Live Demoimport java.time.*; public ... Read More
Daniol Thomas
49 Views
The long value of a specified Chronofield can be obtained using the getLong() method in the MonthDay class in Java. This method requires a single parameter i.e. the ChronoField and it returns the long value of a specified Chronofield.A program that demonstrates this is given as followsExample Live Demoimport java.util.*; import ... Read More
Daniol Thomas
109 Views
An immutable copy of a Period with the number of months as required is done using the method withMonths() in the Period class in Java. This method requires a single parameter i.e. the number of months in the Period and it returns the Period with the number of months as ... Read More
Daniol Thomas
91 Views
To perform custom sort by field value in MySQL, use the FIELD() method in ORDER BY. Let us first create a table:mysql> create table DemoTable (StudentId int); Query OK, 0 rows affected (0.58 sec)Following is the query to insert some records in the table using insert command:mysql> insert into DemoTable ... Read More
Daniol Thomas
648 Views
To create a tab delimited select statement, you can use CONCAT() function from MySQL. Following is the syntax:select concat(yourColumnName1, "\t", yourColumnName2) AS anyAliasName from yourTableName;Let us first create a table:mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, FirstName varchar(20), LastName varchar(20) ); Query ... Read More
Daniol Thomas
6K+ Views
To select a column that is also a keyword in MySQL, you need to use backticks around the column name. As you know select is a keyword in MySQL, consider column name as select when creating a new table.Let us create a table:mysql> create table DemoTable (`select` varchar(100)); Query OK, ... Read More
Daniol Thomas
2K+ Views
Like procedures, you can also create function in a database and store them.SyntaxFollowing is the syntax of creating a function in a(MySQL) database:CREATE FUNCTION Function_Name(input_arguments) RETURNS output_parameter BEGIN declare variables; statements . . . . . . . . . . return data_type; ENDExampleSuppose we have ... Read More
Daniol Thomas
171 Views
The length() method of the StringJoiner class in Java 8 is used to get the length of the current value of StringJoiner.To work with the StringJoiner in Java 8, import the following package:import java.util.StringJoiner;The syntax is as follows:public int length()First, create a StringJoiner:StringJoiner strJoin = new StringJoiner(", "); strJoin.add("US"); strJoin.add("India"); ... Read More
To Continue Learning Please Login
Login with Google