George John has Published 1167 Articles

What are filters in JSP?

George John

George John

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

146 Views

Servlet and JSP Filters are Java classes that can be used in Servlet and JSP Programming for the following purposes To intercept requests from a client before they access a resource at the back end.To manipulate responses from the server before they are sent back to the client.There are various types ... Read More

IntStream flatMap() method in Java

George John

George John

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

613 Views

The flatMap() method of the IntStream class returns a stream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element.The syntax is as followsIntStream flatMap(IntFunction

Query MySQL database to echo highest auto incremented number?

George John

George John

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

63 Views

Let us first create a table with Id as auto_increment −mysql> create table DemoTable (    UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    UserName varchar(20) ); Query OK, 0 rows affected (0.56 sec)Insert some records in the table using insert command −mysql> insert into DemoTable(UserName) values('John'); Query OK, 1 ... Read More

How to revert rows to default column value in MySQL?

George John

George John

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

146 Views

To revert rows to default column value, let us first create a demo tablemysql> create table defaultDemo    -> (    -> Id int    -> ); Query OK, 0 rows affected (0.48 sec)Insert some records in the table using insert command.The query is as followsmysql> insert into defaultDemo values(10); ... Read More

What are copy elision and return value optimization in C++?

George John

George John

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

201 Views

The Copy Elision is also known as the Copy Omission. This is one of the compiler optimization technique. It avoids the unnecessary copying of objects. Almost any current compiler uses this Copy Elision technique.Let us see how it works by the help of one example code.Example Code#include using namespace ... Read More

C++ Scope of Variables

George John

George John

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

215 Views

A scope is a region of the program and broadly speaking there are three places, where variables can be declared −Inside a function or a block which is called local variables, In the definition of function parameters which is called formal parameters.Outside of all functions which is called global variables.We ... Read More

8085 Program to perform selection sort in ascending order

George John

George John

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

579 Views

Now let us see a program of Intel 8085 Microprocessor. In this program we will see how to sort a sequence of numbers using selection sort.Problem Statement:Write 8085 Assembly language program to sort a given sequence using selection sort in ascending order. The numbers are stored at 8001H onwards. 8000H ... Read More

How to count number of specific symbols in a row in MySQL?

George John

George John

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

387 Views

You can use LENGTH() to count number of specific symbols in a row. Let us first create a table −mysql> create table DemoTable (    Value varchar(200) ); Query OK, 0 rows affected (0.54 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('?1234?6789?5656?324?'); Query OK, ... Read More

Wide char and library functions in C++

George John

George John

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

3K+ Views

In this section we will see what is the wide character in C++. We will also see some functions that are used to handle wide characters.Wide characters are similar to character datatype. The main difference is that char takes 1-byte space, but wide character takes 2-bytes (sometimes 4-byte depending on ... Read More

How to display the bit(1) fields in MySQL?

George John

George John

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

607 Views

Let us first create a table. Here, our columns is of type bit(1) −mysql> create table DemoTable (    isCaptured bit(1) ); Query OK, 0 rows affected (1.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(0); Query OK, 1 row affected (0.26 sec) mysql> ... Read More

Advertisements