title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Flask â Sessions | Like Cookie, Session data is stored on client. Session is the time interval when a client logs into a server and logs out of it. The data, which is needed to be held across this session, is stored in the client browser.
A session with each client is assigned a Session ID. The Session data is stored on top of cookies an... | [
{
"code": null,
"e": 2253,
"s": 2033,
"text": "Like Cookie, Session data is stored on client. Session is the time interval when a client logs into a server and logs out of it. The data, which is needed to be held across this session, is stored in the client browser."
},
{
"code": null,
"... |
Python - Combine two dictionary adding values for common keys | When analyzing data with python we come across situations when we have to merge two dictionaries in such a way that we add the values of those elements whose keys have equal values. In this article we will see such two dictionaries getting added.
In this approach we design a for loop to check for the presence of the va... | [
{
"code": null,
"e": 1309,
"s": 1062,
"text": "When analyzing data with python we come across situations when we have to merge two dictionaries in such a way that we add the values of those elements whose keys have equal values. In this article we will see such two dictionaries getting added."
},
... |
MySQL - TRUNCATE TABLE Statement | The TRUNCATE TABLE statement deletes all the records of a specified table. Unlike DROP TABLE statement this statement retains the structure of the table, it just removes all the records from the table.
Following is the basic syntax of the TRUNCATE TABLE statement −
TRUNCATE TABLE table_name
Where, table_name is the na... | [
{
"code": null,
"e": 2535,
"s": 2333,
"text": "The TRUNCATE TABLE statement deletes all the records of a specified table. Unlike DROP TABLE statement this statement retains the structure of the table, it just removes all the records from the table."
},
{
"code": null,
"e": 2599,
"s":... |
C++ Program to Perform Preorder Recursive Traversal of a Given Binary Tree | Tree traversal is a form of graph traversal. It involves checking or printing each node in the tree exactly once. The preorder traversal of a binary search tree involves visiting each of the nodes in the tree in the order (Root, Left, Right).
An example of Preorder traversal of a binary tree is as follows.
A binary tre... | [
{
"code": null,
"e": 1305,
"s": 1062,
"text": "Tree traversal is a form of graph traversal. It involves checking or printing each node in the tree exactly once. The preorder traversal of a binary search tree involves visiting each of the nodes in the tree in the order (Root, Left, Right)."
},
{
... |
Bootstrap 4 - Navbar | Navbar provides navigation headers for your application or site. Navbars collapse in mobile views and become horizontal as the available viewport width increases.
To create a basic navbar, add the .navbar class with responsive collapsing class .navbar-expand-xl|lg|md|sm (provides navbar on extra large, large, medium or... | [
{
"code": null,
"e": 1979,
"s": 1816,
"text": "Navbar provides navigation headers for your application or site. Navbars collapse in mobile views and become horizontal as the available viewport width increases."
},
{
"code": null,
"e": 2379,
"s": 1979,
"text": "To create a basic n... |
C++ Program to Find the Number of occurrences of a given Number using Binary Search approach | This is a C++ program to find the number of occurrences of a given number using Binary Search approach.
Begin
function Insert() to insert nodes into the tree:
Arguments:
root, d.
Body of the function:
Create node using data from argument list.
If tree is completely empty, then insert new n... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "This is a C++ program to find the number of occurrences of a given number using Binary Search approach."
},
{
"code": null,
"e": 2063,
"s": 1166,
"text": "Begin\n function Insert() to insert nodes into the tree:\n Arguments:\n ... |
Difference between loc() and iloc() in Pandas DataFrame - GeeksforGeeks | 20 Aug, 2020
Pandas library of python is very useful for the manipulation of mathematical data and is widely used in the field of machine learning. It comprises of many methods for its proper functioning. loc() and iloc() are one of those methods. These are used in slicing of data from the Pandas DataFrame. They help i... | [
{
"code": null,
"e": 24703,
"s": 24675,
"text": "\n20 Aug, 2020"
},
{
"code": null,
"e": 25208,
"s": 24703,
"text": "Pandas library of python is very useful for the manipulation of mathematical data and is widely used in the field of machine learning. It comprises of many methods... |
Python - Sort Nested keys by Value - GeeksforGeeks | 11 May, 2020
Sometimes, while working with data records, we can have a problem in which we need to perform the sorting of nested keys of dictionary by the value of occurrence. This can have applications in arranging scores, prices etc. Lets discuss a way in which this task can be performed.
Method #1 : Using sorted() +... | [
{
"code": null,
"e": 24579,
"s": 24551,
"text": "\n11 May, 2020"
},
{
"code": null,
"e": 24858,
"s": 24579,
"text": "Sometimes, while working with data records, we can have a problem in which we need to perform the sorting of nested keys of dictionary by the value of occurrence. ... |
File isFile() method in Java with Examples - GeeksforGeeks | 28 Jan, 2019
The isFile() function is a part of File class in Java. This function determines whether the is a file or Directory denoted by the abstract filename is File or not. The function returns true if the abstract file path is File else returns false.
Function signature:
public boolean isFile()
Syntax:
file.isFile... | [
{
"code": null,
"e": 24513,
"s": 24485,
"text": "\n28 Jan, 2019"
},
{
"code": null,
"e": 24757,
"s": 24513,
"text": "The isFile() function is a part of File class in Java. This function determines whether the is a file or Directory denoted by the abstract filename is File or not.... |
How to do twos complement on a 16-bit signal using Python? | If you want to get an inversion of only first 16 bits of a number, you can take a xor of that number with 65535(16 1s in binary). Forgetting a 2s complement, just add one to the result. For example,
a = 3 # 11 in binary
b = (a ^ 65535) + 1
print(bin(b))
This will give the output:
0b1111111111111101 | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "If you want to get an inversion of only first 16 bits of a number, you can take a xor of that number with 65535(16 1s in binary). Forgetting a 2s complement, just add one to the result. For example,"
},
{
"code": null,
"e": 1316,
"s": 12... |
Azure Machine Learning Service — Where is My Data? | by Pankaj Jainani | Towards Data Science | Perhaps this is one of the important aspects of the Cloud machine learning platform. The dire need for every machine learning problem is its data. Mostly this data comes from various diverse sources, it is then refined, pruned, and massaged for various analyses and its consumption into the ML model. Due to this reason,... | [
{
"code": null,
"e": 626,
"s": 171,
"text": "Perhaps this is one of the important aspects of the Cloud machine learning platform. The dire need for every machine learning problem is its data. Mostly this data comes from various diverse sources, it is then refined, pruned, and massaged for various an... |
Wrapping long Y labels in Matplotlib tight layout using setp | To wrap long Y label in matplotlib tight layput using setp, we can take the following steps−
Create a list of a long strings.
Create a tuple of 3 values.
Create a figure and add a set of subplots.
Limit the Y-axis ticks using ylim() method.
Make a horizontal bar plot, using barh() method.
Use yticks() method to ticks t... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "To wrap long Y label in matplotlib tight layput using setp, we can take the following steps−"
},
{
"code": null,
"e": 1188,
"s": 1155,
"text": "Create a list of a long strings."
},
{
"code": null,
"e": 1216,
"s": 1188... |
Digital High Pass Butterworth Filter in Python - GeeksforGeeks | 14 Aug, 2021
In this article, we are going to discuss how to design a Digital High Pass Butterworth Filter using Python. The Butterworth filter is a type of signal processing filter designed to have a frequency response as flat as possible in the pass band. Let us take the below specifications to design the filter and ... | [
{
"code": null,
"e": 24890,
"s": 24862,
"text": "\n14 Aug, 2021"
},
{
"code": null,
"e": 25280,
"s": 24890,
"text": "In this article, we are going to discuss how to design a Digital High Pass Butterworth Filter using Python. The Butterworth filter is a type of signal processing f... |
How to change date format with DATE_FORMAT() in MySQL? | You can change the MySQL date format with a specific format using DATE_FORMAT(). Following is the syntax −
select date_format(yourColumnName,yourFormatSpecifier) from yourTableName;
Let us first create a table −
mysql> create table DemoTable
(
ShippingDate date
);
Query OK, 0 rows affected (0.48 sec)
Insert so... | [
{
"code": null,
"e": 1169,
"s": 1062,
"text": "You can change the MySQL date format with a specific format using DATE_FORMAT(). Following is the syntax −"
},
{
"code": null,
"e": 1244,
"s": 1169,
"text": "select date_format(yourColumnName,yourFormatSpecifier) from yourTableName;"... |
PHP date_timestamp_get() Function | The date_timestamp_get function is an alias of DateTime::getTimestamp(). This function accepts a DateTime object as a parameter and returns Unix timestamp for the given object.
date_timestamp_get(object)
object(Mandatory)
This is a DateTime object for which you need the time stamp for.
PHP date_timestamp_get() functio... | [
{
"code": null,
"e": 2934,
"s": 2757,
"text": "The date_timestamp_get function is an alias of DateTime::getTimestamp(). This function accepts a DateTime object as a parameter and returns Unix timestamp for the given object."
},
{
"code": null,
"e": 2962,
"s": 2934,
"text": "date_... |
Insert data in a table in MySQL stored procedure? | To insert in a table in stored procedure, the syntax is as follows −
create procedure yourProcedureName(OptionalParameter)
begin
insert into yourTableName() values(yourValue1,yourValue2,...N);
end
To understand the above syntax, let us first create a table −
mysql> create table DemoTable1928
(
Id int NOT NU... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "To insert in a table in stored procedure, the syntax is as follows −"
},
{
"code": null,
"e": 1265,
"s": 1131,
"text": "create procedure yourProcedureName(OptionalParameter)\n begin\n insert into yourTableName() values(yourValue1... |
How to check grant permission at run-time in android? | This example demonstrates how do I check grant permission at un-time in android.
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"?>
<Relat... | [
{
"code": null,
"e": 1143,
"s": 1062,
"text": "This example demonstrates how do I check grant permission at un-time in android."
},
{
"code": null,
"e": 1272,
"s": 1143,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required detai... |
Redis - Keys Expireat Command | Redis Expireat command is used to set the expiry of key in Unix timestamp format. After the expiry time, the key will not be available in Redis.
Integer value 1 or 0
1, if timeout is set for key.
0, if key does not exists or timeout could not set.
Following is the basic syntax of Redis Expireat command.
redis 127.0.0.1... | [
{
"code": null,
"e": 2190,
"s": 2045,
"text": "Redis Expireat command is used to set the expiry of key in Unix timestamp format. After the expiry time, the key will not be available in Redis."
},
{
"code": null,
"e": 2211,
"s": 2190,
"text": "Integer value 1 or 0"
},
{
"c... |
MySQL query to copy records from one table to another with different columns | For this you can use INSERT INTO SELECT statement. Let us first create a table −
mysql> create table DemoTable1900
(
ClientId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
ClientName varchar(20),
ClientAge int default 29
) auto_increment=1000;
Query OK, 0 rows affected (0.00 sec)
Insert some records in the ta... | [
{
"code": null,
"e": 1143,
"s": 1062,
"text": "For this you can use INSERT INTO SELECT statement. Let us first create a table −"
},
{
"code": null,
"e": 1353,
"s": 1143,
"text": "mysql> create table DemoTable1900\n (\n ClientId int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n Cli... |
badblocks command in Linux with examples - GeeksforGeeks | 26 Feb, 2019
badblock command in Linux is used to search for bad blocks (block of memory which has been corrupted and can no longer be used reliably) in a device. It is by default set to run in non-destructive read-only mode.
Syntax:
badblocks [-b block_size] [-i input_file] [-o output_file] [-svwnf]
[-c bloc... | [
{
"code": null,
"e": 24406,
"s": 24378,
"text": "\n26 Feb, 2019"
},
{
"code": null,
"e": 24619,
"s": 24406,
"text": "badblock command in Linux is used to search for bad blocks (block of memory which has been corrupted and can no longer be used reliably) in a device. It is by defa... |
How to use the GetUpperBound method of array class in C#? | The GetUpperBound() method of array class in C# gets the upper bound of the specified dimension in the Array.
Firstly, set the array and get the upperbound as shown below −
arr.GetUpperBound(0).ToString()
The following is an example stating the usage of GetUpperBound() method in C#.
Live Demo
using System;
using Syste... | [
{
"code": null,
"e": 1172,
"s": 1062,
"text": "The GetUpperBound() method of array class in C# gets the upper bound of the specified dimension in the Array."
},
{
"code": null,
"e": 1235,
"s": 1172,
"text": "Firstly, set the array and get the upperbound as shown below −"
},
{... |
Flutter - Google Sign in UI and Authentication - GeeksforGeeks | 16 Jan, 2022
In this article, we will look into how to make a beautiful Google Sign In screen and authenticate the same with Google.
To do so follow the below steps:
Step 1: First create the flutter project in your IDE.
Step 2: After that just remove the default code and start from scratch.
Step 3: Now just import t... | [
{
"code": null,
"e": 24751,
"s": 24723,
"text": "\n16 Jan, 2022"
},
{
"code": null,
"e": 24873,
"s": 24751,
"text": " In this article, we will look into how to make a beautiful Google Sign In screen and authenticate the same with Google. "
},
{
"code": null,
"e": 2490... |
How to Quickly Install WordPress On Ubuntu/Linux Mint | WordPress is a free and open source website and blogging tool and it is the most popular CMS (content management system) on the internet. It allows you to easily set up flexible blogs and websites on top of a MySQL backend with PHP processing. This article describes “How to install WordPress on Linux with bash script”.... | [
{
"code": null,
"e": 1493,
"s": 1062,
"text": "WordPress is a free and open source website and blogging tool and it is the most popular CMS (content management system) on the internet. It allows you to easily set up flexible blogs and websites on top of a MySQL backend with PHP processing. This arti... |
Creating a Financial Dashboard Using Python and Streamlit | by Julian Marx | Towards Data Science | Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking professional advice. See our Reader Terms for details.
Recent anecdotes of ... | [
{
"code": null,
"e": 472,
"s": 172,
"text": "Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking profession... |
Conversion Operators in C++ | In this article we will see what is the conversion operator in C++. C++ supports object oriented design. So we can create classes of some real world objects as concrete types.
Sometimes we need to convert some concrete type objects to some other type objects or some primitive datatypes. To make this conversion we can u... | [
{
"code": null,
"e": 1238,
"s": 1062,
"text": "In this article we will see what is the conversion operator in C++. C++ supports object oriented design. So we can create classes of some real world objects as concrete types."
},
{
"code": null,
"e": 1467,
"s": 1238,
"text": "Someti... |
How to get all the directories and sub directories inside a path in C#? | To get the directories C# provides a method Directory.GetDirectories. The Directory.GetDirectories method returns the names of the subdirectories (including their paths) that match the specified search pattern in the specified directory, and optionally searches subdirectories.
In the below example * is matches Zero or ... | [
{
"code": null,
"e": 1340,
"s": 1062,
"text": "To get the directories C# provides a method Directory.GetDirectories. The Directory.GetDirectories method returns the names of the subdirectories (including their paths) that match the specified search pattern in the specified directory, and optionally ... |
How to Check Twitter Bootstrap is Loaded or not ? - GeeksforGeeks | 19 Feb, 2020
Bootstrap is a very useful framework, which is offered by Twitter to make fully responsive websites. It provides CSS classes that are predefined and are usually meant to be directly used without any changes to it. To load Bootstrap into your website read this article Introduction and Installation.
It is ve... | [
{
"code": null,
"e": 26865,
"s": 26837,
"text": "\n19 Feb, 2020"
},
{
"code": null,
"e": 27164,
"s": 26865,
"text": "Bootstrap is a very useful framework, which is offered by Twitter to make fully responsive websites. It provides CSS classes that are predefined and are usually me... |
Count of strings that can be formed using a, b and c under given constraints - GeeksforGeeks | 29 Jul, 2021
Given a length n, count the number of strings of length n that can be made using ‘a’, ‘b’ and ‘c’ with at-most one ‘b’ and two ‘c’s allowed.Examples :
Input : n = 3
Output : 19
Below strings follow given constraints:
aaa aab aac aba abc aca acb acc baa
bac bca bcc caa cab cac cba cbc cca ccb
Input :... | [
{
"code": null,
"e": 25376,
"s": 25348,
"text": "\n29 Jul, 2021"
},
{
"code": null,
"e": 25529,
"s": 25376,
"text": "Given a length n, count the number of strings of length n that can be made using ‘a’, ‘b’ and ‘c’ with at-most one ‘b’ and two ‘c’s allowed.Examples : "
},
{
... |
C++ Program To Find Longest Common Prefix Using Word By Word Matching - GeeksforGeeks | 03 Jan, 2022
Given a set of strings, find the longest common prefix. Examples:
Input : {“geeksforgeeks”, “geeks”, “geek”, “geezer”}
Output : "gee"
Input : {"apple", "ape", "april"}
Output : "ap"
We start with an example. Suppose there are two strings- “geeksforgeeks” and “geeks”. What is the longest common prefix in... | [
{
"code": null,
"e": 26041,
"s": 26013,
"text": "\n03 Jan, 2022"
},
{
"code": null,
"e": 26107,
"s": 26041,
"text": "Given a set of strings, find the longest common prefix. Examples:"
},
{
"code": null,
"e": 26226,
"s": 26107,
"text": "Input : {“geeksforgeeks... |
Managing your data science project environments with Conda | Towards Data Science | In the this post I detail a minimal set of “best practices” for using Conda to manage project-specific environments that I use in my own data science work. This article assumes a basic familiarity with Conda and focuses on communicating a small set of “best practices” for managing data science project environments with... | [
{
"code": null,
"e": 638,
"s": 172,
"text": "In the this post I detail a minimal set of “best practices” for using Conda to manage project-specific environments that I use in my own data science work. This article assumes a basic familiarity with Conda and focuses on communicating a small set of “be... |
Add elements to HashMap in Java | To add elements to HashMap, use the put() method.
First, create a HashMap −
HashMap hm = new HashMap();
Now, let us add some elements to the HashMap −
hm.put("Maths", new Integer(98));
hm.put("Science", new Integer(90));
hm.put("English", new Integer(97));
The following is an example to add elements to HashMap −
Live ... | [
{
"code": null,
"e": 1112,
"s": 1062,
"text": "To add elements to HashMap, use the put() method."
},
{
"code": null,
"e": 1138,
"s": 1112,
"text": "First, create a HashMap −"
},
{
"code": null,
"e": 1166,
"s": 1138,
"text": "HashMap hm = new HashMap();"
},
... |
Print all possible sums of consecutive numbers with sum N in C++ | In this problem, we are given a positive integer N and we have to print the sequence of all possible consecutive numbers with a sum equal to N.
Let’s take an example to understand the problem,
Input: N = 15
Output: 1 2 3 4 5
7 8
A simple solution to this problem is by adding up consecutive sequence combinations till N/... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "In this problem, we are given a positive integer N and we have to print the sequence of all possible consecutive numbers with a sum equal to N."
},
{
"code": null,
"e": 1255,
"s": 1206,
"text": "Let’s take an example to understand th... |
Detect cycle in Directed Graph using Topological Sort - GeeksforGeeks | 21 Dec, 2021
Given a Directed Graph consisting of N vertices and M edges and a set of Edges[][], the task is to check whether the graph contains a cycle or not using Topological sort.
Topological sort of directed graph is a linear ordering of its vertices such that, for every directed edge U -> V from vertex U to verte... | [
{
"code": null,
"e": 24873,
"s": 24845,
"text": "\n21 Dec, 2021"
},
{
"code": null,
"e": 25044,
"s": 24873,
"text": "Given a Directed Graph consisting of N vertices and M edges and a set of Edges[][], the task is to check whether the graph contains a cycle or not using Topologica... |
Exploratory Data Analysis of Kaggle datasets. | by Gokul S Kumar | Towards Data Science | Exploratory Data Analysis or EDA refers to the process of knowing more about the data in hand and preparing it for modeling. To be frank, EDA and feature engineering is an art where you get to play around with the data and try to get insights from it before the process of prediction. Most people understand machine lear... | [
{
"code": null,
"e": 735,
"s": 172,
"text": "Exploratory Data Analysis or EDA refers to the process of knowing more about the data in hand and preparing it for modeling. To be frank, EDA and feature engineering is an art where you get to play around with the data and try to get insights from it befo... |
What is character entities in HTML ? - GeeksforGeeks | 20 Aug, 2021
In this article, we will learn about HTML character entities and how to use them. HTML character entities are basically a set of characters (entity) used to represent few characters reserved by the HTML, especially invisible characters or characters difficult to type out using a regular keyboard. HTML prov... | [
{
"code": null,
"e": 24503,
"s": 24475,
"text": "\n20 Aug, 2021"
},
{
"code": null,
"e": 24939,
"s": 24503,
"text": "In this article, we will learn about HTML character entities and how to use them. HTML character entities are basically a set of characters (entity) used to repres... |
Program to find covariance in C++ | In this tutorial, we will be discussing a program to find covariance.
For this we will be provided with two sets of random variables. Our task is to calculate their covariance i.e, the measure of how much those two values differ together.
Live Demo
#include<bits/stdc++.h>
using namespace std;
//function to find mean
f... | [
{
"code": null,
"e": 1132,
"s": 1062,
"text": "In this tutorial, we will be discussing a program to find covariance."
},
{
"code": null,
"e": 1301,
"s": 1132,
"text": "For this we will be provided with two sets of random variables. Our task is to calculate their covariance i.e, t... |
Apache Sqoop. RDBMS to HDFS and back | by Prathamesh Nimkar | Towards Data Science | Across the globe, the most popular databases are SQL based. Considering this, it is paramount for any data lake to be able to pull data from an RDBMS database. Thus, Apache Sqoop was born.
Apache Sqoop supports bi-directional movement of data between any RDBMS and HDFS, Hive or HBase, etc. But, structured data only. It... | [
{
"code": null,
"e": 361,
"s": 172,
"text": "Across the globe, the most popular databases are SQL based. Considering this, it is paramount for any data lake to be able to pull data from an RDBMS database. Thus, Apache Sqoop was born."
},
{
"code": null,
"e": 693,
"s": 361,
"text"... |
SVG - Ellipse | <ellipse> element is used to draw ellipse with a center point and given two radii.
Following is the syntax declaration of <ellipse> element. We've shown main attributes only.
<ellipse
cx="x-axis co-ordinate"
cy="y-axis co-ordinate"
rx="length"
ry="length" >
</ellipse>
<html>
<title>SVG Ellipse<... | [
{
"code": null,
"e": 2448,
"s": 2364,
"text": "<ellipse> element is used to draw ellipse with a center point and given two radii."
},
{
"code": null,
"e": 2540,
"s": 2448,
"text": "Following is the syntax declaration of <ellipse> element. We've shown main attributes only."
},
... |
How to Create an Interactive Geographic Map Using Python and Bokeh | by Jim King | Towards Data Science | If you are looking for a powerful way to visualize geographic data then you should learn to use interactive Choropleth maps. A Choropleth map represents statistical data through various shading patterns or symbols on predetermined geographic areas such as countries, states or counties. Static Choropleth maps are useful... | [
{
"code": null,
"e": 638,
"s": 171,
"text": "If you are looking for a powerful way to visualize geographic data then you should learn to use interactive Choropleth maps. A Choropleth map represents statistical data through various shading patterns or symbols on predetermined geographic areas such as... |
Converting date type SYDATUM in a format like MM/DD/YY in SAP ABAP | It depends if you want to write it to a list screen or you want to convert it to a text variable. To write it to a list screen, you can use below code −
WRITE I_my_dateMM/DD/YYYY
To convert it to a text variable, you can use below command −
WRITE l_my_dateTO l_my_text MM/DD/YYYY
If you want to set the date in SAPscript... | [
{
"code": null,
"e": 1215,
"s": 1062,
"text": "It depends if you want to write it to a list screen or you want to convert it to a text variable. To write it to a list screen, you can use below code −"
},
{
"code": null,
"e": 1241,
"s": 1215,
"text": "WRITE I_my_dateMM/DD/YYYY"
... |
Increase the distance between the title and the plot in Matplotlib | To increase the distance between the title and the plot in matplotlib, we can take the following steps −
Create point x using numpy.
Create point x using numpy.
Create point y using numpy sin.
Create point y using numpy sin.
Set the title of the plot. After changing the value y (in argument), we can increase or decreas... | [
{
"code": null,
"e": 1167,
"s": 1062,
"text": "To increase the distance between the title and the plot in matplotlib, we can take the following steps −"
},
{
"code": null,
"e": 1195,
"s": 1167,
"text": "Create point x using numpy."
},
{
"code": null,
"e": 1223,
"s... |
ASP.NET - Database Access | ASP.NET allows the following sources of data to be accessed and used:
Databases (e.g., Access, SQL Server, Oracle, MySQL)
XML documents
Business Objects
Flat files
ASP.NET hides the complex processes of data access and provides much higher level of classes and objects through which data is accessed easily. These classe... | [
{
"code": null,
"e": 2417,
"s": 2347,
"text": "ASP.NET allows the following sources of data to be accessed and used:"
},
{
"code": null,
"e": 2469,
"s": 2417,
"text": "Databases (e.g., Access, SQL Server, Oracle, MySQL)"
},
{
"code": null,
"e": 2483,
"s": 2469,
... |
Quickly share ML WebApps from Google Colab using ngrok for Free | by AbdulMajedRaja RS | Towards Data Science | There’s a joke on the Internet about how most Machine Learning Models end up in a Powerpoint presentation. If you are a data scientist, probably you can’t deny that fact. But things have started changing, especially with solutions like Voila, Streamlit, Dash by Plotly. These are part of a niche within ML and Data Scien... | [
{
"code": null,
"e": 667,
"s": 172,
"text": "There’s a joke on the Internet about how most Machine Learning Models end up in a Powerpoint presentation. If you are a data scientist, probably you can’t deny that fact. But things have started changing, especially with solutions like Voila, Streamlit, D... |
Ext.js - Basic Alert Box | This is the simplest alert box just to show some information on some event.
Following is a simple syntax for basic alert box.
Ext.Msg.alert('Title', 'Basic message box in ExtJS');
Following is a simple example showing the usage.
<!DOCTYPE html>
<html>
<head>
<link href = "https://cdnjs.cloudflare.com/ajax/lib... | [
{
"code": null,
"e": 2099,
"s": 2023,
"text": "This is the simplest alert box just to show some information on some event."
},
{
"code": null,
"e": 2149,
"s": 2099,
"text": "Following is a simple syntax for basic alert box."
},
{
"code": null,
"e": 2204,
"s": 2149... |
How to Sort ArrayList in Java | Collections.sort() Example | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In this tutorial, we will see how to sort Arr... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
Electron - Defining Shortcuts | We typically have memorized certain shortcuts for all the apps that we use on our PC daily. To make your applications feel intuitive and easily accessible to the user, you must allow the user to use shortcuts.
We will use the globalShortcut module to define shortcuts in our app. Note that Accelerators are Strings that ... | [
{
"code": null,
"e": 2275,
"s": 2065,
"text": "We typically have memorized certain shortcuts for all the apps that we use on our PC daily. To make your applications feel intuitive and easily accessible to the user, you must allow the user to use shortcuts."
},
{
"code": null,
"e": 2545,
... |
Forecasting in Python with Facebook Prophet | by Greg Rafferty | Towards Data Science | Update: I’ve written a book about Facebook Prophet which has been published by Packt Publishing! The book is available for purchase on Amazon.
The book covers every detail of using Prophet starting with installation through model evaluation and tuning. Over a dozen datasets have been made available and used to demonstr... | [
{
"code": null,
"e": 315,
"s": 172,
"text": "Update: I’ve written a book about Facebook Prophet which has been published by Packt Publishing! The book is available for purchase on Amazon."
},
{
"code": null,
"e": 747,
"s": 315,
"text": "The book covers every detail of using Proph... |
Java lang.Long.byteValue() method in Java with Examples - GeeksforGeeks | 23 May, 2019
java.lang.Long.byteValue() is a built-in function in Java that returns the value of this Long as a byte.
Syntax:
public byte byteValue()
Parameters: The function does not accept any parameter.
Return :
This method returns the numeric value
represented by this object after conversion to byte type.
Example... | [
{
"code": null,
"e": 23557,
"s": 23529,
"text": "\n23 May, 2019"
},
{
"code": null,
"e": 23662,
"s": 23557,
"text": "java.lang.Long.byteValue() is a built-in function in Java that returns the value of this Long as a byte."
},
{
"code": null,
"e": 23670,
"s": 23662... |
Program to Find the Shortest Distance Between Two Points in C++ | Suppose we have a list of coordinates where each element is of the form [x, y], representing Euclidean coordinates. We have to find the smallest squared distance (x1 - x2) 2 + (y1 - y2) 2 between any two provided coordinates.
So, if the input is like coordinates = {{1, 2},{1, 4},{3, 5}}, then the output will be 4.
To s... | [
{
"code": null,
"e": 1288,
"s": 1062,
"text": "Suppose we have a list of coordinates where each element is of the form [x, y], representing Euclidean coordinates. We have to find the smallest squared distance (x1 - x2) 2 + (y1 - y2) 2 between any two provided coordinates."
},
{
"code": null,... |
add_cookie driver method - Selenium Python - GeeksforGeeks | 15 May, 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": 23991,
"s": 23963,
"text": "\n15 May, 2020"
},
{
"code": null,
"e": 24730,
"s": 23991,
"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... |
Google Colab: An Online Jupyter Notebook That You Should Definitely Try | by Alan Jones | Towards Data Science | I’ve used Google Colab quite a lot. It used to be my default Jupyter Notebook environment and the starting point for many of my articles on Medium (I also use VSCode these days, too, but that is another story).
Colab is an online Jupyter Notebooks environment from Google. It does everything that a local notebook would ... | [
{
"code": null,
"e": 376,
"s": 165,
"text": "I’ve used Google Colab quite a lot. It used to be my default Jupyter Notebook environment and the starting point for many of my articles on Medium (I also use VSCode these days, too, but that is another story)."
},
{
"code": null,
"e": 622,
... |
Fix MySQL Error #1064 - You have an error in your SQL syntax... near 'TYPE=MyISAM? | This error occurs when we use TYPE for ENGINE NAME. The error is as follows −
mysql> create table DemoTable1836
(
ClientId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
ClientName varchar(20)
)Type=MyISAM AUTO_INCREMENT=1;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that co... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "This error occurs when we use TYPE for ENGINE NAME. The error is as follows −"
},
{
"code": null,
"e": 1495,
"s": 1140,
"text": "mysql> create table DemoTable1836\n (\n ClientId int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n ... |
crypto.createCipheriv() Method in Node.js | The crypto.createCipheriv() method will first create and then return the cipher object as per the algorithm passed for the given key and authorization factor (iv).
crypto.createCipheriv(algorithm, key, iv, options)
The above parameters are described as below −
algorithm – It takes the input for the algorithm that would... | [
{
"code": null,
"e": 1226,
"s": 1062,
"text": "The crypto.createCipheriv() method will first create and then return the cipher object as per the algorithm passed for the given key and authorization factor (iv)."
},
{
"code": null,
"e": 1277,
"s": 1226,
"text": "crypto.createCiphe... |
A quick guide to distributed training with TensorFlow and Horovod on Amazon SageMaker | by Shashank Prasanna | Towards Data Science | In deep learning, more is better. More data, more layers, and more compute power, usually leads to higher accuracy, and better robustness of trained models.
I may not be able to help you collect more data, but I can show how you can do distributed training on a large number of machines to train faster and run more expe... | [
{
"code": null,
"e": 329,
"s": 172,
"text": "In deep learning, more is better. More data, more layers, and more compute power, usually leads to higher accuracy, and better robustness of trained models."
},
{
"code": null,
"e": 532,
"s": 329,
"text": "I may not be able to help you... |
Forms & Validation Components | The Form Component is used to create a form in the tapestry page for user input. A form can contain text fields, date fields, checkbox fields, select options, submit button and more.
This chapter explains about some of the notable form components in detail.
A Checkbox Component is used to take a choice between two mutu... | [
{
"code": null,
"e": 2257,
"s": 2074,
"text": "The Form Component is used to create a form in the tapestry page for user input. A form can contain text fields, date fields, checkbox fields, select options, submit button and more."
},
{
"code": null,
"e": 2332,
"s": 2257,
"text": ... |
Where should jQuery code go in header or footer? | It’s always a good practice to add jQuery code in footer i.e. just before the closing </body> tag. If you have not done that, then use the defer attribute.
Use defer attribute so the web browser knows to download your scripts after the HTML downloaded −
<script src="new.js" defer="defer"></script>
The defer attribute i... | [
{
"code": null,
"e": 1218,
"s": 1062,
"text": "It’s always a good practice to add jQuery code in footer i.e. just before the closing </body> tag. If you have not done that, then use the defer attribute."
},
{
"code": null,
"e": 1316,
"s": 1218,
"text": "Use defer attribute so the... |
TreeSet size() Method in Java - GeeksforGeeks | 26 Nov, 2018
The Java.util.TreeSet.size() method is used to get the size of the Tree set or the number of elements present in the Tree set.
Syntax:
Tree_Set.size()
Parameters: The method does not take any parameter.
Return Value: The method returns the size or the number of elements present in the Set.
Below program i... | [
{
"code": null,
"e": 23582,
"s": 23554,
"text": "\n26 Nov, 2018"
},
{
"code": null,
"e": 23709,
"s": 23582,
"text": "The Java.util.TreeSet.size() method is used to get the size of the Tree set or the number of elements present in the Tree set."
},
{
"code": null,
"e":... |
PHP pow() Function | The pow () function is used to compute power of a certain number. It returns xy calculation, also termed as x raised to y. PHP also provides "**" asexponentiation operator.
So, pow(x,y) returns xy which is same as x**y
pow ( number $base , number $exp ) : number
PHP pow() function returns base raised to power of exp. I... | [
{
"code": null,
"e": 1235,
"s": 1062,
"text": "The pow () function is used to compute power of a certain number. It returns xy calculation, also termed as x raised to y. PHP also provides \"**\" asexponentiation operator."
},
{
"code": null,
"e": 1281,
"s": 1235,
"text": "So, pow... |
An Even Easier Guide to Getting Stock Data With Python | by Melvynn Fernandez | Towards Data Science | Follow along, access to code here.
I just came across this article in my email newsletter. So I wanted to do an even easier version of getting stock data with Python. Only my version requires no installation of Python on your computer. It is completely run using Google Colab.
For those unfamiliar with Google Colab, it ... | [
{
"code": null,
"e": 206,
"s": 171,
"text": "Follow along, access to code here."
},
{
"code": null,
"e": 448,
"s": 206,
"text": "I just came across this article in my email newsletter. So I wanted to do an even easier version of getting stock data with Python. Only my version req... |
Batch Normalization Tensorflow Keras Example | by Cory Maklin | Towards Data Science | Machine learning is such an active field of research that you’ll often see white papers referenced in the documentation of libraries. In the proceeding article we’ll cover batch normalization which was characterized by Loffe and Szegedy. If you’re the kind of person who likes to get their information directly from the ... | [
{
"code": null,
"e": 550,
"s": 171,
"text": "Machine learning is such an active field of research that you’ll often see white papers referenced in the documentation of libraries. In the proceeding article we’ll cover batch normalization which was characterized by Loffe and Szegedy. If you’re the kin... |
Linear regression explained. Learn how this supervised machine... | by Zolzaya Luvsandorj | Towards Data Science | Linear regression is probably the most well-known machine learning algorithm out there. It is often the first algorithm to encounter when studying or practicing data science because of its simplicity, speed, and interpretability. If you want to sharpen your understanding of linear regression, this post shows the math b... | [
{
"code": null,
"e": 611,
"s": 171,
"text": "Linear regression is probably the most well-known machine learning algorithm out there. It is often the first algorithm to encounter when studying or practicing data science because of its simplicity, speed, and interpretability. If you want to sharpen yo... |
How to get text found between span – Selenium | We can get the text found within the span tag with Selenium webdriver.
The text of a web element can be captured with the method getText. Let us see an example of an element having the text - © Copyright 2021. All Rights Reserved enclosed within the span tag.
WebElement l = driver.findElement(By.xpath("//p/span"));
Str... | [
{
"code": null,
"e": 1133,
"s": 1062,
"text": "We can get the text found within the span tag with Selenium webdriver."
},
{
"code": null,
"e": 1322,
"s": 1133,
"text": "The text of a web element can be captured with the method getText. Let us see an example of an element having t... |
File Permissions in C# | For File Permission in C#, use the FileIOPermission Class. It controls the ability to access files and folders.
The following are the properties of File Permissions class −
The following are the methods of File Permission class −
Let us see an example to work wuth FileIOPermission Class in C#. Here, the Demand() method... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "For File Permission in C#, use the FileIOPermission Class. It controls the ability to access files and folders."
},
{
"code": null,
"e": 1235,
"s": 1174,
"text": "The following are the properties of File Permissions class −"
},
{... |
Microsoft Azure - Quick Guide | The popular trend in today's technology driven world is ‘Cloud Computing’. Cloud computing can be referred to as the storing and accessing of data over the internet rather than your computer's hard drive. This means you don't access the data from either your computer's hard drive or over a dedicated computer network (h... | [
{
"code": null,
"e": 3456,
"s": 3009,
"text": "The popular trend in today's technology driven world is ‘Cloud Computing’. Cloud computing can be referred to as the storing and accessing of data over the internet rather than your computer's hard drive. This means you don't access the data from either... |
How to get the size of a json object in JavaScript? | To get the number of keys in a JSON object in javascript you can use one
of the following 2 methods.
The Object.keys() method returns an array of a given object's own enumerable property names, in the same order as we get with a normal loop.
let a = {
name: "John",
age: 32,
city: "Hong Kong"
}
console.log(Obje... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "To get the number of keys in a JSON object in javascript you can use one\nof the following 2 methods."
},
{
"code": null,
"e": 1304,
"s": 1163,
"text": "The Object.keys() method returns an array of a given object's own enumerable pro... |
How to Format a Write–Protected Pen Drive? - GeeksforGeeks | 10 May, 2020
When you receive the error “The disk is write-protected“, it means you tried formatting your Pendrive but were not able to. This may be due to external software or encryption that was probably used to lock the contents of the Pendrive and the contents within the drive are read-only. In this case, the compu... | [
{
"code": null,
"e": 24391,
"s": 24363,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 24785,
"s": 24391,
"text": "When you receive the error “The disk is write-protected“, it means you tried formatting your Pendrive but were not able to. This may be due to external software or... |
Football players tracking — identifying players’ team based on their jersey colors using OpenCV | by C K | Towards Data Science | In my previous work, I used pre-trained Yolov3 model to detect and used SORT (simple online and realtime tracking) to track football players from video. Then I used OpenCV’s getPerspectiveTransform function to convert the video to bird’s-eye view.
towardsdatascience.com
One of the problems of this work is that the mode... | [
{
"code": null,
"e": 420,
"s": 172,
"text": "In my previous work, I used pre-trained Yolov3 model to detect and used SORT (simple online and realtime tracking) to track football players from video. Then I used OpenCV’s getPerspectiveTransform function to convert the video to bird’s-eye view."
},
... |
Text Preprocessing with NLTK. A detailed walkthrough of preprocessing... | by Ruthu S Sanketh | Towards Data Science | What is Natural Language Processing?What is NLTK?Initial StepsPreliminary StatisticsStemming and Lemmatization with NLTKHow are Stemming and Lemmatization Different?ConclusionFurther Reading
What is Natural Language Processing?
What is NLTK?
Initial Steps
Preliminary Statistics
Stemming and Lemmatization with NLTK
How ... | [
{
"code": null,
"e": 362,
"s": 171,
"text": "What is Natural Language Processing?What is NLTK?Initial StepsPreliminary StatisticsStemming and Lemmatization with NLTKHow are Stemming and Lemmatization Different?ConclusionFurther Reading"
},
{
"code": null,
"e": 399,
"s": 362,
"tex... |
What I realized after solving 100 leetcode SQL questions... | by Linda Chen | Towards Data Science | There are lots of articles out there teaching you how to write queries. Knowing how to write a single query is not really the hard part. The hard part is that there are always multiple options of approaches and all of them require a combination of queries. To put questions into categories, it helps us to identify patte... | [
{
"code": null,
"e": 560,
"s": 172,
"text": "There are lots of articles out there teaching you how to write queries. Knowing how to write a single query is not really the hard part. The hard part is that there are always multiple options of approaches and all of them require a combination of queries... |
Classification and Regression Analysis with Decision Trees | by Lorraine Li | Towards Data Science | A decision tree is a supervised machine learning model used to predict a target by learning decision rules from features. As the name suggests, we can think of this model as breaking down our data by making a decision based on asking a series of questions.
Let's consider the following example in which we use a decision... | [
{
"code": null,
"e": 429,
"s": 172,
"text": "A decision tree is a supervised machine learning model used to predict a target by learning decision rules from features. As the name suggests, we can think of this model as breaking down our data by making a decision based on asking a series of questions... |
C++ IOS Library - Setf | It is used to set specific format flags. The format flags of a stream affect the way data is interpreted in certain input functions and how it is written by certain output functions. See ios_base::fmtflags for the possible values of this function's arguments.
Following is the declaration for ios_base::setf function.
se... | [
{
"code": null,
"e": 2863,
"s": 2603,
"text": "It is used to set specific format flags. The format flags of a stream affect the way data is interpreted in certain input functions and how it is written by certain output functions. See ios_base::fmtflags for the possible values of this function's argu... |
How can we take a backup of multiple databases by using mysqldump client program? | By using mysql dump client program we can take the backup of multiple databases into a file having the extension ‘.sql’. It can be understood with the help of the following example −
In this example, with the help of mysql dump client program, we are taking the backup of two databases named ‘tutorials’ and ‘query1’ in ... | [
{
"code": null,
"e": 1245,
"s": 1062,
"text": "By using mysql dump client program we can take the backup of multiple databases into a file having the extension ‘.sql’. It can be understood with the help of the following example −"
},
{
"code": null,
"e": 1456,
"s": 1245,
"text": ... |
How to Install and Configure Nginx on Ubuntu 16.04 | In this article, we will learn about how to install and configure the Nginx Web server. Nginx is the most popular web server where some of the most popular and high traffic sites are hosted where it is more friendly and secured than Apache and it is also used as a web server.
Ubuntu 16.04 installed on the machine with ... | [
{
"code": null,
"e": 1339,
"s": 1062,
"text": "In this article, we will learn about how to install and configure the Nginx Web server. Nginx is the most popular web server where some of the most popular and high traffic sites are hosted where it is more friendly and secured than Apache and it is als... |
How to save the plot to a numpy array in RGB format? | To save the plot to a numpy array in RGB format, we can take the following steps −
Create r, g and b random array using numpy.
Create r, g and b random array using numpy.
Zip r, g and b (grom step 1) to make an rgb tuple list.
Zip r, g and b (grom step 1) to make an rgb tuple list.
Convert rgb into a numpy array to plo... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "To save the plot to a numpy array in RGB format, we can take the following steps −"
},
{
"code": null,
"e": 1189,
"s": 1145,
"text": "Create r, g and b random array using numpy."
},
{
"code": null,
"e": 1233,
"s": 118... |
Count numbers with difference between number and its digit sum greater than specific value in C++ | We are provided two numbers N which defines a range [1,N] and D which is a difference.The goal is to find all the numbers in the range [1,N] such that the [ number - (sum of its digits) ] > D. We will do this by traversing numbers from 1 to N and for each number we will calculate its digit sum using a while loop. Check... | [
{
"code": null,
"e": 1452,
"s": 1062,
"text": "We are provided two numbers N which defines a range [1,N] and D which is a difference.The goal is to find all the numbers in the range [1,N] such that the [ number - (sum of its digits) ] > D. We will do this by traversing numbers from 1 to N and for ea... |
MONTH() Function in SQL Server - GeeksforGeeks | 11 Jan, 2021
MONTH() function :This function in SQL Server is used to return the month of the year i.e, from 1 to 12 for a date stated.
Features :
This function is used to find the month of the year for a date specified.
This function comes under Date Functions.
This function accepts only one parameter i.e, date.
This ... | [
{
"code": null,
"e": 25623,
"s": 25595,
"text": "\n11 Jan, 2021"
},
{
"code": null,
"e": 25746,
"s": 25623,
"text": "MONTH() function :This function in SQL Server is used to return the month of the year i.e, from 1 to 12 for a date stated."
},
{
"code": null,
"e": 257... |
Program to find Nth term of series 0, 11, 28, 51, 79, 115, 156, 203, .... - GeeksforGeeks | 10 Mar, 2021
Given a number N. The task is to write a program to find the Nth term of the below series:
0, 11, 28, 51, 79, 115, 156, 203.....(N Terms)
Examples:
Input: N = 4
Output: 51
For N = 4
4th Term = ( 3 * 4 * 4 + 2 * 4 - 5)
= 51
Input: N = 10
Output: 314
Approach: The generalized Nth term of this... | [
{
"code": null,
"e": 24572,
"s": 24544,
"text": "\n10 Mar, 2021"
},
{
"code": null,
"e": 24664,
"s": 24572,
"text": "Given a number N. The task is to write a program to find the Nth term of the below series: "
},
{
"code": null,
"e": 24711,
"s": 24664,
"text":... |
Compare Adjacent Rows in R data.table - GeeksforGeeks | 13 Jul, 2021
The data.table package is used to ease the data manipulation operations such as subsetting, grouping, and updation operations of the data table in R Programming Language.
Indexing methods are used to create a new column that computes the lag with the previous value encountered within the same group. The g... | [
{
"code": null,
"e": 25162,
"s": 25134,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 25334,
"s": 25162,
"text": "The data.table package is used to ease the data manipulation operations such as subsetting, grouping, and updation operations of the data table in R Programming La... |
Hyperparameter Tuning — Always Tune your Models | by Zachary Warnes | Towards Data Science | Grid Search — Exhaustive and Computationally expensive, use when hyperparameter search space is restricted.
Random Search — Larger Search Spaces improved models compared to Grid Search, the go-to method built into scikit-learn.
Bayesian Optimization — Improved performance over random search & hyperparameter interpretat... | [
{
"code": null,
"e": 279,
"s": 171,
"text": "Grid Search — Exhaustive and Computationally expensive, use when hyperparameter search space is restricted."
},
{
"code": null,
"e": 399,
"s": 279,
"text": "Random Search — Larger Search Spaces improved models compared to Grid Search, ... |
C# - Properties | Properties are named members of classes, structures, and interfaces. Member variables or methods in a class or structures are called Fields. Properties are an extension of fields and are accessed using the same syntax. They use accessors through which the values of the private fields can be read, written or manipulated... | [
{
"code": null,
"e": 2592,
"s": 2270,
"text": "Properties are named members of classes, structures, and interfaces. Member variables or methods in a class or structures are called Fields. Properties are an extension of fields and are accessed using the same syntax. They use accessors through which t... |
Python | Pandas Series.valid() - GeeksforGeeks | 29 Jan, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique bu... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n29 Jan, 2019"
},
{
"code": null,
"e": 24426,
"s": 24212,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages a... |
Comparing two dates in PHP | To compare two dates in PHP, the code is as follows. Here, we have used the equality operator to compare dates −
Live Demo
<?php
$dateOne = "2019-10-30";
$dateTwo = "2019-10-30";
echo "Date1 = $dateOne";
echo "\nDate2 = $dateTwo";
if ($dateOne == $dateTwo)
echo "\nBoth the dates are equal!";
el... | [
{
"code": null,
"e": 1175,
"s": 1062,
"text": "To compare two dates in PHP, the code is as follows. Here, we have used the equality operator to compare dates −"
},
{
"code": null,
"e": 1186,
"s": 1175,
"text": " Live Demo"
},
{
"code": null,
"e": 1432,
"s": 1186,
... |
Python 3 - os.close() Method | The method close() closes the associated with file descriptor fd.
Following is the syntax for close() method −
os.close(fd)
fd − This is the file descriptor of the file.
This method does not return any value.
Note − This function is intended for low-level I/O and must be applied to a file descriptor as returned by os.... | [
{
"code": null,
"e": 2406,
"s": 2340,
"text": "The method close() closes the associated with file descriptor fd."
},
{
"code": null,
"e": 2451,
"s": 2406,
"text": "Following is the syntax for close() method −"
},
{
"code": null,
"e": 2465,
"s": 2451,
"text": "... |
Maximum score after flipping a Binary Matrix atmost K times - GeeksforGeeks | 26 May, 2021
Given a two dimensional matrix A of zero’s and one’s and an integer K. In each move, you can choose any row or column and toggle every value in that row or column. That is, change all 0s to 1s, or all 1s to 0s. After making atmost K of moves, every row of this matrix represents a binary number. The task is... | [
{
"code": null,
"e": 24929,
"s": 24901,
"text": "\n26 May, 2021"
},
{
"code": null,
"e": 25314,
"s": 24929,
"text": "Given a two dimensional matrix A of zero’s and one’s and an integer K. In each move, you can choose any row or column and toggle every value in that row or column.... |
Python - Tkinter Scale | The Scale widget provides a graphical slider object that allows you to select values from a specific scale.
Here is the simple syntax to create this widget −
w = Scale ( master, option, ... )
master − This represents the parent window.
master − This represents the parent window.
options − Here is the list of most comm... | [
{
"code": null,
"e": 2352,
"s": 2244,
"text": "The Scale widget provides a graphical slider object that allows you to select values from a specific scale."
},
{
"code": null,
"e": 2402,
"s": 2352,
"text": "Here is the simple syntax to create this widget −"
},
{
"code": nu... |
Count how many times the substring appears in the larger String in Java | Let’s say we have the following string.
String str = "Learning never ends! Learning never stops!";
In the above string, we need to find out how many times the substring “Learning” appears.
For this, loop until the index is not equal to 1 and calculate.
while ((index = str.indexOf(subString, index)) != -1) {
subStrCount... | [
{
"code": null,
"e": 1102,
"s": 1062,
"text": "Let’s say we have the following string."
},
{
"code": null,
"e": 1161,
"s": 1102,
"text": "String str = \"Learning never ends! Learning never stops!\";"
},
{
"code": null,
"e": 1251,
"s": 1161,
"text": "In the abo... |
C# program to perform Quick sort using Recursion | Quick Sort is a sorting algorithm that uses the divide and conquer method. It takes a pivot element and places it in its correct position. Then the array to the left and right of the pivot element are again sorted using Quick Sort. This is done until the whole array is sorted.
A program that demonstrates Quick Sort usi... | [
{
"code": null,
"e": 1340,
"s": 1062,
"text": "Quick Sort is a sorting algorithm that uses the divide and conquer method. It takes a pivot element and places it in its correct position. Then the array to the left and right of the pivot element are again sorted using Quick Sort. This is done until th... |
Matplotlib.pyplot.get_figlabels() in Python - GeeksforGeeks | 10 May, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, etc.
Th... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 24597,
"s": 24292,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which pr... |
Python Program to Generate Gray Codes using Recursion | When it is required to generate gray codes with the help of recursion, a method is defined, that creates an empty list and appends values 0 and 1 to it. Multiple ‘for’ loops are used to generate the gray code within the function.
Below is the demonstration of the same −
Live Demo
import math as mt
def generate_gray_li... | [
{
"code": null,
"e": 1292,
"s": 1062,
"text": "When it is required to generate gray codes with the help of recursion, a method is defined, that creates an empty list and appends values 0 and 1 to it. Multiple ‘for’ loops are used to generate the gray code within the function."
},
{
"code": n... |
Final arrays in Java - GeeksforGeeks | 31 Oct, 2020
Predict the output of following Java program.
class Test { public static void main(String args[]) { final int arr[] = {1, 2, 3, 4, 5}; // Note: arr is final for (int i = 0; i < arr.length; i++) { arr[i] = arr[i]*10; System.out.println(arr[i]); ... | [
{
"code": null,
"e": 24882,
"s": 24854,
"text": "\n31 Oct, 2020"
},
{
"code": null,
"e": 24928,
"s": 24882,
"text": "Predict the output of following Java program."
},
{
"code": "class Test { public static void main(String args[]) { final int arr[] = {1, 2, 3, ... |
How to handle the StringIndexOutOfBoundsException (unchecked) in Java? | The StringIndexOutOfBoundsException is one of the unchecked exceptions in Java. A string is kind of an ensemble of characters. String object has a range of [0, length of the string]. When someone tries to access the characters with limits exceeding the range of actual string value, this exception occurs.
Live Demo
publ... | [
{
"code": null,
"e": 1368,
"s": 1062,
"text": "The StringIndexOutOfBoundsException is one of the unchecked exceptions in Java. A string is kind of an ensemble of characters. String object has a range of [0, length of the string]. When someone tries to access the characters with limits exceeding the ... |
How can I programmatically select a specific subplot in Matplotlib? | To select a specific subplot in matplotlib, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Set the figure size and adjust the padding between and around the subplots.
Create a new figure or activate an existing figure using figure() method.
Create a new fig... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "To select a specific subplot in matplotlib, we can take the following steps −"
},
{
"code": null,
"e": 1216,
"s": 1140,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code": null,
... |
VB.Net - ListBox Control | The ListBox represents a Windows control to display a list of items to a user. A user can select an item from the list. It allows the programmer to add items at design time by using the properties window or at the runtime.
Let's create a list box by dragging a ListBox control from the Toolbox and dropping it on the for... | [
{
"code": null,
"e": 2523,
"s": 2300,
"text": "The ListBox represents a Windows control to display a list of items to a user. A user can select an item from the list. It allows the programmer to add items at design time by using the properties window or at the runtime."
},
{
"code": null,
... |
Find the 3rd largest number in a Java array. | Following is the required program.
Live Demo
public class Tester {
public static int getThirdLargest(int[] a) {
int temp;
//sort the array
for (int i = 0; i < a.length; i++) {
for (int j = i + 1; j < a.length; j++) {
if (a[i] > a[j]) {
temp = a[i];
... | [
{
"code": null,
"e": 1098,
"s": 1062,
"text": " Following is the required program."
},
{
"code": null,
"e": 1108,
"s": 1098,
"text": "Live Demo"
},
{
"code": null,
"e": 1690,
"s": 1108,
"text": "public class Tester {\n public static int getThirdLargest(int[]... |
Automated Guitar Transcription with Deep Learning | by Darren Tio | Towards Data Science | This post outlines the implementation of automatic guitar transcription from audio files using Python, TensorFlow, and Keras as well as details the surface level methods performed. For training, the GuitarSet data set is employed for its large quantity of isolated guitar recordings with corresponding tabs. Please note ... | [
{
"code": null,
"e": 599,
"s": 172,
"text": "This post outlines the implementation of automatic guitar transcription from audio files using Python, TensorFlow, and Keras as well as details the surface level methods performed. For training, the GuitarSet data set is employed for its large quantity of... |
HTML - Background Images | The background attribute can also be used to control the background of an HTML elmement, specifically page body and table backgrounds. You can specify an image to set background of your HMTL page or table. Following is the syntax to use background attribute with any HTML tag.
The background is deprecated and it is reco... | [
{
"code": null,
"e": 2651,
"s": 2374,
"text": "The background attribute can also be used to control the background of an HTML elmement, specifically page body and table backgrounds. You can specify an image to set background of your HMTL page or table. Following is the syntax to use background attri... |
How to create a JSON Object using Object Model in Java? | The javax.json.JsonObject interface can represent an immutable JSON object value and provides an unmodifiable map view to the JSON object name/value mappings. A JsonObject instance can be created from an input source using the static method readObject() of javax.json.JsonReader class and also can be created using the s... | [
{
"code": null,
"e": 1443,
"s": 1062,
"text": "The javax.json.JsonObject interface can represent an immutable JSON object value and provides an unmodifiable map view to the JSON object name/value mappings. A JsonObject instance can be created from an input source using the static method readObject()... |
Adding sequential IDs to a Spark Dataframe | by Maria Karanasou | Towards Data Science | TL;DR
Adding sequential unique IDs to a Spark Dataframe is not very straight-forward, especially considering the distributed nature of it. You can do this using either zipWithIndex() or row_number() (depending on the amount and kind of your data) but in every case there is a catch regarding performance.
Coming from tra... | [
{
"code": null,
"e": 177,
"s": 171,
"text": "TL;DR"
},
{
"code": null,
"e": 476,
"s": 177,
"text": "Adding sequential unique IDs to a Spark Dataframe is not very straight-forward, especially considering the distributed nature of it. You can do this using either zipWithIndex() or ... |
How Regression Analysis Works. Different forms of regression analysis... | by Mubarak Ganiyu | Towards Data Science | Regression analysis is a machine learning algorithm that can be used to measure how closely related independent variable(s) relate with a dependent variable. An extensive use of regression analysis is building models on datasets that accurately predict the values of the dependent variable.
At the beginning of regressio... | [
{
"code": null,
"e": 463,
"s": 172,
"text": "Regression analysis is a machine learning algorithm that can be used to measure how closely related independent variable(s) relate with a dependent variable. An extensive use of regression analysis is building models on datasets that accurately predict th... |
Getopt module in Python - GeeksforGeeks | 04 May, 2020
The getopt module is a parser for command-line options based on the convention established by the Unix getopt() function. It is in general used for parsing an argument sequence such as sys.argv. In other words, this module helps scripts to parse command-line arguments in sys.argv. It works similar to the C... | [
{
"code": null,
"e": 25578,
"s": 25550,
"text": "\n04 May, 2020"
},
{
"code": null,
"e": 25941,
"s": 25578,
"text": "The getopt module is a parser for command-line options based on the convention established by the Unix getopt() function. It is in general used for parsing an argu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.