title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
MySQL COUNT(), AVG() and SUM() Functions | The COUNT() function returns the number of rows that matches a specified criterion.
The AVG() function returns the average value of a numeric column.
The SUM() function returns the total sum of a numeric column.
Below is a selection from the "Products" table in the Northwind sample database:
The following SQL stateme... | [
{
"code": null,
"e": 84,
"s": 0,
"text": "The COUNT() function returns the number of rows that matches a specified criterion."
},
{
"code": null,
"e": 151,
"s": 84,
"text": "The AVG() function returns the average value of a numeric column. "
},
{
"code": null,
"e": 21... |
Logging TensorFlow(Keras) metrics to Azure ML Studio | by Ben Bogart | Towards Data Science | Training a TensorFlow/Keras model on Azure’s Machine Learning Studio can save a lot of time, especially if you don’t have your own GPU or your dataset is large. It seems that there should be an easy way to track your training metrics in Azure ML Studio’s dashboard. Well, there is! It just requires a short custom Keras ... | [
{
"code": null,
"e": 377,
"s": 47,
"text": "Training a TensorFlow/Keras model on Azure’s Machine Learning Studio can save a lot of time, especially if you don’t have your own GPU or your dataset is large. It seems that there should be an easy way to track your training metrics in Azure ML Studio’s d... |
fgets() and gets() in C | The function fgets() is used to read the string till the new line character. It checks array bound and it is safe too.
Here is the syntax of fgets() in C language,
char *fgets(char *string, int value, FILE *stream)
Here,
string − This is a pointer to the array of char.
value − The number of characters to be read.
strea... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "The function fgets() is used to read the string till the new line character. It checks array bound and it is safe too."
},
{
"code": null,
"e": 1226,
"s": 1181,
"text": "Here is the syntax of fgets() in C language,"
},
{
"cod... |
VSAM - Alternate Index | Alternate index are the additional index that are created for KSDS/ESDS datasets in addition to their primary index. An alternate index provides access to records by using more than one key. The key of alternate index can be a non-unique key, it can have duplicates.
Following steps are used to create an Alternate Index... | [
{
"code": null,
"e": 2032,
"s": 1765,
"text": "Alternate index are the additional index that are created for KSDS/ESDS datasets in addition to their primary index. An alternate index provides access to records by using more than one key. The key of alternate index can be a non-unique key, it can hav... |
What are the differences between length and length () in Java?
| The length is an instance variable of an array in Java whereas length() is a method of String class.
An array is an object that holds a fixed number of values of the same type.
The length variable in an array returns the length of an array i.e. a number of elements stored in an array.
Once arrays are initialized, its l... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "The length is an instance variable of an array in Java whereas length() is a method of String class."
},
{
"code": null,
"e": 1239,
"s": 1163,
"text": "An array is an object that holds a fixed number of values of the same type."
},... |
How to get programmatically android build id? | This example demonstrate about How to get programmatically android build id.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version = "1.0" encoding = "utf-8"?>
<Linea... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "This example demonstrate about How to get programmatically android build id."
},
{
"code": null,
"e": 1268,
"s": 1139,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details t... |
How to change the color spaces of an image using Java OpenCV library? | Using color space protocol you can represent the colors in an image. There are several color spaces available in OpenCV some of them are −
BGR − RGB is the most widely used color space in this, each pixel is actually formed by three different colors (intensity) values: red, blue and green, it is the default color space... | [
{
"code": null,
"e": 1201,
"s": 1062,
"text": "Using color space protocol you can represent the colors in an image. There are several color spaces available in OpenCV some of them are −"
},
{
"code": null,
"e": 1418,
"s": 1201,
"text": "BGR − RGB is the most widely used color spa... |
Selenium and iframe in html. | We can work with iframe in Selenium webdriver. A frame is defined with <iframe>, <frameset> or <frame> tag in html code. A frame is used to embed an HTML document within another HTML document.
Selenium by default has access to the parent browser driver. In order to access a frame element, the driver focus has to shift ... | [
{
"code": null,
"e": 1255,
"s": 1062,
"text": "We can work with iframe in Selenium webdriver. A frame is defined with <iframe>, <frameset> or <frame> tag in html code. A frame is used to embed an HTML document within another HTML document."
},
{
"code": null,
"e": 1478,
"s": 1255,
... |
Automata Theory | Set 8 - GeeksforGeeks | 25 Feb, 2019
These questions for practice purpose for GATE CS Exam.
Ques-1: Which one of the following language is Regular?
(A) {wxwR | w,x ∈ (a+b)+}(B) {wxwR | w ∈ (a+b)*, x ∈ {a,b}}(C) {wwRx | w,x ∈ (a+b)+}(D) {wwR | w ∈ (a+b)*}
Explanation:
(A) It is correct, since this language can form regular expression which is ... | [
{
"code": null,
"e": 24580,
"s": 24552,
"text": "\n25 Feb, 2019"
},
{
"code": null,
"e": 24635,
"s": 24580,
"text": "These questions for practice purpose for GATE CS Exam."
},
{
"code": null,
"e": 24691,
"s": 24635,
"text": "Ques-1: Which one of the following ... |
C# program to count upper and lower case characters in a given string | To count uppercase characters in a string, check the following condition −
myStr[i]>='A' && myStr[i]<='Z'
To count lower case characters in a string, check the following condition −
myStr[i]>='a' && myStr[i]<='z'
You can try to run the following code to count upper and lower case characters in a given s... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "To count uppercase characters in a string, check the following condition −"
},
{
"code": null,
"e": 1176,
"s": 1137,
"text": "myStr[i]>='A' && myStr[i]<='Z'"
},
{
"code": null,
"e": 1252,
"s": 1176,
"text"... |
Getting the most out of Jupyter Lab | by Adam Green | Towards Data Science | Love them or hate them, notebooks are part of being a data scientist. Historically the only way to work with notebooks was using Jupyter Notebook — in 2017 we were given Jupyter Lab.
Jupyter Lab offers a superior development experience to Jupyter Notebook, with improvements such as:
a file browser
a text editor
termina... | [
{
"code": null,
"e": 354,
"s": 171,
"text": "Love them or hate them, notebooks are part of being a data scientist. Historically the only way to work with notebooks was using Jupyter Notebook — in 2017 we were given Jupyter Lab."
},
{
"code": null,
"e": 455,
"s": 354,
"text": "Jup... |
Neural Network for Predicting the Energy Performance of a Building | by Marco Sanguineti | Towards Data Science | I spent years, during my master’s studies in engineering, trying to model energy systems. In most cases, only the simplest problems can be modelled directly (analytical resolution of the governing differential equations of the system studied), for particularly simple and convenient geometries and boundary conditions. M... | [
{
"code": null,
"e": 698,
"s": 172,
"text": "I spent years, during my master’s studies in engineering, trying to model energy systems. In most cases, only the simplest problems can be modelled directly (analytical resolution of the governing differential equations of the system studied), for particu... |
What is a static class in Java? | You cannot use the static keyword with a class unless it is an inner class. A static inner class is a nested class which is a static member of the outer class. It can be accessed without instantiating the outer class, using other static members. Just like static members, a static nested class does not have access to th... | [
{
"code": null,
"e": 1435,
"s": 1062,
"text": "You cannot use the static keyword with a class unless it is an inner class. A static inner class is a nested class which is a static member of the outer class. It can be accessed without instantiating the outer class, using other static members. Just li... |
LALR Parser (with Examples) - GeeksforGeeks | 24 Jun, 2021
LALR Parser :LALR Parser is lookahead LR parser. It is the most powerful parser which can handle large classes of grammar. The size of CLR parsing table is quite large as compared to other parsing table. LALR reduces the size of this table.LALR works similar to CLR. The only difference is , it combines t... | [
{
"code": null,
"e": 24438,
"s": 24407,
"text": " \n24 Jun, 2021\n"
},
{
"code": null,
"e": 24952,
"s": 24438,
"text": "LALR Parser :LALR Parser is lookahead LR parser. It is the most powerful parser which can handle large classes of grammar. The size of CLR parsing table is qui... |
java.util.zip.Inflater.inflate() Method Example | The java.util.zip.Inflater.inflate(byte[] b) method uncompresses bytes into specified buffer. Returns actual number of bytes uncompressed. A return value of 0 indicates that needsInput() or needsDictionary() should be called in order to determine if more input data or a preset dictionary is required. In the latter case... | [
{
"code": null,
"e": 2591,
"s": 2192,
"text": "The java.util.zip.Inflater.inflate(byte[] b) method uncompresses bytes into specified buffer. Returns actual number of bytes uncompressed. A return value of 0 indicates that needsInput() or needsDictionary() should be called in order to determine if mor... |
Semantic-UI | Cards - GeeksforGeeks | 01 Oct, 2021
Semantic UI is an open-source framework that uses CSS and jQuery to build great user interfaces. It is the same as a bootstrap for use and has great different elements to use to make your website look more amazing. It uses a class to add CSS to the elements.
A card is used to displaying the content similar... | [
{
"code": null,
"e": 23982,
"s": 23954,
"text": "\n01 Oct, 2021"
},
{
"code": null,
"e": 24241,
"s": 23982,
"text": "Semantic UI is an open-source framework that uses CSS and jQuery to build great user interfaces. It is the same as a bootstrap for use and has great different elem... |
How to initialize an empty DateTime in C# | Set a DateTime to its minimum value.
DateTime.MinValue;
The above will display the minimum value i.e.
1/1/0001
Let us see how to display the minimum value and avoid adding null to a date to initialize it as empty.
Live Demo
using System;
using System.Linq;
public class Demo {
public static void Main() {
DateT... | [
{
"code": null,
"e": 1099,
"s": 1062,
"text": "Set a DateTime to its minimum value."
},
{
"code": null,
"e": 1118,
"s": 1099,
"text": "DateTime.MinValue;"
},
{
"code": null,
"e": 1164,
"s": 1118,
"text": "The above will display the minimum value i.e."
},
{... |
GATE | GATE CS 2021 | Set 1 | Question 43 - GeeksforGeeks | 24 May, 2021
Consider the relation R(P,Q,S,T,X,Y,Z,W) with the following functional dependencies.
Consider the decomposition of the relation R into the constituent relations according to the following two decomposition schemes.
Which one of the following options is correct?(A) D1 is a lossless decomposition, but D2 is ... | [
{
"code": null,
"e": 24075,
"s": 24047,
"text": "\n24 May, 2021"
},
{
"code": null,
"e": 24160,
"s": 24075,
"text": "Consider the relation R(P,Q,S,T,X,Y,Z,W) with the following functional dependencies."
},
{
"code": null,
"e": 24290,
"s": 24160,
"text": "Consi... |
The Most Important Statistical Test | by Wicaksono Wijono | Towards Data Science | The likelihood ratio test (LRT) “unifies” frequentist statistical tests. Brand-name tests like t-test, F-test, chi-squared-test, and so on are specific cases (or even approximations) of the LRT.
Thus, it is surprising that many people have never heard of LRT. When I help people with their statistical questions, most of... | [
{
"code": null,
"e": 367,
"s": 172,
"text": "The likelihood ratio test (LRT) “unifies” frequentist statistical tests. Brand-name tests like t-test, F-test, chi-squared-test, and so on are specific cases (or even approximations) of the LRT."
},
{
"code": null,
"e": 673,
"s": 367,
... |
Building an Automated Machine Learning Pipeline: Part One | by Ceren Iyim | Towards Data Science | Part 1: Understand, clean, explore, process data (you are reading now)
Part 2: Set metric and baseline, select and tune model (live!)
Part 3: Train, evaluate and interpret model (live!)
Part 4: Automate your pipeline using Docker and Luigi (live!)
During my data science learning journey, I learned through reading artic... | [
{
"code": null,
"e": 243,
"s": 172,
"text": "Part 1: Understand, clean, explore, process data (you are reading now)"
},
{
"code": null,
"e": 306,
"s": 243,
"text": "Part 2: Set metric and baseline, select and tune model (live!)"
},
{
"code": null,
"e": 358,
"s": 3... |
Redis - Connections | Redis connection commands are basically used to manage client connections with Redis server.
Following example explains how a client authenticates itself to Redis server and checks whether the server is running or not.
redis 127.0.0.1:6379> AUTH "password"
OK
redis 127.0.0.1:6379> PING
PONG
Following table lists s... | [
{
"code": null,
"e": 2138,
"s": 2045,
"text": "Redis connection commands are basically used to manage client connections with Redis server."
},
{
"code": null,
"e": 2264,
"s": 2138,
"text": "Following example explains how a client authenticates itself to Redis server and checks w... |
How to get the port number of the processes using PowerShell? | When we use Get-Process cmdlet in PowerShell, it doesn’t have properties to get Port number the processes use. So here we will write a function that will provide us the ports number associated with the processes.
There is one windows command NETSTAT which provides the Port number and the associated process ID but doesn... | [
{
"code": null,
"e": 1275,
"s": 1062,
"text": "When we use Get-Process cmdlet in PowerShell, it doesn’t have properties to get Port number the processes use. So here we will write a function that will provide us the ports number associated with the processes."
},
{
"code": null,
"e": 168... |
How to create Time Picker in ReactJS ? - GeeksforGeeks | 22 Jan, 2021
Time pickers provide a simple way to select a single value from a pre-determined set. Material UI for React has this component available for us and it is very easy to integrate. We can create a Time Picker in ReactJS using the following approach:
Creating React Application And Installing Module:
Step 1: Cr... | [
{
"code": null,
"e": 25312,
"s": 25284,
"text": "\n22 Jan, 2021"
},
{
"code": null,
"e": 25559,
"s": 25312,
"text": "Time pickers provide a simple way to select a single value from a pre-determined set. Material UI for React has this component available for us and it is very easy... |
PyQt5 - QSlider Widget & Signal | QSlider class object presents the user with a groove over which a handle can be moved. It is a classic widget to control a bounded value. Position of the handle on the groove is equivalent to an integer between the lower and the upper bounds of the control.
A slider control can be displayed in horizontal or vertical ma... | [
{
"code": null,
"e": 2221,
"s": 1963,
"text": "QSlider class object presents the user with a groove over which a handle can be moved. It is a classic widget to control a bounded value. Position of the handle on the groove is equivalent to an integer between the lower and the upper bounds of the cont... |
How to calculate the difference between two dates in PHP ? - GeeksforGeeks | 03 Dec, 2021
In this article, we will see how to calculate the difference between 2 dates in PHP, along with understanding its implementation through the examples. Given two dates ie., start_date and end_date & we need to find the difference between the two dates.
Consider the below example:
Input: start_date: 2016-06-... | [
{
"code": null,
"e": 24678,
"s": 24650,
"text": "\n03 Dec, 2021"
},
{
"code": null,
"e": 24930,
"s": 24678,
"text": "In this article, we will see how to calculate the difference between 2 dates in PHP, along with understanding its implementation through the examples. Given two da... |
Tryit Editor v3.7 | Tryit: Template 3 | [] |
Store mouse click event coordinates with Matplotlib | To store mouse event coordinates with matplotlib, we can use "button_press_event" event.−
Set the figure size and adjust the padding between and around the subplots.
Create a figure and a set of subplots.
Plot a line in the range of 10
Bind the function *onclick* to the event *button_press_event*.
Print the x and y dat... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "To store mouse event coordinates with matplotlib, we can use \"button_press_event\" event.−"
},
{
"code": null,
"e": 1228,
"s": 1152,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
... |
How to find the number of NA’s in each column of an R data frame? | Sometimes the data frame is filled with too many missing values/ NA’s and each column of the data frame contains at least one NA. In this case, we might want to find out how many missing values exists in each of the columns. Therefore, we can use colSums function along with is.na in the following manner: colSums(is.na(... | [
{
"code": null,
"e": 1423,
"s": 1062,
"text": "Sometimes the data frame is filled with too many missing values/ NA’s and each column of the data frame contains at least one NA. In this case, we might want to find out how many missing values exists in each of the columns. Therefore, we can use colSum... |
How to Create a Timer using Jetpack Compose in Android? - GeeksforGeeks | 18 Jul, 2021
Jetpack Compose is a modern toolkit for building native Android UI. Jetpack Compose simplifies and accelerates UI development on Android with less code, powerful tools, and intuitive Kotlin APIs. In this article, we are going to create a Timer using Jetpack Compose. Below is the sample video to show what w... | [
{
"code": null,
"e": 25036,
"s": 25008,
"text": "\n18 Jul, 2021"
},
{
"code": null,
"e": 25366,
"s": 25036,
"text": "Jetpack Compose is a modern toolkit for building native Android UI. Jetpack Compose simplifies and accelerates UI development on Android with less code, powerful t... |
DSatur Algorithm for Graph Coloring - GeeksforGeeks | 08 Nov, 2021
Graph colouring is the task of assigning colours to the vertices of a graph so that:
pairs of adjacent vertices are assigned different colours, and
the number of different colours used across the graph is minimal.
The following graph has been coloured using just three colours (red, blue and green here). Th... | [
{
"code": null,
"e": 24301,
"s": 24273,
"text": "\n08 Nov, 2021"
},
{
"code": null,
"e": 24386,
"s": 24301,
"text": "Graph colouring is the task of assigning colours to the vertices of a graph so that:"
},
{
"code": null,
"e": 24449,
"s": 24386,
"text": "pairs... |
Reinforcement Learning: let’s teach a taxi-cab how to drive | by Valentina Alto | Towards Data Science | Reinforcement Learning is a subfield of Machine Learning whose tasks differ from ‘standard’ ways of learning. Indeed, rather than being provided with historical data and make predictions or inferences on them, you want your reinforcement algorithm to learn, from scratch, from the surrounding environment. Basically, you... | [
{
"code": null,
"e": 650,
"s": 172,
"text": "Reinforcement Learning is a subfield of Machine Learning whose tasks differ from ‘standard’ ways of learning. Indeed, rather than being provided with historical data and make predictions or inferences on them, you want your reinforcement algorithm to lear... |
Scikit Learn - Dimensionality Reduction using PCA | Dimensionality reduction, an unsupervised machine learning method is used to reduce the number of feature variables for each data sample selecting set of principal features. Principal Component Analysis (PCA) is one of the popular algorithms for dimensionality reduction.
Principal Component Analysis (PCA) is used for l... | [
{
"code": null,
"e": 2493,
"s": 2221,
"text": "Dimensionality reduction, an unsupervised machine learning method is used to reduce the number of feature variables for each data sample selecting set of principal features. Principal Component Analysis (PCA) is one of the popular algorithms for dimensi... |
Round off a number to the next multiple of 5 using JavaScript - GeeksforGeeks | 27 Aug, 2019
Given a positive integer n and the task is to round the number to the next whole number having divisible by 5.
Examples:
Input : 46
Output : 50
Input : 21
Output : 25
Input : 30
Output : 30
Approach 1:
Take the number in a variable.
Divide it by 5 and get the decimal value.
Take the ceil value of the ... | [
{
"code": null,
"e": 37914,
"s": 37886,
"text": "\n27 Aug, 2019"
},
{
"code": null,
"e": 38025,
"s": 37914,
"text": "Given a positive integer n and the task is to round the number to the next whole number having divisible by 5."
},
{
"code": null,
"e": 38035,
"s":... |
Wrap Around Concept and TCP Sequence Number | 23 Jun, 2022
Prerequisite – TCP | Services and Segment structure Transmission Control Protocol (TCP) is one of the most important protocols of the internet protocol. It provides full transport-layer service to applications and generates a virtual circuit between sender and receiver that is active for the duration of th... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 471,
"s": 54,
"text": "Prerequisite – TCP | Services and Segment structure Transmission Control Protocol (TCP) is one of the most important protocols of the internet protocol. It provides full tran... |
Golang Maps | 10 Sep, 2021
In Go language, a map is a powerful, ingenious, and versatile data structure. Golang Maps is a collection of unordered pairs of key-value. It is widely used because it provides fast lookups and values that can retrieve, update or delete with the help of keys.
It is a reference to a hash table.
Due to its r... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Sep, 2021"
},
{
"code": null,
"e": 288,
"s": 28,
"text": "In Go language, a map is a powerful, ingenious, and versatile data structure. Golang Maps is a collection of unordered pairs of key-value. It is widely used because it provide... |
Find cost price from given selling price and profit or loss percentage | 23 Jun, 2022
Given the Selling Price(SP) and percentage profit or loss of a product. The task is to Calculate the cost price(CP) of the product.Examples:
Input: SP = 1020, Profit Percentage = 20
Output: CP = 850
Input: SP = 900, Loss Percentage = 10
Output: CP = 1000
Approach:
Formula to calculate cost price i... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 195,
"s": 52,
"text": "Given the Selling Price(SP) and percentage profit or loss of a product. The task is to Calculate the cost price(CP) of the product.Examples: "
},
{
"code": null,
... |
What are the Best Ways to Write a SQL Query? | 03 Jul, 2022
An SQL Query is used to retrieve the required data from the database. However, there may be multiple SQL queries that yield the same results but with different levels of efficiency. An inefficient query can drain the database resources, reduce the database speed or result in a loss of service for other use... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n03 Jul, 2022"
},
{
"code": null,
"e": 450,
"s": 52,
"text": "An SQL Query is used to retrieve the required data from the database. However, there may be multiple SQL queries that yield the same results but with different levels of effi... |
Sum of squares of all Subsets of given Array | 13 Mar, 2022
Given an array arr[]. The value of a subset of array A is defined as the sum of squares of all the numbers in that subset. The task is to calculate the sum of values of all possible non-empty subsets of the given array. Since, the answer can be large print the val mod 1000000007.Examples:
Input: arr[] = ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Mar, 2022"
},
{
"code": null,
"e": 320,
"s": 28,
"text": "Given an array arr[]. The value of a subset of array A is defined as the sum of squares of all the numbers in that subset. The task is to calculate the sum of values of all po... |
What is a clean, Pythonic way to have multiple constructors in Python? | 29 Dec, 2020
Prerequisite – Constructors, @classmethod decorators
Python does not support explicit multiple constructors, yet there are some ways using which the multiple constructors can be achieved. If multiple __init__ methods are written for the same class, then the latest one overwrites all the previous constructo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 81,
"s": 28,
"text": "Prerequisite – Constructors, @classmethod decorators"
},
{
"code": null,
"e": 366,
"s": 81,
"text": "Python does not support explicit multiple constructors,... |
Breaking an Integer to get Maximum Product | 23 Jun, 2022
Given a number n, the task is to break n in such a way that multiplication of its parts is maximized.
Input : n = 10
Output : 36
10 = 4 + 3 + 3 and 4 * 3 * 3 = 36
is maximum possible product.
Input : n = 8
Output : 18
8 = 2 + 3 + 3 and 2 * 3 * 3 = 18
is maximum possible product.
Mathematically, we are gi... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 157,
"s": 54,
"text": "Given a number n, the task is to break n in such a way that multiplication of its parts is maximized. "
},
{
"code": null,
"e": 336,
"s": 157,
"text": "In... |
How to align div vertical across full screen in Tailwind CSS ? | 20 Jun, 2021
You can easily align div vertical across the full screen using flex property in Tailwind CSS. Tailwind uses justify-center and items-center property which is an alternative to the flex-property in CSS.
Syntax:
<div class="flex h-screen justify-center items-center">
. . .
</div>
flex property:
h-scre... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Jun, 2021"
},
{
"code": null,
"e": 230,
"s": 28,
"text": "You can easily align div vertical across the full screen using flex property in Tailwind CSS. Tailwind uses justify-center and items-center property which is an alternative to... |
Ruby | Types of Iterators | 29 May, 2021
The word iterate means doing one thing multiple times and that is what iterators do. Sometimes iterators are termed as the custom loops.
“Iterators” is the object-oriented concept in Ruby.
In more simple words, iterators are the methods which are supported by collections(Arrays, Hashes etc.). Collections ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 May, 2021"
},
{
"code": null,
"e": 192,
"s": 54,
"text": "The word iterate means doing one thing multiple times and that is what iterators do. Sometimes iterators are termed as the custom loops. "
},
{
"code": null,
"e":... |
Socket.IO - Broadcasting | Broadcasting means sending a message to all connected clients. Broadcasting can be done at multiple levels. We can send the message to all the connected clients, to clients on a namespace and clients in a particular room. To broadcast an event to all the clients, we can use the io.sockets.emit method.
Note − This will ... | [
{
"code": null,
"e": 2302,
"s": 1999,
"text": "Broadcasting means sending a message to all connected clients. Broadcasting can be done at multiple levels. We can send the message to all the connected clients, to clients on a namespace and clients in a particular room. To broadcast an event to all th... |
Shell Sort Program in C | Shell sort is a highly efficient sorting algorithm and is based on insertion sort algorithm. This algorithm avoids large shifts as in case of insertion sort, if the smaller value is to the far right and has to be moved to the far left.
#include <stdio.h>
#include <stdbool.h>
#define MAX 7
int intArray[MAX] = {4,6,3,2... | [
{
"code": null,
"e": 2950,
"s": 2714,
"text": "Shell sort is a highly efficient sorting algorithm and is based on insertion sort algorithm. This algorithm avoids large shifts as in case of insertion sort, if the smaller value is to the far right and has to be moved to the far left."
},
{
"co... |
Snake Game in C | 10 Feb, 2021
In this article, the task is to implement a basic Snake Game. Below given some functionalities of this game:
The snake is represented with a 0(zero) symbol.
The fruit is represented with an *(asterisk) symbol.
The snake can move in any direction according to the user with the help of the keyboard (W, A, S,... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 Feb, 2021"
},
{
"code": null,
"e": 163,
"s": 54,
"text": "In this article, the task is to implement a basic Snake Game. Below given some functionalities of this game:"
},
{
"code": null,
"e": 211,
"s": 163,
"text... |
Java Interview Questions on Constructors | 28 Jun, 2021
What is a Constructor?Constructors are used to initialize the object’s state. Like methods, a constructor also contains collection of statements(i.e. instructions) that are executed at time of Object creation.Do we have Copy Constructor in Java?Like C++, Java also supports copy constructor. But, unlike C++... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 3640,
"s": 52,
"text": "What is a Constructor?Constructors are used to initialize the object’s state. Like methods, a constructor also contains collection of statements(i.e. instructions) that are ... |
Deletion in a Binary Tree | 23 Jun, 2022
Given a binary tree, delete a node from it by making sure that the tree shrinks from the bottom (i.e. the deleted node is replaced by the bottom-most and rightmost node). This is different from BST deletion. Here we do not have any order among elements, so we replace them with the last element.Examples :
D... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 360,
"s": 54,
"text": "Given a binary tree, delete a node from it by making sure that the tree shrinks from the bottom (i.e. the deleted node is replaced by the bottom-most and rightmost node). Thi... |
Java Program to Find all triplets with zero sum | 06 Jan, 2022
Given an array of distinct elements. The task is to find triplets in the array whose sum is zero.
Examples :
Input : arr[] = {0, -1, 2, -3, 1}
Output : (0 -1 1), (2 -3 1)
Explanation : The triplets with zero sum are
0 + -1 + 1 = 0 and 2 + -3 + 1 = 0
Input : arr[] = {1, -2, 1, 0, 5}
Output : 1 -2 1
Ex... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jan, 2022"
},
{
"code": null,
"e": 126,
"s": 28,
"text": "Given an array of distinct elements. The task is to find triplets in the array whose sum is zero."
},
{
"code": null,
"e": 138,
"s": 126,
"text": "Examples... |
Python – Unpacking Values in Strings | 29 Aug, 2020
Given a dictionary, unpack its values into a string.
Input : test_str = “First value is {} Second is {}”, test_dict = {3 : “Gfg”, 9 : “Best”}Output : First value is Gfg Second is BestExplanation : After substitution, we get Gfg and Best as values.
Input : test_str = “First value is {} Second is {}”, test_d... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 81,
"s": 28,
"text": "Given a dictionary, unpack its values into a string."
},
{
"code": null,
"e": 276,
"s": 81,
"text": "Input : test_str = “First value is {} Second is {}”, te... |
Stack and Queues in Python | 09 May, 2022
Prerequisites : list and Deque in Python.
Unlike C++ STL and Java Collections, Python does have specific classes/interfaces for Stack and Queue. Following are different ways to implement in Python
1) Using listStack works on the principle of “Last-in, first-out”. Also, the inbuilt functions in Python make ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n09 May, 2022"
},
{
"code": null,
"e": 95,
"s": 53,
"text": "Prerequisites : list and Deque in Python."
},
{
"code": null,
"e": 250,
"s": 95,
"text": "Unlike C++ STL and Java Collections, Python does have specific cl... |
Lodash _.uniqueId() Method | 09 Sep, 2020
The Lodash _.uniqueId() method is used to create an unique id for some element each time. This method will work for the purpose of assigning a unique id for most use cases, but not with complex projects that require a unique id always even if the project restarts.
Syntax:
_.uniqueId(prefix)
Parameters: Th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Sep, 2020"
},
{
"code": null,
"e": 294,
"s": 28,
"text": "The Lodash _.uniqueId() method is used to create an unique id for some element each time. This method will work for the purpose of assigning a unique id for most use cases, bu... |
How to Finally Install TensorFlow 2 GPU on Windows 10 in 2021 | Towards Data Science | I think Windows users, including me, have suffered enough. You are probably stumbling on this after trying hours or even days to make this work. So, as a kindness, I will just cut to the chase and show you the steps you need to install TensorFlow GPU on Windows 10 without giving the usual blog intro.
The first, very im... | [
{
"code": null,
"e": 474,
"s": 172,
"text": "I think Windows users, including me, have suffered enough. You are probably stumbling on this after trying hours or even days to make this work. So, as a kindness, I will just cut to the chase and show you the steps you need to install TensorFlow GPU on W... |
JavaScript Date setDate() Method | Javascript date setDate() method sets the day of the month for a specified date according to local time.
Its syntax is as follows −
Date.setDate( dayValue )
dayValue − An integer from 1 to 31, representing the day of the month.
Try the following example.
<html>
<head>
<title>JavaScript setDate Method</title>... | [
{
"code": null,
"e": 2571,
"s": 2466,
"text": "Javascript date setDate() method sets the day of the month for a specified date according to local time."
},
{
"code": null,
"e": 2598,
"s": 2571,
"text": "Its syntax is as follows −"
},
{
"code": null,
"e": 2624,
"s"... |
Go-Back-N ARQ | Go-Back-N Automatic Repeat reQuest (Go-Back-N ARQ), is a data link layer protocol that uses a sliding window method for reliable and sequential delivery of data frames. It is a case of sliding window protocol having to send window size of N and receiving window size of 1.
Go – Back – N ARQ uses the concept of protocol ... | [
{
"code": null,
"e": 1335,
"s": 1062,
"text": "Go-Back-N Automatic Repeat reQuest (Go-Back-N ARQ), is a data link layer protocol that uses a sliding window method for reliable and sequential delivery of data frames. It is a case of sliding window protocol having to send window size of N and receivin... |
Choosing the right Encoding method-Label vs OneHot Encoder | by Rahil Shaikh | Towards Data Science | In ML models we are often required to convert the categorical i.e text features to its numeric representation. The two most common ways to do this is to use Label Encoder or OneHot Encoder. However, most of the ML newbies are not familiar with the impact of the choice of encoding has on their model, the accuracy of the... | [
{
"code": null,
"e": 576,
"s": 171,
"text": "In ML models we are often required to convert the categorical i.e text features to its numeric representation. The two most common ways to do this is to use Label Encoder or OneHot Encoder. However, most of the ML newbies are not familiar with the impact ... |
Comparator function of qsort() in C | In C, we get the qsort() function. This is used to sort some array using quicksort technique. In this function we have to pass the comparator function. This comparator function takes two arguments. Then compares them and get the relative order between them. These two arguments are pointers, and type casted to const voi... | [
{
"code": null,
"e": 1413,
"s": 1062,
"text": "In C, we get the qsort() function. This is used to sort some array using quicksort technique. In this function we have to pass the comparator function. This comparator function takes two arguments. Then compares them and get the relative order between t... |
Bayesian Neural Networks with TensorFlow Probability | by Georgi Tancev | Towards Data Science | Machine learning models are usually developed from data as deterministic machines that map input to output using a point estimate of parameter weights calculated by maximum-likelihood methods. However, there is a lot of statistical fluke going on in the background. For instance, a dataset itself is a finite random set ... | [
{
"code": null,
"e": 1231,
"s": 172,
"text": "Machine learning models are usually developed from data as deterministic machines that map input to output using a point estimate of parameter weights calculated by maximum-likelihood methods. However, there is a lot of statistical fluke going on in the ... |
Gamma Distribution in R Programming – dgamma(), pgamma(), qgamma(), and rgamma() Functions | 30 Jun, 2020
The Gamma distribution in R Language is defined as a two-parameter family of continuous probability distributions which is used in exponential distribution, Erlang distribution, and chi-squared distribution. This article is the implementation of functions of gamma distribution.
dgamma() function is used to... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 307,
"s": 28,
"text": "The Gamma distribution in R Language is defined as a two-parameter family of continuous probability distributions which is used in exponential distribution, Erlang distributio... |
Find the nearest value present on the left of every array element | 10 Jun, 2021
Given an array arr[] of size N, the task is for each array element is to find the nearest non-equal value present on its left in the array. If no such element is found, then print -1
Examples:
Input: arr[] = { 2, 1, 5, 8, 3 }Output: -1 2 2 5 2Explanation:[2], it is the only number in this prefix. Hence, an... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 Jun, 2021"
},
{
"code": null,
"e": 237,
"s": 54,
"text": "Given an array arr[] of size N, the task is for each array element is to find the nearest non-equal value present on its left in the array. If no such element is found, then ... |
N’th palindrome of K digits | 27 Apr, 2021
Given two integers n and k, Find the lexicographical nth palindrome of k digits.Examples:
Input : n = 5, k = 4
Output : 1441
Explanation:
4 digit lexicographical palindromes are:
1001, 1111, 1221, 1331, 1441
5th palindrome = 1441
Input : n = 4, k = 6
Output : 103301
Naive Approach
A brute force i... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 Apr, 2021"
},
{
"code": null,
"e": 144,
"s": 52,
"text": "Given two integers n and k, Find the lexicographical nth palindrome of k digits.Examples: "
},
{
"code": null,
"e": 325,
"s": 144,
"text": "Input : n = ... |
Python Pillow – Using Image Module | 19 Nov, 2021
In this article, we will see how to work with Image Module of PIL in Python. First, let’s see how to install the PIL.
Linux: On the Linux terminal type the following:
pip install Pillow
Installing pip via terminal:
sudo apt-get update
sudo apt-get install python-pip
Here, we will go through some methods a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Nov, 2021"
},
{
"code": null,
"e": 147,
"s": 28,
"text": "In this article, we will see how to work with Image Module of PIL in Python. First, let’s see how to install the PIL. "
},
{
"code": null,
"e": 196,
"s": 147,
... |
How to handle Frames/iFrames in Selenium with Python | 08 Jul, 2022
Selenium is an effective device for controlling an internet browser through the program. It is purposeful for all browsers, works on all fundamental OS and its scripts are written in numerous languages i.e Python, Java, C#, etc, we can be running with Python.
HTML outlines are utilized to isolate your prog... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jul, 2022"
},
{
"code": null,
"e": 288,
"s": 28,
"text": "Selenium is an effective device for controlling an internet browser through the program. It is purposeful for all browsers, works on all fundamental OS and its scripts are wri... |
Number of permutation with K inversions | 12 Jan, 2022
Given an array, an inversion is defined as a pair a[i], a[j] such that a[i] > a[j] and i < j. We are given two numbers N and k, we need to tell how many permutations of the first N number have exactly K inversion.
Examples:
Input : N = 3, K = 1
Output : 2
Explanation :
Total Permutation of first N numb... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Jan, 2022"
},
{
"code": null,
"e": 266,
"s": 52,
"text": "Given an array, an inversion is defined as a pair a[i], a[j] such that a[i] > a[j] and i < j. We are given two numbers N and k, we need to tell how many permutations of the f... |
How to move a ggplot2 legend with multiple rows to the bottom of a plot in R | 23 May, 2021
In this article, we are going to see how to draw ggplot2 legend at the bottom and with two Rows in R Programming Language. First, we have to create a simple data plot with legend. Here we will draw a Simple Scatter plot.
First, load the ggplot2 package by using library() function.
library("ggplot2")
Creat... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 May, 2021"
},
{
"code": null,
"e": 249,
"s": 28,
"text": "In this article, we are going to see how to draw ggplot2 legend at the bottom and with two Rows in R Programming Language. First, we have to create a simple data plot with leg... |
MongoDB – Replication and Sharding | 19 Oct, 2021
In context to the scaling of the MongoDB database, it has some features know as Replication and Sharding. Replication can be simply understood as the duplication of the data-set whereas sharding is partitioning the data-set into discrete parts. By sharding, you divided your collection into different parts.... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Oct, 2021"
},
{
"code": null,
"e": 467,
"s": 54,
"text": "In context to the scaling of the MongoDB database, it has some features know as Replication and Sharding. Replication can be simply understood as the duplication of the data-... |
Computer Network | Leaky bucket algorithm | 20 Jun, 2022
In the network layer, before the network can make Quality of service guarantees, it must know what traffic is being guaranteed. One of the main causes of congestion is that traffic is often bursty. To understand this concept first we have to know little about traffic shaping. Traffic Shaping is a mechanism... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 625,
"s": 52,
"text": "In the network layer, before the network can make Quality of service guarantees, it must know what traffic is being guaranteed. One of the main causes of congestion is that t... |
LMNs-Data Structure - GeeksforGeeks | 28 Jun, 2021
Arrays
An array is collection of items stored at continuous memory locations. The idea is to declare multiple items of same type together. Array declaration: In C, we can declare an array by specifying its and size or by initializing it or by both.
// Array declaration by specifying size
int arr[10];
// ... | [
{
"code": null,
"e": 29498,
"s": 29470,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 29506,
"s": 29498,
"text": "Arrays "
},
{
"code": null,
"e": 29748,
"s": 29506,
"text": "An array is collection of items stored at continuous memory locations. The idea is... |
SQL | DELETE Statement | 28 Jun, 2021
The DELETE Statement in SQL is used to delete existing records from a table. We can delete a single record or multiple records depending on the condition we specify in the WHERE clause.
Basic Syntax:
DELETE FROM table_name WHERE some_condition;
table_name: name of the table
some_condition: condition to ch... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 238,
"s": 52,
"text": "The DELETE Statement in SQL is used to delete existing records from a table. We can delete a single record or multiple records depending on the condition we specify in the WH... |
Generate Random Numbers From The Uniform Distribution using NumPy | 05 Sep, 2020
Random numbers are the numbers that cannot be predicted logically and in Numpy we are provided with the module called random module that allows us to work with random numbers. To generate random numbers from the Uniform distribution we will use random.uniform() method of random module.
Syntax:
numpy.rando... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Sep, 2020"
},
{
"code": null,
"e": 342,
"s": 54,
"text": "Random numbers are the numbers that cannot be predicted logically and in Numpy we are provided with the module called random module that allows us to work with random numbers... |
Interrupting a Thread in Java | 17 Dec, 2021
In Java Threads, if any thread is in sleeping or waiting state (i.e. sleep() or wait() is invoked), calling the interrupt() method on the thread, breaks out the sleeping or waiting state throwing InterruptedException. If the thread is not in the sleeping or waiting state, calling the interrupt() method per... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 452,
"s": 52,
"text": "In Java Threads, if any thread is in sleeping or waiting state (i.e. sleep() or wait() is invoked), calling the interrupt() method on the thread, breaks out the sleeping or w... |
Difference between reactstrap and react-bootstrap | 25 Oct, 2020
Bootstrap is a popular front-end CSS framework used by web developers to design their web applications. Bootstrap components include HTML, CSS, and JavaScript with additional dependencies like jQuery which makes it hard to use in React applications. There are two libraries available which are reactstrap an... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Oct, 2020"
},
{
"code": null,
"e": 608,
"s": 52,
"text": "Bootstrap is a popular front-end CSS framework used by web developers to design their web applications. Bootstrap components include HTML, CSS, and JavaScript with additional... |
Implementing Inorder, Preorder, Postorder Using Stack in Java | 04 Jan, 2021
Data structures of two types of Linear Data Structure and the second is Non-linear Data Structure the main difference between these Data structures is the way of transverse the elements of these data structures. Linear Data Structure Transverse all elements in a single run whereas Non-Linear Data structure... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Jan, 2021"
},
{
"code": null,
"e": 405,
"s": 54,
"text": "Data structures of two types of Linear Data Structure and the second is Non-linear Data Structure the main difference between these Data structures is the way of transverse t... |
Commonly Asked C++ Interview Questions | Set 1 | 13 Sep, 2021
What are the differences between C and C++? 1) C++ is a kind of superset of C, most of C programs except few exceptions (See this and this) work in C++ as well. 2) C is a procedural programming language, but C++ supports both procedural and Object Oriented programming. 3) Since C++ supports object oriented... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 865,
"s": 52,
"text": "What are the differences between C and C++? 1) C++ is a kind of superset of C, most of C programs except few exceptions (See this and this) work in C++ as well. 2) C is a pro... |
Print all leaf nodes of an n-ary tree using DFS | 05 Aug, 2021
Given an array edge[][2] where (edge[i][0], edge[i][1]) defines an edge in the n-ary tree, the task is to print all the leaf nodes of the given tree using.
Examples:
Input: edge[][] = {{1, 2}, {1, 3}, {2, 4}, {2, 5}, {3, 6}}
Output: 4 5 6
1
/ \
2 3
/ \ \
4 5 6
Input: edge[][] = {{1, 5}... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 209,
"s": 53,
"text": "Given an array edge[][2] where (edge[i][0], edge[i][1]) defines an edge in the n-ary tree, the task is to print all the leaf nodes of the given tree using."
},
{
"cod... |
How to show Page Loading div until the page has finished loading? | 27 Sep, 2019
There are a lot of ways in which we can show a loading div but we have figured out the most optimal solution for you and that too in pure vanilla JavaScript. We will use the document.readyState property. When the value of this property changes, a readystatechange event fires on the document object.
The doc... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Sep, 2019"
},
{
"code": null,
"e": 328,
"s": 28,
"text": "There are a lot of ways in which we can show a loading div but we have figured out the most optimal solution for you and that too in pure vanilla JavaScript. We will use the d... |
Asyncio Is Not Parallelism. You may have heard that Python asyncio... | by Peter Xie | Towards Data Science | Let’s start with a perfect concurrent example #1.
Async function say_after is an example from Python official documentation. It prints something ‘what’ after sleeping ‘delay’ seconds.
In the main function, we create two tasks of say_after, one says ‘hello’ after 1 second and the other say ‘world’ after 2 seconds. Run i... | [
{
"code": null,
"e": 222,
"s": 172,
"text": "Let’s start with a perfect concurrent example #1."
},
{
"code": null,
"e": 356,
"s": 222,
"text": "Async function say_after is an example from Python official documentation. It prints something ‘what’ after sleeping ‘delay’ seconds."
... |
How to play videos in Android TextureView using Kotlin? | This example demonstrates how to play videos in Android TextureView 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.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<Linea... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "This example demonstrates how to play videos in Android TextureView using Kotlin."
},
{
"code": null,
"e": 1272,
"s": 1144,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒New Project and fill all required detai... |
CakePHP - Controllers | The controller as the name indicates controls the application. It acts like a bridge between models and views. Controllers handle request data, makes sure that correct models are called and right response or view is rendered.
Methods in the controllers’ class are called actions. Each controller follows naming conventio... | [
{
"code": null,
"e": 2468,
"s": 2242,
"text": "The controller as the name indicates controls the application. It acts like a bridge between models and views. Controllers handle request data, makes sure that correct models are called and right response or view is rendered."
},
{
"code": null,... |
How to stop the Azure VM using Azure CLI in PowerShell? | To stop the azure VM using Azure CLI we can use the az vm stop command. Before running this command make sure that you are connected to the Azure account and the proper Azure subscription.
When we run this command, we need to provide the Azure VM name (-n) and the resource group name (-g).
PS C:\> az vm stop -n Win2k16... | [
{
"code": null,
"e": 1251,
"s": 1062,
"text": "To stop the azure VM using Azure CLI we can use the az vm stop command. Before running this command make sure that you are connected to the Azure account and the proper Azure subscription."
},
{
"code": null,
"e": 1353,
"s": 1251,
"t... |
Hibernate - One-to-Many Mappings | A One-to-Many mapping can be implemented using a Set java collection that does not contain any duplicate element. We already have seen how to map Set collection in hibernate, so if you already learned Set mapping then you are all set to go with one-to-many mapping.
A Set is mapped with a <set> element in the mapping ta... | [
{
"code": null,
"e": 2329,
"s": 2063,
"text": "A One-to-Many mapping can be implemented using a Set java collection that does not contain any duplicate element. We already have seen how to map Set collection in hibernate, so if you already learned Set mapping then you are all set to go with one-to-m... |
DeepPiCar — Part 2: Raspberry Pi Setup and PiCar Assembly | by David Tian | Towards Data Science | Welcome back! In this guide, we will first go over what hardware to purchase and why we need them. Next, we will set them up so that we will have a PiCar running in our living room by the end of this article.
1 x Raspberry Pi 3 Model B+ kit with 2.5A Power Supply ($50) This is the brain of your DeepPiCar. This latest m... | [
{
"code": null,
"e": 380,
"s": 171,
"text": "Welcome back! In this guide, we will first go over what hardware to purchase and why we need them. Next, we will set them up so that we will have a PiCar running in our living room by the end of this article."
},
{
"code": null,
"e": 870,
... |
Python | sympy.solve() method | 12 Jun, 2019
With the help of sympy.solve(expression) method, we can solve the mathematical equations easily and it will return the roots of the equation that is provided as parameter using sympy.solve() method.
Syntax : sympy.solve(expression)Return : Return the roots of the equation.
Example #1 :In this example we ca... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Jun, 2019"
},
{
"code": null,
"e": 227,
"s": 28,
"text": "With the help of sympy.solve(expression) method, we can solve the mathematical equations easily and it will return the roots of the equation that is provided as parameter usin... |
Collectors partitioningBy() method in Java | 06 Dec, 2018
Collectors partitioningBy() method is a predefined method of java.util.stream.Collectors class which is used to partition a stream of objects(or a set of elements) based on a given predicate. There are two overloaded variants of the method that are present. One takes only a predicate as a parameter whereas... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Dec, 2018"
},
{
"code": null,
"e": 407,
"s": 28,
"text": "Collectors partitioningBy() method is a predefined method of java.util.stream.Collectors class which is used to partition a stream of objects(or a set of elements) based on a ... |
Maximum Length Bitonic Subarray | Set 1 (O(n) time and O(n) space) | 12 Jan, 2022
Given an array A[0 ... n-1] containing n positive integers, a subarray A[i ... j] is bitonic if there is a k with i <= k <= j such that A[i] <= A[i + 1] ... = A[k + 1] >= .. A[j – 1] > = A[j]. Write a function that takes an array as argument and returns the length of the maximum length bitonic subarray. Ex... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 Jan, 2022"
},
{
"code": null,
"e": 890,
"s": 54,
"text": "Given an array A[0 ... n-1] containing n positive integers, a subarray A[i ... j] is bitonic if there is a k with i <= k <= j such that A[i] <= A[i + 1] ... = A[k + 1] >= .. ... |
Password encryption in Node.js using bcryptjs module | 18 Oct, 2021
While submitting a form, there are some sensitive data (like passwords) that must not be visible to anyone, not even to the database admin. To avoid the sensitive data being visible from anyone, Node.js uses “bcryptjs”.
This module enables storing of passwords as hashed passwords instead of plaintext.
Inst... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Oct, 2021"
},
{
"code": null,
"e": 248,
"s": 28,
"text": "While submitting a form, there are some sensitive data (like passwords) that must not be visible to anyone, not even to the database admin. To avoid the sensitive data being v... |
WML | Introduction | 02 Mar, 2020
WML stands for Wireless Markup Language (WML) which is based on HTML and HDML. It is specified as an XML document type. It is a markup language used to develop websites for mobile phones. While designing with WML, constraints of wireless devices such as small display screens, limited memory, low bandwidth ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Mar, 2020"
},
{
"code": null,
"e": 1211,
"s": 28,
"text": "WML stands for Wireless Markup Language (WML) which is based on HTML and HDML. It is specified as an XML document type. It is a markup language used to develop websites for m... |
Program to print the Diagonals of a Matrix | 20 Apr, 2021
Given a 2D square matrix, print the Principal and Secondary diagonals.
Examples :
Input:
4
1 2 3 4
4 3 2 1
7 8 9 6
6 5 4 3
Output:
Principal Diagonal: 1, 3, 9, 3
Secondary Diagonal: 4, 2, 8, 6
Input:
3
1 1 1
1 1 1
1 1 1
Output:
Principal Diagonal: 1, 1, 1
Secondary Diagonal: 1, 1, 1
For example, consid... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Apr, 2021"
},
{
"code": null,
"e": 124,
"s": 52,
"text": "Given a 2D square matrix, print the Principal and Secondary diagonals. "
},
{
"code": null,
"e": 136,
"s": 124,
"text": "Examples : "
},
{
"code":... |
Maximum circular subarray sum of size K | 03 Jun, 2021
Given an array arr of size N and an integer K, the task is to find the maximum sum subarray of size k among all contiguous sub-array (considering circular subarray also).
Examples:
Input: arr = {18, 4, 3, 4, 5, 6, 7, 8, 2, 10}, k = 3 Output: max circular sum = 32 start index = 9 end index = 1 Explanation:... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Jun, 2021"
},
{
"code": null,
"e": 225,
"s": 54,
"text": "Given an array arr of size N and an integer K, the task is to find the maximum sum subarray of size k among all contiguous sub-array (considering circular subarray also)."
... |
C Program For Inserting A Node In A Linked List | 22 Dec, 2021
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 the linked list.
C
// A linked list nodestruct Node{ int data; struct Node *next;};
In... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Dec, 2021"
},
{
"code": null,
"e": 264,
"s": 28,
"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 post... |
Wfuzz Download – Web Application Password Cracker in Kali Linux | 14 Sep, 2021
Brute-Forcing is the technique to discover the hidden directories and files on the target server. We can even brute-force usernames and passwords. All this process is done through an automated tool. Quickly Request-Response methodology is executed on the domain. Wfuzz tool is an automated tool used to perf... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 626,
"s": 28,
"text": "Brute-Forcing is the technique to discover the hidden directories and files on the target server. We can even brute-force usernames and passwords. All this process is done thr... |
Python | Difference of two lists including duplicates | 13 May, 2019
The ways to find difference of two lists has been discussed earlier, but sometimes, we require to remove only the specific occurrences of the elements as much they occur in other list. Let’s discuss certain ways in which this can be performed.
Method #1 : Using collections.Counter()The Counter method can b... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 May, 2019"
},
{
"code": null,
"e": 272,
"s": 28,
"text": "The ways to find difference of two lists has been discussed earlier, but sometimes, we require to remove only the specific occurrences of the elements as much they occur in ot... |
Python | Extract only characters from given string | 03 Apr, 2019
Given a string, the task is to extract only alphabetical characters from a string. Given below are few methods to solve the given problem.
Method #1: Using re.split
# Python code to demonstrate# to get characters from stringimport re # initialising stringini_string = "123()#$ABGFDabcjw"ini_string2 = "abce... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Apr, 2019"
},
{
"code": null,
"e": 167,
"s": 28,
"text": "Given a string, the task is to extract only alphabetical characters from a string. Given below are few methods to solve the given problem."
},
{
"code": null,
"e":... |
jQuery - Interaction Drag-able | The Drag-able function can be used with interactions in JqueryUI.This function can enable drag-able functionality on any DOM element.We can drag the drag-able element by clicking on it with mouse.
Here is the simple syntax to use drag-able −
$( "#draggable" ).draggable();
Following is a simple example showing the usa... | [
{
"code": null,
"e": 2519,
"s": 2322,
"text": "The Drag-able function can be used with interactions in JqueryUI.This function can enable drag-able functionality on any DOM element.We can drag the drag-able element by clicking on it with mouse."
},
{
"code": null,
"e": 2564,
"s": 2519... |
HBase - Listing Table | list is the command that is used to list all the tables in HBase. Given below is the syntax of the list command.
hbase(main):001:0 > list
When you type this command and execute in HBase prompt, it will display the list of all the tables in HBase as shown below.
hbase(main):001:0> list
TABLE
emp
Here you can observe a... | [
{
"code": null,
"e": 2150,
"s": 2037,
"text": "list is the command that is used to list all the tables in HBase. Given below is the syntax of the list command."
},
{
"code": null,
"e": 2176,
"s": 2150,
"text": "hbase(main):001:0 > list\n"
},
{
"code": null,
"e": 2300,... |
Implementing Checksum Using Java | Following is the code to implement Checksum using Java −
Live Demo
import java.util.*;
public class Demo{
public static void main(String args[]){
Scanner my_scan = new Scanner(System.in);
System.out.println("Enter the input string ");
String my_in = my_scan.next();
int my_checksum = generate... | [
{
"code": null,
"e": 1119,
"s": 1062,
"text": "Following is the code to implement Checksum using Java −"
},
{
"code": null,
"e": 1130,
"s": 1119,
"text": " Live Demo"
},
{
"code": null,
"e": 4009,
"s": 1130,
"text": "import java.util.*;\npublic class Demo{\n ... |
GATE | GATE CS 2018 | Question 9 - GeeksforGeeks | 22 Feb, 2018
If pqr ≠ 0 and , what is the value of the product xyz ?
(A) -1(B) 1 / pqr(C) 1(D) pqrAnswer: (C)Explanation: Taking logs of given three values,we get
1/q = p-x -------(1)
1/r = q-y -------(2)
1/p = r-z -------(3)
1/q = p-x
= r-xz [Putting value of p from (3)]
= q-xyz [Putting value of r from (2)... | [
{
"code": null,
"e": 23951,
"s": 23923,
"text": "\n22 Feb, 2018"
},
{
"code": null,
"e": 24008,
"s": 23951,
"text": "If pqr ≠ 0 and , what is the value of the product xyz ?"
},
{
"code": null,
"e": 24102,
"s": 24008,
"text": "(A) -1(B) 1 / pqr(C) 1(D) pqrAnsw... |
Python Creating Blockchain | A blockchain contains a list of blocks chained to each other. To store the entire list, we will create a list variable called TPCoins −
TPCoins = []
We will also write a utility method called dump_blockchain for dumping the contents of the entire blockchain. We first print the length of the blockchain so that we know ... | [
{
"code": null,
"e": 2131,
"s": 1995,
"text": "A blockchain contains a list of blocks chained to each other. To store the entire list, we will create a list variable called TPCoins −"
},
{
"code": null,
"e": 2145,
"s": 2131,
"text": "TPCoins = []\n"
},
{
"code": null,
... |
How to implement Dependency Injection using Property in C#? | The process of injecting (converting) coupled (dependent) objects into decoupled (independent) objects is called Dependency Injection.
Types of Dependency Injection
There are four types of DI −
Constructor Injection
Constructor Injection
Setter Injection
Setter Injection
Interface-based injection
Interface-based inject... | [
{
"code": null,
"e": 1197,
"s": 1062,
"text": "The process of injecting (converting) coupled (dependent) objects into decoupled (independent) objects is called Dependency Injection."
},
{
"code": null,
"e": 1227,
"s": 1197,
"text": "Types of Dependency Injection"
},
{
"co... |
Python | Pandas Series.loc - GeeksforGeeks | 28 Jan, 2019
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 series is a One-dimensional ndarray with axis labels. The labels need not be unique bu... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n28 Jan, 2019"
},
{
"code": null,
"e": 24115,
"s": 23901,
"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 a... |
Water the plants | Practice | GeeksforGeeks | A gallery with plants is divided into n parts, numbered : 0,1,2,3...n-1. There are provisions for attaching water sprinklers at every partition. A sprinkler with range x at partition i can water all partitions from i-x to i+x.
Given an array gallery[ ] consisting of n integers, where gallery[i] is the range of sprinkle... | [
{
"code": null,
"e": 808,
"s": 238,
"text": "A gallery with plants is divided into n parts, numbered : 0,1,2,3...n-1. There are provisions for attaching water sprinklers at every partition. A sprinkler with range x at partition i can water all partitions from i-x to i+x.\nGiven an array gallery[ ] c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.