Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles on Trending Technologies
Technical articles with clear explanations and examples
How to cancel an executing AsyncTask in Android?
Before getting into example, we should know what is AsyncTask in android. AsyncTask going to do operations/actions in background thread and update on mainthread. While doing background operations on background thread, user can cancel operations by using the following code -AsynTaskExample mAsyncTask = new AsyncTaskExample(); mAsyncTask.cancel(true);This example demonstrate about how to cancel an executing AsyncTask 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 when ...
Read MoreWith an active backlog in BTech, can I get a job in the software field?
It really does not matter whether you complete your B.Tech or not if you have software skills. Many companies are allowing one or two backlogs when they select the students during campus interviews.A lot of my friends who have one or two backlogs are already placed in good companies like Deloitte, Wipro, and others based on their technical knowledge by the end of 4th year, even before final exams. At the end of the day, you have to complete the graduation. But, for time being you can start working in the software field.
Read MoreGroup month and year in MySQL?
You can group month and year with the help of function DATE_FORMAT() in MySQL. The GROUP BY clause is also used.The syntax is as follows −SELECT DATE_FORMAT(yourColumnName, '%m-%Y') from yourTableName GROUP BY MONTH(yourColumnName), YEAR(yourColumnName)DESC;To understand the above concept, let us create a table. The following is the query to create a table −mysql> create table GroupMonthAndYearDemo −> ( −> DueDate datetime −> ); Query OK, 0 rows affected (1.49 sec)Insert records in the table using the following query −mysql> insert into GroupMonthAndYearDemo values(now()); Query OK, 1 row affected (0.11 sec) ...
Read MoreProgramming the 8253
According to the microprocessor point of view, the 8253 is designed and has some specialty port chip I/O. We don't use it for interfering the I/O devices. For performing the application of time it is used. 8253 has the addressed A1 and A0 input pins.The counters have width of 16 bits. If they were 8-bits wide, the delay in time that would be generated is very small. The Least Significant Byte and the Most Significant Byte of a counter is selected by using the same address of the port.The processor here writes to the control port to configure the working of ...
Read MoreWhat is the use of the app PhonePe?
PhonePe is a very popular and useful application especially in today’s era of digitization. The app is named after Fin-Tech company, the headquarters of which are in Bangalore, India. It is quite recent, as it was found in December 2015.Uses of PhonePe1. Mobile recharge: By using this app, you can get your mobile phone recharged very easily. You simply need to mention the amount, phone number and the appropriate mobile operator's name. You can even browse plans. You don’t have to load funds into your wallet for the recharge. Rather, you can make payments from your bank account by using ...
Read MorePerform MySQL delete under safe mode?
To delete under safe mode, you can use the below query −SET SQL_SAFE_UPDATES = 0;To understand the above query, let us create a table. The following is the query to create a table −mysql> create table SafeDeleteDemo −> ( −> Price int −> ); Query OK, 0 rows affected (0.50 sec)Insert some records in the table with the help of insert command. The query is as follows −mysql> insert into SafeDeleteDemo values(100); Query OK, 1 row affected (0.11 sec) mysql> insert into SafeDeleteDemo values(200); Query OK, 1 row affected (0.19 sec) mysql> insert into SafeDeleteDemo ...
Read MoreWho is known as the Father of Internet?
Vinton G. Cerf is known as the “Father of the Internet". He is the co-designer of the TCP/IP protocols and the architecture of the Internet. The US President, Bill Clinton presented the U.S. National Medal of Technology to Cerf and his colleague, Robert E. Kahn, for founding and developing the wonderful creation of the Internet in December 1997.The contribution of Cerf and his colleagues have been acknowledged and applauded all over the world. Today, we cannot imagine our lives without the Internet.Vint Cerf has been awarded many honorary degrees and prizes that include the Turing Award, the Presidential Medal of ...
Read MoreIn MySQL how to select the top 2 rows for each group?
To select the top 2 rows from each group, use the where condition with subquery. Let us create a table. The query to create a table is as follows:mysql> create table selectTop2FromEachGroup -> ( -> Name varchar(20), -> TotalScores int -> ); Query OK, 0 rows affected (0.80 sec)Now insert some records in the table using insert command. The query is as follows:mysql> insert into selectTop2FromEachGroup values('John', 32); Query OK, 1 row affected (0.38 sec) mysql> insert into selectTop2FromEachGroup values('John', 33); Query OK, 1 row affected (0.21 sec) mysql> insert into selectTop2FromEachGroup values('John', 34); Query OK, ...
Read MoreCreate a BigDecimal via string in Java
Let us see how we can create BigDecimal values via string. Here, we have set string as a parameter to the BigDecimal constructor.BigDecimal val1 = new BigDecimal("375789755.345778656"); BigDecimal val2 = new BigDecimal("525678755.155778656");We can also perform mathematical operations on it −val2 = val2.subtract(val1);The following is an example −Example Live Demoimport java.math.BigDecimal; public class Demo { public static void main(String[] argv) throws Exception { BigDecimal val1 = new BigDecimal("375789755.345778656"); BigDecimal val2 = new BigDecimal("525678755.155778656"); System.out.println("Value 1 : "+val1); System.out.println("Value 2 : "+val2); val2 = val2.subtract(val1); System.out.println("Result (Subtraction) = "+val2); } }OutputValue 1 : 375789755.345778656 Value 2 : 525678755.155778656 Result (Subtraction) = 149888999.810000000
Read MoreSplit the left part of a string by a separator string in MySQL?
You can use substring_index() function from MySQL to split the left part of a string. The syntax is as follows −SELECT yourColumnName1, .....N, SUBSTRING_INDEX(yourColumnName, ’yourSeperatorSymbol’, 1) as anyVariableName from yourTableName;The value 1 indicates that you can get left part of string. To check the above syntax, let us create a table. The query to create a table is as follows −mysql> create table LeftStringDemo -> ( -> Id int, -> Words varchar(100) -> ); Query OK, 0 rows affected (0.92 sec)Insert some records in the table using insert ...
Read More