title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
DateTime.ToOADate() Method in C# - GeeksforGeeks | 13 Feb, 2019
This method is used to convert the value of this instance to the equivalent OLE Automation date.
Syntax: public double ToOADate ();
Return Value: This method returns a double-precision floating-point number that contains an OLE Automation date equivalent to the value of this instance.
Exception:OverflowExc... | [
{
"code": null,
"e": 24302,
"s": 24274,
"text": "\n13 Feb, 2019"
},
{
"code": null,
"e": 24399,
"s": 24302,
"text": "This method is used to convert the value of this instance to the equivalent OLE Automation date."
},
{
"code": null,
"e": 24434,
"s": 24399,
"t... |
Django REST Framework Installation - GeeksforGeeks | 05 Oct, 2021
Django REST Framework can be installed via pip package similar to Django installation. Since Django REST Framework is a wrapper over default Django Framework, to install it, Django should be installed already. Now to install rest framework follow the below process.
Python
Pip
DjangoHow to install Django RE... | [
{
"code": null,
"e": 25675,
"s": 25647,
"text": "\n05 Oct, 2021"
},
{
"code": null,
"e": 25941,
"s": 25675,
"text": "Django REST Framework can be installed via pip package similar to Django installation. Since Django REST Framework is a wrapper over default Django Framework, to i... |
get_property() element method - Selenium Python - GeeksforGeeks | 27 Apr, 2020
Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout – Navigating links using get method – Selenium Python. Just being able ... | [
{
"code": null,
"e": 25865,
"s": 25837,
"text": "\n27 Apr, 2020"
},
{
"code": null,
"e": 26422,
"s": 25865,
"text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests usi... |
Node.js process.send() Method - GeeksforGeeks | 18 May, 2021
The process.send() method is an inbuilt application programming interface of the process module which is used by the child process to communicate with the parent process. This method does not work for the root process because it does not have any parent process.
Syntax:
process.send(message, [sendHandle])
... | [
{
"code": null,
"e": 26267,
"s": 26239,
"text": "\n18 May, 2021"
},
{
"code": null,
"e": 26530,
"s": 26267,
"text": "The process.send() method is an inbuilt application programming interface of the process module which is used by the child process to communicate with the parent p... |
Marketing Incremental Lift Test 101 | Marketing Analytics | A/B Test in Advertising | Towards Data Science | Among so many different marketing platforms and tactics in the market, it can be overwhelming to choose the best strategy combinations that generate efficient marketing ROIs. Oftentimes, because of the fear of losing out on a potential marketing opportunity, more and more dollars were spent on additional marketing tech... | [
{
"code": null,
"e": 691,
"s": 172,
"text": "Among so many different marketing platforms and tactics in the market, it can be overwhelming to choose the best strategy combinations that generate efficient marketing ROIs. Oftentimes, because of the fear of losing out on a potential marketing opportuni... |
How to detect the color using OpenCV in C++? | We will understand how to detect specific color and track object based on color. Performance of color detection and color detection based tracking system is environment dependent.
If you change light of the room or if you change background color, there will be significant effect on color detection.
The following progra... | [
{
"code": null,
"e": 1242,
"s": 1062,
"text": "We will understand how to detect specific color and track object based on color. Performance of color detection and color detection based tracking system is environment dependent."
},
{
"code": null,
"e": 1362,
"s": 1242,
"text": "If... |
Python Program to Convert Decimal to Hexadecimal - GeeksforGeeks | 14 Sep, 2021
In this article, we will learn how to convert a decimal value(base 10) to a hexadecimal value (base 16) in Python.
hex() function is one of the built-in functions in Python3, which is used to convert an integer number into its corresponding hexadecimal form.
Syntax : hex(x)
Parameters :
x – an integer n... | [
{
"code": null,
"e": 26233,
"s": 26205,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 26349,
"s": 26233,
"text": "In this article, we will learn how to convert a decimal value(base 10) to a hexadecimal value (base 16) in Python. "
},
{
"code": null,
"e": 26493,
... |
Importance of Hashcode method in Java - GeeksforGeeks | 18 Jan, 2018
Prerequisite: Equals() and hashCode() methods in Java
HashMap and HashSet use hashing to manipulate data. They use hashCode() method to check hash values. The default implementation of hashCode() in Object class returns distinct integers for different objects. Sometimes, we have to implement hashCode metho... | [
{
"code": null,
"e": 24234,
"s": 24206,
"text": "\n18 Jan, 2018"
},
{
"code": null,
"e": 24288,
"s": 24234,
"text": "Prerequisite: Equals() and hashCode() methods in Java"
},
{
"code": null,
"e": 24589,
"s": 24288,
"text": "HashMap and HashSet use hashing to m... |
AngularJS | angular.toJson() Function - GeeksforGeeks | 12 Apr, 2019
The angular.toJson() Function in AngularJS is used to serialize the javascript object into a JSON – formatted string. It takes the javascript object and returns JSON string.
Syntax:
angular.toJson(object)
Example:
<!DOCTYPE html><html> <head> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.2... | [
{
"code": null,
"e": 28346,
"s": 28318,
"text": "\n12 Apr, 2019"
},
{
"code": null,
"e": 28520,
"s": 28346,
"text": "The angular.toJson() Function in AngularJS is used to serialize the javascript object into a JSON – formatted string. It takes the javascript object and returns JS... |
Insertion sort in Java. | Following is the required program.
Live Demo
public class Tester {
public static void insertionSort(int array[]) {
int n = array.length;
for (int j = 1; j < n; j++) {
int key = array[j];
int i = j-1;
while ( (i > -1) && ( array [i] > key ) ){
arr... | [
{
"code": null,
"e": 1097,
"s": 1062,
"text": "Following is the required program."
},
{
"code": null,
"e": 1107,
"s": 1097,
"text": "Live Demo"
},
{
"code": null,
"e": 1938,
"s": 1107,
"text": "public class Tester {\n public static void insertionSort(int arr... |
How to compress a file in Java? | The DeflaterOutputStream class of Java is used to compress the given data and stream it out to the destination.
The write() method of this class accepts the data (in integer and byte format), compresses it and, writes it to the destination of the current DeflaterOutputStream object. To compress a file using this method... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "The DeflaterOutputStream class of Java is used to compress the given data and stream it out to the destination."
},
{
"code": null,
"e": 1391,
"s": 1174,
"text": "The write() method of this class accepts the data (in integer and byte... |
How to Write Excel-like Formulas in Python | by Roman Orac | Towards Data Science | Many Python users are transitioning from spreadsheets because of a Python package that allows users to use Excel-like syntax. It is a spreadsheet environment for JupyterLab to help you with your Python analysis.
Meet Mito — a Python package that initializes an interactive spreadsheet into your JupyterLab Environment. F... | [
{
"code": null,
"e": 383,
"s": 171,
"text": "Many Python users are transitioning from spreadsheets because of a Python package that allows users to use Excel-like syntax. It is a spreadsheet environment for JupyterLab to help you with your Python analysis."
},
{
"code": null,
"e": 601,
... |
Predicting Housing Prices using a Scikit-Learn’s Random Forest Model | Towards Data Science | Having a housing price prediction model can be a very important tool for both the seller and the buyer as it can aid them in making well informed decision. For sellers, it may help them to determine the average price at which they should put their house for sale while for buyers, it may help them find out the right ave... | [
{
"code": null,
"e": 525,
"s": 171,
"text": "Having a housing price prediction model can be a very important tool for both the seller and the buyer as it can aid them in making well informed decision. For sellers, it may help them to determine the average price at which they should put their house f... |
How to get the Android Emulator's IP address? | This example demonstrates how do I get the Android Emulator’s IP address.
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"?>
<RelativeLayo... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "This example demonstrates how do I get the Android Emulator’s IP address."
},
{
"code": null,
"e": 1265,
"s": 1136,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to c... |
Data Structure - Priority Queue | Priority Queue is more specialized data structure than Queue. Like ordinary queue, priority queue has same method but with a major difference. In Priority queue items are ordered by key value so that item with the lowest value of key is at front and item with the highest value of key is at rear or vice versa. So we're ... | [
{
"code": null,
"e": 3045,
"s": 2580,
"text": "Priority Queue is more specialized data structure than Queue. Like ordinary queue, priority queue has same method but with a major difference. In Priority queue items are ordered by key value so that item with the lowest value of key is at front and ite... |
How to set the alignment of the JLabel content along the Y axis in the bottom with Java | Set the alignment of the label’s content along the Y axis on the bottom, use the setVerticalAlignment() method and set the location. Let us first set a label component. We have set the label background color as well so that we can check the alignment of the label’s content properly −
JLabel label = new JLabel("Project... | [
{
"code": null,
"e": 1348,
"s": 1062,
"text": "Set the alignment of the label’s content along the Y axis on the bottom, use the setVerticalAlignment() method and set the location. Let us first set a label component. We have set the label background color as well so that we can check the alignment of... |
How to declare numbers in JavaScript? | JavaScript is untyped language. This means that a JavaScript variable can hold a value of any data type. To declare variables in JavaScript, you need to use the var keyword. Whether it is a number or string, use the var keyword for declaration.
Here’s how you can declare numbers in JavaScript −
var points = 100;
var ra... | [
{
"code": null,
"e": 1307,
"s": 1062,
"text": "JavaScript is untyped language. This means that a JavaScript variable can hold a value of any data type. To declare variables in JavaScript, you need to use the var keyword. Whether it is a number or string, use the var keyword for declaration."
},
... |
Difference between title() and wm_title() methods in Tkinter class | Tkinter has a definite class hierarchy which contains many functions and built-in methods. As we create applications, we use these functions to build the structure of components.The wm class stands for "window manager" that is a mixin class that provides many builtin functions and methods.
The method wm_title() is used... | [
{
"code": null,
"e": 1353,
"s": 1062,
"text": "Tkinter has a definite class hierarchy which contains many functions and built-in methods. As we create applications, we use these functions to build the structure of components.The wm class stands for \"window manager\" that is a mixin class that provi... |
C++ Program to Generate All Possible Subsets with Exactly k Elements in Each Subset | This is a C++ program to generate all possible subsets with exactly k elements in each subset.
Begin
function PossibleSubSet(char a[], int reqLen, int s, int currLen, bool check[], int l):
If currLen > reqLen
Return
Else if currLen = reqLen
Then print the new generated sequence.
If s = l
Then... | [
{
"code": null,
"e": 1157,
"s": 1062,
"text": "This is a C++ program to generate all possible subsets with exactly k elements in each subset."
},
{
"code": null,
"e": 1733,
"s": 1157,
"text": "Begin\n function PossibleSubSet(char a[], int reqLen, int s, int currLen, bool check[... |
Random Forest for predictive maintenance of turbofan engines | by Koen Peters | Towards Data Science | <disclaimer: I aim to showcase the effect of different methods and choices made during model development. These effects are often shown using the test set, something which is considered (very) bad practice but helps for educational purposes.>
Welcome to another installment of the ‘Exploring NASA’s turbofan dataset’ ser... | [
{
"code": null,
"e": 414,
"s": 171,
"text": "<disclaimer: I aim to showcase the effect of different methods and choices made during model development. These effects are often shown using the test set, something which is considered (very) bad practice but helps for educational purposes.>"
},
{
... |
Surprising Sorting Tips for Data Scientists | by Jeff Hale | Towards Data Science | Sorting data is a basic task for data scientists and data engineers. Python users have a number of libraries to choose from with built-in, optimized sorting options. Some even work in parallel on GPUs. Surprisingly some sort methods don’t use the stated algorithm types and others don’t perform as expected.
Choosing whi... | [
{
"code": null,
"e": 355,
"s": 47,
"text": "Sorting data is a basic task for data scientists and data engineers. Python users have a number of libraries to choose from with built-in, optimized sorting options. Some even work in parallel on GPUs. Surprisingly some sort methods don’t use the stated al... |
Google Colab - Magics | Magics is a set of system commands that provide a mini extensive command language.
Magics are of two types −
Line magics
Line magics
Cell magics
Cell magics
The line magics as the name indicates that it consists of a single line of command, while the cell magic covers the entire body of the code cell.
In case of line m... | [
{
"code": null,
"e": 2124,
"s": 2041,
"text": "Magics is a set of system commands that provide a mini extensive command language."
},
{
"code": null,
"e": 2150,
"s": 2124,
"text": "Magics are of two types −"
},
{
"code": null,
"e": 2162,
"s": 2150,
"text": "Li... |
Add a method to a JavaScript object constructor? | Adding a method to an object constructor is unlike adding a method to a normal object. We cannot add a method as it is the case with a normal object. To make a method in an object constructor it has to be added inside the object constructor.
In the following example, the method is added inside the constructor, therefor... | [
{
"code": null,
"e": 1304,
"s": 1062,
"text": "Adding a method to an object constructor is unlike adding a method to a normal object. We cannot add a method as it is the case with a normal object. To make a method in an object constructor it has to be added inside the object constructor."
},
{
... |
How to determine database type (name) for a given JDBC connection? | One way to get the name of the underlying database you have connected with is by invoking the getDatabaseProductName() method of the DatabaseMetaData interface. This method returns the name of the underlying database in String format.
Therefore, to retrieve the name of your current database using Java code −
Retrieve t... | [
{
"code": null,
"e": 1297,
"s": 1062,
"text": "One way to get the name of the underlying database you have connected with is by invoking the getDatabaseProductName() method of the DatabaseMetaData interface. This method returns the name of the underlying database in String format."
},
{
"cod... |
How to Add Live Camera Preview to UIView in Swift? | To add a live camera preview to our default UIView in swift we can either use AVFoundation framework of iOS SDK or native UIImagePickerController(). In this example we’ll be using ImagePicker as our aim is to present camera preview on the UIView and Imagepicker is suitable for that task. AVFoundation can be used when w... | [
{
"code": null,
"e": 1464,
"s": 1062,
"text": "To add a live camera preview to our default UIView in swift we can either use AVFoundation framework of iOS SDK or native UIImagePickerController(). In this example we’ll be using ImagePicker as our aim is to present camera preview on the UIView and Ima... |
Tryit Editor v3.7 | Tryit: Using the animation-direction property | [] |
How can I select the row with the highest ID in MySQL? | You can select the row with highest ID in MySQL with the help of ORDER BY with LIMIT OFFSET
The syntax is as follows −
select *from yourTableName order by yourColumnName desc limit 1 offset 0;
To understand the above syntax, let us create a table. The query to create a table is as follows −
mysql> create table HighestI... | [
{
"code": null,
"e": 1154,
"s": 1062,
"text": "You can select the row with highest ID in MySQL with the help of ORDER BY with LIMIT OFFSET"
},
{
"code": null,
"e": 1181,
"s": 1154,
"text": "The syntax is as follows −"
},
{
"code": null,
"e": 1255,
"s": 1181,
"... |
PHP - Function ereg_replace() | string ereg_replace (string pattern, string replacement, string originalstring);
The ereg_replace() function searches for string specified by pattern and replaces pattern with replacement if found. The ereg_replace() function operates under the same premises as ereg(), except that the functionality is extended to find... | [
{
"code": null,
"e": 2839,
"s": 2757,
"text": "string ereg_replace (string pattern, string replacement, string originalstring);\n"
},
{
"code": null,
"e": 3134,
"s": 2839,
"text": "The ereg_replace() function searches for string specified by pattern and replaces pattern with repl... |
What is a recursive method call in C#? | Recursive method call in C# is called Recursion. Let us see an example to calculate power of a number using recursion.
Here, if the power is not equal to 0, then the function call occurs which is eventually recursion −
if (p!=0) {
return (n * power(n, p - 1));
}
Above, n is the number itself and the power reduces on... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "Recursive method call in C# is called Recursion. Let us see an example to calculate power of a number using recursion."
},
{
"code": null,
"e": 1281,
"s": 1181,
"text": "Here, if the power is not equal to 0, then the function call oc... |
Meet Plotly Mapbox. Best Choice for Geographic Data Visualization | by Kefei Mo | Towards Data Science | I have come across several projects that include geographic data, and I have been searching for the best tool for geo-visualization. As a Python user, I have tried Pyplot’s basemap, GeoPandas, Folium, and Bohem, but none of them has given me a satisfying experience.
Finally, my search ended after I found Plotly. To be ... | [
{
"code": null,
"e": 439,
"s": 172,
"text": "I have come across several projects that include geographic data, and I have been searching for the best tool for geo-visualization. As a Python user, I have tried Pyplot’s basemap, GeoPandas, Folium, and Bohem, but none of them has given me a satisfying ... |
2 latent methods for dimension reduction and topic modeling | by Edward Ma | Towards Data Science | Before the state-of-the-art word embedding technique, Latent Semantic Analysis (LSA) and Latent Dirichlet Allocation (LDA) area good approaches to deal with NLP problems. Both LSA and LDA have same input which is Bag of words in matrix format. LSA focus on reducing matrix dimension while LDA solves topic modeling probl... | [
{
"code": null,
"e": 497,
"s": 172,
"text": "Before the state-of-the-art word embedding technique, Latent Semantic Analysis (LSA) and Latent Dirichlet Allocation (LDA) area good approaches to deal with NLP problems. Both LSA and LDA have same input which is Bag of words in matrix format. LSA focus o... |
C/C++ Program for Odd-Even Sort / Brick Sort - GeeksforGeeks | 18 Apr, 2022
This is basically a variation of bubble-sort. This algorithm is divided into two phases- Odd and Even Phase. The algorithm runs until the array elements are sorted and in each iteration two phases occurs- Odd and Even Phases. In the odd phase, we perform a bubble sort on odd indexed elements and in the eve... | [
{
"code": null,
"e": 24617,
"s": 24589,
"text": "\n18 Apr, 2022"
},
{
"code": null,
"e": 24985,
"s": 24617,
"text": "This is basically a variation of bubble-sort. This algorithm is divided into two phases- Odd and Even Phase. The algorithm runs until the array elements are sorted... |
CUDA - Performance Considerations | In this chapter, we will understand the performance considerations of CUDA.
A poorly written CUDA program can perform much worse than intended. Consider the following piece of code −
for(int k=0; k<width; k++) {
product_val += d_M[row*width+k] * d_N[k*width+col];
}
For every iteration of the loop, the global memory ... | [
{
"code": null,
"e": 1968,
"s": 1892,
"text": "In this chapter, we will understand the performance considerations of CUDA."
},
{
"code": null,
"e": 2075,
"s": 1968,
"text": "A poorly written CUDA program can perform much worse than intended. Consider the following piece of code −... |
New feature of C++17 | The C++ Standards committee is always focusing on shipping new features every three years. The two main parts of the specification are the core functionality of the programming language and the Standard Template Library (STL). The new features are introduced to make the code cleaner, easier and compact. Following is th... | [
{
"code": null,
"e": 1423,
"s": 1062,
"text": "The C++ Standards committee is always focusing on shipping new features every three years. The two main parts of the specification are the core functionality of the programming language and the Standard Template Library (STL). The new features are intro... |
What is constructor chaining in Java? | Constructors are similar to methods but,
They do not have any return type.
The name of the constructor is same as the name of the class.
Every class has a constructor. If we do not explicitly write a constructor for a class, the Java compiler builds a default constructor for that class.
Each time a new object is create... | [
{
"code": null,
"e": 1103,
"s": 1062,
"text": "Constructors are similar to methods but,"
},
{
"code": null,
"e": 1137,
"s": 1103,
"text": "They do not have any return type."
},
{
"code": null,
"e": 1199,
"s": 1137,
"text": "The name of the constructor is same ... |
Classical problems of Synchronization with Semaphore Solution - GeeksforGeeks | 18 Nov, 2021
In this article, we will see number of classical problems of synchronization as examples of a large class of concurrency-control problems. In our solutions to the problems, we use semaphores for synchronization, since that is the traditional way to present such solutions. However, actual implementations of... | [
{
"code": null,
"e": 24298,
"s": 24270,
"text": "\n18 Nov, 2021"
},
{
"code": null,
"e": 24676,
"s": 24298,
"text": "In this article, we will see number of classical problems of synchronization as examples of a large class of concurrency-control problems. In our solutions to the ... |
Creating a better dashboard with Python, Dash, and Plotly | by Brad Bartram | Towards Data Science | My hobby is examining the depths of commodities and futures. As one could likely imagine, there is a lot of data and analysis that goes into it. Tables, reports, charts, graphs — you name it, it’s there.
In trying to move forward and make heads or tails of it all, I find myself needing to visualize things that aren’t a... | [
{
"code": null,
"e": 376,
"s": 172,
"text": "My hobby is examining the depths of commodities and futures. As one could likely imagine, there is a lot of data and analysis that goes into it. Tables, reports, charts, graphs — you name it, it’s there."
},
{
"code": null,
"e": 553,
"s": ... |
C++ Program for Range sum queries without updates - GeeksforGeeks | 06 Dec, 2018
Given an array arr of integers of size n. We need to compute sum of elements from index i to index j. The queries consisting of i and j index values will be executed multiple times.
Examples:
Input : arr[] = {1, 2, 3, 4, 5}
i = 1, j = 3
i = 2, j = 4
Output : 9
12
Input :... | [
{
"code": null,
"e": 24137,
"s": 24109,
"text": "\n06 Dec, 2018"
},
{
"code": null,
"e": 24319,
"s": 24137,
"text": "Given an array arr of integers of size n. We need to compute sum of elements from index i to index j. The queries consisting of i and j index values will be execut... |
How to Search Data with KDTree. Given a Task to Find Data in a Certain... | by Khuyen Tran | Towards Data Science | Imagine you keep a record of the number of travelers in your region every day. You are asked to give a report on the number of travelers from February 2nd to March 2nd. Assuming this data is sorted, how could you find the data within this range in a short amount of time? This is a statement of a range search problem.
T... | [
{
"code": null,
"e": 490,
"s": 171,
"text": "Imagine you keep a record of the number of travelers in your region every day. You are asked to give a report on the number of travelers from February 2nd to March 2nd. Assuming this data is sorted, how could you find the data within this range in a short... |
Find a range of composite numbers of given length - GeeksforGeeks | 27 Jan, 2022
Given an integer n, we need to find a range of positive integers such that all the number in that range are composite and length of that range is n. You may print anyone range in the case of more than one answer. A composite number is a positive integer that has at least one divisor other than 1 and itself... | [
{
"code": null,
"e": 25206,
"s": 25178,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 25532,
"s": 25206,
"text": "Given an integer n, we need to find a range of positive integers such that all the number in that range are composite and length of that range is n. You may print ... |
Check if frequency of all characters can become same by one removal - GeeksforGeeks | 22 Nov, 2021
Given a string which contains lower alphabetic characters, we need to remove at most one character from this string in such a way that frequency of each distinct character becomes same in the string.
Examples:
Input: str = “xyyz” Output: Yes We can remove character ’y’ from above string to make the frequ... | [
{
"code": null,
"e": 25310,
"s": 25282,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 25510,
"s": 25310,
"text": "Given a string which contains lower alphabetic characters, we need to remove at most one character from this string in such a way that frequency of each distinct c... |
Chocolate Distribution Problem | Set 2 - GeeksforGeeks | 14 Dec, 2021
Given an array A[] consisting of N integers, where each value represents the marks of the ith student, the task is to find the minimum number of chocolates required to be distributed such that:
Each student should be awarded with at least one chocolate
A student with higher marks should be awarded more cho... | [
{
"code": null,
"e": 24497,
"s": 24469,
"text": "\n14 Dec, 2021"
},
{
"code": null,
"e": 24691,
"s": 24497,
"text": "Given an array A[] consisting of N integers, where each value represents the marks of the ith student, the task is to find the minimum number of chocolates require... |
Perl last Statement | When a last statement is encountered inside a loop, the loop is immediately terminated and the program control resumes at the next statement following the loop. You can provide a LABEL with last statement where LABEL is the label for a loop. A last statement can be used inside a nested loop where it will be applicabl... | [
{
"code": null,
"e": 2591,
"s": 2220,
"text": "When a last statement is encountered inside a loop, the loop is immediately terminated and the program control resumes at the next statement following the loop. You can provide a LABEL with last statement where LABEL is the label for a loop. A last st... |
Create Landing Pages For Your Projects With GitHub Pages | by Naveen Venkatesan | Towards Data Science | I come from an experimental science background where we deal with a ton of home-built experiment setups and data analysis scripts. Often, the result of this can be poorly documented and difficult-to-use code, especially after the original graduate student (who wrote it) has graduated and left. For this reason, when I d... | [
{
"code": null,
"e": 731,
"s": 172,
"text": "I come from an experimental science background where we deal with a ton of home-built experiment setups and data analysis scripts. Often, the result of this can be poorly documented and difficult-to-use code, especially after the original graduate student... |
ES6 | Environment Setup - GeeksforGeeks | 05 Aug, 2021
ES6 can run on local machines, only it needs a browser and a text editor. Otherwise, ES6 can run on any host, on any OS. For ES6, it may not be an all-time execute on the browsers. So we need some extra mechanism to executes the ES6 version.
NodeJS
Code Editor
Browser
NodeJS: For web server, NodeJS is an... | [
{
"code": null,
"e": 25560,
"s": 25532,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 25804,
"s": 25560,
"text": "ES6 can run on local machines, only it needs a browser and a text editor. Otherwise, ES6 can run on any host, on any OS. For ES6, it may not be an all-time execute... |
Differentiate between Ambiguous and Unambiguous Grammar | Before understanding the differences between ambiguous grammar and unambiguous grammar, let us learn about these concepts.
A grammar is said to be ambiguous if there exists more than one left most derivation or more than one right most derivation or more than one parse tree for a given input string.
If the grammar is n... | [
{
"code": null,
"e": 1185,
"s": 1062,
"text": "Before understanding the differences between ambiguous grammar and unambiguous grammar, let us learn about these concepts."
},
{
"code": null,
"e": 1363,
"s": 1185,
"text": "A grammar is said to be ambiguous if there exists more than... |
Geek and Code | Practice | GeeksforGeeks | Geek's file currently has zero lines of codes. Each morning geek can add some arbitrary lines of code(possibly zero too). Each night, each line of the code splits into two lines. Geek wants N lines of code at some moment. Find the minimum lines of code geek adds.
Input:
1. The first line of the input contains a singl... | [
{
"code": null,
"e": 491,
"s": 226,
"text": "Geek's file currently has zero lines of codes. Each morning geek can add some arbitrary lines of code(possibly zero too). Each night, each line of the code splits into two lines. Geek wants N lines of code at some moment. Find the minimum lines of code ge... |
Application Layer | Web applications and web servers are critical to our online presence and the attacks observed against them constitute more than 70% of the total attacks attempted on the Internet. These attacks attempt to convert trusted websites into malicious ones. Due to this reason, web server and web application pen testing plays ... | [
{
"code": null,
"e": 2196,
"s": 1857,
"text": "Web applications and web servers are critical to our online presence and the attacks observed against them constitute more than 70% of the total attacks attempted on the Internet. These attacks attempt to convert trusted websites into malicious ones. Du... |
Rotating an Array | Practice | GeeksforGeeks | Given an array of size N. The task is to rotate array by D elements where D ≤ N.
Example 1:
Input:
N = 7
Arr[] = {1, 2, 3, 4, 5, 6, 7}
D = 2
Output: 3 4 5 6 7 1 2
Explanation:
Rotate by 1: [2, 3, 4, 5, 6, 7, 1]
Rotate by 2: [3, 4, 5, 6, 7, 1, 2]
Example 2:
Input:
N = 4
Arr[] = {1, 3, 4, 2}
D = 3
Output: 2 1 3 4
Yo... | [
{
"code": null,
"e": 319,
"s": 238,
"text": "Given an array of size N. The task is to rotate array by D elements where D ≤ N."
},
{
"code": null,
"e": 330,
"s": 319,
"text": "Example 1:"
},
{
"code": null,
"e": 486,
"s": 330,
"text": "Input:\nN = 7\nArr[] = {1... |
Google Maps - Events | The Google Maps JavaScript program can respond to various events generated by the user. This chapter provides examples demonstrating how to perform event handling while working with Google Maps.
You can add an event listener using the method addListener(). It accepts parameters such as object name on which we want to a... | [
{
"code": null,
"e": 2027,
"s": 1832,
"text": "The Google Maps JavaScript program can respond to various events generated by the user. This chapter provides examples demonstrating how to perform event handling while working with Google Maps."
},
{
"code": null,
"e": 2211,
"s": 2027,
... |
JSP Mock Test | This section presents you various set of Mock Tests related to JSP Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
Q 1 - What is the correct signature ... | [
{
"code": null,
"e": 2523,
"s": 2239,
"text": "This section presents you various set of Mock Tests related to JSP Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the f... |
degrees() and radians() in Python | The measurements of angles in mathematics are done using these two units of measurement called degree and radian. They are frequently used in math calculations involving angles and need conversion from one value to another. In python we can achieve these conversions using python functions.
This function takes radian va... | [
{
"code": null,
"e": 1353,
"s": 1062,
"text": "The measurements of angles in mathematics are done using these two units of measurement called degree and radian. They are frequently used in math calculations involving angles and need conversion from one value to another. In python we can achieve thes... |
C# Program to Print the Employees Whose Name Started With Character 'S' Using LINQ - GeeksforGeeks | 01 Nov, 2021
LINQ is known as Language Integrated Query and it is introduced in .NET 3.5. It gives the ability to .NET languages to generate queries to retrieve data from the data source. It removes the mismatch between programming languages and databases and the syntax used to create a query is the same no matter whic... | [
{
"code": null,
"e": 24302,
"s": 24274,
"text": "\n01 Nov, 2021"
},
{
"code": null,
"e": 24987,
"s": 24302,
"text": "LINQ is known as Language Integrated Query and it is introduced in .NET 3.5. It gives the ability to .NET languages to generate queries to retrieve data from the d... |
Demystifying Optimizations for machine learning | by Ravindra Parmar | Towards Data Science | Optimization is the most essential ingredient in the recipe of machine learning algorithms. It starts with defining some kind of loss function/cost function and ends with minimizing the it using one or the other optimization routine. The choice of optimization algorithm can make a difference between getting a good accu... | [
{
"code": null,
"e": 805,
"s": 171,
"text": "Optimization is the most essential ingredient in the recipe of machine learning algorithms. It starts with defining some kind of loss function/cost function and ends with minimizing the it using one or the other optimization routine. The choice of optimiz... |
Probability Calibration for Imbalanced Dataset | by Kyosuke Morita | Towards Data Science | When we are trying to build a machine learning model for real-world problems, we are often faced with imbalanced datasets. Resampling method, especially undersampling is one of the most widely used methods to overcome the class imbalance (I also showed how those resampling methods worked on my Master dissertation in th... | [
{
"code": null,
"e": 886,
"s": 172,
"text": "When we are trying to build a machine learning model for real-world problems, we are often faced with imbalanced datasets. Resampling method, especially undersampling is one of the most widely used methods to overcome the class imbalance (I also showed ho... |
Monte Carlo Method Explained. In this post I will introduce, explain... | by Vatsal | Towards Data Science | In this post, I will introduce, explain and implement the Monte Carlo method to you. This method of simulation is one of my favourites because of its simplicity and yet it’s a refined method to resolve complex problems. It was invented by Stanislaw Ulam, a polish mathematician in the 1940s. It was named after a gamblin... | [
{
"code": null,
"e": 721,
"s": 172,
"text": "In this post, I will introduce, explain and implement the Monte Carlo method to you. This method of simulation is one of my favourites because of its simplicity and yet it’s a refined method to resolve complex problems. It was invented by Stanislaw Ulam, ... |
set count() function in C++ STL - GeeksforGeeks | 08 Jun, 2021
The set::count() is a built-in function in C++ STL which returns the number of times an element occurs in the set. It can only return 1 or 0 as the set container contains unique elements only. Syntax:
set_name.count(element)
Parameters: The function accepts one mandatory parameter element which specifie... | [
{
"code": null,
"e": 24510,
"s": 24482,
"text": "\n08 Jun, 2021"
},
{
"code": null,
"e": 24713,
"s": 24510,
"text": "The set::count() is a built-in function in C++ STL which returns the number of times an element occurs in the set. It can only return 1 or 0 as the set container c... |
HTML5 | MathML Introduction - GeeksforGeeks | 19 May, 2020
The MathML comes in the HTML5 the current MathML version is 3 it was introduced in the year of 2015. The MathML stands for Mathematics Markup Language. It is used to represent the mathematical equation or expression in web browsers like other HTML elements. The 1st version of MathML released in the year of... | [
{
"code": null,
"e": 30376,
"s": 30348,
"text": "\n19 May, 2020"
},
{
"code": null,
"e": 30939,
"s": 30376,
"text": "The MathML comes in the HTML5 the current MathML version is 3 it was introduced in the year of 2015. The MathML stands for Mathematics Markup Language. It is used ... |
Program to Count number of binary strings without consecutive 1’s in C/C++? | Here we will see one interesting problem. Suppose one value of n is given. We have to find all strings of length n, such that there are no consecutive 1s. If n = 2, then the numbers are {00, 01, 10}, So output is 3.
We can solve it using dynamic programming. Suppose we have a tables ‘a’ and ‘b’. Where arr[i] is storing... | [
{
"code": null,
"e": 1278,
"s": 1062,
"text": "Here we will see one interesting problem. Suppose one value of n is given. We have to find all strings of length n, such that there are no consecutive 1s. If n = 2, then the numbers are {00, 01, 10}, So output is 3."
},
{
"code": null,
"e": ... |
How to send data from one activity to another in Android without intent? | This example demonstrate about How to send data from one activity to another in Android without intent.
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" ... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "This example demonstrate about How to send data from one activity to another in Android without intent."
},
{
"code": null,
"e": 1295,
"s": 1166,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and ... |
VBA - Concatenation Operators | Following Concatenation operators are supported by VBA.
Assume variable A holds 5 and variable B holds 10 then −
Try the following example to understand the Concatenation operator available in VBScript −
Private Sub Constant_demo_Click()
Dim a as Integer : a = 5
Dim b as Integer : b = 10
Dim c as Integer
c... | [
{
"code": null,
"e": 1991,
"s": 1935,
"text": "Following Concatenation operators are supported by VBA."
},
{
"code": null,
"e": 2048,
"s": 1991,
"text": "Assume variable A holds 5 and variable B holds 10 then −"
},
{
"code": null,
"e": 2139,
"s": 2048,
"text":... |
What is the difference between a python module and a python package? | Any Python file is a module, its name being the file's base name/module's __name__ property without the .py extension. A package is a collection of Python modules, i.e., a package is a directory of Python modules containing an additional __init__.py file. The __init__.py distinguishes a package from a directory that ju... | [
{
"code": null,
"e": 1548,
"s": 1062,
"text": "Any Python file is a module, its name being the file's base name/module's __name__ property without the .py extension. A package is a collection of Python modules, i.e., a package is a directory of Python modules containing an additional __init__.py fil... |
Java Examples - Exception with overloaded Methods | How to handle the exception with overloaded methods ?
This example shows how to handle the exception with overloaded methods. You need to have a try catch block in each method or where the are used.
public class Main {
double method(int i) throws Exception {
return i/0;
}
boolean method(boolean b) {
... | [
{
"code": null,
"e": 2122,
"s": 2068,
"text": "How to handle the exception with overloaded methods ?"
},
{
"code": null,
"e": 2267,
"s": 2122,
"text": "This example shows how to handle the exception with overloaded methods. You need to have a try catch block in each method or whe... |
Passing and Returning Objects in Java | As we know it is core concept that in Java there is always pass by value and not by pass by reference.So in this post we will focus on that how this concept get validated in case of passing primitive and passing reference to a method.
In case when a primitive type is passed to a method as argument then the value assign... | [
{
"code": null,
"e": 1297,
"s": 1062,
"text": "As we know it is core concept that in Java there is always pass by value and not by pass by reference.So in this post we will focus on that how this concept get validated in case of passing primitive and passing reference to a method."
},
{
"cod... |
SQL | UNION Operator | 28 Aug, 2020
The UNION operator could be used to find the result-set or combination of two or more tables.
Terms and Condition for using UNION :
Each table used within UNION must have the same number of columns.
The columns must have same data types.
The columns in each table must be in the same order.
1. UNION Syntax ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 147,
"s": 53,
"text": "The UNION operator could be used to find the result-set or combination of two or more tables."
},
{
"code": null,
"e": 185,
"s": 147,
"text": "Terms and C... |
Stack.Contains() Method in C# | 04 Feb, 2019
This method(comes under System.Collections namespace) is used to check whether a specified element is present is Stack or not. Internally this method checks for equality by calling the Object.Equals method. Also, it performs a linear search, therefore, this method is an O(n) operation, where n is Count.
Sy... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Feb, 2019"
},
{
"code": null,
"e": 333,
"s": 28,
"text": "This method(comes under System.Collections namespace) is used to check whether a specified element is present is Stack or not. Internally this method checks for equality by ca... |
HTML <ul> Tag | 09 Dec, 2021
In this article, we will know the HTML <ul> Tag & its implementation. The <ul> tag in HTML is used to define the unordered list item in an HTML document. It contains the list items <li> element. The <ul> tag requires an opening and closing tag. By using CSS style you can easily design an unordered list.
Sy... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Dec, 2021"
},
{
"code": null,
"e": 333,
"s": 28,
"text": "In this article, we will know the HTML <ul> Tag & its implementation. The <ul> tag in HTML is used to define the unordered list item in an HTML document. It contains the list ... |
Swapping two array elements in a single line using JavaScript | 15 Mar, 2021
In JavaScript, there exist many ways using by which one can swap two array elements. In this article, we will discuss a way in which one can swap two array elements in JavaScript in a single line. The input and output would be as follows.
Input: arr = { 10, 20, 40, 30 }
Output: arr = { 10, 20, 30, 40 }
//... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Mar, 2021"
},
{
"code": null,
"e": 267,
"s": 28,
"text": "In JavaScript, there exist many ways using by which one can swap two array elements. In this article, we will discuss a way in which one can swap two array elements in JavaScr... |
Positive elements at even and negative at odd positions (Relative order not maintained) | 09 Jun, 2022
You have been given an array and you have to make a program to convert that array such that positive elements occur at even numbered places in the array and negative elements occur at odd numbered places in the array. We have to do it in place.There can be unequal number of positive and negative values and... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 402,
"s": 54,
"text": "You have been given an array and you have to make a program to convert that array such that positive elements occur at even numbered places in the array and negative elements... |
Java String startsWith() and endsWith() Methods With Examples | 30 Sep, 2021
The String class in Java is an immutable and non-primitive data type that is used to store the characters of the sequence. The string is non-primitive datatype because, during the initialization of the string variable, it refers to an object that contains methods that can perform several different kinds of... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 596,
"s": 28,
"text": "The String class in Java is an immutable and non-primitive data type that is used to store the characters of the sequence. The string is non-primitive datatype because, during... |
How to set the Text Mask Format of the MaskedTextBox in C#? | 26 Jul, 2019
In C#, MaskedTextBox control gives a validation procedure for the user input on the form like date, phone numbers, etc. Or in other words, it is used to provide a mask which differentiates between proper and improper user input. In MaskedTextBox control, you set a value which indicates that the literals an... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Jul, 2019"
},
{
"code": null,
"e": 595,
"s": 28,
"text": "In C#, MaskedTextBox control gives a validation procedure for the user input on the form like date, phone numbers, etc. Or in other words, it is used to provide a mask which d... |
Python – Get the indices of all occurrences of an element in a list | 28 Nov, 2021
Given a list, the task is to write a Python Program to get the indices of all occurrences of an element in a list.
This is a simple method to get the indices of all occurrences of an element in a list. Here we use a for-loop to iterate through each element in the original list.
Syntax : for iterator_name i... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 168,
"s": 53,
"text": "Given a list, the task is to write a Python Program to get the indices of all occurrences of an element in a list."
},
{
"code": null,
"e": 332,
"s": 168,
... |
Python | Sort given list by frequency and remove duplicates | 11 May, 2020
Problems associated with sorting and removal of duplicates is quite common in development domain and general coding as well. The sorting by frequency has been discussed, but sometimes, we even wish to remove the duplicates without using more LOC’s and in a shorter way. Let’s discuss certain ways in which t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 May, 2020"
},
{
"code": null,
"e": 352,
"s": 28,
"text": "Problems associated with sorting and removal of duplicates is quite common in development domain and general coding as well. The sorting by frequency has been discussed, but s... |
Scrape and Save Table Data in CSV file using Selenium in Python | 30 Jun, 2021
Selenium WebDriver is an open-source API that allows you to interact with a browser in the same way a real user would and its scripts are written in various languages i.e. Python, Java, C#, etc. Here we will be working with python to scrape data from tables on the web and store it as a CSV file. As Google ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 520,
"s": 54,
"text": "Selenium WebDriver is an open-source API that allows you to interact with a browser in the same way a real user would and its scripts are written in various languages i.e. Py... |
PHP | str_pad() Function | 22 Mar, 2018
The str_pad() function is a built-in function in PHP and is used to pad a string to a given length. We can pad the input string by any other string up to a specified length. If we do not pass the other string to the str_pad() function then the input string will be padded by spaces.
Syntax :
string str_pad(... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Mar, 2018"
},
{
"code": null,
"e": 311,
"s": 28,
"text": "The str_pad() function is a built-in function in PHP and is used to pad a string to a given length. We can pad the input string by any other string up to a specified length. I... |
strspn() function in C | 02 Oct, 2017
The strspn() function returns the length of the initial substring of the string pointed to by str1 that is made up of only those character contained in the string pointed to by str2.
Syntax :
size_t strspn(const char *str1, const char *str2)
str1 : string to be scanned.
str2 : string containing the
charac... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n02 Oct, 2017"
},
{
"code": null,
"e": 236,
"s": 53,
"text": "The strspn() function returns the length of the initial substring of the string pointed to by str1 that is made up of only those character contained in the string pointed to ... |
std::setbase, std::setw , std::setfill in C++ | 10 Nov, 2021
The useful input/output manipulators are std::setbase, std::setw and std::setfill. These are defined in and are quite useful functions.
std::base : Set basefield flag; Sets the base-field to one of its possible values: dec, hex or oct according to argument base.Syntax :
std::setbase (int base);
decimal ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n10 Nov, 2021"
},
{
"code": null,
"e": 190,
"s": 52,
"text": "The useful input/output manipulators are std::setbase, std::setw and std::setfill. These are defined in and are quite useful functions. "
},
{
"code": null,
"e":... |
Find columns and rows with NA in R DataFrame | 26 Mar, 2021
A data frame comprises cells, called data elements arranged in the form of a table of rows and columns. A data frame can have data elements belonging to different data types as well as missing values, denoted by NA.
Approach
Declare data frame
Use function to get values to get NA values
Store position
Dis... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2021"
},
{
"code": null,
"e": 245,
"s": 28,
"text": "A data frame comprises cells, called data elements arranged in the form of a table of rows and columns. A data frame can have data elements belonging to different data types a... |
Stable sort for descending order | 10 Sep, 2021
Given an array of n integers, we have to reverse sort the array elements such the equal keys are stable after sorting. Examples:
Input : arr[] = {4, 2, 3, 2, 4}
Output : 4, 4, 3, 2, 2
Prerequisite : Stability in sorting algorithmsMethod 1 (Writing our own sorting function : Bubble Sort)We know sorting ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n10 Sep, 2021"
},
{
"code": null,
"e": 184,
"s": 53,
"text": "Given an array of n integers, we have to reverse sort the array elements such the equal keys are stable after sorting. Examples: "
},
{
"code": null,
"e": 239,
... |
How to save an HTML 5 Canvas as an image on the server ? | 20 Aug, 2019
Saving HTML canvas as an image is pretty easy, it can be done by just right-clicking on the canvas and save it as an image. But saving canvas as an image on the server is quite different. This article will show you how to achieve that. Sometimes it is required to save canvas image after doing some server p... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Aug, 2019"
},
{
"code": null,
"e": 428,
"s": 28,
"text": "Saving HTML canvas as an image is pretty easy, it can be done by just right-clicking on the canvas and save it as an image. But saving canvas as an image on the server is quit... |
De Bruijn sequence | Set 1 | 10 Jul, 2021
Given an integer n and a set of characters A of size k, find a string S such that every possible string on A of length n appears exactly once as a substring in S. Such a string is called de Bruijn sequence.
Examples:
Input: n = 3, k = 2, A = {0, 1) Output: 0011101000 All possible strings of length three (... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 Jul, 2021"
},
{
"code": null,
"e": 261,
"s": 54,
"text": "Given an integer n and a set of characters A of size k, find a string S such that every possible string on A of length n appears exactly once as a substring in S. Such a stri... |
How to use text as background using CSS ? | 22 Apr, 2020
There are some website designs that require using text as the background. This can be easily achieved with CSS by using the following methods.
Using absolutely positioned element inside relatively positioned element: The absolutely positioned element inside a relative positioned element with absolute eleme... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 171,
"s": 28,
"text": "There are some website designs that require using text as the background. This can be easily achieved with CSS by using the following methods."
},
{
"code": null,
... |
How to create frequency table of data.table in R? | If we have an data.table object or a data frame converted to a data.table and it has a factor column then we might want to create a frequency table that shows the number of values each factor has or the count of factor levels. This is a data summarization method which helps us to understand the variation in the occurre... | [
{
"code": null,
"e": 1535,
"s": 1062,
"text": "If we have an data.table object or a data frame converted to a data.table and it has a factor column then we might want to create a frequency table that shows the number of values each factor has or the count of factor levels. This is a data summarizati... |
Bootstrap .radio-inline class | Use .radio-inline class to a series of radios for controls to appear on the same line. You can try to run the following code to implement the radio-inline class in Bootstrap −
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Forms</title>
<meta name = "viewport" content = "width=device-width, ini... | [
{
"code": null,
"e": 1238,
"s": 1062,
"text": "Use .radio-inline class to a series of radios for controls to appear on the same line. You can try to run the following code to implement the radio-inline class in Bootstrap −"
},
{
"code": null,
"e": 1248,
"s": 1238,
"text": "Live D... |
Plotting Geospatial Data using GeoPandas - GeeksforGeeks | 16 Jul, 2020
GeoPandas is an open source tool to add support for geographic data to Pandas objects. In this, article we are going to use GeoPandas and Matplotlib for plotting geospatial data.
We are going to install GeoPandas, Matplotlib, NumPy and Pandas.
pip install geopandas
pip install matplotlib
pip install numpy
... | [
{
"code": null,
"e": 25266,
"s": 25238,
"text": "\n16 Jul, 2020"
},
{
"code": null,
"e": 25445,
"s": 25266,
"text": "GeoPandas is an open source tool to add support for geographic data to Pandas objects. In this, article we are going to use GeoPandas and Matplotlib for plotting g... |
Financial Accounting - Subsidiary Books | Cash book is a record of all the transactions related to cash. Examples include: expenses paid in cash, revenue collected in cash, payments made to creditors, payments received from debtors, cash deposited in bank, withdrawn of cash for office use, etc.
In double column cash book, a discount column is included on both ... | [
{
"code": null,
"e": 2893,
"s": 2639,
"text": "Cash book is a record of all the transactions related to cash. Examples include: expenses paid in cash, revenue collected in cash, payments made to creditors, payments received from debtors, cash deposited in bank, withdrawn of cash for office use, etc.... |
PHP | defined() function - GeeksforGeeks | 23 Aug, 2019
The PHP defined() function is an inbuilt function in PHP which checks whether a constant is exists or not, in other words, defined or not.
Syntax:
bool defined($constant_name);
Parameter: This function accepts a single parameter as mentioned above and described below.
$constant_name: This is required param... | [
{
"code": null,
"e": 24581,
"s": 24553,
"text": "\n23 Aug, 2019"
},
{
"code": null,
"e": 24720,
"s": 24581,
"text": "The PHP defined() function is an inbuilt function in PHP which checks whether a constant is exists or not, in other words, defined or not."
},
{
"code": nu... |
JFreeChart - Line Chart | A line chart or line graph displays information as a series of data points (markers) connected by straight line segments. Line Chart shows how data changes at equal time frequency.
This chapter demonstrates how we can use JFreeChart to create Line Chart from a given set of business data.
The following example draws a l... | [
{
"code": null,
"e": 2122,
"s": 1941,
"text": "A line chart or line graph displays information as a series of data points (markers) connected by straight line segments. Line Chart shows how data changes at equal time frequency."
},
{
"code": null,
"e": 2230,
"s": 2122,
"text": "T... |
MATLAB - Vector Dot Product | Dot product of two vectors a = (a1, a2, ..., an) and b = (b1, b2, ..., bn) is given by −
a.b = ∑(ai.bi)
Dot product of two vectors a and b is calculated using the dot function.
dot(a, b);
Create a script file with the following code −
v1 = [2 3 4];
v2 = [1 2 3];
dp = dot(v1, v2);
disp('Dot Product:');
disp(dp);
When ... | [
{
"code": null,
"e": 2230,
"s": 2141,
"text": "Dot product of two vectors a = (a1, a2, ..., an) and b = (b1, b2, ..., bn) is given by −"
},
{
"code": null,
"e": 2245,
"s": 2230,
"text": "a.b = ∑(ai.bi)"
},
{
"code": null,
"e": 2318,
"s": 2245,
"text": "Dot pro... |
How to Save a Plot to a File Using Matplotlib? - GeeksforGeeks | 03 Jan, 2021
Matplotlib is a widely used python library to plot graphs, plots, charts, etc. show() method is used to display graphs as output, but don’t save it in any file. To save generated graphs in a file on storage disk, savefig() method is used.
savefig() : Save the current figure.
Syntax: pyplot.savefig(fname, ... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n03 Jan, 2021"
},
{
"code": null,
"e": 24532,
"s": 24292,
"text": "Matplotlib is a widely used python library to plot graphs, plots, charts, etc. show() method is used to display graphs as output, but don’t save it in any file. T... |
Select last 20 records ordered in ascending order in MySQL? | To select last 20 records in ascending order, you can use subquery LIMIT clause. The syntax is as follows
SELECT *FROM
(
SELECT *FROM yourTableName ORDER BY yourColumnName desc limit 20
)
anyVariableName order by anyVariableName.yourColumnName;
To understand the above syntax, let us create a table. The query to crea... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "To select last 20 records in ascending order, you can use subquery LIMIT clause. The syntax is as follows"
},
{
"code": null,
"e": 1310,
"s": 1168,
"text": "SELECT *FROM\n(\n SELECT *FROM yourTableName ORDER BY yourColumnName desc ... |
How to use the GetValue() method of array class in C#? | The GetValue() method of array class in C# gets the value at the specified position in the one-dimensional Array. The index is specified as a 32-bit integer.
We have set the array values first using the Array.CreateInstance method.
Array arr = Array.CreateInstance(typeof(String), 3, 6);
arr.SetValue("One", 0, 0);
arr.S... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "The GetValue() method of array class in C# gets the value at the specified position in the one-dimensional Array. The index is specified as a 32-bit integer."
},
{
"code": null,
"e": 1294,
"s": 1220,
"text": "We have set the array va... |
Angular 6 - Templates | Angular 6 uses the <ng-template> as the tag similar to Angular 4 instead of <template> which is used in Angular2. The reason Angular 4 changed <template> to <ng-template> is because there is a name conflict between the <template> tag and the html <template> standard tag. It will deprecate completely going ahead.
Let us... | [
{
"code": null,
"e": 2309,
"s": 1995,
"text": "Angular 6 uses the <ng-template> as the tag similar to Angular 4 instead of <template> which is used in Angular2. The reason Angular 4 changed <template> to <ng-template> is because there is a name conflict between the <template> tag and the html <templ... |
Downloading historical stock prices in Python | by Rohan Joseph | Towards Data Science | Open up a notebook and follow along:
What we need is pandas (the bread and butter for data science in python), yfinance for downloading the historical stock prices from yahoo finance, datetime and time which provides functions to manipulate dates and times, requests for sending HTTP requests and io for handling strings... | [
{
"code": null,
"e": 209,
"s": 172,
"text": "Open up a notebook and follow along:"
},
{
"code": null,
"e": 494,
"s": 209,
"text": "What we need is pandas (the bread and butter for data science in python), yfinance for downloading the historical stock prices from yahoo finance, da... |
How do I pass environment variables to Docker containers? | Suppose you are using a MySQL Docker container and you want to pass environment variables to your container while running the container. It’s always a good idea to isolate the services from the configuration and it’s always advised to use environment variables for this purpose.
Predominantly, there are three different ... | [
{
"code": null,
"e": 1341,
"s": 1062,
"text": "Suppose you are using a MySQL Docker container and you want to pass environment variables to your container while running the container. It’s always a good idea to isolate the services from the configuration and it’s always advised to use environment va... |
Sum of cubes of even and odd natural numbers - GeeksforGeeks | 09 Oct, 2018
We know that sum of cubes of first n natural numbers is = (n(n+1)/2)2.
Sum of cube of first n even natural numbers23 + 43 + 63 + ......... + (2n)3
Even Sum = 23 + 43 + 63 + .... + (2n)3
if we multiply by 23 then
= 23 x (13 + 23 + 32 + .... + (n)3)
= 23 + 43 + 63 + ......... + (2n)3... | [
{
"code": null,
"e": 25062,
"s": 25034,
"text": "\n09 Oct, 2018"
},
{
"code": null,
"e": 25133,
"s": 25062,
"text": "We know that sum of cubes of first n natural numbers is = (n(n+1)/2)2."
},
{
"code": null,
"e": 25209,
"s": 25133,
"text": "Sum of cube of firs... |
Python 3 - Tkinter Radiobutton | This widget implements a multiple-choice button, which is a way to offer many possible selections to the user and lets user choose only one of them.
In order to implement this functionality, each group of radiobuttons must be associated to the same variable and each one of the buttons must symbolize a single value. You... | [
{
"code": null,
"e": 2489,
"s": 2340,
"text": "This widget implements a multiple-choice button, which is a way to offer many possible selections to the user and lets user choose only one of them."
},
{
"code": null,
"e": 2725,
"s": 2489,
"text": "In order to implement this functi... |
How to use “OR” condition in MySQL CASE expression?
| Set the same condition like “OR” in a MySQL CASE expression. Let us first create a sample table.
Following is the query
mysql> create table caseOrConditionDemo
-> (
-> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
-> Name varchar(100),
-> Score int
-> );
Query OK, 0 rows affected (0.49 sec)
Following is th... | [
{
"code": null,
"e": 1159,
"s": 1062,
"text": "Set the same condition like “OR” in a MySQL CASE expression. Let us first create a sample table."
},
{
"code": null,
"e": 1182,
"s": 1159,
"text": "Following is the query"
},
{
"code": null,
"e": 1367,
"s": 1182,
... |
agetty command in Linux with Examples - GeeksforGeeks | 08 Oct, 2021
agetty is a Linux version of getty. getty short for “get tty” is a Unix program running on a host computer that manages physical or virtual terminals to allow multi-user access. Linux provides virtual terminal(tty) which is similar to the regular Linux terminal. agetty command opens a virtual terminal(tty ... | [
{
"code": null,
"e": 24116,
"s": 24088,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 24492,
"s": 24116,
"text": "agetty is a Linux version of getty. getty short for “get tty” is a Unix program running on a host computer that manages physical or virtual terminals to allow mult... |
NativeScript - Data Binding | Data binding is one of the advanced concepts supported by NativeScript. NativeScript follows Angular data binding concept as closely as possible. Data binding enables the UI component to show/update the current value of the application data model without any programming effort.
NativeScript supports two type of data bi... | [
{
"code": null,
"e": 2384,
"s": 2105,
"text": "Data binding is one of the advanced concepts supported by NativeScript. NativeScript follows Angular data binding concept as closely as possible. Data binding enables the UI component to show/update the current value of the application data model withou... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.