The HTML DOM Input Color disabled property sets/returns whether Input Color is enabled or disabled.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputColorObject.disabledSetting disabled to booleanValueinputColorObject.disabled = booleanValueBoolean ValuesHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that the input color is disabled.falseIt defines that the input color is not disabled and it is also the default value.ExampleLet us see an example of Input Color disabled property − Live Demo Input Color Disabled Color Picker: Enable Color Input var divDisplay = document.getElementById("divDisplay"); var inputColor = document.getElementById("Color"); divDisplay.textContent = 'Color Input disabled: ... Read More
The HTML DOM Input Time defaultValue property sets/returns the default value corresponding to Time Input. The value attribute changes as the user changes the time but default value does not change.SyntaxFollowing is the syntax −Returning string valueinputTimeObject.defaultValueSetting defaultValue to stringinputTimeObject.defaultValue = ‘string’ExampleLet us see an example of Input Time defaultValue property − Live Demo Input Time defaultValue form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: ... Read More
This might fall upon like a shock on those who think that only cash can be transact from an ATM. In this era of crypto and digital currency, things have taken a leap now. Thanks to technology! As of April 2019, there are more than 4, 518 bitcoin ATMs across the globe, the number is constantly on the surge, and so is the miners considering the fascination for this currency.However, the thought of getting them cash out leave many miners baffled; however, this read has been created to clear the air about all the doubts you have.The Functionality of Bitcoin ... Read More
This example demonstrate about How to style an Android notification using InboxStyleStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to src/MainActivity.package app.tutorialspoint.com.notifyme ; import android.app.NotificationChannel ; import android.app.NotificationManager ; import android.os.Bundle ; import android.support.v4.app.NotificationCompat ; import android.support.v7.app.AppCompatActivity ; import android.view.View ; public class MainActivity extends AppCompatActivity { public static final String NOTIFICATION_CHANNEL_ID = "10001" ; private final static String default_notification_channel_id = "default" ... Read More
It is up to you how much space you want. You need to use the parameter size to set. Use below syntax −db.createCollection(‘yourCollectionName’, capped=true, size=yourValue);Let us implement the above syntax in order to allow size for a capped collection −> db.createCollection('cappedCollectionMaximumSize', capped=true, size=1948475757574646); { "ok" : 1 }Let us check the description of the above collection −> db.cappedCollectionMaximumSize.find().explain();This will produce the following output −{ "queryPlanner" : { "plannerVersion" : 1, "namespace" : "test.cappedCollectionMaximumSize", "indexFilterSet" : false, "parsedQuery" : { }, "winningPlan" ... Read More
Use the setVgap() method to set the vertical gap between elements in a GridLayout. Let’s say we have a GridLaypout −GridLayout layout = new GridLayout(3, 3);Set the horizontal gap −layout.setVgap(30);The following is an example −Examplepackage my; import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import java.awt.GridLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextArea; import javax.swing.WindowConstants; public class SwingDemo { public static void main(String[] args) { JFrame frame = new JFrame("Sections"); JPanel panel = new JPanel(); panel.setBackground(Color.blue); GridLayout layout = new GridLayout(3, 3); ... Read More
Yes, we can avoid the _id, using the following syntax in MongoDB −db.yourCollectionName.find({}, { _id:0});Let us first create a collection with documents:>> db.excludeIdDemo.insertOne({"CustomerName":"Larry"}); { "acknowledged" : true, "insertedId" : ObjectId("5cd7f62c1a844af18acdffb9") } > db.excludeIdDemo.insertOne({"CustomerName":"Chris"}); { "acknowledged" : true, "insertedId" : ObjectId("5cd7f6311a844af18acdffba") } > db.excludeIdDemo.insertOne({"CustomerName":"Mike"}); { "acknowledged" : true, "insertedId" : ObjectId("5cd7f6351a844af18acdffbb") } > db.excludeIdDemo.insertOne({"CustomerName":"Bob"}); { "acknowledged" : true, "insertedId" : ObjectId("5cd7f6381a844af18acdffbc") }Following is the query to display all documents from a collection with the help of find() method −> db.excludeIdDemo.find().pretty();This will produce the following output −{ "_id" : ObjectId("5cd7f62c1a844af18acdffb9"), "CustomerName" : "Larry" } ... Read More
The Input Color form property returns the reference of enclosing form for input color.SyntaxFollowing is the syntax −Returning reference to the form objectinputColorObject.formExampleLet us see an example of Input Color form property − Live Demo Input Color Form Color Picker: Get Form ID function getFormID() { var inputColor = document.getElementById("Color"); var divDisplay = document.getElementById("divDisplay"); divDisplay.textContent = 'Form ID for color input: '+inputColor.form.id; } OutputThis will produce the following output −Before clicking ‘Get Form ID’ button −After clicking ‘Get Form ID’ button −
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 isBeforeFirst() method of the ResultSet interface is used to determine whether the cursor is at the default position of the ResultSet.rs.isBeforeFirst();This method returns an boolean this value is true, if the cursor is ... Read More
You can use $setIntersection operator along with aggregate framework to filter array elements in MongoDB. Let us first create a collection with documents −> db.filterArrayElementsDemo.insertOne( { "Scores": [10, 45, 67, 78, 90, 98, 99, 92] } ); { "acknowledged" : true, "insertedId" : ObjectId("5cd2d582b64f4b851c3a13c8") }Following is the query to display all documents from a collection with the help of find() method −> db.filterArrayElementsDemo.find().pretty();This will produce the following output −{ "_id" : ObjectId("5cd2d582b64f4b851c3a13c8"), "Scores" : [ 10, 45, 67, 78, 90, ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP