Articles on Trending Technologies

Technical articles with clear explanations and examples

How to set all the values at once using the model in a JProgressBar with Java?

Ankith Reddy
Ankith Reddy
Updated on 30-Jul-2019 123 Views

The getModel() method is used to set all the values at once for a JProgressBar −int newVal = 5; int newMin = 0; int newMax = 100; progressBar.getModel().setRangeProperties(newVal, 0, newMin, newMax, true);The following is an example to set all the values at once using the model in a progress bar −Examplepackage my; import javax.swing.*; public class SwingDemo extends JFrame {    JProgressBar progressBar;    int i = 0;    SwingDemo() {       int min = 0;       int max = 1000;       progressBar = new JProgressBar(min, max);       int newVal = 5; ...

Read More

8085 program for pulse waveform

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 4K+ Views

Now let us see a program of Intel 8085 Microprocessor. In this program we will see how to generate pulse waveform.Problem Statement:Write 8085 Assembly language program to generate continuous square wave.DiscussionTo generate square wave with 8085, we will rotate 10101010 (AAH) continuously. We have to send D0 as output. We will mask the accumulator content by 01H. If this is 0, then output will be 0, if it is 1, output will be 1, thus the pulse will be generated.InputNo input is given in this caseFlow Diagram programAddressHEX CodesLabelsMnemonicsComments800016, AA MVI D, AAHLoad 10101010 into D80027AROTATEMOV A, DLoad D to A800307 RLCRotate A ...

Read More

How to query all items in MongoDB?

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 356 Views

To query all items, use find(). Let us first create a collection with documents −> db.queryAllItemsDemo.insertOne({"StudentDetails":{"StudentName":"John", "StudentSubject":["MongoDB", "MySQL"], "StudentSubjectPrice":[4000, 6000]}, "OtherDetails":{"UserAge":29, "UserCountryName":"US"}}); {    "acknowledged" : true,    "insertedId" : ObjectId("5cef74ecef71edecf6a1f69f") }Display all documents from a collection with the help of find() method −> db.queryAllItemsDemo.find().pretty();This will produce the following output −{    "_id" : ObjectId("5cef74ecef71edecf6a1f69f"),    "StudentDetails" : {       "StudentName" : "John",       "StudentSubject" : [          "MongoDB",          "MySQL"       ],       "StudentSubjectPrice" : [          4000,         ...

Read More

Logical Link Control (LLC)

Moumita
Moumita
Updated on 30-Jul-2019 13K+ Views

The logical link control (LLC) is the upper sublayer of the data link layer of the open system interconnections (OSI) reference model for data transmission. It acts act an interface between the network layer and the medium access control (MAC) sublayer of the data link layer.The LLC sublayer is mainly used for its multiplexing property. It allows several network protocols to operate simultaneously within a multipoint network over the same network medium.LLC Layer in the OSI ModelThe Open System Interconnections (OSI) model is a 7 – layered networking framework that conceptualizes how communications should be done between heterogeneous systems. The ...

Read More

How to create a database on command line in MySQL?

George John
George John
Updated on 30-Jul-2019 4K+ Views

First, you need to open the command prompt. You can open using shortcut windows+R key.The screenshot is as follows −Now type CMD and press OK button −Now the following command prompt would be visible −Now reach the MySQL bin directory. The screenshot is as follows −Following is the query to run MySQL in the command line to create a database −Now you can check the database is created or not using SHOW DATABASES command −mysql> SHOW DATABASES;This will produce the following output −+---------------------------+ | Database                  | +---------------------------+ | bothinnodbandmyisam       ...

Read More

How to spend Bitcoin?

Prasanna Kotamraju
Prasanna Kotamraju
Updated on 30-Jul-2019 342 Views

The concept behind the inception of Bitcoin and Block chain was to introduce the world to a network and currency that bring a Distributed network and currency which is transparent and easy to use across multiple platforms. It brought about a radical change to the way we shop and add value as humans. It is a good news for the Bitcoin lovers who use Bitcoin simply as an investment, that the programmability of the coin API actually enables infinite possibilities of uses. Despite that once you earn this crypto, there are multiple options to use this dynamic currency.People who are ...

Read More

How can we get the values of a JProgressBar Component and display in Console?

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 155 Views

Let’s say we have set the following values for JProgressBar −int min = 0; int max = 1000; progressBar = new JProgressBar(min, max);Now, get the above values and display in the Console −int value = progressBar.getValue(); System.out.println("Value = "+value); System.out.println("Minimum = "+progressBar.getMinimum()); System.out.println("Maximum = "+progressBar.getMaximum());The following is an example to get the values of a progress bar component −Examplepackage my; import javax.swing.*; public class SwingDemo extends JFrame {    JProgressBar progressBar;    int i = 0;    SwingDemo() {       int min = 0;       int max = 1000;       progressBar = new JProgressBar(min, ...

Read More

8085 program to check whether both the nibbles of 8 bit number are equal or not

Ankith Reddy
Ankith Reddy
Updated on 30-Jul-2019 766 Views

Here we will see how to check whether two nibbles of a number are same or not.Problem StatementWrite 8085 Assembly language program to check whether upper nibble and lower nibbles are same or not.DiscussionTo check the nibbles, we have to mask at first. So we need to mask the lower nibble and upper nibble and store them into different registers. The upper nibble will be shifted to the right four bits to make it lower nibble. Then we can check both are same or not. If they are same store 00 at F150 location, otherwise store FF at F150 location.InputAddressDataF050FE AddressDataF050AA Flow ...

Read More

Get distinct first word from a string with MongoDB?

Anvi Jain
Anvi Jain
Updated on 30-Jul-2019 251 Views

To get distinct first word from a string, you can use distinct(). Let us first create a collection with documents −> db.distinctFirstWordDemo.insertOne(    {       "_id": 100,       "StudentName":"John",       "StudentFeature": "John is a good player",       "Subject":"MongoDB"    } ); { "acknowledged" : true, "insertedId" : 100 } > db.distinctFirstWordDemo.insertOne(    {       "_id": 101,       "StudentName":"Carol",       "StudentFeature": "Carol is not a good player",       "Subject":"MongoDB"    } ); { "acknowledged" : true, "insertedId" : 101 }Display all documents from a collection ...

Read More

C++ Program to Find the Mode in a Data Set

Samual Sam
Samual Sam
Updated on 30-Jul-2019 649 Views

This is a C++ program to find the Mode in a data set.AlgorithmsBegin    function insertinset() to insert data in the set.    Create newnode and temp(t) node.    Node to be inserted in the list using newnode.    If head is null then       assign new node to head and increase the count.    During insertion perform insertion sort for sorting data.    If the newnode->data is equal to any of the element present in the set,       then just increment count. EndExample#include using namespace std; struct set // a structure set to declare ...

Read More
Showing 57821–57830 of 61,248 articles
Advertisements