Articles on Trending Technologies

Technical articles with clear explanations and examples

Which Storage drive is better, SSD or HDD?

Shanmukh Pasumarthy
Shanmukh Pasumarthy
Updated on 26-Jun-2020 470 Views

A great many people now purchase laptops for their processing needs and need to settle on the choice between getting either a Solid State Drive (SSD) or Hard Disk Drive (HDD) as the storage component. So which of the two is the better decision, an SSD or HDD?There's no straightforward response to this question; every buyer has different necessities and we need to evaluate our choice in light of those requirements, your preferences and obviously the cost.Despite the fact that the cost of SSDs has been falling, the cost per gigabyte advantage is still firm with HDDs. However, in the ...

Read More

What is the principle behind wireless charging?

Shanmukh Pasumarthy
Shanmukh Pasumarthy
Updated on 26-Jun-2020 2K+ Views

In the present world, technology has got very advanced. Most of our daily tasks have been automated which has made us more reliable on electronic gadgets. Wireless Charging gives an advantageous, safe, and solid approach to charge and power a large number of electrical gadgets at home, in the work, and in industries.By removing the use of physical connectors and links, remote charging makes it efficient and brings cost and safety advantages over the conventional charging wire. From cell phones to hand-held mechanical gadgets and heavy duty gear applications, wireless power keeps them protected, constant and maintains the reliable exchange ...

Read More

Check if a table is empty or not in MySQL using EXISTS

karthikeya Boyini
karthikeya Boyini
Updated on 26-Jun-2020 4K+ Views

The following is the syntax to check whether a table is empty or not using MySQL EXISTS −SELECT EXISTS(SELECT 1 FROM yourTableName);ExampleFirst, let us create a table. The query to create a table is as follows −mysql> create table ReturnDemo    -> (    -> Id int,    -> Name varchar(10)    -> ); Query OK, 0 rows affected (0.79 sec)Insert some records in the table using insert command. The query is as follows −mysql> insert into ReturnDemo values(100, 'Larry'); Query OK, 1 row affected (0.18 sec) mysql> insert into ReturnDemo values(101, 'Bob'); Query OK, 1 row affected (0.28 sec) ...

Read More

Which query is efficient to check if MySQL Table is empty? COUNT(*) vs. LIMIT?

Samual Sam
Samual Sam
Updated on 26-Jun-2020 273 Views

If you use COUNT(*) around the LEAST() then MySQL scans at least one index, therefore avoid LEAST(COUNT(*)) and use LIMIT.Let us first create a table. The query to create a table is as follows −mysql> create table ReturnDemo -> ( -> Id int, -> Name varchar(10) -> ); Query OK, 0 rows affected (0.79 sec)ExampleNow you can insert some records in the table using insert command. The query is as follows −mysql> insert into ReturnDemo values(100, 'Larry'); Query OK, 1 row affected (0.18 sec) mysql> insert into ReturnDemo values(101, 'Bob'); Query OK, 1 row affected (0.28 sec) mysql> insert into ...

Read More

Using GROUP BY and MAX on multiple columns in MySQL?

Samual Sam
Samual Sam
Updated on 26-Jun-2020 2K+ Views

To understand the GROUP BY and MAX on multiple columns, let us first create a table. The query to create a table is as follows −mysql> create table GroupByMaxDemo    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> CategoryId int,    -> Value1 int,    -> Value2 int    -> ); Query OK, 0 rows affected (0.68 sec)ExampleInsert some records in the table using insert command. The query is as follows −mysql> insert into GroupByMaxDemo(CategoryId, Value1, Value2) values(10, 100, 50); Query OK, 1 row affected (0.15 sec) mysql> insert into GroupByMaxDemo(CategoryId, Value1, Value2) values(10, 100, ...

Read More

How do I update NULL values in a field in MySQL?

Samual Sam
Samual Sam
Updated on 26-Jun-2020 3K+ Views

Let us first create a table −mysql> create table OrderDemo    -> (    -> OrderId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> OrderPrice int,    -> OrderDatetime datetime    -> ); Query OK, 0 rows affected (0.66 sec)ExampleNow you can insert some records in the table using insert command. The query is as follows −mysql> insert into OrderDemo(OrderPrice, OrderDatetime) values(200, '2016-09-12'); Query OK, 1 row affected (0.24 sec) mysql> insert into OrderDemo(OrderPrice, OrderDatetime) values(NULL, '2002-11-18'); Query OK, 1 row affected (0.26 sec) mysql> insert into OrderDemo(OrderPrice, OrderDatetime) values(1000, '2017-12-28'); Query OK, 1 row affected (0.15 sec)Display all records ...

Read More

Check if the String contains only unicode letters or digits in Java

George John
George John
Updated on 26-Jun-2020 7K+ Views

To check whether a String contains only unicode letters or digits in Java, we use the isLetterOrDigit() method and charAt() method with decision-making statements.The isLetterOrDigit(char ch) method determines whether the specific character (Unicode ch) is either a letter or a digit. It returns a boolean value, either true or false.Declaration −The java.lang.Character.isLetter() method is declared as follows −public static boolean isLetter(char ch)The charAt() method returns a character value at a given index. It belongs to the String class in Java. The index must be between 0 to length()-1.Declaration −The java.lang.String.charAt() method is declared as follows −public char charAt(int index)Let us ...

Read More

Check if the String contains only unicode letters in Java

Chandu yadav
Chandu yadav
Updated on 26-Jun-2020 12K+ Views

In order to check if a String has only Unicode letters in Java, we use the isDigit() and charAt() methods with decision-making statements.The isLetter(int codePoint) method determines whether the specific character (Unicode codePoint) is a letter. It returns a boolean value, either true or false.Declaration −The java.lang.Character.isLetter() method is declared as follows −public static boolean isLetter(int codePoint)Here, the parameter codePoint represents the character to be checked.The charAt() method returns a character value at a given index. It belongs to the String class in Java. The index must be between 0 to length()-1.Declaration −The java.lang.String.charAt() method is declared as follows −public ...

Read More

How do I lag columns in MySQL?

Samual Sam
Samual Sam
Updated on 26-Jun-2020 265 Views

To lag a column in MySQL, first, let us create a table. The query to create a table is as follows −mysql> create table LagDemo    -> (    -> UserId int,    -> UserValue int    -> ); Query OK, 0 rows affected (1.74 sec)ExampleInsert some records in the table using insert command. The query is as follows −mysql> insert into LagDemo values(12, 158); Query OK, 1 row affected (0.61 sec) mysql> insert into LagDemo values(18, 756); Query OK, 1 row affected (0.21 sec) mysql> insert into LagDemo values(15, 346); Query OK, 1 row affected (0.25 sec) mysql> insert ...

Read More

Timer Class in Java

Arjun Thakur
Arjun Thakur
Updated on 26-Jun-2020 704 Views

The Timer Class in Java is a facility for threads to plan tasks for future execution in a background thread. Tasks may be executed a single time or multiple times. The Timer class is thread-safe i.e. the threads of the class do not require external synchronization and can share a single Timer object. A point to be noted is that all constructors start a Timer thread.The Timer Class in Java came into existence since JDK 1.3. This class ascends up to large numbers of concurrently scheduled tasks. Internally, it uses a binary heap in the memory to represent its task ...

Read More
Showing 53151–53160 of 61,297 articles
Advertisements