Popular Crypto Currencies in Circulation

Prasanna Kotamraju
Updated on 30-Jul-2019 22:30:25

257 Views

Bitcoin, invented by Satoshi Nakamoto in 2008 has ushered new waves in the field of cryptocurrencies. Inspired by Bitcoins and decentralized peer-to-peer network, there are many digital currencies that came into the world to change the global economy.Let us first understand what is a cryptocurrency? Cryptocurrencies are the digital currencies which are generated, stored and transacted digitally. The most important feature of cryptocurrency which makes it different from fiat currency is, that it is not created or maintained by any single central authority. It is created and maintained through a decentralized system which is maintained by the miners. The miners ... Read More

Get the Greatest of Two Columns Values in MySQL

Krantik Chavan
Updated on 30-Jul-2019 22:30:25

321 Views

In order to get the greatest of two columns values in MySQL, you need to use GREATEST() function. Following is the syntax:select greatest(yourColumnName1, yourColumnName2) AS anyAliasName from yourTableName; Let us first create a table:mysql> create table DemoTable (    Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    Number1 int,    Number2 int ); Query OK, 0 rows affected (0.63 sec)Following is the query to insert some records in the table using insert command:mysql> insert into DemoTable(Number1, Number2) values(1000, 10000); Query OK, 1 row affected (0.49 sec) mysql> insert into DemoTable(Number1, Number2) values(600, 900); Query OK, 1 row affected (0.12 sec) mysql> ... Read More

8086 Program to Search a Number in a String

Ankith Reddy
Updated on 30-Jul-2019 22:30:25

3K+ Views

In this program we will see how to find a number n from a string (an array of numbers).Problem StatementWrite 8086 Assembly language program to find a number in a string (an array of numbers). The numbers are stored at memory offset 600 onwards.DiscussionIn this program we are taking only 5 numbers. We are searching the number 25. after successful search the DX register will hold the offset address, and BX register will hold the index of that number.We are taking each number from that array and then compare it with 25. If the numbers are same, then we will ... Read More

Store and Read List from TXT File in Android

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:25

1K+ Views

This example demonstrates How to store list in a txt file and read list from txt file 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. In the above code, we have taken editext and button. When the user clicks on the button, it will take data from edit text and store in internal storage as /data/data//files/text/sample.txt. It going to append ... Read More

Use TreeSet in Android

Nishtha Thakur
Updated on 30-Jul-2019 22:30:25

415 Views

This example demonstrates about How to use Tree set in AndroidStep 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 taken the name and record number as Edit text, when the user clicks on save button it will store the data into ArrayList. Click on the refresh button to get the ... Read More

Use compareTo in Android TextView

Anvi Jain
Updated on 30-Jul-2019 22:30:25

310 Views

This example demonstrate about How to use compareTo () in Android textview.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 taken name as Edit text, when user click on button it will take data and compare with sairam string.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; ... Read More

Get Day of Month, Day of Year and Day of Week in Android Using OffsetDateTime API

Nishtha Thakur
Updated on 30-Jul-2019 22:30:25

969 Views

This example demonstrate about How to get day of month, day of year and day of week in android using offset date time API class.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 taken textview to show day of month, day of year and day of the week.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; import ... Read More

LocalTime Parse Method in Java

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

181 Views

The LocalTime instance can be obtained from a string value using the parse() method in the LocalTime class in Java. This method requires a single parameter i.e. the string which is to be parsed. This string cannot be null. Also, it returns the LocalTime instance obtained from the string value that was passed as a parameter.A program that demonstrates this is given as follows −Example Live Demoimport java.time.*; public class Demo {    public static void main(String[] args) {       LocalTime lt = LocalTime.parse("23:15:30");       System.out.println("The LocalTime is: " + lt);    } }OutputThe LocalTime is: 23:15:30Now ... Read More

Revert Rows to Default Column Value in MySQL

George John
Updated on 30-Jul-2019 22:30:25

245 Views

To revert rows to default column value, let us first create a demo tablemysql> create table defaultDemo    -> (    -> Id int    -> ); Query OK, 0 rows affected (0.48 sec)Insert some records in the table using insert command.The query is as followsmysql> insert into defaultDemo values(10); Query OK, 1 row affected (0.25 sec) mysql> insert into defaultDemo values(20); Query OK, 1 row affected (0.13 sec) mysql> insert into defaultDemo values(30); Query OK, 1 row affected (0.14 sec) mysql> insert into defaultDemo values(40); Query OK, 1 row affected (0.11 sec) mysql> insert into defaultDemo values(80); Query OK, ... Read More

Convert String to IntStream in Java

Nancy Den
Updated on 30-Jul-2019 22:30:25

374 Views

If you have a string and you want to convert it into IntStream with ASCII values, then it can be easily achieved using the below code.To work with IntStream class, you need to import the following package:import java.util.stream.IntStream;Let’s say the following is our string:String str = "Benz";Convert the above string to IntStream:IntStream stream = str.chars();The following is an example to convert String to IntStream in Java:Example Live Demoimport java.util.stream.IntStream; public class Demo {    public static void main(String[] args) {       String str = "Benz";       System.out.println("String to be converted = " + str);       ... Read More

Advertisements