title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Different ways to access HTML elements using JavaScript - GeeksforGeeks
06 Dec, 2021 Sometimes, users need to manipulate the HTML element without changing the code of the HTML. In this scenario, users can use JavaScript to change HTML elements without overwriting them. Before we move ahead to change the HTML element using JavaScript, users should learn to access it from the DOM (Document O...
[ { "code": null, "e": 25300, "s": 25272, "text": "\n06 Dec, 2021" }, { "code": null, "e": 25670, "s": 25300, "text": "Sometimes, users need to manipulate the HTML element without changing the code of the HTML. In this scenario, users can use JavaScript to change HTML elements with...
Dart Programming - Lists
A very commonly used collection in programming is an array. Dart represents arrays in the form of List objects. A List is simply an ordered group of objects. The dart:core library provides the List class that enables creation and manipulation of lists. The logical representation of a list in Dart is given below − test_...
[ { "code": null, "e": 2778, "s": 2525, "text": "A very commonly used collection in programming is an array. Dart represents arrays in the form of List objects. A List is simply an ordered group of objects. The dart:core library provides the List class that enables creation and manipulation of lists."...
Number of Submatrices That Sum to Target in C++
Suppose we have a matrix, and a target value, we have to find the number of non-empty submatrices that sum is same as target. Here a submatrix [(x1, y1), (x2, y2)] is the set of all cells matrix[x][y] with x in range x1 and x2 and y in range y1 and y2. Two submatrices [(x1, y1), (x2, y2)] and [(x1', y1'), (x2', y2')] a...
[ { "code": null, "e": 1475, "s": 1062, "text": "Suppose we have a matrix, and a target value, we have to find the number of non-empty\nsubmatrices that sum is same as target. Here a submatrix [(x1, y1), (x2, y2)] is the set of all cells matrix[x][y] with x in range x1 and x2 and y in range y1 and y2....
Introduction to Tailwind CSS - GeeksforGeeks
03 Jul, 2021 Tailwind CSS can be used to make websites in the fastest and the easiest way. Tailwind CSS is basically a utility-first CSS framework for rapidly building custom user interfaces. It is a highly customizable, low-level CSS framework that gives you all of the building blocks you need to build bespoke designs...
[ { "code": null, "e": 36166, "s": 36138, "text": "\n03 Jul, 2021" }, { "code": null, "e": 36244, "s": 36166, "text": "Tailwind CSS can be used to make websites in the fastest and the easiest way." }, { "code": null, "e": 36895, "s": 36244, "text": "Tailwind CSS...
Peewee - Using MySQL
As mentioned earlier, Peewee supports MySQL database through MySQLDatabase class. However, unlike SQLite database, Peewee can’t create a MySql database. You need to create it manually or using functionality of DB-API compliant module such as pymysql. First, you should have MySQL server installed in your machine. It can...
[ { "code": null, "e": 2635, "s": 2384, "text": "As mentioned earlier, Peewee supports MySQL database through MySQLDatabase class. However, unlike SQLite database, Peewee can’t create a MySql database. You need to create it manually or using functionality of DB-API compliant module such as pymysql." ...
How to set python environment variable PYTHONPATH on Linux?
To set the PYTHONPATH on linux to point Python to look in other directories for module and package imports, export the PYTHONPATH variable as follows: $ export PYTHONPATH=${PYTHONPATH}:${HOME}/foo In this case we are adding the foo directory to the PYTHONPATH. Note that we are appending it and not replacing the PYTHONP...
[ { "code": null, "e": 1213, "s": 1062, "text": "To set the PYTHONPATH on linux to point Python to look in other directories for module and package imports, export the PYTHONPATH variable as follows:" }, { "code": null, "e": 1259, "s": 1213, "text": "$ export PYTHONPATH=${PYTHONPAT...
Kotlin Tutorial
Kotlin is a modern, trending programming language. Kotlin is easy to learn, especially if you already know Java (it is 100% compatible with Java). Kotlin is used to develop Android apps, server side apps, and much more. Our "Try it Yourself" editor makes it easy to learn Kotlin. You can edit the code and view the r...
[ { "code": null, "e": 51, "s": 0, "text": "Kotlin is a modern, trending programming language." }, { "code": null, "e": 150, "s": 51, "text": "Kotlin is easy to learn, especially if you already know Java (it is \n 100% compatible with Java)." }, { "code": null, "e": 22...
time.Time.Hour() Function in Golang With Examples - GeeksforGeeks
19 Apr, 2020 The Time.Hour() function in Go language is used to check the hour within the day in which the stated “t” presents itself in the range [0, 23]. Moreover, this function is defined under the time package. Here, you need to import the “time” package in order to use these functions. Syntax: func (t Time) Hour()...
[ { "code": null, "e": 24069, "s": 24041, "text": "\n19 Apr, 2020" }, { "code": null, "e": 24348, "s": 24069, "text": "The Time.Hour() function in Go language is used to check the hour within the day in which the stated “t” presents itself in the range [0, 23]. Moreover, this funct...
Explain the MUL() function in JavaScript ? - GeeksforGeeks
25 Jul, 2021 The MUL function is a miniature of the multiplication function. In this function, we call the function that required an argument as a first number, and that function calls another function that required another argument and this step goes on. The first function’s argument is x, the second function argumen...
[ { "code": null, "e": 25220, "s": 25192, "text": "\n25 Jul, 2021" }, { "code": null, "e": 25464, "s": 25220, "text": "The MUL function is a miniature of the multiplication function. In this function, we call the function that required an argument as a first number, and that functi...
How to sort elements in the ListBox in C#? - GeeksforGeeks
17 Jul, 2019 In Windows Forms, ListBox control is used to show multiple elements in a list, from which a user can select one or more elements and the elements are generally displayed in multiple columns. In ListBox, you are allowed to sort the elements present in the ListBox using Sorted Property of the ListBox. This p...
[ { "code": null, "e": 23737, "s": 23709, "text": "\n17 Jul, 2019" }, { "code": null, "e": 24256, "s": 23737, "text": "In Windows Forms, ListBox control is used to show multiple elements in a list, from which a user can select one or more elements and the elements are generally dis...
Find maximum xor of k elements in an array - GeeksforGeeks
22 Dec, 2021 Given an array arr[] of N integers and an integer K. The task is to find the maximum xor subset of size K of the given array.Examples: Input: arr[] = {2, 5, 4, 1, 3, 7, 6, 8}, K = 3 Output: 15 We obtain 15 by selecting 4, 5, 6, 8Input: arr[] = {3, 4, 7, 7, 9}, K = 3 Output: 14 Naive approach: Iterate...
[ { "code": null, "e": 25071, "s": 25043, "text": "\n22 Dec, 2021" }, { "code": null, "e": 25208, "s": 25071, "text": "Given an array arr[] of N integers and an integer K. The task is to find the maximum xor subset of size K of the given array.Examples: " }, { "code": null...
Custom Chips using Jetpack Compose in Android - GeeksforGeeks
21 Nov, 2021 Chips in android are one of the components which are used to make the choice filters, actions, and display the selectable options in the compact area of the Android Window. In this article, we will use Android’s Jetpack Compose to create those chips. A sample image is given below to give an idea of what we...
[ { "code": null, "e": 24725, "s": 24697, "text": "\n21 Nov, 2021" }, { "code": null, "e": 25130, "s": 24725, "text": "Chips in android are one of the components which are used to make the choice filters, actions, and display the selectable options in the compact area of the Androi...
What are transformers and how can you use them? | Towards Data Science
One innovation that has taken natural language processing to new heights in the last three years was the development of transformers. And no, I’m not talking about the giant robots that turn into cars in the famous science-fiction film series directed by Michael Bay. Transformers are semi-supervised machine learning mo...
[ { "code": null, "e": 439, "s": 171, "text": "One innovation that has taken natural language processing to new heights in the last three years was the development of transformers. And no, I’m not talking about the giant robots that turn into cars in the famous science-fiction film series directed by ...
Convert string to bool in C#
To convert a string to a bool, use the Bool.parse method in C# − Firstly, set a string − string str = "false"; Now, convert it to bool − bool.Parse(str); Here is the complete code − Live Demo using System; using System.Linq; class Demo { static void Main() { string str = "false"; bool res = bool.Parse(s...
[ { "code": null, "e": 1127, "s": 1062, "text": "To convert a string to a bool, use the Bool.parse method in C# −" }, { "code": null, "e": 1151, "s": 1127, "text": "Firstly, set a string −" }, { "code": null, "e": 1173, "s": 1151, "text": "string str = \"false\"...
Minimum number of operations on an array to make all elements 0 using C++.
Given an array of size N and each element is either 1 or 0. The task is to calculated the minimum number of operations to be performed to convert all elements to zero. One can perform below operations − If an element is 1, You can change its value equal to 0 then − If the next consecutive element is 1, it will automati...
[ { "code": null, "e": 1265, "s": 1062, "text": "Given an array of size N and each element is either 1 or 0. The task is to calculated the minimum number of operations to be performed to convert all elements to zero. One can perform below operations −" }, { "code": null, "e": 1328, "s"...
Queries to minimize sum added to given ranges in an array to make their Bitwise AND non-zero - GeeksforGeeks
19 Sep, 2021 Given an array arr[] consisting of N integers an array Q[][] consisting of queries of the form {l, r}. For each query {l, r}, the task is to determine the minimum sum of all values that must be added to each array element in that range such that the Bitwise AND of all numbers in that range exceeds 0. Note:...
[ { "code": null, "e": 24405, "s": 24377, "text": "\n19 Sep, 2021" }, { "code": null, "e": 24786, "s": 24405, "text": "Given an array arr[] consisting of N integers an array Q[][] consisting of queries of the form {l, r}. For each query {l, r}, the task is to determine the minimum ...
Python GUI App In No Time by Lazar Gugleta | Towards Data Science
One of the most important parts of today's applications is GUI (Graphical User Interface) itself. That is because the market is so competitive and oversaturated that it is not even about the functionality anymore, but who can make it look prettier and simpler to use. Today we will be learning how to create and build GU...
[ { "code": null, "e": 270, "s": 172, "text": "One of the most important parts of today's applications is GUI (Graphical User Interface) itself." }, { "code": null, "e": 440, "s": 270, "text": "That is because the market is so competitive and oversaturated that it is not even about...
Conversion Functions in SQL
There may be times when the SQL query was expecting some data type but it got another. In that case type conversion is done by SQL. This is implicit type conversion. However, sometimes the programmer explicitly converts one data type into another in a query. This is known as explicit type conversion. Both of these in d...
[ { "code": null, "e": 1410, "s": 1062, "text": "There may be times when the SQL query was expecting some data type but it got another. In that case type conversion is done by SQL. This is implicit type conversion. However, sometimes the programmer explicitly converts one data type into another in a q...
Disarium Number | Practice | GeeksforGeeks
Given a number N, find if it is Disarium or not. A number is called Disarium if sum of its digits powered with their respective positions is equal to the number itself. Output 1 if it's Disarium, and 0 if not. Example 1: Input: N = 89 Output: 1 Explanation: 8^1+9^2 = 89 thus output is 1. Example 2: Input: N = 81 Outp...
[ { "code": null, "e": 448, "s": 238, "text": "Given a number N, find if it is Disarium or not. A number is called Disarium if sum of its digits powered with their respective positions is equal to the number itself. Output 1 if it's Disarium, and 0 if not." }, { "code": null, "e": 461, ...
How to determine the user IP address using node.js ? - GeeksforGeeks
05 Feb, 2021 Node.js is an open-source, back-end JavaScript runtime environment that runs on the web engine and executes JavaScript code. There are various platforms such as Windows, Linux, Mac OS where Node.js can run. The Domain Name System is a hierarchical and decentralized naming system for computers etc that are...
[ { "code": null, "e": 24531, "s": 24503, "text": "\n05 Feb, 2021" }, { "code": null, "e": 24954, "s": 24531, "text": "Node.js is an open-source, back-end JavaScript runtime environment that runs on the web engine and executes JavaScript code. There are various platforms such as Wi...
Can we call methods of the superclass from a static method in java?
Inheritance can be defined as the process where one (parent/super) class acquires the properties (methods and fields) of another (child/sub). With the use of inheritance, the information is made manageable in a hierarchical order. The class which inherits the properties is known as a subclass and the class whose proper...
[ { "code": null, "e": 1546, "s": 1062, "text": "Inheritance can be defined as the process where one (parent/super) class acquires the properties (methods and fields) of another (child/sub). With the use of inheritance, the information is made manageable in a hierarchical order. The class which inheri...
3-way Merge Sort in C++
Merge sort involves recursively dividing the array into 2 parts, sorting and finally merging them. A variant of merge sort is treated as 3-way merge sort where instead of dividing the array into 2 parts we divide it into 3 parts. Merge sort breaks down the arrays to subarrays of size half in recursive manner. In the sa...
[ { "code": null, "e": 1292, "s": 1062, "text": "Merge sort involves recursively dividing the array into 2 parts, sorting and finally merging them. A variant of merge sort is treated as 3-way merge sort where instead of dividing the array into 2 parts we divide it into 3 parts." }, { "code": n...
Modelling Coronavirus: Beyond the SIR Model | Towards Data Science
My last article explains the background and provides an introduction to the topic of modelling infectious diseases. You might want to read that first to understand this one if you don’t already have a solid grasp of the SIR equations. This article is focused on more elaborate variants of the basic SIR model and will en...
[ { "code": null, "e": 666, "s": 172, "text": "My last article explains the background and provides an introduction to the topic of modelling infectious diseases. You might want to read that first to understand this one if you don’t already have a solid grasp of the SIR equations. This article is focu...
Print first m multiples of n without using any loop in Python
21 Nov, 2018 Given n and m, print first m multiples of a m number without using any loops in Python. Examples: Input : n = 2, m = 3 Output : 2 4 6 Input : n = 3, m = 4 Output : 3 6 9 12 We can use range() function in Python to store the multiples in a range.First we store the numbers till m multiples using range() ...
[ { "code": null, "e": 53, "s": 25, "text": "\n21 Nov, 2018" }, { "code": null, "e": 141, "s": 53, "text": "Given n and m, print first m multiples of a m number without using any loops in Python." }, { "code": null, "e": 151, "s": 141, "text": "Examples:" }, ...
Operating Systems | Process Synchronization | Question 5
02 Feb, 2013 The atomic fetch-and-set x, y instruction unconditionally sets the memory location x to 1 and fetches the old value of x in y without allowing any intervening access to the memory location x. consider the following implementation of P and V functions on a binary semaphore . void P (binary_semaphore *s) { ...
[ { "code": null, "e": 52, "s": 24, "text": "\n02 Feb, 2013" }, { "code": null, "e": 327, "s": 52, "text": "The atomic fetch-and-set x, y instruction unconditionally sets the memory location x to 1 and fetches the old value of x in y without allowing any intervening access to the m...
Text to Voice conversion using Web Speech API of Google Chrome
06 Jun, 2022 Creating a web app that converts text to speech incorporated to it sounds pretty cool, and if all these facilities are available without the interference of any third party library then it is even more easy to implement. The web speech API provides with basic tools that can be used to create interactive w...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Jun, 2022" }, { "code": null, "e": 734, "s": 28, "text": " Creating a web app that converts text to speech incorporated to it sounds pretty cool, and if all these facilities are available without the interference of any third party l...
Minimum count of numbers required from given array to represent S
25 May, 2021 Given an integer S and an array arr[], the task is to find the minimum number of elements whose sum is S, such that any element of the array can be chosen any number of times to get sum S. Examples: Input: arr[] = {25, 10, 5}, S = 30 Output: 2 Explanation: In the given array there are many possible soluti...
[ { "code": null, "e": 52, "s": 24, "text": "\n25 May, 2021" }, { "code": null, "e": 241, "s": 52, "text": "Given an integer S and an array arr[], the task is to find the minimum number of elements whose sum is S, such that any element of the array can be chosen any number of times...
WPF - Textblock
A TextBlock is a lightweight control for displaying small amounts of read-only text. The hierarchical inheritance of TextBlock class is as follows − ContentEnd Gets a TextPointer object for the end of text content in the TextBlock. ContentStart Gets a TextPointer object for the start of text content in the TextBlock. I...
[ { "code": null, "e": 2303, "s": 2154, "text": "A TextBlock is a lightweight control for displaying small amounts of read-only text. The hierarchical inheritance of TextBlock class is as follows −" }, { "code": null, "e": 2314, "s": 2303, "text": "ContentEnd" }, { "code": ...
PyQt5 – How to change size of the Label | label.resize method
26 Mar, 2020 While designing any GUI(Graphical User Interface) application we create labels that provide information, but sometimes there might be a case when the label size is not appropriate for the content then need of resizing of label arises. In this tutorial, we will see how to change the size of the label in PyQ...
[ { "code": null, "e": 53, "s": 25, "text": "\n26 Mar, 2020" }, { "code": null, "e": 288, "s": 53, "text": "While designing any GUI(Graphical User Interface) application we create labels that provide information, but sometimes there might be a case when the label size is not approp...
SQL Server | SERVERPROPERTY()
05 Aug, 2020 SQL Server provides a System Defined function SERVERPROPERTY(propertyname). SERVERPROPERTY(): SERVERPROPERTY() function is used to return the information about different properties of system or so called the instance information. propertyname: This expression contains the information about property in qu...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Aug, 2020" }, { "code": null, "e": 105, "s": 28, "text": "SQL Server provides a System Defined function SERVERPROPERTY(propertyname). " }, { "code": null, "e": 260, "s": 105, "text": "SERVERPROPERTY(): SERVERPROPE...
Cyclic Number
03 May, 2022 A cyclic number is an integer in which cyclic permutations of the digits are successive multiples of the number. The most widely known is the six-digit number 142857 (Please see below explanation given in examples).The following trivial cases are typically excluded for Cyclic Numbers. Single digits, e.g....
[ { "code": null, "e": 54, "s": 26, "text": "\n03 May, 2022" }, { "code": null, "e": 342, "s": 54, "text": "A cyclic number is an integer in which cyclic permutations of the digits are successive multiples of the number. The most widely known is the six-digit number 142857 (Please ...
Smallest number by rearranging digits of a given number
25 Jan, 2022 Find the Smallest number (Not leading Zeros) which can be obtained by rearranging the digits of a given number. Examples: Input: n = 846903 Output: 304689 Input: n = 55010 Output: 10055 Input: n = -40505 Output: -55400 Steps to find the smallest number. Count the frequency of each digit in the number...
[ { "code": null, "e": 54, "s": 26, "text": "\n25 Jan, 2022" }, { "code": null, "e": 167, "s": 54, "text": "Find the Smallest number (Not leading Zeros) which can be obtained by rearranging the digits of a given number. " }, { "code": null, "e": 178, "s": 167, "...
Segregate Prime and Non-Prime Numbers in an array
09 Jun, 2021 Given an array arr[] of size N, the task is to rearrange the array elements such that all the Prime numbers are placed before the Non-prime numbers. Examples: Input: arr[] = {1, 8, 2, 3, 4, 5, 7, 20}Output: 7 5 2 3 4 8 1 20Explanation:The output consists of all the prime numbers 7 5 2 3, followed by Non-Pr...
[ { "code": null, "e": 54, "s": 26, "text": "\n09 Jun, 2021" }, { "code": null, "e": 203, "s": 54, "text": "Given an array arr[] of size N, the task is to rearrange the array elements such that all the Prime numbers are placed before the Non-prime numbers." }, { "code": nul...
How to Install Julia on Windows ?
06 Oct, 2021 Julia is a programming language used for statistical computations and data analysis. Julia is a combination of super-fast execution speed of C and flexible code writing of Python. Working with Julia is considered to be super fun and super easy among the Computer scientists and Software Engineers, because o...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Oct, 2021" }, { "code": null, "e": 358, "s": 28, "text": "Julia is a programming language used for statistical computations and data analysis. Julia is a combination of super-fast execution speed of C and flexible code writing of Pyt...
Program to print the berth of given railway seat number
07 Jun, 2022 Given a railway seat number, the task is to check whether it is a valid seat number or not. Also print its berth type i.e lower berth, middle berth, upper berth, side lower berth, side upper berth as per the figure below. Examples: Input: 10 Output: middle berthInput: 7 Output: side lower berth Appr...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Jun, 2022" }, { "code": null, "e": 251, "s": 28, "text": "Given a railway seat number, the task is to check whether it is a valid seat number or not. Also print its berth type i.e lower berth, middle berth, upper berth, side lower be...
Objective-C Program Structure
Before we study basic building blocks of the Objective-C programming language, let us look a bare minimum Objective-C program structure so that we can take it as a reference in upcoming chapters. A Objective-C program basically consists of the following parts − Preprocessor Commands Interface Implementation Method Vari...
[ { "code": null, "e": 2890, "s": 2694, "text": "Before we study basic building blocks of the Objective-C programming language, let us look a bare minimum Objective-C program structure so that we can take it as a reference in upcoming chapters." }, { "code": null, "e": 2956, "s": 2890,...
Plotting Data with Timestamps using PyQtGraph
31 Aug, 2021 In this article, we will see how we can plot data with timestamps using the PyQtGraph module in Python. PyQtGraph is a graphics and user interface library for Python that provides functionality commonly required in designing and science applications. Its primary goals are to provide fast, interactive graph...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Aug, 2021" }, { "code": null, "e": 514, "s": 28, "text": "In this article, we will see how we can plot data with timestamps using the PyQtGraph module in Python. PyQtGraph is a graphics and user interface library for Python that prov...
rm -rf Command in Linux With Examples
08 Mar, 2021 rm command in UNIX stands for remove and by default is used for removing files. It is simple but a powerful command especially when used with options such as -rf which allow it to delete non-empty directories forcefully. The rm command, By default, cannot remove Directories and only works on files. $ mkdi...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Mar, 2021" }, { "code": null, "e": 249, "s": 28, "text": "rm command in UNIX stands for remove and by default is used for removing files. It is simple but a powerful command especially when used with options such as -rf which allow i...
AIML - Quick Guide
AIML stands for Artificial Intelligence Markup Language. AIML was developed by the Alicebot free software community and Dr. Richard S. Wallace during 1995-2000. AIML is used to create or customize Alicebot which is a chat-box application based on A.L.I.C.E. (Artificial Linguistic Internet Computer Entity) free software...
[ { "code": null, "e": 2267, "s": 1945, "text": "AIML stands for Artificial Intelligence Markup Language. AIML was developed by the Alicebot free software community and Dr. Richard S. Wallace during 1995-2000. AIML is used to create or customize Alicebot which is a chat-box application based on A.L.I....
Non-blocking I/O with pipes in C
01 Oct, 2021 Prerequisite: pipe() System callWhen I/O block in pipe() happens? Consider two processes, one process that’s gathering data(read data) in real time and another process that’s plotting it(write data). The two processes are connected by a pipe, with the data acquisition process feeding the data plotting proc...
[ { "code": null, "e": 54, "s": 26, "text": "\n01 Oct, 2021" }, { "code": null, "e": 862, "s": 54, "text": "Prerequisite: pipe() System callWhen I/O block in pipe() happens? Consider two processes, one process that’s gathering data(read data) in real time and another process that’s...
Minimum increment/decrement operations required to make Median as X
23 Apr, 2021 Given an array A[] of n odd integers and an integer X. Calculate the minimum number of operations required to make the median of the array equal to X, where, in one operation we can either increase or decrease any single element by one. Examples: Input: A[] = {6, 5, 8}, X = 8 Output: 2 Explanation: Here 6...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Apr, 2021" }, { "code": null, "e": 291, "s": 54, "text": "Given an array A[] of n odd integers and an integer X. Calculate the minimum number of operations required to make the median of the array equal to X, where, in one operation...
Matplotlib – How to show the coordinates of a point upon mouse click?
To create a custom mouse cursor in matplotlib, we can take the following steps Set the figure size and adjust the padding between and around the subplots. Set the figure size and adjust the padding between and around the subplots. Create a new figure or activate an existing figure. Create a new figure or activate an ex...
[ { "code": null, "e": 1266, "s": 1187, "text": "To create a custom mouse cursor in matplotlib, we can take the following steps" }, { "code": null, "e": 1342, "s": 1266, "text": "Set the figure size and adjust the padding between and around the subplots." }, { "code": null,...
Python | Find missing elements in List
19 Jun, 2019 Sometimes, we can get elements in range as input but some values are missing in otherwise consecutive range. We might have a use case in which we need to get all the missing elements. Let’s discuss certain ways in which this can be done. Method #1 : Using list comprehensionWe can perform the task of findin...
[ { "code": null, "e": 54, "s": 26, "text": "\n19 Jun, 2019" }, { "code": null, "e": 292, "s": 54, "text": "Sometimes, we can get elements in range as input but some values are missing in otherwise consecutive range. We might have a use case in which we need to get all the missing ...
Pure Function In Scala
09 Mar, 2022 In any programming language, there are two types of functions: 1. PURE FUNCTIONS 2. IMPURE FUNCTIONSThere is a basic difference between the two, that is pure function doesn’t change the variable it’s passed and an impure function does. For example, there exists a function which increases the input by 10. ...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Mar, 2022" }, { "code": null, "e": 92, "s": 28, "text": "In any programming language, there are two types of functions: " }, { "code": null, "e": 110, "s": 92, "text": "1. PURE FUNCTIONS" }, { "code": null...
How to merge multiple folders into one folder using Python ?
28 Apr, 2021 In this article, we will discuss how to move multiple folders into one folder. This can be done using Python’s OS and Shutil module. Get the current directory and the list of the folders you want to merge.Loop through the list of folders and store their content in a list. Here, we have stored them in the d...
[ { "code": null, "e": 53, "s": 25, "text": "\n28 Apr, 2021" }, { "code": null, "e": 186, "s": 53, "text": "In this article, we will discuss how to move multiple folders into one folder. This can be done using Python’s OS and Shutil module." }, { "code": null, "e": 729,...
Null Pointer Exception in Java Programming
NullPointerException is a runtime exception and it is thrown when the application try to use an object reference which has a null value. For example, using a method on a null reference. Live Demo public class Tester { public static void main(String[] args) { Object ref = null; ref.toString(); // this wi...
[ { "code": null, "e": 1324, "s": 1187, "text": "NullPointerException is a runtime exception and it is thrown when the application try to use an object reference which has a null value." }, { "code": null, "e": 1373, "s": 1324, "text": "For example, using a method on a null referen...
How to Un-Delete Your Jupyter Notebooks | by Ray Johns | Towards Data Science
Who doesn’t love Jupyter notebooks? They’re interactive, giving you the instant gratification of immediate feedback. They’re extensible — you can even deploy them as websites. Most importantly for data scientists and machine learning engineers, they’re expressive — they span the space between the scientists and enginee...
[ { "code": null, "e": 612, "s": 172, "text": "Who doesn’t love Jupyter notebooks? They’re interactive, giving you the instant gratification of immediate feedback. They’re extensible — you can even deploy them as websites. Most importantly for data scientists and machine learning engineers, they’re ex...
How to draw a circular gradient in HTML5?
This method returns a CanvasGradient object that represents a radial gradient that paints along the cone given by the circles represented by the arguments. The first three arguments define a circle with coordinates (x1,y1) and radius r1 and the second a circle with coordinates (x2,y2) and radius r2. createRadialGradien...
[ { "code": null, "e": 1363, "s": 1062, "text": "This method returns a CanvasGradient object that represents a radial gradient that paints along the cone given by the circles represented by the arguments. The first three arguments define a circle with coordinates (x1,y1) and radius r1 and the second a...
How to zoom a portion of an image and insert in the same plot in Matplotlib?
To zoom a portion of an image and insert in the same plot, we can take the following steps − Create x and y points, using numpy. Create x and y points, using numpy. To zoom a part of an image, we can make data for x and y points, in that range. To zoom a part of an image, we can make data for x and y points, in that ra...
[ { "code": null, "e": 1155, "s": 1062, "text": "To zoom a portion of an image and insert in the same plot, we can take the following steps −" }, { "code": null, "e": 1191, "s": 1155, "text": "Create x and y points, using numpy." }, { "code": null, "e": 1227, "s": 1...
Android RecyclerView Load More on Scroll with Example - GeeksforGeeks
30 Apr, 2021 Many apps display so many amounts of data in the form of a list. This data is so much so that it cannot be loaded at a time. If we load this data at a time then it may take so much loading time and degrades the performance of our RecyclerView. So to solve this we generally load the data in chunks and displ...
[ { "code": null, "e": 24725, "s": 24697, "text": "\n30 Apr, 2021" }, { "code": null, "e": 25169, "s": 24725, "text": "Many apps display so many amounts of data in the form of a list. This data is so much so that it cannot be loaded at a time. If we load this data at a time then it...
How to use __dir__ in PHP?
The __DIR__ can be used to obtain the current code working directory. It has been introduced in PHP beginning from version 5.3. It is similar to using dirname(__FILE__). Usually, it is used to include other files that is present in an included file. Consider the following directory structure − A directory called "maste...
[ { "code": null, "e": 1312, "s": 1062, "text": "The __DIR__ can be used to obtain the current code working directory. It has been introduced in PHP beginning from version 5.3. It is similar to using dirname(__FILE__). Usually, it is used to include other files that is present in an included file." ...
How to set viewport height and width in CSS
To set viewport height in CSS: h1 { font-size: 4.0vh; } To set viewport width in CSS: h1 { font-size: 5.5vw; }
[ { "code": null, "e": 1093, "s": 1062, "text": "To set viewport height in CSS:" }, { "code": null, "e": 1121, "s": 1093, "text": "h1 {\n font-size: 4.0vh;\n}" }, { "code": null, "e": 1151, "s": 1121, "text": "To set viewport width in CSS:" }, { "code"...
Nested Classes in C++ - GeeksforGeeks
04 Jan, 2019 A nested class is a class which is declared in another enclosing class. A nested class is a member and as such has the same access rights as any other member. The members of an enclosing class have no special access to members of a nested class; the usual access rules shall be obeyed. For example, program ...
[ { "code": null, "e": 25393, "s": 25365, "text": "\n04 Jan, 2019" }, { "code": null, "e": 25679, "s": 25393, "text": "A nested class is a class which is declared in another enclosing class. A nested class is a member and as such has the same access rights as any other member. The ...
Python program to find difference between current time and given time
30 Jan, 2020 Given two times h1:m1 and h2:m2 denoting hours and minutes in 24 hours clock format. The current clock time is given by h1:m1. The task is to calculate the difference between two times in minutes and print the difference between two times in h:m format. Examples: Input : h1=7, m1=20, h2=9, m2=45Output : 2 ...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Jan, 2020" }, { "code": null, "e": 306, "s": 52, "text": "Given two times h1:m1 and h2:m2 denoting hours and minutes in 24 hours clock format. The current clock time is given by h1:m1. The task is to calculate the difference between...
Splitting Strings in R programming – strsplit() method
11 Nov, 2021 strsplit() method in R Programming Language is used to split the string by using a delimiter. Syntax: strsplit(string, split, fixed) Parameters: string: Input vector or string. split: It is a character of string to being split. fixed: Match the split or use the regular expression. Return: Returns the list ...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Nov, 2021" }, { "code": null, "e": 122, "s": 28, "text": "strsplit() method in R Programming Language is used to split the string by using a delimiter." }, { "code": null, "e": 161, "s": 122, "text": "Syntax: strs...
Maximum 0’s between two immediate 1’s in binary representation
31 May, 2022 Given a number n, the task is to find the maximum 0’s between two immediate 1’s in binary representation of given n. Return -1 if binary representation contains less than two 1’s. Examples : Input : n = 47 Output: 1 // binary of n = 47 is 101111 Input : n = 549 Output: 3 // binary of n = 549 is 100010010...
[ { "code": null, "e": 52, "s": 24, "text": "\n31 May, 2022" }, { "code": null, "e": 232, "s": 52, "text": "Given a number n, the task is to find the maximum 0’s between two immediate 1’s in binary representation of given n. Return -1 if binary representation contains less than two...
Different ways to iterate over rows in Pandas Dataframe
24 Jun, 2022 In this article, we will cover how to iterate over rows in a DataFrame in Pandas. Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Different ...
[ { "code": null, "e": 54, "s": 26, "text": "\n24 Jun, 2022" }, { "code": null, "e": 136, "s": 54, "text": "In this article, we will cover how to iterate over rows in a DataFrame in Pandas." }, { "code": null, "e": 351, "s": 136, "text": "Python is a great langu...
response.content – Python requests
26 Jul, 2021 Python requests are generally used to fetch the content from a particular resource URI. Whenever we make a request to a specified URI through Python, it returns a response object. Now, this response object would be used to access certain features such as content, headers, etc. This article revolves around ...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Jul, 2021" }, { "code": null, "e": 509, "s": 28, "text": "Python requests are generally used to fetch the content from a particular resource URI. Whenever we make a request to a specified URI through Python, it returns a response obj...
Program for power of a complex number in O(log n)
30 Nov, 2021 Given a complex number of the form x + yi and an integer n, the task is to calculate the value of this complex number raised to the power n.Examples: Input: num = 17 - 12i, n = 3 Output: -2431 + i ( -8676 ) Input: num = 18 - 13i, n = 8 Output: 16976403601 + i ( 56580909840 ) Approach: This algorithm w...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Nov, 2021" }, { "code": null, "e": 180, "s": 28, "text": "Given a complex number of the form x + yi and an integer n, the task is to calculate the value of this complex number raised to the power n.Examples: " }, { "code": n...
Powershell - Write-Host Cmdlet
Write-Host cmdlet is used to write customized messages. In these example, we're see the Write-Host cmdlet in action. In this example, we'll show a customized message. Write-Host (2,4,6,8,10,12) -Separator ", -> " -ForegroundColor DarkGreen -BackgroundColor White You can see the even numbers with separator, in green col...
[ { "code": null, "e": 2224, "s": 2168, "text": "Write-Host cmdlet is used to write customized messages." }, { "code": null, "e": 2285, "s": 2224, "text": "In these example, we're see the Write-Host cmdlet in action." }, { "code": null, "e": 2335, "s": 2285, "te...
How to use dynamic variable names in JavaScript ?
21 Jul, 2021 In programming, dynamic variable names don’t have a specific name hard-coded in the script. They are named dynamically with string values from other sources. Dynamic variables are rarely used in JavaScript. But in some cases they are useful. Unlike PHP, there is no special implementation of dynamic variabl...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jul, 2021" }, { "code": null, "e": 538, "s": 52, "text": "In programming, dynamic variable names don’t have a specific name hard-coded in the script. They are named dynamically with string values from other sources. Dynamic variable...
Python object serialization
Serialization is a process in which an object is transformed into a format that can be stored/save (in a file or memory buffer), so we are able to deserialize it later and recover the original content/object from the serialized format. We are going to use a python pickle module to do all these operations. Python pickle...
[ { "code": null, "e": 1494, "s": 1187, "text": "Serialization is a process in which an object is transformed into a format that can be stored/save (in a file or memory buffer), so we are able to deserialize it later and recover the original content/object from the serialized format. We are going to u...
Readability Index in Python(NLP)
03 Sep, 2021 Readability is the ease with which a reader can understand a written text. In natural language, the readability of text depends on its content (the complexity of its vocabulary and syntax). It focuses on the words we choose, and how we put them into sentences and paragraphs for the readers to comprehend. ...
[ { "code": null, "e": 54, "s": 26, "text": "\n03 Sep, 2021" }, { "code": null, "e": 361, "s": 54, "text": "Readability is the ease with which a reader can understand a written text. In natural language, the readability of text depends on its content (the complexity of its vocabula...
Decoding Strategies that You Need to Know for Response Generation | by Vitou Phy | Towards Data Science
Deep learning has been deployed in many tasks in NLP, such as translation, image captioning, and dialogue systems. In machine translation, it is used to read source language (input) and generate the desired language (output). Similarly in a dialogue system, it is used to generate a response given a context. This is als...
[ { "code": null, "e": 537, "s": 171, "text": "Deep learning has been deployed in many tasks in NLP, such as translation, image captioning, and dialogue systems. In machine translation, it is used to read source language (input) and generate the desired language (output). Similarly in a dialogue syste...
Explain some string functions of PHP - GeeksforGeeks
20 Oct, 2021 In the programming world, a string is considered a data type, which in general is a sequence of multiple characters that can contain whitespaces, numbers, characters, and special symbols as well. For example, “Hello World!”, “ID-34#90” etc. PHP also allows single quotes(‘ ‘) for defining a string. Every pr...
[ { "code": null, "e": 24555, "s": 24527, "text": "\n20 Oct, 2021" }, { "code": null, "e": 25014, "s": 24555, "text": "In the programming world, a string is considered a data type, which in general is a sequence of multiple characters that can contain whitespaces, numbers, characte...
Object Oriented Programming in Python?
Python has been an object oriented programming language since its existence. Classes and objects are the two main building blocks of object oriented programming. A class creates a new type of objects where objects are instances of the class. Let’s create one of the simplest class, Let just define an empty class. #Defin...
[ { "code": null, "e": 1224, "s": 1062, "text": "Python has been an object oriented programming language since its existence. Classes and objects are the two main building blocks of object oriented programming." }, { "code": null, "e": 1304, "s": 1224, "text": "A class creates a ne...
Node.js - Console
Node.js console is a global object and is used to print different levels of messages to stdout and stderr. There are built-in methods to be used for printing informational, warning, and error messages. It is used in synchronous way when the destination is a file or a terminal and in asynchronous way when the destinatio...
[ { "code": null, "e": 2220, "s": 2018, "text": "Node.js console is a global object and is used to print different levels of messages to stdout and stderr. There are built-in methods to be used for printing informational, warning, and error messages." }, { "code": null, "e": 2352, "s":...
Install Pyspark and use GraphFrames on macOS and Linux | by Andrewngai | Towards Data Science
All the following operations should be done under Terminal. Download Spark Download Spark wget http://d3kbcqa49mib13.cloudfront.net/spark-2.2.0-bin-hadoop2.7.tgz 2. Unpack the file tar xf spark-2.2.0-bin-hadoop2.7.tgz 3. Install Java8 if necessary sudo add-apt-repository ppa:openjdk-r/ppasudo apt-get updatesudo apt-get...
[ { "code": null, "e": 232, "s": 172, "text": "All the following operations should be done under Terminal." }, { "code": null, "e": 247, "s": 232, "text": "Download Spark" }, { "code": null, "e": 262, "s": 247, "text": "Download Spark" }, { "code": null,...
GATE CS 2013 - GeeksforGeeks
11 Oct, 2021 Which one of the following does NOT equal to C D B A First of all, you should know the basic properties of determinants before approaching For these kind of problems. 1) Applying any row or column transformation does not change the determinant 2) If you interchange any two rows, sign of the de...
[ { "code": null, "e": 27219, "s": 27191, "text": "\n11 Oct, 2021" }, { "code": null, "e": 27265, "s": 27219, "text": "Which one of the following does NOT equal to " }, { "code": null, "e": 27272, "s": 27269, "text": "C " }, { "code": null, "e": 2727...
Design 101 sequence detector (Mealy machine) - GeeksforGeeks
01 Apr, 2021 Prerequisite – Mealy and Moore machines A sequence detector is a sequential state machine that takes an input string of bits and generates an output 1 whenever the target sequence has been detected. In a Mealy machine, output depends on the present state and the external input (x). Hence, in the diagram, t...
[ { "code": null, "e": 26445, "s": 26417, "text": "\n01 Apr, 2021" }, { "code": null, "e": 26849, "s": 26445, "text": "Prerequisite – Mealy and Moore machines A sequence detector is a sequential state machine that takes an input string of bits and generates an output 1 whenever the...
Find the next fibonacci number - GeeksforGeeks
10 Mar, 2022 Given a fibonacci number N, the task is to find the next fibonacci number.Examples: Input: N = 5 Output: 8 8 is the next fibonacci number after 5Input: N = 3 Output: 5 Approach: The ratio of two adjacent numbers in the Fibonacci series rapidly approaches ((1 + sqrt(5)) / 2). So if N is multiplied by ...
[ { "code": null, "e": 24327, "s": 24299, "text": "\n10 Mar, 2022" }, { "code": null, "e": 24413, "s": 24327, "text": "Given a fibonacci number N, the task is to find the next fibonacci number.Examples: " }, { "code": null, "e": 24499, "s": 24413, "text": "Inpu...
Building A Simple Voice Assistant for Your Mac in Python | by Kyle Gallatin | Towards Data Science
Voice assistants like Siri or Cortana can do cool and useful things for you: open applications, search for information, send messages and more. While it’s cool to use the ones you’ve been given...it’s way more fun to make your own. In this post I’ll show you how to start building a voice assistant framework that can do...
[ { "code": null, "e": 607, "s": 172, "text": "Voice assistants like Siri or Cortana can do cool and useful things for you: open applications, search for information, send messages and more. While it’s cool to use the ones you’ve been given...it’s way more fun to make your own. In this post I’ll show ...
How do I pass a variable to a MySQL script?
You can pass a variable to a MySQL script using session variable. First you need to set a session variable using SET command. After that you need to pass that variable to a MySQL script. The syntax is as follows − First Step: Use of Set command. SET @anyVariableName − = ’yourValue’; Second Step: Pass a variable to a My...
[ { "code": null, "e": 1249, "s": 1062, "text": "You can pass a variable to a MySQL script using session variable. First you need to set a session variable using SET command. After that you need to pass that variable to a MySQL script." }, { "code": null, "e": 1276, "s": 1249, "tex...
Don’t waste your unlabeled data. Evaluate the weakness of your model and... | by Betty LD | Towards Data Science
In the last decade, the main trend in AI was focusing on building creative and complex models. But these last years, state-of-the-art architectures are made available to anyone in popular languages like Python and its libraries such as Pytorch, Tensorflow, JAX, etc. Now, AI's highest priority is to make these models va...
[ { "code": null, "e": 611, "s": 40, "text": "In the last decade, the main trend in AI was focusing on building creative and complex models. But these last years, state-of-the-art architectures are made available to anyone in popular languages like Python and its libraries such as Pytorch, Tensorflow,...
Gradle - Tasks
Gradle build script describes about one or more Projects. Each project is made up of different tasks and a task is a piece of work which a build performs. The task might be compiling some classes, storing class files into separate target folder, creating JAR, generating Javadoc, or publishing some achieves to the repos...
[ { "code": null, "e": 2037, "s": 1882, "text": "Gradle build script describes about one or more Projects. Each project is made up of different tasks and a task is a piece of work which a build performs." }, { "code": null, "e": 2211, "s": 2037, "text": "The task might be compiling...
Multiply two linked lists | Practice | GeeksforGeeks
Given elements as nodes of the two linked lists. The task is to multiply these two linked lists, say L1 and L2. Note: The output could be large take modulo 109+7. Input: The first line of input contains an integer T denoting the number of test cases. Then T test cases follow, the first line of each test case contains ...
[ { "code": null, "e": 351, "s": 238, "text": "Given elements as nodes of the two linked lists. The task is to multiply these two linked lists, say L1 and L2. " }, { "code": null, "e": 402, "s": 351, "text": "Note: The output could be large take modulo 109+7." }, { "code": ...
Erlang - Basic Syntax
In order to understand the basic syntax of Erlang, let’s first look at a simple Hello World program. % hello world program -module(helloworld). -export([start/0]). start() -> io:fwrite("Hello, world!\n"). The following things need to be noted about the above program − The % sign is used to add comments to the pr...
[ { "code": null, "e": 2402, "s": 2301, "text": "In order to understand the basic syntax of Erlang, let’s first look at a simple Hello World program." }, { "code": null, "e": 2513, "s": 2402, "text": "% hello world program\n-module(helloworld). \n-export([start/0]). \n\nstart() -> ...
Java program to convert the contents of a Map to list
The Map class’s object contains key and value pairs. You can convert it into two list objects one which contains key values and the one which contains map values separately. To convert a map to list − Create a Map object. Using the put() method insert elements to it as key, value pairs Create an ArrayList of integer ty...
[ { "code": null, "e": 1236, "s": 1062, "text": "The Map class’s object contains key and value pairs. You can convert it into two list objects one which contains key values and the one which contains map values separately." }, { "code": null, "e": 1263, "s": 1236, "text": "To conve...
Ngx-Bootstrap - Modals
ngx-bootstrap modal component is a flexible and highly configurable dialog prompt and provides multiple defaults and can be used with minimum code. [bsModal] [bsModal] config − ModalOptions, allows to set modal configuration via element property config − ModalOptions, allows to set modal configuration via element prope...
[ { "code": null, "e": 2248, "s": 2100, "text": "ngx-bootstrap modal component is a flexible and highly configurable dialog prompt and provides multiple defaults and can be used with minimum code." }, { "code": null, "e": 2258, "s": 2248, "text": "[bsModal]" }, { "code": nu...
How many levels of pointers can we have in C/C++ - GeeksforGeeks
18 Jan, 2022 Prerequisite: Pointer in C and C++, Double Pointer (Pointer to Pointer) in CA pointer is used to point to a memory location of a variable. A pointer stores the address of a variable and the value of a variable can be accessed using dereferencing of the pointer. A pointer is generally initialized as: data...
[ { "code": null, "e": 24429, "s": 24401, "text": "\n18 Jan, 2022" }, { "code": null, "e": 24732, "s": 24429, "text": "Prerequisite: Pointer in C and C++, Double Pointer (Pointer to Pointer) in CA pointer is used to point to a memory location of a variable. A pointer stores the add...
How to adjust display settings of MySQL command line?
To adjust display settings of MySQL command line, use the /G at the end of MySQL queries instead of semicolon(;). The syntax is as follows − SELECT *FROM yourTableName \G The above syntax adjusts the display settings. Here we will display records in row format from our sample ‘studenttable’ table which we created using...
[ { "code": null, "e": 1176, "s": 1062, "text": "To adjust display settings of MySQL command line, use the /G at the end of MySQL queries instead of semicolon(;)." }, { "code": null, "e": 1203, "s": 1176, "text": "The syntax is as follows −" }, { "code": null, "e": 1233...
Using LDA Topic Models as a Classification Model Input | by Marc Kelechava | Towards Data Science
Topic Modeling in NLP seeks to find hidden semantic structure in documents. They are probabilistic models that can help you comb through massive amounts of raw text and cluster similar groups of documents together in an unsupervised way. This post specifically focuses on Latent Dirichlet Allocation (LDA), which was a t...
[ { "code": null, "e": 409, "s": 171, "text": "Topic Modeling in NLP seeks to find hidden semantic structure in documents. They are probabilistic models that can help you comb through massive amounts of raw text and cluster similar groups of documents together in an unsupervised way." }, { "co...
AI, Cluster Analysis of Categorical Data (Part II) | by Michelangiolo Mazzeschi | Towards Data Science
Entire Procedure Full code available at my repository. The notebook is called: CRL_Clustering. Downloading match datasets with APIPre-processing: personalized sorting of every rowPre-processing: label encoding of the entire datasetPre-processing: one_hot encoding of the entire datasetPerform cluster analysisTrain K-Nod...
[ { "code": null, "e": 189, "s": 172, "text": "Entire Procedure" }, { "code": null, "e": 267, "s": 189, "text": "Full code available at my repository. The notebook is called: CRL_Clustering." }, { "code": null, "e": 582, "s": 267, "text": "Downloading match data...
VBA - Ltrim
The Ltrim function removes the blank spaces from the left side of the string. LTrim(String) Add a button and add the following function. Private Sub Constant_demo_Click() Dim var as Variant var = " Microsoft VBScript" msgbox "After Ltrim : " & LTrim(var) End Sub When you execute the function...
[ { "code": null, "e": 2013, "s": 1935, "text": "The Ltrim function removes the blank spaces from the left side of the string." }, { "code": null, "e": 2028, "s": 2013, "text": "LTrim(String)\n" }, { "code": null, "e": 2073, "s": 2028, "text": "Add a button and ...
How to create a WebView in an Android App using Kotlin?
This example demonstrates how to create a WebView in an Android App using Kotlin. Step 1 − Create a new project in Android Studio, go to File ? New Project and fill all required details to create a new project. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.androi...
[ { "code": null, "e": 1144, "s": 1062, "text": "This example demonstrates how to create a WebView in an Android App using Kotlin." }, { "code": null, "e": 1273, "s": 1144, "text": "Step 1 − Create a new project in Android Studio, go to File ? New Project and fill all required deta...
Remove vowels from a String in C++
The following C++ program illustrates how to remove the vowels (a,e, i,u,o) from a given string. In this context, we create a new string and process input string character by character, and if a vowel is found it is excluded in the new string, otherwise the character is added to the new string after the string ends we ...
[ { "code": null, "e": 1457, "s": 1062, "text": "The following C++ program illustrates how to remove the vowels (a,e, i,u,o) from a given string. In this context, we create a new string and process input string character by character, and if a vowel is found it is excluded in the new string, otherwise...
Find the Nth term in series 12, 35, 81, 173, 357, ... - GeeksforGeeks
18 Mar, 2021 Given a number N, the task is to find the Nth term in series 12, 35, 81, 173, 357, ...Example: Input: N = 2 Output: 35 2nd term = (12*2) + 11 = 35 Input: N = 5 Output: 357 5th term = (12*(2^4))+11*((2^4)-1) = 357 Approach: Each and every number is obtained by multiplying the previo...
[ { "code": null, "e": 24785, "s": 24757, "text": "\n18 Mar, 2021" }, { "code": null, "e": 24882, "s": 24785, "text": "Given a number N, the task is to find the Nth term in series 12, 35, 81, 173, 357, ...Example: " }, { "code": null, "e": 25019, "s": 24882, "t...
Unix / Linux - Shell Loop Types
In this chapter, we will discuss shell loops in Unix. A loop is a powerful programming tool that enables you to execute a set of commands repeatedly. In this chapter, we will examine the following types of loops available to shell programmers − The while loop The for loop The until loop The select loop You will use dif...
[ { "code": null, "e": 2992, "s": 2747, "text": "In this chapter, we will discuss shell loops in Unix. A loop is a powerful programming tool that enables you to execute a set of commands repeatedly. In this chapter, we will examine the following types of loops available to shell programmers −" }, ...
Backpropagation in a convolutional layer | by Pierre JAUMIER | Towards Data Science
The aim of this post is to detail how gradient backpropagation is working in a convolutional layer of a neural network. Typically the output of this layer will be the input of a chosen activation function (relufor instance). We are making the assumption that we are given the gradient dy backpropagated from this activat...
[ { "code": null, "e": 913, "s": 172, "text": "The aim of this post is to detail how gradient backpropagation is working in a convolutional layer of a neural network. Typically the output of this layer will be the input of a chosen activation function (relufor instance). We are making the assumption t...
PyQt5 Label - Adding shadow - GeeksforGeeks
10 May, 2020 In this article we will see how we can add shadow to the label by default there is no shadow to the label although we can create shadow to the label, below is the representation of how label with shadow box looks like In order to do this we have to do the following – 1. Create a label2. Set geometry to the...
[ { "code": null, "e": 24470, "s": 24442, "text": "\n10 May, 2020" }, { "code": null, "e": 24688, "s": 24470, "text": "In this article we will see how we can add shadow to the label by default there is no shadow to the label although we can create shadow to the label, below is the ...
Dataset deduplication using spark’s MLlib | by Ronald Ángel | Towards Data Science
A deduplication process is always important for companies with a huge amount of data. From one thing, deduplication minimizes the amount of space required to store business data and will bring a lower infrastructure cost and better performance for our pipelines. From another thing, reducing the number of duplicates wil...
[ { "code": null, "e": 625, "s": 172, "text": "A deduplication process is always important for companies with a huge amount of data. From one thing, deduplication minimizes the amount of space required to store business data and will bring a lower infrastructure cost and better performance for our pip...
Program to find number of ways to arrange n rooks so that they cannot attack each other in Python
Suppose we have a number n representing a chessboard of size n x n. We have to find the number of ways we can place n rooks, such that they cannot attack each other. Here two ways will be considered different if in one of the ways, some cell of the chessboard is occupied, and another way, the cell is not occupied. (We ...
[ { "code": null, "e": 1479, "s": 1062, "text": "Suppose we have a number n representing a chessboard of size n x n. We have to find the\nnumber of ways we can place n rooks, such that they cannot attack each other. Here two ways\nwill be considered different if in one of the ways, some cell of the ch...
15 Git Commands To Master Before Your Very First Project | by AnBento | Towards Data Science
You just started your first project as a web developer and wish to keep track of a multitude of changes in your working directory? You finally got selected for an interview as a junior data engineer and feel a bit rusty on the version control topic? Or you simply work in data science and want to learn more about Git an...
[ { "code": null, "e": 595, "s": 171, "text": "You just started your first project as a web developer and wish to keep track of a multitude of changes in your working directory? You finally got selected for an interview as a junior data engineer and feel a bit rusty on the version control topic? Or yo...
Java program to calculate the factorial of a given number using while loop
A factorial of a particular number (n) is the product of all the numbers from 0 to n (including n) i.e. Factorial of the number 5 will be 1*2*3*4*5 = 120. To find the factorial of a given number. Create a variable factorial initialize it with 1. start while loop with condition i (initial value 1) less than the given...
[ { "code": null, "e": 1217, "s": 1062, "text": "A factorial of a particular number (n) is the product of all the numbers from 0 to n (including n) i.e. Factorial of the number 5 will be 1*2*3*4*5 = 120." }, { "code": null, "e": 1259, "s": 1217, "text": " To find the factorial of a...
Generating fake data with Python, Numpy, and Faker | Towards Data Science
The first step in data analysis is finding data to analyze. All too often, this crucial first step is next to impossible. Data that meets our needs may be proprietary, expensive, hard to collect, or simply may not exist. Finding a suitable dataset is the most common problem I face when wanting to try out a new library ...
[ { "code": null, "e": 232, "s": 172, "text": "The first step in data analysis is finding data to analyze." }, { "code": null, "e": 393, "s": 232, "text": "All too often, this crucial first step is next to impossible. Data that meets our needs may be proprietary, expensive, hard to...
Bias-Variance Tradeoff in Time Series | by Nikhil Gupta | Towards Data Science
When building a model for any machine learning problem, we must pay attention to bias-variance tradeoffs. Specifically, for time series: Having too much bias (underfitting) means that the model is not able to capture all the signals in the data and hence leads to a higher error during the training phase (and in turn du...
[ { "code": null, "e": 309, "s": 172, "text": "When building a model for any machine learning problem, we must pay attention to bias-variance tradeoffs. Specifically, for time series:" }, { "code": null, "e": 762, "s": 309, "text": "Having too much bias (underfitting) means that th...
Ptpython: A Better Python REPL | by Khuyen Tran | Towards Data Science
Have you ever wanted to quickly try some ideas popping up in your head using a Python Shell (REPL)? You might not want to open a new Jupyter Notebook to experiment with only a few lines of code. But you might also be hesitant to use a classic Python shell since it doesn’t support auto-completion or docstring as Jupyter...
[ { "code": null, "e": 367, "s": 172, "text": "Have you ever wanted to quickly try some ideas popping up in your head using a Python Shell (REPL)? You might not want to open a new Jupyter Notebook to experiment with only a few lines of code." }, { "code": null, "e": 573, "s": 367, ...
Computer Vision for Beginners: Part 2 | by Jiwon Jeong | Towards Data Science
Preparation refers to the process of getting ready for a task before actually starting it. It could be a preparing step of writing a story, job interview or data modeling. And having a thorough preparation can’t be overemphasized of its importance. If we get off without enough preprocessing, it’s hard to expect to get ...
[ { "code": null, "e": 544, "s": 172, "text": "Preparation refers to the process of getting ready for a task before actually starting it. It could be a preparing step of writing a story, job interview or data modeling. And having a thorough preparation can’t be overemphasized of its importance. If we ...
Java.util.Observable class in Java - GeeksforGeeks
08 Jul, 2017 java.util.Observable is used to create subclasses that other parts of the program can observe. When an object of such subclass undergoes a change, observing classes are notified. The update( ) method is called when an observer is notified of a change. Note: Observing class must implement the Observer inter...
[ { "code": null, "e": 24449, "s": 24421, "text": "\n08 Jul, 2017" }, { "code": null, "e": 24701, "s": 24449, "text": "java.util.Observable is used to create subclasses that other parts of the program can observe. When an object of such subclass undergoes a change, observing classe...
How to increase the size of points on a scatterplot if the points are drawn based on another sequence using ggplot2 in R?
When we draw a scatterplot using ggplot2 with points based on a sequence of values then the size of the points might be very small for the small values. As a result, it becomes a little difficult to view the points. Therefore, we might want to increase the size of those points. It can be done by using scale_size_contin...
[ { "code": null, "e": 1445, "s": 1062, "text": "When we draw a scatterplot using ggplot2 with points based on a sequence of values then the size of the points might be very small for the small values. As a result, it becomes a little difficult to view the points. Therefore, we might want to increase ...