title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Explain BLOB object and tree object in Git. | Git uses a series of BLOBs and trees to store content of the working directory of a project. Whenever we perform a commit operation, Git internally creates a series of trees and BLOBs, which is the binary representation of the project folder structure at that point in time of commit.
BLOB stands for Binary Large Object... | [
{
"code": null,
"e": 1347,
"s": 1062,
"text": "Git uses a series of BLOBs and trees to store content of the working directory of a project. Whenever we perform a commit operation, Git internally creates a series of trees and BLOBs, which is the binary representation of the project folder structure a... |
The return Statement in Python | The statement return [expression] exits a function, optionally passing back an expression to the caller. A return statement with no arguments is the same as return None.
All the above examples are not returning any value. You can return a value from a function as follows −
Live Demo
#!/usr/bin/python
Function definiti... | [
{
"code": null,
"e": 1232,
"s": 1062,
"text": "The statement return [expression] exits a function, optionally passing back an expression to the caller. A return statement with no arguments is the same as return None."
},
{
"code": null,
"e": 1336,
"s": 1232,
"text": "All the abov... |
Automatically run SAP transactions out of Excel | by Jesko Rehberg | Towards Data Science | Do you frequently have to execute SAP transactions with specific filter parameters and export the result as an Excel file? If so, and if you want to automate these steps using Excel VBA and SAP scripts, this is your story. Out of an Excel file we will automatically run SAP transactions with defined filters/settings, ex... | [
{
"code": null,
"e": 804,
"s": 172,
"text": "Do you frequently have to execute SAP transactions with specific filter parameters and export the result as an Excel file? If so, and if you want to automate these steps using Excel VBA and SAP scripts, this is your story. Out of an Excel file we will aut... |
ASP.NET WP - View Engines | The View Engine in ASP.NET is used to translate our views to HTML and then render them to the browser. By default, ASP.Net supports ASPX and the Razor View Engine. The view engine templates have a different syntax than the implementation. In this chapter, we will discuss the two most important view engines which are −
... | [
{
"code": null,
"e": 2605,
"s": 2285,
"text": "The View Engine in ASP.NET is used to translate our views to HTML and then render them to the browser. By default, ASP.Net supports ASPX and the Razor View Engine. The view engine templates have a different syntax than the implementation. In this chapte... |
5 Most Difficult Programming Languages of the World - GeeksforGeeks | 22 Sep, 2019
You might have written your first code in programming languages such as C/C++ or Java and might have faced difficulty learning these languages. Well, these languages are at least readable or understandable but what if we say to write a program printing ‘Hello World!‘ using spaces, tabs, and linefeeds only.... | [
{
"code": null,
"e": 24531,
"s": 24503,
"text": "\n22 Sep, 2019"
},
{
"code": null,
"e": 25229,
"s": 24531,
"text": "You might have written your first code in programming languages such as C/C++ or Java and might have faced difficulty learning these languages. Well, these languag... |
How to check Android Phone Model programmatically? | This example demonstrate about How to check Android Phone Model programmatically.
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" ?>
<... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "This example demonstrate about How to check Android Phone Model programmatically."
},
{
"code": null,
"e": 1273,
"s": 1144,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required deta... |
Scala - Logical Operators | Try the following example program to understand all the logical operators available in Scala Programming Language.
object Demo {
def main(args: Array[String]) {
var a = true;
var b = false;
println("a && b = " + (a&&b) );
println("a || b = " + (a||b) );
println("!(a && b)... | [
{
"code": null,
"e": 2113,
"s": 1998,
"text": "Try the following example program to understand all the logical operators available in Scala Programming Language."
},
{
"code": null,
"e": 2346,
"s": 2113,
"text": "object Demo {\n def main(args: Array[String]) {\n var a = tr... |
Apache POI - Cells | Any data that you enter into a spreadsheet is always stored in a cell. We use the labels of rows and columns to identify a cell. This chapter describes how to manipulate data in cells in a spreadsheet using Java programming.
You need to create a row before creating a cell. A row is nothing but a collection of cells.
Th... | [
{
"code": null,
"e": 2129,
"s": 1904,
"text": "Any data that you enter into a spreadsheet is always stored in a cell. We use the labels of rows and columns to identify a cell. This chapter describes how to manipulate data in cells in a spreadsheet using Java programming."
},
{
"code": null,
... |
C - Memory Management | This chapter explains dynamic memory management in C. The C programming language provides several functions for memory allocation and management. These functions can be found in the <stdlib.h> header file.
void *calloc(int num, int size);
This function allocates an array of num elements each of which size in bytes will... | [
{
"code": null,
"e": 2290,
"s": 2084,
"text": "This chapter explains dynamic memory management in C. The C programming language provides several functions for memory allocation and management. These functions can be found in the <stdlib.h> header file."
},
{
"code": null,
"e": 2323,
... |
How to connect SQL Server database from JavaScript in the browser ? - GeeksforGeeks | 16 Nov, 2021
There is no common way to connect to SQL Server database from JavaScript client, every browser has it’s own API and packages to connect to SQL Server. For example, in Windows operating system, Internet Explorer has a class name called ActiveXObject which is used to create instances of OLE Automation object... | [
{
"code": null,
"e": 25195,
"s": 25167,
"text": "\n16 Nov, 2021"
},
{
"code": null,
"e": 26414,
"s": 25195,
"text": "There is no common way to connect to SQL Server database from JavaScript client, every browser has it’s own API and packages to connect to SQL Server. For example,... |
Find the nth term of the series 0, 8, 64, 216, 512, . . . - GeeksforGeeks | 06 Apr, 2021
Given an integer N, the task is to find the Nth term of the following series:
0, 8, 64, 216, 512, 1000, 1728, . . .
Examples:
Input: N = 6 Output: 1000Input: N = 5 Output: 512
Approach:
Given series 0, 8, 64, 216, 512, 1000, 1728, ... can also be written as 0 * (02), 2 * (22), 4 * (42), 6 * (62... | [
{
"code": null,
"e": 24493,
"s": 24465,
"text": "\n06 Apr, 2021"
},
{
"code": null,
"e": 24573,
"s": 24493,
"text": "Given an integer N, the task is to find the Nth term of the following series: "
},
{
"code": null,
"e": 24613,
"s": 24573,
"text": "0, 8, 64, ... |
Environments, Conda, Pip, aaaaah! | by Dennis Bakhuis | Towards Data Science | There are many ways to install Python and unfortunately, it is very easy to create a mess. In this blog post I describe a method that works pretty well. I am aware of other great solutions, but this is generally the way I recommend, especially to beginners.
👉 This is part of my Python-10-minutes-a-day course!
While th... | [
{
"code": null,
"e": 429,
"s": 171,
"text": "There are many ways to install Python and unfortunately, it is very easy to create a mess. In this blog post I describe a method that works pretty well. I am aware of other great solutions, but this is generally the way I recommend, especially to beginner... |
Swift - Tuples | Swift 4 also introduces Tuples type, which are used to group multiple values in a single compound Value.
The values in a tuple can be of any type, and do not need to be of same type.
For example, ("Tutorials Point", 123) is a tuple with two values, one of string Type, and other is integer type. It is a legal command.
l... | [
{
"code": null,
"e": 2358,
"s": 2253,
"text": "Swift 4 also introduces Tuples type, which are used to group multiple values in a single compound Value."
},
{
"code": null,
"e": 2436,
"s": 2358,
"text": "The values in a tuple can be of any type, and do not need to be of same type.... |
Rearrange An Array In Order – Smallest, Largest, 2nd Smallest, 2nd Largest,. Using C++ | We are given an array; we need to arrange this array in an order that the first element should be a minimum element, the second element should be a maximum element, the third element should be 2nd minimum element, the fourth element should be the 2nd maximum element and so on for example −
Input : arr[ ] = { 13, 34, 30... | [
{
"code": null,
"e": 1353,
"s": 1062,
"text": "We are given an array; we need to arrange this array in an order that the first element should be a minimum element, the second element should be a maximum element, the third element should be 2nd minimum element, the fourth element should be the 2nd ma... |
C# | ToUpper() Method - GeeksforGeeks | 31 Jan, 2019
In C#, ToUpper() is a string method. It converts every characters to uppercase (if there an an uppercase version). If a character does not have an uppercase equivalent, it remains unchanged. For example, special symbols remain unchanged. This method can be overloaded by passing different type of arguments ... | [
{
"code": null,
"e": 24436,
"s": 24408,
"text": "\n31 Jan, 2019"
},
{
"code": null,
"e": 24750,
"s": 24436,
"text": "In C#, ToUpper() is a string method. It converts every characters to uppercase (if there an an uppercase version). If a character does not have an uppercase equiva... |
Finding intersection of multiple arrays - JavaScript | We are required to write a JavaScript function that takes in any arbitrary number of arrays and returns an array of elements that are common to all arrays. If there are no common elements, then we should return an empty array.
Let’s say the following are our arrays −
const arr1 = [2, 6, 7, 1, 7, 8, 4, 3];
const arr2 = ... | [
{
"code": null,
"e": 1289,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in any arbitrary number of arrays and returns an array of elements that are common to all arrays. If there are no common elements, then we should return an empty array."
},
{
"code": null... |
ALTER table by adding AUTOINCREMENT in MySQL? | To add AUTOINCREMENT in MySQL, you can use the ALTER command.
ALTER TABLE yourTableName change yourColumName yourColumnName dataType AUTO_INCREMENT PRIMARY KEY;
To understand the above concept, create a table with a column. Let us create a table −
mysql> create table AlterTableToAddAutoIncrement
-> (
-> StudentId... | [
{
"code": null,
"e": 1124,
"s": 1062,
"text": "To add AUTOINCREMENT in MySQL, you can use the ALTER command."
},
{
"code": null,
"e": 1223,
"s": 1124,
"text": "ALTER TABLE yourTableName change yourColumName yourColumnName dataType AUTO_INCREMENT PRIMARY KEY;"
},
{
"code":... |
Linked List Cycle II in C++ | Consider we have a linked list, and we have to check whether there is any cycle or not. To represent the cycle in the given linked list, we will use one integer pointer called pos. This pos represents a position in the linked list where tail is connected. So if pos is -1, then there is no cycle present in the linked li... | [
{
"code": null,
"e": 1569,
"s": 1062,
"text": "Consider we have a linked list, and we have to check whether there is any cycle or not. To represent the cycle in the given linked list, we will use one integer pointer called pos. This pos represents a position in the linked list where tail is connecte... |
Getting Started With Network Datasets | by ASHISH RANA | Towards Data Science | Have you ever wondered what might be reason behind videos, memes and posts going viral in this social age. What makes them propagate throughout the world and make them popular. Let’s analyze this phenomenon with underlying structures behind the internet i.e. the network of people. And try to understand this phenomenon ... | [
{
"code": null,
"e": 551,
"s": 172,
"text": "Have you ever wondered what might be reason behind videos, memes and posts going viral in this social age. What makes them propagate throughout the world and make them popular. Let’s analyze this phenomenon with underlying structures behind the internet i... |
Machine learning for anomaly detection: Elliptic Envelope | by Mahbubul Alam | Towards Data Science | Welcome back to anomaly detection; this is 6th in a series of “bite-sized” data science focusing on outlier detection. Today I am writing about a machine learning algorithm called EllipticEnvelope , which is yet another tool in data scientists’ toolbox for fraud/anomaly/outlier detection.
In case you have missed my pre... | [
{
"code": null,
"e": 461,
"s": 171,
"text": "Welcome back to anomaly detection; this is 6th in a series of “bite-sized” data science focusing on outlier detection. Today I am writing about a machine learning algorithm called EllipticEnvelope , which is yet another tool in data scientists’ toolbox fo... |
C++ STL | Set 2 (pair) | Practice | GeeksforGeeks | Implement different operations on pairs.
Input:
The first line of input contains an integer T denoting the no of test cases . Then T test cases follow. The first line of input contains an integer Q denoting the no of queries . Then in the next line are Q space separated queries .
A query can be of five types
1. a s x... | [
{
"code": null,
"e": 986,
"s": 238,
"text": "Implement different operations on pairs.\n\nInput:\nThe first line of input contains an integer T denoting the no of test cases . Then T test cases follow. The first line of input contains an integer Q denoting the no of queries . Then in the next line ar... |
Complex Numbers in Python | Set 3 (Trigonometric and Hyperbolic Functions) - GeeksforGeeks | 04 Feb, 2020
Some of the Important Complex number functions are discussed in the articles below
Complex Numbers in Python | Set 1 (Introduction)Complex Numbers in Python | Set 2 (Important Functions and constants)
Trigonometric and Hyperbolic Functions are discussed in this article.
Trigonometric Functions
1. sin() : T... | [
{
"code": null,
"e": 25176,
"s": 25148,
"text": "\n04 Feb, 2020"
},
{
"code": null,
"e": 25259,
"s": 25176,
"text": "Some of the Important Complex number functions are discussed in the articles below"
},
{
"code": null,
"e": 25377,
"s": 25259,
"text": "Complex... |
Python - tensorflow.math.confusion_matrix() - GeeksforGeeks | 08 Dec, 2021
TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks. confusion_matrix() is used to find the confusion matrix from predictions and labels.
Syntax: tensorflow.math.confusion_matrix( labels, predictions, num_classes, weights, dtype... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n08 Dec, 2021"
},
{
"code": null,
"e": 24118,
"s": 23901,
"text": "TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks. confusion_matrix() is used to f... |
Difference between body.onload() and document.ready() function - GeeksforGeeks | 01 Jul, 2021
The body.onload() event will be called once the DOM and all associated resources like images got loaded. Basically, onload() will be called when the page has been fully loaded with entire images, iframes and stylesheets, etc.
For example, if our page contains a larger size image, so onload() event will wai... | [
{
"code": null,
"e": 24921,
"s": 24893,
"text": "\n01 Jul, 2021"
},
{
"code": null,
"e": 25147,
"s": 24921,
"text": "The body.onload() event will be called once the DOM and all associated resources like images got loaded. Basically, onload() will be called when the page has been ... |
Generate Fibonacci Series | The Fibonacci sequence is like this,
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55,......
In this sequence, the nth term is the sum of (n-1)'th and (n-2)'th terms.
To generate we can use the recursive approach, but in dynamic programming, the procedure is simpler. It can store all Fibonacci numbers in a table, by using that tabl... | [
{
"code": null,
"e": 1099,
"s": 1062,
"text": "The Fibonacci sequence is like this,"
},
{
"code": null,
"e": 1142,
"s": 1099,
"text": "0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55,......"
},
{
"code": null,
"e": 1216,
"s": 1142,
"text": "In this sequence, the nth term ... |
Minimum Swaps required to group all 1s together | Practice | GeeksforGeeks | Given an array of 0’s and 1’s, we need to write a program to find the minimum number of swaps required to group all 1’s present in the array together.
Example 1:
​Input : arr[ ] = {1, 0, 1, 0, 1}
Output : 1
Explanation:
Only 1 swap is required to group all 1's together.
Swapping index 1 and 4 will give arr[] = {1, ... | [
{
"code": null,
"e": 389,
"s": 238,
"text": "Given an array of 0’s and 1’s, we need to write a program to find the minimum number of swaps required to group all 1’s present in the array together."
},
{
"code": null,
"e": 400,
"s": 389,
"text": "Example 1:"
},
{
"code": nu... |
How can I get the output of a Matplotlib plot as an SVG? | Just using the savefig method of the pyplot package and mentioning the file format, we can save the output as a SVG format.
Create fig and ax variables using subplots method, where default nrows and ncols are 1.
Create fig and ax variables using subplots method, where default nrows and ncols are 1.
Create xpoints and y... | [
{
"code": null,
"e": 1186,
"s": 1062,
"text": "Just using the savefig method of the pyplot package and mentioning the file format, we can save the output as a SVG format."
},
{
"code": null,
"e": 1274,
"s": 1186,
"text": "Create fig and ax variables using subplots method, where d... |
“roc_auc_score” Can Be Calculated Also for Regression Models | by Samuele Mazzanti | Towards Data Science | You work as a data scientist for an auction company, and your boss asks you to build a model to predict the hammer price (i.e. the final selling price) of the items on sale. Such a model will serve two purposes:
setting a meaningful opening bid for each item;placing the most expensive items at periodic intervals during... | [
{
"code": null,
"e": 384,
"s": 172,
"text": "You work as a data scientist for an auction company, and your boss asks you to build a model to predict the hammer price (i.e. the final selling price) of the items on sale. Such a model will serve two purposes:"
},
{
"code": null,
"e": 567,
... |
Program to find smallest intersecting element of each row in a matrix in Python | Suppose we have a 2D matrix where each row is sorted in ascending order. We have to find the smallest number that exists in every row. If there's no such result, then return −1.
So, if the input is like
then the output will be 5
To solve this, we will follow these steps −
if matrix is empty, thenreturn −1
if matrix is ... | [
{
"code": null,
"e": 1240,
"s": 1062,
"text": "Suppose we have a 2D matrix where each row is sorted in ascending order. We have to find the smallest number that exists in every row. If there's no such result, then return −1."
},
{
"code": null,
"e": 1265,
"s": 1240,
"text": "So, ... |
Time Series - Walk Forward Validation | In time series modelling, the predictions over time become less and less accurate and hence it is a more realistic approach to re-train the model with actual data as it gets available for further predictions. Since training of statistical models are not time consuming, walk-forward validation is the most preferred solu... | [
{
"code": null,
"e": 2496,
"s": 2141,
"text": "In time series modelling, the predictions over time become less and less accurate and hence it is a more realistic approach to re-train the model with actual data as it gets available for further predictions. Since training of statistical models are not... |
Does HTML5 Canvas support Double Buffering? | For double buffering on the canvas, create a 2nd canvas element and draw to it. After that draw the image to the first canvas using the drawImage() method,
// canvas element
var canvas1 = document.getElementById('canvas');
var context1 = canvas1.getContext('2d');
// buffer canvas
var canvas2 = document.createElement('... | [
{
"code": null,
"e": 1218,
"s": 1062,
"text": "For double buffering on the canvas, create a 2nd canvas element and draw to it. After that draw the image to the first canvas using the drawImage() method,"
},
{
"code": null,
"e": 1654,
"s": 1218,
"text": "// canvas element\nvar can... |
How to change the size of a bootstrap pill badge? - GeeksforGeeks | 27 Nov, 2020
Given an HTML document having pill badges (In case if you don’t know what a pill badge then refer to this ) and the task is to increase the size of the badge. There can be three approaches to do that. The approaches are discussed below:-
Approach 1: Using Inline styling: You can simply add a style attribut... | [
{
"code": null,
"e": 24496,
"s": 24468,
"text": "\n27 Nov, 2020"
},
{
"code": null,
"e": 24734,
"s": 24496,
"text": "Given an HTML document having pill badges (In case if you don’t know what a pill badge then refer to this ) and the task is to increase the size of the badge. Ther... |
Elo Rating Algorithm in C++ | Elo Rating Algorithm is a rating algorithm used to rank players in competitive games. The ranking of player of the competition is based on ranting which changes based on the performance of the player as follows,
For a game between two players of different ratings. Let’s say there are two players competing against each ... | [
{
"code": null,
"e": 1274,
"s": 1062,
"text": "Elo Rating Algorithm is a rating algorithm used to rank players in competitive games. The ranking of player of the competition is based on ranting which changes based on the performance of the player as follows,"
},
{
"code": null,
"e": 1389... |
string.whitespace in Python | In this tutorial, we are going to learn about the string.whitespace.
The string whitespace is pre-defined in the string module of Python3. If contains space, tab,
linefeed, return, formfeed, and vertical tab.
Live Demo
# importing the string module
import string
# printing a string
print("Hello")
# whitespace printing... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "In this tutorial, we are going to learn about the string.whitespace."
},
{
"code": null,
"e": 1271,
"s": 1131,
"text": "The string whitespace is pre-defined in the string module of Python3. If contains space, tab,\nlinefeed, return, ... |
How to avoid a new line with tag? - GeeksforGeeks | 25 Jun, 2021
The p tag in HTML represents a paragraph. It is a block-level element which means that the text which is present inside the paragraph tag is considered as a block and it takes up the full width available. By default, the browser applies a line break before and after the p tag to separate the paragraphs. We... | [
{
"code": null,
"e": 24894,
"s": 24866,
"text": "\n25 Jun, 2021"
},
{
"code": null,
"e": 25263,
"s": 24894,
"text": "The p tag in HTML represents a paragraph. It is a block-level element which means that the text which is present inside the paragraph tag is considered as a block ... |
How to search a word by capital or small letter in MySQL? | You can use BINARY along with the LIKE operator. Let us first create a table −
mysql> create table DemoTable
(
Header text
);
Query OK, 0 rows affected (1.09 sec)
Insert records in the table using insert command −
mysql> insert into DemoTable values('Programming tutorials on MySQL');
Query OK, 1 row affected (... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "You can use BINARY along with the LIKE operator. Let us first create a table −"
},
{
"code": null,
"e": 1234,
"s": 1141,
"text": "mysql> create table DemoTable\n (\n Header text\n );\nQuery OK, 0 rows affected (1.09 sec)"
},
... |
How to convert a string in uppercase in Golang? - GeeksforGeeks | 26 Aug, 2019
In Go language, strings are different from other languages like Java, C++, Python, etc. It is a sequence of variable-width characters where each and every character is represented by one or more bytes using UTF-8 Encoding.In Go string, you are allowed to convert a string in the uppercase using the followin... | [
{
"code": null,
"e": 24047,
"s": 24019,
"text": "\n26 Aug, 2019"
},
{
"code": null,
"e": 24503,
"s": 24047,
"text": "In Go language, strings are different from other languages like Java, C++, Python, etc. It is a sequence of variable-width characters where each and every characte... |
Introduction to Datapane: A Python Library to Build Interactive Reports | by Khuyen Tran | Towards Data Science | For many Python data analyses, sometimes you want to share your findings with others. Showing your work will help your team and manager keep up-to-date with your progress and build your reputation as a data scientist in your network. I mentioned about how sharing my work has leveraged my career in this article:
towards... | [
{
"code": null,
"e": 485,
"s": 172,
"text": "For many Python data analyses, sometimes you want to share your findings with others. Showing your work will help your team and manager keep up-to-date with your progress and build your reputation as a data scientist in your network. I mentioned about how... |
C# Variables | Variables are containers for storing data values.
In C#, there are different types of variables (defined with different keywords), for example:
int - stores integers (whole numbers), without decimals, such as 123 or -123
double - stores floating point numbers, with decimals, such as 19.99 or -19.99
char - stores singl... | [
{
"code": null,
"e": 51,
"s": 0,
"text": "Variables are containers for storing data values. "
},
{
"code": null,
"e": 145,
"s": 51,
"text": "In C#, there are different types of variables (defined with different keywords), for example:"
},
{
"code": null,
"e": 222,
... |
Generate all rotations of a given string - GeeksforGeeks | 02 Nov, 2021
Given a string S. The task is to print all the possible rotated strings of the given string.
Examples:
Input : S = "geeks"
Output : geeks
eeksg
eksge
ksgee
sgeek
Input : S = "abc"
Output : abc
bca
cab
Method 1 (Simple) The idea is to run a loop from ... | [
{
"code": null,
"e": 25236,
"s": 25208,
"text": "\n02 Nov, 2021"
},
{
"code": null,
"e": 25329,
"s": 25236,
"text": "Given a string S. The task is to print all the possible rotated strings of the given string."
},
{
"code": null,
"e": 25340,
"s": 25329,
"text"... |
Distinct adjacent elements in an array - GeeksforGeeks | 23 Jun, 2021
Given an array, find whether it is possible to obtain an array having distinct neighbouring elements by swapping two neighbouring array elements.Examples:
Input : 1 1 2
Output : YES
swap 1 (second last element) and 2 (last element),
to obtain 1 2 1, which has distinct neighbouring
elements .
Input : 7 ... | [
{
"code": null,
"e": 25084,
"s": 25056,
"text": "\n23 Jun, 2021"
},
{
"code": null,
"e": 25240,
"s": 25084,
"text": "Given an array, find whether it is possible to obtain an array having distinct neighbouring elements by swapping two neighbouring array elements.Examples: "
},
... |
Depth First Search or DFS for a Graph - GeeksforGeeks | 30 Jan, 2022
Depth First Traversal (or Search) for a graph is similar to Depth First Traversal of a tree. The only catch here is, unlike trees, graphs may contain cycles (a node may be visited twice). To avoid processing a node more than once, use a boolean visited array.
Example:
Input: n = 4, e = 6 0 -> 1, 0 -> 2, ... | [
{
"code": null,
"e": 30545,
"s": 30517,
"text": "\n30 Jan, 2022"
},
{
"code": null,
"e": 30806,
"s": 30545,
"text": "Depth First Traversal (or Search) for a graph is similar to Depth First Traversal of a tree. The only catch here is, unlike trees, graphs may contain cycles (a nod... |
SQL at Scale with Apache Spark SQL and DataFrames — Concepts, Architecture and Examples | by Dipanjan (DJ) Sarkar | Towards Data Science | This article covers detailed concepts pertaining to Spark, SQL and DataFrames. Besides this we also cover a hands-on case study around working with SQL at scale using Spark SQL and DataFrames. If the article seems a bit overwhelming or really long to you at the first glance, feel free to check out the same in more bite... | [
{
"code": null,
"e": 547,
"s": 172,
"text": "This article covers detailed concepts pertaining to Spark, SQL and DataFrames. Besides this we also cover a hands-on case study around working with SQL at scale using Spark SQL and DataFrames. If the article seems a bit overwhelming or really long to you ... |
Find missing number in a sequence in C# | Set a list.
List<int> myList = new List<int>(){1, 2, 3, 5, 8, 9};
Now, get the first and last elements −
int a = myList.OrderBy(x => x).First();
int b = myList.OrderBy(x => x).Last();
In a new list, get all the elements and use the Except to get the missing numbers −
List<int> myList2 = Enumerable.Range(a, b - a + 1).T... | [
{
"code": null,
"e": 1074,
"s": 1062,
"text": "Set a list."
},
{
"code": null,
"e": 1128,
"s": 1074,
"text": "List<int> myList = new List<int>(){1, 2, 3, 5, 8, 9};"
},
{
"code": null,
"e": 1167,
"s": 1128,
"text": "Now, get the first and last elements −"
},
... |
Completely Randomized Design with R Programming - GeeksforGeeks | 23 Oct, 2020
Experimental Designs are part of ANOVA in statistics. They are predefined algorithms that help us in analyzing the differences among group means in an experimental unit. Completely Randomized Design (CRD) is one part of the Anova types.
Completely Randomized Design:
The three basic principles of designing ... | [
{
"code": null,
"e": 25242,
"s": 25214,
"text": "\n23 Oct, 2020"
},
{
"code": null,
"e": 25479,
"s": 25242,
"text": "Experimental Designs are part of ANOVA in statistics. They are predefined algorithms that help us in analyzing the differences among group means in an experimental... |
C library function - memset() | The C library function void *memset(void *str, int c, size_t n) copies the character c (an unsigned char) to the first n characters of the string pointed to, by the argument str.
Following is the declaration for memset() function.
void *memset(void *str, int c, size_t n)
str − This is a pointer to the block of memory t... | [
{
"code": null,
"e": 2186,
"s": 2007,
"text": "The C library function void *memset(void *str, int c, size_t n) copies the character c (an unsigned char) to the first n characters of the string pointed to, by the argument str."
},
{
"code": null,
"e": 2238,
"s": 2186,
"text": "Fol... |
Explain the Difference Between Definition and Declaration | In this post, we will understand the difference between definition and declaration.
Definition, with respect to a function indicates that the body of the function has been developed.
Definition, with respect to a function indicates that the body of the function has been developed.
With respect to variable, it means a v... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "In this post, we will understand the difference between definition and declaration."
},
{
"code": null,
"e": 1245,
"s": 1146,
"text": "Definition, with respect to a function indicates that the body of the function has been developed.... |
Binary Tree to Binary Search Tree Conversion in C++ | A binary tree is a special type of tree in which each node of the tree can have at most two child nodes. These child nodes are known as the right child and left child.
A simple binary tree is −
Binary search tree (BST) is a special type of tree which follows the following rules −
left child node’s value is always less ... | [
{
"code": null,
"e": 1230,
"s": 1062,
"text": "A binary tree is a special type of tree in which each node of the tree can have at most two child nodes. These child nodes are known as the right child and left child."
},
{
"code": null,
"e": 1256,
"s": 1230,
"text": "A simple binar... |
Private vs Protected vs Final Access Modifier in Java - GeeksforGeeks | 08 Oct, 2021
Whenever we are writing our classes, we have to provide some information about our classes to the JVM like whether this class can be accessed from anywhere or not, whether child class creation is possible or not, whether object creation is possible or not, etc. we can specify this information by using an a... | [
{
"code": null,
"e": 24858,
"s": 24830,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 25307,
"s": 24858,
"text": "Whenever we are writing our classes, we have to provide some information about our classes to the JVM like whether this class can be accessed from anywhere or not,... |
Levering cheap GPU compute: Connecting to Vast.ai using windows | by Jason Price | Towards Data Science | Venturing into the world of crypto-currency and Data-science, it was by no coincidence that I would have built my own supercomputer (by 2002 standards). The cool thing about this is that anyone can have access to cheap GPU compute, that is 3 -10 times cheaper than AWS instances. All this is made possible due to the Vas... | [
{
"code": null,
"e": 562,
"s": 172,
"text": "Venturing into the world of crypto-currency and Data-science, it was by no coincidence that I would have built my own supercomputer (by 2002 standards). The cool thing about this is that anyone can have access to cheap GPU compute, that is 3 -10 times che... |
jQuery Tutorial | jQuery is a JavaScript Library.
jQuery greatly simplifies JavaScript programming.
jQuery is easy to learn.
With our online editor, you can edit the code, and click on a button to view the result.
Click on the "Try it Yourself" button to see how it works.
Use the correct selector to hide all <p> elements.
$("").hide();
... | [
{
"code": null,
"e": 32,
"s": 0,
"text": "jQuery is a JavaScript Library."
},
{
"code": null,
"e": 82,
"s": 32,
"text": "jQuery greatly simplifies JavaScript programming."
},
{
"code": null,
"e": 107,
"s": 82,
"text": "jQuery is easy to learn."
},
{
"c... |
How to replace space between two words with underscore in an R data frame column? | To replace space between two words with underscore in an R data frame column, we can use gsub function. For example, if we have a data frame called df that contains character column x having two words having a single space between them then we can replace that space using the command dfx<−gsub("","",dfx)
Consider the b... | [
{
"code": null,
"e": 1368,
"s": 1062,
"text": "To replace space between two words with underscore in an R data frame column, we can use gsub function. For example, if we have a data frame called df that contains character column x having two words having a single space between them then we can repla... |
Python Program for Recursive Insertion Sort - GeeksforGeeks | 31 Aug, 2021
Insertion sort is a simple sorting algorithm that works the way we sort playing cards in our hands. Below is an iterative algorithm for insertion sortAlgorithm
// Sort an arr[] of size n
insertionSort(arr, n)
Loop from i = 1 to n-1.
a) Pick element arr[i] and insert
it into sorted se... | [
{
"code": null,
"e": 24956,
"s": 24928,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 25117,
"s": 24956,
"text": "Insertion sort is a simple sorting algorithm that works the way we sort playing cards in our hands. Below is an iterative algorithm for insertion sortAlgorithm "
... |
Perl ord Function | This function returns the ASCII numeric value of the character specified by EXPR, or $_ if omitted. For example, ord('A') returns a value of 65.
Following is the simple syntax for this function −
ord EXPR
ord
This function returns Integer.
Following is the example code showing its basic usage −
#!/usr/bin/perl -w
pr... | [
{
"code": null,
"e": 2365,
"s": 2220,
"text": "This function returns the ASCII numeric value of the character specified by EXPR, or $_ if omitted. For example, ord('A') returns a value of 65."
},
{
"code": null,
"e": 2416,
"s": 2365,
"text": "Following is the simple syntax for th... |
XQuery - Custom Functions | XQuery provides the capability to write custom functions. Listed below are the guidelines to create a custom function.
Use the keyword declare function to define a function.
Use the keyword declare function to define a function.
Use the data types defined in the current XML Schema
Use the data types defined in the curr... | [
{
"code": null,
"e": 1991,
"s": 1872,
"text": "XQuery provides the capability to write custom functions. Listed below are the guidelines to create a custom function."
},
{
"code": null,
"e": 2046,
"s": 1991,
"text": "Use the keyword declare function to define a function."
},
... |
Python | yield Keyword - GeeksforGeeks | 27 May, 2021
Yield is a keyword in Python that is used to return from a function without destroying the states of its local variable and when the function is called, the execution starts from the last yield statement. Any function that contains a yield keyword is termed a generator. Hence, yield is what makes a generat... | [
{
"code": null,
"e": 24324,
"s": 24296,
"text": "\n27 May, 2021"
},
{
"code": null,
"e": 24732,
"s": 24324,
"text": "Yield is a keyword in Python that is used to return from a function without destroying the states of its local variable and when the function is called, the execut... |
C++ Program for cube sum of first n natural numbers - GeeksforGeeks | 17 Mar, 2022
Print the sum of series 13 + 23 + 33 + 43 + .......+ n3 till n-th term.Examples:
Input : n = 5
Output : 225
13 + 23 + 33 + 43 + 53 = 225
Input : n = 7
Output : 784
13 + 23 + 33 + 43 + 53 +
63 + 73 = 784
CPP
CPP
// Simple C++ program to find sum of series// with cubes of first n natural numbers#include ... | [
{
"code": null,
"e": 24667,
"s": 24639,
"text": "\n17 Mar, 2022"
},
{
"code": null,
"e": 24750,
"s": 24667,
"text": "Print the sum of series 13 + 23 + 33 + 43 + .......+ n3 till n-th term.Examples: "
},
{
"code": null,
"e": 24874,
"s": 24750,
"text": "Input :... |
Bootstrap Progress Bars | A progress bar can be used to show a user how far along he/she is in a
process.
Bootstrap provides several types of progress bars.
A default progress bar in Bootstrap looks like this:
To create a default progress bar, add a .progress class to a <div> element:
Note: Progress bars are not supported in Internet Explorer ... | [
{
"code": null,
"e": 81,
"s": 0,
"text": "A progress bar can be used to show a user how far along he/she is in a \nprocess."
},
{
"code": null,
"e": 132,
"s": 81,
"text": "Bootstrap provides several types of progress bars."
},
{
"code": null,
"e": 185,
"s": 132,
... |
How to append to array in MongoDB? | To append to array in MongoDB, use $concatArrays. Let us create a collection with documents −
> db.demo435.insertOne({"FirstName":["Chris"],"LastName":["Brown"]} );
{
"acknowledged" : true,
"insertedId" : ObjectId("5e7719b1bbc41e36cc3cae97")
}
> db.demo435.insertOne({"FirstName":["David"],"LastName":["Miller"]} )... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "To append to array in MongoDB, use $concatArrays. Let us create a collection with documents −"
},
{
"code": null,
"e": 1622,
"s": 1156,
"text": "> db.demo435.insertOne({\"FirstName\":[\"Chris\"],\"LastName\":[\"Brown\"]} );\n{\n \"... |
What is React Native? | React Native is an open source JavaScript Mobile framework from Facebook specially designed to build native mobile apps for iOS and Android. React Native is based on ReactJS JavaScript library that helps to build the user interface for mobile platforms.
React Native can be directly used inside an existing IOS or androi... | [
{
"code": null,
"e": 1316,
"s": 1062,
"text": "React Native is an open source JavaScript Mobile framework from Facebook specially designed to build native mobile apps for iOS and Android. React Native is based on ReactJS JavaScript library that helps to build the user interface for mobile platforms.... |
MongoDB query to get only distinct values | To get distinct values, use distinct() in MongoDB. It finds the distinct values for a specified field across a single collection or view and returns the results in an array.
Let us create a collection with documents −
> db.demo287.insertOne({"details":{"AllVowels":["a","u","u","o","e","a","o","i"]}});
{
"acknowledge... | [
{
"code": null,
"e": 1236,
"s": 1062,
"text": "To get distinct values, use distinct() in MongoDB. It finds the distinct values for a specified field across a single collection or view and returns the results in an array."
},
{
"code": null,
"e": 1280,
"s": 1236,
"text": "Let us c... |
Unique Subsets | Practice | GeeksforGeeks | Given an array arr[] of integers of size N that might contain duplicates, the task is to find all possible unique subsets.
Note: Each subset should be sorted.
Example 1:
Input: N = 3, arr[] = {2,1,2}
Output:(),(1),(1 2),(1 2 2),(2),(2 2)
Explanation:
All possible subsets = (),(2),(1),(1,2),(2),(2,2),(2,1),(2,1,2)
Afte... | [
{
"code": null,
"e": 361,
"s": 238,
"text": "Given an array arr[] of integers of size N that might contain duplicates, the task is to find all possible unique subsets."
},
{
"code": null,
"e": 397,
"s": 361,
"text": "Note: Each subset should be sorted."
},
{
"code": null,... |
Pairs with Difference less than K - GeeksforGeeks | 18 May, 2021
Given an array of n integers, We need to find all pairs with difference less than k
Examples :
Input : a[] = {1, 10, 4, 2}
K = 3
Output : 2
We can make only two pairs
with difference less than 3.
(1, 2) and (4, 2)
Input : a[] = {1, 8, 7}
K = 7
Output : 2
Pairs with difference less than ... | [
{
"code": null,
"e": 24820,
"s": 24792,
"text": "\n18 May, 2021"
},
{
"code": null,
"e": 24904,
"s": 24820,
"text": "Given an array of n integers, We need to find all pairs with difference less than k"
},
{
"code": null,
"e": 24917,
"s": 24904,
"text": "Exampl... |
Python MongoDB - Quick Guide | Pymongo is a python distribution which provides tools to work with MongoDB, it is the most preferred way to communicate with MongoDB database from python.
To install pymongo first of all make sure you have installed python3 (along with PIP) and MongoDB properly. Then execute the following command.
C:\WINDOWS\system32>p... | [
{
"code": null,
"e": 2089,
"s": 1934,
"text": "Pymongo is a python distribution which provides tools to work with MongoDB, it is the most preferred way to communicate with MongoDB database from python."
},
{
"code": null,
"e": 2233,
"s": 2089,
"text": "To install pymongo first of... |
Struts 2 - Redirect Action | The redirect result type calls the standard response.sendRedirect() method, causing the browser to create a new request to the given location.
We can provide the location either in the body of the <result...> element or as a <param name = "location"> element. Redirect also supports the parse parameter. Here's an exampl... | [
{
"code": null,
"e": 2389,
"s": 2246,
"text": "The redirect result type calls the standard response.sendRedirect() method, causing the browser to create a new request to the given location."
},
{
"code": null,
"e": 2591,
"s": 2389,
"text": "We can provide the location either in t... |
HTML | onerror Event Attribute - GeeksforGeeks | 30 Jul, 2021
This attribute works when an error occurs while loading an external file. The external file may contain document file or image file.Supported Tags
<input type=”image”>
, <object>
, <link>
, <script>
Syntax:
<element onerror = "script">
Attribute Value: This attribute contains single value script which wo... | [
{
"code": null,
"e": 23671,
"s": 23643,
"text": "\n30 Jul, 2021"
},
{
"code": null,
"e": 23818,
"s": 23671,
"text": "This attribute works when an error occurs while loading an external file. The external file may contain document file or image file.Supported Tags"
},
{
"c... |
Create an Azure Machine Learning Web Service with Python and Azure DSVM | by Philip Roimon Domingo | Towards Data Science | Last week, while I was reading the documentation about Microsoft CNTK, and checking out the code samples from their GitHub repository, I bumped into another GitHub repository which is about Azure Machine Learning Operationalization.
Azure Machine Learning Operationalization is a component of the Azure CLI that enables ... | [
{
"code": null,
"e": 405,
"s": 172,
"text": "Last week, while I was reading the documentation about Microsoft CNTK, and checking out the code samples from their GitHub repository, I bumped into another GitHub repository which is about Azure Machine Learning Operationalization."
},
{
"code": ... |
Keras and R: Predicting Blood Glucose Levels with the Sequential Model | by Michael Grogan | Towards Data Science | With the advent of TensorFlow 2.0, Keras is now the default API for this version. Keras is used to build neural networks for deep learning purposes. As such, Keras is a highly useful tool for conducting analysis of large datasets.
However, did you realise that the Keras API can also be run in R?
In this example, Keras ... | [
{
"code": null,
"e": 402,
"s": 171,
"text": "With the advent of TensorFlow 2.0, Keras is now the default API for this version. Keras is used to build neural networks for deep learning purposes. As such, Keras is a highly useful tool for conducting analysis of large datasets."
},
{
"code": nu... |
Evaluate Topic Models: Latent Dirichlet Allocation (LDA) | by Shashank Kapadia | Towards Data Science | Preface: This article aims to provide consolidated information on the underlying topic and is not to be considered as the original work. The information and the code are repurposed through several online articles, research papers, books, and open-source code
In the previous article, I introduced the concept of topic mo... | [
{
"code": null,
"e": 431,
"s": 172,
"text": "Preface: This article aims to provide consolidated information on the underlying topic and is not to be considered as the original work. The information and the code are repurposed through several online articles, research papers, books, and open-source c... |
Difference between Preprocessor Directives and Function Templates in C++ - GeeksforGeeks | 05 Jan, 2021
Preprocessor Directives are programs that process our source code before compilation. There are a number of steps involved between writing a program and executing a program in C / C++.
Below is the program to illustrate the functionality of Function Templates:
C++
// C++ program to illust... | [
{
"code": null,
"e": 24107,
"s": 24076,
"text": " \n05 Jan, 2021\n"
},
{
"code": null,
"e": 24292,
"s": 24107,
"text": "Preprocessor Directives are programs that process our source code before compilation. There are a number of steps involved between writing a program and executi... |
Two Mirror Trees | Practice | GeeksforGeeks | Given a Two Binary Trees, write a function that returns true if one is mirror of other, else returns false.
Example 1:
Input:
T1: 1 T2: 1
/ \ / \
2 3 3 2
Output: 1
Example 2:
Input:
T1: 10 T2: 10
/ \ / \
20 30 20 ... | [
{
"code": null,
"e": 360,
"s": 238,
"text": "Given a Two Binary Trees, write a function that returns true if one is mirror of other, else returns false.\n "
},
{
"code": null,
"e": 371,
"s": 360,
"text": "Example 1:"
},
{
"code": null,
"e": 466,
"s": 3... |
C++ Program For Deleting A Linked List Node At A Given Position - GeeksforGeeks | 29 Dec, 2021
Given a singly linked list and a position, delete a linked list node at the given position.
Example:
Input: position = 1, Linked List = 8->2->3->1->7
Output: Linked List = 8->3->1->7
Input: position = 0, Linked List = 8->2->3->1->7
Output: Linked List = 2->3->1->7
If the node to be deleted is the root,... | [
{
"code": null,
"e": 24176,
"s": 24148,
"text": "\n29 Dec, 2021"
},
{
"code": null,
"e": 24268,
"s": 24176,
"text": "Given a singly linked list and a position, delete a linked list node at the given position."
},
{
"code": null,
"e": 24279,
"s": 24268,
"text":... |
How to select records that begin with a specific value in MySQL? | To select records that begin with a specific value, you need to use LIKE operator. Let us first create a table −
mysql> create table DemoTable690(
UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
UserValue varchar(100)
);
Query OK, 0 rows affected (0.56 sec)
Insert some records in the table using insert command −
... | [
{
"code": null,
"e": 1175,
"s": 1062,
"text": "To select records that begin with a specific value, you need to use LIKE operator. Let us first create a table −"
},
{
"code": null,
"e": 1326,
"s": 1175,
"text": "mysql> create table DemoTable690(\n UserId int NOT NULL AUTO_INCREM... |
Materialize - Buttons | Materialize provides different CSS classes to apply various predefined visual and behavioral enhancements to the buttons. Following table mentions the available classes and their effects.
btn
Sets button or anchor as a Materialize button, required. Sets raised display effect to a button.
btn-floating
Creates a circular... | [
{
"code": null,
"e": 2375,
"s": 2187,
"text": "Materialize provides different CSS classes to apply various predefined visual and behavioral enhancements to the buttons. Following table mentions the available classes and their effects."
},
{
"code": null,
"e": 2379,
"s": 2375,
"te... |
How to add 30 minutes to datetime in MySQL? | To add minutes to a datetime you can use DATE_ADD() function from MySQL. In PHP, you can use strtotime().
To add 30 minutes in MySQL, the DATE_ADD() function is as follows −
select date_add(yourColumnName,interval 30 minute) from yourTableName;
To use the above syntax, let us create a table. The following is the query ... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "To add minutes to a datetime you can use DATE_ADD() function from MySQL. In PHP, you can use strtotime()."
},
{
"code": null,
"e": 1236,
"s": 1168,
"text": "To add 30 minutes in MySQL, the DATE_ADD() function is as follows −"
},
... |
Find the index of first 1 in an infinite sorted array of 0s and 1s - GeeksforGeeks | 05 Jul, 2021
Given an infinite sorted array consisting 0s and 1s. The problem is to find the index of first ‘1’ in that array. As the array is infinite, therefore it is guaranteed that number ‘1’ will be present in the array.Examples:
Input : arr[] = {0, 0, 1, 1, 1, 1}
Output : 2
Input : arr[] = {1, 1, 1, 1,, 1, 1}... | [
{
"code": null,
"e": 25532,
"s": 25504,
"text": "\n05 Jul, 2021"
},
{
"code": null,
"e": 25756,
"s": 25532,
"text": "Given an infinite sorted array consisting 0s and 1s. The problem is to find the index of first ‘1’ in that array. As the array is infinite, therefore it is guarant... |
How to find the average of non-zero values in a Python dictionary? | You can do this by iterating over the dictionary and filtering out zero values first. Then take the sum of the filtered values. Finally, divide by the number of these filtered values.
my_dict = {"foo": 100, "bar": 0, "baz": 200}
filtered_vals = [v for _, v in my_dict.items() if v != 0]
average = sum(filtered_vals) / l... | [
{
"code": null,
"e": 1247,
"s": 1062,
"text": "You can do this by iterating over the dictionary and filtering out zero values first. Then take the sum of the filtered values. Finally, divide by the number of these filtered values. "
},
{
"code": null,
"e": 1415,
"s": 1247,
"text"... |
SimpleDateFormat(“HH:mm:ss Z”) in Java | The Z means "zero hour offset", also known as "Zulu time" (UTC) in the ISO 8601 time representation. However, ACP 121 standard defines the list of military time zones and derives the "Zulu time" from theGreenwich Mean Time (GMT).
Let us see the usage of SimpleDateFormat(“HH:mm:ss Z”) −
Format f = new SimpleDateFormat("... | [
{
"code": null,
"e": 1292,
"s": 1062,
"text": "The Z means \"zero hour offset\", also known as \"Zulu time\" (UTC) in the ISO 8601 time representation. However, ACP 121 standard defines the list of military time zones and derives the \"Zulu time\" from theGreenwich Mean Time (GMT)."
},
{
"co... |
ReactJS – Axios Interceptors | In this article, we are going to learn how to intercept every request or response that is being sent by Axios Interceptors in a React application.
Axios interceptors are the default configurations that are added automatically to every request or response that a user receives. It is useful to check response status code ... | [
{
"code": null,
"e": 1209,
"s": 1062,
"text": "In this article, we are going to learn how to intercept every request or response that is being sent by Axios Interceptors in a React application."
},
{
"code": null,
"e": 1425,
"s": 1209,
"text": "Axios interceptors are the default ... |
Python Program to Find the Sum of Digits in a Number without Recursion | When it is required to find the sum of digits in a number without using the method of recursion, the ‘%’ operator, the ‘+’ operator and the ‘//’ operator can be used.
Below is a demonstration for the same −
Live Demo
def sum_of_digits(my_num):
sum_val = 0
while (my_num != 0):
sum_val = sum_val + (my_num % ... | [
{
"code": null,
"e": 1229,
"s": 1062,
"text": "When it is required to find the sum of digits in a number without using the method of recursion, the ‘%’ operator, the ‘+’ operator and the ‘//’ operator can be used."
},
{
"code": null,
"e": 1269,
"s": 1229,
"text": "Below is a demo... |
4294967295-gon Number - GeeksforGeeks | 24 Mar, 2021
4294967295-gon Number is a class of figurate numbers. It has a 4294967295 sided polygon called 4294967295-gon. The N-th 4294967295-gon number counts the 4294967295 number of dots and all other dots are surrounding with a common sharing corner and make a pattern.The first few 4294967295-gonol numbers are: ... | [
{
"code": null,
"e": 24301,
"s": 24273,
"text": "\n24 Mar, 2021"
},
{
"code": null,
"e": 24609,
"s": 24301,
"text": "4294967295-gon Number is a class of figurate numbers. It has a 4294967295 sided polygon called 4294967295-gon. The N-th 4294967295-gon number counts the 4294967295... |
How to create a line break with JavaScript? | To create a line break in JavaScript, use “<br>”. With this, we can add more than one line break also.
Let’s see it in the below example:
<html>
<body>
<script>
<!--
document.write("Hello World!");
document.write("<br>");
document.write("Demo<br><br>Text!");
... | [
{
"code": null,
"e": 1165,
"s": 1062,
"text": "To create a line break in JavaScript, use “<br>”. With this, we can add more than one line break also."
},
{
"code": null,
"e": 1200,
"s": 1165,
"text": "Let’s see it in the below example:"
},
{
"code": null,
"e": 1426,
... |
Time Series Forecasting with ThymeBoost | by Tyler Blume | Towards Data Science | TLDR: ThymeBoost combines the traditional decomposition process with gradient boosting to provide a flexible mix-and-match time series framework for trend/seasonality/exogenous decomposition and forecasting, all a pip away.
All code lives here: ThymeBoost Github
Here is the newest article in the series: M4 Competition ... | [
{
"code": null,
"e": 396,
"s": 172,
"text": "TLDR: ThymeBoost combines the traditional decomposition process with gradient boosting to provide a flexible mix-and-match time series framework for trend/seasonality/exogenous decomposition and forecasting, all a pip away."
},
{
"code": null,
... |
How can I insert a string in an Entry widget that is in the "readonly" state using Tkinter? | Tkinter Entry widget is used to insert single-line text input. We can use the Entry widget to create forms where single-line input is the prime requirement.
Sometimes, we need to insert a predefined text inside the Entry Widget. In such cases, we can use insert(INSERT,<Your Text>) method. These are generally called as ... | [
{
"code": null,
"e": 1219,
"s": 1062,
"text": "Tkinter Entry widget is used to insert single-line text input. We can use the Entry widget to create forms where single-line input is the prime requirement."
},
{
"code": null,
"e": 1417,
"s": 1219,
"text": "Sometimes, we need to ins... |
How to convert a NumPy ndarray to a PyTorch Tensor and vice versa? | A PyTorch tensor is like numpy.ndarray. The difference between these two is that a tensor utilizes the GPUs to accelerate numeric computation. We convert a numpy.ndarray to a PyTorch tensor using the function torch.from_numpy(). And a tensor is converted to numpy.ndarray using the .numpy() method.
Import the required l... | [
{
"code": null,
"e": 1361,
"s": 1062,
"text": "A PyTorch tensor is like numpy.ndarray. The difference between these two is that a tensor utilizes the GPUs to accelerate numeric computation. We convert a numpy.ndarray to a PyTorch tensor using the function torch.from_numpy(). And a tensor is converte... |
C# | DateTimePicker Class - GeeksforGeeks | 05 Sep, 2019
In Windows Forms, the DateTimePicker control is used to select and display the date/time with a specific format in your form. The FlowLayoutPanel class is used to represent windows DateTimePicker control and also provide different types of properties, methods, and events. It is defined under System.Windows... | [
{
"code": null,
"e": 23834,
"s": 23806,
"text": "\n05 Sep, 2019"
},
{
"code": null,
"e": 24446,
"s": 23834,
"text": "In Windows Forms, the DateTimePicker control is used to select and display the date/time with a specific format in your form. The FlowLayoutPanel class is used to ... |
Designing a Working Table Fan using HTML and CSS - GeeksforGeeks | 21 Sep, 2021
In this article, we will design a Working Table-fan using HTML and CSS.
List of HTML tags used:
Polyline: The <polyline> element is used to create the HTML <svg> element which is a container for SVG graphics any shape that consists of only straight lines
div: The <div> tag defines a division or a section i... | [
{
"code": null,
"e": 23768,
"s": 23740,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 23840,
"s": 23768,
"text": "In this article, we will design a Working Table-fan using HTML and CSS."
},
{
"code": null,
"e": 23864,
"s": 23840,
"text": "List of HTML tags ... |
Brothers From Different Roots | Practice | GeeksforGeeks | Given two BSTs containing N1 and N2 distinct nodes respectively and given a value x. Your task is to complete the function countPairs(), that returns the count of all pairs from both the BSTs whose sum is equal to x.
Example 1:
Input:
BST1:
5
/ \
3 7
/ \ / \
2 4 6 8
BST2:
10
... | [
{
"code": null,
"e": 455,
"s": 238,
"text": "Given two BSTs containing N1 and N2 distinct nodes respectively and given a value x. Your task is to complete the function countPairs(), that returns the count of all pairs from both the BSTs whose sum is equal to x."
},
{
"code": null,
"e": 4... |
Java program to find whether the given string is empty or null | The isEmpty() method of the String class returns true if the length of the current string is 0.
import java.util.Scanner;
public class StringEmptyOrNull {
public static void main(String[] args) {
System.out.println("Enter a string value ::");
Scanner sc = new Scanner(System.in);
String str = sc.nex... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "The isEmpty() method of the String class returns true if the length of the current string is 0."
},
{
"code": null,
"e": 1587,
"s": 1158,
"text": "import java.util.Scanner;\npublic class StringEmptyOrNull {\n public static void mai... |
How do I load an image by URL on iOS device using Swift? | To load an image in iOS using swift we’ll make use of simple data Task session. The image needs to be loaded in background because it may be of any size and we don’t want it to stop our main view’s operations.
Let’s see this with help of an example. Create an empty project and add an empty Image view.
Create its outlet... | [
{
"code": null,
"e": 1272,
"s": 1062,
"text": "To load an image in iOS using swift we’ll make use of simple data Task session. The image needs to be loaded in background because it may be of any size and we don’t want it to stop our main view’s operations."
},
{
"code": null,
"e": 1365,
... |
How to create full width container in bootstrap5? - GeeksforGeeks | 10 Sep, 2020
Bootstrap containers are content holders that are used to align, add margins and padding to your content. Bootstrap has three different container classes, namely:
.container
.container-fluid
.container-{breakpoint}
Width of a container varies in accordance with its class. We can create a full width conta... | [
{
"code": null,
"e": 25186,
"s": 25158,
"text": "\n10 Sep, 2020"
},
{
"code": null,
"e": 25351,
"s": 25186,
"text": "Bootstrap containers are content holders that are used to align, add margins and padding to your content. Bootstrap has three different container classes, namely:... |
VB.Net - ScrollBar Control | The ScrollBar controls display vertical and horizontal scroll bars on the form. This is used for navigating through large amount of information. There are two types of scroll bar controls: HScrollBar for horizontal scroll bars and VScrollBar for vertical scroll bars. These are used independently from each other.
Let's ... | [
{
"code": null,
"e": 2614,
"s": 2300,
"text": "The ScrollBar controls display vertical and horizontal scroll bars on the form. This is used for navigating through large amount of information. There are two types of scroll bar controls: HScrollBar for horizontal scroll bars and VScrollBar for vertica... |
Java program to check occurence of each character in String | In order to find occurrence of each character in a string we can use Map utility of Java.In Map, a key could not be duplicate so make each character of the string as the key of Map and provide an initial value corresponding to each key as 1 if this character does not insert in the map before. Now when a character repea... | [
{
"code": null,
"e": 1521,
"s": 1062,
"text": "In order to find occurrence of each character in a string we can use Map utility of Java.In Map, a key could not be duplicate so make each character of the string as the key of Map and provide an initial value corresponding to each key as 1 if this char... |
C program for DFA accepting all strings over w ∈(a,b)* containing “aba” as a substring | Design a DFA for the language L={w1abaw2 | w1,w2 Є(a,b)*}, which means the DFA accepts all strings which contain “aba” as a substring.
The strings that are accepted by language L= {aba,aabaa, aabab, babab, ababa, .......}
Step 1 − Transition diagram for minimal string (starting string) −
If w1 and w2 are null then the ... | [
{
"code": null,
"e": 1197,
"s": 1062,
"text": "Design a DFA for the language L={w1abaw2 | w1,w2 Є(a,b)*}, which means the DFA accepts all strings which contain “aba” as a substring."
},
{
"code": null,
"e": 1284,
"s": 1197,
"text": "The strings that are accepted by language L= {a... |
While loop- printTable - Java | Practice | GeeksforGeeks | While loop is another loop like for loop but unlike for loop it only checks for one condition.
Here, we will use a while loop and print a number n's table in reverse order.
Example 1:
Input:
1
Output:
10 9 8 7 6 5 4 3 2 1
Example 2:
Input:
2
Output:
20 18 16 14 12 10 8 6 4 2
User Task:
Your task is to complete the ... | [
{
"code": null,
"e": 321,
"s": 226,
"text": "While loop is another loop like for loop but unlike for loop it only checks for one condition."
},
{
"code": null,
"e": 399,
"s": 321,
"text": "Here, we will use a while loop and print a number n's table in reverse order."
},
{
... |
How to get current date/time in milli seconds in Java? | The getTime() method of the Date class retrieves and returns the epoch time (number of milliseconds from Jan 1st 1970 00:00:00 GMT0.
Live Demo
import java.util.Date;
public class Sample {
public static void main(String args[]){
//Instantiating the Date class
Date date = new Date();
long msec = da... | [
{
"code": null,
"e": 1195,
"s": 1062,
"text": "The getTime() method of the Date class retrieves and returns the epoch time (number of milliseconds from Jan 1st 1970 00:00:00 GMT0."
},
{
"code": null,
"e": 1205,
"s": 1195,
"text": "Live Demo"
},
{
"code": null,
"e": 14... |
Android - Data Access Object in Room Database - GeeksforGeeks | 03 Jan, 2022
Data Access Objects, or DAOs, are used in Room to access your application’s persisted data. When compared to query builders or direct queries, they are a better and more modular way to access your database. You should also make a note that a DAO need not be only a class. If it’s an abstract class, it can h... | [
{
"code": null,
"e": 24633,
"s": 24605,
"text": "\n03 Jan, 2022"
},
{
"code": null,
"e": 25295,
"s": 24633,
"text": "Data Access Objects, or DAOs, are used in Room to access your application’s persisted data. When compared to query builders or direct queries, they are a better an... |
SEO - Relevant Filenames | One of the simplest methods to improve your search engine optimization is to look at the way you name your files. Before writing this tutorial, we did a lot of research on file-names and found that search engines like Google give too much importance to file names. You should think what you want put in your web page and... | [
{
"code": null,
"e": 2291,
"s": 1925,
"text": "One of the simplest methods to improve your search engine optimization is to look at the way you name your files. Before writing this tutorial, we did a lot of research on file-names and found that search engines like Google give too much importance to ... |
Python Pandas - Merging/Joining | Pandas has full-featured, high performance in-memory join operations idiomatically very similar to relational databases like SQL.
Pandas provides a single function, merge, as the entry point for all standard database join operations between DataFrame objects −
pd.merge(left, right, how='inner', on=None, left_on=None, r... | [
{
"code": null,
"e": 2573,
"s": 2443,
"text": "Pandas has full-featured, high performance in-memory join operations idiomatically very similar to relational databases like SQL."
},
{
"code": null,
"e": 2704,
"s": 2573,
"text": "Pandas provides a single function, merge, as the ent... |
Add list elements with a multi-list based on index in Python | Lists can be nested. Which means we have smaller lists as elements inside a bigger list. In this article we solve the challenge of adding the elements of a simple list to the elements of a nested list. If the length of the lists are different then the length of the smaller list becomes the maximum length of the resulti... | [
{
"code": null,
"e": 1391,
"s": 1062,
"text": "Lists can be nested. Which means we have smaller lists as elements inside a bigger list. In this article we solve the challenge of adding the elements of a simple list to the elements of a nested list. If the length of the lists are different then the l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.