Karthikeya Boyini has Published 2193 Articles

How to use containsAll() in android CopyOnWriteArraySet?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 14:33:58

170 Views

Before getting into an example, we should know what CopyOnWriteArraySet is. It is a thread-safe variant of ArrayList and operations add, set, and so on by making a fresh copy of the underlying array.This example demonstrates about How to use containsAll() in android CopyOnWriteArraySetStep 1 − Create a new project ... Read More

Sort a column ignoring a specific word in MySQL

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 14:33:18

178 Views

Let us first create a table −mysql> create table DemoTable    -> (    -> Name text    -> ); Query OK, 0 rows affected (1.31 sec)Insert some records in the table using insert command. Here, we have inserted a name with a specific word “name”, which we need to ... Read More

Change the column name from StudentName to FirstName in MySQL?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 14:27:02

187 Views

Use CHANGE with ALTER statement. Let us first create a table −mysql> create table DemoTable -> ( -> StudentName varchar(100), -> Age int -> ); Query OK, 0 rows affected (0.84 sec)Now check the description of table −mysql> desc DemoTable;OutputThis will produce the following output −+----------------+--------------+------+-----+---------+-------+ | Field     ... Read More

Fix Drop table view #1051 unknown table error in MySQL

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 14:23:40

2K+ Views

To correctly drop a view, use the below syntax −drop view yourViewName;Let us first create a table −mysql> create table DemoTable -> ( -> Id int -> ); Query OK, 0 rows affected (1.01 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(1001); Query OK, ... Read More

What is the usage of zerofill in a MySQL field?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 14:17:39

911 Views

Zerofill pads the displayed value of the field with zeros up to the display width specified in the column definition. For example, if column is set int(8), therefore the width is 8. If the number is let’s say 4376, then zero will be padded on the left for total width ... Read More

MySQL query to conduct a basic search for a specific last name in a column

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 14:17:00

172 Views

You can use LIKE operator to conduct a basic search for last name. Let us first create a table: −mysql> create table DemoTable    -> (    -> CustomerName varchar(100),    -> CustomerAge int    -> ); Query OK, 0 rows affected (0.77 sec)Insert some records in the table using ... Read More

Calling NOW() function to fetch current date records in MySQL?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 14:15:35

420 Views

Let us first create a table −mysql> create table DemoTable -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> ShippingDate datetime -> ); Query OK, 0 rows affected (1.16 sec)Insert some records in the table using insert command. Consider current date “2019-06-28” −mysql> insert into DemoTable(ShippingDate) values('2019-01-31'); Query ... Read More

How to use contains() in android CopyOnWriteArraySet?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 14:11:52

138 Views

Before getting into example, we should know what CopyOnWriteArraySet is. It is a thread-safe variant of ArrayList and operations add, set, and so on by making a fresh copy of the underlying array.This example demonstrates about How to use contains () in android CopyOnWriteArraySetStep 1 − Create a new project ... Read More

How to use ConcurrentLinkedDeque in android?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 14:10:10

174 Views

Before getting into example, we should know what ConcurrentLinkedDeque is, it is unbounded deque based on linked nodes. Multiple threads can access deque elements with safety.This example demonstrate about How to clear ConcurrentLinkedDeque in androidStep 1 − Create a new project in Android Studio, go to File ⇒ New Project ... Read More

How to use clear() in android ConcurrentLinkedQueue?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 14:09:09

199 Views

Before getting into example, we should know what ConcurrentLinkedQueue is, it is unbounded queue based on linked nodes. Multiple threads can access queue elements with safety. Elements travel based on queue strategy as FIFO and elements going to insert from tail. It does not allow null values.This example demonstrate about ... Read More

Advertisements