title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Remove elements from a Dictionary using Javascript
To remove an element from the dictionary, we first need to check if it exists in the dictionary. We'll use the hasKey method for that. Then we can directly delete it using the delete operator. We'll return a Boolean so that the place where we call this method can know whether the key already existed or not in the dicti...
[ { "code": null, "e": 1159, "s": 1062, "text": "To remove an element from the dictionary, we first need to check if it exists in the dictionary." }, { "code": null, "e": 1255, "s": 1159, "text": "We'll use the hasKey method for that. Then we can directly delete it using the delete...
Minimum cost to reverse edges such that there is path between every pair of nodes - GeeksforGeeks
19 Jul, 2021 Given a connected, directional graph. Each node is connected to exactly two other nodes. There is weight associated with each edge denoting the cost to reverse its direction. The task is to find the minimum cost to reverse some edges of the graph such that it is possible to go from each node to every other...
[ { "code": null, "e": 24610, "s": 24582, "text": "\n19 Jul, 2021" }, { "code": null, "e": 24935, "s": 24610, "text": "Given a connected, directional graph. Each node is connected to exactly two other nodes. There is weight associated with each edge denoting the cost to reverse its...
Node at a given index in linked list | Practice | GeeksforGeeks
Given a singly linked list with N nodes and a number X. The task is to find the node at the given index (X)(1 based index) of linked list. Input: First line of input contains number of testcases T. For each testcase, first line of input contains space seperated two integers, length of linked list and X. Output: For ea...
[ { "code": null, "e": 378, "s": 238, "text": "Given a singly linked list with N nodes and a number X. The task is to find the node at the given index (X)(1 based index) of linked list. " }, { "code": null, "e": 544, "s": 378, "text": "Input:\nFirst line of input contains number of...
How to combine two vectors while replacing the NA values with the values in the other vector in R?
Sometimes we have vectors with NA values, also there might be a situation that one of vector having an NA at a position and the other vector has the numerical values at the same position. For example, 1, 2, NA and 1, 2, 3. In this case, we might want to combine these two vectors to make a single vector. This can be don...
[ { "code": null, "e": 1429, "s": 1062, "text": "Sometimes we have vectors with NA values, also there might be a situation that one of vector having an NA at a position and the other vector has the numerical values at the same position. For example, 1, 2, NA and 1, 2, 3. In this case, we might want to...
Abstract Base Classes in Python (abc)
A class is called an Abstract class if it contains one or more abstract methods. An abstract method is a method that is declared, but contains no implementation. Abstract classes may not be instantiated, and its abstract methods must be implemented by its subclasses. Abstract base classes provide a way to define interf...
[ { "code": null, "e": 1330, "s": 1062, "text": "A class is called an Abstract class if it contains one or more abstract methods. An abstract method is a method that is declared, but contains no implementation. Abstract classes may not be instantiated, and its abstract methods must be implemented by i...
JavaScript - Date getHours() Method
Javascript Date getHours() method returns the hour in the specified date according to local time. The value returned by getHours() is an integer between 0 and 23. Its syntax is as follows − Date.getHours() Returns the hour in the specified date according to local time. Try the following example. <html> <head> ...
[ { "code": null, "e": 2629, "s": 2466, "text": "Javascript Date getHours() method returns the hour in the specified date according to local time. The value returned by getHours() is an integer between 0 and 23." }, { "code": null, "e": 2656, "s": 2629, "text": "Its syntax is as fo...
How to reset the primary key of a table in mysql?
The reset the primary key of a table means to reset the auto_increment property to 1. The syntax is as follows to reset the primary key of a table. alter table yourTableName auto_increment = 1; To understand, let us create a table − mysql> create table ResetPrimaryKey −> ( −> Id int auto_increment, −> PRIMARY KEY...
[ { "code": null, "e": 1210, "s": 1062, "text": "The reset the primary key of a table means to reset the auto_increment property to 1. The syntax is as follows to reset the primary key of a table." }, { "code": null, "e": 1256, "s": 1210, "text": "alter table yourTableName auto_inc...
AI with Python – Genetic Algorithms
This chapter discusses Genetic Algorithms of AI in detail. Genetic Algorithms (GAs) are search based algorithms based on the concepts of natural selection and genetics. GAs are a subset of a much larger branch of computation known as Evolutionary Computation. GAs were developed by John Holland and his students and coll...
[ { "code": null, "e": 2264, "s": 2205, "text": "This chapter discusses Genetic Algorithms of AI in detail." }, { "code": null, "e": 2465, "s": 2264, "text": "Genetic Algorithms (GAs) are search based algorithms based on the concepts of natural selection and genetics. GAs are a sub...
How to do groupby on a multiindex in Pandas?
Multiindex Data Frame is a data frame with more than one index. Let’s say the following is our csv stored on the Desktop − At first, import the pandas library and read the above CSV file − import pandas as pd df = pd.read_csv("C:/Users/amit_/Desktop/sales.csv") print(df) We will form the ‘Car‘ and ‘Place‘ columns of t...
[ { "code": null, "e": 1185, "s": 1062, "text": "Multiindex Data Frame is a data frame with more than one index. Let’s say the following is our csv stored on the Desktop −" }, { "code": null, "e": 1251, "s": 1185, "text": "At first, import the pandas library and read the above CSV ...
Java - Methods
A Java method is a collection of statements that are grouped together to perform an operation. When you call the System.out.println() method, for example, the system actually executes several statements in order to display a message on the console. Now you will learn how to create your own methods with or without retur...
[ { "code": null, "e": 2626, "s": 2377, "text": "A Java method is a collection of statements that are grouped together to perform an operation. When you call the System.out.println() method, for example, the system actually executes several statements in order to display a message on the console." }...
PHP | array_chunk() Function
09 Aug, 2019 The array_chunk() function is an inbuilt function in PHP which is used to split an array into parts or chunks of given size depending upon the parameters passed to the function. The last chunk may contain fewer elements than the desired size of the chunk. Syntax: array array_chunk( $array, $size, $preserve...
[ { "code": null, "e": 53, "s": 25, "text": "\n09 Aug, 2019" }, { "code": null, "e": 309, "s": 53, "text": "The array_chunk() function is an inbuilt function in PHP which is used to split an array into parts or chunks of given size depending upon the parameters passed to the functi...
Find the last two missing digits of the given phone number
08 Mar, 2022 Given eight digits of a phone number as an integer N, the task is to find the missing last two digits and print the complete number when the last two digits are the sum of given eight digits.Examples: Input: N = 98765432 Output: 9876543244Input: N = 10000000 Output: 1000000001 Approach: Get the eig...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Mar, 2022" }, { "code": null, "e": 231, "s": 28, "text": "Given eight digits of a phone number as an integer N, the task is to find the missing last two digits and print the complete number when the last two digits are the sum of giv...
Python – How to Iterate over nested dictionary ?
10 Oct, 2021 In this article, we will discuss how to iterate over a nested dictionary in Python. Nested dictionary means dictionary inside a dictionary and we are going to see every possible way of iterating over such a data structure. Nested dictionary in use: {‘Student 1’: {‘Name’: ‘Bobby’, ‘Id’: 1, ‘Age’: 20}, ‘St...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Oct, 2021" }, { "code": null, "e": 112, "s": 28, "text": "In this article, we will discuss how to iterate over a nested dictionary in Python." }, { "code": null, "e": 252, "s": 112, "text": "Nested dictionary mean...
Word Break Problem | DP-32 | Set – 2
22 Jun, 2022 Given a non-empty sequence S and a dictionary dict[] containing a list of non-empty words, print all possible ways to break the sentence in individual dictionary words.Examples: Input: S = “catsanddog” dict[] = {“cat”, “cats”, “and”, “sand”, “dog”} Output: “cats and dog” “cat sand dog”Input: S = “pineapp...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Jun, 2022" }, { "code": null, "e": 232, "s": 52, "text": "Given a non-empty sequence S and a dictionary dict[] containing a list of non-empty words, print all possible ways to break the sentence in individual dictionary words.Exampl...
Numpy MaskedArray.reshape() function | Python
03 Oct, 2019 numpy.MaskedArray.reshape() function is used to give a new shape to the masked array without changing its data.It returns a masked array containing the same data, but with a new shape. The result is a view on the original array; if this is not possible, a ValueError is raised. Syntax : numpy.ma.reshape(sha...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Oct, 2019" }, { "code": null, "e": 306, "s": 28, "text": "numpy.MaskedArray.reshape() function is used to give a new shape to the masked array without changing its data.It returns a masked array containing the same data, but with a n...
Intuit Interview Experience for Summer Internship Off-Campus (2 months)
01 Sep, 2021 There were 2 Rounds on CV selection, 1 Online Coding Round and 2 Technical Rounds, and 1 HR Round. Coding Round: Total 4 questions were asked (I was able to solve 3 of them completely including the hard one). One was easy, two were medium, and last was hard. Given a matrix of size N*N (empty) and k (number...
[ { "code": null, "e": 52, "s": 24, "text": "\n01 Sep, 2021" }, { "code": null, "e": 151, "s": 52, "text": "There were 2 Rounds on CV selection, 1 Online Coding Round and 2 Technical Rounds, and 1 HR Round." }, { "code": null, "e": 165, "s": 151, "text": "Coding...
How do you set, clear, and toggle a bit in C/C++?
You can set clear and toggle bits using bitwise operators in C, C++, Python, and all other programming languages that support these operations. You also need to use the bitshift operator to get the bit to the right place. To set a bit, we'll need to use the bitwise OR operator − #include<iostream> using namespace std; ...
[ { "code": null, "e": 1409, "s": 1187, "text": "You can set clear and toggle bits using bitwise operators in C, C++, Python, and all other programming languages that support these operations. You also need to use the bitshift operator to get the bit to the right place." }, { "code": null, ...
Python program to repeat M characters of a string N times
04 Jan, 2021 In this article, the task is to write a Python program to repeat M characters of string N times. Method 1: Define a function that will take a word, m, n values as arguments.If M is greater than the length of the word. Set m value equal to the length of the wordNow store the characters needed to be repeated...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Jan, 2021" }, { "code": null, "e": 125, "s": 28, "text": "In this article, the task is to write a Python program to repeat M characters of string N times." }, { "code": null, "e": 135, "s": 125, "text": "Method 1:...
Program to convert first character uppercase in a sentence
21 Apr, 2022 Write a Java program to convert the first character uppercase in a sentence and if apart from the first character if any other character is in Uppercase then convert into Lowercase? Examples: Input : gEEKs Output :Geeks Input :GFG Output :Gfg Input : GeeksforGeeks Output : Geeksforgeeks Method 1: C++ ...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Apr, 2022" }, { "code": null, "e": 234, "s": 52, "text": "Write a Java program to convert the first character uppercase in a sentence and if apart from the first character if any other character is in Uppercase then convert into Low...
Python PIL | GaussianBlur() method
14 Jul, 2019 PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageFilter module contains definitions for a pre-defined set of filters, which can be used with the Image.filter() method. PIL.ImageFilter.GaussianBlur() method create Gaussian blur filter. Syntax:...
[ { "code": null, "e": 53, "s": 25, "text": "\n14 Jul, 2019" }, { "code": null, "e": 286, "s": 53, "text": "PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageFilter module contains definitions for a pre-defined set of ...
Natural Language Programming
14 Nov, 2019 Having programmed for many years in many languages, I often find myself thinking in English pseudo-code, then I translate my thoughts into whatever artificial syntax I’m working with at the time. So one day I thought, “Why not simply code at a natural language level and skip the translation step?” My elder...
[ { "code": null, "e": 52, "s": 24, "text": "\n14 Nov, 2019" }, { "code": null, "e": 474, "s": 52, "text": "Having programmed for many years in many languages, I often find myself thinking in English pseudo-code, then I translate my thoughts into whatever artificial syntax I’m work...
How to deal with “could not find function” error in R?
The error “could not find function” occurs due to the following reasons − Function name is incorrect. Always remember that function names are case sensitive in R. Function name is incorrect. Always remember that function names are case sensitive in R. The package that contains the function was not installed. We have to...
[ { "code": null, "e": 1261, "s": 1187, "text": "The error “could not find function” occurs due to the following reasons −" }, { "code": null, "e": 1350, "s": 1261, "text": "Function name is incorrect. Always remember that function names are case sensitive in\nR." }, { "cod...
Object.assign() in JavaScript?
This method is used to copy one or more source objects to a target object. It invokes getters and setters since it uses both 'get' on the source and 'Set' on the target. It returns the target object which has properties and values copied from the target object. This method does not throw on null or undefined source val...
[ { "code": null, "e": 1512, "s": 1187, "text": "This method is used to copy one or more source objects to a target object. It invokes getters and setters since it uses both 'get' on the source and 'Set' on the target. It returns the target object which has properties and values copied from the target...
SQL | Distinct Clause
11 Sep, 2020 The distinct keyword is used in conjunction with select keyword. It is helpful when there is a need of avoiding duplicate values present in any specific columns/table. When we use distinct keyword only the unique values are fetched. Syntax : SELECT DISTINCT column1, column2 FROM table_name column1, co...
[ { "code": null, "e": 53, "s": 25, "text": "\n11 Sep, 2020" }, { "code": null, "e": 287, "s": 53, "text": "The distinct keyword is used in conjunction with select keyword. It is helpful when there is a need of avoiding duplicate values present in any specific columns/table. When w...
Lineplot using Seaborn in Python
21 Oct, 2021 Seaborn is an amazing visualization library for statistical graphics plotting in Python. It provides default styles and color palettes to make statistical plots more attractive. It is built on the top of the matplotlib library and is also closely integrated into the data structures from pandas. Visual repr...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Oct, 2021" }, { "code": null, "e": 324, "s": 28, "text": "Seaborn is an amazing visualization library for statistical graphics plotting in Python. It provides default styles and color palettes to make statistical plots more attractiv...
Linked List | Set 2 (Inserting a node)
24 Jun, 2022 We have introduced Linked Lists in the previous post. We also created a simple linked list with 3 nodes and discussed linked list traversal.All programs discussed in this post consider the following representations of linked list. C++ C Java Python3 C# Javascript // A linked list node class Node { pub...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 Jun, 2022" }, { "code": null, "e": 284, "s": 52, "text": "We have introduced Linked Lists in the previous post. We also created a simple linked list with 3 nodes and discussed linked list traversal.All programs discussed in this pos...
TCS Placement Paper | Email Writing Question 10
21 May, 2019 Pre-requisite: Procedure to E-mail WritingThis is a TCS model placement email-writing question. It covers the important directions along with a sample solution to the question. Directions: Use all the phrases given.Minimum words should be 70 otherwise your email cannot be validated.Addressing and signing s...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 May, 2019" }, { "code": null, "e": 229, "s": 52, "text": "Pre-requisite: Procedure to E-mail WritingThis is a TCS model placement email-writing question. It covers the important directions along with a sample solution to the questio...
Packet Capturing using JnetPcap in Java
27 Feb, 2019 What is JnetPcap? JnetPcap is an open-source Java library.It is java wrapper for all libpcap library native calls.It can be used to capture both live as well as offline data.Decoding packets is a special feature of Jnetpcap.For processing packets, you need pcap files which can be generated by using Wiresha...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Feb, 2019" }, { "code": null, "e": 70, "s": 52, "text": "What is JnetPcap?" }, { "code": null, "e": 363, "s": 70, "text": "JnetPcap is an open-source Java library.It is java wrapper for all libpcap library native...
list front() function in C++ STL
24 Jun, 2022 The list::front() is a built-in function in C++ STL which is used to return a reference to the first element in a list container. Unlike the list::begin() function, this function returns a direct reference to the first element in the list container. Syntax: list_name.front() Parameters: This function doe...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 Jun, 2022" }, { "code": null, "e": 311, "s": 52, "text": "The list::front() is a built-in function in C++ STL which is used to return a reference to the first element in a list container. Unlike the list::begin() function, this func...
Ford-Fulkerson Algorithm for Maximum Flow Problem
21 Jun, 2022 Given a graph which represents a flow network where every edge has a capacity. Also given two vertices source ‘s’ and sink ‘t’ in the graph, find the maximum possible flow from s to t with following constraints: Flow on an edge doesn’t exceed the given capacity of the edge. Incoming flow is equal to outgoi...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jun, 2022" }, { "code": null, "e": 264, "s": 52, "text": "Given a graph which represents a flow network where every edge has a capacity. Also given two vertices source ‘s’ and sink ‘t’ in the graph, find the maximum possible flow fr...
ImageButton in Kotlin
28 Mar, 2022 Android ImageButton is a user interface widget which is used to display a button having image and to perform exactly like button when we click on it but here, we add an image on Image button instead of text. There are different types of buttons available in android like ImageButton, ToggleButton etc. We ca...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Mar, 2022" }, { "code": null, "e": 330, "s": 28, "text": "Android ImageButton is a user interface widget which is used to display a button having image and to perform exactly like button when we click on it but here, we add an image ...
Python | Farthest point on horizontal lines in 2D plane
27 Aug, 2019 Sometimes, while in competitive programming, we might be facing a problem which is of geometry domain and works with x-y coordinate system. The list of tuple can be used to store the same. And along with this, there might be a problem in which we need point with max value of x axis with similar y axis i.e ...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Aug, 2019" }, { "code": null, "e": 423, "s": 28, "text": "Sometimes, while in competitive programming, we might be facing a problem which is of geometry domain and works with x-y coordinate system. The list of tuple can be used to st...
Draw smiling face emoji using Turtle in Python
07 Oct, 2020 Turtle is an inbuilt module in Python. It provides drawing using a screen (cardboard) and turtle (pen). To draw something on the screen, we need to move the turtle. To move turtle, there are some functions i.e forward(), backward(), etc. In this article, we will see how to draw a smiling face emoji using t...
[ { "code": null, "e": 54, "s": 26, "text": "\n07 Oct, 2020" }, { "code": null, "e": 292, "s": 54, "text": "Turtle is an inbuilt module in Python. It provides drawing using a screen (cardboard) and turtle (pen). To draw something on the screen, we need to move the turtle. To move t...
Weiler Atherton – Polygon Clipping Algorithm
26 Aug, 2019 Weiler Atherton Polygon Clipping Algorithm is an algorithm made to allow clipping of even concave algorithms to be possible. Unlike Sutherland – Hodgman polygon clipping algorithm, this algorithm is able to clip concave polygons without leaving any residue behind. 1. First make a list of all intersection ...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Aug, 2019" }, { "code": null, "e": 293, "s": 28, "text": "Weiler Atherton Polygon Clipping Algorithm is an algorithm made to allow clipping of even concave algorithms to be possible. Unlike Sutherland – Hodgman polygon clipping algor...
Python program to print Emojis
11 Feb, 2022 There are multiple ways we can print the Emojis in Python. Let’s see how to print Emojis with Unicodes, CLDR names and emoji module. Using Unicodes: Every emoji has a Unicode associated with it. Emojis also have a CLDR short name, which can also be used. From the list of unicodes, replace “+” with “000”. F...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 Feb, 2022" }, { "code": null, "e": 453, "s": 52, "text": "There are multiple ways we can print the Emojis in Python. Let’s see how to print Emojis with Unicodes, CLDR names and emoji module. Using Unicodes: Every emoji has a Unicode...
Why “0” is not equal to false in if condition in JavaScript ?
28 Jun, 2019 The reason behind this behavior is that JavaScript treats non-empty string as true. First, “0” is converted into its boolean value, by automatic type conversion which is true. Therefore, if statement executes. Example: This example illustrates why “0” is not equal to false in if() condition. <script> ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jun, 2019" }, { "code": null, "e": 238, "s": 28, "text": "The reason behind this behavior is that JavaScript treats non-empty string as true. First, “0” is converted into its boolean value, by automatic type conversion which is true....
How to check whether a number is in the range[low, high] using one comparison ?
22 Jun, 2022 This is simple, but interesting programming puzzle. Given three integers, low, high and x such that high >= low. How to check if x lies in range [low, high] or not using single comparison. For example, if range is [10, 100] and number is 30, then output is true and if the number is 5, then output is false ...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Jun, 2022" }, { "code": null, "e": 425, "s": 52, "text": "This is simple, but interesting programming puzzle. Given three integers, low, high and x such that high >= low. How to check if x lies in range [low, high] or not using sing...
Doing XGBoost hyper-parameter tuning the smart way — Part 1 of 2 | by Mateo Restrepo | Towards Data Science
In this post and the next, we will look at one of the trickiest and most critical problems in Machine Learning (ML): Hyper-parameter tuning. After reviewing what hyper-parameters, or hyper-params for short, are and how they differ from plain vanilla learnable parameters, we introduce three general purpose discrete opti...
[ { "code": null, "e": 939, "s": 172, "text": "In this post and the next, we will look at one of the trickiest and most critical problems in Machine Learning (ML): Hyper-parameter tuning. After reviewing what hyper-parameters, or hyper-params for short, are and how they differ from plain vanilla learn...
How to remove the digits after the decimal point in axis ticks in Matplotlib?
To remove the digits after the decimal point in axis ticks 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 x and y data points using numpy. Create x and y data ...
[ { "code": null, "e": 1170, "s": 1062, "text": "To remove the digits after the decimal point in axis ticks in Matplotlib, we can take the following steps −" }, { "code": null, "e": 1246, "s": 1170, "text": "Set the figure size and adjust the padding between and around the subplots...
Batch Script - String Concatenation
You can use the set operator to concatenate two strings or a string and a character, or two characters. Following is a simple example which shows how to use string concatenation. @echo off SET a = Hello SET b = World SET c=%a% and %b% echo %c% The above command produces the following output. Hello and World Print...
[ { "code": null, "e": 2348, "s": 2169, "text": "You can use the set operator to concatenate two strings or a string and a character, or two characters. Following is a simple example which shows how to use string concatenation." }, { "code": null, "e": 2417, "s": 2348, "text": "@ec...
C++ Program To Merge K Sorted Linked Lists - Set 1 - GeeksforGeeks
03 Jan, 2022 Given K sorted linked lists of size N each, merge them and print the sorted output. Examples: Input: k = 3, n = 4 list1 = 1->3->5->7->NULL list2 = 2->4->6->8->NULL list3 = 0->9->10->11->NULL Output: 0->1->2->3->4->5->6->7->8->9->10->11 Merged lists in a sorted order where every element is greater than...
[ { "code": null, "e": 24606, "s": 24578, "text": "\n03 Jan, 2022" }, { "code": null, "e": 24690, "s": 24606, "text": "Given K sorted linked lists of size N each, merge them and print the sorted output." }, { "code": null, "e": 24701, "s": 24690, "text": "Exampl...
C# | How to remove the element from the specified index of the List - GeeksforGeeks
01 Feb, 2019 List<T>.RemoveAt (Int32) Method is used to remove the element at the specified index of the List<T>. Properties of List: It is different from the arrays. A list can be resized dynamically but arrays cannot. List class can accept null as a valid value for reference types and it also allows duplicate element...
[ { "code": null, "e": 24379, "s": 24351, "text": "\n01 Feb, 2019" }, { "code": null, "e": 24480, "s": 24379, "text": "List<T>.RemoveAt (Int32) Method is used to remove the element at the specified index of the List<T>." }, { "code": null, "e": 24500, "s": 24480, ...
Cyberpunk Style with Matplotlib. Futuristic neon glow for your next data... | by Dominik Haitz | Towards Data Science
Futuristic neon glow for your next data visualization. Update 2020–03–29: There’s now a Python package to conveniently apply this style, see here. Install viapip install mplcyberpunk Let’s make up some numbers, put them in a Pandas dataframe and plot them: import pandas as pdimport matplotlib.pyplot as pltdf = pd.DataF...
[ { "code": null, "e": 227, "s": 172, "text": "Futuristic neon glow for your next data visualization." }, { "code": null, "e": 355, "s": 227, "text": "Update 2020–03–29: There’s now a Python package to conveniently apply this style, see here. Install viapip install mplcyberpunk" ...
Find the sum of medians of all odd length subarrays - GeeksforGeeks
14 Jan, 2022 Given an array arr[] of size N, the task is to find the sum of medians of all sub-array of odd-length. Examples: Input: arr[] = {4, 2, 5, 1}Output: 18Explanation : Sub-Arrays of odd length and their medians are : [4] -> Median is 4 [4, 2, 5] -> Median is 4 [2] -> Median is 2 [2, 5, 1] -> Median is 2 [5...
[ { "code": null, "e": 24553, "s": 24525, "text": "\n14 Jan, 2022" }, { "code": null, "e": 24656, "s": 24553, "text": "Given an array arr[] of size N, the task is to find the sum of medians of all sub-array of odd-length." }, { "code": null, "e": 24666, "s": 24656, ...
Image Manipulation Using Quadtrees
09 Feb, 2018 Quadtrees are an effective method to store and locate data of points in a two-dimensional plane. Another effective use of quadtrees is in the field of image manipulation. Unlike in storage of points, in image manipulation we get a complete quadtree with the leaf nodes consisting of individual pixels of the...
[ { "code": null, "e": 52, "s": 24, "text": "\n09 Feb, 2018" }, { "code": null, "e": 223, "s": 52, "text": "Quadtrees are an effective method to store and locate data of points in a two-dimensional plane. Another effective use of quadtrees is in the field of image manipulation." ...
CSS | fill-opacity Property
28 Nov, 2019 The fill-opacity property is used to set the opacity of the paint server that is applied to the shape. Syntax: fill-opacity: [0-1] | <percentage> Property Values: Value between 0 and 1: It is used to set the opacity of the fill-in decimal values. The value 0 means that the fill is completely transparent an...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Nov, 2019" }, { "code": null, "e": 131, "s": 28, "text": "The fill-opacity property is used to set the opacity of the paint server that is applied to the shape." }, { "code": null, "e": 139, "s": 131, "text": "Syn...
Set Axis Limits of Plot in R
23 Aug, 2021 In this article, we will be looking at the approach to set the axis limits of the plot in R programming language. Axis limit of the plot basically refers to the scaling of the x-axis and the y-axis of the given plot. In this approach to set the axis limits of the given plot, the user here just simply use ...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Aug, 2021" }, { "code": null, "e": 143, "s": 28, "text": "In this article, we will be looking at the approach to set the axis limits of the plot in R programming language. " }, { "code": null, "e": 246, "s": 143, ...
How to use Grid Component in ReactJS?
18 Jan, 2021 The Material Design responsive layout grid adapts to screen size and orientation, ensuring consistency across layouts. Material UI for React has this component available for us and it is very easy to integrate. We can the Grid component in ReactJS using the following approach. Creating React Application An...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Jan, 2021" }, { "code": null, "e": 306, "s": 28, "text": "The Material Design responsive layout grid adapts to screen size and orientation, ensuring consistency across layouts. Material UI for React has this component available for u...
Python | Decimal normalize() method
17 Sep, 2019 Decimal#normalize() : normalize() is a Decimal class method which returns the simplest form of the Decimal value. Syntax: Decimal.normalize() Parameter: Decimal values Return: the simplest form of the Decimal value. Code #1 : Example for normalize() method # Python Program explaining # normalize() m...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Sep, 2019" }, { "code": null, "e": 142, "s": 28, "text": "Decimal#normalize() : normalize() is a Decimal class method which returns the simplest form of the Decimal value." }, { "code": null, "e": 251, "s": 142, "...
GATE | GATE CS 2013 | Question 17
28 Jun, 2021 Which of the following statements is/are FALSE? 1. For every non-deterministic Turing machine, there exists an equivalent deterministic Turing machine. 2. Turing recognizable languages are closed under union and complementation. 3. Turing decidable languages are closed under intersection and co...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jun, 2021" }, { "code": null, "e": 76, "s": 28, "text": "Which of the following statements is/are FALSE?" }, { "code": null, "e": 429, "s": 76, "text": "1. For every non-deterministic Turing machine, \n there ex...
StringBuilder length() in Java with Examples
15 Oct, 2018 The length() method of StringBuilder class returns the number of character the StringBuilder object contains. The length of the sequence of characters currently represented by this StringBuilder object is returned by this method. Syntax: public int length() Return Value: This method returns length of seque...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Oct, 2018" }, { "code": null, "e": 258, "s": 28, "text": "The length() method of StringBuilder class returns the number of character the StringBuilder object contains. The length of the sequence of characters currently represented by...
Size of the smallest subset with maximum Bitwise OR
28 Jun, 2022 Given an array of positive integers. The task is to find the size of the smallest subset such that the Bitwise OR of that set is Maximum possible. Examples: Input : arr[] = {5, 1, 3, 4, 2} Output : 2 7 is the maximum value possible of OR, 5|2 = 7 and 5|3 = 7 Input : arr[] = {2, 6, 2, 8, 4, 5} Output : ...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 Jun, 2022" }, { "code": null, "e": 202, "s": 54, "text": "Given an array of positive integers. The task is to find the size of the smallest subset such that the Bitwise OR of that set is Maximum possible. " }, { "code": null...
Python | Pandas Index.value_counts()
23 Nov, 2021 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.Pandas Index.value_counts() function returns object containing counts of unique values. The re...
[ { "code": null, "e": 53, "s": 25, "text": "\n23 Nov, 2021" }, { "code": null, "e": 503, "s": 53, "text": "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 im...
Java String concat() with examples
27 Oct, 2021 The Java String concat() method concatenates one string to the end of another string. This method returns a string with the value of the string passed into the method, appended to the end of the string. Consider the below illustration: Illustration: Input: String 1 : abc String 2 : def ...
[ { "code": null, "e": 53, "s": 25, "text": "\n27 Oct, 2021" }, { "code": null, "e": 289, "s": 53, "text": "The Java String concat() method concatenates one string to the end of another string. This method returns a string with the value of the string passed into the method, append...
TCL script to find sum of n natural numbers using looping statements
26 Apr, 2021 In this article, we will discuss the overview of TCL script and will cover the TCL script to find the sum of n natural numbers using looping statements with the help of an example. Let’s discuss it one by one. Pre-requisite –You can go through this article to understand a few basics through this link. http...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Apr, 2021" }, { "code": null, "e": 238, "s": 28, "text": "In this article, we will discuss the overview of TCL script and will cover the TCL script to find the sum of n natural numbers using looping statements with the help of an exa...
Barplot using seaborn in Python
10 Jun, 2021 Seaborn is an amazing visualization library for statistical graphics plotting in Python. It provides beautiful default styles and color palettes to make statistical plots more attractive. It is built on the top of matplotlib library and also closely integrated to the data structures from pandas. seaborn.b...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Jun, 2021" }, { "code": null, "e": 350, "s": 52, "text": "Seaborn is an amazing visualization library for statistical graphics plotting in Python. It provides beautiful default styles and color palettes to make statistical plots mor...
PostgreSQL – Upsert
01 Feb, 2021 The UPSERT statement is a DBMS feature that allows a DML statement’s author to either insert a row or if the row already exists, UPDATE that existing row instead. That is why the action is known as UPSERT (simply a mix of Update and Insert).To achieve the functionality of UPSERT, PostgreSQL uses the INSERT...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Feb, 2021" }, { "code": null, "e": 359, "s": 28, "text": "The UPSERT statement is a DBMS feature that allows a DML statement’s author to either insert a row or if the row already exists, UPDATE that existing row instead. That is why ...
How to Install cx_oracle in Python on Windows?
22 Sep, 2021 The cx_oracle package is used to connect with the Oracle database using python. In this, article, we will look into the process of installing the cx_oracle package on Windows. The only thing that you need for installing the Scrapy module on Windows are: Python PIP or Conda (depending upon user preference)...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Sep, 2021" }, { "code": null, "e": 204, "s": 28, "text": "The cx_oracle package is used to connect with the Oracle database using python. In this, article, we will look into the process of installing the cx_oracle package on Windows....
EOF, getc() and feof() in C
28 May, 2017 In C/C++, getc() returns EOF when end of file is reached. getc() also returns EOF when it fails. So, only comparing the value returned by getc() with EOF is not sufficient to check for actual end of file. To solve this problem, C provides feof() which returns non-zero value only if end of file has reached,...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 May, 2017" }, { "code": null, "e": 798, "s": 52, "text": "In C/C++, getc() returns EOF when end of file is reached. getc() also returns EOF when it fails. So, only comparing the value returned by getc() with EOF is not sufficient to...
Reading QR codes using Node.js
12 Feb, 2021 When we are working with Node.js to build any application, we might want our apps to interact with external apps or payment gateways that provide QR codes to communicate the information. In this article, we will see how we can decode a QR code in our node.js applications. Let’s set up our workspace by exe...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Feb, 2021" }, { "code": null, "e": 302, "s": 28, "text": "When we are working with Node.js to build any application, we might want our apps to interact with external apps or payment gateways that provide QR codes to communicate the i...
How to use Facebook Graph API and extract data using Python! | by Ravi Ranjan | Towards Data Science
Hi all, This is my second story on Medium.com. I have moved on from struggling to code to being a bit comfortable since the first story. I wrote a Python code to extract publicly available data on Facebook. Let’s dive into it. Getting the Access Token: To be able to extract data from Facebook using a python code you ne...
[ { "code": null, "e": 179, "s": 171, "text": "Hi all," }, { "code": null, "e": 398, "s": 179, "text": "This is my second story on Medium.com. I have moved on from struggling to code to being a bit comfortable since the first story. I wrote a Python code to extract publicly availab...
How to Set Up a PostgreSQL Database on Amazon RDS | by Elizabeth Ter Sahakyan | Towards Data Science
PostgreSQL is an open source object-relational database system that uses the SQL language for interactions and maintenance. It has been proven to be a highly scalable database solution because it allows you to manage terabytes of data and can handle many concurrent users. PostgreSQL is also ACID-compliant to ensure val...
[ { "code": null, "e": 522, "s": 172, "text": "PostgreSQL is an open source object-relational database system that uses the SQL language for interactions and maintenance. It has been proven to be a highly scalable database solution because it allows you to manage terabytes of data and can handle many ...
How to build an MLOps pipeline for hyperparameter tuning in Vertex AI | by Lak Lakshmanan | Towards Data Science
When you design a machine learning model, there are a number of hyperparameters — learning rate, batch size, number of layers/nodes in the neural network, number of buckets, number of embedding dimensions, etc. that you essentially guess. There is usually a 2-10% improvement to be had over the initial guess by finding ...
[ { "code": null, "e": 646, "s": 172, "text": "When you design a machine learning model, there are a number of hyperparameters — learning rate, batch size, number of layers/nodes in the neural network, number of buckets, number of embedding dimensions, etc. that you essentially guess. There is usually...
Analyzing E-Scooter Activity through Visualization and Machine learning in Python | by Himanshu Agarwal | Towards Data Science
According to the recently published 2019 TomTom Traffic Index report, traffic congestion increased in 239 out of 416 cities (57%) worldwide. In the US alone, the traffic congestion level was at +20% among the major cities. Meaning, a trip will take 20% more time than it would during the city’s baseline uncongested cond...
[ { "code": null, "e": 651, "s": 172, "text": "According to the recently published 2019 TomTom Traffic Index report, traffic congestion increased in 239 out of 416 cities (57%) worldwide. In the US alone, the traffic congestion level was at +20% among the major cities. Meaning, a trip will take 20% mo...
TextDecoder and TextEncoder in Javascript?
TextEncoder is used to convert a given string to utf-8 standard. It retunes an Uint8Array from the string. TextDecoder is used to covert a stream of bytes into a stream of code points. It can decode UTF-8 , ISO-8859-2, KOI8-R, GBK etc. Following is the code for TextDecoder and TextEncoder in JavaScript − Live Demo <!D...
[ { "code": null, "e": 1169, "s": 1062, "text": "TextEncoder is used to convert a given string to utf-8 standard. It retunes an Uint8Array from the string." }, { "code": null, "e": 1298, "s": 1169, "text": "TextDecoder is used to covert a stream of bytes into a stream of code point...
How to convert left linear grammar to right linear grammar?
Regular grammar describes a regular language. It consists of four components, which are as follows − G = (N, E, P, S) Where, N: finite set of non-terminal symbols, N: finite set of non-terminal symbols, E: a finite set of terminal symbols, E: a finite set of terminal symbols, P: a set of production rules, each of one i...
[ { "code": null, "e": 1163, "s": 1062, "text": "Regular grammar describes a regular language. It consists of four components, which are as follows −" }, { "code": null, "e": 1180, "s": 1163, "text": "G = (N, E, P, S)" }, { "code": null, "e": 1187, "s": 1180, "t...
ES6 - Maps and Sets
ES6 introduces two new data structures − maps and sets. Let us learn about them in detail. A map is an ordered collection of key-value pairs. Maps are similar to objects. However, there are some differences between maps and objects. These are listed below − The syntax for Map is given below − let map = new Map([iterabl...
[ { "code": null, "e": 2368, "s": 2277, "text": "ES6 introduces two new data structures − maps and sets. Let us learn about them in detail." }, { "code": null, "e": 2535, "s": 2368, "text": "A map is an ordered collection of key-value pairs. Maps are similar to objects. However, th...
Count occurences of a given word in a 2-d array | Practice | GeeksforGeeks
Find the number of occurrences of a given search word in a 2d-Array of characters where the word can go up, down, left, right and around 90 degree bends. Example 1: Input: R = 4, C = 5 mat = {{S,N,B,S,N}, {B,A,K,E,A}, {B,K,B,B,K}, {S,E,B,S,E}} target = SNAKES Output: 3 Explanation: S N B S N B ...
[ { "code": null, "e": 381, "s": 226, "text": "Find the number of occurrences of a given search word in a 2d-Array of characters where the word can go up, down, left, right and around 90 degree bends." }, { "code": null, "e": 393, "s": 381, "text": "\nExample 1:" }, { "cod...
Program to print the pattern "GFG" - GeeksforGeeks
13 Oct, 2021 In this article, given the value of n(length of the alphabet) and k(width of the alphabet) we will learn how to print the pattern “GFG” using stars and white-spaces. Examples: INPUT: n=7, k=5 OUTPUT: ***** ***** ***** * * * * * * * ** ***** * *** * * * * * * * * * * *****...
[ { "code": null, "e": 24206, "s": 24178, "text": "\n13 Oct, 2021" }, { "code": null, "e": 24384, "s": 24206, "text": "In this article, given the value of n(length of the alphabet) and k(width of the alphabet) we will learn how to print the pattern “GFG” using stars and white-space...
Replace 0 with NA in R DataFrame - GeeksforGeeks
31 Aug, 2021 In this article, we are going to discuss how to replace 0 with NA values in dataframe in R Programming Language. NA stands for Null values which can represent Null data / Null elements in a dataframe. The task can be achieved by first defining a dataframe that contains 0 as values. Then we can replace 0 wi...
[ { "code": null, "e": 26597, "s": 26569, "text": "\n31 Aug, 2021" }, { "code": null, "e": 26710, "s": 26597, "text": "In this article, we are going to discuss how to replace 0 with NA values in dataframe in R Programming Language." }, { "code": null, "e": 26938, "s...
Seven Clean Steps To Reshape Your Data With Pandas Or How I Use Python Where Excel Fails | by Tich Mangono | Towards Data Science
A few weeks ago, a colleague sent me a spreadsheet with data on a public health intervention, consisting of many tabs, one tab per organization. The task was to develop a flexible dashboard to explore this data. The problem was that the data was in wide format, but we needed a long format. Before, this would have been ...
[ { "code": null, "e": 670, "s": 47, "text": "A few weeks ago, a colleague sent me a spreadsheet with data on a public health intervention, consisting of many tabs, one tab per organization. The task was to develop a flexible dashboard to explore this data. The problem was that the data was in wide fo...
Bootstrap 5 Alerts - GeeksforGeeks
05 May, 2022 Bootstrap 5 is the latest major release of Bootstrap where the UI has been revamped and various changes have been made. Alerts provide contextual feedback messages for typical user actions with a handful of available and flexible alert messages. Bootstrap allows showing these alert messages on the website ...
[ { "code": null, "e": 28538, "s": 28510, "text": "\n05 May, 2022" }, { "code": null, "e": 28934, "s": 28538, "text": "Bootstrap 5 is the latest major release of Bootstrap where the UI has been revamped and various changes have been made. Alerts provide contextual feedback messages...
Neural Network Calibration with Keras | by Marco Cerliani | Towards Data Science
The concept of probability is very common in the machine learning field. In classification tasks, probabilities are the output scores of almost every predictive model together with the relative labels. Show them together is more informative than providing only a raw classification report. In this way, we use probabilit...
[ { "code": null, "e": 628, "s": 172, "text": "The concept of probability is very common in the machine learning field. In classification tasks, probabilities are the output scores of almost every predictive model together with the relative labels. Show them together is more informative than providing...
Classifying data using Support Vector Machines(SVMs) in R - GeeksforGeeks
26 Oct, 2021 In machine learning, Support vector machines (SVM) are supervised learning models with associated learning algorithms that analyze data used for classification and regression analysis. It is mostly used in classification problems. In this algorithm, each data item is plotted as a point in n-dimensional spa...
[ { "code": null, "e": 24228, "s": 24200, "text": "\n26 Oct, 2021" }, { "code": null, "e": 24929, "s": 24228, "text": "In machine learning, Support vector machines (SVM) are supervised learning models with associated learning algorithms that analyze data used for classification and...
newScheduledThreadPool Method
A scheduled thread pool can be obtainted by calling the static newScheduledThreadPool() method of Executors class. ExecutorService executor = Executors.newScheduledThreadPool(1); The following TestThread program shows usage of newScheduledThreadPool method in thread based environment. import java.util.concurrent.Execu...
[ { "code": null, "e": 2772, "s": 2657, "text": "A scheduled thread pool can be obtainted by calling the static newScheduledThreadPool() method of Executors class." }, { "code": null, "e": 2837, "s": 2772, "text": "ExecutorService executor = Executors.newScheduledThreadPool(1);\n" ...
Transforming Data in Python with Pandas Melt | by Jake Huneycutt | Towards Data Science
The World Bank hosts one of the richest sources of data on the Interwebs. This data has many practical applications such as forecasting economic growth or predicting poverty with machine learning. I recently used this data to create a few Tableau visualizations on Sub-Saharan African GDP per capita growth (annualized g...
[ { "code": null, "e": 394, "s": 47, "text": "The World Bank hosts one of the richest sources of data on the Interwebs. This data has many practical applications such as forecasting economic growth or predicting poverty with machine learning. I recently used this data to create a few Tableau visualiza...
Three ways to use custom validation metrics in tf.keras / TF2 | by Christian Freischlag | Towards Data Science
Keras offers a bunch of metrics to validate the test data set like accuracy, MSE or AUC. However, sometimes you need a custom metric to validate your model. In this post, I will show three different approaches to implement your metrics and use it within Keras. While in the beginning there were only a few metrics includ...
[ { "code": null, "e": 308, "s": 47, "text": "Keras offers a bunch of metrics to validate the test data set like accuracy, MSE or AUC. However, sometimes you need a custom metric to validate your model. In this post, I will show three different approaches to implement your metrics and use it within Ke...
Complex Numbers in Python | Set 1 (Introduction) - GeeksforGeeks
04 Feb, 2020 Not only real numbers, Python can also handle complex numbers and its associated functions using the file “cmath”. Complex numbers have their uses in many applications related to mathematics and python provides useful tools to handle and manipulate them. Converting real numbers to complex number An complex...
[ { "code": null, "e": 25176, "s": 25148, "text": "\n04 Feb, 2020" }, { "code": null, "e": 25431, "s": 25176, "text": "Not only real numbers, Python can also handle complex numbers and its associated functions using the file “cmath”. Complex numbers have their uses in many applicat...
Projection Operations in LINQ
Projection is an operation in which an object is transformed into an altogether new form with only specific properties. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Operators { class Program { static void Main(string[] args) { List<string> wor...
[ { "code": null, "e": 1856, "s": 1736, "text": "Projection is an operation in which an object is transformed into an altogether new form with only specific properties." }, { "code": null, "e": 2300, "s": 1856, "text": "using System;\nusing System.Collections.Generic;\nusing System...
What is PyTorch?. Think about Numpy, but with strong GPU... | by Khuyen Tran | Towards Data Science
PyTorch is a library for Python programs that facilitates building deep learning projects. We like Python because is easy to read and understand. PyTorch emphasizes flexibility and allows deep learning models to be expressed in idiomatic Python. In a simple sentence, think about Numpy, but with strong GPU acceleration....
[ { "code": null, "e": 417, "s": 171, "text": "PyTorch is a library for Python programs that facilitates building deep learning projects. We like Python because is easy to read and understand. PyTorch emphasizes flexibility and allows deep learning models to be expressed in idiomatic Python." }, {...
What is a static constructor in C#?
A static constructor is a constructor declared using a static modifier. It is the first block of code executed in a class. With that, a static constructor executes only once in the life cycle of class. The following is an example of static constructors in C# − using System; using System.Collections.Generic; using Syste...
[ { "code": null, "e": 1264, "s": 1062, "text": "A static constructor is a constructor declared using a static modifier. It is the first block of code executed in a class. With that, a static constructor executes only once in the life cycle of class." }, { "code": null, "e": 1323, "s":...
SQLite - Commands
This chapter will take you through simple and useful commands used by SQLite programmers. These commands are called SQLite dot commands and exception with these commands is that they should not be terminated by a semi-colon (;). Let's start with typing a simple sqlite3 command at command prompt which will provide you w...
[ { "code": null, "e": 2867, "s": 2638, "text": "This chapter will take you through simple and useful commands used by SQLite programmers. These commands are called SQLite dot commands and exception with these commands is that they should not be terminated by a semi-colon (;)." }, { "code": nu...
Ethereum - Solidity for Contract Writing
Solidity is an object-oriented language especially developed for contract writing. It is a high-level language, which inherits traits from C++, Python, and JavaScript. The Solidity compiler compiles your source code into bytecode that runs on Ethereum Virtual Machine (EVM). For quick understanding of the Solidity synta...
[ { "code": null, "e": 2438, "s": 2163, "text": "Solidity is an object-oriented language especially developed for contract writing. It is a high-level language, which inherits traits from C++, Python, and JavaScript. The Solidity compiler compiles your source code into bytecode that runs on Ethereum V...
Difference between concat() and + operator in Java - GeeksforGeeks
07 Jan, 2022 Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character ‘\0’. Since arrays are immutable(cannot grow), Strings are immutable as well. Whenever a change to a String is made, an entirely new String is created. C...
[ { "code": null, "e": 26502, "s": 26474, "text": "\n07 Jan, 2022" }, { "code": null, "e": 26860, "s": 26502, "text": "Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character ‘\\0’. Si...
Learning Rust by Converting Python to Rust | by Shinichi Okada | Towards Data Science
[Updated on 2021–02–18. Codes changed to Gist and added links] Table of ContentsIntroduction🦀 Leetcode Unique Paths🦀 Python Code🦀 First Step in Rust🦀 Examples of Primitive Data Types:🦀 Functions🦀 Statements and Expressions🦀 Variables🦀 Macros🦀 if-else Statement (Step 2)🦀 Calling a Function🦀 Range🦀 Arrays, Tu...
[ { "code": null, "e": 110, "s": 47, "text": "[Updated on 2021–02–18. Codes changed to Gist and added links]" }, { "code": null, "e": 455, "s": 110, "text": "Table of ContentsIntroduction🦀 Leetcode Unique Paths🦀 Python Code🦀 First Step in Rust🦀 Examples of Primitive Data Types:...
Java Exceptions (Try...Catch)
When executing Java code, different errors can occur: coding errors made by the programmer, errors due to wrong input, or other unforeseeable things. When an error occurs, Java will normally stop and generate an error message. The technical term for this is: Java will throw an exception (throw an error). The try state...
[ { "code": null, "e": 151, "s": 0, "text": "When executing Java code, different errors can occur: coding errors made by the programmer, errors due to wrong input, \nor other unforeseeable things." }, { "code": null, "e": 307, "s": 151, "text": "When an error occurs, Java will norm...
Build, Test and Deploy a Flask REST API Application from GitHub using Jenkins Pipeline Running on Docker
22 Sep, 2021 Nowadays even for small web applications or microservices, we need an easier and faster way to deploy applications that is reliable and safe. These applications may be simple but they undergo rapid changes from the business requirement, to handle these changes we definitely need a CI/CD pipeline for deploy...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Sep, 2021" }, { "code": null, "e": 341, "s": 28, "text": "Nowadays even for small web applications or microservices, we need an easier and faster way to deploy applications that is reliable and safe. These applications may be simple ...
SQL Query to Find the Number of Columns in a Table
09 Aug, 2021 SQL stands for a structure query language, which is used in the database to retrieve data, update and modify data in relational databases like MySql, Oracle, etc. And a query is a question or request for data from the database, that is if we ask someone any question then the question is the query. Similarl...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Aug, 2021" }, { "code": null, "e": 522, "s": 28, "text": "SQL stands for a structure query language, which is used in the database to retrieve data, update and modify data in relational databases like MySql, Oracle, etc. And a query ...
HTML <select> Tag
13 Dec, 2021 The <select> tag in HTML is used to create a drop-down list. The <select> tag contains <option> tag to display the available option of drop-down list. Note: The <select> tag is used in a form to receive user responses. Syntax: <select> <option> </option> ... </select> Attributes: The attributes...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Dec, 2021" }, { "code": null, "e": 179, "s": 28, "text": "The <select> tag in HTML is used to create a drop-down list. The <select> tag contains <option> tag to display the available option of drop-down list." }, { "code": nu...
How to use SnackBar Component in ReactJS ?
11 Jan, 2022 Snackbars provide brief messages about app processes. Material UI for React has this component available for us, and it is very easy to integrate. We can use SnackBar Component in ReactJS using the following approach. Creating React Application And Installing Module: Step 1: Create a React application usin...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Jan, 2022" }, { "code": null, "e": 246, "s": 28, "text": "Snackbars provide brief messages about app processes. Material UI for React has this component available for us, and it is very easy to integrate. We can use SnackBar Componen...
HTML | <video> poster Attribute
16 Jun, 2022 The HTML <video> poster Attribute is used to display the image while video downloading or when user click the play button. If this image not set then it will take the first frame of video as a poster image. Syntax: <video poster="URL"> Attribute Values: It contains a single value URL which specifies the l...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Jun, 2022" }, { "code": null, "e": 236, "s": 28, "text": "The HTML <video> poster Attribute is used to display the image while video downloading or when user click the play button. If this image not set then it will take the first fr...
turtle.hideturtle() function in Python
17 Jul, 2020 The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. This method is used to make the turtle invisible. It’s a good idea to do this while you’re...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Jul, 2020" }, { "code": null, "e": 245, "s": 28, "text": "The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a ver...
Python – tensorflow.concat()
26 Jun, 2020 TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks. concat() is used to concatenate tensors along one dimension. Syntax: tensorflow.concat( values, axis, name ) Parameter: values: It is a tensor or list of tensor. axis: It is 0-...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Jun, 2020" }, { "code": null, "e": 159, "s": 28, "text": "TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks." }, { "code": null, "e": 220, ...
TypeScript | String concat() Method
18 Jun, 2020 The concat() is an inbuilt function in TypeScript which is used to add two or more strings and returns a new single string. Syntax: string.concat(string2, string3[, ..., stringN]); Parameter: This method accept a single parameter as mentioned above and described below. string2...stringN: This parameter h...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Jun, 2020" }, { "code": null, "e": 153, "s": 28, "text": "The concat() is an inbuilt function in TypeScript which is used to add two or more strings and returns a new single string. " }, { "code": null, "e": 161, "s":...
How to Rotate X-Axis Tick Label Text in Matplotlib?
24 Jan, 2021 Matplotlib is an amazing and one of the most widely used data visualization library in Python for plots of arrays. It is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. It is much popular because of its customization options as we can twe...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Jan, 2021" }, { "code": null, "e": 387, "s": 28, "text": "Matplotlib is an amazing and one of the most widely used data visualization library in Python for plots of arrays. It is a multi-platform data visualization library built on N...
Sorting Strings using Bubble Sort
21 Jan, 2022 Given an array of strings arr[]. Sort given strings using Bubble Sort and display the sorted array. In Bubble Sort, the two successive strings arr[i] and arr[i+1] are exchanged whenever arr[i]> arr[i+1]. The larger values sink to the bottom and hence called sinking sort. At the end of each pass, smaller va...
[ { "code": null, "e": 54, "s": 26, "text": "\n21 Jan, 2022" }, { "code": null, "e": 154, "s": 54, "text": "Given an array of strings arr[]. Sort given strings using Bubble Sort and display the sorted array." }, { "code": null, "e": 443, "s": 154, "text": "In Bu...
Swap all odd and even bits
14 Feb, 2022 Given an unsigned integer, swap all odd bits with even bits. For example, if the given number is 23 (00010111), it should be converted to 43 (00101011). Every even position bit is swapped with adjacent bit on right side (even position bits are highlighted in binary representation of 23), and every odd posi...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 Feb, 2022" }, { "code": null, "e": 410, "s": 54, "text": "Given an unsigned integer, swap all odd bits with even bits. For example, if the given number is 23 (00010111), it should be converted to 43 (00101011). Every even position b...
How to select all records that are 10 minutes within current timestamp in MySQL?
You can select all records that are 10 minutes within current timestamp using the following syntax− SELECT *FROM yourTableName WHERE yourColumnName > = DATE_SUB(NOW(),INTERVAL 10 MINUTE); To understand the above syntax, let us create a table. The query to create a table is as follows− mysql> create table users -> ( ...
[ { "code": null, "e": 1162, "s": 1062, "text": "You can select all records that are 10 minutes within current timestamp using the following syntax−" }, { "code": null, "e": 1250, "s": 1162, "text": "SELECT *FROM yourTableName\nWHERE yourColumnName > = DATE_SUB(NOW(),INTERVAL 10 MI...
String matches() Method in Java with Examples - GeeksforGeeks
12 Nov, 2021 Variants of matches() method is used to tell more precisely not test whether the given string matches to a regular expression or not as whenever this method is called in itself as matches() or be it matches() where here we do pass two arguments that are our string and regular expression, the working and ou...
[ { "code": null, "e": 24255, "s": 24227, "text": "\n12 Nov, 2021" }, { "code": null, "e": 24581, "s": 24255, "text": "Variants of matches() method is used to tell more precisely not test whether the given string matches to a regular expression or not as whenever this method is cal...
How to build a KNN classification model from scratch and visualize it using Streamlit | by Rahul Banerjee | Towards Data Science
KNN or K Nearest Neighbour is used for classification and regression. In this tutorial, we will be using it for classification. Since the target label is known, it is a Supervised algorithm. It essentially takes an input and finds the K nearest points to it. It then checks the labels of the nearest points and classifie...
[ { "code": null, "e": 906, "s": 172, "text": "KNN or K Nearest Neighbour is used for classification and regression. In this tutorial, we will be using it for classification. Since the target label is known, it is a Supervised algorithm. It essentially takes an input and finds the K nearest points to ...