Arjun Thakur has Published 1025 Articles

DoubleStream max() method in Java

Arjun Thakur

Arjun Thakur

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

266 Views

The max() method of the DoubleStream class returns an OptionalDouble describing the maximum element of this stream, or an empty OptionalDouble if this stream is empty.The syntax is as follows.OptionalDouble max()Here, OptionalDouble is a container object which may or may not contain a double value.To use the DoubleStream class in ... Read More

How to store query result (a single document) into a variable?

Arjun Thakur

Arjun Thakur

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

552 Views

To store query result (a single document) into a variable, you can use var. Following is the syntaxvar anyVariableName=db.yourCollectionName.find().limit(1); yourVariableName; //Print the records;Let us first create a collection with documents> db.storeQueryResultDemo.insertOne({"ClientName":"Chris", "ClientAge":23}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c9ecf8fd628fa4220163b8d") } > db.storeQueryResultDemo.insertOne({"ClientName":"Robert", "ClientAge":21}); {    "acknowledged" : true, ... Read More

What is a config Object in JSP?

Arjun Thakur

Arjun Thakur

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

424 Views

The config object is an instantiation of javax.servlet.ServletConfig and is a direct wrapper around the ServletConfig object for the generated servlet.This object allows the JSP programmer access to the Servlet or JSP engine initialization parameters such as the paths or file locations etc.The following config method is the only one ... Read More

How can I make my layout scroll vertically?

Arjun Thakur

Arjun Thakur

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

325 Views

Before getting into example , we should know what is vertical Scroll View(Scroll View). Vertical Scroll view provide by android.widget.ScrollView class . It is used to scroll child views in vertical direction.This example demonstrate about how to use Vertical Scroll view.Step 1 − Create a new project in Android Studio, go ... Read More

8086 program to subtract two 8 bit BCD numbers

Arjun Thakur

Arjun Thakur

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

2K+ Views

In this program we will see how to subtract two 8-bit BCD numbers.Problem StatementWrite 8086 Assembly language program to subtract two 8-bit BCD number stored in memory address offset 600.DiscussionThis task is too simple. Here we are taking the numbers from memory and after adding we need to put DAS ... Read More

Find inside a hash MongoDB?

Arjun Thakur

Arjun Thakur

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

278 Views

To find inside a hash MongoDB, you can use dot(.) notation. Let us first create a collection with documents> db.hashDemo.insertOne({"ClientName":"Larry", "ClientAge":23, "ClientDetails":{ "isEducated": true, "ClientProject" : "University Management"}}); {    "acknowledged" : true,    "insertedId" : ObjectId("5ca1ef1266324ffac2a7dc5e") } > db.hashDemo.insertOne({"ClientName":"Chris", "ClientAge":26, "ClientDetails":{ "isEducated":false, "ClientProject" : "Online Book Store"}}); {   ... Read More

How to upload a file using JSP?

Arjun Thakur

Arjun Thakur

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

342 Views

Click the Below link to Know how to Upload a file Using JSPhttps://www.tutorialspoint.com/jsp/jsp_file_uploading.htm

Create Ennead Tuple from a List collection in Java

Arjun Thakur

Arjun Thakur

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

134 Views

To create Ennead Tuple from a List collection, use the fromCollection() method. Firstly, create a List like this and then create an Ennead Tuple using ListList myList = new ArrayList(); myList.add("Accessories"); myList.add("Shirt"); myList.add("Trousers"); myList.add("Furniture"); myList.add("Smart Wearable Tech"); myList.add("Smart Home Automation"); myList.add("Books"); myList.add("Stationery"); myList.add("Instrument");Let us first see what we need to ... Read More

Best way to store weekly event in MySQL?

Arjun Thakur

Arjun Thakur

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

257 Views

Let us see the best way to store weekly events in MySQL. For that, first create a new table and include fields for every day as well.mysql> create table WeeklyEventDemo -> ( -> ID int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> ... Read More

Resolve error 1045 (28000) access denied for user 'root'@'localhost' (using password: YES)?

Arjun Thakur

Arjun Thakur

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

5K+ Views

To fix this error, you need to specify the -p option for password.The syntax is as followsmysql -uyourUserName -pLet us implement it.First, we need to open CMD using Windows+R shortcut keys. The snapshot is as followsType CMD and press OK button. You will get a command prompt.The snapshot is as ... Read More

Advertisements