title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Web-Socket in Node.js
21 Feb, 2022 What is a Web Socket? Web Socket is a protocol that provides full-duplex(multiway) communication i.e allows communication in both directions simultaneously. It is a modern web technology in which there is a continuous connection between the user’s browser(client) and the server. In this type of communicati...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Feb, 2022" }, { "code": null, "e": 1228, "s": 28, "text": "What is a Web Socket? Web Socket is a protocol that provides full-duplex(multiway) communication i.e allows communication in both directions simultaneously. It is a modern we...
Lodash _.findLast() Method
02 Sep, 2020 Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, objects, numbers etc. The _.findLast() method iterates over the elements in a collection from the right to the left. It is almost the same as _.find() method. Syntax: _.findLast(...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Sep, 2020" }, { "code": null, "e": 179, "s": 28, "text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, objects, numbers etc." }, { "code": nu...
Feature Engineering techniques in Python | by Defend Intelligence | Towards Data Science
Features engineering is a crucial part in each Machine Learning project. In this article we will go around some techniques to handle this task. Please do not hesitate to comment with new ideas, I will try to keep this article updated as much as possible. When performing features engineering, in order to have a general ...
[ { "code": null, "e": 427, "s": 172, "text": "Features engineering is a crucial part in each Machine Learning project. In this article we will go around some techniques to handle this task. Please do not hesitate to comment with new ideas, I will try to keep this article updated as much as possible."...
Excel DAX - Calculated Fields / Measures
A calculated field in a table in a Data Model is the field obtained by a DAX formula. In earlier versions of Power Pivot, the calculated field was termed as a measure. In Excel 2013, it was renamed as a calculated field. However, it is renamed back to measure in Excel 2016. If you refer to any documentation, you can ob...
[ { "code": null, "e": 2721, "s": 2249, "text": "A calculated field in a table in a Data Model is the field obtained by a DAX formula. In earlier versions of Power Pivot, the calculated field was termed as a measure. In Excel 2013, it was renamed as a calculated field. However, it is renamed back to m...
SymPy - Substitution
One of the most basic operations to be performed on a mathematical expression is substitution. The subs() function in SymPy replaces all occurrences of first parameter with second. >>> from sympy.abc import x,a >>> expr=sin(x)*sin(x)+cos(x)*cos(x) >>> expr The above code snippet gives an output equivalent to the bel...
[ { "code": null, "e": 2200, "s": 2019, "text": "One of the most basic operations to be performed on a mathematical expression is substitution. The subs() function in SymPy replaces all occurrences of first parameter with second." }, { "code": null, "e": 2279, "s": 2200, "text": ">...
Scrapy - Requests and Responses
Scrapy can crawl websites using the Request and Response objects. The request objects pass over the system, uses the spiders to execute the request and get back to the request when it returns a response object. The request object is a HTTP request that generates a response. It has the following class − class scrapy.htt...
[ { "code": null, "e": 2448, "s": 2237, "text": "Scrapy can crawl websites using the Request and Response objects. The request objects pass over the system, uses the spiders to execute the request and get back to the request when it returns a response object." }, { "code": null, "e": 2541,...
Why scale_fill_manual does not fill the bar with colors created by using ggplot2 in R?
We can manually fill the color of bars in a bar plot which is created by using ggplot2 but for this we would be needing color aesthetics already used for the bars. That means we need to use filling of bars inside aes of ggplot2 and then the colors can be mentioned inside the scale_fill_manual function. Consider the bel...
[ { "code": null, "e": 1366, "s": 1062, "text": "We can manually fill the color of bars in a bar plot which is created by using ggplot2 but for this we would be needing color aesthetics already used for the bars. That means we need to use filling of bars inside aes of ggplot2 and then the colors can b...
Tracing Tkinter variables in Python - GeeksforGeeks
12 Dec, 2021 There is no inbuilt way to track variables in Python. But tkinter supports creating variable wrappers that can be used to do so by attaching an ‘observer’ callback to the variable. The tkinter.Variable class has constructors like BooleanVar, DoubleVar, IntVarand StringVar for boolean, double-precision floa...
[ { "code": null, "e": 24238, "s": 24210, "text": "\n12 Dec, 2021" }, { "code": null, "e": 25186, "s": 24238, "text": "There is no inbuilt way to track variables in Python. But tkinter supports creating variable wrappers that can be used to do so by attaching an ‘observer’ callback...
HTML | DOM onchange Event
28 Jun, 2019 The HTML DOM onchange event occurs when the value of an element has been changed. It also works with radio buttons and checkboxes when the checked state has been changed. Note: This event is similar to the oninput event but the only difference is that the oninput event occurs immediately after the value of...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jun, 2019" }, { "code": null, "e": 199, "s": 28, "text": "The HTML DOM onchange event occurs when the value of an element has been changed. It also works with radio buttons and checkboxes when the checked state has been changed." }...
Sort the given string using character search
16 Jun, 2022 Given a string str of size n. The problem is to sort the given string without using any sorting techniques (like bubble, selection, etc). The string contains only lowercase characters.Examples: Input : geeksforgeeks Output : eeeefggkkorss Input : coding Output : cdgino Algorithm: sortString(str, n) ...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Jun, 2022" }, { "code": null, "e": 248, "s": 52, "text": "Given a string str of size n. The problem is to sort the given string without using any sorting techniques (like bubble, selection, etc). The string contains only lowercase c...
Regex metacharacters in Java Regex
Metacharacters are characters which are having special meanings in Java regular expression. Following metacharacters are suppored in Java Regular expressions. ( ) [ ] { { \ ^ $ | ? * + .
[ { "code": null, "e": 1154, "s": 1062, "text": "Metacharacters are characters which are having special meanings in Java regular expression." }, { "code": null, "e": 1221, "s": 1154, "text": "Following metacharacters are suppored in Java Regular expressions." }, { "code": n...
How to make a textarea and input type read only using jQuery?
To make a textarea and input type read only, use the attr() method . For readonly, set the input type text and textarea as read only as shown below: $('input[type="text"], textarea').each(function(){ $(this).attr('readonly','readonly'); }); The following is the code to set readonly to textarea and input type: Live ...
[ { "code": null, "e": 1131, "s": 1062, "text": "To make a textarea and input type read only, use the attr() method ." }, { "code": null, "e": 1211, "s": 1131, "text": "For readonly, set the input type text and textarea as read only as shown below:" }, { "code": null, "...
Pandas Profiling & Sweetviz. Python EDA tools | Towards Data Science
Data cleaning and Exploratory Data Analysis go hand-in-hand — with a better understanding of the data, can one be better positioned to spot errors or outliers for mitigation. Most of us do EDA through pandas functions, coupled with visualizations using matplotlib to seaborn. Occasionally, we define functions to do 1) a...
[ { "code": null, "e": 346, "s": 171, "text": "Data cleaning and Exploratory Data Analysis go hand-in-hand — with a better understanding of the data, can one be better positioned to spot errors or outliers for mitigation." }, { "code": null, "e": 778, "s": 346, "text": "Most of us ...
C++ Vector Library - rbegin() Function
The C++ function std::vector::rbegin() returns a reverse iterator which points to the last element of the vector. Reverse iterator iterates reverse order that is why incrementing them moves towards beginning of vector. Following is the declaration for std::vector::rbegin() function form std::vector header. reverse_iter...
[ { "code": null, "e": 2717, "s": 2603, "text": "The C++ function std::vector::rbegin() returns a reverse iterator which points to the last element of the vector." }, { "code": null, "e": 2822, "s": 2717, "text": "Reverse iterator iterates reverse order that is why incrementing the...
Difference between == and equals() method in Java.
The equals() 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. Live Demo public class Sample { public static void main(String []args) { String s1 = "tutorialspoi...
[ { "code": null, "e": 1274, "s": 1062, "text": "The equals() 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." }, { "code": null, "e": 1285...
JavaScript | Detecting the pressed arrow key - GeeksforGeeks
20 May, 2019 Sometimes we need to detect the keys and sometimes even detect which keys were pressed. To detect which arrow key is pressed, We are going to look at 2 examples. onkeydown Event:This event occurs when someone presses a key (on the keyboard).Syntax:in HTML:<element onkeydown="newScript" > in JavaScript:obje...
[ { "code": null, "e": 24445, "s": 24417, "text": "\n20 May, 2019" }, { "code": null, "e": 24607, "s": 24445, "text": "Sometimes we need to detect the keys and sometimes even detect which keys were pressed. To detect which arrow key is pressed, We are going to look at 2 examples." ...
Logo - Quick Guide
Logo is a programming language that is very simple and easy to learn. It is used for teaching students and children how to program a computer. Because it is fun, lots of fun. Enhances the logical sense of the children. Develops programming skills. It is real Computer Science. Logo is a very easy and interesting program...
[ { "code": null, "e": 1977, "s": 1834, "text": "Logo is a programming language that is very simple and easy to learn. It is used for teaching students and children how to program a computer." }, { "code": null, "e": 2009, "s": 1977, "text": "Because it is fun, lots of fun." }, ...
Python for Android: Start Building Kivy Cross-Platform Applications | by Ahmed Gad | Towards Data Science
This tutorial goes through steps required to create an Android application using Kivy cross-platform Python framework using Linux Ubuntu distribution. Before starting installing Kivy and getting it up and running, it is required to install its dependencies. Most of the time is used for preparing the Kivy environment by...
[ { "code": null, "e": 616, "s": 171, "text": "This tutorial goes through steps required to create an Android application using Kivy cross-platform Python framework using Linux Ubuntu distribution. Before starting installing Kivy and getting it up and running, it is required to install its dependencie...
Strikethrough text with CSS
Use the text-decoration property to strikethrough text with CSS. You can try to run the following code to underline text: <html> <head> </head> <body> <p style = "text-decoration:line-through;"> This will be striked through. </p> </body> </html>
[ { "code": null, "e": 1184, "s": 1062, "text": "Use the text-decoration property to strikethrough text with CSS. You can try to run the following code to underline text:" }, { "code": null, "e": 1341, "s": 1184, "text": "<html>\n <head>\n </head>\n <body>\n <p style = \...
How I DIY’d my Budget Using Python for Selenium and Beautiful Soup | by Jennifer Kim | Towards Data Science
I’m an avid fan of personality tests. I love reading through my pre-packaged type description I swear is unique to me and only me. I love how they make me feel as though a pair of psychologists have stolen a glance at my soul using answers I myself provided. But I know not everyone agrees. For the naysayers, whether th...
[ { "code": null, "e": 633, "s": 172, "text": "I’m an avid fan of personality tests. I love reading through my pre-packaged type description I swear is unique to me and only me. I love how they make me feel as though a pair of psychologists have stolen a glance at my soul using answers I myself provid...
Python Tutorial For Researchers Who use R | by Jun Wu | Towards Data Science
This tutorial is aimed at researchers who are used to using R. Data is at the center of any research project. To me, every researcher is now empowered with massive amounts of data than ever before. This puts a researcher squarely in the role of being a data scientist. If you are a researcher who’s been using R all this...
[ { "code": null, "e": 869, "s": 171, "text": "This tutorial is aimed at researchers who are used to using R. Data is at the center of any research project. To me, every researcher is now empowered with massive amounts of data than ever before. This puts a researcher squarely in the role of being a da...
Basics of NS2 and Otcl/tcl script - GeeksforGeeks
31 Mar, 2022 Simulation is the process of learning by doing. Whenever there is something new in the world, we try to analyze it first by examining it and in the process get to learn a lot of things. This entire course is called Simulation. Correlating to this process, in order to understand all the complexities one nee...
[ { "code": null, "e": 24350, "s": 24322, "text": "\n31 Mar, 2022" }, { "code": null, "e": 26196, "s": 24350, "text": "Simulation is the process of learning by doing. Whenever there is something new in the world, we try to analyze it first by examining it and in the process get to ...
GWT - Logging Framework
The logging framework emulates java.util.logging, so it uses the same syntax and has the same behavior as server side logging code GWT logging is configured using .gwt.xml files. We can configure logging to be enabled/disabled; we can enable/disable particular handlers, and change the default logging level. Loggers are...
[ { "code": null, "e": 2154, "s": 2023, "text": "The logging framework emulates java.util.logging, so it uses the same syntax and has the same behavior as server side logging code" }, { "code": null, "e": 2202, "s": 2154, "text": "GWT logging is configured using .gwt.xml files." ...
Intro to Monte Carlo Simulation Using Business Examples | by Bassel Karami | Towards Data Science
Monte Carlo simulation is a computational technique that can be used for a wide range of functions such as solving some of the more difficult mathematical problems as well as risk management. We will go through 2 examples to demonstrate how Monte Carlo simulations can help you quantify risks in your next project or bus...
[ { "code": null, "e": 364, "s": 172, "text": "Monte Carlo simulation is a computational technique that can be used for a wide range of functions such as solving some of the more difficult mathematical problems as well as risk management." }, { "code": null, "e": 508, "s": 364, "te...
Unique() Function in R - GeeksforGeeks
30 Sep, 2021 Unique() function in R Programming Language it is used to return a vector, data frame, or array without any duplicate elements/rows. Syntax: unique(x, incomparables, fromLast, nmax, ...,MARGIN) Parameters: This function accepts some parameters which are illustrated below: x: This parameter is a vector or a...
[ { "code": null, "e": 25162, "s": 25134, "text": "\n30 Sep, 2021" }, { "code": null, "e": 25295, "s": 25162, "text": "Unique() function in R Programming Language it is used to return a vector, data frame, or array without any duplicate elements/rows." }, { "code": null, ...
Sequence Embedding for Clustering and Classification | by Chitta Ranjan | Towards Data Science
Here we will learn an approach to get vector embeddings for string sequences. These embeddings can be used for Clustering and Classification. Sequence modeling has been a challenge. This is because of the inherent un-structuredness of sequence data. Just like texts in Natural Language Processing (NLP), sequences are ar...
[ { "code": null, "e": 314, "s": 172, "text": "Here we will learn an approach to get vector embeddings for string sequences. These embeddings can be used for Clustering and Classification." }, { "code": null, "e": 611, "s": 314, "text": "Sequence modeling has been a challenge. This...
What is the equivalent of sumproduct function of Excel for two vectors in R?
The sumproduct function in Excel multiply each value of two or more arrays with the corresponding values then add the sum of the result. For example, if we have 1, 2 in A1, A2 in Excel and 2, 2 in B1 and B2 then sumproduct will multiply 1*2 and 2*2 then take the summation of those two multiplications. In R, we have cro...
[ { "code": null, "e": 1412, "s": 1062, "text": "The sumproduct function in Excel multiply each value of two or more arrays with the corresponding values then add the sum of the result. For example, if we have 1, 2 in A1, A2 in Excel and 2, 2 in B1 and B2 then sumproduct will multiply 1*2 and 2*2 then...
PyWebIO: Write Interactive Web App in Script Way Using Python | by Khuyen Tran | Towards Data Science
Have you ever wanted to create a web application in only several lines of Python code? Streamlit allows you to do that, but it doesn’t give you a lot of options to customize your input box, output, layout, and pages. If you are looking for something that is easier to learn than Django and Flask, but more customizable t...
[ { "code": null, "e": 388, "s": 171, "text": "Have you ever wanted to create a web application in only several lines of Python code? Streamlit allows you to do that, but it doesn’t give you a lot of options to customize your input box, output, layout, and pages." }, { "code": null, "e": 5...
Text Analysis in R made easy with Udpipe | by AbdulMajedRaja RS | Towards Data Science
Text Analysis has been seen as one of the blackboxes of Data Analytics. The aim of this post is to introduce this simple-to-use but effective R package udpipe for Text Analysis. UDPipe — R package provides language-agnostic tokenization, tagging, lemmatization and dependency parsing of raw text, which is an essential p...
[ { "code": null, "e": 350, "s": 172, "text": "Text Analysis has been seen as one of the blackboxes of Data Analytics. The aim of this post is to introduce this simple-to-use but effective R package udpipe for Text Analysis." }, { "code": null, "e": 528, "s": 350, "text": "UDPipe —...
Composition vs inheritance in React.js
Composition and inheritance are the approaches to use multiple components together in React.js . This helps in code reuse. React recommend using composition instead of inheritance as much as possible and inheritance should be used in very specific cases only. Example to understand it − Let’s say we have a component to ...
[ { "code": null, "e": 1322, "s": 1062, "text": "Composition and inheritance are the approaches to use multiple components together in React.js . This helps in code reuse. React recommend using composition instead of inheritance as much as possible and inheritance should be used in very specific cases...
A Classification Model for Source Code Languages | by Amal Hasni | Dec, 2020 | Towards Data Science | Towards Data Science
Written by: Amal Hasni & Dhia Hmila We recently needed to write an extension of Python’s Markdown package. For this purpose, we needed to detect the programming language of each code block to apply specific modifications. Luckily, in addition to being programming enthusiasts, we also happen to be data scientists. So we...
[ { "code": null, "e": 208, "s": 172, "text": "Written by: Amal Hasni & Dhia Hmila" }, { "code": null, "e": 634, "s": 208, "text": "We recently needed to write an extension of Python’s Markdown package. For this purpose, we needed to detect the programming language of each code blo...
Export Pandas dataframe to a CSV file - GeeksforGeeks
01 Sep, 2021 Suppose you are working on a Data Science project and you tackle one of the most important tasks, i.e, Data Cleaning. After data cleaning, you don’t want to lose your cleaned data frame, so you want to save your cleaned data frame as a CSV. Let us see how to export a Pandas DataFrame to a CSV file. Pandas ...
[ { "code": null, "e": 25555, "s": 25527, "text": "\n01 Sep, 2021" }, { "code": null, "e": 25958, "s": 25555, "text": "Suppose you are working on a Data Science project and you tackle one of the most important tasks, i.e, Data Cleaning. After data cleaning, you don’t want to lose y...
Count total ways to reach destination from source in an undirected Graph - GeeksforGeeks
03 Jun, 2021 Given an undirected graph, a source vertex ‘s’ and a destination vertex ‘d’, the task is to count the total paths from the given ‘s’ to ‘d’. Examples Input: s = 1, d = 4 Output: 2 Explanation: Below are the 2 paths from 1 to 4 1 -> 3 -> 4 1 -> 2 -> 3 -> 4 Input: s = 3, d = 9 Output: 6 Explanation: Belo...
[ { "code": null, "e": 26229, "s": 26201, "text": "\n03 Jun, 2021" }, { "code": null, "e": 26370, "s": 26229, "text": "Given an undirected graph, a source vertex ‘s’ and a destination vertex ‘d’, the task is to count the total paths from the given ‘s’ to ‘d’." }, { "code": ...
Determinant of a Matrix in C++?
The determinant of a matrix can be calculated only for a square matrix by multiplying the first row cofactor by the determinant of the corresponding cofactor and adding them with alternate signs to get the final result. A=[abcdefghi]|A|=a(ei−fh)−b(di−gf)+c(dh−eg) First we have the determinantOfMatrix(int mat[N][N], int...
[ { "code": null, "e": 1282, "s": 1062, "text": "The determinant of a matrix can be calculated only for a square matrix by multiplying the first row cofactor by the determinant of the corresponding cofactor and adding them with alternate signs to get the final result." }, { "code": null, "...
MySQL query to GROUP BY multiple columns
You can use IF() to GROUP BY multiple columns. To understand the concept, let us create a table. The query to create a table is as follows mysql> create table MultipleGroupByDemo -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> CustomerId int, -> ProductName varchar(100) -> ); Query OK, 0 rows affe...
[ { "code": null, "e": 1201, "s": 1062, "text": "You can use IF() to GROUP BY multiple columns. To understand the concept, let us create a table. The query to create a table is as follows" }, { "code": null, "e": 1398, "s": 1201, "text": "mysql> create table MultipleGroupByDemo\n ...
JavaScript methods to increment/decrement alphabetical letters - GeeksforGeeks
31 Jul, 2019 The task is to increment/decrement alphabetic letters using ASCII value with the help of JavaScript. Approach: Use charCodeAt() method to return the Unicode of the character at the specified index in a string Increment/Decrement the ASCII value depending on the requirement. Use fromCharCode() method to con...
[ { "code": null, "e": 24933, "s": 24905, "text": "\n31 Jul, 2019" }, { "code": null, "e": 25034, "s": 24933, "text": "The task is to increment/decrement alphabetic letters using ASCII value with the help of JavaScript." }, { "code": null, "e": 25044, "s": 25034, ...
Five ways to work seamlessly between R and Python in the same project | by Keith McNulty | Towards Data Science
Lately I’ve found myself doing more projects using both R and Python together. It has become more important to me to use the best tools for the job and not be constrained by a single language. There are things that Python does best and there are things that R does best, so if we can use both when we need to, we can pro...
[ { "code": null, "e": 772, "s": 171, "text": "Lately I’ve found myself doing more projects using both R and Python together. It has become more important to me to use the best tools for the job and not be constrained by a single language. There are things that Python does best and there are things th...
Linear Regression on Boston Housing Dataset | by Animesh Agarwal | Towards Data Science
In my previous blog, I covered the basics of linear regression and gradient descent. To get hands-on linear regression we will take an original dataset and apply the concepts that we have learned. We will take the Housing dataset which contains information about different houses in Boston. This data was originally a pa...
[ { "code": null, "e": 368, "s": 171, "text": "In my previous blog, I covered the basics of linear regression and gradient descent. To get hands-on linear regression we will take an original dataset and apply the concepts that we have learned." }, { "code": null, "e": 766, "s": 368, ...
JavaScript Count the number of unique elements in an array of objects by an object property?
Suppose, we have the following array of objects that contains data about orders placed in a restaurant − const orders = [ {table_id: 3, food_id: 5}, {table_id: 4, food_id: 2}, {table_id: 1, food_id: 6}, {table_id: 3, food_id: 4}, {table_id: 4, food_id: 6}, ]; We are required to write a JavaScript functio...
[ { "code": null, "e": 1167, "s": 1062, "text": "Suppose, we have the following array of objects that contains data about orders placed in a restaurant −" }, { "code": null, "e": 1337, "s": 1167, "text": "const orders = [\n {table_id: 3, food_id: 5},\n {table_id: 4, food_id: 2}...
How to check if android application is running background?
There are so many situations, that we should find android application is running background or not. This example demonstrates how to check if an android application is running background. Step 1 - Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Ste...
[ { "code": null, "e": 1250, "s": 1062, "text": "There are so many situations, that we should find android application is running background or not. This example demonstrates how to check if an android application is running background." }, { "code": null, "e": 1379, "s": 1250, "te...
McNemar’s exact test from scratch with Python: Evaluation of SARS-CoV-1 diagnostic test performance | by Tobias Roeschl | Towards Data Science
This article is about McNemar’s exact test and its implementation in Python. I want to begin with indications and test theory of McNemar’s exact test before we will address how to perform the test from scratch with Python. We will use real data from the SARS coronavirus epidemic in 2003 as an example. At the end, we wa...
[ { "code": null, "e": 590, "s": 171, "text": "This article is about McNemar’s exact test and its implementation in Python. I want to begin with indications and test theory of McNemar’s exact test before we will address how to perform the test from scratch with Python. We will use real data from the S...
Bootstrap .has-success class
The has-success class allows you to set success action for input − Live Demo <!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet"> <script src = "/scripts/jquery.min.js"></script> <script src = "/bootstrap/js/bootstr...
[ { "code": null, "e": 1129, "s": 1062, "text": "The has-success class allows you to set success action for input −" }, { "code": null, "e": 1139, "s": 1129, "text": "Live Demo" }, { "code": null, "e": 1840, "s": 1139, "text": "<!DOCTYPE html>\n<html>\n <head>...
Find the maximum repeating number in O(n) time and O(1) extra space - GeeksforGeeks
01 Mar, 2021 Given an array of size n, the array contains numbers in range from 0 to k-1 where k is a positive integer and k <= n. Find the maximum repeating number in this array. For example, let k be 10 the given array be arr[] = {1, 2, 2, 2, 0, 2, 0, 2, 3, 8, 0, 9, 2, 3}, the maximum repeating number would be 2. Exp...
[ { "code": null, "e": 25236, "s": 25208, "text": "\n01 Mar, 2021" }, { "code": null, "e": 25644, "s": 25236, "text": "Given an array of size n, the array contains numbers in range from 0 to k-1 where k is a positive integer and k <= n. Find the maximum repeating number in this arr...
Square and Square root in Arduino
Arduino has support for several popular math functions, square and square root being among them. Let’s look at the square root first. sqrt(x) where x is a number of any data type. It returns a double. For square, you ideally shouldn’t need a separate function. You can just multiply the number by itself. x_squared = x*x...
[ { "code": null, "e": 1196, "s": 1062, "text": "Arduino has support for several popular math functions, square and square root being among them. Let’s look at the square root first." }, { "code": null, "e": 1204, "s": 1196, "text": "sqrt(x)" }, { "code": null, "e": 126...
JavaFX Effects - DropShadow
On applying this effect to a node, a shadow will be created behind the specified node. The class named DropShadow of the package javafx.scene.effect represents the drop shadow effect. This class contains nine properties, which are − color − This property is of Color type representing the color of the shadow. color − Th...
[ { "code": null, "e": 1987, "s": 1900, "text": "On applying this effect to a node, a shadow will be created behind the specified node." }, { "code": null, "e": 2133, "s": 1987, "text": "The class named DropShadow of the package javafx.scene.effect represents the drop shadow effect...
Program to check whether given graph is bipartite or not in Python
Suppose we have one undirected graph, we have to check whether the graph is bipartite or not. As we know a graph is bipartite when we can split the nodes of the graph into two sets A and B such that every edge {u,v} in the graph has one node u in A and another node v in B. So, if the input is like Then the output will ...
[ { "code": null, "e": 1336, "s": 1062, "text": "Suppose we have one undirected graph, we have to check whether the graph is bipartite or not. As we know a graph is bipartite when we can split the nodes of the graph into two sets A and B such that every edge {u,v} in the graph has one node u in A and ...
W3.CSS - Environment Setup
There are two ways to use W3.CSS − Local Installation − You can download the W3.CSS file on your local machine and include it in your HTML code. Local Installation − You can download the W3.CSS file on your local machine and include it in your HTML code. CDN Based Version − You can include the W3.CSS file into your HTM...
[ { "code": null, "e": 1944, "s": 1909, "text": "There are two ways to use W3.CSS −" }, { "code": null, "e": 2054, "s": 1944, "text": "Local Installation − You can download the W3.CSS file on your local machine and include it in your HTML code." }, { "code": null, "e": ...
Buying a house in the Netherlands (in a nerdy way) | by Cintia Bruscantini | Towards Data Science
If you are like me, you might get overwhelm when having to make big decisions such as buying a house. In such cases, I always like to go for a data driven approach, that will help me find an optimum solution. This involves two steps. First, we need to gather as much data as we can. And second, we need to define a metri...
[ { "code": null, "e": 506, "s": 171, "text": "If you are like me, you might get overwhelm when having to make big decisions such as buying a house. In such cases, I always like to go for a data driven approach, that will help me find an optimum solution. This involves two steps. First, we need to gat...
Concurrency in Python - Pool of Processes
Pool of process can be created and used in the same way as we have created and used the pool of threads. Process pool can be defined as the group of pre-instantiated and idle processes, which stand ready to be given work. Creating process pool is preferred over instantiating new processes for every task when we need to...
[ { "code": null, "e": 2271, "s": 1922, "text": "Pool of process can be created and used in the same way as we have created and used the pool of threads. Process pool can be defined as the group of pre-instantiated and idle processes, which stand ready to be given work. Creating process pool is prefer...
How to read a file from command line using Python?
In order to read a file form command line using Python, the script you want to use for it needs to accept a CLI argument. For example, say you want to write a cat command in python(a command that dumps all file content on the terminal). In order to do that, you could simply write a program: import sys with open(sys.arg...
[ { "code": null, "e": 1354, "s": 1062, "text": "In order to read a file form command line using Python, the script you want to use for it needs to accept a CLI argument. For example, say you want to write a cat command in python(a command that dumps all file content on the terminal). In order to do t...
C++ Program for Shortest Job First (SJF) scheduling(preemptive)
Given process, the burst time of a process respectively and a quantum limit; the task is to find and print the waiting time, turnaround time and their respective average time using Shortest Job First Scheduling preemptive method. What is the shortest job first scheduling? Shortest job first scheduling is the job or pro...
[ { "code": null, "e": 1292, "s": 1062, "text": "Given process, the burst time of a process respectively and a quantum limit; the task is to find and print the waiting time, turnaround time and their respective average time using Shortest Job First Scheduling preemptive method." }, { "code": n...
Node.js fs.watch() Method - GeeksforGeeks
29 Jul, 2020 The fs.watch() method is an inbuilt application programming interface of fs module which is used to continuously watch for changes in the given file or directory. It returns a fs.FSWatcher object that can be used to track the changes in the file. It has an optional listener as the third argument that can b...
[ { "code": null, "e": 24159, "s": 24131, "text": "\n29 Jul, 2020" }, { "code": null, "e": 24406, "s": 24159, "text": "The fs.watch() method is an inbuilt application programming interface of fs module which is used to continuously watch for changes in the given file or directory. ...
Shortest paths from all vertices to a destination - GeeksforGeeks
14 Jun, 2021 Given a Weighted Directed Graph and a destination vertex in the graph, find the shortest distance from all vertex to the destination vertex.Input : 1 Output : 0 6 10 7 5Distance of 0 from 0: 0 Distance of 0 from 1: 1+5 = 6 (1->4->0) Distance of 0 from 2: 10 (2->0) Distance of 0 from 3: 1+1+5 = 7 (3->1->4...
[ { "code": null, "e": 24986, "s": 24958, "text": "\n14 Jun, 2021" }, { "code": null, "e": 25136, "s": 24986, "text": "Given a Weighted Directed Graph and a destination vertex in the graph, find the shortest distance from all vertex to the destination vertex.Input : " }, { ...
Make a Simple NBA Shot Chart with Python | by Naveen Venkatesan | Towards Data Science
Recently, I stumbled on this wonderful Python package called nba_api, which can be found here, that serves as a very simple API client to retrieve stats from www.nba.com. I have personally always wanted to create player shot charts like ones found online, but gathering the shot location data seemed like a daunting task...
[ { "code": null, "e": 571, "s": 172, "text": "Recently, I stumbled on this wonderful Python package called nba_api, which can be found here, that serves as a very simple API client to retrieve stats from www.nba.com. I have personally always wanted to create player shot charts like ones found online,...
Data Structures and Algorithms | Set 10 - GeeksforGeeks
22 Sep, 2021 Following questions have been asked in GATE CS 2007 exam. 1. The height of a binary tree is the maximum number of edges in any root to leaf path. The maximum number of nodes in a binary tree of height h is:(A) 2^h -1(B) 2^(h-1) – 1(C) 2^(h+1) -1(D) 2*(h+1) Answer (C)Maximum number of nodes will be there fo...
[ { "code": null, "e": 23959, "s": 23931, "text": "\n22 Sep, 2021" }, { "code": null, "e": 24017, "s": 23959, "text": "Following questions have been asked in GATE CS 2007 exam." }, { "code": null, "e": 24216, "s": 24017, "text": "1. The height of a binary tree i...
Find the array element having maximum frequency of the digit K - GeeksforGeeks
24 Feb, 2022 Given an array arr[] of size N and an integer K, the task is to find an array element which contains the digit K maximum number of times. If more than one solutions exist, then print any one of them. Otherwise, print -1. Examples: Input: arr[] = {3, 77, 343, 456}, K = 3 Output: 343 Explanation: Frequency o...
[ { "code": null, "e": 24581, "s": 24553, "text": "\n24 Feb, 2022" }, { "code": null, "e": 24802, "s": 24581, "text": "Given an array arr[] of size N and an integer K, the task is to find an array element which contains the digit K maximum number of times. If more than one solution...
How to loop through all values of an enum in C#?
To loop through all the values of enum, use the Enum.GetValues(). Firstly, set an Enum − public enum Grade { A, B, C, D, E, F }; Now, with foreach loop, you need to loop through Enum.GetValues(typeof(Grade)) − foreach (Grade g in Enum.GetValues(typeof(Grade))) { Console.WriteLine(g); } Here is the complete code − L...
[ { "code": null, "e": 1128, "s": 1062, "text": "To loop through all the values of enum, use the Enum.GetValues()." }, { "code": null, "e": 1151, "s": 1128, "text": "Firstly, set an Enum −" }, { "code": null, "e": 1191, "s": 1151, "text": "public enum Grade { A,...
TestNG - Parallel Execution
TestNG allows to run tests parallelly or in separate threads in following ways: Parallel suites: If you are running several suite files (e.g. testng1.xml testng2.xml"), and you want each of these suites to be run in a separate thread. Use the following command line flag to specify the size of a thread pool: java org....
[ { "code": null, "e": 2140, "s": 2060, "text": "TestNG allows to run tests parallelly or in separate threads in following ways:" }, { "code": null, "e": 2457, "s": 2140, "text": "Parallel suites: If you are running several suite files (e.g. testng1.xml testng2.xml\"), and you want...
Spring JDBC - RowMapper Interface
The org.springframework.jdbc.core.RowMapper<T> interface is used by JdbcTemplate for mapping rows of a ResultSet on a per-row basis. Implementations of this interface perform the actual work of mapping each row to a result object. SQLExceptions if any thrown will be caught and handled by the calling JdbcTemplate. Follo...
[ { "code": null, "e": 2711, "s": 2396, "text": "The org.springframework.jdbc.core.RowMapper<T> interface is used by JdbcTemplate for mapping rows of a ResultSet on a per-row basis. Implementations of this interface perform the actual work of mapping each row to a result object. SQLExceptions if any t...
Add column with constant value to pandas dataframe - GeeksforGeeks
02 Dec, 2020 Prerequisite: Pandas In this article, we will learn how to add a new column with constant value to a Pandas DataFrame. Before that one must be familiar with the following concepts: Pandas DataFrame : Pandas DataFrame is two-dimensional size-mutable, potentially heterogeneous tabular arrangement with label...
[ { "code": null, "e": 24237, "s": 24209, "text": "\n02 Dec, 2020" }, { "code": null, "e": 24259, "s": 24237, "text": "Prerequisite: Pandas " }, { "code": null, "e": 24419, "s": 24259, "text": "In this article, we will learn how to add a new column with constant...
How to Create a Quiz App In Android? - GeeksforGeeks
15 May, 2021 Android is an operating system which is built basically for Mobile phones. It is based on the Linux Kernel and other open-source software and is developed by Google. Android is very popular nowadays among students and students are now choosing Android for their projects. It’s very much important for a begi...
[ { "code": null, "e": 26744, "s": 26716, "text": "\n15 May, 2021" }, { "code": null, "e": 27372, "s": 26744, "text": "Android is an operating system which is built basically for Mobile phones. It is based on the Linux Kernel and other open-source software and is developed by Googl...
Tryit Editor v3.7 - Show Java
public class ReadFile { public static void main(String[] args) { try { File myObj = new File("filename.txt"); Scanner myReader = new Scanner(myObj); while (myReader.hasNextLine()) { String data = myReader.nextLine(); System.out.println(data); } myReader.close();...
[]
Set kth bit | Practice | GeeksforGeeks
Given a number N and a value K. From the right, set the Kth bit in the binary representation of N. The position of Least Significant Bit(or last bit) is 0, the second last bit is 1 and so on. Example 1: Input: N = 10 K = 2 Output: 14 Explanation: Binary representation of the given number 10 is: 1 0 1 0, number of bit...
[ { "code": null, "e": 431, "s": 238, "text": "Given a number N and a value K. From the right, set the Kth bit in the binary representation of N. The position of Least Significant Bit(or last bit) is 0, the second last bit is 1 and so on. " }, { "code": null, "e": 442, "s": 431, "t...
Power BI Embedded for mere mortals | by Yousry Mohamed | Towards Data Science
Power BI has become one of the most powerful and commonly used data visualization and analytical tools in the market. It has many amazing features but one of the cool ones I like most is the embedding feature. In a nutshell, Power BI Embedded allows rendering any published report as a part of an independent web applica...
[ { "code": null, "e": 580, "s": 47, "text": "Power BI has become one of the most powerful and commonly used data visualization and analytical tools in the market. It has many amazing features but one of the cool ones I like most is the embedding feature. In a nutshell, Power BI Embedded allows render...
JqueryUI - Widget Factory
Earlier, the only way to write custom controls in jQuery was to extend the $.fn namespace. This works well for simple widgets. Suppose you build more stateful widgets, it quickly becomes cumbersome. To aid in the process of building widgets, Widget Factory was introduced in the jQuery UI, which removes most of the boil...
[ { "code": null, "e": 2645, "s": 2264, "text": "Earlier, the only way to write custom controls in jQuery was to extend the $.fn namespace. This works well for simple widgets. Suppose you build more stateful widgets, it quickly becomes cumbersome. To aid in the process of building widgets, Widget Fact...
Stockstats — a handy, stocks-oriented pandas DataFrame wrapper | by Eryk Lewinson | Towards Data Science
In this post, I wanted to briefly describe another interesting library I recently came across — stockstats. It is a wrapper library on top of a pandas DataFrame and its main goal is to provide instantaneous access to a variety of measures and technical indicators related to stock prices. Let’s jump right into it! Befor...
[ { "code": null, "e": 487, "s": 172, "text": "In this post, I wanted to briefly describe another interesting library I recently came across — stockstats. It is a wrapper library on top of a pandas DataFrame and its main goal is to provide instantaneous access to a variety of measures and technical in...
Angular 2 - Directives
A directive is a custom HTML element that is used to extend the power of HTML. Angular 2 has the following directives that get called as part of the BrowserModule module. ngif ngFor If you view the app.module.ts file, you will see the following code and the BrowserModule module defined. By defining this module, you wil...
[ { "code": null, "e": 2468, "s": 2297, "text": "A directive is a custom HTML element that is used to extend the power of HTML. Angular 2 has the following directives that get called as part of the BrowserModule module." }, { "code": null, "e": 2473, "s": 2468, "text": "ngif" }, ...
Python | Sort list of lists by lexicographic value and then length
11 May, 2020 There are many times different types of sorting has been discussed in python lists. The sorting of python list of lists has also been discussed. But sometimes, we have two parameters upon which we need to sort. First one being the list sum and next being its length. Let’s discuss how this type of problem c...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 May, 2020" }, { "code": null, "e": 349, "s": 28, "text": "There are many times different types of sorting has been discussed in python lists. The sorting of python list of lists has also been discussed. But sometimes, we have two par...
User Input in PySimpleGUI
04 Aug, 2020 It is important how keys are key for understanding PySimpleGUI elements. If the user does not specify a key, then the element will be called an input element, a key will be provided to the user by default in integer form, starting the numbering with zero. If the user doesn’t specify any keys, then the valu...
[ { "code": null, "e": 52, "s": 24, "text": "\n04 Aug, 2020" }, { "code": null, "e": 436, "s": 52, "text": "It is important how keys are key for understanding PySimpleGUI elements. If the user does not specify a key, then the element will be called an input element, a key will be p...
Flutter | An introduction to the open source SDK by Google
11 Jul, 2022 Flutter is Google’s Mobile SDK to build native iOS and Android, Desktop (Windows, Linux, macOS), and Web apps from a single codebase. When building applications with Flutter everything towards Widgets – the blocks with which the flutter apps are built. They are structural elements that ship with a bunch of...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 Jul, 2022" }, { "code": null, "e": 732, "s": 52, "text": "Flutter is Google’s Mobile SDK to build native iOS and Android, Desktop (Windows, Linux, macOS), and Web apps from a single codebase. When building applications with Flutter ...
What are the labels and badges in Bootstrap ?
07 Oct, 2021 In this article, we will learn the Bootstrap labels and badges & their implementation. Bootstrap is a free and open-source tool collection for creating responsive websites and web applications. Bootstrap is one of the most popular front-end frameworks which has really a nice set of predefined CSS codes. Bo...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Oct, 2021" }, { "code": null, "e": 637, "s": 28, "text": "In this article, we will learn the Bootstrap labels and badges & their implementation. Bootstrap is a free and open-source tool collection for creating responsive websites and...
Ping in C
13 May, 2022 Prerequisites : ICMP | Raw Socket | Internet Checksum | DNS Ping is a necessity for debugging of the Internet. Ping is a basic Internet tool that allows a user to verify that a particular IP address exists and can accept requests., with other facilities. Ping sends out ICMP packets by opening a RAW socket...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 May, 2022" }, { "code": null, "e": 645, "s": 52, "text": "Prerequisites : ICMP | Raw Socket | Internet Checksum | DNS Ping is a necessity for debugging of the Internet. Ping is a basic Internet tool that allows a user to verify that...
Python – Extract range characters from String
03 May, 2022 Given a String, extract characters only which lie between given letters. Input : test_str = ‘geekforgeeks is best’, strt, end = “g”, “s” Output : gkorgksiss Explanation : All characters after g and before s are retained. Input : test_str = ‘geekforgeeks is best’, strt, end = “g”, “r” Output : gkorgki ...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 May, 2022" }, { "code": null, "e": 101, "s": 28, "text": "Given a String, extract characters only which lie between given letters." }, { "code": null, "e": 166, "s": 101, "text": "Input : test_str = ‘geekforgeeks ...
Mathematics | Law of total probability
06 Jun, 2022 Prerequisite – Random variables, Conditional probability Given n mutually exclusive events A1, A2, ...Ak such that their probabilities sum is unity and their union is the event space E, then Ai ∩ Aj= NULL, for all i not equal to j, and A1 U A2 U ... U Ak = E Then Total Probability Theorem or Law of Total ...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jun, 2022" }, { "code": null, "e": 288, "s": 52, "text": "Prerequisite – Random variables, Conditional probability Given n mutually exclusive events A1, A2, ...Ak such that their probabilities sum is unity and their union is the eve...
Add new column in Pandas Data Frame Using a Dictionary
Pandas Data Frame is a two-dimensional data structure, i.e., data is aligned in a tabular fashion in rows and columns. It can be created using python dict, list, and series etc. In this article, we will see how to add a new column to an existing data frame. So first let's create a data frame using pandas series. In the...
[ { "code": null, "e": 1320, "s": 1062, "text": "Pandas Data Frame is a two-dimensional data structure, i.e., data is aligned in a tabular fashion in rows and columns. It can be created using python dict, list, and series etc. In this article, we will see how to add a new column to an existing data fr...
p5.js | noise() Function - GeeksforGeeks
29 Jan, 2020 The noise() function is used to return a number generated by Perlin noise at the given coordinates. This value is semi-random, which means that the value would be fixed for a coordinate for the lifespan of the program. The Perlin noise value is different from the value returned by the random() function as ...
[ { "code": null, "e": 43612, "s": 43584, "text": "\n29 Jan, 2020" }, { "code": null, "e": 43831, "s": 43612, "text": "The noise() function is used to return a number generated by Perlin noise at the given coordinates. This value is semi-random, which means that the value would be ...
ElementAt() method in C#
ElementAt() is a System.Linq method in C# that is used to get and display element at a particular index. The following is our string array − string[] arr = { "One", "Two", "Three", "Four", "Five" }; Now to get an element at index 0, use the ElementAt() method − arr.ElementAt(0); The following is the complete code − Li...
[ { "code": null, "e": 1167, "s": 1062, "text": "ElementAt() is a System.Linq method in C# that is used to get and display element at a particular index." }, { "code": null, "e": 1203, "s": 1167, "text": "The following is our string array −" }, { "code": null, "e": 1261...
GATE | GATE-CS-2014-(Set-1) | Question 28 - GeeksforGeeks
28 Jun, 2021 Match the following: 1) Waterfall model a) Specifications can be developed incrementally 2) Evolutionary model b) Requirements compromises are inevitable 3) Component-based c) Explicit recognition of risk software engineering ...
[ { "code": null, "e": 24075, "s": 24047, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24096, "s": 24075, "text": "Match the following:" }, { "code": null, "e": 24492, "s": 24096, "text": "1) Waterfall model a) Specifications can be\n ...
Area of circle which is inscribed in an equilateral triangle?
The area of a circle inscribed inside an equilateral triangle is found using the mathematical formula πa2/12. Lets see how this formula is derived, Formula to find the radius of the inscribed circle = area of the triangle / semi-perimeter of triangle. Area of triangle of side a = (√3)a2/4 Semi-perimeter of triangle of ...
[ { "code": null, "e": 1172, "s": 1062, "text": "The area of a circle inscribed inside an equilateral triangle is found using the\nmathematical formula πa2/12." }, { "code": null, "e": 1210, "s": 1172, "text": "Lets see how this formula is derived," }, { "code": null, "...
Count characters in a string whose ASCII values are prime in C++
We are given a string of any length containing both uppercase and lowercase letters and the task is to compute the count of those characters whose ASCII values are prime. The ASCII values of uppercase letters[A-Z] start with 65 till 90 and lowercase letters[a-z] starts with 97 till 122. Input string str = ‘Aebg’ Output...
[ { "code": null, "e": 1233, "s": 1062, "text": "We are given a string of any length containing both uppercase and lowercase letters and the task is to compute the count of those characters whose ASCII values are prime." }, { "code": null, "e": 1350, "s": 1233, "text": "The ASCII v...
Python 3 - String endswith() Method
It returns True if the string ends with the specified suffix, otherwise return False optionally restricting the matching with the given indices start and end. str.endswith(suffix[, start[, end]]) suffix − This could be a string or could also be a tuple of suffixes to look for. suffix − This could be a string or could ...
[ { "code": null, "e": 2499, "s": 2340, "text": "It returns True if the string ends with the specified suffix, otherwise return False optionally restricting the matching with the given indices start and end." }, { "code": null, "e": 2537, "s": 2499, "text": "str.endswith(suffix[, s...
Beta Distribution in R - GeeksforGeeks
15 Feb, 2022 A distribution in statistics is a function that shows the possible values for a variable and how often they occur in the particular experiment or dataset. Beta distribution is one type of probability distribution that represents all the possible outcomes of the dataset. Beta distribution basically shows th...
[ { "code": null, "e": 26487, "s": 26459, "text": "\n15 Feb, 2022" }, { "code": null, "e": 26913, "s": 26487, "text": "A distribution in statistics is a function that shows the possible values for a variable and how often they occur in the particular experiment or dataset. Beta dis...
Count of arrays having consecutive element with different values - GeeksforGeeks
08 Jun, 2021 Given three positive integers n, k and x. The task is to count the number of different array that can be formed of size n such that each element is between 1 to k and two consecutive element are different. Also, the first and last elements of each array should be 1 and x respectively. Examples : Input : n...
[ { "code": null, "e": 26453, "s": 26425, "text": "\n08 Jun, 2021" }, { "code": null, "e": 26739, "s": 26453, "text": "Given three positive integers n, k and x. The task is to count the number of different array that can be formed of size n such that each element is between 1 to k ...
Driving your business rules dynamically via T-SQL | Towards Data Science
Hardcoding. I’m sure at this point you’ve heard all about how using it will take you to coder’s hell. Experts seem to recommend avoiding it whenever possible. So why are most of our queries hardcoded? What if we could dictate the query’s predicate in a centralized, interchangeable fashion? Let us find out just how dyna...
[ { "code": null, "e": 507, "s": 171, "text": "Hardcoding. I’m sure at this point you’ve heard all about how using it will take you to coder’s hell. Experts seem to recommend avoiding it whenever possible. So why are most of our queries hardcoded? What if we could dictate the query’s predicate in a ce...
How to configure Apache for Python CGI Programming?
To get your server run CGI scripts properly, you have to configure your Web server. We will discuss how to configure your Apache web server to run CGI scripts. You may set a directory as ScriptAlias Directive (options for configuring Apache). This way, Apache understands that all the files residing within that director...
[ { "code": null, "e": 1222, "s": 1062, "text": "To get your server run CGI scripts properly, you have to configure your Web server. We will discuss how to configure your Apache web server to run CGI scripts." }, { "code": null, "e": 1557, "s": 1222, "text": "You may set a director...
Python | Schedule Library
11 Apr, 2022 Schedule is in-process scheduler for periodic jobs that use the builder pattern for configuration. Schedule lets you run Python functions (or any other callable) periodically at pre-determined intervals using a simple, human-friendly syntax.Schedule Library is used to schedule a task at a particular time e...
[ { "code": null, "e": 54, "s": 26, "text": "\n11 Apr, 2022" }, { "code": null, "e": 676, "s": 54, "text": "Schedule is in-process scheduler for periodic jobs that use the builder pattern for configuration. Schedule lets you run Python functions (or any other callable) periodically...
Josephus Circle implementation using STL list
23 Jun, 2022 There are n people standing in a circle waiting to be executed. The counting out begins at some point in the circle and proceeds around the circle in a fixed direction. In each step, a certain number of people are skipped and the next person is executed. The elimination proceeds around the circle (which is...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Jun, 2022" }, { "code": null, "e": 767, "s": 54, "text": "There are n people standing in a circle waiting to be executed. The counting out begins at some point in the circle and proceeds around the circle in a fixed direction. In ea...
Supervised and Unsupervised Learning in R Programming
29 Nov, 2021 Arthur Samuel, a pioneer in the field of artificial intelligence and computer gaming, coined the term “Machine Learning”. He defined machine learning as – “Field of study that gives computers the capability to learn without being explicitly programmed”. In a very layman manner, Machine Learning(ML) can be ...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Nov, 2021" }, { "code": null, "e": 827, "s": 28, "text": "Arthur Samuel, a pioneer in the field of artificial intelligence and computer gaming, coined the term “Machine Learning”. He defined machine learning as – “Field of study that...
HTML | DOM Input Number value Property
03 Jun, 2022 The DOM Input Number value Property in HTML DOM is used to set or return the value of a value attribute of the number field. The value attribute specifies the initial value of the input number Field. It contains the default value or the user types. Syntax: It returns the value property. numberObject.value...
[ { "code": null, "e": 53, "s": 25, "text": "\n03 Jun, 2022" }, { "code": null, "e": 311, "s": 53, "text": "The DOM Input Number value Property in HTML DOM is used to set or return the value of a value attribute of the number field. The value attribute specifies the initial value o...
Get Current Date and Time using Python
22 Jun, 2022 In this article, we will cover different methods for getting data and time using the DateTime module and time module in Python. Current time using DateTime objectGet time using the time module Current time using DateTime object Get time using the time module In this example, we will learn How to get the cu...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Jun, 2022" }, { "code": null, "e": 180, "s": 52, "text": "In this article, we will cover different methods for getting data and time using the DateTime module and time module in Python." }, { "code": null, "e": 245, ...
How do we specify MIME type in Asp.Net WebAPI C#?
A media type, also called a MIME type, identifies the format of a piece of data. In HTTP, media types describe the format of the message body. A media type consists of two strings, a type and a subtype. For example − text/html image/png application/json When an HTTP message contains an entity-body, the Content-Type hea...
[ { "code": null, "e": 1404, "s": 1187, "text": "A media type, also called a MIME type, identifies the format of a piece of data. In HTTP, media types describe the format of the message body. A media type consists of two strings, a type and a subtype. For example −" }, { "code": null, "e":...
TIME() function in MYSQL
27 Nov, 2020 TIME() function in MySQL is used to extracts the time part from a given time/datetime expression. If the expression is not a time or a datetime value, the TIME function will return ’00:00:00′. If expression is NULL, the TIME function will return NULL. Syntax : TIME(expression) Parameter :This method accep...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Nov, 2020" }, { "code": null, "e": 280, "s": 28, "text": "TIME() function in MySQL is used to extracts the time part from a given time/datetime expression. If the expression is not a time or a datetime value, the TIME function will r...
Read a record from a File in C++ using seekg() and tellg()
26 Apr, 2021 Given that a binary file “student.data” is already loaded in the memory of the computer with the record of 100 students, the task is to read the Kth record and perform some operations.seekg() is a function in the iostream library (part of the standard library) that allows you to seek to an arbitrary positi...
[ { "code": null, "e": 54, "s": 26, "text": "\n26 Apr, 2021" }, { "code": null, "e": 519, "s": 54, "text": "Given that a binary file “student.data” is already loaded in the memory of the computer with the record of 100 students, the task is to read the Kth record and perform some o...
Find the most valued alphabet in the String
18 May, 2021 Given a string str, the task is to find the maximum valued alphabet in str. The value of a particular alphabet is defined as the difference in the indices of its last and the first occurrence. If there are multiple such alphabets then find the lexicographically smallest alphabet.Examples: Input: str = “a...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 May, 2021" }, { "code": null, "e": 320, "s": 28, "text": "Given a string str, the task is to find the maximum valued alphabet in str. The value of a particular alphabet is defined as the difference in the indices of its last and the ...
Count frequency of itemsets in Pandas DataFrame
03 Jun, 2022 In this article, we are going to explain how we can Count the frequency of itemsets in the given DataFrame in Pandas. Using the count(), size() method, Series.value_counts(), and pandas.Index.value_counts() method we can count the number of frequency of itemsets in the given DataFrame. Here, we are going t...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Jun, 2022" }, { "code": null, "e": 405, "s": 28, "text": "In this article, we are going to explain how we can Count the frequency of itemsets in the given DataFrame in Pandas. Using the count(), size() method, Series.value_counts(), ...
How to Install Google Chrome in Arch-based Linux Distributions?
05 Oct, 2021 Google Chrome is a world-wide very popular browser. Google Chrome is not an open-source project, hence chrome is not preinstalled on Linux systems. The installation of Google Chrome on Linux distributions like Ubuntu is very easy. For Arch Linux and Arch-based distributions, Google Chrome is available on A...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Oct, 2021" }, { "code": null, "e": 361, "s": 28, "text": "Google Chrome is a world-wide very popular browser. Google Chrome is not an open-source project, hence chrome is not preinstalled on Linux systems. The installation of Google ...
How to set default values when destructuring an object in JavaScript ?
23 Dec, 2020 Destructuring in JavaScript: Destructuring was introduced in ECMA Script 6 version. It is a concept that is used to unpack or free values from arrays and objects into variables. The values corresponding to array elements or object properties get stored in the variables. Example: Javascript var a, b;[a, b] ...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Dec, 2020" }, { "code": null, "e": 323, "s": 52, "text": "Destructuring in JavaScript: Destructuring was introduced in ECMA Script 6 version. It is a concept that is used to unpack or free values from arrays and objects into variabl...
Dart - Keywords - GeeksforGeeks
03 Feb, 2022 Dart Keywords are the reserved words in Dart programming Language which has some special meaning to the compiler. These keywords are case-sensitive and cannot be used to name variables, classes, and functions. There are in total 61 keywords in Dart programming language: while Most of these keywords have ...
[ { "code": null, "e": 23619, "s": 23591, "text": "\n03 Feb, 2022" }, { "code": null, "e": 23829, "s": 23619, "text": "Dart Keywords are the reserved words in Dart programming Language which has some special meaning to the compiler. These keywords are case-sensitive and cannot be u...
SVG - Stroke
SVG supports multiple stroke properties. Following are the main stroke properties used. <html> <title>SVG Stroke</title> <body> <h1>Sample SVG Stroke</h1> <svg width="800" height="800"> <g> <text x="30" y="30" >Using stroke: </text> <path stroke="red" d="M 5...
[ { "code": null, "e": 2405, "s": 2364, "text": "SVG supports multiple stroke properties." }, { "code": null, "e": 2452, "s": 2405, "text": "Following are the main stroke properties used." }, { "code": null, "e": 2866, "s": 2452, "text": "<html>\n <title>SVG S...
Enable and disable interrupts in Arduino
If you wish to disable interrupts (when executing some critical piece of code, especially one which should be completed within a given time period), you can do that with the help of the noInterrupts() function. Once your critical code has executed and you wish to re-enable the interrupts, you can do that using interrup...
[ { "code": null, "e": 1273, "s": 1062, "text": "If you wish to disable interrupts (when executing some critical piece of code, especially one which should be completed within a given time period), you can do that with the help of the noInterrupts() function." }, { "code": null, "e": 1547,...