title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
How to add space before and after specific character using regex in Python?
The following code shows how space is added before and after the pipe '|' character in given string. import re regex = r'\b[|:]\b' s = "abracadabra abraca|dabara | abra cadabra abra ca dabra abra ca dabra abra" print(re.sub(regex, ' \g<0> ', s)) This gives the output abracadabra abraca | dabara | abra cadabra abra ca ...
[ { "code": null, "e": 1164, "s": 1062, "text": "The following code shows how space is added before and after the pipe '|' character in given string. " }, { "code": null, "e": 1309, "s": 1164, "text": "import re\nregex = r'\\b[|:]\\b'\ns = \"abracadabra abraca|dabara | abra cadabra...
Angular Material 7 - Select
The <mat-select>, an Angular Directive, is used for <select> for enhance material design based styling.. In this chapter, we will showcase the configuration required to draw a select control using Angular Material. Follow the following steps to update the Angular application we created in Angular 6 - Project Setup chap...
[ { "code": null, "e": 2860, "s": 2755, "text": "The <mat-select>, an Angular Directive, is used for <select> for enhance material design based styling.." }, { "code": null, "e": 2970, "s": 2860, "text": "In this chapter, we will showcase the configuration required to draw a select...
Tryit Editor v3.7
CSS 2D Transforms Tryit: The scale() method
[ { "code": null, "e": 27, "s": 9, "text": "CSS 2D Transforms" } ]
How to find the minimum and maximum values in a single MySQL Query?
To find the minimum and maximum values in a single query, use MySQL UNION. Let us first create a table − mysql> create table DemoTable ( Price int ); Query OK, 0 rows affected (0.57 sec) Insert some records in the table using insert command − mysql> insert into DemoTable values(88); Query OK, 1 row affected (0.30 se...
[ { "code": null, "e": 1167, "s": 1062, "text": "To find the minimum and maximum values in a single query, use MySQL UNION. Let us first create a table −" }, { "code": null, "e": 1252, "s": 1167, "text": "mysql> create table DemoTable\n(\n Price int\n);\nQuery OK, 0 rows affected...
Classifying MNIST Digits Using PCA + Deep Learning | by Muriel Kosaka | Towards Data Science
One of the many important concepts in Data Science includes Principal Component Analysis (PCA) which is an unsupervised learning method. It is often used to as a dimensionality reduction method for large datasets or simplify their complexity — this is done by transforming a large set of variables into a small one while...
[ { "code": null, "e": 916, "s": 171, "text": "One of the many important concepts in Data Science includes Principal Component Analysis (PCA) which is an unsupervised learning method. It is often used to as a dimensionality reduction method for large datasets or simplify their complexity — this is don...
Objective-C Constants
The constants refer to fixed values that the program may not alter during its execution. These fixed values are also called literals. Constants can be of any of the basic data types like an integer constant, a floating constant, a character constant, or a string literal. There are also enumeration constants as well. Th...
[ { "code": null, "e": 2694, "s": 2560, "text": "The constants refer to fixed values that the program may not alter during its execution. These fixed values are also called literals." }, { "code": null, "e": 2878, "s": 2694, "text": "Constants can be of any of the basic data types ...
Seaborn | Distribution Plots - GeeksforGeeks
26 Aug, 2019 Seaborn is a Python data visualization library based on Matplotlib. It provides a high-level interface for drawing attractive and informative statistical graphics. This article deals with the distribution plots in seaborn which is used for examining univariate and bivariate distributions. In this article w...
[ { "code": null, "e": 24874, "s": 24846, "text": "\n26 Aug, 2019" }, { "code": null, "e": 25240, "s": 24874, "text": "Seaborn is a Python data visualization library based on Matplotlib. It provides a high-level interface for drawing attractive and informative statistical graphics....
How to check if two strings are equal in Java?
You can check the equality of two Strings in Java using the equals() method. This method compares this string to the specified object. The result is true if and only if the argument is not null and is a String object that represents the same sequence of characters as this object. import java.lang.* public class StringD...
[ { "code": null, "e": 1343, "s": 1062, "text": "You can check the equality of two Strings in Java using the equals() method. This method compares this string to the specified object. The result is true if and only if the argument is not null and is a String object that represents the same sequence of...
Data Preprocessing in Python. for Machine Learning with working code... | by Tarun Gupta | Towards Data Science
In one of my previous posts, I talked about Data Preprocessing in Data Mining & Machine Learning conceptually. This will continue on that, if you haven’t read it, read it here in order to have a proper grasp of the topics and concepts I am going to talk about in the article. Data Preprocessing refers to the steps appli...
[ { "code": null, "e": 448, "s": 172, "text": "In one of my previous posts, I talked about Data Preprocessing in Data Mining & Machine Learning conceptually. This will continue on that, if you haven’t read it, read it here in order to have a proper grasp of the topics and concepts I am going to talk a...
A Custom SpaCy Model Deployment with AWS ECR, SageMaker, and Lambda | by Cheng | Towards Data Science
SpaCy is one of my favourite NLP libraries. And I have been using spaCy to perform a lot of Named Entity Recognition (NER) tasks. Generally, we first need to load a spaCy pre-trained model of a specific language and fine-tune the model with our training dataset. The training process can be done offline with a local com...
[ { "code": null, "e": 600, "s": 171, "text": "SpaCy is one of my favourite NLP libraries. And I have been using spaCy to perform a lot of Named Entity Recognition (NER) tasks. Generally, we first need to load a spaCy pre-trained model of a specific language and fine-tune the model with our training d...
Mathematics | Probability Distributions Set 3 (Normal Distribution) - GeeksforGeeks
10 Apr, 2020 The previous two articles introduced two Continuous Distributions: Uniform and Exponential. This article covers the Normal Probability Distribution, also a Continuous distribution, which is by far the most widely used model for continuous measurement. Introduction – Whenever a random experiment is replicat...
[ { "code": null, "e": 29952, "s": 29924, "text": "\n10 Apr, 2020" }, { "code": null, "e": 30204, "s": 29952, "text": "The previous two articles introduced two Continuous Distributions: Uniform and Exponential. This article covers the Normal Probability Distribution, also a Continu...
Generate Meaningful Word Clouds in Python | by Bryan Dickinson | Towards Data Science
I’m sure you’ve seen a word cloud. Generally, it’s a photo filled with words where the size depends on the frequency of times the word appears in the text you’d like to analyze. I wasn’t privy to this, but apparently, there has been/is (not sure) some pretty strong feelings against/for word clouds. I have read that the...
[ { "code": null, "e": 613, "s": 172, "text": "I’m sure you’ve seen a word cloud. Generally, it’s a photo filled with words where the size depends on the frequency of times the word appears in the text you’d like to analyze. I wasn’t privy to this, but apparently, there has been/is (not sure) some pre...
How to add percentage or count labels above percentage bar plot in R? - GeeksforGeeks
18 Jul, 2021 In this article, we will discuss how to add percentage or count above percentage bar plot in R programming language. The ggplot() method of this package is used to initialize a ggplot object. It can be used to declare the input data frame for a graphic and can also be used to specify the set of plot aesthe...
[ { "code": null, "e": 25162, "s": 25134, "text": "\n18 Jul, 2021" }, { "code": null, "e": 25279, "s": 25162, "text": "In this article, we will discuss how to add percentage or count above percentage bar plot in R programming language." }, { "code": null, "e": 25606, ...
Production Machine Learning Monitoring: Outliers, Drift, Explainers & Statistical Performance | by Alejandro Saucedo | Towards Data Science
“The lifecycle of a machine learning model only begins once it’s in production” In this article we present an end-to-end example showcasing best practices, principles, patterns and techniques around monitoring of machine learning models in production. We will show how to adapt standard microservice monitoring technique...
[ { "code": null, "e": 252, "s": 172, "text": "“The lifecycle of a machine learning model only begins once it’s in production”" }, { "code": null, "e": 637, "s": 252, "text": "In this article we present an end-to-end example showcasing best practices, principles, patterns and techn...
What is dot operator in C++?
The dot and arrow operator are both used in C++ to access the members of a class. They are just used in different scenarios. In C++, types declared as a class, struct, or union are considered "of class type". So the following refers to both of them. a.b is only used if b is a member of the object (or reference[1] to an...
[ { "code": null, "e": 1312, "s": 1062, "text": "The dot and arrow operator are both used in C++ to access the members of a class. They are just used in different scenarios. In C++, types declared as a class, struct, or union are considered \"of class type\". So the following refers to both of them." ...
Merge Two Sets in Java - GeeksforGeeks
09 Dec, 2021 The set interface is present in java.util package and extends the Collection interface is an unordered collection of objects in which duplicate values cannot be stored. It is an interface that implements the mathematical set. This interface contains the methods inherited from the Collection interface and a...
[ { "code": null, "e": 23793, "s": 23765, "text": "\n09 Dec, 2021" }, { "code": null, "e": 24265, "s": 23793, "text": "The set interface is present in java.util package and extends the Collection interface is an unordered collection of objects in which duplicate values cannot be st...
Flex - Data Binding
Data Binding is a process in which data of one object is tied to another object. It requires a source property, a destination property and a triggering event which indicates, when to copy the data from source to destination. Flex provides three ways to do Data Binding as below Curly brace syntax in MXML Script ({}) <fx...
[ { "code": null, "e": 2272, "s": 2047, "text": "Data Binding is a process in which data of one object is tied to another object. It requires a source property, a destination property and a triggering event which indicates, when to copy the data from source to destination." }, { "code": null, ...
How to create half of the string in uppercase and the other half in lowercase? - GeeksforGeeks
30 Mar, 2022 The first thing that we have to keep in my mind while solving this kind of problem is that the strings are immutable i.e, If I am taking the following string var string1 = "geeksforgeeks"; string1[0] = "G"; console.log(string1); As strings are immutable, so we cannot change the character of the string, so...
[ { "code": null, "e": 24907, "s": 24879, "text": "\n30 Mar, 2022" }, { "code": null, "e": 25029, "s": 24907, "text": "The first thing that we have to keep in my mind while solving this kind of problem is that the strings are immutable i.e," }, { "code": null, "e": 2506...
How to change files and folders attributes using PowerShell?
There are multiple files and folders attribute supported by the Windows Operating System. To check which attributes that files and folders support use DOS command attrib /? You can see the attributes listed like Read-Only, Archive, etc. You can set the attribute using PowerShell. For example, we have a file called Test...
[ { "code": null, "e": 1235, "s": 1062, "text": "There are multiple files and folders attribute supported by the Windows Operating System. To check which attributes that files and folders support use DOS command attrib /?" }, { "code": null, "e": 1343, "s": 1235, "text": "You can s...
Dataprep.eda: Accelerate your EDA | by Slavvy Coelho | Towards Data Science
Authors: Slavvy Coelho, Ruchita Rozario Mentor: Dr. Jiannan Wang, Director, SFU’s Professional Master’s Programs (Big Data and Cybersecurity and Visual Computing) “Numbers have an important story to tell. They rely on you to give them a clear and convincing voice” — Stephen Few Most of the industries today have recogni...
[ { "code": null, "e": 212, "s": 172, "text": "Authors: Slavvy Coelho, Ruchita Rozario" }, { "code": null, "e": 335, "s": 212, "text": "Mentor: Dr. Jiannan Wang, Director, SFU’s Professional Master’s Programs (Big Data and Cybersecurity and Visual Computing)" }, { "code": n...
Probability Sampling Methods Explained with Python | by 👩🏻‍💻 Kessie Zhang | Towards Data Science
Sampling is used when we try to draw a conclusion without knowing the population. Population refers to the complete collection of observations we want to study, and a sample is a subset of the target population. Here’s an example. A Gallup poll1, conducted between July 15 to 31 last year, found that 42% of Americans ap...
[ { "code": null, "e": 916, "s": 172, "text": "Sampling is used when we try to draw a conclusion without knowing the population. Population refers to the complete collection of observations we want to study, and a sample is a subset of the target population. Here’s an example. A Gallup poll1, conducte...
SQL - Numeric Functions
SQL numeric functions are used primarily for numeric manipulation and/or mathematical calculations. The following table details the numeric functions − Returns the absolute value of numeric expression. Returns the arccosine of numeric expression. Returns NULL if the value is not in the range -1 to 1. Returns the arcsin...
[ { "code": null, "e": 2605, "s": 2453, "text": "SQL numeric functions are used primarily for numeric manipulation and/or mathematical calculations. The following table details the numeric functions −" }, { "code": null, "e": 2655, "s": 2605, "text": "Returns the absolute value of ...
Differences between orTimeout() and completeOnTimeOut() methods in Java 9?
Both orTimeout() and completeOnTimeOut() methods are defined in CompletableFuture class and these two methods are introduced in Java 9. The orTimeout() method can be used to specify that if a given task doesn't complete within a certain period of time, the program stops execution and throws TimeoutException whereas com...
[ { "code": null, "e": 1509, "s": 1062, "text": "Both orTimeout() and completeOnTimeOut() methods are defined in CompletableFuture class and these two methods are introduced in Java 9. The orTimeout() method can be used to specify that if a given task doesn't complete within a certain period of time, ...
isprintable() in Python and its application
In this article, we will learn about isprintable() in Python and its application. Is printable() is a built-in method used for the purpose of string handling. The isprintable() methods return “True” when all characters present in the string are of type printable or the string is empty, Otherwise, It returns a boolean v...
[ { "code": null, "e": 1144, "s": 1062, "text": "In this article, we will learn about isprintable() in Python and its application." }, { "code": null, "e": 1399, "s": 1144, "text": "Is printable() is a built-in method used for the purpose of string handling. The isprintable() metho...
Ansible — Ports Monitoring.. Today I will show you how Ansible can... | by Abdelilah OUASSINI | Towards Data Science
Indeed in highly sensitive businesses like banking, ports are strictly supervised, and only required ports are allowed to be opened by SecOps.Otherwise, not supervised ports can be attractive targets for network attacks like DDOS. To explain things more easily, let’s imagine a set of hosts called sources that should co...
[ { "code": null, "e": 403, "s": 172, "text": "Indeed in highly sensitive businesses like banking, ports are strictly supervised, and only required ports are allowed to be opened by SecOps.Otherwise, not supervised ports can be attractive targets for network attacks like DDOS." }, { "code": nu...
Handle mouse events in Python - OpenCV - GeeksforGeeks
26 Mar, 2020 OpenCV is one of the most popular computer vision libraries. If you want to start your journey in the field of computer vision, then a thorough understanding of the concepts of OpenCV is of paramount importance. Note: For more information, refer to Introduction to OpenCV OpenCV sometimes helps to control a...
[ { "code": null, "e": 24124, "s": 24096, "text": "\n26 Mar, 2020" }, { "code": null, "e": 24336, "s": 24124, "text": "OpenCV is one of the most popular computer vision libraries. If you want to start your journey in the field of computer vision, then a thorough understanding of th...
Python | Column wise sum of nested list
07 Aug, 2020 Given a nested list (where sublists are of equal length), write a Python program to find the column-wise sum of the given list and return it in a new list. Examples: Input : [[1, 5, 3], [2, 7, 8], [4, 6, 9]] Output : [7, 18, 20] Input : [[20, 5], [2, 54], [45, 9], ...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Aug, 2020" }, { "code": null, "e": 184, "s": 28, "text": "Given a nested list (where sublists are of equal length), write a Python program to find the column-wise sum of the given list and return it in a new list." }, { "code...
numpy.isfortran() in Python
29 Nov, 2018 numpy.isfortran(array) : This is a logical function that checks whether array is Fortran contiguous or not. Order : [C-contiguous, F-contiguous, A-contiguous; optional] C-contiguous order in memory(last index varies the fastest). C order means that operating row-rise on the array will be slightly quicker.F...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Nov, 2018" }, { "code": null, "e": 136, "s": 28, "text": "numpy.isfortran(array) : This is a logical function that checks whether array is Fortran contiguous or not." }, { "code": null, "e": 197, "s": 136, "text":...
Python | Pandas Series.filter()
13 Feb, 2019 Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.filter() function returns subset row...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Feb, 2019" }, { "code": null, "e": 285, "s": 28, "text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based index...
Modulus on Negative Numbers
17 Jun, 2022 What will be the output of the following C program? C++ C C# #include <iostream>using namespace std; int main() { int a = 3, b = -8, c = 2; cout << a % b / c; return 0;} #include <stdio.h>int main(){ int a = 3, b = -8, c = 2; printf("%d", a % b / c); return 0;} using System; public class GFG...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 Jun, 2022" }, { "code": null, "e": 106, "s": 52, "text": "What will be the output of the following C program? " }, { "code": null, "e": 110, "s": 106, "text": "C++" }, { "code": null, "e": 112, "...
dig Command in Linux with Examples
28 Apr, 2022 dig command stands for Domain Information Groper. It is used for retrieving information about DNS name servers. It is basically used by network administrators. It is used for verifying and troubleshooting DNS problems and to perform DNS lookups. Dig command replaces older tools such as nslookup and the hos...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 Apr, 2022" }, { "code": null, "e": 364, "s": 54, "text": "dig command stands for Domain Information Groper. It is used for retrieving information about DNS name servers. It is basically used by network administrators. It is used for...
GATE | GATE-CS-2007 | Question 77
28 Jun, 2021 Suppose the letters a, b, c, d, e, f have probabilities 1/2, 1/4, 1/8, 1/16, 1/32, 1/32 respectively. What is the average length of Huffman codes?(A) 3(B) 2.1875(C) 2.25(D) 1.9375Answer: (D)Explanation: We get the following Huffman Tree after applying Huffman Coding Algorithm. The idea is to keep the least...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jun, 2021" }, { "code": null, "e": 398, "s": 28, "text": "Suppose the letters a, b, c, d, e, f have probabilities 1/2, 1/4, 1/8, 1/16, 1/32, 1/32 respectively. What is the average length of Huffman codes?(A) 3(B) 2.1875(C) 2.25(D) 1....
Iterate over characters of a string in Python
19 Dec, 2018 In Python, while operating with String, one can do multiple operations on it. Let’s see how to iterate over characters of a string in Python. Example #1: Using simple iteration and range() # Python program to iterate over characters of a string # Code #1string_name = "geeksforgeeks" # Iterate over the st...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Dec, 2018" }, { "code": null, "e": 194, "s": 52, "text": "In Python, while operating with String, one can do multiple operations on it. Let’s see how to iterate over characters of a string in Python." }, { "code": null, ...
Sort an array of strings based on the given order
28 Feb, 2022 Given an array of strings words[] and the sequential order of alphabets, our task is to sort the array according to the order given. Assume that the dictionary and the words only contain lowercase alphabets. Examples: Input: words = {“hello”, “geeksforgeeks”}, order = “hlabcdefgijkmnopqrstuvwxyz” Output: ...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 Feb, 2022" }, { "code": null, "e": 260, "s": 52, "text": "Given an array of strings words[] and the sequential order of alphabets, our task is to sort the array according to the order given. Assume that the dictionary and the words ...
Python – Check if previous element is smaller in List
04 Sep, 2021 Sometimes, while working with Python lists, we can have a problem in which we need to check for each element if its preceding element is smaller. This type of problem can have its use in data preprocessing domains. Let’s discuss certain problems in which this task can be performed. Input : test_list = [1,...
[ { "code": null, "e": 52, "s": 24, "text": "\n04 Sep, 2021" }, { "code": null, "e": 336, "s": 52, "text": "Sometimes, while working with Python lists, we can have a problem in which we need to check for each element if its preceding element is smaller. This type of problem can hav...
How to override the CSS properties of a class using another CSS class ?
27 Sep, 2019 To override the CSS properties of a class using another class, we can use the !important directive. In CSS, !important means “this is important”, and the property:value pair that has this directive is always applied even if the other element has higher specificity. Syntax: element1 { property-x: value_...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Sep, 2019" }, { "code": null, "e": 318, "s": 52, "text": "To override the CSS properties of a class using another class, we can use the !important directive. In CSS, !important means “this is important”, and the property:value pair ...
On/Off Toggle Button Switch in Tkinter
19 Oct, 2021 Prerequisite: Tkinter Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with Tkinter is the fastest and easiest way to crea...
[ { "code": null, "e": 53, "s": 25, "text": "\n19 Oct, 2021" }, { "code": null, "e": 75, "s": 53, "text": "Prerequisite: Tkinter" }, { "code": null, "e": 381, "s": 75, "text": "Python offers multiple options for developing a GUI (Graphical User Interface). Out o...
How to set Maximum Value in NumericUpDown in C#?
26 Jul, 2019 In Windows Forms, NumericUpDown control is used to provide a Windows spin box or an up-down control which displays the numeric values. Or in other words, NumericUpDown control provides an interface which moves using up and down arrow and holds some pre-defined numeric value. In NumericUpDown control, you c...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Jul, 2019" }, { "code": null, "e": 500, "s": 28, "text": "In Windows Forms, NumericUpDown control is used to provide a Windows spin box or an up-down control which displays the numeric values. Or in other words, NumericUpDown control...
Java String Class lines() Method with Examples
03 Feb, 2022 lines() method is a static method which returns out stream of lines extracted from a given multi-line string, separated by line terminators which are as follows: Syntax: public Stream<String> lines() Return Type: Stream of string in order as present in multi-line Illustration: Input : "Geek \n For \n Geek...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Feb, 2022" }, { "code": null, "e": 190, "s": 28, "text": "lines() method is a static method which returns out stream of lines extracted from a given multi-line string, separated by line terminators which are as follows:" }, { ...
Program to swap upper diagonal elements with lower diagonal elements of matrix.
22 Mar, 2022 Given a square matrix, swap upper diagonal elements of matrix with lower diagonal elements of matrix.Examples : Input: 2 3 5 6 4 5 7 9 8 6 4 9 1 3 5 6 Output: 2 4 8 1 3 5 6 3 5 7 4 5 6 9 9 6 Input: 1 2 3 4 5...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Mar, 2022" }, { "code": null, "e": 166, "s": 52, "text": "Given a square matrix, swap upper diagonal elements of matrix with lower diagonal elements of matrix.Examples : " }, { "code": null, "e": 432, "s": 166, ...
Number of indices pair such that element pair sum from first Array is greater than second Array - GeeksforGeeks
24 Dec, 2021 Given two integer arrays A[] and B[] of equal sizes, the task is to find the number of pairs of indices {i, j} in the arrays such that A[i] + A[j] > B[i] + B[j] and i < j.Examples: Input: A[] = {4, 8, 2, 6, 2}, B[] = {4, 5, 4, 1, 3} Output: 7 Explanation: There are a total of 7 pairs of indices {i, j} in...
[ { "code": null, "e": 26675, "s": 26647, "text": "\n24 Dec, 2021" }, { "code": null, "e": 26858, "s": 26675, "text": "Given two integer arrays A[] and B[] of equal sizes, the task is to find the number of pairs of indices {i, j} in the arrays such that A[i] + A[j] > B[i] + B[j] an...
PyQt5 - Finding the item through text in ComboBox - GeeksforGeeks
22 Apr, 2020 In this article we will see how we can find the item index with the help of text in it. We know we can add items with the help of addItem and addItems method, in order to find the item with the help of findText method. Syntax : combo_box.findText(text) Argument : It takes string as argument. Return : It re...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n22 Apr, 2020" }, { "code": null, "e": 25756, "s": 25537, "text": "In this article we will see how we can find the item index with the help of text in it. We know we can add items with the help of addItem and addItems method, in o...
How to use react-draggable module in ReactJS ? - GeeksforGeeks
21 May, 2021 We can use the react-draggable module in ReactJS for making elements draggable. Internally the draggable items are moved with the help of CSS Transforms. This module allows the items to become draggable regardless of their current position. We can use the following approach in ReactJS to use the react-drag...
[ { "code": null, "e": 26071, "s": 26043, "text": "\n21 May, 2021" }, { "code": null, "e": 26392, "s": 26071, "text": "We can use the react-draggable module in ReactJS for making elements draggable. Internally the draggable items are moved with the help of CSS Transforms. This modu...
JavaScript Sum function on the click of a button
Let’s say the following is our button − <button type="button" onclick="addTheValue(10)">Sum </button> </body> We are calling the function addTheValue(10) with parameter 10 on button click. On clicking the button, we are adding the value 10 as in the below code − Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta ...
[ { "code": null, "e": 1102, "s": 1062, "text": "Let’s say the following is our button −" }, { "code": null, "e": 1172, "s": 1102, "text": "<button type=\"button\" onclick=\"addTheValue(10)\">Sum </button>\n</body>" }, { "code": null, "e": 1325, "s": 1172, "text...
Ext.js - Localization
It is always best to communicate with the users in the language they understand and prefer. Extjs localization package supports over 40 languages such as German, French, Korean, Chinese, etc. It is very simple to implement the locale in ExtJs. You’ll find all of the bundled locale files in the override folder of the ex...
[ { "code": null, "e": 2468, "s": 2023, "text": "It is always best to communicate with the users in the language they understand and prefer. Extjs localization package supports over 40 languages such as German, French, Korean, Chinese, etc. It is very simple to implement the locale in ExtJs. You’ll fi...
A Guide to Python Good Practices. Revisiting some of the best practices... | by Mohit Mayank | Towards Data Science
This article is a chapter taken from my ongoing (and still only partially complete) book on Data science titled, “A Lazy Guide to Data Science”. To read similar articles, refer to my blog or my medium page. Don't forget to say hi on LinkedIn and/or Twitter. 🖖 Writing code that works now is easy. Writing code that will...
[ { "code": null, "e": 431, "s": 171, "text": "This article is a chapter taken from my ongoing (and still only partially complete) book on Data science titled, “A Lazy Guide to Data Science”. To read similar articles, refer to my blog or my medium page. Don't forget to say hi on LinkedIn and/or Twitte...
IPython - IO Caching
The input and output cells on IPython console are numbered incrementally. In this chapter, let us look into IO caching in Python in detail. In IPython, inputs are retrieved using up arrow key. Besides, all previous inputs are saved and can be retrieved. The variables _i, __i, and ___i always store the previous three in...
[ { "code": null, "e": 2800, "s": 2660, "text": "The input and output cells on IPython console are numbered incrementally. In this chapter, let us look into IO caching in Python in detail." }, { "code": null, "e": 3183, "s": 2800, "text": "In IPython, inputs are retrieved using up ...
Python – Negative index of Element in List
When it is required to get the negative index of an element in a list, the ‘len’ method and the ‘index’ method are used. Below is a demonstration of the same − Live Demo my_list = [52, 47, 18, 22, 23, 57, 13] print("The list is :") print(my_list) my_key = 22 print("The value of key is ") print(my_key) my_result = l...
[ { "code": null, "e": 1183, "s": 1062, "text": "When it is required to get the negative index of an element in a list, the ‘len’ method and the ‘index’ method are used." }, { "code": null, "e": 1222, "s": 1183, "text": "Below is a demonstration of the same −" }, { "code": ...
Apache Solr - Updating Data
Following is the XML file used to update a field in the existing document. Save this in a file with the name update.xml. <add> <doc> <field name = "id">001</field> <field name = "first name" update = "set">Raj</field> <field name = "last name" update = "add">Malhotra</field> ...
[ { "code": null, "e": 2145, "s": 2024, "text": "Following is the XML file used to update a field in the existing document. Save this in a file with the name update.xml." }, { "code": null, "e": 2487, "s": 2145, "text": "<add> \n <doc> \n <field name = \"id\">001</fiel...
Tryit Editor v3.7
Tryit: Transition + transform
[]
C++ Program to Implement Stack using array
A stack is an abstract data structure that contains a collection of elements. Stack implements the LIFO mechanism i.e. the element that is pushed at the end is popped out first. Some of the principle operations in the stack are − Push - This adds a data value to the top of the stack. Push - This adds a data value to th...
[ { "code": null, "e": 1292, "s": 1062, "text": "A stack is an abstract data structure that contains a collection of elements. Stack implements the LIFO mechanism i.e. the element that is pushed at the end is popped out first. Some of the principle operations in the stack are −" }, { "code": n...
Knapsack with large Weights - GeeksforGeeks
26 Nov, 2021 Given a knapsack with capacity C and two arrays w[] and val[] representing the weights and values of N distinct items, the task is to find the maximum value you can put into the knapsack. Items cannot be broken and an item with weight X takes X capacity of the knapsack. Examples: Input: w[] = {3, 4, 5}, v...
[ { "code": null, "e": 26053, "s": 26025, "text": "\n26 Nov, 2021" }, { "code": null, "e": 26324, "s": 26053, "text": "Given a knapsack with capacity C and two arrays w[] and val[] representing the weights and values of N distinct items, the task is to find the maximum value you ca...
Array set() method in Java - GeeksforGeeks
30 Nov, 2018 The java.lang.reflect.Array.set() is an inbuilt method in Java and is used to set a specified value to a specified index of a given object array. Syntax Array.set(Object []array, int index, Object value) Parameter : array : This is an array of type Object which is to be updated. index : This is the index ...
[ { "code": null, "e": 26341, "s": 26313, "text": "\n30 Nov, 2018" }, { "code": null, "e": 26487, "s": 26341, "text": "The java.lang.reflect.Array.set() is an inbuilt method in Java and is used to set a specified value to a specified index of a given object array." }, { "co...
NEXTMONTH function
Returns a table that contains a column of all dates from the next month, based on the first date in the dates column in the current context. NEXTMONTH (<dates>) dates A column that contains dates. A table containing a single column of date values. The dates parameter can be any of the following − A reference to a dat...
[ { "code": null, "e": 2142, "s": 2001, "text": "Returns a table that contains a column of all dates from the next month, based on the first date in the dates column in the current context." }, { "code": null, "e": 2164, "s": 2142, "text": "NEXTMONTH (<dates>) \n" }, { "cod...
Rearrange a string according to the given indices
15 Jun, 2021 Given a string S and an array index[], the task is to rearrange the string S by placing every character S[i] to position index[i].Example Input: S = “geeksforgeeks”, index[] = {5, 6, 7, 0, 1, 2, 8, 9, 10, 3, 4, 11, 12} Output: ksfeegeeorgksInput: S = “math”, index[] = {0, 1, 2, 3} Output: math Approa...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Jun, 2021" }, { "code": null, "e": 168, "s": 28, "text": "Given a string S and an array index[], the task is to rearrange the string S by placing every character S[i] to position index[i].Example " }, { "code": null, "e"...
Implementing Associate Array in Java
27 Nov, 2020 An associative array stores the set of elements in the form of (key, value) pairs. An associative array is a collection of unique keys and collections of values where each key is associated with one value. An associate array is an abstract datatype like a map that is composed of a (key, value) pair, such t...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Nov, 2020" }, { "code": null, "e": 234, "s": 28, "text": "An associative array stores the set of elements in the form of (key, value) pairs. An associative array is a collection of unique keys and collections of values where each key...
Vieta’s Formulas
10 Apr, 2022 Vieta’s formula relates the coefficients of polynomial to the sum and product of their roots, as well as the products of the roots taken in groups. Vieta’s formula describes the relationship of the roots of a polynomial with its coefficients. Consider the following example to find a polynomial with given r...
[ { "code": null, "e": 54, "s": 26, "text": "\n10 Apr, 2022" }, { "code": null, "e": 1128, "s": 54, "text": "Vieta’s formula relates the coefficients of polynomial to the sum and product of their roots, as well as the products of the roots taken in groups. Vieta’s formula describes...
SIN() and COS() Function in SQL Server
29 Sep, 2020 1. SIN() Function :The SIN() function returns the sine of a number. Syntax : SIN(number) Parameter : Required. A numeric value.number : It is a numeric value.Returns : It returns the float_expression of the sine of a number. Example-1 :When the argument holds a positive number. SELECT SIN(5); Output : -0.9...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Sep, 2020" }, { "code": null, "e": 96, "s": 28, "text": "1. SIN() Function :The SIN() function returns the sine of a number." }, { "code": null, "e": 105, "s": 96, "text": "Syntax :" }, { "code": null, ...
Implementing OR Gate using Adaline Network
30 Jun, 2022 Adline stands for adaptive linear neuron. It makes use of linear activation function, and it uses the delta rule for training to minimize the mean squared errors between the actual output and the desired target output. The weights and bias are adjustable. Here, we perform 10 epochs of training and calculat...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 Jun, 2022" }, { "code": null, "e": 481, "s": 54, "text": "Adline stands for adaptive linear neuron. It makes use of linear activation function, and it uses the delta rule for training to minimize the mean squared errors between the ...
Python Program to generate one-time password (OTP)
21 Aug, 2021 One-time Passwords (OTP) is a password that is valid for only one login session or transaction in a computer or a digital device. Now a days OTP’s are used in almost every service like Internet Banking, online transactions, etc. They are generally combination of 4 or 6 numeric digits or a 6-digit alphanume...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Aug, 2021" }, { "code": null, "e": 365, "s": 52, "text": "One-time Passwords (OTP) is a password that is valid for only one login session or transaction in a computer or a digital device. Now a days OTP’s are used in almost every se...
How to replace values of select return in MySQL?
You can use select case statement for this. The syntax is as follows. select yourColumnName1,yourColumnName2,...N, case when yourColumnName=1 then 'true' else 'false' end as anyVariableName from yourTableName; To understand the above syntax, let us create a table. The query to create a table is as follows. mysql> creat...
[ { "code": null, "e": 1257, "s": 1187, "text": "You can use select case statement for this. The syntax is as follows." }, { "code": null, "e": 1397, "s": 1257, "text": "select yourColumnName1,yourColumnName2,...N,\ncase when yourColumnName=1 then 'true'\nelse 'false'\nend as anyVa...
How to sort an array of object by two fields in JavaScript ?
13 Dec, 2019 Given an array of objects and the task is to sort the array elements by 2 fields of the object. There are two methods to solve this problem which are discussed below: Approach 1: First compare the first property, if both are unequal then sort accordingly. If they are equal then do the same for the second p...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Dec, 2019" }, { "code": null, "e": 195, "s": 28, "text": "Given an array of objects and the task is to sort the array elements by 2 fields of the object. There are two methods to solve this problem which are discussed below:" }, ...
Python List count() method
03 Aug, 2021 Python List count() is an inbuilt function in Python that returns the count of how many times a given object occurs in a List. The count() function is used to count elements on a list as well as a string. Syntax: list_name.count(object) Parameters: The object is the things whose count is to be returned....
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Aug, 2021" }, { "code": null, "e": 257, "s": 52, "text": "Python List count() is an inbuilt function in Python that returns the count of how many times a given object occurs in a List. The count() function is used to count elements ...
Program to match vowels in a string using regular expression in Java
You can group all the required characters to match within the square braces “[ ]” i.e. The metacharacter/sub-expression “[ ]” matches all the specified characters. Therefore, to match all the letters specify the vowel letters within these as shown below − [aeiouAEIOU] import java.util.Scanner; import java.util.regex.Ma...
[ { "code": null, "e": 1443, "s": 1187, "text": "You can group all the required characters to match within the square braces “[ ]” i.e. The metacharacter/sub-expression “[ ]” matches all the specified characters. Therefore, to match all the letters specify the vowel letters within these as shown below...
p5.js | pow() function
08 Apr, 2019 The pow() function in p5.js is used to calculate the power of a number to the given number. It is an efficient way of multiplying numbers by themselves (or their reciprocals) in large quantities. Syntax pow( n, e ) Parameters: The function accepts two parameters as mentioned above and described below: n: ...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Apr, 2019" }, { "code": null, "e": 224, "s": 28, "text": "The pow() function in p5.js is used to calculate the power of a number to the given number. It is an efficient way of multiplying numbers by themselves (or their reciprocals) ...
How to Interpret Models: PDP and ICE | by Zachary Warnes | Towards Data Science
Model interpretability is becoming increasingly valuable. However, when handling large models with complex relationships, interpretation is not always an easy task. Partial Dependence Plots (PDP) plots show the marginal contribution of different features on the output. They are used to display either the contribution o...
[ { "code": null, "e": 337, "s": 172, "text": "Model interpretability is becoming increasingly valuable. However, when handling large models with complex relationships, interpretation is not always an easy task." }, { "code": null, "e": 528, "s": 337, "text": "Partial Dependence Pl...
How to mount usb drive in a linux system
Do you know “how to use USB memory sticks with Linux”, If you are not sure then this article describes “how to mount USB drive on a Linux system with command line interface” Universal serial bus, or USB (also known as Flash drive), is an electronic communications protocol that is commonly used in computer accessories a...
[ { "code": null, "e": 1236, "s": 1062, "text": "Do you know “how to use USB memory sticks with Linux”, If you are not sure then this article describes “how to mount USB drive on a Linux system with command line interface”" }, { "code": null, "e": 1661, "s": 1236, "text": "Universa...
Sum Pair closest to X | Practice | GeeksforGeeks
Given a sorted array arr[] of size N and a number X, find a pair in array whose sum is closest to X. Example 1: Input: N = 6, X = 54 arr[] = {10, 22, 28, 29, 30, 40} Output: 22 30 Explanation: As 22 + 30 = 52 is closest to 54. Example 2: Input: N = 5, X = 10 arr[] = {1, 2, 3, 4, 5} Output: 4 5 Explanation: As 4 + 5 =...
[ { "code": null, "e": 339, "s": 238, "text": "Given a sorted array arr[] of size N and a number X, find a pair in array whose sum is closest to X." }, { "code": null, "e": 350, "s": 339, "text": "Example 1:" }, { "code": null, "e": 466, "s": 350, "text": "Input...
Benchmarking Language Detection for NLP | by Jenny Lee | Towards Data Science
Most NLP applications tend to be language-specific and therefore require monolingual data. In order to build an application in your target language, you may need to apply a preprocessing technique that filters out text written in non-target languages. This requires proper identification of the language of each input ex...
[ { "code": null, "e": 671, "s": 172, "text": "Most NLP applications tend to be language-specific and therefore require monolingual data. In order to build an application in your target language, you may need to apply a preprocessing technique that filters out text written in non-target languages. Thi...
Creating Custom Transformers with Scikit-Learn | by KSV Muralidhar | Towards Data Science
Transformers are classes that enable data transformations while preprocessing the data for machine learning. Examples of transformers in Scikit-Learn are SimpleImputer, MinMaxScaler, OrdinalEncoder, PowerTransformer, to name a few. At times, we may require to perform data transformations that are not predefined in popu...
[ { "code": null, "e": 794, "s": 172, "text": "Transformers are classes that enable data transformations while preprocessing the data for machine learning. Examples of transformers in Scikit-Learn are SimpleImputer, MinMaxScaler, OrdinalEncoder, PowerTransformer, to name a few. At times, we may requir...
How to check whether a stored procedure exist in MySQL?
Let us first create a stored procedure − mysql> DELIMITER // mysql> CREATE PROCEDURE ExtenddatesWithMonthdemo(IN date1 datetime, IN NumberOfMonth int ) -> BEGIN -> SELECT DATE_ADD(date1,INTERVAL NumberOfMonth MONTH) AS ExtendDate; -> END; -> // Query OK, 0 rows affected (0.20 sec) mysql> DELIMITER ; Now you...
[ { "code": null, "e": 1103, "s": 1062, "text": "Let us first create a stored procedure −" }, { "code": null, "e": 1375, "s": 1103, "text": "mysql> DELIMITER //\nmysql> CREATE PROCEDURE ExtenddatesWithMonthdemo(IN date1 datetime, IN NumberOfMonth int )\n -> BEGIN\n -> SELECT DA...
Inserting random numbers into a table in MySQL?
To insert random numbers, use RAND() function from MySQL. Let us first create a table − mysql> create table DemoTable ( Value int ); Query OK, 0 rows affected (0.46 sec) Insert some records in the table using insert command − mysql> insert into DemoTable values(10); Query OK, 1 row affected (0.15 sec) mysql> insert ...
[ { "code": null, "e": 1150, "s": 1062, "text": "To insert random numbers, use RAND() function from MySQL. Let us first create a table −" }, { "code": null, "e": 1235, "s": 1150, "text": "mysql> create table DemoTable\n(\n Value int\n);\nQuery OK, 0 rows affected (0.46 sec)" },...
CSS | image-rendering Property - GeeksforGeeks
17 Dec, 2019 The image-rendering property is used to set the type of algorithm used for image scaling. This property can be used to modify the scaling behavior when the user scales the image above or below the original dimensions. Syntax: shape-rendering: auto | crisp-edges | pixelated | initial | inherit Property Valu...
[ { "code": null, "e": 24305, "s": 24277, "text": "\n17 Dec, 2019" }, { "code": null, "e": 24523, "s": 24305, "text": "The image-rendering property is used to set the type of algorithm used for image scaling. This property can be used to modify the scaling behavior when the user sc...
How to disable close button on a JFrame in Java?
To disable the close button, let us first create a frame − JFrame frame = new JFrame("Login!"); Use the setDefaultCloseOperation() to set the status of the close button. Set it to DO_NOTHING_ON_CLOSE to disable it − frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); The following is an example to disable close...
[ { "code": null, "e": 1121, "s": 1062, "text": "To disable the close button, let us first create a frame −" }, { "code": null, "e": 1158, "s": 1121, "text": "JFrame frame = new JFrame(\"Login!\");" }, { "code": null, "e": 1278, "s": 1158, "text": "Use the setDe...
Selenium - Grid
Selenium Grid is a tool that distributes the tests across multiple physical or virtual machines so that we can execute scripts in parallel (simultaneously). It dramatically accelerates the testing process across browsers and across platforms by giving us quick and accurate feedback. Selenium Grid allows us to execute m...
[ { "code": null, "e": 2159, "s": 1875, "text": "Selenium Grid is a tool that distributes the tests across multiple physical or virtual machines so that we can execute scripts in parallel (simultaneously). It dramatically accelerates the testing process across browsers and across platforms by giving u...
Subset Sum Problem
In this problem, there is a given set with some integer elements. And another some value is also provided, we have to find a subset of the given set whose sum is the same as the given sum value. Here backtracking approach is used for trying to select a valid subset when an item is not valid, we will backtrack to get th...
[ { "code": null, "e": 1257, "s": 1062, "text": "In this problem, there is a given set with some integer elements. And another some value is also provided, we have to find a subset of the given set whose sum is the same as the given sum value." }, { "code": null, "e": 1445, "s": 1257, ...
Pre & post increment operator behavior in C, C++, Java, and C#
The Pre increment and post increment both operators are used as increment operations. The pre increment operator is used to increment the value of some variable before using it in an expression. In the pre increment the value is incremented at first, then used inside the expression. if the expression is a = ++b; and b ...
[ { "code": null, "e": 1346, "s": 1062, "text": "The Pre increment and post increment both operators are used as increment operations. The pre increment operator is used to increment the value of some variable before using it in an expression. In the pre increment the value is incremented at first, th...
Creating a Pandas Series - GeeksforGeeks
17 Jan, 2019 Pandas Series is a one-dimensional labelled array capable of holding data of any type (integer, string, float, python objects, etc.). The axis labels are collectively called index. Labels need not be unique but must be a hashable type. The object supports both integer and label-based indexing and provides ...
[ { "code": null, "e": 41553, "s": 41525, "text": "\n17 Jan, 2019" }, { "code": null, "e": 41734, "s": 41553, "text": "Pandas Series is a one-dimensional labelled array capable of holding data of any type (integer, string, float, python objects, etc.). The axis labels are collectiv...
Interesting facts about switch statement in C - GeeksforGeeks
18 Sep, 2018 Prerequisite – Switch Statement in CSwitch is a control statement that allows a value to change control of execution. // Following is a simple program to demonstrate syntax of switch.#include <stdio.h>int main(){ int x = 2; switch (x) { case 1: printf("Choice is 1"); break; ...
[ { "code": null, "e": 24406, "s": 24378, "text": "\n18 Sep, 2018" }, { "code": null, "e": 24524, "s": 24406, "text": "Prerequisite – Switch Statement in CSwitch is a control statement that allows a value to change control of execution." }, { "code": "// Following is a simp...
DAX Filter - HASONEFILTER function
Returns TRUE when the number of directly filtered values on columnName is one and only one. Otherwise, returns FALSE. HASONEFILTER (<columnName>) columnName The name of an existing column, using standard DAX syntax. It cannot be an expression. TRUE or FALSE. DAX HASONEFILTER function is similar to DAX HASONEVALUE fun...
[ { "code": null, "e": 2119, "s": 2001, "text": "Returns TRUE when the number of directly filtered values on columnName is one and only one. Otherwise, returns FALSE." }, { "code": null, "e": 2149, "s": 2119, "text": "HASONEFILTER (<columnName>) \n" }, { "code": null, "...
JavaScript - RegExp multiline Property
multiline is a read-only boolean property of RegExp objects. It specifies whether a particular regular expression performs multiline matching, i.e., whether it was created with the "m" attribute. Its syntax is as follows − RegExpObject.multiline Returns "TRUE" if the "m" modifier is set, "FALSE" otherwise. Try the fol...
[ { "code": null, "e": 2662, "s": 2466, "text": "multiline is a read-only boolean property of RegExp objects. It specifies whether a particular regular expression performs multiline matching, i.e., whether it was created with the \"m\" attribute." }, { "code": null, "e": 2689, "s": 266...
Redis - Hash Hmset Command
Redis HMSET command is used to set the specified fields to their respective values in the hash stored at the key. This command overwrites any existing fields in the hash. If the key does not exist, a new key holding a hash is created. Simple string reply. Following is the basic syntax of Redis HMSET command. redis 127....
[ { "code": null, "e": 2280, "s": 2045, "text": "Redis HMSET command is used to set the specified fields to their respective values in the hash stored at the key. This command overwrites any existing fields in the hash. If the key does not exist, a new key holding a hash is created." }, { "cod...
Data Abstraction in Ruby - GeeksforGeeks
02 Dec, 2019 The idea of representing significant details and hiding details of functionality is called data abstraction. The interface and the implementation are isolated by this programming technique. Data abstraction is one of the object oriented programming features as well. Abstraction is trying to minimize inform...
[ { "code": null, "e": 23702, "s": 23674, "text": "\n02 Dec, 2019" }, { "code": null, "e": 24135, "s": 23702, "text": "The idea of representing significant details and hiding details of functionality is called data abstraction. The interface and the implementation are isolated by t...
Designing Custom ggplot2 Themes. Give your graphs an attitude | by Nancy Organ | Towards Data Science
The R versus Python debate is a favorite among data scientists. When it comes to data visualization, however, yours truly has a very clear preference: ggplot2 in R all the way. Ease of data handling and formatting aside, ggplot2 shines in its customizability. The defaults look great, albeit very distinct, but with a bi...
[ { "code": null, "e": 349, "s": 172, "text": "The R versus Python debate is a favorite among data scientists. When it comes to data visualization, however, yours truly has a very clear preference: ggplot2 in R all the way." }, { "code": null, "e": 687, "s": 349, "text": "Ease of d...
Print Adjacency List for a Directed Graph - GeeksforGeeks
11 Feb, 2022 An Adjacency List is used for representing graphs. Here, for every vertex in the graph, we have a list of all the other vertices which the particular vertex has an edge to. Problem: Given the adjacency list and number of vertices and edges of a graph, the task is to represent the adjacency list for a direc...
[ { "code": null, "e": 25028, "s": 25000, "text": "\n11 Feb, 2022" }, { "code": null, "e": 25201, "s": 25028, "text": "An Adjacency List is used for representing graphs. Here, for every vertex in the graph, we have a list of all the other vertices which the particular vertex has an...
DeepWalk Algorithm - GeeksforGeeks
18 Jul, 2021 In the real world, Networks are just the collection of interconnected nodes. To represent this type of network we need a data structure that is similar to it. Fortunately, we have a data structure that is the graph. The graph contains vertices (which represents the node in the network) that are connected b...
[ { "code": null, "e": 24290, "s": 24262, "text": "\n18 Jul, 2021" }, { "code": null, "e": 24506, "s": 24290, "text": "In the real world, Networks are just the collection of interconnected nodes. To represent this type of network we need a data structure that is similar to it. Fort...
Changing CSS styling with React onClick() Event - GeeksforGeeks
19 Oct, 2021 Working on styling is one of the major tasks while creating websites. Time and again we have to manipulate the CSS styling to provide a better appearance to the application we are building. So, In this article, we will see how we can change the CSS styling using React. Specifically, we will see how an even...
[ { "code": null, "e": 24363, "s": 24335, "text": "\n19 Oct, 2021" }, { "code": null, "e": 24846, "s": 24363, "text": "Working on styling is one of the major tasks while creating websites. Time and again we have to manipulate the CSS styling to provide a better appearance to the ap...
Bioinformatics on the cloud. Aligning RNAseq with STAR on Google... | by Hylke C. Donker | Towards Data Science
The price of analysing a person’s DNA, as well as its transcribed instructions (RNA), are rapidly getting cheaper. As a result, uptake of sequencing technology is growing, not only in scientific labs, but also in routine healthcare. But the data that is generated for a single individual can easily exceed several GBs in...
[ { "code": null, "e": 797, "s": 171, "text": "The price of analysing a person’s DNA, as well as its transcribed instructions (RNA), are rapidly getting cheaper. As a result, uptake of sequencing technology is growing, not only in scientific labs, but also in routine healthcare. But the data that is g...
How to: Automate live data to your website with Python | by Truett Bloxsom | Towards Data Science
This tutorial will be helpful for people who have a website that hosts live data on a cloud service but are unsure how to completely automate the updating of the live data so the website becomes hassle free. For example: I host a website that shows Texas COVID case counts by county in an interactive dashboard, but ever...
[ { "code": null, "e": 856, "s": 172, "text": "This tutorial will be helpful for people who have a website that hosts live data on a cloud service but are unsure how to completely automate the updating of the live data so the website becomes hassle free. For example: I host a website that shows Texas ...
Program to find the shortest distance between diagonal and edge skew of a Cube - GeeksforGeeks
17 Mar, 2021 Given an integer A, denoting the length of a cube, the task is to find the shortest distance between the diagonal of a cube and an edge skew to it i.e. KL in the below figure. Examples : Input: A = 2Output: 1.4142Explanation:Length of KL = A / √2Length of KL = 2 / 1.41 = 1.4142 Input: A = 3Output: 2.1213 A...
[ { "code": null, "e": 25300, "s": 25272, "text": "\n17 Mar, 2021" }, { "code": null, "e": 25476, "s": 25300, "text": "Given an integer A, denoting the length of a cube, the task is to find the shortest distance between the diagonal of a cube and an edge skew to it i.e. KL in the b...
Ultimate Pandas Guide — Window Functions | by Skyler Dale | Towards Data Science
Window functions are an efficient way to understand more about the relationship between each of the records within our data and the groups they belong to. They also happen to be a common data science interview question so they’re a good thing to understand well. In this post, I’ll walk through an intuitive explanation ...
[ { "code": null, "e": 327, "s": 172, "text": "Window functions are an efficient way to understand more about the relationship between each of the records within our data and the groups they belong to." }, { "code": null, "e": 435, "s": 327, "text": "They also happen to be a common...
Hello World Program in Java
Let us look at a simple code that will print the words Hello World. Online Demo public class MyFirstJavaProgram { /* This is my first java program. * This will print 'Hello World' as the output */ public static void main(String []args) { System.out.println("Hello World"); // prints Hello World ...
[ { "code": null, "e": 1130, "s": 1062, "text": "Let us look at a simple code that will print the words Hello World." }, { "code": null, "e": 1142, "s": 1130, "text": "Online Demo" }, { "code": null, "e": 1386, "s": 1142, "text": "public class MyFirstJavaProgram...
Market-basket analysis and prediction | by Gokul S Kumar | Towards Data Science
We all have been shopping more from online e-commerce sites recently, probably due to the lock-down imposed in most parts of the world. You must have noticed an up-sell feature named ‘frequently bought together’ in most of these sites, for instance Amazon where it predicts what all items would go-along with the item th...
[ { "code": null, "e": 1160, "s": 172, "text": "We all have been shopping more from online e-commerce sites recently, probably due to the lock-down imposed in most parts of the world. You must have noticed an up-sell feature named ‘frequently bought together’ in most of these sites, for instance Amazo...
Pandas vs. Spark: how to handle dataframes (Part II) | by Emma Grimaldi | Towards Data Science
A few days ago I published a post comparing the basic commands of Python and Scala: how to deal with lists and arrays, functions, loops, dictionaries and so on. As I continue practicing with Scala, it seemed appropriate to follow-up with a second part, comparing how to handle dataframes in the two programming languages...
[ { "code": null, "e": 644, "s": 172, "text": "A few days ago I published a post comparing the basic commands of Python and Scala: how to deal with lists and arrays, functions, loops, dictionaries and so on. As I continue practicing with Scala, it seemed appropriate to follow-up with a second part, co...
Difference between count(*) and count(columnName) in MySQL?
The count(*) returns all rows whether column contains null value or not while count(columnName) returns the number of rows except null rows. Let us first create a table. Following is the query mysql> create table ifNotNullDemo -> ( -> Name varchar(20) -> ); Query OK, 0 rows affected (0.54 sec) Following is the...
[ { "code": null, "e": 1203, "s": 1062, "text": "The count(*) returns all rows whether column contains null value or not while count(columnName) returns the number of rows except null rows." }, { "code": null, "e": 1232, "s": 1203, "text": "Let us first create a table." }, { ...
Asynchronous Operations
In this chapter, we will learn how to test asynchronous operations using Espresso Idling Resources. One of the challenges of the modern application is to provide smooth user experience. Providing smooth user experience involves lot of work in the background to make sure that the application process does not take longer...
[ { "code": null, "e": 2076, "s": 1976, "text": "In this chapter, we will learn how to test asynchronous operations using Espresso Idling Resources." }, { "code": null, "e": 2625, "s": 2076, "text": "One of the challenges of the modern application is to provide smooth user experien...
Count of substrings of length K with exactly K distinct characters - GeeksforGeeks
19 Aug, 2021 Given string str of the lowercase alphabet and an integer K, the task is to count all substrings of length K which have exactly K distinct characters. Example: Input: str = “abcc”, K = 2 Output: 2 Explanation: Possible substrings of length K = 2 are ab : 2 distinct characters bc : 2 distinct characters cc...
[ { "code": null, "e": 24955, "s": 24927, "text": "\n19 Aug, 2021" }, { "code": null, "e": 25107, "s": 24955, "text": "Given string str of the lowercase alphabet and an integer K, the task is to count all substrings of length K which have exactly K distinct characters. " }, { ...
for loop in C
A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times. The syntax of a for loop in C programming language is − for ( init; condition; increment ) { statement(s); } Here is the flow of control in a 'for' loop − The init step is execu...
[ { "code": null, "e": 2223, "s": 2084, "text": "A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times." }, { "code": null, "e": 2279, "s": 2223, "text": "The syntax of a for loop in C programming l...
Java program to cyclically rotate an array by one.
To rotate the contents of an array cyclically − create an empty variable. (temp) save the last element of the array in it. Now, starting from the nth element of the array, replace the current element with the previous element. Store the element in temp in the 1st position. Live Demo import java.util.Arrays; import jav...
[ { "code": null, "e": 1110, "s": 1062, "text": "To rotate the contents of an array cyclically −" }, { "code": null, "e": 1143, "s": 1110, "text": "create an empty variable. (temp)" }, { "code": null, "e": 1185, "s": 1143, "text": "save the last element of the a...
Introduction to procedures and cursors in SQL | by Sayak Paul | Towards Data Science
Learn how to write procedures and cursors for an RDBMS. If you want to learn more about SQL specifically from a Data Science perspective, you can take DataCamp’s free “Intro to SQL for Data Science” course. SQL is a must-have skill for any modern software engineer. Because most of the softwares depend on some kind of d...
[ { "code": null, "e": 228, "s": 172, "text": "Learn how to write procedures and cursors for an RDBMS." }, { "code": null, "e": 379, "s": 228, "text": "If you want to learn more about SQL specifically from a Data Science perspective, you can take DataCamp’s free “Intro to SQL for D...