Articles on Trending Technologies

Technical articles with clear explanations and examples

Display all records except one in MySQL

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 597 Views

You can use IN() to display all records except one in MySQL. Let us first create a table −mysql> create table DemoTable (    Id int,    FirstName varchar(20) ); Query OK, 0 rows affected (0.57 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(100, 'Larry'); Query OK, 1 row affected (0.31 sec) mysql> insert into DemoTable values(10, 'Chris'); Query OK, 1 row affected (0.19 sec) mysql> insert into DemoTable values(110, 'Robert'); Query OK, 1 row affected (0.15 sec) mysql> insert into DemoTable values(90, 'David'); Query OK, 1 row affected (0.20 sec)Following is the query ...

Read More

a 8085 Program to perform bubble sort based on choice

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 822 Views

Now let us see a program of Intel 8085 Microprocessor. In this program we will see how to perform bubble sort in based on choice.Problem Statement:Write 8085 Assembly language program to perform bubble sorting operation on a set of data, and arrange them into ascending or descending order based on choice.Discussion:In this program we are arranging some numbers into ascending or descending order based on some choice. We are storing the choice at location A000H. If the choice value is 00H, then data will be sorted in ascending order, otherwise it will be sorted in descending order. The 8000H is ...

Read More

What are copy elision and return value optimization in C++?

George John
George John
Updated on 30-Jul-2019 413 Views

The Copy Elision is also known as the Copy Omission. This is one of the compiler optimization technique. It avoids the unnecessary copying of objects. Almost any current compiler uses this Copy Elision technique.Let us see how it works by the help of one example code.Example Code#include using namespace std; class MyClass { public: MyClass(const char* str = "\0") { //default constructor cout

Read More

How to sort Listview in Android?

Nitya Raut
Nitya Raut
Updated on 30-Jul-2019 2K+ Views

This example demonstrate about How to sort Listview in Android using collections.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 and record number as Edit text, when user click on save button it will store the data into arraylist. Click on refresh button to ...

Read More

How to implement click event on toolbar icon?

Jennifer Nicholas
Jennifer Nicholas
Updated on 30-Jul-2019 1K+ Views

This example demonstrates How to implement click event on toolbar icon.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 text view to action bar icon status.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.annotation.SuppressLint; import android.app.ActivityManager; import android.app.admin.DevicePolicyManager; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.view.MenuItem; import android.view.View; ...

Read More

How to SELECT min and max value from the part of a table in MySQL?

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 485 Views

To select min and max value from the part of a table in MySQL, use the following syntax −select min(yourColumnName) as yourAliasName1, max(yourColumnName) as yourAliasName2 from (select yourColumnName from yourTableName limit yourLimitValue) tbl1;Let us first create a table. Following is the query −mysql> create table MinAndMaxValueDemo    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> Value int    -> ); Query OK, 0 rows affected (0.52 sec)Insert records in the table using insert command. Following is the query −mysql> insert into MinAndMaxValueDemo(Value) values(10); Query OK, 1 row affected (0.16 sec) mysql> insert into MinAndMaxValueDemo(Value) ...

Read More

What happens to Bitcoin after all the 21 Million Coins are mined?

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

Bitcoins are created by Satoshi Nakamoto, in 2008 whose identity is still a mystery, whether it is one person or a group of persons. Satoshi Nakamoto proposed Bitcoin as a means of exchange, independent and secure and also a limited number.Now the question comes, Why limited supply?The most important feature of Bitcoin is that it is decentralized. No Central authority will keep a check on its demand or supply. Satoshi has created an open source code which is maintained by a group of volunteer programmers and runs as a distributed network with nodes spread across the world. We know that ...

Read More

How to convert date YYYYMMDD to YY-MM-DD in MySQL query?

Ankith Reddy
Ankith Reddy
Updated on 30-Jul-2019 2K+ Views

To convert date YYYYMMDD to YY-MM-DD in MySQL, use the below syntax −select date_format(str_to_date(yourColumnName, '%Y%m%d'), '%Y-%m-%d') from yourTableName;Let us first create a table −mysql> create table DemoTable (    ClientId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    ClientProjectDeadline varchar(200) ); Query OK, 0 rows affected (0.57 sec)Insert some records in the table using insert command. We have inserted dates in the YYYYMMDD format −mysql> insert into DemoTable(ClientProjectDeadline) values('20121221'); Query OK, 1 row affected (0.19 sec) mysql> insert into DemoTable(ClientProjectDeadline) values('20190416'); Query OK, 1 row affected (0.53 sec) mysql> insert into DemoTable(ClientProjectDeadline) values('20160624'); Query OK, 1 row affected (0.20 sec) mysql> ...

Read More

Can you now ask Amazon Alexa to make playlists for you?

Ishita K
Ishita K
Updated on 30-Jul-2019 522 Views

Now you can command "Alexa, Create a new playlist " or "Alexa, add this to my playlist" and Alexa will obey your orders.Here is the know how ...You need Amazon music, as Alexa recognizes only Amazon music.Say "Alexa, create a new playlist" and Alexa will ask you to give the name of the playlist. Name the list. Now your playlist is created and ready.Now you have to add the required songs to the playlists with commands "Alexa, add this song to the playlist".You can even edit a playlist by taking the name of an already existing playlist.As of now deleting a ...

Read More

How to use unicode () in Android sqlite?

Anvi Jain
Anvi Jain
Updated on 30-Jul-2019 485 Views

Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to access this database, you don't need to establish any kind of connections for it like JDBC, ODBC etc.This example demonstrate about How to use unicode () in Android sqliteThis example demonstrate about How to use unicode () in Android sqliteStep 1 − Create a new project in Android Studio, go ...

Read More
Showing 59231–59240 of 61,297 articles
Advertisements