Using HTML forms, you can easily take user input. The tag is used to get user input, by adding the form elements. Different types of form elements include text input, radio button input, submit button, etc.Let’s learn about the tag, which helps you to take user input using the type attribute. The attribute is used with the form elements such as text input, checkbox, radio, etc.ExampleYou can try to run the following code to take user input using HTML Forms:Live Demo HTML Forms ... Read More
The subexpression/metacharacter “\E” ends the quoting begun with \Q. i.e. you can escape metacharacters in the regular expressions by placing them in between \Q and \E. For example, the expression [aeiou] matches the strings with vowel letters in it.Example Live Demoimport java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern; public class SampleProgram { public static void main( String args[] ) { String regex = "[aeiou]"; Scanner sc = new Scanner(System.in); System.out.println("Enter input string: "); String input = sc.nextLine(); //Creating a Pattern object Pattern pattern = ... Read More
If your website is having a sufficient content and a good number of page views, then start adding some advertisements to earn money. Google AdSense is a free and easy way to earn money by placing ads on your website.Integrating Google AdSense on a website is quite easy. Let’s see the steps:Go to the official website and SIGN IN with the Google Account, which you want to use for AdSense.Setup the account will all the details i.e. website information, content language, etc.Read the Google AdSense Terms and Conditions and follow the Google rules. Also, read the Google Program Policies and do ... Read More
As of now, Intel is taking few of the last breaths left in the colossally competitive smartphone and tablet market. Intel drained out millions and billions of dollars in developing and marketing its mobile processor department. The PC chip manufacturer couldn’t stand a chance when it had to face the likes of Qualcomm and Mediatek as per my opinion.Inside IntelAccording to an Intel spokesperson, the company had to cancel two of its Atom-based chips immediately. These chips were code-named, Sofia and Broxton. These are perhaps the first few products that Intel has terminated for bringing in a revamp in its ... Read More
The PatternSyntaxException class represents an unchecked exception thrown in case of a syntax error in regex string. This class contains three main methods namely −getDescription() − Returns the description of the error.getIndex() − Returns the error index.getPattern() − Returns the regular expression pattern with error.getMessage() − Returns the complete message congaing the error, index, regular expression pattern with error, indication of the error in the pattern.Example Live Demoimport java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; public class PatternSyntaxExceptionExample { public static void main(String args[]) { //Reading String from user System.out.println("Enter a String"); ... Read More
You can form matched groups in the regular expression by separating the expressions with parenthesis. In following regular expression the first group matches digits and the second group matches the English alphabet −(\d)([A-Za-z])In short, it matches the part in the input string where a digit followed by an alphabet.Since the expression $1 indicates Group1 and $2 indicates Group2, if you replace The above Java regular expression with $1 $2, using the replace() method (of the String class) a space will be added between number and a word in the given input string when a number is followed by a word.Example Live ... Read More
The HTML tag is for declaring style sheets within the head of the HTML document and the technique is known as Internal CSS to add CSS to HTML Page. CSS can be used in various ways in HTML. One of them is by using Internal CSS i.e. using a tag.The tag is used in the … tag. It defines CSS style for a single page.ExampleYou can try to run the following code to use the tagLive Demo h1 {color: green;} p {font-size: 14px;} Tutorials We provide free learning content.
Following regular expression matches a string that contains at least one alphanumeric characters −"^.*[a-zA-Z0-9]+.*$";Where, ^.* Matches the string starting with zero or more (any) characters.[a-zA-Z0-9]+ Matches at least one alpha-numeric character..*$ Matches the string ending with zero or more (ant) characters.Example 1 Live Demoimport java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Example { public static void main(String args[]) { //Reading String from user System.out.println("Enter a string"); Scanner sc = new Scanner(System.in); String input = sc.nextLine(); //Regular expression String regex = "^.*[a-zA-Z0-9]+.*$"; ... Read More
In layman language, an acronym is a word formed by taking letters of each word in a phrase to form an abbreviation. Acronyms are a subset of abbreviations i.e. abbreviation is a shortened form of a word.The tag isn’t supported in HTML5 and is deprecated now. Do not use. To add abbreviation in HTML, use the tag. Both abbreviation and acronym are the shortened versions and are represented as a series of letters. Some of the examples include, "Mr.", "IST", "MRI", “NASA”, “ISRO” etc. ExampleYou can try to run the following code to add abbreviation in HTML.Live Demo ... Read More
The defer attribute is used to specify that the script execution occurs when the page loads. It is used only for external scripts and is a boolean attribute.ExampleThe following code shows how to use the defer attribute:Live Demo The external file added will load later, since we're using defer
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP