Environment variables can be set at the command prompt. This is done to affect the current invocation of the command processor, or to permanently set to affect the future invocations. To set a variable permanently, it can be set in a startup file or with the help of the interface provided by the system for the same purpose. The documentation of the command interpreter needs to be consulted for specific details.To specify a value for an environment variable, the syntax relevant for the command processor needs to be used.The command to set environment variables can be executed at the command ... Read More
Let us understand how to set environment variables on Linux for MySQL −Environment variables can be set at the command prompt. This is done to affect the current invocation of the command processor, or to permanently set to affect the future invocations.To set a variable permanently, it can be set in a startup file or with the help of the interface provided by the system for the same purpose. The documentation of the command interpreter needs to be consulted for specific details. To specify a value for an environment variable, the syntax relevant for the command processor needs to be ... Read More
Before a compressed table is created, ensure that the innodb_file_per_table configuration option is enabled, and innodb_file_format is set to Barracuda. These parameters can be found in the MySQL configuration file my.cnf or my.ini, or with the SET statement without having to shut down the MySQL server.To enable compression for a table, the clauses ROW_FORMAT=COMPRESSED, KEY_BLOCK_SIZE, or both can be used in a CREATE TABLE or ALTER TABLE statement.Let us see the statements to create a compressed table −QuerySET GLOBAL innodb_file_per_table=1; SET GLOBAL innodb_file_format=Barracuda; CREATE TABLE t1 (c1 INT PRIMARY KEY) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;Here, If ROW_FORMAT=COMPRESSED is specified, the KEY_BLOCK_SIZE can be ... Read More
The new features in MySQL 8.0 have been briefly listed below −Transactional Data DictionaryA transactional data dictionary to store information about object.Atomic Data Definition LanguageAn atomic data definition language (DDL) statement to combine updates made to data dictionary, storage engine operations and so on.Security EnhancedThe security levels have been improved, and DBA (Database administrator) has been given greater flexibility for account management.EncryptionThe encryption defaults have been defined and implemented globally for table encryption. The ‘default_table_encryption’ variable is used to define an encryption default for schemas that have been newly created. The default encryption for a schema can be defined with ... Read More
The compression operation is used only if both client and server support ‘zlib’ compression, and the client requests compression.Usage of mysqldumpThe advantage of using compression is that it reduces the size of the payloadOn the other hand, the disadvantage of using compression is that it increases the computation time.Performance benefits will depend largely on the size of the result set which is being sent.In addition to this, the network bandwidth and latency between the database server and its clients also matters. The larger the result set, the larger will be the latency.In other words, the lesser the bandwidth, the more ... Read More
ProblemHow to print the long lines into two or more short lines based on specified length in the program using C Language?SolutionLet’s write a code to read a long line and print into two or more short lines according to the mentioned size in the program.The built in functions that we take in this program readline() function, is used to store text in array and returns the size of line.The logic we use to read a short sentence is explained below −while((charcter=readtext())>0){ if(charcter>length){ count=0; a=0; while(alength){ count=0; a=0; while(a
Here, we will learn how to detect and track the motion of eyeball in OpenCV.The following program demonstrates to detect the eyeball and track the location.Example#include #include #include #include #include #include using namespace cv; using namespace std; Vec3f eyeBallDetection(Mat& eye, vector& circles) { vectorsums(circles.size(), 0); for (int y = 0; y < eye.rows; y++) { uchar* data = eye.ptr(y); for (int x = 0; x < eye.cols; x++) { int pixel_value = static_cast(*data); for (int i = 0; i < circles.size(); i++) { ... Read More
Here, we will learn how to track the eye in OpenCV. After detective the eyes, the tracking is an effortless and straightforward task. We used the circle to enclose the detected eyes. Tracking the center of the circle means tracking the center of eyes. To track the center of the circle, we need two integer variables. This has been done on the first two lines (9th and 10th line) inside the main() function. The name of the integer variables is 'x_axis' and 'y_axis'.In line 42 and 43, the horizontal and vertical coordinate values of the center have been copied to ... Read More
Here, we will learn how to detect the eye in OpenCV. We will use haarcascade_eye.xml classifier located in 'C:/opencv/sources/data/haarcascades' to detect the eyes. To detect the eyes, we need to add these headers.The first header is , and it is the header of C++ programming language. Reading writing images and user interface functionalities are defined in 'highgui' header. We need to add 'imgproc' header to enhance image quality, and we also use 'objdetect' header to detect face and eyes.The following program to demonstrate how to detect and track eye in OpenCV.Example#include #include #include #include using namespace cv; using namespace std; ... Read More
We will learn how to track the face in real-time in OpenCV. This program is same to the previous program and difference is that we used ellipse instead of rectangle to identify the face and we also used additional 'cout' statement to show the co-ordinate of the face in the console window.The following program to detect human face in real-time −Example#include #include #include //This header includes definition of 'rectangle()' function// #include //This header includes the definition of Cascade Classifier// #include using namespace std; using namespace cv; int main(int argc, char** argv) { Mat video_stream;//Declaring a matrix hold frames from ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP