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
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
How do I programmatically "restart" an Android app?
There are some situations, we need to restart whole application programmatically. This example demonstrates how do I programmatically “restart” an Android app.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 a text view. When the user clicks on text view, it will restart the whole application.package com.example.andy.myapplication; import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.view.View; ...
Read MoreNegative Binary Numbers
Negative numbers can be distinguishable with the help of extra bit or flag called sign bit or sign flag in Binary number representation system for signed numbers. It is not possible to add minus or plus symbol in front of a binary number because a binary number can have only two symbol either 0 or 1 for each position or bit. That’s why we use this extra bit called sign bit or sign flag. The value of sign bit is 1 for negative binary numbers and 0 for positive numbers.When an integer binary number is positive, the sign is represented ...
Read MoreWhy MySQL NOT NULL shouldn't be added to primary key field?
You do not need to add NOT NULL to primary key field because it gets NOT NULL automatically. Primary key is combination of both NOT NULL and Unique Key.Here is the demo of primary key field. Let us first create a table. The query to create a table is as follows:mysql> create table NotNullAddDemo -> ( -> Id int AUTO_INCREMENT, -> PRIMARY KEY(Id) -> ); Query OK, 0 rows affected (0.81 sec)In the above table, you do not need to add NOT NULL to primary key field because MySQL internally converts it into NOT NULL. To ...
Read MoreGetting last 5 character of a string with MySQL query?
To get the first n characters of string with MySQL, use LEFT(). To get the last n char of string, the RIGHT() method is used in MySQL.The syntax for RIGHT() method is as follows −SELECT RIGHT(yourColumnName, valueOfN) as anyVariableName from yourTableName;To understand the above concept, let us create a table. The query to create a table is as follows −mysql> create table gettingLast5Characters −> ( −> BookName varchar(100) −> ); Query OK, 0 rows affected (0.73 sec)Now you can insert records in the table using insert command. The query is as follows −mysql> insert into gettingLast5Characters values('Introduction ...
Read MoreWhat is the order of events of Republic day celebration at Red Fort?
Republic day in India is celebrated on 26th of January every year and holds a seminal value. The day is celebrated in grandeur in the capital city's India Gate. Various events take place in the capital city and elsewhere to celebrate the framing of the Indian Constitution.Order of Events On Republic DayPrime Minister lays a floral wreath at Amar Jawan Jyoti. It is an Indian memorial constructed post the Indo-Pakistani War of 1971 to commemorate the martyred soldiers of the Indian Armed Forces who died during the war.President along with his bodyguards proceeds to the parade ground in Red Fort. ...
Read MoreCan I opt for the EMI option using my debit card on e-commerce websites?
The online market is worth millions at the moment and there is a complete generation who loves shopping online, especially on EMI. I also purchased a Smart Television on last Diwali and that too on EMIs and still paying. However, I have the satisfaction of giving this as a surprise gift to my ‘die-hard web series’ fan wife who wanted to enjoy the streaming on a larger screen.However, many folks among us get deprived of picking the most needful air-conditioner at the blazing summer or the latest 8th generation laptop for higher studies just because they carry mere a debit ...
Read MoreHow to add shadow Effect for a Text in Android?
This example demonstrates how to add shadow Effect for a Text 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 a text view with shadow properties as shown below -android:shadowColor = "#000" android:shadowDx = "-2" android:shadowDy = "-2" android:shadowRadius = "1"In the above tags indicates about shadow color, Axis's(X, Y) and shadow radius for text view.Step 3 − Add the following code to src/MainActivity.javapackage ...
Read MoreWhy is Visible Learning more effective?
A good teacher teaches the children putting his best efforts, whereas a better teacher evaluates the effects of his teaching on his students and tries to improve his way of teaching. End of the day, improvement in the status of the student and his learning is more important.An improved process called as Visible Learning was made by John Hattie to help the teachers evaluate their teaching process. It says, “Know Thy Impact” by showing what the teachers have taught and what did the students learn, which enables to understand the gap so as to bridge it.Visible Learning is the concept ...
Read MoreHow was the writing style of Thomas Hardy different from Charles Dickens?
Victorian age is known as the richest age of English Literature. There was a rise in so many writings in terms of prose, fiction, and poetry. Out of the famous novelists, the contribution of Thomas Hardy and Charles Dickens cannot be overlooked.Thomas HardyBorn in Higher Bockhampton, Dorset, England on June 2, 1840, Thomas Hardy was a pessimistic critic and a novelist. His inclination towards the countryside and life of Vessex was reflected in his works.The man-nature relationship remains very indifferent to the man of his writings.In fact, Hardy's tragic vision is a part of his pessimism.The role of fate is ...
Read MoreWhat should I do? Select int as currency or convert int to currency format in MySql?
To convert int to current format, use CONCAT() with FORMAT() function from MySQL.The syntax is as follows −SELECT CONCAT(‘CurrencySymbol’, FORMAT(yourColumnName, valueAfterDecimal)) as AnyVariableName from yourTableName;To understand the above syntax, let us create a table. The query to create a table −mysql> create table AddingCurrencySymbolDemo −> ( −> Amount int −> ); Query OK, 0 rows affected (1.50 sec)Insert records in the table using insert command. The query is as follows −mysql> insert into AddingCurrencySymbolDemo values(250); Query OK, 1 row affected (0.22 sec) mysql> insert into AddingCurrencySymbolDemo values(500); Query OK, 1 ...
Read More