
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Smita Kapse has Published 498 Articles

Smita Kapse
965 Views
You can use $ne(not equal) operator for this. The syntax is as follows −db.yourCollectionName.find({yourFieldName: {$ne: true}}).pretty();To understand the above syntax, let us create a collection with the document. The query to create a collection with a document is as follows −> db.queryForBooleanFieldsDemo.insertOne({"EmployeeName":"Larry", "EmployeeAge":24, "isOldEmployee":true}); { "acknowledged" : true, ... Read More

Smita Kapse
446 Views
You can use LPAD() from MySQL to pad the beginning of a MySQL INT field with zeroes. Let us first create a table.mysql> create table paddingDemo -> ( -> Number int -> ); Query OK, 0 rows affected (0.49 sec)Following is the query to insert some records ... Read More

Smita Kapse
357 Views
In this section, we will see how to reverse a string very quickly using C++. For reversing there is a built-in function in the algorithm library, called reverse(). This function takes the beginning and the ending pointer of a container, then reverse the elements.Input: A number string “Hello World” Output: ... Read More

Smita Kapse
3K+ Views
To insert a NULL value, you can use UPDATE command. Following is the syntax −UPDATE yourTableName SET yourColumnName=NULL;Let us first create a table −mysql> create table insertNullValue -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> ClientName varchar(100), -> ClientCountryName varchar(20) -> ); ... Read More

Smita Kapse
515 Views
If a directed graph is given, determine if a vertex j is reachable from another vertex i for all vertex pairs (i, j) in the given graph. Reachable mean that there is a path from vertex i to j. This reachability matrix is called transitive closure of a graph. Warshall ... Read More

Smita Kapse
1K+ Views
This example demonstrate about How to get current time from Network provider 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. ... Read More

Smita Kapse
780 Views
To rename a collection in MongoDB, you can use renameCollection() method. The syntax is as follows −db.yourOldCollectionName.renameCollection('yourNewCollectionName');To understand the above syntax, let us list all the collections from database sample. The query is as follows −> use sample; switched to db sample > show collections;The following is the output −copyThisCollectionToSampleDatabaseDemo ... Read More

Smita Kapse
6K+ Views
In this section, we will see how to tokenize strings in C. The C has library function for this. The C library function char *strtok(char *str, const char *delim) breaks string str into a series of tokens using the delimiter delim.Following is the declaration for strtok() function.char *strtok(char *str, const ... Read More

Smita Kapse
1K+ Views
To select rows with more than 2 decimal places, use SUBSTR() function from MySQL. Let us first create a table −mysql> create table selectRows2DecimalPlacesDemo -> ( -> Amount varchar(100) -> ); Query OK, 0 rows affected (0.73 sec)Following is the query to insert records in the table ... Read More

Smita Kapse
434 Views
In this section, we will see how to convert an integer to a string.The logic is very simple. Here we will use the sprintf() function. This function is used to print some value or line into a string, but not in the console. This is the only difference between printf() ... Read More