How to spend Bitcoin?

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

337 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
Updated on 30-Jul-2019 22:30:26

154 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
Updated on 30-Jul-2019 22:30:26

759 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
Updated on 30-Jul-2019 22:30:26

250 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

HTML <form> autocomplete Attribute

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

175 Views

The autocomplete attribute of the element allows you to set whether the autocomplete for the form should be on or off. The web browser automatically fills the values if the autocomplete is on. This only happens if the user already entered values before.Following is the syntax −Above, on | off values are to be set for autocomplete to appear or not. Set on if you want the browser to complete the entries based on previously entered values, whereas off doesn’t allow to complete the entries.Let us now see an example to implement the autocomplete attribute of the element ... Read More

HTML DOM Input Week readOnly Property

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

140 Views

The HTML DOM Input Week readOnly property sets/returns whether Input Week can be modified or not.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputWeekObject.readOnlySetting readOnly to booleanValueinputWeekObject.readOnly = booleanValueBoolean ValuesHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that the input week field is readOnly.falseIt defines that the input week field is not readOnly and can be modified.ExampleLet us see an example for Input Week readOnly property − Live Demo Input Week readOnly    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: ... Read More

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

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

648 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

Java DatabaseMetaData getSQLKeywords() method with example

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

343 Views

This method retrieves the list of all the SQL keywords of the underlying database and returns in the form of a String variable which holds all the keywords separated by commas.To get the list of keywords in the database −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, as String variables.Get the DatabaseMetaData ... Read More

Sort a MySQL table column value by part of its value?

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

201 Views

You can use ORDER BY RIGHT() for this. Let us first create a table −mysql> create table DemoTable    (    UserId varchar(100)    ); Query OK, 0 rows affected (0.33 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('User1234'); Query OK, 1 row affected (0.07 sec) mysql> insert into DemoTable values('User9874'); Query OK, 1 row affected (0.06 sec) mysql> insert into DemoTable values('User9994'); Query OK, 1 row affected (0.04 sec) mysql> insert into DemoTable values('User1211'); Query OK, 1 row affected (0.20 sec) mysql> insert into DemoTable values('User1012'); Query OK, 1 ... Read More

How to create a JSpinner in Java with values as numbers?

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

346 Views

Use SpinnerNumberModel to create a spinner with value as numbers −SpinnerModel value = new SpinnerNumberModel(10, 0, 20, 1);Now set the values −JSpinner spinner = new JSpinner(value);The following is an example to create a JSpinner with values as numbers −Examplepackage my; import java.awt.Font; import javax.swing.*; public class SwingDemo {    public static void main(String[] args) {       JFrame frame = new JFrame("Spinner Demo");       SpinnerModel value = new SpinnerNumberModel(10, 0, 20, 1);       JSpinner spinner = new JSpinner(value);       spinner.setBounds(50, 80, 70, 100);       frame.add(spinner);       frame.setSize(550,300);       frame.setLayout(null);       frame.setVisible(true);    } }This will produce the following output −

Advertisements