Chandu yadav has Published 1091 Articles

How to create custom actionbar in android?

Chandu yadav

Chandu yadav

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

4K+ Views

Before getting into example we should know what is action bar in android. Action bar just like header in android. Either we can use same action bar for all screen or we can change action bar for particular activity.This example demonstrate about how to create a custom action bar in ... Read More

Loading Image using Glide in Android

Chandu yadav

Chandu yadav

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

4K+ Views

Before getting into Glide example, we should know what is glide, Glide is an image processing library developed by muyangmin. Using glide library we can show image, decode images, cache images, animated gifs and many more.This example demonstrate about how to integrate glide in android.Step 1 − Create a new ... Read More

How do I display an alert dialog on Android?

Chandu yadav

Chandu yadav

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

4K+ Views

Before getting into alert dialog, we should know about what is alert dialog, Alert dialog is just like a pop-up where user can choose action by clicking "ok" or "cancel" button.Methods in Alert DialogsetView(View view) − It used to set custom view to alert dialogsetTitle(CharSequence title) − It is used ... Read More

Get table names using SELECT statement in MySQL?

Chandu yadav

Chandu yadav

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

7K+ Views

To get table names using SELECT statement, use “information_schema.tables”. Let us see an example, wherein we have a database that contains 3 tables. The syntax to get all table names with the help of SELECT statement. SELECT Table_name as TablesName from information_schema.tables where table_schema = 'yourDatabaseName'; Using database ... Read More

What data type to use for hashed password field in MySQL?

Chandu yadav

Chandu yadav

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

6K+ Views

The hashed password data type depends upon which hashing algorithm we are using. The hashing algorithm does not depends upon the input size because it produces a result of the same length. It gives the result in a series of hexadecimal digits, and we can reduce the hexadecimal digits by ... Read More

How long is the SHA256 hash in MySQL?

Chandu yadav

Chandu yadav

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

3K+ Views

As the name “SHA256” suggest, it is 256 bits long. If we are using hexadecimal notation then digit codes represent 4 bits. In order to represent 256, we need 256/4 = 64 bits. We need a data type varchar(64) or char(64). Creating a table for our example. mysql> create ... Read More

Add 2 hours to current time in MySQL?

Chandu yadav

Chandu yadav

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

9K+ Views

We can get the current time with the help of now() and adding 2 hours is done by giving the interval as 2. Firstly, collect information of the current time in the system with the help of now(). The current time is . The following is the query to ... Read More

How does “do something OR DIE()” work in Perl?

Chandu yadav

Chandu yadav

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

5K+ Views

The die() function can be used to stop the script and can be used to display a message to the end user. It can be used at the right side of the OR ( || ) operator and at left side can be any expression like the eval() function. Case ... Read More

How to raise an error within MySQL?

Chandu yadav

Chandu yadav

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

3K+ Views

MySQL has introduced signals similar to an exception in other languages. Let us first see the syntax of signal. SIGNAL SQLSTATE ' PredefinedValueforSignalError' SET MESSAGE_TEXT = 'AnyMessageInformation'; Above, we have set our own error message text as well. We will apply the above query to get an ... Read More

What is the difference between initialization and assignment of values in C#?

Chandu yadav

Chandu yadav

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

1K+ Views

Let us understand the difference between initialization and assignment of values. Declaring an array. int [] n // declaring Initialization Declaring an array does not initialize the array in the memory. When the array variable is initialized, you can assign values to the array. Array is ... Read More

Advertisements