Arjun Thakur has Published 1109 Articles

How to make Two activities with different colored status bar in Android.

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:24

536 Views

There are so many situations, where we need to change the different action bar colors according toproject requirement . This example demonstrate about how to make Two activities with different colored status bar.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill ... Read More

How to get an age from a D.O.B field in MySQL?

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:24

4K+ Views

To get age from a D.O.B field in MySQL, you can use the following syntax. Here, we subtract the DOB from the current date.select yourColumnName1, yourColumnName2, ........N, year(curdate())- year(yourDOBColumnName) as anyVariableName from yourTableName;To understand the above syntax, let us first create a table. The query to create ... Read More

How to insert data to MySQL having auto incremented primary key?

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:24

3K+ Views

Whenever your column has an auto incremented primary key then there is an advantage that you do not need to give value for that column in the INSERT command. This means MySQL will give the value for that column.To understand the above concept, let us first create a table. The ... Read More

Find lowest Date (custom) in MySQL?

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:24

228 Views

To find lowest Date(custom) in MySQL, let us first create a table. The query to create a table is as follows:mysql> create table FindMinimumDate    -> (    -> Id int NOT NULL AUTO_INCREMENT,    -> yourDay varchar(2),    -> yourMonth varchar(2),    -> yourYear varchar(4),    -> PRIMARY KEY(Id) ... Read More

DAA instruction in 8085 Microprocessor

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:24

18K+ Views

Let us consider we want to add two decimal numbers 38 and 45. They will be represented in BCD as 0011 1000 and 0100 0101. The addition results in 0111 1101. But the answer will be incorrect if we want to interpret this result as a BCD number. The result ... Read More

Change One Cell's Data in MySQL?

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:24

342 Views

Update only one cell’s data with the help of UPDATE command. The syntax is as follows −UPDATE yourTableName yourColumnName=yourNewValue where yourColumnName=yourOldValue;To understand the above concept, let us first create a table. The query to create a table is as follows −mysql> create table changeCellsData    -> (    -> Id ... Read More

Display Sub-List of ArrayList in Java

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:24

656 Views

The sub-list of an ArrayList can be obtained using the java.util.ArrayList.subList() method. This method takes two parameters i.e. the start index for the sub-list(inclusive) and the end index for the sub-list(exclusive) from the required ArrayList. If the start index and the end index are the same, then an empty sub-list ... Read More

ORDER BY alphabet first then follow by number in MySQL?

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:24

783 Views

You need to use regular expression with ORDER BY clause. The syntax is as follows:SELECT *FROM yourTableName ORDER BY IF(yourColumnName RLIKE '^[a-z]', 1, 2), yourColumnName;To understand the above syntax, let us create a table. The query to create a table is as follows:mysql> create table AlphabetFirstThenNumberDemo    -> (   ... Read More

Can you recommend a free light-weight MySQL GUI for Linux?

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:24

112 Views

You can use phpMyAdmin, since it is one of the best free tools. This can be used for every system with PHP and MySQL. It is a free and open source administration tool for MySQL and MariaDB. PHPMYADMINHere is the URL to download −https://www.phpmyadmin.net/downloads/The following are the features of phpMyAdmin ... Read More

How can I add a Boolean field to MySQL?

Arjun Thakur

Arjun Thakur

Updated on 30-Jul-2019 22:30:24

1K+ Views

You can use tinyint(1) or bool or boolean. All are synonym. If you use bool or boolean datatype, then it nternally change into tinyint(1).In PHP, the value 0 represents false and 1 represents true. Any other number except 0 is also true.Let us check the internal representation of bool or ... Read More

Advertisements