What is Ethereum?

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

286 Views

Before we talk about Ethereum let us first understand the concept of Decentralized network of Bitcoin which laid the foundation for the following Decentralized networks. Bitcoin digital currency was invented by Satoshi Nakamoto in 2009 as using a decentralized and transparent network.Bitcoin uses Cryptography + Proof of work + Decentralized network architecture together. The algorithm of Bitcoins is written in “Turing Incomplete” language, which understands only a limited set of orders like, who has sent the money, how much and who received it.While Bitcoin aims to remove a centralized authority to create the currency, Ethereum uses the Block Chain to ... Read More

Display 5 Different Cards in a CardLayout in Java

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

839 Views

Use CardLayout layout and set it to panel −JPanel panel = new JPanel(); CardLayout cardLayout = new CardLayout(); panel.setLayout(cardLayout);In the same way create 5 panels and 5 buttons to display 5 different cards.The following is an example to display 5 different cards in CardLayout −Examplepackage my; import java.awt.BorderLayout; import java.awt.CardLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; public class SwingDemo {    public static void main(String[] args) {       JFrame frame = new JFrame();       frame.setSize(550, 300);       JPanel panel = new JPanel();       JPanel panel1 = new JPanel();     ... Read More

Hide Track on the Slider in Java

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

282 Views

To hide the track on the slider, you need to use the setPaintTrack() method and set it to FALSE −JSlider slider = new JSlider(JSlider.HORIZONTAL, 0, 100, 55); slider.setInverted(true); slider.setMinorTickSpacing(10); slider.setMajorTickSpacing(25); slider.setPaintTicks(true); slider.setPaintLabels(true); slider.setPaintTrack(false);The above method setPaintTrack() is by default set to TRUE.The following is an example to hide the track on the slider −Examplepackage my; import java.awt.Color; import java.awt.Font; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JSlider; import javax.swing.WindowConstants; public class SwingDemo {    public static void main(String[] args) {       JFrame frame = new JFrame("Frame with Slider");       JSlider slider = new JSlider(JSlider.HORIZONTAL, 0, 100, 55);   ... Read More

Get Part of String After Specified Character in JavaScript

vineeth.mariserla
Updated on 30-Jul-2019 22:30:26

16K+ Views

To get a part of a string, string.substring() method is used in javascript. Using this method we can get any part of a string that is before or after a particular character.str.substring() This method slices a string from a given start index(including) to end index(excluding). If only one index is provided then the method slice the entire string from the start of the index. syntax-1Using this line of code we can get a part of a string after a particular character.string.substring(string.indexOf(character) + 1);syntax-2Using this line of code we can get a part of a string before a particular character.string.substring(0, string.indexOf(character));ExampleLive Demo ... Read More

Absolute and Relative Imports in Python

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

707 Views

Many times when we create python code we find that we need to access code from another python file or package. This is when you need to import that other python file or package into your current code. So the straight forward way to achieve this is just written the below statement at the top of your current python program.import package_name or module_name or from pacakge_name import module_name/object_nameWhen the above statement is parsed the interpreter does the following.The interpreter will look for names in the cache of all modules that have already been imported previously. The name of this cache ... Read More

HTML DOM Input Color Autofocus Property

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

145 Views

The HTML DOM Input Color autofocus property sets/returns whether Input Color is focused upon initial page load.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputColorObject.autofocusSetting autofocus to booleanValueinputColorObject.autofocus = booleanValueBoolean ValueHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that input will be autofocused on page load.falseIt is the default value and input is not autofocused.ExampleLet us see an example of Input Color autofocus property − Live Demo Input Color Autofocus Color Picker: Remove Auto Focus    var divDisplay = document.getElementById("divDisplay");    var inputColor = document.getElementById("Color");    divDisplay.textContent = 'Autofocus: '+inputColor.autofocus function removeAutoFocus() {   ... Read More

HTML DOM Input Text Value Property

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

191 Views

The HTML DOM Input Text value property returns a string, which is the value of the value attribute of input Text. User can also set it to a new string.SyntaxFollowing is the syntax −Returning string valueinputTextObject.valueSetting value attribute to a string valueinputTextObject.value = ‘String’ExampleLet us see an example of Input Text value property − Live Demo Input Text value    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {     ... Read More

How Secure is Bitcoin Currency?

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

297 Views

From a connoisseur to a novice who deal in Bitcoin have a number of questions in terms of the security of this currency. However, they should not be worried because crypto is securer than existing currencies, banks, and other financial institutes.Thanks to Blockchain technology, which is backing it. Transactions are recorded in public, distributed ledger turn it more transparent and makes it even harder to temper it.However, cryptocurrency transactions and Blockchain ledgers do have a few security flaws, but they are not essentially the fault of the underlying technology. The structure of Bitcoin and its Blockchain means there are facets ... Read More

Java DatabaseMetaData getSearchStringEscape Method with Example

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

194 Views

The getSearchStringEscape() method of the DatabaseMetaData interface is used to get the that is used to escape the wildcard characters ('_' or, '%') by the underlying database.This method returns a string parameter representing the value that is used to escape wildcard charactersTo get the DatabaseMetaData object −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, ... Read More

Retrieve Values from Nested JSON Array in MongoDB

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

1K+ Views

To retrieve values from nested JSON array, you can use the below syntax −db.yourCollectionName.find({"yourOuterFieldName.yourInnerFieldName.yourNextInnerFieldName…...N": "yourValue"}).pretty();Let us first create a collection with documents −> db.nestedJSONArrayDemo.insertOne({ ...    "ClientDetails" : ...    { ...       "ClientPersonalDetails" : [ ...          { "CountryName" : "US" }, ...          { "CountryName" : "AUS"}, ...          { "ClientName":"Chris" }, ...          { "ClientName":"David" } ...       ] ...    } ... }); {    "acknowledged" : true,    "insertedId" : ObjectId("5cd2cbb2b64f4b851c3a13bc") } > db.nestedJSONArrayDemo.insertOne({ ...    "ClientDetails" : ... ... Read More

Advertisements