Before getting into example, we should know what is Gradient color. According to Wikipedia, In computer graphics, a color gradient (sometimes called a color ramp or color progression) specifies a range of position-dependent colors, usually used to fill a region. For example, many window managers allow the screen background to be specified as a gradient.This example demonstrate about how to create Animated Gradient Background in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. ... Read More
A plugin is that piece of software that gives additional functionality to a website. These plugins help the web browser to display additional content and increases the functionality of a website and makes it look great.Websites are usually created using WordPress, so let us discuss some of the best "Free WordPress Plugins" to help in building best and attractive website pages.AkismetJetpackEverest formsYoast SEOGoogle XML SitemapsNivo SliderW3 Total CacheVaultPressUser RegistrationWP Smush
The following is an example.Example Live Demoimport java.util.Date; import java.text.DateFormat; import java.text.SimpleDateFormat; public class Demo { public static void main(String[] args) throws Exception { Date d = new Date(); DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss a"); String format = dateFormat.format(d); System.out.println("Current date and time = " + format); System.out.printf("Localized day name = %tA/%TA", d, d); } }OutputCurrent date and time = 26/11/2018 11:44:44 AM Localized day name = Monday/MONDAY
In this program we will see how to count number of even numbers in a block of elements.Problem StatementWrite 8085 Assembly language program to count number of even numbers in a block of data, where the block size is 10D. The block is starting from location8000H.DiscussionThe Odd Even checking is very simple. we can determine one number is odd or even by checking only the LSb. When LSb is 1, the number is odd, otherwise it is even. In this program we are taking a number from memory and then ANDing01H with it. if the result is nonzero, then the ... Read More
Before getting into example, we should know what is Pull to refresh layout in android . we can call pull to refresh in android as swipe-to-refresh. when you swipe screen from top to bottom it will do some action based on setOnRefreshListener.This example demonstrate about how to implement android pull to refresh.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. In the above code we have given swipeRefreshLayout as parent ... Read More
Here you can use BETWEEN operator. The syntax is as follows −SELECT *FROM yourTableName WHERE yourColumnName BETWEEN 6 AND 10;You can use regular expression like this. The syntax is as follows −SELECT *FROM yourTableName WHERE yourColumnName REGEXP '10|[6-9]';To understand the both syntax, let us create a table. The query to create a table is as follows −mysql> create table RegularExpressionDemo -> ( -> Id int -> ); Query OK, 0 rows affected (1.11 sec)Now you can insert some records in the table using insert command. The query is as follows −mysql> insert into RegularExpressionDemo values(1); Query OK, ... Read More
You can create DATETIME from DATE and TIME with the help of ADDTIME() function in MySQL. The syntax is as follows −SELECT ADDTIME(CONVERT(yourDateColumnName, datetime), yourTimeColumnName) as anyVariableName from yourTableName;To understand the above concept, let us create a table. The query to create a table is as follows −mysql> create table DateTime −> ( −> DueDate date, −> DueTime time −> ); Query OK, 0 rows affected (1.19 sec)Now you can insert date and time separately. The query to insert is as follows −mysql> insert into DateTime values(curdate(), now()); ... Read More
In this program we will see how to find 1's complement and 2's complement of an 8-bit number.Problem StatementWrite 8085 Assembly language program to find 1's complement and 2's complement of a number stored in 8000H.Discussion8085 has an instruction CMA. This instruction complements the content of Accumulator. For 1's complement CMA instruction is sufficient, and for 2's complement we have to increase the number by 1 after complementing.We are taking the number from 8000H and storing the 1's complement at location 8050H, and 2's complement to 8051H.InputAddressData......8000AB......Flow DiagramProgramAddressHEX CodesMnemonicsCommentsF0003A, 00, 80LDA 8000HLoad the number from memoryF0032FCMAComplement the accumulatorF00432, 50, 80STA ... Read More
Android supports Google inbuilt text to speak API using RecognizerIntent.ACTION_RECOGNIZE_SPEECH. In this example demonstrate about how to integrate Android speech to text.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. In this above code we have created one text view and image view. When user click on image view, it will call Google speech to text API and added text to text ... Read More
You can use TRIM() function to remove spaces. The syntax is as follows −UPDATE yourTableName SET yourColumnName=TRIM(yourColumnName);To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table removeSpaceDemo -> ( -> Id int NOT NULL AUTO_INCREMENT, -> UserId varchar(20), -> UserName varchar(10), -> PRIMARY KEY(Id) -> ); Query OK, 0 rows affected (0.81 sec)Insert some records in the table using insert command. The query is as follows −mysql> insert into removeSpaceDemo(UserId, ... Read More