Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
Number of substrings divisible by 8 and not by 3 in C++
A string of 0-9 is given. For this problem, we need to calculate the number of strings that are divisible by 8 and not by 3. This is a 2 step problem, and we need to do the code one step at a time to solve it, for exampleInputstr = "80"Output2Inputstr = "7675636788"Output15Approach to Find the SolutionOnly numbers with their last 3 digits are divisible by 8, and their sum of digits divisible by 3 are divisible by 8.Now store the prefix sum of the string so that the sum of digits of prefix module 3 is either 0, 1, ...
Read MoreNumber of Substrings divisible by 6 in a String of Integers in C++
We'll look at a problem in which we're given an integer string and must determine how many substrings are divisible by 6 in integer format. It should be noted that input is in the form of a String made of numbers (integers). Still, the divisibility check will be performed considering it as an integer only (not using ASCII value of string input).Inputstr = “648”Explanationsubstring “6”, “48”, and “648” are divisible by 6.Inputstr = “38342”Output4Explanationsubstrings “3834”, “342”, ”834”, and “42” are divisible by 6.Brute-Force ApproachUsers can check every possible substring to see if it's divisible by six. If the substring is ...
Read MoreWhat is the basic operation of the series.eq() method in pandas?
The series.eq() method in the pandas constructor is used to compare elements of the given series with others (maybe another series or a scalar value). As a result, It will return a new series object with boolean values.The element-wise equal operation is done by using this eq() method. The boolean value True represents the equivalent value in the second series object. And remaining unequal values are represented by the boolean value False.The parameters of the eq() method are other, fill_value, and level.Example 1In the following example, we will see how the eq() method compares elements of a series object with ...
Read MorePassing the Assignment in C++
In this tutorial, we have to write an algorithm to find a way to pass an assignment without being caught by the invigilator. Each student has to submit their assignment to the invigilator. Student A's assignment is with Student B, so Student B has to return/pass the assignment to Student A without the invigilator noticing them.All the students are sitting in a queue. We need to find a way to pass the assignment back to Student A without being caught. Various requirements under which they can pass assignments are as follow −Student A (At index i) can pass assignments to ...
Read MoreHow to remove rows in a Pandas series with duplicate indices?
By using the duplicated() method in the pandas series constructor we can easily identify the duplicate values in the index of a series object. The method duplicated() is used to identify the duplicate values in a series object.The duplicated() method will return a series with boolean values. Boolean value False indicates single occurrence values mean unique values. The duplicated values are indicated with boolean value True.Example 1Here we will see how we can delete the rows of a series object with duplicate indices.# importing pandas package import pandas as pd #create series series = pd.Series(["a", "b", "c", "d", "e"], ...
Read MoreWhat is the use of the series.duplicated() method in pandas?
Finding the duplicate values in an object is a very common task in the data analysis process. In pandas, we have a function called duplicated() which is used to identify the duplicate values.For a pandas series object, the duplicated() method will return a series with boolean values. True indicates duplicate values only for the last occurrence values or the first occurrence values or it may indicate all the duplicate values.The duplicated() method has a parameter called “keep” which is used to treat the duplicate values differently. The default behavior of this parameter is “first” which means it marks all the ...
Read MoreWhat are the ways to extract features from a DateTime variable using pandas?
Reading and extracting valid information from a DateTime object is a very important task in data analysis. The pandas package provides some useful tools to perform feature extracting from a DateTime object.In pandas, the series.dt() method is used to access the components like years, months, days, etc., from a given time series.The series.dt() method has some attributes to extract the year, month, quarter, and day features. In the examples given below, we will use some of these attributes to extract features.Example 1You can see that we have created a pandas series with 10 different timestamps. Then, we accessed only the ...
Read MoreWhat is the use of stream ciphers in information security?
A stream cipher is an approaches of encryption where a pseudorandom cipher digit stream is mixed with plain text digits. This pseudorandom cipher digit stream is used to each binary digit, one bit at a time. This approach of encryption uses an infinite number of pseudorandom cipher digits per key.A Stream Cipher can be used for symmetric key cryptography, or when the similar key is used to encrypt and decrypt data. A stream cipher encrypts an arbitrary length of plain text, one bit at a time, with an algorithm that needs a key.For this type of encryption to remain secure, ...
Read MoreHow to verify the digital signatures in information security?
A Digital Certificate is an electronic "password" that enables a person, organization to transfer data securely over the web using the public key infrastructure (PKI). Digital Certificate is also referred to as public key certificate or identity certificate.Digital certificates play an essential role in maintaining online commerce safe. If the browser alerts a problem with a digital certificate, it is well-advised not to click through. Rather than call the business using a telephone number from the statements or phone book, and inquire as to the problem.Public key encryption need SSL (Secure Sockets Layer) to encrypt some data between the customer’s ...
Read MoreWhat are the technologies that provide imperative levels of protection against unknown attacks?
There are three technologies that supports imperative levels of protection against unknown attacks such as software fault isolation, intrusion detection through program analysis, and fine-grained mandated access controls.These technologies distribute an imperative feature: they do not based on the efficient operation of the programs; rather than, they provide a secondary layer of protection should a program be intrude and corrupted. It is applicable that these systems can also enclose flaws; but in order for a victorious apply to take place, both the application and the secondary protection need to be undermined simultaneously. As error will carry on to be patched, ...
Read More