Karthikeya Boyini has Published 2193 Articles

HTML DOM Option text Property

karthikeya Boyini

karthikeya Boyini

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

149 Views

The HTML DOM option text property returns and modify the text of an option in the HTML document.SyntaxFollowing is the syntax −1. Returning textobject.text2. Modifying textobject.text = “text”ExampleLet us see an example of HTML DOM option text property − Live Demo    html{       height:100%;   ... Read More

HTML DOM Input FileUpload disabled Property

karthikeya Boyini

karthikeya Boyini

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

571 Views

The HTML DOM FileUpload disabled property returns and modify the value of disabled attribute of a FileUpload input type in HTML.SyntaxFollowing is the syntax −1. Returning disabledobject.disabled2. Setting disabledobject.disabled = true|false;ExampleLet us see an example of HTML FileUpload disabled property − Live Demo    body{       ... Read More

How can I update and increment two fields in one command in MongoDB?

karthikeya Boyini

karthikeya Boyini

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

301 Views

Let us first create a collection with documents −> db.incrementDemo.insertOne({"Value1":10, "Value2":20}); {    "acknowledged" : true,    "insertedId" : ObjectId("5cbdaf07de8cc557214c0e15") }Display all documents from a collection with the help of find() method. The query is as follows −> db.incrementDemo.find().pretty();This will produce the following output −{    "_id" : ObjectId("5cbdaf07de8cc557214c0e15"),   ... Read More

How can I use a script to create users in MongoDB?

karthikeya Boyini

karthikeya Boyini

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

310 Views

You can use createUser() method for this. Following is the syntax −db.createUser(    {       user: "yourUserName",       pwd: "yourPassword",       roles: [ { role: "read", db: "yourDatabaseName" } ]    } );Let us create a user in MongoDB. Here, we are using database ... Read More

MongoDB shutdown option is unavailable? How to get it?

karthikeya Boyini

karthikeya Boyini

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

78 Views

You need to switch the database to admin. Following is the syntax −use adminThe syntax is as follows for shutdown option −db.shutdownServer()Let us implement the above syntax for shutdown −> use admin switched to db admin > db.shutdownServer()This will produce the following output −server should be down... 2019-04-22T19:11:40.949+0530 I NETWORK ... Read More

HTML DOM Input FileUpload Object

karthikeya Boyini

karthikeya Boyini

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

328 Views

The HTML DOM input FileUpload Object represents the

HTML DOM Input FileUpload type Property

karthikeya Boyini

karthikeya Boyini

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

159 Views

The HTML DOM input FileUpload type property returns the value of type attribute of an element in an HTML document.SyntaxFollowing is the syntax −object.typeExampleLet us see an example of HTML DOM input file upload type property − Live Demo    body{       text-align:center;     ... Read More

HTML DOM Input Hidden Object

karthikeya Boyini

karthikeya Boyini

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

434 Views

The HTML DOM input hidden object represents the element with type=”hidden” of an HTML document.Create input hidden object −SyntaxFollowing is the syntax −var hiddenInput = document.createElement(“INPUT”); hiddenInput.setAttribute(“type”, ”hidden”);PropertiesFollowing are the properties of HTML DOM input hidden Object −PropertyExplanationformIt returns the cite of the form that contain the hidden input ... Read More

Convert NumberLong to String in MongoDB?

karthikeya Boyini

karthikeya Boyini

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

1K+ Views

In order to convert NumberLong to String in MongoDB, you can use toString() −NumberLong('yourValue').valueOf().toString();To convert NumberLong to String, you can use valueOf() as well −NumberLong('yourValue').valueOf();Let us implement both the above syntaxes.Following is the query to convert NumberLong to String with toString() −> NumberLong('1000').valueOf().toString();This will produce the following output −1000Following is ... Read More

HTML DOM Input Hidden form Property

karthikeya Boyini

karthikeya Boyini

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

171 Views

The HTML DOM input hidden form property returns the reference of the form that contain the hidden input field in the HTML document.SyntaxFollowing is the syntax −object.formExampleLet us see an example of HTML DOM input hidden form property − Live Demo    body{       text-align:center;   ... Read More

Advertisements