The HTML DOM Input DatetimeLocal readOnly property sets/returns whether Input DatetimeLocal can be modified or not.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputDatetimeLocalObject.readOnlySetting readOnly to booleanValueinputDatetimeLocalObject.readOnly = booleanValueBoolean ValuesHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that the input datetimeLocal field is readOnly.falseIt defines that the input datetimeLocal field is not readOnly and can be modified.ExampleLet us see an example of Input DatetimeLocal readOnly property − Live Demo Input DatetimeLocal readOnly form { width:70%; margin: 0 auto; text-align: center; } * { ... Read More
The KeyboardEvent keyCode property returns the unicode character codes corresponding to character that was pressed using an event.Note − Use key property instead for accurate resultsSyntaxFollowing is the syntax −Returning latest typed character’s keyCode −event.keyCodeExampleLet us see an example for KeyboardEvent keyCode property − Live Demo KeyboardEvent keyCode form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } KeyboardEvent-keyCode ... Read More
This is a C++ program to perform integer partition for a specific case. In this program, a positive integer n is given, and shall have to generate all possible unique ways to represent n as sum of positive integers.AlgorithmBegin function displayAllUniqueParts(int m): 1) Set Index of last element k in a partition to 0 2) Initialize first partition as number itself, p[k]=m 3) Create a while loop which first prints current partition, then generates next partition. The loop stops when the current partition has all 1s. 4) Display current partition as displayArray(p, k + ... Read More
When we execute certain SQL queries (SELECT query in general) they return tabular data.The java.sql.ResultSet interface represents such tabular data returned by the SQL statements.i.e. the ResultSet object holds the tabular data returned by the methods that execute the statements which quires the database (executeQuery() method of the Statement interface in general).The ResultSet object has a cursor/pointer which points to the current row. Initially this cursor is positioned before first row.The findColumn() method of the ResultSet interface maps the column label to column index. Using this you can find the index of a particular column in the result set.This method accepts a String ... Read More
You can use regular expression for this. Let us first create a table −mysql> create table DemoTable ( UserId varchar(100) ); Query OK, 0 rows affected (1.28 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('User-123-G'); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable values('Us-453-GO'); Query OK, 1 row affected (0.08 sec) mysql> insert into DemoTable values('TRUE-908-K'); Query OK, 1 row affected (0.20 sec)Display all records from the table using select statement −mysql> select *from DemoTable;This will produce the following output −+------------+ | UserId | ... Read More
Display a component in the form of rows and columns using the GridLayout. Here, we have set a panel, within which we will create a layout with 3 rows and 5 columns −JPanel panel = new JPanel(new GridLayout(3, 5, 5, 5));Now, loop through and display JTextArea from 1 to 15 i.e. 3 rows and 5 columns −for (int i = 1; i
In this article, we will learn about useful and important functions in PHP for file inclusion. All these functions require, require_once, include and include_once are utilized to include the files in the php page but there is a slight distinction among them in terms of functionality.Let's discuss these functions below with their functionality.include() :This function is used to include a file in a PHP page. If include() function is not able to find a specified file on location at that time it will throw a warning message however, it will not stop script execution.require():This function is utilized to add a ... Read More
This method belongs to the System class of the java.lang package. It terminates the current JVM (Java Virtual Machine).This method accepts an integer value representing the status code, it accepts two values 0 or, 1 or, -1. Where, 0 indicates a successful termination and 1 or, -1 indicates an unsuccessful termination.ExampleFollowing program accepts an array of elements from the user and prints the it. While printing if any of the given elements is greater or equal to 20 the program exits. Live Demoimport java.util.Scanner; public class System_Exit_Example { public static void main(String args[]){ Scanner sc = new ... Read More
You can use having clause. Let us first create a table −mysql> create table DemoTable -> ( -> AdmissionDate varchar(100) -> ); Query OK, 0 rows affected (0.55 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('10/12/2017'); Query OK, 1 row affected (0.18 sec) mysql> insert into DemoTable values('01/11/2018'); Query OK, 1 row affected (0.12 sec) mysql> insert into DemoTable values('31/01/2019'); Query OK, 1 row affected (0.18 sec) mysql> insert into DemoTable values('09/06/2019'); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable values('19/04/2019'); Query OK, 1 ... Read More
The HTML DOM Input DatetimeLocal required property determines whether Input DatetimeLocal is compulsory to set or not.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputDatetimeLocalObject.requiredSetting required to booleanValueinputDatetimeLocalObject.required = booleanValueBoolean ValuesHere, “booleanValue” can be the following −booleanValueDetailstrueIt is compulsory to set the datetimeLocal field to submit form.falseIt is the default value and to set datetimeLocal field is not compulsory.ExampleLet us see an example of Input DatetimeLocal required property − Input DatetimeLocal required form { width:70%; margin: 0 auto; text-align: center; } * { ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP