
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
Ankith Reddy has Published 996 Articles

Ankith Reddy
646 Views
The '_thread' module in Python library provides a low-level interface for working with light-weight processes having multiple threads sharing a global data space. For synchronization, simple locks (also called mutexes or binary semaphores) are defined in this module. The 'threading' built-in module provides a higher-level threading API built on top ... Read More

Ankith Reddy
3K+ Views
To find the MySQL data directory, we can simply use the variable datadir. Let us see how to use the variable with select statement.The query is as follows −mysql> select @@datadir;Here is the output+---------------------------------------------+ | @@datadir ... Read More

Ankith Reddy
409 Views
Provisions of the struct module in the Python library are useful in performing conversions between C type structs and Python bytes objects. This can be achieved by module level functions as well as Struct class and its methods as defined in the struct module.The conversion functions use a format string. ... Read More

Ankith Reddy
1K+ Views
You can get the first and last date of next month using date_add() function from MySQL.The syntax is as follows -select date_sub( last_day( date_add(now(), interval anyIntervalTime) ), interval day( last_day( date_add(now(), interval anyIntervalTime) ) ... Read More

Ankith Reddy
1K+ Views
The ModuleFinder class in 'modulefinder' module can determine set of modules imported by a certain script. This module has a command line interface as well as programmatic interface.For demonstration of functionality, use following script#modfinder.py import hello try: import trianglebrowser import nomodule, mymodule except ImportError: ... Read More

Ankith Reddy
1K+ Views
Yes, you can use if() function from MySQL to reverse a boolean field. The syntax is as follows −UPDATE yourTableName SET yourBooleanColumnName = IF(yourBooleanColumnName, 0, 1);To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table ReverseBooleanField -> ... Read More

Ankith Reddy
1K+ Views
You can quote values using concat() and grop_concat() function from MySQL. The syntax is as follows −SELECT GROUP_CONCAT(CONCAT(' '' ', yourColumnName, ' '' ' )) as anyVariableName from yourTableName;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table ... Read More

Ankith Reddy
6K+ Views
To query a list of values, you can use IN operator. The syntax is as follows −SELECT * FROM yourTableName WHERE yourColumnName IN(Value1, Value2, ...N) ORDER BY FIELD(yourColumnName, Value1, Value2, ...N);To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> ... Read More

Ankith Reddy
2K+ Views
Instead of simulating an array variable, use temporary table in MySQL. The syntax is as follows −create temporary table if not exists yourTemporaryTableName select yourColumnName1, yourColumnName2, ......N from yourTableName where conditionTo understand the above syntax, let us first create a table. The query to create a table is as follows ... Read More

Ankith Reddy
408 Views
To get ER model of database from server, you need to first launch MySQL Workbench. The snapshot is as follows −After that you need to select the “Database” menu −Database->Reverse EngineerAfter that a wizard will open as in the following screenshot. Add the password and press OK twice.After pressing the ... Read More