- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
George John has Published 1167 Articles
George John
163 Views
This example demonstrate about How to get default phone Network Specifier 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 ... Read More
George John
11K+ Views
Long strings can be written in multiple lines by using two double quotes ( “ “ ) to break the string at any point in the middle.A program that demonstrates this in C is given as follows.Example Live Demo#include int main() { char *str = "This is the method ... Read More
George John
10K+ Views
Combination and permutation are a part of Combinatorics. Permutation is the different arrangements that a set of elements can make if the elements are taken one at a time, some at a time or all at a time. Combination is is the different ways of selecting elements if the elements ... Read More
George John
654 Views
Static variables can be defined using the static keyword. They are variables that remain in memory while the program is running i.e. their lifetime is the entire program run. This is different than automatic variables as they remain in memory only when their function is running and are destroyed when ... Read More
George John
14K+ Views
The entire array can be initialized to zero very simply. This is shown below.int arr[10] = {0};However, it is not possible to initialize the entire array to a non-zero value using the above method. This is shown below.int arr[10] = {5};In the above example, only the first element will be ... Read More
George John
2K+ Views
In C/C++, a variable name can have alphabets, numbers and underscore( _ ) character. There are some keywords in C/C++ language, apart from them everything is treated as identifier. Identifiers are the name of variable, constants, functions etc.We can not specify the identifier which starts with a number because there ... Read More
George John
6K+ Views
The prepended double colon is also known as the scope resolution operator. Some of the uses of this operator are given as follows.Define a function outside a classThe scope resolution operator can be used to define a function outside a class. A program that demonstrates this is given as follows.Example Live ... Read More
George John
1K+ Views
We can enable the MySQL slow query log with the help of SET statement.The following is the syntax.SET GLOBAL slow_query_log = 'Value';In the above syntax, value can be filled with ON/OFF. To enable slow query log, let us see the query.mysql> SET GLOBAL slow_query_log = 'ON'; Query OK, 0 rows ... Read More
George John
151 Views
Unique in MySQL means we cannot add duplicate records. Let us now see how to create a unique constraint in the column at the time of creating a table.mysql> create table UniqueConstDemo - > ( - > name varchar(100) unique - > ); Query OK, 0 rows affected (0.72 sec)Now, ... Read More
George John
2K+ Views
We can remove the leading and trailing whitespaces from MySQL with the help of trim() function.The following is the syntax.mysql> SELECT TRIM(' AnyStringWithWhitespaces ');Let us now implement the above syntax in the below query.mysql> SELECT TRIM(' Leading And Trailing whitespaces Demo '); Here is the output that removes the whitespaces.+---------------------------------------+ ... Read More