Articles on Trending Technologies

Technical articles with clear explanations and examples

C++ Program to Implement Hash Tables Chaining with Doubly Linked Lists

Samual Sam
Samual Sam
Updated on 30-Jul-2019 729 Views

A hash table is a data structure which is used to store key-value pairs. Hash function is used by hash table to compute an index into an array in which an element will be inserted or searched.This is a C++ program to Implement Hash Tables chaining with doubly linked lists.AlgorithmFor insert:Begin    Declare Function insert(int k, int v)       int hash_v= HashFunc(k)       HashTableEntry *en = ht[hash_v]       if (en == NULL)          en = new HashTableEntry          en->d = v          en->k = k ...

Read More

What are the popular Crypto Currencies in circulation?

Prasanna Kotamraju
Prasanna Kotamraju
Updated on 30-Jul-2019 311 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

How to get the greatest of two columns values in MySQL?

Krantik Chavan
Krantik Chavan
Updated on 30-Jul-2019 359 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

How to store list in a txt file and read list from txt file in android?

Jennifer Nicholas
Jennifer Nicholas
Updated on 30-Jul-2019 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

How to use Tree set in Android?

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 450 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

How to use compareTo () in Android textview?

Anvi Jain
Anvi Jain
Updated on 30-Jul-2019 354 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

How to get day of month, day of year and day of week in android using offset date time API class?

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 1K+ 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

How to revert rows to default column value in MySQL?

George John
George John
Updated on 30-Jul-2019 270 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

Android scan wifi networks programmatically

Vrundesha Joshi
Vrundesha Joshi
Updated on 30-Jul-2019 3K+ Views

This example demonstrate about How to scan wifi networks programmatically.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.         Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.Manifest; import android.content.Context; import android.content.IntentFilter; import android.content.pm.PackageManager; import android.net.wifi.WifiManager; import android.os.Build; import android.support.annotation.NonNull; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ListView; import android.widget.Toast; public class MainActivity extends AppCompatActivity {    private ListView wifiList; ...

Read More

How to Trade your cryptocurrency?

Prasanna Kotamraju
Prasanna Kotamraju
Updated on 30-Jul-2019 210 Views

When you talk about trading of Cryptocurrency, the following transactions will come under that category.Buying new cryptocurrency using your fiat currencySelling your cryptocurrency for fiat currencyExchanging one type of cryptocurrency for another digital currencyTo make these transactions, there are Cryptocurrency Exchanges.If you just want to make the occasional, straightforward trade, there are also platforms that you can use that do not require an account.Cryptocurrency ExchangeThese are the websites which allow you to buy, sell or exchange the digital currency. All you have to do is to choose an exchange, create an account and get your id verified, and you are ...

Read More
Showing 59221–59230 of 61,297 articles
Advertisements