George John has Published 1081 Articles

How to match one character in MySQL in place of %?

George John

George John

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

183 Views

To match only one character in MySQL, you can use underscore(_) in place of %. The syntax is as follows:SELECT *FROM yourTableName WHERE yourColumnName LIKE ‘yourString_’;To understand the above syntax, let us create a table. The query to create a table is as follows:mysql> create table OneCharactermatchDemo    -> ( ... Read More

filter_input_array() function in PHP

George John

George John

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

566 Views

The filter_input_array() function gets names of external variables and filters them optionally. Syntax filter_input_array(type, arraydefine, add_empty) Parameters type − There are five types of inputs to check i.e. INPUT_GET, INPUT_POST, INPUT_COOKIE, INPUT_SERVER, or INPUT_ENV. arraydefine − It specifies an array of filter arguments. It is optional. add_empty ... Read More

filter_var_array() function in PHP

George John

George John

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

614 Views

The filter_var_array() function is used to filter multiple variables. Syntax filter_var_array(arrayname, parameters) Parameters arrayname − An array to filter the data. parameters − It specifies an array of filter arguments. Return The filter_var_array() function returns an array of values of the requested variables on success or ... Read More

Python Basic date and time types

George John

George John

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

7K+ Views

To manipulate dates and times in the python there is a module called datetime. There are two types of date and time objects. The types are naïve and the aware. In the naïve object, there is no enough information to unambiguously locate this object from other date-time objects. In this ... Read More

FILTER_VALIDATE_REGEXP constant in PHP

George John

George John

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

991 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

376 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 Interface to UNIX syslog library routines

George John

George John

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

335 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

Use ReaderWriter Lock in C#

George John

George John

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

767 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

9K+ 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

545 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

Advertisements