HTML DOM Input Color Autofocus Property

Kumar Varma
Updated on 30-Jul-2019 22:30:26

130 Views

The HTML DOM Input Color autofocus property sets/returns whether Input Color is focused upon initial page load.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputColorObject.autofocusSetting autofocus to booleanValueinputColorObject.autofocus = booleanValueBoolean ValueHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that input will be autofocused on page load.falseIt is the default value and input is not autofocused.ExampleLet us see an example of Input Color autofocus property − Live Demo Input Color Autofocus Color Picker: Remove Auto Focus    var divDisplay = document.getElementById("divDisplay");    var inputColor = document.getElementById("Color");    divDisplay.textContent = 'Autofocus: '+inputColor.autofocus function removeAutoFocus() {   ... Read More

HTML DOM Input Text Value Property

AmitDiwan
Updated on 30-Jul-2019 22:30:26

179 Views

The HTML DOM Input Text value property returns a string, which is the value of the value attribute of input Text. User can also set it to a new string.SyntaxFollowing is the syntax −Returning string valueinputTextObject.valueSetting value attribute to a string valueinputTextObject.value = ‘String’ExampleLet us see an example of Input Text value property − Live Demo Input Text value    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {     ... Read More

How Secure is Bitcoin Currency?

Prasanna Kotamraju
Updated on 30-Jul-2019 22:30:26

260 Views

From a connoisseur to a novice who deal in Bitcoin have a number of questions in terms of the security of this currency. However, they should not be worried because crypto is securer than existing currencies, banks, and other financial institutes.Thanks to Blockchain technology, which is backing it. Transactions are recorded in public, distributed ledger turn it more transparent and makes it even harder to temper it.However, cryptocurrency transactions and Blockchain ledgers do have a few security flaws, but they are not essentially the fault of the underlying technology. The structure of Bitcoin and its Blockchain means there are facets ... Read More

Java DatabaseMetaData getSearchStringEscape Method with Example

Vikyath Ram
Updated on 30-Jul-2019 22:30:26

175 Views

The getSearchStringEscape() method of the DatabaseMetaData interface is used to get the that is used to escape the wildcard characters ('_' or, '%') by the underlying database.This method returns a string parameter representing the value that is used to escape wildcard charactersTo get the DatabaseMetaData object −Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver class corresponding to the underlying database.Get the connection object using the getConnection() method of the DriverManager class. Pass the URL the database and, user name, password of a user in the database, ... Read More

Retrieve Values from Nested JSON Array in MongoDB

Nishtha Thakur
Updated on 30-Jul-2019 22:30:26

1K+ Views

To retrieve values from nested JSON array, you can use the below syntax −db.yourCollectionName.find({"yourOuterFieldName.yourInnerFieldName.yourNextInnerFieldName…...N": "yourValue"}).pretty();Let us first create a collection with documents −> db.nestedJSONArrayDemo.insertOne({ ...    "ClientDetails" : ...    { ...       "ClientPersonalDetails" : [ ...          { "CountryName" : "US" }, ...          { "CountryName" : "AUS"}, ...          { "ClientName":"Chris" }, ...          { "ClientName":"David" } ...       ] ...    } ... }); {    "acknowledged" : true,    "insertedId" : ObjectId("5cd2cbb2b64f4b851c3a13bc") } > db.nestedJSONArrayDemo.insertOne({ ...    "ClientDetails" : ... ... Read More

Remove Menus from MenuBar in Java

Chandu yadav
Updated on 30-Jul-2019 22:30:26

461 Views

Remove a menu from the MenuBar using the remove() method. Set the index for the menu you want to remove from the MenuBar.Let’s say we have the following two menus initially −The following is an example to remove one the above menus. Let’s say we are removing the 2nd menus “Edit” −Examplepackage my; import java.awt.event.KeyEvent; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; public class SwingDemo {    public static void main(final String args[]) {       JFrame frame = new JFrame("MenuBar Demo");       frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);       JMenuBar menuBar = new JMenuBar();       JMenu ... Read More

Main Difference Between Objects Created Using Object Literal and Constructor Function

vineeth.mariserla
Updated on 30-Jul-2019 22:30:26

2K+ Views

Objects created using object literal are singletons, this means when a change is made to the object, it affects the object entire the script. Whereas if an object is created using constructor function and a change is made to it, that change won't affect the object throughout the script. Let's discuss them individually.1) Objects created using object literalSince these are singletons, a change to an object persists throughout the script. A change in one instance will affect all the instances of the object. In the following example if we observe, both the objects "student" and "newStudent" display the same name(Ravi) initially. But ... Read More

HTML DOM Input Color DefaultValue Property

Rama Giri
Updated on 30-Jul-2019 22:30:26

170 Views

The HTML DOM Input Color defaultValue property sets/returns the default value corresponding to a color. It may or may not be same as value attribute.SyntaxFollowing is the syntax −Returning string valueinputColorObject.defaultValueSetting defaultValue to stringinputColorObject.defaultValue = ‘string’Boolean ValueHere, “string” can be the following −booleanValueDetails#000000 - #ffffffIt defines that input color can have a default value between the defined rangeExampleLet us see an example of Input Color defaultValue property − Live Demo Input Color Default Value Color Picker: Get Default Value    var divDisplay = document.getElementById("divDisplay");    var inputColor = document.getElementById("Color");    function getDefaultValue() { ... Read More

HTML DOM Input Time Autofocus Property

AmitDiwan
Updated on 30-Jul-2019 22:30:26

104 Views

The HTML DOM Input Time autofocus property sets/returns whether Input Time is focused upon initial page load.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputTimeObject.autofocusSetting autofocus to booleanValueinputTimeObject.autofocus = booleanValueBoolean ValuesHere, “booleanValue” can be the following:booleanValueDetailstrueIt defines that input will be autofocused on initial page load.falseIt is the default value and input is not autofocused.ExampleLet us see an example of Input Time autofocus property − Live Demo Input Time autofocus    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px; ... Read More

str vs repr in Python

Chandu yadav
Updated on 30-Jul-2019 22:30:26

3K+ Views

Both str() and repr() methods in python are used for string representation of a string. Though they both seem to serve the same puppose, there is a little difference between them.Have you ever noticed what happens when you call a python built-in function str(x) where x is any object you want? The return value of str(x) depends on two methods: __str__ being the default choice and __repr__ as a fallback.Let’s first see what python docs says about them −>>> help(str) Help on class str in module builtins: class str(object) | str(object='') -> str | str(bytes_or_buffer[, encoding[, errors]]) -> str ... Read More

Advertisements