title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Connected components at scale in PySpark | by Schaun Wheeler | Towards Data Science
A while ago, I had a network of nodes for which I needed to calculate connected components. That’s not a particularly difficult thing to do. The Python networkx library has a nice implementation that makes it particularly easy, but even if you wanted to roll your own function, it’s a straightforward breadth-first-searc...
[ { "code": null, "e": 1024, "s": 172, "text": "A while ago, I had a network of nodes for which I needed to calculate connected components. That’s not a particularly difficult thing to do. The Python networkx library has a nice implementation that makes it particularly easy, but even if you wanted to ...
JSP | Implicit Objects - request and response - GeeksforGeeks
15 Feb, 2021 Perquisite: Introduction To JSPJSP stands for Java Server Pages, and it’s a server side technology. It’s used for creating web applications and dynamic web content. The main property of JSP is that we can insert our java code inside our HTML page using JSP tag. JSP provides you platform-independent pages. ...
[ { "code": null, "e": 25665, "s": 25637, "text": "\n15 Feb, 2021" }, { "code": null, "e": 25973, "s": 25665, "text": "Perquisite: Introduction To JSPJSP stands for Java Server Pages, and it’s a server side technology. It’s used for creating web applications and dynamic web content...
How to Install ntopng in Linux? - GeeksforGeeks
22 Nov, 2021 ntopng is an Open Source Tool to monitor the network. It is a security network monitoring tool, also monitors web activities passively. It is also used for packet capturing, Traffic Recording, and Network Probing. A huge number of companies like Google, HP, Cisco, IBM, and many more uses ntop. It acts as a...
[ { "code": null, "e": 26307, "s": 26279, "text": "\n22 Nov, 2021" }, { "code": null, "e": 26756, "s": 26307, "text": "ntopng is an Open Source Tool to monitor the network. It is a security network monitoring tool, also monitors web activities passively. It is also used for packet ...
Matlab-Matrix - Subtraction
To subtract two matrices, both the operand matrices must have the same number of rows and columns. Here is an example − a = [ 1 2 3 ; 4 5 6; 7 8 9]; b = [ 7 5 6 ; 2 0 8; 5 7 1]; c = a - b On execution in MATLAB the result is as follows − >> a = [ 1 2 3 ; 4 5 6; 7 8 9]; b = [ 7 5 6 ; 2 0 8; 5 7 1]; c = a - b c = -6...
[ { "code": null, "e": 2098, "s": 1999, "text": "To subtract two matrices, both the operand matrices must have the same number of rows and columns." }, { "code": null, "e": 2119, "s": 2098, "text": "Here is an example −" }, { "code": null, "e": 2187, "s": 2119, ...
10 Interesting modules in Python to play with - GeeksforGeeks
22 Jul, 2021 Python is a high level, interpreted and general-purpose dynamic programming language that focuses on code readability. It is used in many organizations as it supports multiple programming paradigms. It also performs automatic memory management. It is one of the world’s most popular, in-demand programming l...
[ { "code": null, "e": 24706, "s": 24678, "text": "\n22 Jul, 2021" }, { "code": null, "e": 25049, "s": 24706, "text": "Python is a high level, interpreted and general-purpose dynamic programming language that focuses on code readability. It is used in many organizations as it suppo...
Moment.js moment().millisecond() Method
19 May, 2022 The moment().millisecond()Method is used to get the milliseconds from the time or to set the milliseconds. Syntax: moment().millisecond(); // or moment().milliseconds(); Parameters: This method accepts single parameter number that is used to set milliseconds then you will require an additional parameter: N...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 May, 2022" }, { "code": null, "e": 135, "s": 28, "text": "The moment().millisecond()Method is used to get the milliseconds from the time or to set the milliseconds." }, { "code": null, "e": 143, "s": 135, "text": ...
How to check string is alphanumeric or not using Regular Expression
15 Oct, 2020 Given string str, the task is to check whether the string is alphanumeric or not by using Regular Expression. An alphanumeric string is a string that contains only alphabets from a-z, A-Z and some numbers from 0-9. Examples: Input: str = “GeeksforGeeks123” Output: true Explanation: This string contains a...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Oct, 2020" }, { "code": null, "e": 139, "s": 28, "text": "Given string str, the task is to check whether the string is alphanumeric or not by using Regular Expression. " }, { "code": null, "e": 244, "s": 139, "tex...
Time-Space Trade-Off in Algorithms
07 Jan, 2022 In this article, we will discuss Time-Space Trade-Off in Algorithms. A tradeoff is a situation where one thing increases and another thing decreases. It is a way to solve a problem in: Either in less time and by using more space, or In very little space by spending a long amount of time. The best Algorithm...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Jan, 2022" }, { "code": null, "e": 237, "s": 52, "text": "In this article, we will discuss Time-Space Trade-Off in Algorithms. A tradeoff is a situation where one thing increases and another thing decreases. It is a way to solve a p...
When to use StringJoiner over StringBuilder?
11 Aug, 2021 Prerequisite: StringJoinerStringJoiner is very useful, when you need to join Strings in a Stream. Task : Suppose we want the string “[George:Sally:Fred]”, where we have given a string array that contains “George”, “Sally” and “Fred”.StringJoiner provide add(String str) method to concatenate the strings bas...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 Aug, 2021" }, { "code": null, "e": 681, "s": 52, "text": "Prerequisite: StringJoinerStringJoiner is very useful, when you need to join Strings in a Stream. Task : Suppose we want the string “[George:Sally:Fred]”, where we have given...
How to export HTML table to CSV using JavaScript ?
25 Aug, 2021 Comma Separated Values or CSV is a type of text file where each value is delimited by a comma. CSV files are very useful for the import and export of data to other software applications. Sometimes while developing web applications, you may come into a scenario where you need to download a CSV file converte...
[ { "code": null, "e": 54, "s": 26, "text": "\n25 Aug, 2021" }, { "code": null, "e": 241, "s": 54, "text": "Comma Separated Values or CSV is a type of text file where each value is delimited by a comma. CSV files are very useful for the import and export of data to other software a...
Monte Carlo integration in Python
10 Mar, 2022 Monte Carlo Integration is a process of solving integrals having numerous values to integrate upon. The Monte Carlo process uses the theory of large numbers and random sampling to approximate values that are very close to the actual solution of the integral. It works on the average of a function denoted by...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Mar, 2022" }, { "code": null, "e": 596, "s": 28, "text": "Monte Carlo Integration is a process of solving integrals having numerous values to integrate upon. The Monte Carlo process uses the theory of large numbers and random samplin...
Python JSON
09 Dec, 2020 JSON JavaScript Object Notation is a format for structuring data. It is mainly used for storing and transferring data between the browser and the server. Python too supports JSON with a built-in package called json. This package provides all the necessary tools for working with JSON Objects including parsi...
[ { "code": null, "e": 52, "s": 24, "text": "\n09 Dec, 2020" }, { "code": null, "e": 501, "s": 52, "text": "JSON JavaScript Object Notation is a format for structuring data. It is mainly used for storing and transferring data between the browser and the server. Python too supports ...
SciPy | Curve Fitting
19 Sep, 2021 Given a Dataset comprising of a group of points, find the best fit representing the Data.We often have a dataset comprising of data following a general path, but each data has a standard deviation which makes them scattered across the line of best fit. We can get a single line using curve-fit() function. U...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Sep, 2021" }, { "code": null, "e": 689, "s": 52, "text": "Given a Dataset comprising of a group of points, find the best fit representing the Data.We often have a dataset comprising of data following a general path, but each data ha...
How to Convert Map to JSON to HashMap in Java?
05 Jul, 2021 JSON is an open standard file format, and easier data interchange format helpful for humans to transmit data. Most of the apps display JSON data and hence nowadays JSON has become the mandatory media to transmit data. Here we will get to know how to convert Map to JSON and for Map, let us take HashMap as a...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Jul, 2021" }, { "code": null, "e": 356, "s": 28, "text": "JSON is an open standard file format, and easier data interchange format helpful for humans to transmit data. Most of the apps display JSON data and hence nowadays JSON has be...
Unrolled Linked List | Set 1 (Introduction)
05 Jul, 2022 Like array and linked list, the unrolled Linked List is also a linear data structure and is a variant of a linked list. Why do we need unrolled linked list? One of the biggest advantages of linked lists over arrays is that inserting an element at any location takes only O(1). However, the catch here is th...
[ { "code": null, "e": 52, "s": 24, "text": "\n05 Jul, 2022" }, { "code": null, "e": 173, "s": 52, "text": "Like array and linked list, the unrolled Linked List is also a linear data structure and is a variant of a linked list. " }, { "code": null, "e": 210, "s": 17...
Prevent System from Entering Sleep mode in ElectronJS
29 May, 2020 ElectronJS is an Open Source Framework used for building Cross-Platform native desktop applications using web technologies such as HTML, CSS, and JavaScript which are capable of running on Windows, macOS, and Linux operating systems. It combines the Chromium engine and NodeJS into a Single Runtime. In some...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 May, 2020" }, { "code": null, "e": 328, "s": 28, "text": "ElectronJS is an Open Source Framework used for building Cross-Platform native desktop applications using web technologies such as HTML, CSS, and JavaScript which are capable ...
MoviePy – Getting Duration of Video File Clip
01 Aug, 2020 In this article we will see how we can get the duration of the video file clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operations on videos and GIF’s. Duration is basically length of the video i.e how long the video is, it is in seconds. In order to do this we ...
[ { "code": null, "e": 53, "s": 25, "text": "\n01 Aug, 2020" }, { "code": null, "e": 337, "s": 53, "text": "In this article we will see how we can get the duration of the video file clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operation...
Setting up environment variables in Node.js in a platform independent way
29 Oct, 2020 Environment variables are a good way to ensure security of your precious API keys and secret stuff as well as adaptive code. However, setting up environment variables might be a bit tedious when working on various machines having different Operating Systems. At such times, a portable and project-specific w...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Oct, 2020" }, { "code": null, "e": 455, "s": 52, "text": "Environment variables are a good way to ensure security of your precious API keys and secret stuff as well as adaptive code. However, setting up environment variables might b...
Access Token Error Response and Codes
Access token is a type of token that is assigned by the authorization server. The authorization server issues the access token, if the access token request is valid and authorized. If the token access request is invalid or unauthorized, then the authorization server returns an error response. For information on access ...
[ { "code": null, "e": 2213, "s": 1919, "text": "Access token is a type of token that is assigned by the authorization server. The authorization server issues the access token, if the access token request is valid and authorized. If the token access request is invalid or unauthorized, then the authori...
Introduction to TELNET
19 Jul, 2021 TELNET stands for TErminaL NETwork. It is a type of protocol that enables one computer to connect to local computer. It is a used as a standard TCP/IP protocol for virtual terminal service which is given by ISO. Computer which starts connection known as the local computer. Computer which is being connected...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Jul, 2021" }, { "code": null, "e": 750, "s": 52, "text": "TELNET stands for TErminaL NETwork. It is a type of protocol that enables one computer to connect to local computer. It is a used as a standard TCP/IP protocol for virtual te...
HorizontalScrollView in Kotlin
18 Feb, 2021 In Android ScrollView allows multiple views that are places within the parent view group to be scrolled. Scrolling in the android application can be done in two ways either Vertically or Horizontally. In this article, we will be discussing how to create a Horizontal ScrollView in Kotlin . Let’s start by fi...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Feb, 2021" }, { "code": null, "e": 229, "s": 28, "text": "In Android ScrollView allows multiple views that are places within the parent view group to be scrolled. Scrolling in the android application can be done in two ways either Ve...
Python Program to create an OTP by squaring and concatenating the odd digits of a number
19 Feb, 2020 Given a number n. The task is to create an OTP by squaring and concatenating the odd digits of the number. Examples: Input: 4365188 Output: 9256 Input: 123456 Output: 4163 Explanation: In the First example, the integers at odd places are 3, 5, and 8. So we have to return a 4 digit OTP by squaring the dig...
[ { "code": null, "e": 53, "s": 25, "text": "\n19 Feb, 2020" }, { "code": null, "e": 160, "s": 53, "text": "Given a number n. The task is to create an OTP by squaring and concatenating the odd digits of the number." }, { "code": null, "e": 170, "s": 160, "text":...
Count of substrings formed using a given set of characters only - GeeksforGeeks
09 Dec, 2021 Given a string str and an array arr[] of K characters, the task is to find the number of substrings of str that contain characters only from the given character array arr[]. Note: The string str and the arr[] contain only lowercase alphabets. Examples: Input: S = “abcb”, K = 2, charArray[] = {‘a’, ‘b’}Outp...
[ { "code": null, "e": 25184, "s": 25156, "text": "\n09 Dec, 2021" }, { "code": null, "e": 25358, "s": 25184, "text": "Given a string str and an array arr[] of K characters, the task is to find the number of substrings of str that contain characters only from the given character ar...
Python for Matlab Users. One common issue I have noticed people... | by Syed Sadat Nazrul | Towards Data Science
One common issue I have noticed people are facing (especially in the Engineering world) is the transition from academia to industry. Most schools prefer having us use Matlab. Whether you are an electrical engineer, chemical engineer or even a nanoengineer, most likely you have had to use Matlab throughout your college ...
[ { "code": null, "e": 1050, "s": 172, "text": "One common issue I have noticed people are facing (especially in the Engineering world) is the transition from academia to industry. Most schools prefer having us use Matlab. Whether you are an electrical engineer, chemical engineer or even a nanoenginee...
jQuery | event.namespace Property - GeeksforGeeks
20 Feb, 2019 The event.namespace property in jQuery is used to return the custom namespace whenever the event is triggered. It is used to handle tasks differently depending on the namespace used. Syntax: event.namespace Parameters: This property contains single parameter event which is required. It returns the custom n...
[ { "code": null, "e": 26228, "s": 26200, "text": "\n20 Feb, 2019" }, { "code": null, "e": 26411, "s": 26228, "text": "The event.namespace property in jQuery is used to return the custom namespace whenever the event is triggered. It is used to handle tasks differently depending on ...
AngularJS | Controllers - GeeksforGeeks
27 May, 2021 AngularJS controllers play significant role in AngularJS applications.All the AngularJS application mainly relies on the controllers to control the flow of data in that application. Basically, it control the data of AngularJS applications and controller is Javascript object, created by a standard JavaScrip...
[ { "code": null, "e": 29652, "s": 29624, "text": "\n27 May, 2021" }, { "code": null, "e": 29981, "s": 29652, "text": "AngularJS controllers play significant role in AngularJS applications.All the AngularJS application mainly relies on the controllers to control the flow of data in...
A modified game of Nim - GeeksforGeeks
27 Apr, 2021 Given an array arr[] of integers, two players A and B are playing a game where A can remove any number of non-zero elements from the array that are multiples of 3. Similarly, B can remove multiples of 5. The player who can’t remove any element loses the game. The task is to find the winner of the game if A...
[ { "code": null, "e": 25102, "s": 25074, "text": "\n27 Apr, 2021" }, { "code": null, "e": 25459, "s": 25102, "text": "Given an array arr[] of integers, two players A and B are playing a game where A can remove any number of non-zero elements from the array that are multiples of 3....
Creating payment receipts using Python - GeeksforGeeks
24 Jun, 2021 Creating payment receipts is a pretty common task, be it an e-commerce website or any local store for that matter. Here, we will see how to create our own transaction receipts just by using python. We would be using reportlab to generate the PDFs. Generally, it comes as a built-in package but sometimes it ...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n24 Jun, 2021" }, { "code": null, "e": 24407, "s": 24292, "text": "Creating payment receipts is a pretty common task, be it an e-commerce website or any local store for that matter." }, { "code": null, "e": 24694, ...
Explore Two Variables Using R. This article is in continuation of the... | by Palash Baranwal | Towards Data Science
This article is in continuation of the Exploratory Data Analysis in R — One Variable, where we discussed EDA of pseudo facebook dataset. In this article, we will learn about data aggregation, conditional means and scatter plots, based on pseudo facebook dataset curated by Udacity. Now we will look at two continuous var...
[ { "code": null, "e": 309, "s": 172, "text": "This article is in continuation of the Exploratory Data Analysis in R — One Variable, where we discussed EDA of pseudo facebook dataset." }, { "code": null, "e": 454, "s": 309, "text": "In this article, we will learn about data aggrega...
Image Datasets for Artificial Intelligence | by Daniel Shapiro, PhD | Towards Data Science
In A.I., data is power. A.I. algorithms and how they are plugged into each other is an art that is becoming known through university courses, online training, and literally by people watching YouTube videos. Artificial Intelligence is open source, and it should be. What you can do to protect your company from competiti...
[ { "code": null, "e": 196, "s": 172, "text": "In A.I., data is power." }, { "code": null, "e": 526, "s": 196, "text": "A.I. algorithms and how they are plugged into each other is an art that is becoming known through university courses, online training, and literally by people wat...
Can we make static reference to non-static fields in java?
A class in Java will have three kinds of variables namely, static (class), instance and, local. Local variables − These variables belong to and declared/defined within the methods/blocks/constructors. The scope of these variables lies within the method (or, block or, constructor) and will be destroyed after he executio...
[ { "code": null, "e": 1158, "s": 1062, "text": "A class in Java will have three kinds of variables namely, static (class), instance and, local." }, { "code": null, "e": 1391, "s": 1158, "text": "Local variables − These variables belong to and declared/defined within the methods/bl...
Difference Between ObjectInputStream and ObjectOutputStream in Java - GeeksforGeeks
29 Oct, 2021 In a software project, in many instances, there are necessities to transfer the data, and it can be handled by using ObjectOutputStream and ObjectInputStream from Java IO packages. Usually, the data is written in binary format and hence we cannot view the contents. Serialization is the process of writing a...
[ { "code": null, "e": 24858, "s": 24830, "text": "\n29 Oct, 2021" }, { "code": null, "e": 25391, "s": 24858, "text": "In a software project, in many instances, there are necessities to transfer the data, and it can be handled by using ObjectOutputStream and ObjectInputStream from ...
Practical Python Causality: Econometrics for Data Science | by Haaya Naushan | Towards Data Science
Data scientists have a tendency to focus on descriptive and predictive analysis, but neglect causal analysis. Decision making, however, requires causal analysis, a fact well recognized by public health epidemiologists during this Covid-19 pandemic. Due to my background in biology, I had internalized the adage “correlat...
[ { "code": null, "e": 760, "s": 171, "text": "Data scientists have a tendency to focus on descriptive and predictive analysis, but neglect causal analysis. Decision making, however, requires causal analysis, a fact well recognized by public health epidemiologists during this Covid-19 pandemic. Due to...
C++ New Library - operator new[]
It allocates storage space for array. Following is the declaration for operator new[]. void* operator new[] (std::size_t size) throw (std::bad_alloc); (throwing allocation) void* operator new[] (std::size_t size, const std::nothrow_t& nothrow_value) throw(); (nothrow allocation) void* operator new[] (std::size_t ...
[ { "code": null, "e": 2641, "s": 2603, "text": "It allocates storage space for array." }, { "code": null, "e": 2690, "s": 2641, "text": "Following is the declaration for operator new[]." }, { "code": null, "e": 2963, "s": 2690, "text": "\t\nvoid* operator new[]...
Spring MVC - Integrate LOG4J Example
The following example shows how to integrate LOG4J using the Spring Web MVC Framework. To start with, let us have a working Eclipse IDE in place and stick to the following steps to develop a Dynamic Form based Web Application using the Spring Web Framework. package com.tutorialspoint; import org.apache.log4j.Logger; i...
[ { "code": null, "e": 3049, "s": 2791, "text": "The following example shows how to integrate LOG4J using the Spring Web MVC Framework. To start with, let us have a working Eclipse IDE in place and stick to the following steps to develop a Dynamic Form based Web Application using the Spring Web Framew...
AngularJS | currency Filter - GeeksforGeeks
17 Nov, 2021 AngularJS currency filter is used to convert a number into a currency format. If no currency format is specified currency filter uses the local currency format.Syntax: {{ currency_expression | currency : symbol : fractionSize}} Parameters: It contains two parameters as mentioned above and described below:...
[ { "code": null, "e": 27880, "s": 27852, "text": "\n17 Nov, 2021" }, { "code": null, "e": 28049, "s": 27880, "text": "AngularJS currency filter is used to convert a number into a currency format. If no currency format is specified currency filter uses the local currency format.Syn...
Alternative to iFrames in HTML5 - GeeksforGeeks
31 Oct, 2019 Unlike iframe before it was a non standard tag, which is standardized in HTML 5. Which admittedly was implemented by all major browsers. The embed element provides an integration purpose for an external (typically non-HTML) application or interactive content. The HTML tag is used for embedding an external ...
[ { "code": null, "e": 23777, "s": 23749, "text": "\n31 Oct, 2019" }, { "code": null, "e": 24142, "s": 23777, "text": "Unlike iframe before it was a non standard tag, which is standardized in HTML 5. Which admittedly was implemented by all major browsers. The embed element provides...
How to split at NEWLINEs in Python?
We can use the method splitlines() in string class to achieve this. For example: >>> """some multi line string""".splitlines() ['some', 'multi line', 'string'] We can also specify the delimiter '\n' in the split() method as follows: >>> """some multi line string""".split('\n') ['some', 'multi line', 'string']
[ { "code": null, "e": 1143, "s": 1062, "text": "We can use the method splitlines() in string class to achieve this. For example:" }, { "code": null, "e": 1222, "s": 1143, "text": ">>> \"\"\"some\nmulti line\nstring\"\"\".splitlines()\n['some', 'multi line', 'string']" }, { ...
Get the number of rows of an Object in R Programming - nrow() Function - GeeksforGeeks
09 Mar, 2021 nrow() function in R Language is used to return the number of rows of the specified matrix. Syntax: nrow(x)Parameters: x: matrix, vector, array or data frame Example 1: Python3 # R program to illustrate# nrow function # Getting R Biochemical Oxygen Demand DatasetBOD # Calling nrow() function to# get t...
[ { "code": null, "e": 24828, "s": 24800, "text": "\n09 Mar, 2021" }, { "code": null, "e": 24921, "s": 24828, "text": "nrow() function in R Language is used to return the number of rows of the specified matrix. " }, { "code": null, "e": 24989, "s": 24921, "text"...
Recursive Programs to find Minimum and Maximum elements of array in C++
We are given an integer array Arr[] as input. The goal is to find maximum and minimum elements among the array using recursive methods. Since we are using recursion, we will traverse the whole array till we reach length=1 then return A[0] which forms the base case. Else compare current element with present minimum or m...
[ { "code": null, "e": 1198, "s": 1062, "text": "We are given an integer array Arr[] as input. The goal is to find maximum and minimum elements among the array using recursive methods." }, { "code": null, "e": 1443, "s": 1198, "text": "Since we are using recursion, we will traverse...
Array get() Method in Java - GeeksforGeeks
23 Jul, 2020 The java.lang.reflect.Array.get() is an inbuilt method in Java and is used to return the element at a given index from the specified Array. Syntax Array.get(Object []array, int index) Parameters : This method accepts two mandatory parameters: array: The object array whose index is to be returned. index: T...
[ { "code": null, "e": 24930, "s": 24902, "text": "\n23 Jul, 2020" }, { "code": null, "e": 25070, "s": 24930, "text": "The java.lang.reflect.Array.get() is an inbuilt method in Java and is used to return the element at a given index from the specified Array." }, { "code": n...
Building package for machine learning project in Python | by Mateusz Bednarski | Towards Data Science
Most of machine learning projects I’ve seen are in permanent experiment state with no clear plan for success from a technical perspective. Creating an algorithm that actually solves a viable problem, does it well is difficult by itself. However, managing highly-experimental codebase in a reliable way and making your pr...
[ { "code": null, "e": 599, "s": 171, "text": "Most of machine learning projects I’ve seen are in permanent experiment state with no clear plan for success from a technical perspective. Creating an algorithm that actually solves a viable problem, does it well is difficult by itself. However, managing ...
Dominant Set of a Graph - GeeksforGeeks
04 Feb, 2020 In graph theory, a dominating set for a graph G = (V, E) is a subset D of V such that every vertex not in D is adjacent to at least one member of D. The domination number is the number of vertices in a smallest dominating set for G.Examples: Input : A graph with 4 vertex and 4 edges Output : The Domi...
[ { "code": null, "e": 25240, "s": 25212, "text": "\n04 Feb, 2020" }, { "code": null, "e": 25482, "s": 25240, "text": "In graph theory, a dominating set for a graph G = (V, E) is a subset D of V such that every vertex not in D is adjacent to at least one member of D. The domination...
Pandas Data Wrangling Cheat Sheet 2021 | by Lorentz Yeung | Towards Data Science
To excel data analysis/data science/machine learning in Python, Pandas is a library you need to master. Here is a cheat sheet of some of the most used syntax that you probably don’t want to miss. The Pandas package is the most imperative tool in Data Science and Analysis working in Python nowadays. The powerful machine...
[ { "code": null, "e": 368, "s": 172, "text": "To excel data analysis/data science/machine learning in Python, Pandas is a library you need to master. Here is a cheat sheet of some of the most used syntax that you probably don’t want to miss." }, { "code": null, "e": 643, "s": 368, ...
SQL and Pandas. Where and how should these tools be... | by Kailey Smith | Towards Data Science
As I mentioned in my previous post, my technical experience has almost exclusively been in SQL. While SQL is awesome and can do some really cool things, it has its limitations — these limitations are in large part why I decided to acquire Data Science superpowers at Lambda School. In my previous data roles, I’ve needed...
[ { "code": null, "e": 733, "s": 171, "text": "As I mentioned in my previous post, my technical experience has almost exclusively been in SQL. While SQL is awesome and can do some really cool things, it has its limitations — these limitations are in large part why I decided to acquire Data Science sup...
Python String decode() Method
Python string method decode() decodes the string using the codec registered for encoding. It defaults to the default string encoding. Str.decode(encoding='UTF-8',errors='strict') encoding − This is the encodings to be used. For a list of all encoding schemes please visit: Standard Encodings. encoding − This is the en...
[ { "code": null, "e": 2379, "s": 2244, "text": "Python string method decode() decodes the string using the codec registered for encoding. It defaults to the default string encoding." }, { "code": null, "e": 2425, "s": 2379, "text": "Str.decode(encoding='UTF-8',errors='strict')\n"...
How to run spark batch jobs in AWS EMR using Apache Livy | by Bogdan Cojocar | Towards Data Science
In this article we will discuss about running spark jobs on AWS EMR using a rest interface with the help of Apache Livy. We will run through the following steps: creating a simple batch job that reads data from Cassandra and writes the result in parquet in S3 build the jar and store it in S3 submit the job and wait for...
[ { "code": null, "e": 293, "s": 172, "text": "In this article we will discuss about running spark jobs on AWS EMR using a rest interface with the help of Apache Livy." }, { "code": null, "e": 334, "s": 293, "text": "We will run through the following steps:" }, { "code": nu...
Delete a linked list using recursion - GeeksforGeeks
17 Feb, 2022 Delete the given linked list using recursionMethod 1) If head equal to NULL then linked list is empty, we simply return. 2) Recursively delete linked list after head node. 3) Delete head node. C++ Java Python3 C# Javascript // C++ program to recursively delete a linked list#include <bits/stdc++.h> /* Lin...
[ { "code": null, "e": 24558, "s": 24530, "text": "\n17 Feb, 2022" }, { "code": null, "e": 24753, "s": 24558, "text": "Delete the given linked list using recursionMethod 1) If head equal to NULL then linked list is empty, we simply return. 2) Recursively delete linked list after he...
JavaScript - Array map() Method
Javascript array map() method creates a new array with the results of calling a provided function on every element in this array. Its syntax is as follows − array.map(callback[, thisObject]); callback − Function that produces an element of the new Array from an element of the current one. callback − Function that prod...
[ { "code": null, "e": 2596, "s": 2466, "text": "Javascript array map() method creates a new array with the results of calling a provided function on every element in this array." }, { "code": null, "e": 2623, "s": 2596, "text": "Its syntax is as follows −" }, { "code": nul...
Adjacent Sibling Selectors in CSS
The CSS adjacent sibling selector is used to select the adjacent sibling of an element. It is used to select only those elements which immediately follow the first selector. The syntax for CSS adjacent sibling selector is as follows − element + element { /*declarations*/ } The following examples illustrate CSS adjac...
[ { "code": null, "e": 1236, "s": 1062, "text": "The CSS adjacent sibling selector is used to select the adjacent sibling of an element. It is used to select only those elements which immediately follow the first selector." }, { "code": null, "e": 1297, "s": 1236, "text": "The synt...
Find the smallest number whose sum of digits is N - GeeksforGeeks
05 Apr, 2021 Given a positive integers N, the task is to find the smallest number whose sum of digits is N.Example: Input: N = 10 Output: 19 Explanation: 1 + 9 = 10 = N Input: N = 18 Output: 99 Explanation: 9 + 9 = 18 = N Naive Approach: A Naive approach is to run a loop of i starting from 0 and find Sum of digi...
[ { "code": null, "e": 24932, "s": 24904, "text": "\n05 Apr, 2021" }, { "code": null, "e": 25037, "s": 24932, "text": "Given a positive integers N, the task is to find the smallest number whose sum of digits is N.Example: " }, { "code": null, "e": 25144, "s": 25037...
Python - Measuring Central Tendency
Mathematically central tendency means measuring the center or distribution of location of values of a data set. It gives an idea of the average value of the data in the data set and also an indication of how widely the values are spread in the data set. That in turn helps in evaluating the chances of a new input fitti...
[ { "code": null, "e": 2914, "s": 2529, "text": "Mathematically central tendency means measuring the center or distribution of location of values of a data set. It gives an idea of the average value of the data in the data set and also \nan indication of how widely the values are spread in the data se...
Composition in Golang - GeeksforGeeks
05 May, 2020 Composition is a method employed to write re-usable segments of code. It is achieved when objects are made up of other smaller objects with particular behaviors, in other words, Larger objects with a wider functionality are embedded with smaller objects with specific behaviors. The end goal of composition ...
[ { "code": null, "e": 24308, "s": 24280, "text": "\n05 May, 2020" }, { "code": null, "e": 24824, "s": 24308, "text": "Composition is a method employed to write re-usable segments of code. It is achieved when objects are made up of other smaller objects with particular behaviors, i...
Bokeh - Jupyter Notebook
Displaying Bokeh figure in Jupyter notebook is very similar to the above. The only change you need to make is to import output_notebook instead of output_file from bokeh.plotting module. from bokeh.plotting import figure, output_notebook, show Call to output_notebook() function sets Jupyter notebook’s output cell as t...
[ { "code": null, "e": 2457, "s": 2270, "text": "Displaying Bokeh figure in Jupyter notebook is very similar to the above. The only change you need to make is to import output_notebook instead of output_file from bokeh.plotting module." }, { "code": null, "e": 2515, "s": 2457, "tex...
Anomaly detection in time series with Prophet library | by Insaf Ashrapov | Towards Data Science
First of all, let’s define what is an anomaly in time series. Anomaly detection problem for time series can be formulated as finding outlier data points relative to some standard or usual signal. While there are plenty of anomaly types, we’ll focus only on the most important ones from a business perspective, such as un...
[ { "code": null, "e": 767, "s": 171, "text": "First of all, let’s define what is an anomaly in time series. Anomaly detection problem for time series can be formulated as finding outlier data points relative to some standard or usual signal. While there are plenty of anomaly types, we’ll focus only o...
Fix for MySQL ERROR 1406: Data too long for column” but it shouldn't be?
This error can occur if you try to set data higher than the allowed limit. As an example, you cannot store a string in a column of type bit because varchar or string takes size higher than bit data type. You need to use the following syntax for bit type column: anyBitColumnName= b ‘1’ OR anyBitColumnName= b ‘0’ To unde...
[ { "code": null, "e": 1266, "s": 1062, "text": "This error can occur if you try to set data higher than the allowed limit. As an example, you cannot store a string in a column of type bit because varchar or string takes size higher than bit data type." }, { "code": null, "e": 1324, "s...
How to implement the Runnable interface using lambda expression in Java?
The Runnable interface is a functional interface defined in java.lang package. This interface contains a single abstract method, run() with no arguments. When an object of a class implementing this interface used to create a thread, then run() method has invoked in a thread that executes separately. @FunctionalInterfac...
[ { "code": null, "e": 1363, "s": 1062, "text": "The Runnable interface is a functional interface defined in java.lang package. This interface contains a single abstract method, run() with no arguments. When an object of a class implementing this interface used to create a thread, then run() method ha...
Credit risk: unsupervised clients clustering | by Valentina Alto | Towards Data Science
One of the industries which is heavily using Machine Learning solutions is that of Banking. In particular, let’s focus for a while on the field of consumer credit: it refers to any operation which involves a private actor, which might be a single individual rather than a family, and the bank. The idea of consumer credi...
[ { "code": null, "e": 832, "s": 171, "text": "One of the industries which is heavily using Machine Learning solutions is that of Banking. In particular, let’s focus for a while on the field of consumer credit: it refers to any operation which involves a private actor, which might be a single individu...
Analysing IPL Data to begin Data Analytics with Python | by AbdulMajedRaja RS | Towards Data Science
Data Science / Analytics is all about finding valuable insights from the given dataset. In short, Finding answers that could help business. In this tutorial, We will see how to get started with Data Analysis in Python. The Python packages that we use in this notebook are: numpy, pandas, matplotlib, and seaborn Since us...
[ { "code": null, "e": 484, "s": 172, "text": "Data Science / Analytics is all about finding valuable insights from the given dataset. In short, Finding answers that could help business. In this tutorial, We will see how to get started with Data Analysis in Python. The Python packages that we use in t...
CSS Filters - Text and Image Effects
You can use CSS filters to add special effects to text, images and other aspects of a webpage without using images or other graphics. Filters only work on Internet Explorer 4.0. If you are developing your site for multiple browsers, then it may not be a good idea to use CSS filters because there is a possibility that i...
[ { "code": null, "e": 2978, "s": 2626, "text": "You can use CSS filters to add special effects to text, images and other aspects of a webpage without using images or other graphics. Filters only work on Internet Explorer 4.0. If you are developing your site for multiple browsers, then it may not be a...
DSA using C - Arrays
Array is a container which can hold fix number of items and these items should be of same type. Most of the datastructure make use of array to implement their algorithms. Following are important terms to understand the concepts of Array. Element − Each item stored in an array is called an element. Element − Each item s...
[ { "code": null, "e": 2329, "s": 2091, "text": "Array is a container which can hold fix number of items and these items should be of same type. Most of the datastructure make use of array to implement their algorithms. Following are important terms to understand the concepts of Array." }, { "...
How to Temporarily Suspend a Thread in Java?
13 Jul, 2021 Threads in java are the lightweight sub-processes that can be created by the user. It is used to perform complicated tasks in the background without disturbing the main program. In order to suspend the thread temporarily by making it go through from running state to waiting for the state. The concept used ...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Jul, 2021" }, { "code": null, "e": 384, "s": 28, "text": "Threads in java are the lightweight sub-processes that can be created by the user. It is used to perform complicated tasks in the background without disturbing the main progra...
Maximum sum two non-overlapping subarrays of given size
11 Jul, 2022 Given an array, we need to find two subarrays with a specific length K such that sum of these subarrays is maximum among all possible choices of subarrays. Examples: Input : arr[] = [2, 5, 1, 2, 7, 3, 0] K = 2 Output : 2 5 7 3 We can choose two arrays of maximum sum as [2, 5] and [7, 3],...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 Jul, 2022" }, { "code": null, "e": 209, "s": 52, "text": "Given an array, we need to find two subarrays with a specific length K such that sum of these subarrays is maximum among all possible choices of subarrays. " }, { "co...
LinkedList getFirst() Method in Java
08 Apr, 2022 Linked List is a part of the Collection framework present in java.util package. This class is an implementation of the LinkedList data structure which is a linear data structure where the elements are not stored in contiguous locations and every element is a separate object with a data part and address par...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Apr, 2022" }, { "code": null, "e": 494, "s": 28, "text": "Linked List is a part of the Collection framework present in java.util package. This class is an implementation of the LinkedList data structure which is a linear data structu...
SQL SERVER | IN Condition
23 May, 2018 IN condition is an alternative to multiple OR conditions in SELECT, INSERT, UPDATE, or DELETE statement. The IN operator allows multiple values to be tested against the expression and thus reduces the use of multiple OR conditions with each test value. Syntax: expression IN (value1, value2, .... value_n); ...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 May, 2018" }, { "code": null, "e": 281, "s": 28, "text": "IN condition is an alternative to multiple OR conditions in SELECT, INSERT, UPDATE, or DELETE statement. The IN operator allows multiple values to be tested against the expres...
How to Check if a Column Exists in a SQL Server Table?
13 Sep, 2021 In this article, we will look at how to check if a particular column exists in a database table or not. For checking the existence of a column we need to create the table first. So, let us create a table with some columns and data. Creating table: Syntax: CREATE TABLE table_name ( column1 datatype, ...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Sep, 2021" }, { "code": null, "e": 284, "s": 52, "text": "In this article, we will look at how to check if a particular column exists in a database table or not. For checking the existence of a column we need to create the table fir...
How to inverse a vector in MATLAB?
27 Jan, 2022 In this article, we are going to discuss the “Inversion of a vector” in MATLAB which can be done in three different approaches that are illustrated below: The flipud() function is used for flipping the specified vector’s elements. Syntax: flipud(A) Here, flipud(A) function is used to return a vector with r...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Jan, 2022" }, { "code": null, "e": 183, "s": 28, "text": "In this article, we are going to discuss the “Inversion of a vector” in MATLAB which can be done in three different approaches that are illustrated below:" }, { "code"...
PostgreSQL – CONCAT_WS Function
08 Oct, 2021 In PostgreSQL, the CONCAT_WS function is used to concatenate strings with a separator. Like the CONCAT function, the CONCAT_WS function is also variadic and ignored NULL values. The following illustrates the syntax of the CONCAT_WS function. Syntax: CONCAT_WS(separator, string_1, string_2, ...); Let’s anal...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Oct, 2021" }, { "code": null, "e": 206, "s": 28, "text": "In PostgreSQL, the CONCAT_WS function is used to concatenate strings with a separator. Like the CONCAT function, the CONCAT_WS function is also variadic and ignored NULL value...
How to apply CSS property to an iframe ?
24 Jun, 2020 An iframe is the short form of inline frame. By using iframe tag, you can display another webpage content into a HTML page document in a rectangular shape structure. The webpage content can be any video, another website, any image and so on. This iframe also has scrollbars and borders for good look and fee...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Jun, 2020" }, { "code": null, "e": 354, "s": 28, "text": "An iframe is the short form of inline frame. By using iframe tag, you can display another webpage content into a HTML page document in a rectangular shape structure. The webpa...
SQL COUNT(), AVG() and SUM()
13 Aug, 2020 SQL COUNT() Function :The COUNT() function provides the number of rows that matches a specified condition.COUNT() Syntax –SELECT COUNT(column_name) FROM table_name WHERE condition; SQL AVG() Function :The AVG() function provides the average value of a numeric column.AVG() Syntax –SELECT AVG(column_name) FR...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Aug, 2020" }, { "code": null, "e": 520, "s": 28, "text": "SQL COUNT() Function :The COUNT() function provides the number of rows that matches a specified condition.COUNT() Syntax –SELECT COUNT(column_name)\nFROM table_name\nWHERE con...
Create a scroll status in ReactJS using Material-UI
04 Mar, 2021 Progress bars at the top, showing scroll status are very common nowadays in webpages. Also, ReactJS and Material-UI go pretty well along with each other, React-JS being the most popular JavaScript framework for building UI components and Material-UI a library that provides various useful and reusable react...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Mar, 2021" }, { "code": null, "e": 348, "s": 28, "text": "Progress bars at the top, showing scroll status are very common nowadays in webpages. Also, ReactJS and Material-UI go pretty well along with each other, React-JS being the mo...
Program to generate all possible valid IP addresses from given string
30 Jun, 2022 Given a string containing only digits, restore it by returning all possible valid IP address combinations.A valid IP address must be in the form of A.B.C.D, where A, B, C, and D are numbers from 0-255. The numbers cannot be 0 prefixed unless they are 0. Examples : Input: 25525511135 Output: [“255.255.11.13...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Jun, 2022" }, { "code": null, "e": 306, "s": 52, "text": "Given a string containing only digits, restore it by returning all possible valid IP address combinations.A valid IP address must be in the form of A.B.C.D, where A, B, C, an...
PyQt5 QColorDialog – Setting Background Color
25 May, 2021 In this article we will see how we can set background color to the QColorDialog. QColorDialog is the pop up type widget in the PyQt5 used for selecting and creating colors. Color dialog is a huge widget that consists of lots of child widgets so it become tough to set stylesheet to the color dialog as it is...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 May, 2021" }, { "code": null, "e": 427, "s": 28, "text": "In this article we will see how we can set background color to the QColorDialog. QColorDialog is the pop up type widget in the PyQt5 used for selecting and creating colors. Co...
How to create a Stopwatch App using Android Studio
21 Dec, 2021 In this article, an Android app is created to display a basic Stopwatch. The layout for Stopwatch includes: A TextView: showing how much time has passed Three Buttons:Start: To start the stopwatchStop: To stop the stopwatchReset: To reset the stopwatch to 00:00:00 Start: To start the stopwatchStop: To stop...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Dec, 2021" }, { "code": null, "e": 125, "s": 52, "text": "In this article, an Android app is created to display a basic Stopwatch." }, { "code": null, "e": 160, "s": 125, "text": "The layout for Stopwatch include...
Queue using two Stacks | Practice | GeeksforGeeks
Implement a Queue using 2 stacks s1 and s2 . A Query Q is of 2 Types (i) 1 x (a query of this type means pushing 'x' into the queue) (ii) 2 (a query of this type means to pop element from queue and print the poped element) Example 1: Input: 5 1 2 1 3 2 1 4 2 Output: 2 3 Explanation: In the first testcase 1 2 the...
[ { "code": null, "e": 464, "s": 238, "text": "Implement a Queue using 2 stacks s1 and s2 .\nA Query Q is of 2 Types\n(i) 1 x (a query of this type means pushing 'x' into the queue)\n(ii) 2 (a query of this type means to pop element from queue and print the poped element)" }, { "code": null...
Blum Integer - GeeksforGeeks
05 May, 2021 Blum Integer is a semi-prime number, suppose p and q are the two factors (i.e. n = p * q), they(p and q) are of the form 4t + 3, where t is some integer. First few Blum Integers are 21, 33, 57, 69, 77, 93, 129, 133, 141, 161, 177, ... Note: Because of the condition that both the factors should be semi-prim...
[ { "code": null, "e": 24612, "s": 24584, "text": "\n05 May, 2021" }, { "code": null, "e": 24847, "s": 24612, "text": "Blum Integer is a semi-prime number, suppose p and q are the two factors (i.e. n = p * q), they(p and q) are of the form 4t + 3, where t is some integer. First few...
Translation and Natural Language Processing using Google Cloud - GeeksforGeeks
10 Jan, 2022 Prerequisite: Create a Virtual Machine and setup API on Google Cloud In this article, we will discuss how to use Google’s Translation and Natural Language Processing features using Google Cloud. Before reading this article, you should have an idea of how to create an instance in a Virtual Machine and how t...
[ { "code": null, "e": 25699, "s": 25671, "text": "\n10 Jan, 2022" }, { "code": null, "e": 25768, "s": 25699, "text": "Prerequisite: Create a Virtual Machine and setup API on Google Cloud" }, { "code": null, "e": 26036, "s": 25768, "text": "In this article, we w...
Python Tips & Tricks - Measure the execution time of your Python Codes | Towards Data Science
As we start becoming proficient in a programming language, we aspire to not only deliver the end objective but also to make our programs efficient. In this tutorial of Did you know series we will learn about a few Ipython’s magic commands which can help us time profile our Python codes. Note that, for the purpose of th...
[ { "code": null, "e": 319, "s": 171, "text": "As we start becoming proficient in a programming language, we aspire to not only deliver the end objective but also to make our programs efficient." }, { "code": null, "e": 459, "s": 319, "text": "In this tutorial of Did you know serie...
Compiler Design - Bottom-Up Parser
Bottom-up parsing starts from the leaf nodes of a tree and works in upward direction till it reaches the root node. Here, we start from a sentence and then apply production rules in reverse manner in order to reach the start symbol. The image given below depicts the bottom-up parsers available. Shift-reduce parsing use...
[ { "code": null, "e": 2489, "s": 2193, "text": "Bottom-up parsing starts from the leaf nodes of a tree and works in upward direction till it reaches the root node. Here, we start from a sentence and then apply production rules in reverse manner in order to reach the start symbol. The image given belo...
Theming Floating Action Buttons in Android with Example - GeeksforGeeks
19 Feb, 2021 Prerequisite: Floating Action Button (FAB) in Android with Example Extended Floating Action Button in Android with Example Android application developers want to seek the attention of the users by customizing and theming the android application widgets and keep more traffic of customers only by the design ...
[ { "code": null, "e": 26381, "s": 26353, "text": "\n19 Feb, 2021" }, { "code": null, "e": 26395, "s": 26381, "text": "Prerequisite:" }, { "code": null, "e": 26448, "s": 26395, "text": "Floating Action Button (FAB) in Android with Example" }, { "code": n...
Stop persisting pandas data frames in CSVs | by Vaclav Dekanovsky | Towards Data Science
CSV is a great format for data exchange. It’s understood all around the world and editable in a regular notepad. That doesn’t mean that it’s suitable for persisting all DataFrames. CSVs can be slow to read and write, they take more disk space, and most importantly CSVs don’t store information about data types. Advantag...
[ { "code": null, "e": 359, "s": 47, "text": "CSV is a great format for data exchange. It’s understood all around the world and editable in a regular notepad. That doesn’t mean that it’s suitable for persisting all DataFrames. CSVs can be slow to read and write, they take more disk space, and most imp...
Explain working of the Modal window in React Native
Modal component helps to display a content view above your UI content. The basic modal component is as follows − <Modal animationType="slide" transparent={true} visible={modalVisible} onRequestClose={() => { Alert.alert("Modal has been closed."); }}> Your Content Here</Modal> To work with Modal component you need to im...
[ { "code": null, "e": 1133, "s": 1062, "text": "Modal component helps to display a content view above your UI content." }, { "code": null, "e": 1175, "s": 1133, "text": "The basic modal component is as follows −" }, { "code": null, "e": 1339, "s": 1175, "text":...
Changing row and column values of a Matrix in R Language - sweep() function - GeeksforGeeks
23 Dec, 2021 In this article, we will learn changing row and column values of a Matrix in R Programming Language. sweep() function in R Language is used to apply the operation “+ or -” to the row or column in data matrix. It is used to sweep the values from the data-framework. Syntax: sweep(x, MARGIN, STATS, FUN) Param...
[ { "code": null, "e": 25310, "s": 25282, "text": "\n23 Dec, 2021" }, { "code": null, "e": 25411, "s": 25310, "text": "In this article, we will learn changing row and column values of a Matrix in R Programming Language." }, { "code": null, "e": 25575, "s": 25411, ...
Find Co-ordinates of Contours using OpenCV | Python - GeeksforGeeks
13 Oct, 2019 In this article, we will learn how to find the co-ordinates of Contours with the help of OpenCV. Contours are defined as the line joining all the points along the boundary of an image that are having the same intensity. Contours come handy in shape analysis, finding the size of the object of interest, and ...
[ { "code": null, "e": 24532, "s": 24504, "text": "\n13 Oct, 2019" }, { "code": null, "e": 24857, "s": 24532, "text": "In this article, we will learn how to find the co-ordinates of Contours with the help of OpenCV. Contours are defined as the line joining all the points along the ...
When to use tuples in C#?
Tuples are used when you want to return multiple values from a method without using ref or out parameters. Tuples are used to pass multiple values to a method through a single parameter. Tuples can also be nested together Passig Tuples as a Parameter class Program{ static void DisplayTupleValues(Tuple<int, string, s...
[ { "code": null, "e": 1169, "s": 1062, "text": "Tuples are used when you want to return multiple values from a method without using ref or out parameters." }, { "code": null, "e": 1284, "s": 1169, "text": "Tuples are used to pass multiple values to a method through a single parame...
Differences between Pure and Slotted Aloha - GeeksforGeeks
09 May, 2019 Prerequisite – Computer Network | Multiple Access ProtocolsAloha is the type of Random access protocol, It have two types one is Pure Aloha and another is Slotted Aloha.In Pure Aloha, Stations transmit whenever data is available at arbitrary times and Colliding frames are destroyed. While In Slotted aloha,...
[ { "code": null, "e": 24480, "s": 24452, "text": "\n09 May, 2019" }, { "code": null, "e": 24920, "s": 24480, "text": "Prerequisite – Computer Network | Multiple Access ProtocolsAloha is the type of Random access protocol, It have two types one is Pure Aloha and another is Slotted ...
Is it possible to change values of the array when doing foreach() in javascript?
Yes it is possible to change values of the array when doing foreach() in javascript. Let us take an example to see this − let arr = [1, 2, 3, 4]; arr.forEach((val, index) => arr[index] = val * val); console.log(arr); This will give the output − [ 1, 4, 9, 16 ] We've modified the actual array here when iterating over it...
[ { "code": null, "e": 1147, "s": 1062, "text": "Yes it is possible to change values of the array when doing foreach() in\njavascript." }, { "code": null, "e": 1184, "s": 1147, "text": "Let us take an example to see this −" }, { "code": null, "e": 1279, "s": 1184, ...
Foundation - The Grid
Foundation grid system scales up to 12 columns through the page. Grid systems are used to create page layouts through a series of rows and columns that house your content. The following table tells briefly about how the Foundation grid system works in multiple devices. The following is the basic structure of a Foundati...
[ { "code": null, "e": 2410, "s": 2238, "text": "Foundation grid system scales up to 12 columns through the page. Grid systems are used to create page layouts through a series of rows and columns that house your content." }, { "code": null, "e": 2508, "s": 2410, "text": "The follow...
Decorators in Python - GeeksforGeeks
16 Dec, 2021 Decorators are a very powerful and useful tool in Python since it allows programmers to modify the behaviour of function or class. Decorators allow us to wrap another function in order to extend the behaviour of the wrapped function, without permanently modifying it. But before diving deep into decorators ...
[ { "code": null, "e": 41163, "s": 41135, "text": "\n16 Dec, 2021" }, { "code": null, "e": 41554, "s": 41163, "text": "Decorators are a very powerful and useful tool in Python since it allows programmers to modify the behaviour of function or class. Decorators allow us to wrap anot...
numpy string operations | count() function - GeeksforGeeks
23 Jan, 2019 numpy.core.defchararray.count(arr, sub, start=0, end=None) is another function for doing string operations in numpy.It returns an array with the number of non-overlapping occurrences of substring sub in the range start to end. Parameters:arr : array_like of str or unicode.sub : [str or unicode] The substri...
[ { "code": null, "e": 24489, "s": 24461, "text": "\n23 Jan, 2019" }, { "code": null, "e": 24716, "s": 24489, "text": "numpy.core.defchararray.count(arr, sub, start=0, end=None) is another function for doing string operations in numpy.It returns an array with the number of non-over...
Fine-tuning Mozilla DeepSpeech for the Indian Accent | by Abhiroop Talasila | Towards Data Science
One of the first attempts to make computers recognize speech was focused on recognizing numbers! Bell Laboratories in 1952 designed the Audrey System, which could recognize a single voice speaking digits. There have been numerous other experiments since then which are well documented in this Wikipedia article. Fast for...
[ { "code": null, "e": 632, "s": 172, "text": "One of the first attempts to make computers recognize speech was focused on recognizing numbers! Bell Laboratories in 1952 designed the Audrey System, which could recognize a single voice speaking digits. There have been numerous other experiments since t...
Digital Clock starting from user set time in C++ - GeeksforGeeks
25 Mar, 2021 In this article, we will discuss the Digital Clock in C++ Language. It is an application that allows for a personal clock that starts at a custom set time and shows the time from that point onwards. This article describes how to make such a clock in a 24-hour format with HH:MM:SS slots and start the time f...
[ { "code": null, "e": 25477, "s": 25449, "text": "\n25 Mar, 2021" }, { "code": null, "e": 25857, "s": 25477, "text": "In this article, we will discuss the Digital Clock in C++ Language. It is an application that allows for a personal clock that starts at a custom set time and show...
Recurrent Neural Networks for Electricity Price Prediction | by Carter Bouley | Towards Data Science
The final model used to predict these prices can be found (here) (full GitHub repository) Demand flexibility can be described as the capacity for end users of electricity (think both business and homes) to change their electricity consumption patterns in response to market signals, such as time variable electricity pri...
[ { "code": null, "e": 236, "s": 171, "text": "The final model used to predict these prices can be found (here)" }, { "code": null, "e": 261, "s": 236, "text": "(full GitHub repository)" }, { "code": null, "e": 496, "s": 261, "text": "Demand flexibility can be d...
Residual Networks (ResNets). In earlier posts, we saw the... | by Muhammad Rizwan Khan | Towards Data Science
In earlier posts, we saw the implementation of LeNet-5, AlexNet, and VGG16 which are deep convolutional neural networks. Similarly, we can build our own deep neural network with more than 100 layers theoretically but in reality, they are hard to train. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun introduced th...
[ { "code": null, "e": 659, "s": 171, "text": "In earlier posts, we saw the implementation of LeNet-5, AlexNet, and VGG16 which are deep convolutional neural networks. Similarly, we can build our own deep neural network with more than 100 layers theoretically but in reality, they are hard to train. Ka...
Difference between static and constant function in C++ - GeeksforGeeks
04 May, 2021 Static Function: It is a member function that is used to access only static data members. It cannot access non-static data members not even call non-static member functions. It can be called even if no objects of the class exist. It is also used to maintain a single copy of the class member function across...
[ { "code": null, "e": 24044, "s": 24016, "text": "\n04 May, 2021" }, { "code": null, "e": 24384, "s": 24044, "text": "Static Function: It is a member function that is used to access only static data members. It cannot access non-static data members not even call non-static member ...
Algorithms | Bit Algorithms | Question 1 - GeeksforGeeks
28 Jun, 2021 What is the return value of following function for arr[] = {9, 12, 2, 11, 2, 2, 10, 9, 12, 10, 9, 11, 2} and n is size of this array. int fun(int arr[], int n){ int x = arr[0]; for (int i = 1; i < n; i++) x = x ^ arr[i]; return x;} (A) 0(B) 9(C) 12(D) 2Answer: (B)Explanation: Note that 9 is...
[ { "code": null, "e": 24369, "s": 24341, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24503, "s": 24369, "text": "What is the return value of following function for arr[] = {9, 12, 2, 11, 2, 2, 10, 9, 12, 10, 9, 11, 2} and n is size of this array." }, { "code": "int fu...
Advanced plots in Matplotlib — Part 2 | by Parul Pandey | Towards Data Science
This article comes as a second part in the Advanced Plots in Matplotlib series. In Part 1, we learnt how to use plots like Span selector, Broken Horizontal Bar plot and the table function in our visualisation work. We also learnt how to watermark images and add a twist to the plots in Matplotlib by using the XKCD theme...
[ { "code": null, "e": 631, "s": 172, "text": "This article comes as a second part in the Advanced Plots in Matplotlib series. In Part 1, we learnt how to use plots like Span selector, Broken Horizontal Bar plot and the table function in our visualisation work. We also learnt how to watermark images a...
Using a Dataloader in Hugging Face | by Natan Katz | Towards Data Science
Everyone that dug their heels into the DL world probably heard, believed, or was a target for convincing attempts that it is the era of Transformers . Since its very first appearance, Transformers were a subject for massive study in several directions : Researchers searched for architecture improvements. People study t...
[ { "code": null, "e": 426, "s": 172, "text": "Everyone that dug their heels into the DL world probably heard, believed, or was a target for convincing attempts that it is the era of Transformers . Since its very first appearance, Transformers were a subject for massive study in several directions :" ...
C# program to find the index of a word in a string
Declare and initialize an array − string[] str = new string[] { "Cat", "Mat", "Rat" }; Now, ue IndexOf() method to find the index of the word “Mat” − Array.IndexOf(str, "Mat"); The following is the code − Live Demo using System; public class Demo { public static void Main() { string[] str = new stri...
[ { "code": null, "e": 1096, "s": 1062, "text": "Declare and initialize an array −" }, { "code": null, "e": 1158, "s": 1096, "text": "string[] str = new string[] {\n \"Cat\",\n \"Mat\",\n \"Rat\"\n};" }, { "code": null, "e": 1221, "s": 1158, "text": "Now, ...
process.env() Method in Node.js
The process.argv() method is used for getting the user environment object. This object will contain all the information about the environment on which this command is being executed. process.env() Since it returns an object for the user environment. It does not need any inputs from the user as such. Create a file with ...
[ { "code": null, "e": 1245, "s": 1062, "text": "The process.argv() method is used for getting the user environment object. This object will contain all the information about the environment on which this command is being executed." }, { "code": null, "e": 1259, "s": 1245, "text": ...