George John has Published 1167 Articles

FILTER_VALIDATE_REGEXP constant in PHP

George John

George John

Updated on 30-Jul-2019 22:30:23

689 Views

The FILTER_VALIDATE_REGEXP constant validates a value against a Perl-compatible regular expression. Options regexp − The regular expression to validate against. Return The FILTER_VALIDATE_REGEXP constant does not return anything. Example Live Demo The following is the output. Matched String!

C++11 features in Visual Studio 2015

George John

George John

Updated on 30-Jul-2019 22:30:23

250 Views

C++11 is a version of standard C++ language. It was approved by International Organization for Standardization (ISO) on 12 August 2011 then C++14 and C++17. C++11 makes several additions to the core language. Visual C++ implements the vast majority of features in C++11. Some of the following C++11 features in ... Read More

Python Alternate repr() implementation

George John

George John

Updated on 30-Jul-2019 22:30:23

312 Views

In Python, if we want to limit the large amount of data from displaying, we can use the reprlib module. To use this module, we should import it using. import reprlib There are different classes and methods related to reprlib. These are − Class reprlib.Repr The Repr class ... Read More

Pseudo-terminal Utilities in Python

George John

George John

Updated on 30-Jul-2019 22:30:23

1K+ Views

The Pseudo-terminal utility module pty is defined to handle pseudo-terminal concepts. Using this we can start another process, and also can read or write from controlling terminal using programs. This module is highly platform oriented. We should use UNIX systems to perform these operations. To use the pty module, we ... Read More

Python Interface to UNIX syslog library routines

George John

George John

Updated on 30-Jul-2019 22:30:23

221 Views

To get the UNIX syslog library information, we need to use the syslog module into our programs. This module has syslog has different modules for the syslog library. To use this module, we should import it using − import syslog The methods are like below − Method syslog.syslog(message) ... Read More

How can I get enum possible values in a MySQL database?

George John

George John

Updated on 30-Jul-2019 22:30:23

240 Views

We can achieve possible enum value with the help of ‘enum’. The following is the syntax. yourColumnName ENUM(value1, value2, ........................N) Let us first create a table. mysql> create table EnumDemo -> ( -> Light int, -> IsONOrOff ENUM('ON', ... Read More

Use ReaderWriter Lock in C#

George John

George John

Updated on 30-Jul-2019 22:30:23

531 Views

ReaderWriterLock synchronize access to a resource. A ReaderWriterLock has better throughput than a Monitor, which is one-at-a-time lock. This works for a situation when a resource is changed rarely. Let us see how to declare a ReaderWriter lock in C# − static ReaderWriterLock r = new ReaderWriterLock(); ... Read More

How can I add items to a spinner in Android?

George John

George John

Updated on 30-Jul-2019 22:30:23

7K+ Views

Spinner is just like a drop down button, using this button we can select a item from set of items. This example demonstrate about how to add items to a spinner in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill ... Read More

Literals in Java programming

George John

George John

Updated on 30-Jul-2019 22:30:23

299 Views

A literal is a source code representation of a fixed value. They are represented directly in the code without any computation. Literals can be assigned to any primitive type variable. For example. byte a = 68; char a = 'A'; byte, int, long, and short can be expressed ... Read More

What is the maximum length of a table name in MySQL?

George John

George John

Updated on 30-Jul-2019 22:30:23

1K+ Views

The maximum length of a table name is 64 characters long according to MySQl version 8.0.12. Check your installed MySQL version. mysql> select version(); The following is the output. +-----------+ | version() | +-----------+ | 8.0.12 | +-----------+ 1 row in set (0.03 sec) ... Read More

Advertisements