To create a new column with ratio of two columns in an R data frame, we can use division sign.For example, if we have a data frame called df that contains two columns say X and Y and we want to create a new column with ratio of X and Y then we can use the below given command −df$Ratio_X_Y
In this article, we will see how to convert a String to Long in Kotlin using a library function. There are multiple ways to do it. Let's take a couple of examples to demonstrate how it's done.Example - using toLong()toLong() is a function that provides the most convenient way to convert a string to a long. In the following example, we will see how we can use toLong() to convert our String.fun convertToLong(s: String) { try { val value = s.toLong() println("The Long value is: $value") } catch (ex: ... Read More
To find the number of times a variable changes its sign in an R data frame column, we can use sign function with diff and sum function.For example, if we have a data frame called df that contains a column say C then, we can find the number of times C changes its sign by using the following command −sum(diff(sign(df$C))!=0)Example 1Following snippet creates a sample data frame −x
Varargs, also known as "variable arguments" is a new mechanism in Java by which methods in Java can accept zero or multiple number of arguments. Before this mechanism, the only option available to achieve this type of functionality was "method overloading", but that also required multiple lines of boilerplate code.In this article, we will see how we can use Varags in Kotlin to call a function multiple times based on different types of arguments. The following example demonstrates how we can use this Varags keyword.Examplefun main() { // calling the function with 4 arguments and // passing 3 ... Read More
In Kotlin, you can easily call another function by just importing the same in the current Kotlin file where your main function is running. Whatever the function we are declaring in a Kotlin file will be compiled into a static method by default, and it will be placed under the same package. The name of the newly created file will be renamed as the First letter capitalized and ".kt" extension replaced with the "Kt" suffix.In this article, we will try to get an insight into how you can use Kotlin extension methods from a Java file.ExampleLet's create a Kotlin file ... Read More
DHCP represents Dynamic Host Configuration Protocol. It is a network management protocol that can dynamically assign an IP address to a denial device, or node, on a network so they can connect using IP (Internet Protocol).DHCP automates and centrally handles these configurations. There is no requirement to manually assign IP addresses to new devices. Thus, there is no need for any user configuration to connect to a DHCP-based network.DHCP decreases the chances of common bugs appearing when IP addresses are created manually. It also ensures no two hosts can have similar IP addresses.DHCP act an essential role in handling small ... Read More
Let us understand the concept of Simple Object Access Protocol (SOAP).SOAPSOAP represents Simple Object Access Protocol. It is an XML-based protocol for penetrating web services. SOAP is a W3C recommendation for connection between two applications. SOAP is an XML based protocol.It is platform-independent and language-independent. By using SOAP, it will be able to connect with other programming language applications.The SOAP specifications are authorized internet standards, maintained and developed by the World Wide Web Consortium (W3C).It is an authorized protocol and it appears with rigid rules and improved security features including built-in ACID compliance and authorization. It needed more bandwidth and ... Read More
Let us begin by learning about Stream Control Transmission Protocol (SCTP).SCTPSCTP represents Stream Control Transmission Protocol. It is a new stable, message-oriented transport layer protocol. It is universally produced for Internet applications that have been introduced. These new applications include IUA (ISDN over IP), M2UA and M3UA (telephony signaling), H.248 (media gateway control), H.323 (IP telephony), and SIP (IP telephony), etc.SCTP connects the characteristics of UDP and TCP. SCTP is a stable message-oriented protocol. It protects the message boundaries, and simultaneously, detects hidden data, duplicate information, and out-of-order data. It also has congestion control and flow control architectures.The unit of ... Read More
To begin with, let us learn about the concept of bluetooth.BluetoothBluetooth is a proprietary open wireless technology which calculates for exchanging data over short locations (using short-wavelength radio channels in the ISM band from 2400-2480 MHz) from durable and mobile devices. It can generate personal area networks (PANs) with large levels of security. It was produced by telecoms vendor Ericsson in 1994, and it was initially accepted as a wireless approach to RS-232 data cables. It can connect multiple devices, overcoming problems of synchronization.Bluetooth is managed by the Bluetooth Special Interest Group, which has more than 14, 000 member organizations ... Read More
Firstly, let us understand what scareware is.ScarewareScareware is a deceptive procedure created to trick Web users into downloading and purchasing malicious software (malware) by creating user interruption, uncertainty, or panic. Scareware formats involve malware, adware, spyware, Trojans, and viruses.Scareware creates pop-ups that look like Microsoft Windows system indications and alerts for anti-virus/anti-spyware applications, registry cleaners, or firewalls. These deceptive pop-ups make a user call to action to buy scareware and repair alleged bugs.Scareware can contain a clickjacking feature to redirect a client to an attacker’s website or initiate a malware download if a client attempts to close the pop-up. Scareware ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP