First of all, it must be borne in mind that whatever step one takes in life-related to a course or degree, should be taken keeping in mind what does one need to achieve next or pursue next having this degree in hand. The same goes for all streams of education in India currently. Having said that, if I were to answer which out of Ph. D or NET exam in better to go with for Students pursuing masters in English Literature, again it varies from person to person.When to Choose Ph.D. over NETIf you are a sort of person who ... Read More
In some situations, We should not allow onClickListener for a view. This example demonstrates how to remove onClickListener for a view 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/acitivity_main.xml. In the above code, we have taken a text view, In this example, we should remove onClickListner for this text view.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.content.res.Configuration; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import ... Read More
Measuring things and distances is one of the important concepts to learn when we are studying maths. For maximum uses, measuring scales do the work quite well and everyone is aware of it how to use one. But the measuring scale only provides a specific level of correctness and once you need exact measurements which lie between two spots on the scale it becomes difficult to get a correct reading without a bit of counterpart.Also measuring scales are very vulnerable to parallax mistakes which can cause a huge portion of the difference in readings from person to person which is ... Read More
To get the size of TreeSet, use the size() method.Create a TreeSet and add elements to it −TreeSet tSet = new TreeSet(); tSet.add("78"); tSet.add("56"); tSet.add("88"); tSet.add("12");Now, get the size of the TreeSet −tSet.size()The following is an example to get the size of TreeSet in Java −Example Live Demoimport java.util.*; public class Demo { public static void main(String args[]){ TreeSet tSet = new TreeSet(); tSet.add("78"); tSet.add("56"); tSet.add("88"); tSet.add("12"); ... Read More
You can increase and decrease row value by 1 in MySQL using UPDATE command. The syntax is as follows −UPDATE yourTableName set yourColumnName = yourColumnName-1 where condition;Let us create a table to decrease row value by 1. The following is the query −mysql> create table IncrementAndDecrementValue −> ( −> UserId int, −> UserScores int −> ); Query OK, 0 rows affected (0.60 sec)Insert some records in the table using insert command. The query is as follows −mysql> insert into IncrementAndDecrementValue values(101, 20000); Query OK, 1 row affected (0.13 sec) mysql> insert into IncrementAndDecrementValue values(102, 30000); ... Read More
In some cases, after some time we need to update on UI to solve this problem, In this example demonstrate how to set a delay 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 text view, primary it shows "initial text" after some delay it will update with new text.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.os.Build; import android.os.Bundle; import android.os.Handler; ... Read More
Can you imagine your life without Google?? In the present world of digitization, people are completely dependent on search engines for every small information. It is very interesting to know how can Google give so much information on so many websites in a blink of an eye? How does it work?Google has its most powerful tool: its search engine. Google uses a special algorithm to generate search results. It uses automated programs called Spiders or Crawlers. With the help of indexed keywords, and its unique algorithm google displays the search results.Google has the trademarked algorithm called Page Rank, which assigns ... Read More
In this section we will see some advanced features of Zilog Z-80 Microprocessor. These features are basically compared to the Intel 8085 Microprocessor.The features are listed below −Sr.No.Features & Description1Opcode CountIn this Microprocessor there are 698 Opcodes of different lengths.2Instruction LengthThe instructions can be divided into four categories according to their lengths.There are 202 of 1-byte instructions, 344 of 2-byte instruction74 of 3-byte instruction78 of 4-byte instruction3Opcode LengthThe instructions can also be divided into two parts according to the opcode length. In the instruction set, there are instructions with 1-byte opcode and 2-byte opcode.The number of 1-byte opcode instruction is ... Read More
Let us first create a table to increase and adecrease row value by 1. The following is the query −mysql> create table IncrementAndDecrementValue −> ( −> UserId int, −> UserScores int −> ); Query OK, 0 rows affected (0.60 sec)Insert some records in the table using insert command. The query is as follows −mysql> insert into IncrementAndDecrementValue values(101, 20000); Query OK, 1 row affected (0.13 sec) mysql> insert into IncrementAndDecrementValue values(102, 30000); Query OK, 1 row affected (0.20 sec) mysql> insert into IncrementAndDecrementValue values(103, 40000); Query OK, 1 row affected (0.11 sec)Display all records ... Read More
This example demonstrates how can I know when an EditText loses focus.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 one edit text and two buttons. remove focus button going to remove the focus of edit text and other button going to gain focus of edit text.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.os.Build; import android.os.Bundle; ... Read More