The JSON is one of the widely used data-interchange formats and is a lightweight and language independent. The json.simple is a lightweight JSON processing library that can be used to read and write JSON files and it can be used to encode or decode JSON text and fully compliant with JSON specification (RFC4627). In order to read a JSON file, we need to download the json-simple.jar file and set the path to execute it.json fileExampleimport java.io.*; import java.util.*; import org.json.simple.*; import org.json.simple.parser.*; public class JSONReadFromTheFileTest { public static void main(String[] args) { JSONParser parser = new JSONParser(); try { ... Read More
In this tutorial, we are going to learn how can we detect a mobile device over which we are working using JavaScript. Approach 1: Using the navigator.userAgent Property To detect a mobile device with JavaScript we are going to use the window navigator object which contains all the information regarding a browser. The property which we will use to detect a mobile device will be the userAgent property which is used to return the user-agent header sent to the server by the browser. The value we receive from this property is the browser name, version, and platform i.e., all the ... Read More
Hardware, Software, Data, Database Access Language, Procedures and Users all together form the components of a DBMS.Let us discuss the components one by one clearly.HardwareThe hardware is the actual computer system used for keeping and accessing the database. The conventional DBMS hardware consists of secondary storage devices such as hard disks. Databases run on the range of machines from micro computers to mainframes.SoftwareSoftware is the actual DBMS between the physical database and the users of the system. All the requests from the user for accessing the database are handled by DBMS.DataIt is an important component of the database management system. ... Read More
To select the last row, we can use ORDER BY clause with desc (descending) property and Limit 1. Let us first create a table and insert some records with the help of INSERT command. The query is as follows. mysql> create table getLastRecord -> ( -> Id int, -> Name varchar(100) -> ); Query OK, 0 rows affected (0.61 sec) After creating the above table, we will insert records with the help of INSERT command. mysql> insert into getLastRecord values(1, 'John'); Query OK, 1 row affected (0.13 sec) ... Read More
To delete a key from a map, we can use Go's built-in delete() function. It should be noted that when we delete a key from a map, its value will also be deleted as the key-value pair is like a single entity when it comes to maps in Go.SyntaxThe syntax of the delete function is shown below.delete(map, key)Once we call the function in the above format, then the key from the map will be deleted.Now, let's use the above function in Go code and understand how it works.Example 1Consider the code shown belowpackage main import ( "fmt" ) ... Read More
Token bucket algorithm is one of the techniques for congestion control algorithms. When too many packets are present in the network it causes packet delay and loss of packet which degrades the performance of the system. This situation is called congestion.The network layer and transport layer share the responsibility for handling congestions. One of the most effective ways to control congestion is trying to reduce the load that transport layer is placing on the network. To maintain this network and transport layers have to work together.The Token Bucket Algorithm is diagrammatically represented as follows −With too much traffic, performance drops ... Read More
We use inline style attribute with the CSS property text-decoration to remove underline from a specified link in HTML. Syntax Following is the syntax to remove underline from a link in HTML. HTML tutorial Example Following is the example program to remove underline from a link in HTML. DOCTYPE html> HTML-HyperText Markup Language HTML tutorial Example DOCTYPE html> instagram login instagram login Example Following is another example program to remove underline from a link in HTML. DOCTYPE html> HTML Text Decoration About Our Team comprises of programmers, writers, and analysts.
Sleep()With the help of sleep() we can make a function to pause execution for a fixed amount of time. In programming languages such as C and PHP we would call sleep(sec). Java has thread.sleep(), Python has time.sleep() and Go has time.Sleep(2 * time.Second).JavaScript doesn't have these kinds of sleep functions. But we should thank promises and async/await function in ES 2018. Because these features have helped us to use sleep() as easy as possible. Let's discuss it in a nutshell.syntax-1sleep(Time in ms).then(() => { //// code })We can use the sleep function with then call back as shown above.syntax-2const work = async () => { await sleep(Time in ... Read More
An electrical or electromagnetic quantity (current, voltage, radio wave, micro wave, etc.) that carries data or information from one system (or network) to another is called a signal. Two basic types of signals are used for carrying data, viz. analog signal and digital signal.Analog and digital signals are different from each other in many aspects. One major difference between the two signals is that an analog signal is a continuous function of time, whereas a digital signal is a discrete function of time.This article explains all the significant differences between analog and digital signals along with a brief description of ... Read More
HubsA hub is a physical layer networking device which is used to connect multiple devices in a network. They are generally used to connect computers in a LAN.A hub has many ports in it. A computer which intends to be connected to the network is plugged in to one of these ports. When a data frame arrives at a port, it is broadcast to every other port, without considering whether it is destined for a particular destination or not.SwitchesA switch is a data link layer networking device which connects devices in a network and uses packet switching to send and ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP