title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
jQuery | hide() with Examples
13 Feb, 2019 The hide() is an inbuilt method in jQuery used to hide the selected element.Syntax: $(selector).hide(duration, easing, call_function); Here selector is the selected element.Parameter: It accepts three parameters which are specified below- duration: It specifies the speed of the hide effect. easing: It spe...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Feb, 2019" }, { "code": null, "e": 112, "s": 28, "text": "The hide() is an inbuilt method in jQuery used to hide the selected element.Syntax:" }, { "code": null, "e": 164, "s": 112, "text": "$(selector).hide(durat...
How to use CSS variables with TailwindCSS ?
12 May, 2021 Tailwind CSS allows users to predefined classes instead of using the pure CSS properties. We have to install the Tailwind CSS. Create the main CSS file (Global.css) which will look like the below code. Global.css: In the following code, the entire body is wrapped into a single selector. The entire body ...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 May, 2021" }, { "code": null, "e": 120, "s": 28, "text": "Tailwind CSS allows users to predefined classes instead of using the pure CSS properties. " }, { "code": null, "e": 233, "s": 120, "text": "We have to ins...
Python program to check if the given string is IPv4 or IPv6 or Invalid
28 Jul, 2020 Given a string. The task is to check if the given string is IPv4 or IPv6 or Invalid. Examples: Input : “192.168.0.1”Output : IPv4Explanation : It is a valid IPv4 address Input : “2001:0db8:85a3:0000:0000:8a2e:0370:7334”Output : IPv6Explanation : It is a valid IPv6 address Input : “255.32.555.5”Output : Inv...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 Jul, 2020" }, { "code": null, "e": 137, "s": 52, "text": "Given a string. The task is to check if the given string is IPv4 or IPv6 or Invalid." }, { "code": null, "e": 147, "s": 137, "text": "Examples:" }, { ...
Most frequent element in an array
15 Jul, 2022 Given an array, find the most frequent element in it. If there are multiple elements that appear a maximum number of times, print any one of them. Examples: Input : arr[] = {1, 3, 2, 1, 4, 1}Output : 1Explanation: 1 appears three times in array which is maximum frequency. Input : arr[] = {10, 20, 10, 20, ...
[ { "code": null, "e": 52, "s": 24, "text": "\n15 Jul, 2022" }, { "code": null, "e": 199, "s": 52, "text": "Given an array, find the most frequent element in it. If there are multiple elements that appear a maximum number of times, print any one of them." }, { "code": null,...
Extended Binary Tree
09 Apr, 2022 Extended binary tree is a type of binary tree in which all the null sub tree of the original tree are replaced with special nodes called external nodes whereas other nodes are called internal nodes Here the circles represent the internal nodes and the boxes represent the external nodes.Properties of Exte...
[ { "code": null, "e": 53, "s": 25, "text": "\n09 Apr, 2022" }, { "code": null, "e": 253, "s": 53, "text": "Extended binary tree is a type of binary tree in which all the null sub tree of the original tree are replaced with special nodes called external nodes whereas other nodes ar...
Fibonacci Number modulo M and Pisano Period
29 Mar, 2022 Given two number N and M. The task is to find the N-th fibonacci number mod M.In general let FN be the N-th fibonacci number then the output should be FN % M. The Fibonacci sequence is a series of numbers in which each no. is the sum of two preceding nos. It is defined by the recurrence relation: F0 = 0 F...
[ { "code": null, "e": 54, "s": 26, "text": "\n29 Mar, 2022" }, { "code": null, "e": 213, "s": 54, "text": "Given two number N and M. The task is to find the N-th fibonacci number mod M.In general let FN be the N-th fibonacci number then the output should be FN % M." }, { "...
Python | Pandas tseries.offsets.DateOffset
23 Apr, 2019 Dateoffsets are a standard kind of date increment used for a date range in Pandas. It works exactly like relativedelta in terms of the keyword args we pass in. DateOffets work as follows, each offset specify a set of dates that conform to the DateOffset. For example, Bday defines this set to be the set of ...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Apr, 2019" }, { "code": null, "e": 366, "s": 28, "text": "Dateoffsets are a standard kind of date increment used for a date range in Pandas. It works exactly like relativedelta in terms of the keyword args we pass in. DateOffets work...
Data Analysis and Visualization in Python?
Python provides numerous libraries for data analysis and visualization mainly numpy, pandas, matplotlib, seaborn etc. In this section, we are going to discuss pandas library for data analysis and visualization which is an open source library built on top of numpy. It allows us to do fast analysis and data cleaning and ...
[ { "code": null, "e": 1327, "s": 1062, "text": "Python provides numerous libraries for data analysis and visualization mainly numpy, pandas, matplotlib, seaborn etc. In this section, we are going to discuss pandas library for data analysis and visualization which is an open source library built on to...
TIKA - Quick Guide
Apache Tika is a library that is used for document type detection and content extraction from various file formats. Apache Tika is a library that is used for document type detection and content extraction from various file formats. Internally, Tika uses existing various document parsers and document type detection tech...
[ { "code": null, "e": 2226, "s": 2110, "text": "Apache Tika is a library that is used for document type detection and content extraction from various file formats." }, { "code": null, "e": 2342, "s": 2226, "text": "Apache Tika is a library that is used for document type detection ...
C# program to copy a range of bytes from one array to another
Use the Buffer.BlockCopy method to copy a range of bytes from one array to another − Set a byte array − byte[] b1 = new byte[] {22, 49}; byte[] b2 = new byte[5]; Copy bytes from one array to another − Buffer.BlockCopy(b1, 0, b2, 0, 2); The following is the complete code − Live Demo using System; class Demo { static...
[ { "code": null, "e": 1147, "s": 1062, "text": "Use the Buffer.BlockCopy method to copy a range of bytes from one array to another −" }, { "code": null, "e": 1166, "s": 1147, "text": "Set a byte array −" }, { "code": null, "e": 1224, "s": 1166, "text": "byte[] ...
How to create a frequency column for categorical variable in an R data frame?
To create a frequency column for categorical variable in an R data frame, we can use the transform function by defining the length of categorical variable using ave function. The output will have the duplicated frequencies as one value in the categorical column is likely to be repeated. Check out the below examples to ...
[ { "code": null, "e": 1413, "s": 1062, "text": "To create a frequency column for categorical variable in an R data frame, we can use the transform function by defining the length of categorical variable using ave function. The output will have the duplicated frequencies as one value in the categorica...
Modular Multiplicative Inverse | Practice | GeeksforGeeks
Given two integers ‘a’ and ‘m’. The task is to find the smallest modular multiplicative inverse of ‘a’ under modulo ‘m’. Example 1: Input: a = 3 m = 11 Output: 4 Explanation: Since (4*3) mod 11 = 1, 4 is modulo inverse of 3. One might think, 15 also as a valid output as "(15*3) mod 11" is also 1, but 15 is not in ...
[ { "code": null, "e": 347, "s": 226, "text": "Given two integers ‘a’ and ‘m’. The task is to find the smallest modular multiplicative inverse of ‘a’ under modulo ‘m’." }, { "code": null, "e": 360, "s": 349, "text": "Example 1:" }, { "code": null, "e": 584, "s": 360...
What are JSP comments?
JSP comment marks text or statements that the JSP container should ignore. A JSP comment is useful when you want to hide or "comment out", a part of your JSP page. Following is the syntax of the JSP comments − <%-- This is JSP comment --%> Following example shows the JSP Comments − <html> <head> <title>A Comme...
[ { "code": null, "e": 1226, "s": 1062, "text": "JSP comment marks text or statements that the JSP container should ignore. A JSP comment is useful when you want to hide or \"comment out\", a part of your JSP page." }, { "code": null, "e": 1272, "s": 1226, "text": "Following is the...
SQL using C/C++ and SQLite
In this section, you will learn how to use SQLite in C/C++ programs. Before you start using SQLite in our C/C++ programs, you need to make sure that you have SQLite library set up on the machine. You can check SQLite Installation chapter to understand the installation process. Following are important C/C++ SQLite inter...
[ { "code": null, "e": 1131, "s": 1062, "text": "In this section, you will learn how to use SQLite in C/C++ programs." }, { "code": null, "e": 1340, "s": 1131, "text": "Before you start using SQLite in our C/C++ programs, you need to make sure that you have SQLite library set up on...
A Python tool for Data Processing, Analysis, and ML Automation in a few lines of code | by Satyam Kumar | Towards Data Science
A data science model development pipeline involves various components including data collection, data processing, Exploratory data analysis, modeling, and deployment. Before training a machine learning or deep learning model, it’s essential to clean or process the dataset and fit it for training. Processes like handlin...
[ { "code": null, "e": 603, "s": 171, "text": "A data science model development pipeline involves various components including data collection, data processing, Exploratory data analysis, modeling, and deployment. Before training a machine learning or deep learning model, it’s essential to clean or pr...
Convert Photo into Pixel Art using Python | by Abhijith Chandradas | Towards Data Science
Withe the rise in popularity of NFTs and crypto art, there is a rise in demand for programmers who can perform image manipulation and generate procedural art. Pixel art has also seen a resurgence in popularity of late, especially among the connoisseurs of digital art. In this article I will explain how to perform image...
[ { "code": null, "e": 553, "s": 172, "text": "Withe the rise in popularity of NFTs and crypto art, there is a rise in demand for programmers who can perform image manipulation and generate procedural art. Pixel art has also seen a resurgence in popularity of late, especially among the connoisseurs of...
How to check if a string in Python is in ASCII?
The simplest way is to loop over the characters of the string and check if each character is ASCII or not. def is_ascii(s): return all(ord(c) < 128 for c in s) print is_ascii('ӓmsterdӒm') This will give the output: False But this method is very inefficient. A better way is to decode the string using str.decode('...
[ { "code": null, "e": 1170, "s": 1062, "text": "The simplest way is to loop over the characters of the string and check if each character is ASCII or not. " }, { "code": null, "e": 1257, "s": 1170, "text": "def is_ascii(s):\n return all(ord(c) < 128 for c in s)\nprint is_ascii(...
HTML | <input> src Attribute - GeeksforGeeks
21 Feb, 2022 The HTML <input> src Attribute is used to specify the URL of the image to be used as a submit button. This attribute can only be used with <input type=”image”>.Syntax: <input src="URL"> Attribute Values: It contains a single value URL that specifies the link of the source image. There are two types of UR...
[ { "code": null, "e": 24341, "s": 24313, "text": "\n21 Feb, 2022" }, { "code": null, "e": 24511, "s": 24341, "text": "The HTML <input> src Attribute is used to specify the URL of the image to be used as a submit button. This attribute can only be used with <input type=”image”>.Syn...
CBSE Class 11 | Computer Science - Python Syllabus - GeeksforGeeks
11 Nov, 2021 (Optional for the academic year 2018-19 and mandatory for the academic year 2019-20 onwards) 1. Prerequisites : No major prerequisites are required for this course other than basic Mathematical skills. However, it will be helpful if the student has a basic knowledge of Computer Applications. 2. Learning Ou...
[ { "code": null, "e": 25087, "s": 25059, "text": "\n11 Nov, 2021" }, { "code": null, "e": 25405, "s": 25087, "text": "(Optional for the academic year 2018-19 and mandatory for the academic year 2019-20 onwards) 1. Prerequisites : No major prerequisites are required for this course...
A Simple Method for Numerical Integration in Python | by Harrison Hoffman | Towards Data Science
In this article, we will introduce a simple method for computing integrals in python. We will first derive the integration formula and then implement it on a few functions in python. This article assumes you have a basic understanding of probability and integral calculus, but if you don’t you can always skip ahead to t...
[ { "code": null, "e": 511, "s": 171, "text": "In this article, we will introduce a simple method for computing integrals in python. We will first derive the integration formula and then implement it on a few functions in python. This article assumes you have a basic understanding of probability and i...
An Unsupervised Mathematical Scoring Model | by Abhishek Mungoli | Towards Data Science
A Mathematical model is a description of a system using mathematical equations. The system is governed by a set of mathematical equations that can be linear, non-linear, static, or dynamic. The model can learn the parameters of the equation from available data and even predict the future. In this blog, I will discuss o...
[ { "code": null, "e": 462, "s": 172, "text": "A Mathematical model is a description of a system using mathematical equations. The system is governed by a set of mathematical equations that can be linear, non-linear, static, or dynamic. The model can learn the parameters of the equation from available...
VBScript Number Conversion Functions
Variable_name = Conversion_function_name(expression) Number functions help us to convert a given number from one data subtype to another data subtype. CDbl A Function, which converts a given number of any variant subtype to double CInt A Function, which converts a given number of any variant subtype to Integer CLng A F...
[ { "code": null, "e": 2133, "s": 2080, "text": "Variable_name = Conversion_function_name(expression)" }, { "code": null, "e": 2231, "s": 2133, "text": "Number functions help us to convert a given number from one data subtype to another data subtype." }, { "code": null, ...
Match multiple occurrences in a string with JavaScript?
To match multiple occurrences in a string, use regular expressions. Following is the code − function checkMultipleOccurrences(sentence) { var matchExpression = /(JavaScript?[^\s]+)|(typescript?[^\s]+)/g; return sentence.match(matchExpression); } var sentence="This is my first JavaScript Program which is the subse...
[ { "code": null, "e": 1154, "s": 1062, "text": "To match multiple occurrences in a string, use regular expressions. Following is the code −" }, { "code": null, "e": 1472, "s": 1154, "text": "function checkMultipleOccurrences(sentence) {\n var matchExpression = /(JavaScript?[^\\s...
Machine Learning Pipelines with Kubeflow | by George Novack | Towards Data Science
A lot of attention is being given now to the idea of Machine Learning Pipelines, which are meant to automate and orchestrate the various steps involved in training a machine learning model; however, it’s not always made clear what the benefits are of modeling machine learning workflows as automated pipelines. When task...
[ { "code": null, "e": 358, "s": 47, "text": "A lot of attention is being given now to the idea of Machine Learning Pipelines, which are meant to automate and orchestrate the various steps involved in training a machine learning model; however, it’s not always made clear what the benefits are of model...
Ruby - XML, XSLT and XPath Tutorial
The Extensible Markup Language (XML) is a markup language much like HTML or SGML. This is recommended by the World Wide Web Consortium and available as an open standard. XML is a portable, open source language that allows programmers to develop applications that can be read by other applications, regardless of operatin...
[ { "code": null, "e": 2464, "s": 2294, "text": "The Extensible Markup Language (XML) is a markup language much like HTML or SGML. This is recommended by the World Wide Web Consortium and available as an open standard." }, { "code": null, "e": 2654, "s": 2464, "text": "XML is a por...
How do you convert a list collection into an array in C#?
Firstly, set a list collection − List < string > myList = new List < string > (); myList.Add("RedHat"); myList.Add("Ubuntu"); Now, use ToArray() to convert the list to an array − string[] str = myList.ToArray(); The following is the complete code − Live Demo using System; using System.Collections.Generic; public clas...
[ { "code": null, "e": 1095, "s": 1062, "text": "Firstly, set a list collection −" }, { "code": null, "e": 1188, "s": 1095, "text": "List < string > myList = new List < string > ();\nmyList.Add(\"RedHat\");\nmyList.Add(\"Ubuntu\");" }, { "code": null, "e": 1241, "s"...
Kubernetes - Replica Sets
Replica Set ensures how many replica of pod should be running. It can be considered as a replacement of replication controller. The key difference between the replica set and the replication controller is, the replication controller only supports equality-based selector whereas the replica set supports set-based select...
[ { "code": null, "e": 2519, "s": 2195, "text": "Replica Set ensures how many replica of pod should be running. It can be considered as a replacement of replication controller. The key difference between the replica set and the replication controller is, the replication controller only supports equali...
LSTM to Predict Stock Prices — Time-Series Data | by Sarit Maitra | Towards Data Science
PREDICTION of financial series is always a complex task and has attracted major attention from academics, investment companies, banks etc. Price prediction are typically evaluated on the basis of statistical criteria, such as mean error, mean absolute error (MAE), or root mean squared error (RMSE). We have already seen...
[ { "code": null, "e": 662, "s": 172, "text": "PREDICTION of financial series is always a complex task and has attracted major attention from academics, investment companies, banks etc. Price prediction are typically evaluated on the basis of statistical criteria, such as mean error, mean absolute err...
How to replace the last occurrence of an expression in a string in Python?
This problem can be solved by reversing the string, reversing the string to be replaced,replacing the string with reverse of string to be replaced with and finally reversing the string to get the result. You can reverse strings by simple slicing notation - [::-1]. To replace the string you can use str.replace(old, new...
[ { "code": null, "e": 1267, "s": 1062, "text": "This problem can be solved by reversing the string, reversing the string to be replaced,replacing the string with reverse of string to be replaced with and finally reversing the string to get the result. " }, { "code": null, "e": 1405, "...
C# Round-trip ("R") Format Specifier
This round-trip ("R") format specifier is supported for the Single, Double, and BigInteger types. It ensures that a numeric value converted to a string is parsed back into the same numeric value. Let us see an example − Firstly, we have a double variable. double doubleVal = 0.91234582637; Now, use the ToString() method...
[ { "code": null, "e": 1160, "s": 1062, "text": "This round-trip (\"R\") format specifier is supported for the Single, Double, and BigInteger types." }, { "code": null, "e": 1258, "s": 1160, "text": "It ensures that a numeric value converted to a string is parsed back into the same...
Project Idea - Searching news from Old Newspaper using NLP - GeeksforGeeks
18 Aug, 2021 We know that the newspaper is an enriched source of knowledge. When a person needs some information about a particular topic or subject he searches online, but it is difficult to get all old news articles from regional local newspapers related to our search. As not every local newspaper provides an online ...
[ { "code": null, "e": 24370, "s": 24342, "text": "\n18 Aug, 2021" }, { "code": null, "e": 24762, "s": 24370, "text": "We know that the newspaper is an enriched source of knowledge. When a person needs some information about a particular topic or subject he searches online, but it ...
PyTorch Layer Dimensions: The Complete Cheat Sheet | Towards Data Science
Preface This article covers defining tensors, and properly initializing neural network layers in PyTorch, and more! (Formerly titled PyTorch layer dimensions: What size and why?) You might be asking: “How do I initialize my layer dimensions in PyTorch without getting yelled at?” Is it all just trial and error? No, real...
[ { "code": null, "e": 180, "s": 172, "text": "Preface" }, { "code": null, "e": 351, "s": 180, "text": "This article covers defining tensors, and properly initializing neural network layers in PyTorch, and more! (Formerly titled PyTorch layer dimensions: What size and why?)" }, ...
Python - Date and Time
Often in data science we need analysis which is based on temporal values. Python can handle the various formats of date and time gracefully. The datetime library provides necessary methods and functions to handle the following scenarios. Date Time Representation Date Time Arithmetic Date Time Comparison We will study ...
[ { "code": null, "e": 2768, "s": 2529, "text": "Often in data science we need analysis which is based on temporal values. Python can handle the various formats of date and time gracefully. The datetime library \nprovides necessary methods and functions to handle the following scenarios." }, { ...
DAX Aggregation - GENERATE function
Returns a table with the Cartesian product between each row in table1 and the table that results from evaluating table2 in the context of the current row from table1. GENERATE (<table1>, <table2>) table1 Table or a DAX expression that returns a table. table2 Table or a DAX expression that returns a table. A table that...
[ { "code": null, "e": 2168, "s": 2001, "text": "Returns a table with the Cartesian product between each row in table1 and the table that results from evaluating table2 in the context of the current row from table1." }, { "code": null, "e": 2199, "s": 2168, "text": "GENERATE (<tabl...
std::stod, std::stof, std::stold in C++ - GeeksforGeeks
29 Oct, 2018 std::stod() : It convert string into double.Syntax:double stod( const std::string& str, std::size_t* pos = 0 ); double stod( const std::wstring& str, std::size_t* pos = 0 ); Return Value: return a value of type double Parameters str : the string to convert pos : address of an integer to store the number o...
[ { "code": null, "e": 24267, "s": 24239, "text": "\n29 Oct, 2018" }, { "code": null, "e": 27279, "s": 24267, "text": "std::stod() : It convert string into double.Syntax:double stod( const std::string& str, std::size_t* pos = 0 );\ndouble stod( const std::wstring& str, std::size_t*...
Digit sum upto a number of digits of a number in JavaScript
We are required to write a JavaScript function that takes in two numbers, let’s say m and n as arguments. n will always be smaller than or equal to the number of digits present in m. The function should calculate and return the sum of first n digits of m. For example − If the input numbers are − const m = 5465767; cons...
[ { "code": null, "e": 1168, "s": 1062, "text": "We are required to write a JavaScript function that takes in two numbers, let’s say m and n as arguments." }, { "code": null, "e": 1318, "s": 1168, "text": "n will always be smaller than or equal to the number of digits present in m....
How to add and remove names on button click with JavaScript?
To create, use add() method, whereas to delete created and appended element, you can use remove(). Following is the code − Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initialscale=1.0"> <title>Document</title> <link rel="stylesheet" href="...
[ { "code": null, "e": 1185, "s": 1062, "text": "To create, use add() method, whereas to delete created and appended element, you can use\nremove(). Following is the code −" }, { "code": null, "e": 1196, "s": 1185, "text": " Live Demo" }, { "code": null, "e": 2704, ...
Intersection of two arrays in C#
To get intersection of two arrays, use the Intersect method. It is an extension method from the System.Linq namespace. The method returns the common elements between the two arrays. Set the two arrays first − int[] arr1 = { 44, 76, 98, 34 }; int[] arr2 = { 24, 98, 44, 55, 47, 86 }; Now use the Intersect on both the arr...
[ { "code": null, "e": 1181, "s": 1062, "text": "To get intersection of two arrays, use the Intersect method. It is an extension method from the System.Linq namespace." }, { "code": null, "e": 1244, "s": 1181, "text": "The method returns the common elements between the two arrays."...
Nuts and Bolts Problem | Practice | GeeksforGeeks
Given a set of N nuts of different sizes and N bolts of different sizes. There is a one-one mapping between nuts and bolts. Match nuts and bolts efficiently. Comparison of a nut to another nut or a bolt to another bolt is not allowed. It means nut can only be compared with bolt and bolt can only be compared with nut to...
[ { "code": null, "e": 396, "s": 238, "text": "Given a set of N nuts of different sizes and N bolts of different sizes. There is a one-one mapping between nuts and bolts. Match nuts and bolts efficiently." }, { "code": null, "e": 659, "s": 396, "text": "Comparison of a nut to anoth...
Gradle - Installation
Gradle is a build tool based on java. There are some prerequisites that are required to be installed before installing the Gradle frame work. JDK and Groovy are the prerequisites for Gradle installation. Gradle requires JDK version 6 or later to be installed in the system. It uses the JDK libraries which are installed...
[ { "code": null, "e": 2024, "s": 1882, "text": "Gradle is a build tool based on java. There are some prerequisites that are required to be installed before installing the Gradle frame work." }, { "code": null, "e": 2087, "s": 2024, "text": "JDK and Groovy are the prerequisites for...
How to create a two dimensional array in JavaScript?
A two-dimensional array has more than one dimension, such as myarray[0][0] for element one, myarray[0][1] for element two, etc. To create a two-dimensional array in JavaScript, you can try to run the following code − Live Demo <html> <body> <script> var myarray=new Array(3); ...
[ { "code": null, "e": 1279, "s": 1062, "text": "A two-dimensional array has more than one dimension, such as myarray[0][0] for element one, myarray[0][1] for element two, etc. To create a two-dimensional array in JavaScript, you can try to run the following code −" }, { "code": null, "e":...
GridLayouts in Kivy | Python
21 Oct, 2021 Kivy is a platform independent as it can be run on Android, IOS, Linux and Windows, etc. Kivy provides you the functionality to write the code for once and run it on different platforms. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktop applica...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Oct, 2021" }, { "code": null, "e": 366, "s": 52, "text": "Kivy is a platform independent as it can be run on Android, IOS, Linux and Windows, etc. Kivy provides you the functionality to write the code for once and run it on differen...
How to plot a subset of a dataframe in R ?
30 Jun, 2021 In this article, we will learn multiple approaches to plotting a subset of a Dataframe in R Programming Language. Here we will be using, R language’s inbuilt “USArrests” dataset. In this method, first a subset of the data is created base don some condition, and then it is plotted using plot function. Let u...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jun, 2021" }, { "code": null, "e": 207, "s": 28, "text": "In this article, we will learn multiple approaches to plotting a subset of a Dataframe in R Programming Language. Here we will be using, R language’s inbuilt “USArrests” datas...
OpenCV C++ Program for coin detection
09 Feb, 2018 The following is the explanation to the C++ code for coin detection in C++ using the tool OpenCV. Things to know: The code will only compile in Linux environment.To run in windows, please use the file: ‘coin.o’ and run it in cmd. However if it does not run(problem in system architecture) then compile it in...
[ { "code": null, "e": 54, "s": 26, "text": "\n09 Feb, 2018" }, { "code": null, "e": 152, "s": 54, "text": "The following is the explanation to the C++ code for coin detection in C++ using the tool OpenCV." }, { "code": null, "e": 168, "s": 152, "text": "Things ...
Octagonal number
16 Jul, 2021 You are given a number n, the task is to find nth octagonal number. Also, find the Octagonal series till n.An octagonal number is the figure number that represent octagonal. Octagonal numbers can be formed by placing triangular numbers on the four sides of a square. Octagonal number is calculated by using ...
[ { "code": null, "e": 53, "s": 25, "text": "\n16 Jul, 2021" }, { "code": null, "e": 397, "s": 53, "text": "You are given a number n, the task is to find nth octagonal number. Also, find the Octagonal series till n.An octagonal number is the figure number that represent octagonal. ...
How to Select an Image from Gallery in Android?
17 May, 2022 Selecting an image from a gallery in Android is required when the user has to upload or set their image as a profile picture or the user wants to send a pic to the other. So in this article, it’s been discussed step by step how to select an image from the gallery and preview the selected image. Have a look...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 May, 2022" }, { "code": null, "e": 430, "s": 52, "text": "Selecting an image from a gallery in Android is required when the user has to upload or set their image as a profile picture or the user wants to send a pic to the other. So ...
Python | Adding image in Kivy using .kv file
31 Jan, 2022 Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, linux, and Windows, etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktops applications. Kivy Tutorial – Learn Kivy with Examples. The Image widget is used to...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Jan, 2022" }, { "code": null, "e": 266, "s": 28, "text": "Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, linux, and Windows, etc. It is basically used to develop the Android application, but it d...
Print all paths from a given source to a destination
19 Jan, 2022 Given a directed graph, a source vertex ‘s’ and a destination vertex ‘d’, print all paths from given ‘s’ to ‘d’. Consider the following directed graph. Let the s be 2 and d be 3. There are 3 different paths from 2 to 3. Approach: The idea is to do Depth First Traversal of given directed graph.Start the...
[ { "code": null, "e": 54, "s": 26, "text": "\n19 Jan, 2022" }, { "code": null, "e": 275, "s": 54, "text": "Given a directed graph, a source vertex ‘s’ and a destination vertex ‘d’, print all paths from given ‘s’ to ‘d’. Consider the following directed graph. Let the s be 2 and d b...
Count Number of Occurrences of Certain Character in String in R
16 May, 2021 In this article, we will discuss how to count the number of occurrences of a certain character in String in R Programming Language. The stringR package in R is used to perform string manipulations. It needs to be explicitly installed in the working space to access its methods and routines. install.package...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 May, 2021" }, { "code": null, "e": 160, "s": 28, "text": "In this article, we will discuss how to count the number of occurrences of a certain character in String in R Programming Language." }, { "code": null, "e": 320, ...
Python | Maximum Sum Sublist
11 May, 2020 We can have an application for finding the lists with the maximum value and print it. This seems quite an easy task and may also be easy to code, but having shorthands to perform the same are always helpful as this kind of problem can come in web development. Method #1 : Using reduce() + lambdaThe above tw...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 May, 2020" }, { "code": null, "e": 288, "s": 28, "text": "We can have an application for finding the lists with the maximum value and print it. This seems quite an easy task and may also be easy to code, but having shorthands to perf...
RTL (Register Transfer Level) design vs Sequential logic design
21 Dec, 2018 In this article we try to explain the fundamental differences between Register Transfer Level (RTL) Design and Sequential Logic Design. In the RTL Design methodology different types of registers such as Counters, Shift Register, SIPO (Serial In Parallel Out), PISO (Parallel In Serial Out) are used as the b...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Dec, 2018" }, { "code": null, "e": 164, "s": 28, "text": "In this article we try to explain the fundamental differences between Register Transfer Level (RTL) Design and Sequential Logic Design." }, { "code": null, "e": 39...
Different ways to sort an array in descending order in C#
15 Feb, 2019 An array is a group of like-typed variables that are referred to by a common name. And each data item is called an element of the array. Arranging the array’s elements from largest to smallest is termed as sorting the array in descending order. Examples: Input : array = {5, 9, 1, 4, 6, 8}; Output : 9, 8, 6...
[ { "code": null, "e": 54, "s": 26, "text": "\n15 Feb, 2019" }, { "code": null, "e": 299, "s": 54, "text": "An array is a group of like-typed variables that are referred to by a common name. And each data item is called an element of the array. Arranging the array’s elements from l...
C# | How to check current state of a thread
01 Feb, 2019 A Thread class is responsible for creating and managing a thread in multi-thread programming. It provides a property known as ThreadState to check the current state of the thread. The initial state of a thread is Unstarted state. Syntax: public ThreadState ThreadState{ get; } Return Value: This property re...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Feb, 2019" }, { "code": null, "e": 258, "s": 28, "text": "A Thread class is responsible for creating and managing a thread in multi-thread programming. It provides a property known as ThreadState to check the current state of the thr...
Remove leading zeros from an array
01 Nov, 2021 Given an array of N numbers, the task is to remove all leading zeros from the array. Examples: Input : arr[] = {0, 0, 0, 1, 2, 3} Output : 1 2 3 Input : arr[] = {0, 0, 0, 1, 0, 2, 3} Output : 1 0 2 3 Approach: Mark the first non-zero number’s index in the given array. Store the numbers from that i...
[ { "code": null, "e": 52, "s": 24, "text": "\n01 Nov, 2021" }, { "code": null, "e": 149, "s": 52, "text": "Given an array of N numbers, the task is to remove all leading zeros from the array. Examples: " }, { "code": null, "e": 259, "s": 149, "text": "Input : ...
sleep command in Linux with Examples
27 May, 2019 sleep command is used to create a dummy job. A dummy job helps in delaying the execution. It takes time in seconds by default but a small suffix(s, m, h, d) can be added at the end to convert it into any other format. This command pauses the execution for an amount of time which is defined by NUMBER. Synta...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 May, 2019" }, { "code": null, "e": 330, "s": 28, "text": "sleep command is used to create a dummy job. A dummy job helps in delaying the execution. It takes time in seconds by default but a small suffix(s, m, h, d) can be added at th...
Different ways to sum n using numbers greater than or equal to m
05 May, 2021 Given two natural number n and m. The task is to find the number of ways in which the numbers that are greater than or equal to m can be added to get the sum n.Examples: Input : n = 3, m = 1 Output : 3 Following are three different ways to get sum n such that each term is greater than or equal to m 1 + 1...
[ { "code": null, "e": 54, "s": 26, "text": "\n05 May, 2021" }, { "code": null, "e": 226, "s": 54, "text": "Given two natural number n and m. The task is to find the number of ways in which the numbers that are greater than or equal to m can be added to get the sum n.Examples: " ...
How to force a clean build of a Docker Image?
When you execute the Docker pull command or Docker run command, the daemon first checks for a similar image in the local machine by comparing the digests of the image. If it finds a match, then it’s not required to search the registry for the image and the daemon can simply create a copy of the already existing image. ...
[ { "code": null, "e": 1355, "s": 1187, "text": "When you execute the Docker pull command or Docker run command, the daemon first checks for a similar image in the local machine by comparing the digests of the image." }, { "code": null, "e": 1650, "s": 1355, "text": "If it finds a ...
Scala - Sets
Scala Set is a collection of pairwise different elements of the same type. In other words, a Set is a collection that contains no duplicate elements. There are two kinds of Sets, the immutable and the mutable. The difference between mutable and immutable objects is that when an object is immutable, the object itself ca...
[ { "code": null, "e": 2468, "s": 2132, "text": "Scala Set is a collection of pairwise different elements of the same type. In other words, a Set is a collection that contains no duplicate elements. There are two kinds of Sets, the immutable and the mutable. The difference between mutable and immutabl...
Information Classification in Information Security
19 Feb, 2021 In today’s world, Information is one of the essential parts of our life. In this, we will discuss the categorization of information on the basis of different organizations and different parameters. Information in an organization should be categorized and must be kept confidential and that’s why information...
[ { "code": null, "e": 54, "s": 26, "text": "\n19 Feb, 2021" }, { "code": null, "e": 443, "s": 54, "text": "In today’s world, Information is one of the essential parts of our life. In this, we will discuss the categorization of information on the basis of different organizations an...
How to Create a Histogram from Pandas DataFrame?
19 Dec, 2021 A histogram is a graph that displays the frequency of values in a metric variable’s intervals. These intervals are referred to as “bins,” and they are all the same width. We can create a histogram from the panda’s data frame using the df.hist() function. Syntax: DataFrame.hist(column=None, by=None, grid=Tr...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Dec, 2021" }, { "code": null, "e": 199, "s": 28, "text": "A histogram is a graph that displays the frequency of values in a metric variable’s intervals. These intervals are referred to as “bins,” and they are all the same width." }...
Python | Count keys with particular value in dictionary
22 Jun, 2022 Sometimes, while working with Python dictionaries, we can come across a problem in which we have a particular value, and we need to find frequency if it’s occurrence. Let’s discuss certain ways in which this problem can be solved. Method #1 : Using loop This problem can be solved using naive method of loop...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Jun, 2022" }, { "code": null, "e": 470, "s": 52, "text": "Sometimes, while working with Python dictionaries, we can come across a problem in which we have a particular value, and we need to find frequency if it’s occurrence. Let’s d...
MS Project - Create a New Plan
When working with MS Project you either specify a start date or a finish date. Because once you enter one of the two, and other project tasks, constraints and dependencies, MS Project will calculate the other date. It is always a good practice to use a start date even if you know the deadline for the project. Windows 7...
[ { "code": null, "e": 2326, "s": 2015, "text": "When working with MS Project you either specify a start date or a finish date. Because once you enter one of the two, and other project tasks, constraints and dependencies, MS Project will calculate the other date. It is always a good practice to use a ...
Python – Key Value list pairings in Dictionary
22 Apr, 2020 Sometimes, while working with Python dictionaries, we can have problems in which we need to pair all the keys with all values to form a dictionary with all possible pairings. This can have application in many domains including day-day programming. Lets discuss certain ways in which this task can be perform...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Apr, 2020" }, { "code": null, "e": 339, "s": 28, "text": "Sometimes, while working with Python dictionaries, we can have problems in which we need to pair all the keys with all values to form a dictionary with all possible pairings. ...
dir() function in Python
21 Jun, 2021 dir() is a powerful inbuilt function in Python3, which returns list of the attributes and methods of any object (say functions , modules, strings, lists, dictionaries etc.)Syntax : dir({object}) Parameters : object [optional] : Takes object name Returns :dir() tries to return a valid list of attribut...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jun, 2021" }, { "code": null, "e": 235, "s": 52, "text": "dir() is a powerful inbuilt function in Python3, which returns list of the attributes and methods of any object (say functions , modules, strings, lists, dictionaries etc.)Sy...
Program for Rank of Matrix
30 Jun, 2022 What is rank of a matrix? Rank of a matrix A of size M x N is defined as Maximum number of linearly independent column vectors in the matrix or Maximum number of linearly independent row vectors in the matrix. Maximum number of linearly independent column vectors in the matrix or Maximum number of linea...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Jun, 2022" }, { "code": null, "e": 126, "s": 52, "text": "What is rank of a matrix? Rank of a matrix A of size M x N is defined as " }, { "code": null, "e": 264, "s": 126, "text": "Maximum number of linearly inde...
Face Detection using Python and OpenCV with webcam
22 Sep, 2021 OpenCV is a Library which is used to carry out image processing using programming languages like python. This project utilizes OpenCV Library to make a Real-Time Face Detection using your webcam as a primary camera.Following are the requirements for it:- Python 2.7OpenCVNumpyHaar Cascade Frontal face cla...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Sep, 2021" }, { "code": null, "e": 309, "s": 52, "text": "OpenCV is a Library which is used to carry out image processing using programming languages like python. This project utilizes OpenCV Library to make a Real-Time Face Detecti...
Maximum index a pointer can reach in N steps by avoiding a given index B
09 Apr, 2021 Given two integers N and B, the task is to print the maximum index a pointer, starting from 0th index can reach in an array of natural numbers(i.e., 0, 1, 2, 3, 4, 5...), say arr[], in N steps without placing itself at index B at any point. In each step, the pointer can move from the Current Index to a Jum...
[ { "code": null, "e": 54, "s": 26, "text": "\n09 Apr, 2021" }, { "code": null, "e": 295, "s": 54, "text": "Given two integers N and B, the task is to print the maximum index a pointer, starting from 0th index can reach in an array of natural numbers(i.e., 0, 1, 2, 3, 4, 5...), say...
SQL Query to Check If a Name Begins and Ends With a Vowel
08 Oct, 2021 In this article, we will see an SQL query to check if a name begins and ends with a vowel and we will implement it with the help of an example for better understanding, first of all, we will create a database Name of the Database will GeeksforGeeks. and inside the database, we will create a table name As “...
[ { "code": null, "e": 53, "s": 25, "text": "\n08 Oct, 2021" }, { "code": null, "e": 371, "s": 53, "text": "In this article, we will see an SQL query to check if a name begins and ends with a vowel and we will implement it with the help of an example for better understanding, first...
Shell Script to Delete Zero Sized Files From a Directory
30 Apr, 2021 A zero-sized file is a file that contains no data and has a length of 0. It is also called a zero-byte file. Incomplete transfers can be responsible for the zero-sized file. You can create a zero-sized file intentionally by running the following command in the terminal : touch zero_sized_file_name Output: ...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Apr, 2021" }, { "code": null, "e": 300, "s": 28, "text": "A zero-sized file is a file that contains no data and has a length of 0. It is also called a zero-byte file. Incomplete transfers can be responsible for the zero-sized file. Y...
Recursive sum of digits of a number formed by repeated appends
25 Aug, 2021 Given two positive number N and X. The task is to find the sum of digits of a number formed by N repeating X number of times until sum become single digit. Examples : Input : N = 24, X = 3 Output : 9 Number formed after repeating 24 three time = 242424 Sum = 2 + 4 + 2 + 4 + 2 + 4 = 18 Sum is not the ...
[ { "code": null, "e": 53, "s": 25, "text": "\n25 Aug, 2021" }, { "code": null, "e": 209, "s": 53, "text": "Given two positive number N and X. The task is to find the sum of digits of a number formed by N repeating X number of times until sum become single digit." }, { "cod...
How to print a circular structure in a JSON like format using JavaScript ?
09 Feb, 2021 The circular structure is when you try to reference an object which directly or indirectly references itself. Example: A -> B -> A OR A -> A Circular structures are pretty common while developing an application. For Example, suppose you are developing a social media application where each user may have...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Feb, 2021" }, { "code": null, "e": 138, "s": 28, "text": "The circular structure is when you try to reference an object which directly or indirectly references itself." }, { "code": null, "e": 147, "s": 138, "text...
Python Tuples
16 Jun, 2022 Tuple is a collection of Python objects much like a list. The sequence of values stored in a tuple can be of any type, and they are indexed by integers. Values of a tuple are syntactically separated by ‘commas’. Although it is not necessary, it is more common to define a tuple by closing the sequence of v...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Jun, 2022" }, { "code": null, "e": 206, "s": 52, "text": "Tuple is a collection of Python objects much like a list. The sequence of values stored in a tuple can be of any type, and they are indexed by integers. " }, { "code"...
Pandas | Parsing JSON Dataset
27 Mar, 2019 Parsing of JSON Dataset using pandas is much more convenient. Pandas allow you to convert a list of lists into a Dataframe and specify the column names separately. A JSON parser transforms a JSON text into another representation must accept all texts that conform to the JSON grammar. It may accept non-JSON...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Mar, 2019" }, { "code": null, "e": 216, "s": 52, "text": "Parsing of JSON Dataset using pandas is much more convenient. Pandas allow you to convert a list of lists into a Dataframe and specify the column names separately." }, { ...
Software Engineering | The Make-Buy Decision or Decision Table
02 Sep, 2021 A decision table is a brief visual representation for specifying which actions to perform depending on given conditions. The information represented in decision tables can also be represented as decision trees or in a programming language using if-then-else and switch-case statements. A decision table is ...
[ { "code": null, "e": 52, "s": 24, "text": "\n02 Sep, 2021" }, { "code": null, "e": 339, "s": 52, "text": "A decision table is a brief visual representation for specifying which actions to perform depending on given conditions. The information represented in decision tables can al...
Connection Between Eigenvectors and Nullspace
04 May, 2020 Prerequisites: Eigenvectors Nullspace Some important points about eigenvalues and eigenvectors: Eigenvalues can be complex numbers even for real matrices. When eigenvalues become complex, eigenvectors also become complex. If the matrix is symmetric (e.g A = AT), then the eigenvalues are always real. As a r...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 May, 2020" }, { "code": null, "e": 43, "s": 28, "text": "Prerequisites:" }, { "code": null, "e": 56, "s": 43, "text": "Eigenvectors" }, { "code": null, "e": 66, "s": 56, "text": "Nullspace" }...
ReactJS Reactstrap Popover Component
22 Jul, 2021 Reactstrap is a popular front-end library that is easy to use React Bootstrap 4 components. This library contains the stateless React components for Bootstrap 4. The Popover component is a container-type element that hovers over the parent window. We can use the following approach in ReactJS to use the Rea...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Jul, 2021" }, { "code": null, "e": 370, "s": 28, "text": "Reactstrap is a popular front-end library that is easy to use React Bootstrap 4 components. This library contains the stateless React components for Bootstrap 4. The Popover c...
How to animate a Progress Bar in Bootstrap ?
10 Aug, 2021 The Bootstrap Progress Bar is a component of the bootstrap framework used to display the progress of a process. We can customize the bootstrap progress bar, color, shape, and animation as per the requirements. Bootstrap also provides several types of progress bars. Using Progress Bar, users can easily know...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Aug, 2021" }, { "code": null, "e": 294, "s": 28, "text": "The Bootstrap Progress Bar is a component of the bootstrap framework used to display the progress of a process. We can customize the bootstrap progress bar, color, shape, and ...
Merge two sorted arrays in Python using heapq?
In this section we will see how two sorted lists can be merged using the heapq module in Python. As an example, if list1 = [10, 20, 30, 40] and list2 = [100, 200, 300, 400, 500], then after merging it will return list3 = [10, 20, 30, 40, 100, 200, 300, 400, 500] To perform this task, we will use the heapq module. This ...
[ { "code": null, "e": 1450, "s": 1187, "text": "In this section we will see how two sorted lists can be merged using the heapq module in Python. As an example, if list1 = [10, 20, 30, 40] and list2 = [100, 200, 300, 400, 500], then after merging it will return list3 = [10, 20, 30, 40, 100, 200, 300, ...
Number of Integral Points between Two Points
24 May, 2022 Given two points p (x1, y1) and q (x2, y2), calculate the number of integral points lying on the line joining them.Example : If points are (0, 2) and (4, 0), then the number of integral points lying on it is only one and that is (2, 1). Similarly, if points are (1, 9) and (8, 16), the integral points lying...
[ { "code": null, "e": 54, "s": 26, "text": "\n24 May, 2022" }, { "code": null, "e": 448, "s": 54, "text": "Given two points p (x1, y1) and q (x2, y2), calculate the number of integral points lying on the line joining them.Example : If points are (0, 2) and (4, 0), then the number ...
Services provided by Data Link Layer
25 Aug, 2020 Prerequisite – Data Link Layer Data Link Layer is generally representing protocol layer in program that is simply used to handle and control the transmission of data between source and destination machines. It is simply responsible for exchange of frames among nodes or machines over physical network media....
[ { "code": null, "e": 52, "s": 24, "text": "\n25 Aug, 2020" }, { "code": null, "e": 83, "s": 52, "text": "Prerequisite – Data Link Layer" }, { "code": null, "e": 430, "s": 83, "text": "Data Link Layer is generally representing protocol layer in program that is ...
TRIM() Function in SQL Server
18 Jan, 2021 TRIM() function : This function in SQL Server is used to omit the space character or additional stated characters from the beginning or the ending of a specified string. Features : This function is used to omit the space character or some additional given characters from the beginning or the ending of a st...
[ { "code": null, "e": 54, "s": 26, "text": "\n18 Jan, 2021" }, { "code": null, "e": 72, "s": 54, "text": "TRIM() function :" }, { "code": null, "e": 224, "s": 72, "text": "This function in SQL Server is used to omit the space character or additional stated char...
StringBuilder substring() method in Java with examples
19 Aug, 2019 In StringBuilder class, there are two types of substring method depending upon the parameters passed to it. The substring(int start) method of StringBuilder class is the inbuilt method used to return a substring start from index start and extends to end of this sequence. The string returned by this method ...
[ { "code": null, "e": 53, "s": 25, "text": "\n19 Aug, 2019" }, { "code": null, "e": 161, "s": 53, "text": "In StringBuilder class, there are two types of substring method depending upon the parameters passed to it." }, { "code": null, "e": 428, "s": 161, "text"...
Introduction of Database Normalization
28 Jun, 2021 Database normalization is the process of organizing the attributes of the database to reduce or eliminate data redundancy (having the same data but at different places) . Problems because of data redundancy Data redundancy unnecessarily increases the size of the database as the same data is repeated in ma...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 Jun, 2021" }, { "code": null, "e": 224, "s": 52, "text": "Database normalization is the process of organizing the attributes of the database to reduce or eliminate data redundancy (having the same data but at different places) . " ...
Matplotlib.axes.Axes.clear() in Python
19 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. The Axe...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Apr, 2020" }, { "code": null, "e": 328, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text...
pandas.array() function in Python
14 Aug, 2020 This method is used to create an array from a sequence in desired data type. Syntax : pandas.array(data: Sequence[object], dtype: Union[str, numpy.dtype, pandas.core.dtypes.base.ExtensionDtype, NoneType] = None, copy: bool = True) Parameters : data : Sequence of objects. The scalars inside `data` should be...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Aug, 2020" }, { "code": null, "e": 105, "s": 28, "text": "This method is used to create an array from a sequence in desired data type." }, { "code": null, "e": 259, "s": 105, "text": "Syntax : pandas.array(data: S...
Program to swap numbers using XOR operator in C#
08 Jun, 2020 C# Program to swap the two numbers using Bitwise XOR Operation. Given two variables, x and y, swap two variables with using a XOR statements. Example: Input: 300 400 Output: 400 300 Explanation: x = 300 y = 400 x = 400 y = 300 C# // C# Program to Swap the two Numbers// using Bitwise XOR Operationus...
[ { "code": null, "e": 54, "s": 26, "text": "\n08 Jun, 2020" }, { "code": null, "e": 197, "s": 54, "text": "C# Program to swap the two numbers using Bitwise XOR Operation. Given two variables, x and y, swap two variables with using a XOR statements. " }, { "code": null, ...
Minimum absolute difference of adjacent elements in a circular array
08 Jun, 2022 Given n integers, which form a circle. Find the minimal absolute value of any adjacent pair. If there are many optimum solutions, output any of them. Note: they are in circle Examples: Input : arr[] = {10, 12, 13, 15, 10} Output : 0 Explanation: |10 - 10| = 0 which is the minimum possible. Input : arr...
[ { "code": null, "e": 53, "s": 25, "text": "\n08 Jun, 2022" }, { "code": null, "e": 240, "s": 53, "text": "Given n integers, which form a circle. Find the minimal absolute value of any adjacent pair. If there are many optimum solutions, output any of them. Note: they are in circle...
Searching Books with Python
19 Aug, 2021 In this article, we are going to write python scripts for searching books using isbntools modules. isbntools module able to search for books by there name or ISBN( International Standard Book Number) and return all the information about the book. Installation: Run the following pip command: pip install isb...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Aug, 2021" }, { "code": null, "e": 275, "s": 28, "text": "In this article, we are going to write python scripts for searching books using isbntools modules. isbntools module able to search for books by there name or ISBN( Internation...
Treemap in Pygal
28 Jul, 2020 Pygal is a Python module that is mainly used to build SVG (Scalar Vector Graphics) graphs and charts. SVG is a vector-based graphics in the XML format that can be edited in any editor. Pygal can create graphs with minimal lines of code that can be easy to understand and write. Treemap is a chart that is us...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jul, 2020" }, { "code": null, "e": 306, "s": 28, "text": "Pygal is a Python module that is mainly used to build SVG (Scalar Vector Graphics) graphs and charts. SVG is a vector-based graphics in the XML format that can be edited in an...
Python – Row with Minimum difference in extreme values
11 Oct, 2020 Given a Matrix, extract the rows with a minimum difference in extreme values. Examples: Input : test_list = [[4, 10, 18], [5, 0], [1, 4, 6], [19, 2]] Output : [[1, 4, 6], [5, 0]] Explanation : 6 – 1 = 5, 5 – 0 = 5, is minimum difference between extreme values. Input : test_list = [[4, 10, 18], [5, 0], [2,...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Oct, 2020" }, { "code": null, "e": 106, "s": 28, "text": "Given a Matrix, extract the rows with a minimum difference in extreme values." }, { "code": null, "e": 116, "s": 106, "text": "Examples:" }, { "cod...
Simple sorting of a list of objects by a specific property using Python | by Gibson Tang | Towards Data Science
In my rudimentary experiments with Python and Data modeling where I have to import data into my Jupyter notebook. I thought of sorting and it occurred to me how do you sort a list of objects using a specific instance variable, such as name. For example, I have a list of car objects which consist of name and price. So I...
[ { "code": null, "e": 487, "s": 171, "text": "In my rudimentary experiments with Python and Data modeling where I have to import data into my Jupyter notebook. I thought of sorting and it occurred to me how do you sort a list of objects using a specific instance variable, such as name. For example, I...
Bootstrap 5 | Card - GeeksforGeeks
29 Nov, 2021 Bootstrap 5 is the latest major release by Bootstrap in which they have revamped the UI and made various changes. The card is a component provided by Bootstrap 5 which provides a flexible and extensible content container with multiple variants and options. It includes options for headers and footers. Cards...
[ { "code": null, "e": 28049, "s": 28021, "text": "\n29 Nov, 2021" }, { "code": null, "e": 28446, "s": 28049, "text": "Bootstrap 5 is the latest major release by Bootstrap in which they have revamped the UI and made various changes. The card is a component provided by Bootstrap 5 w...
Return true or false in a MySQL select if another field contains a string?
To return TRUE or FALSE if another field contains a string, use IF(). Let us first create a table mysql> create table DemoTable ( FirstName varchar(100), LastName varchar(100) ); Query OK, 0 rows affected (1.28 sec) Insert some records in the table using insert command − mysql> insert into DemoTable values('Chris...
[ { "code": null, "e": 1160, "s": 1062, "text": "To return TRUE or FALSE if another field contains a string, use IF(). Let us first create a table" }, { "code": null, "e": 1284, "s": 1160, "text": "mysql> create table DemoTable\n(\n FirstName varchar(100),\n LastName varchar(10...
Python | Pandas DataFrame.transform
21 Feb, 2019 Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations align on both row and column labels. It can be thought of as a dict-like container for Series objects. This is the primary data structure of the P...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Feb, 2019" }, { "code": null, "e": 342, "s": 28, "text": "Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations align on both ...
How To Track ISS (International Space Station) Using Python?
13 Jul, 2021 In this article, we will discuss how to track the current location of ISS(International Space Station) and then maps the location. We will write a script that will display the current location of ISS along with onboarded crew names. It works on API, it takes the current location of ISS in the form of latit...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Jul, 2021" }, { "code": null, "e": 822, "s": 52, "text": "In this article, we will discuss how to track the current location of ISS(International Space Station) and then maps the location. We will write a script that will display th...
itertools.groupby() in Python
30 Jan, 2020 Prerequisites: Python Itertools Python’s Itertool is a module that provides various functions that work on iterators to produce complex iterators. This module works as a fast, memory-efficient tool that is used either by themselves or in combination to form iterator algebra. This method calculates the keys...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Jan, 2020" }, { "code": null, "e": 84, "s": 52, "text": "Prerequisites: Python Itertools" }, { "code": null, "e": 328, "s": 84, "text": "Python’s Itertool is a module that provides various functions that work on ...
Using JWT for user authentication in Flask
17 May, 2022 Pre-requisite: Basic knowledge about JSON Web Token (JWT)I will be assuming you have the basic knowledge of JWT and how JWT works. If not, then I suggest reading the linked Geeksforgeeks article. Let’s jump right into the setup. Ofcourse, you need python3 installed on your system. Now, follow along with me...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 May, 2022" }, { "code": null, "e": 248, "s": 52, "text": "Pre-requisite: Basic knowledge about JSON Web Token (JWT)I will be assuming you have the basic knowledge of JWT and how JWT works. If not, then I suggest reading the linked G...
frozenset() in Python
12 Aug, 2021 The frozenset() is an inbuilt function in Python which takes an iterable object as input and makes them immutable. Simply it freezes the iterable objects and makes them unchangeable. In Python, frozenset is the same as set except the frozensets are immutable which means that elements from the frozenset can...
[ { "code": null, "e": 53, "s": 25, "text": "\n12 Aug, 2021" }, { "code": null, "e": 236, "s": 53, "text": "The frozenset() is an inbuilt function in Python which takes an iterable object as input and makes them immutable. Simply it freezes the iterable objects and makes them uncha...
PyQt5 – How to access content of label ?
26 Mar, 2020 We can create label using QLabel() method, and set the content using setText() method. In this article, we will see how to access the content of the label, in order to do this we will use text() method. Syntax : label.text() Argument : It takes no argument. Return : It returns a string. Code : # importing ...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Mar, 2020" }, { "code": null, "e": 231, "s": 28, "text": "We can create label using QLabel() method, and set the content using setText() method. In this article, we will see how to access the content of the label, in order to do this...
SQLite - AUTOINCREMENT
SQLite AUTOINCREMENT is a keyword used for auto incrementing a value of a field in the table. We can auto increment a field value by using AUTOINCREMENT keyword when creating a table with specific column name to auto increment. The keyword AUTOINCREMENT can be used with INTEGER field only. The basic usage of AUTOINCREM...
[ { "code": null, "e": 3000, "s": 2772, "text": "SQLite AUTOINCREMENT is a keyword used for auto incrementing a value of a field in the table. We can auto increment a field value by using AUTOINCREMENT keyword when creating a table with specific column name to auto increment." }, { "code": nul...