title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Python | Sort all sublists in given list of strings | 28 Feb, 2019
Given a list of lists, the task is to sort each sublist in the given list of strings.
Example:
Input:
lst = [['Machine', 'London', 'Canada', 'France'],
['Spain', 'Munich'],
['Australia', 'Mandi']]
Output:
flist = [['Canada', 'France', 'London', 'Machine'],
['Munich', 'Spain'],
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Feb, 2019"
},
{
"code": null,
"e": 114,
"s": 28,
"text": "Given a list of lists, the task is to sort each sublist in the given list of strings."
},
{
"code": null,
"e": 123,
"s": 114,
"text": "Example:"
},
{
... |
How to concatenate two strings in Python? | Concatenating two strings refers to the merging of both the strings together. Concatenation of “Tutorials” and “Point” will result in “TutorialsPoint”.
We will be discussing different methods of concatenating two strings in Python.
Two strings can be concatenated in Python by simply using the ‘+’ operator between them.... | [
{
"code": null,
"e": 1214,
"s": 1062,
"text": "Concatenating two strings refers to the merging of both the strings together. Concatenation of “Tutorials” and “Point” will result in “TutorialsPoint”."
},
{
"code": null,
"e": 1294,
"s": 1214,
"text": "We will be discussing differen... |
How to work with document.images in JavaScript? | Use the document.images property in JavaScript to get the number of <img> tags in a document.
You can try to run the following code to implement document.images property in JavaScript.
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<h1>TutorialsPoint Tutori... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "Use the document.images property in JavaScript to get the number of <img> tags in a document."
},
{
"code": null,
"e": 1247,
"s": 1156,
"text": "You can try to run the following code to implement document.images property in JavaScrip... |
Collections unmodifiableList() method in Java with Examples - GeeksforGeeks | 08 Oct, 2018
The unmodifiableList() method of java.util.Collections class is used to return an unmodifiable view of the specified list. This method allows modules to provide users with “read-only” access to internal lists. Query operations on the returned list “read through” to the specified list, and attempts to modif... | [
{
"code": null,
"e": 24235,
"s": 24207,
"text": "\n08 Oct, 2018"
},
{
"code": null,
"e": 24643,
"s": 24235,
"text": "The unmodifiableList() method of java.util.Collections class is used to return an unmodifiable view of the specified list. This method allows modules to provide us... |
Element left after performing alternate OR & XOR operation | Practice | GeeksforGeeks | Given an array A of N integers and a 2D matrix denoting q queries. Each query consists of two elements, index and value. Update value at index in A for each query and then perform the following operations to get the result for that query.
1. Perform bitwise OR on each pair
2. Perform bitwise XOR on each pair
Do this ... | [
{
"code": null,
"e": 622,
"s": 238,
"text": "Given an array A of N integers and a 2D matrix denoting q queries. Each query consists of two elements, index and value. Update value at index in A for each query and then perform the following operations to get the result for that query.\n1. Perform bitw... |
Scala - Strings | This chapter takes you through the Scala Strings. In Scala, as in Java, a string is an immutable object, that is, an object that cannot be modified. On the other hand, objects that can be modified, like arrays, are called mutable objects. Strings are very useful objects, in the rest of this section, we present importan... | [
{
"code": null,
"e": 2355,
"s": 1998,
"text": "This chapter takes you through the Scala Strings. In Scala, as in Java, a string is an immutable object, that is, an object that cannot be modified. On the other hand, objects that can be modified, like arrays, are called mutable objects. Strings are ve... |
C# Program to Convert Character case | Let’s say your string is −
str = "AMIT";
To convert the above uppercase string in lowercase, use the ToLower() method −
Console.WriteLine("Converted to LowerCase : {0}", str.ToLower());
The following is the code in C# to convert character case.
Live Demo
using System;
using System.Collections.Generic;
using System.Text... | [
{
"code": null,
"e": 1089,
"s": 1062,
"text": "Let’s say your string is −"
},
{
"code": null,
"e": 1103,
"s": 1089,
"text": "str = \"AMIT\";"
},
{
"code": null,
"e": 1182,
"s": 1103,
"text": "To convert the above uppercase string in lowercase, use the ToLower(... |
Functionally Complete Operations | 25 Nov, 2019
Prerequisite – Functional CompletenessA switching function is expressed by binary variables, the logic operation symbols, and constants 0 and 1. When every switching function can be expressed by means of operations in it, then only a set of operation is said to be functionally complete.
The set (AND, OR, N... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Nov, 2019"
},
{
"code": null,
"e": 316,
"s": 28,
"text": "Prerequisite – Functional CompletenessA switching function is expressed by binary variables, the logic operation symbols, and constants 0 and 1. When every switching function ... |
Python | Pandas Series.is_monotonic_increasing | 28 Jan, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique bu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jan, 2019"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
How to achieve <fieldset> like effect without using <fieldset> tag ? | 08 Jul, 2020
Forms are used to make a group for more understandable of all users and clients, as related data fields are easier to identify. It also makes it easier for users to concentrate on smaller and more clearly defined groups by understanding them one by one as an individual rather than try to grasp the entire f... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jul, 2020"
},
{
"code": null,
"e": 348,
"s": 28,
"text": "Forms are used to make a group for more understandable of all users and clients, as related data fields are easier to identify. It also makes it easier for users to concentrat... |
Python | sympy.sqrt() method | 04 Jul, 2019
With the help of sympy.sqrt() method, we can find the square root of any value in terms of values and also in terms of symbolically simplified mathematical expression.
Syntax: sqrt(val)
Parameters:val – It is the value on which square root operation is to be performed.
Returns: Returns square root in terms... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Jul, 2019"
},
{
"code": null,
"e": 196,
"s": 28,
"text": "With the help of sympy.sqrt() method, we can find the square root of any value in terms of values and also in terms of symbolically simplified mathematical expression."
},
... |
How to post data using file_get_contents in PHP ? | 11 Jun, 2020
The file_get_contents() function in PHP is used to read the contents of a file and make HTTP requests using GET and get HTTP responses using POST methods. The HTTP POST request can be made using the $context parameter of the file_get_contents() function, which posts the specified data to the URL specified ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Jun, 2020"
},
{
"code": null,
"e": 430,
"s": 28,
"text": "The file_get_contents() function in PHP is used to read the contents of a file and make HTTP requests using GET and get HTTP responses using POST methods. The HTTP POST reques... |
Introductory guide to Information Retrieval using KNN and KDTree | 23 May, 2022
It can be defined as a software program which is used to find material(usual documents) of an unstructured nature(usually text) that satisfies an information need from within large collections(usually stored on computers). It helps users find their required information but does not explicitly return the an... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 May, 2022"
},
{
"code": null,
"e": 477,
"s": 28,
"text": "It can be defined as a software program which is used to find material(usual documents) of an unstructured nature(usually text) that satisfies an information need from within ... |
Replace node with depth in a binary tree | 02 May, 2022
Given a binary tree, replace each node with its depth value. For example, consider the following tree. Root is at depth 0, change its value to 0 and next level nodes are at depth 1 and so on.
3 0
/ \ / \
2 5 == >; 1 1
/ ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 May, 2022"
},
{
"code": null,
"e": 246,
"s": 52,
"text": "Given a binary tree, replace each node with its depth value. For example, consider the following tree. Root is at depth 0, change its value to 0 and next level nodes are at d... |
Queue.Dequeue Method in C# | 04 Feb, 2019
The Dequeue() method is used to returns the object at the beginning of the Queue. This method is similar to the Peek() Method. The only difference between Dequeue and Peek method is that Peek() method will not modify the Queue but Dequeue will modify. This method is an O(1) operation and comes under System... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n04 Feb, 2019"
},
{
"code": null,
"e": 384,
"s": 53,
"text": "The Dequeue() method is used to returns the object at the beginning of the Queue. This method is similar to the Peek() Method. The only difference between Dequeue and Peek me... |
Python – Group Sublists by another List | 22 Jun, 2020
Sometimes, while working with lists, we can have a problem in which we need to group all the sublists, separated by elements present in different list. This type of custom grouping is uncommon utility but having solution to these can always be handy. Lets discuss certain way in which this task can be perfo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 341,
"s": 28,
"text": "Sometimes, while working with lists, we can have a problem in which we need to group all the sublists, separated by elements present in different list. This type of custom gro... |
Subdomain in Flask | Python | 17 Apr, 2019
Prerequisite: Introduction to Flask
In this article, we will learn how to setup subdomains in Flask. But first, let’s go through the basic like what is DNS and subdomains.
Domain Name System (DNS):The Domain Name System (DNS) is a hierarchical and decentralized naming system for computers, services, or oth... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n17 Apr, 2019"
},
{
"code": null,
"e": 90,
"s": 54,
"text": "Prerequisite: Introduction to Flask"
},
{
"code": null,
"e": 226,
"s": 90,
"text": "In this article, we will learn how to setup subdomains in Flask. But fi... |
NumberFormat getCurrencyInstance() method in Java with Examples | 12 Apr, 2022
The getCurrencyInstance() method is a built-in method of the java.text.NumberFormat returns a currency format for the current default FORMAT locale.Syntax:public static final NumberFormat getCurrencyInstance()Parameters: The function does not accepts any parameter.Return Value: The function returns the Num... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n12 Apr, 2022"
},
{
"code": null,
"e": 3026,
"s": 53,
"text": "The getCurrencyInstance() method is a built-in method of the java.text.NumberFormat returns a currency format for the current default FORMAT locale.Syntax:public static fina... |
How to print a blank line in C#? | To display a line in C#, use the Console.WriteLine().
Under that set a blank line −
Console.WriteLine(" ");
The following is the code that displays a blank line −
Live Demo
using System;
namespace Program {
public class Demo {
public static void Main(String[] args) {
Console.WriteLine(" ");
... | [
{
"code": null,
"e": 1241,
"s": 1187,
"text": "To display a line in C#, use the Console.WriteLine()."
},
{
"code": null,
"e": 1271,
"s": 1241,
"text": "Under that set a blank line −"
},
{
"code": null,
"e": 1295,
"s": 1271,
"text": "Console.WriteLine(\" \");"
... |
Implementing Forward Iterator in BST | 31 Jan, 2022
Given a Binary search tree, the task is to implement forward iterator on it with the following functions.
curr(): returns the pointer to current element.next(): iterates to the next smallest element in the Binary Search Tree.isEnd(): returns true if there no node left to traverse else false.
curr(): retur... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n31 Jan, 2022"
},
{
"code": null,
"e": 161,
"s": 54,
"text": "Given a Binary search tree, the task is to implement forward iterator on it with the following functions. "
},
{
"code": null,
"e": 348,
"s": 161,
"text":... |
C++ Program to Check Whether Graph is DAG | A directed acyclic graph (DAG) is a graph that is directed and without cycles connecting the other edges. The edges of this graph go one way. This is a C++ program to check whether the graph is DAG.
Begin
Function checkDAG(int n):
intialize count = 0
intialize size = n - 1
for i = 0 to n-1
if (count == s... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "A directed acyclic graph (DAG) is a graph that is directed and without cycles connecting the other edges. The edges of this graph go one way. This is a C++ program to check whether the graph is DAG."
},
{
"code": null,
"e": 1760,
"s": 12... |
Pythonic Big Data Using Julia?. Can Python handle large heaps of data... | by Emmett Boudreau | Towards Data Science | So recently, I have been experimenting with the idea of using Julia as a back-end for Python. While this is certainly a great concept in theory, some things do appear to have been lost in translation. This is a discussion that I have been having with several Julia and Python scientists, as the road to using Julia from ... | [
{
"code": null,
"e": 629,
"s": 172,
"text": "So recently, I have been experimenting with the idea of using Julia as a back-end for Python. While this is certainly a great concept in theory, some things do appear to have been lost in translation. This is a discussion that I have been having with seve... |
JSON with Ruby | This chapter covers how to encode and decode JSON objects using Ruby programming language. Let's start with preparing the environment to start our programming with Ruby for JSON.
Before you start with encoding and decoding JSON using Ruby, you need to install any of the JSON modules available for Ruby. You may need to ... | [
{
"code": null,
"e": 1959,
"s": 1780,
"text": "This chapter covers how to encode and decode JSON objects using Ruby programming language. Let's start with preparing the environment to start our programming with Ruby for JSON."
},
{
"code": null,
"e": 2313,
"s": 1959,
"text": "Bef... |
D3.js zoom.scaleTo() Function - GeeksforGeeks | 31 Aug, 2020
The zoom.scaleTo() function in D3.js is used to scale the current zoon transform of the selected elements to k.
Syntax:
zoom.scaleTo(selection, k[, p])
Parameters: This function accept two parameter as mentioned above and described below
selection: This parameter can be selection or transition.
k: This par... | [
{
"code": null,
"e": 25300,
"s": 25272,
"text": "\n31 Aug, 2020"
},
{
"code": null,
"e": 25412,
"s": 25300,
"text": "The zoom.scaleTo() function in D3.js is used to scale the current zoon transform of the selected elements to k."
},
{
"code": null,
"e": 25420,
"s"... |
How to convert the Integer variable to the string variable in PowerShell? | To convert the integer variable to the string variable, you need to use the explicit conversion or the functional method. In the below example, we are assigning an integer value to the variable $X.
$x = 120
$x.GetType().Name
Now when you check the data type of that variable, it will be Int32.
To convert it into the str... | [
{
"code": null,
"e": 1260,
"s": 1062,
"text": "To convert the integer variable to the string variable, you need to use the explicit conversion or the functional method. In the below example, we are assigning an integer value to the variable $X."
},
{
"code": null,
"e": 1287,
"s": 126... |
How to concatenate all values of a single column in MySQL? | You can use group_concat() along with concat() to concatenate all values of a single column. Let us first create a table −
mysql> create table DemoTable
(
Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, FirstName varchar(20)
);
Query OK, 0 rows affected (0.73 sec)
Insert some records in the table using insert comm... | [
{
"code": null,
"e": 1185,
"s": 1062,
"text": "You can use group_concat() along with concat() to concatenate all values of a single column. Let us first create a table −"
},
{
"code": null,
"e": 1332,
"s": 1185,
"text": "mysql> create table DemoTable\n (\n Id int NOT NULL AUT... |
LeafletJS - Layers Group | Using layer group, you can add multiple layers to a map and manage them as a single layer.
Follow the steps given below to create a LayerGroup and add it to the map.
Step 1 − Create a Map object by passing a <div> element (String or object) and map options (optional).
Step 2 − Create a Layer object by passing the URL o... | [
{
"code": null,
"e": 1889,
"s": 1798,
"text": "Using layer group, you can add multiple layers to a map and manage them as a single layer."
},
{
"code": null,
"e": 1964,
"s": 1889,
"text": "Follow the steps given below to create a LayerGroup and add it to the map."
},
{
"c... |
Angular 8 - Testing | Testing is a very important phase in the development life cycle of an application. It ensures an application quality. It needs careful planning and execution.
Unit testing is the easiest method to test an application. It is based on ensuring the correctness of a piece of code or a method of a class. But, it does not re... | [
{
"code": null,
"e": 2547,
"s": 2388,
"text": "Testing is a very important phase in the development life cycle of an application. It ensures an application quality. It needs careful planning and execution."
},
{
"code": null,
"e": 2794,
"s": 2547,
"text": "Unit testing is the eas... |
Querying Live running status and PNR of trains using Railway API in Python - GeeksforGeeks | 08 Jun, 2021
Railway API is organized around GET Requests. One can use this JSON based API to get information from Indian Railways regarding Live Train Status, PNR Status, Train Schedule, Station Details, and other things.
To use this API, one must need the API key, which can get from here
Note: User need to create a... | [
{
"code": null,
"e": 25671,
"s": 25643,
"text": "\n08 Jun, 2021"
},
{
"code": null,
"e": 25882,
"s": 25671,
"text": "Railway API is organized around GET Requests. One can use this JSON based API to get information from Indian Railways regarding Live Train Status, PNR Status, Trai... |
AngularJS | angular.element() Function - GeeksforGeeks | 12 Apr, 2019
The angular.element() Function in AngularJS is used to initialize DOM element or HTML string as an jQuery element. If jQuery is available angular.element can be either used as an alias for jQuery function or it can be used as a function to wrap the element or string in Angular’s jqlite.
Syntax:
angular.ele... | [
{
"code": null,
"e": 26301,
"s": 26273,
"text": "\n12 Apr, 2019"
},
{
"code": null,
"e": 26589,
"s": 26301,
"text": "The angular.element() Function in AngularJS is used to initialize DOM element or HTML string as an jQuery element. If jQuery is available angular.element can be ei... |
ReactJS – forceUpdate() Method | In this article, we are going to see how to execute a function by forcibly re-rendering a component.
The component in the React lifecycle only re-renders if the props passed to it or its state changes but to forcibly render the component, use the build it forceUpdate method. This method overrides the shouldComponentUpd... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "In this article, we are going to see how to execute a function by forcibly re-rendering a component."
},
{
"code": null,
"e": 1504,
"s": 1163,
"text": "The component in the React lifecycle only re-renders if the props passed to it or... |
Logging in Python | In this article, we will learn about logging in Python and various stages in protection and security.
First of all, we need to import the logging module, followed by using the logger to checj=k the current status and log messages. We are having 5 severity levels namely −
Warning
Info
Error
Critical
Debug
The logging mo... | [
{
"code": null,
"e": 1164,
"s": 1062,
"text": "In this article, we will learn about logging in Python and various stages in protection and security."
},
{
"code": null,
"e": 1334,
"s": 1164,
"text": "First of all, we need to import the logging module, followed by using the logger... |
C Program to reverse a given number using Recursive function | "Recursive function" is something which calls itself again in the body of the function.
For example,
A function fact ( ), which computes the factorial of an integer ‘N’, which is the product of all whole numbers from 1 to N.
A function fact ( ), which computes the factorial of an integer ‘N’, which is the product of al... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "\"Recursive function\" is something which calls itself again in the body of the function."
},
{
"code": null,
"e": 1163,
"s": 1150,
"text": "For example,"
},
{
"code": null,
"e": 1287,
"s": 1163,
"text": "A functi... |
Tryit Editor v3.7 | Tryit: HTML text-align | [] |
Geographical plotting of maps with Plotly | by Jenny Dcruz | Towards Data Science | Geographical plotting is a method of displaying data on a global scale as well as for states of a country, often in a colorful manner. It plays a significant role in data analysis and visualization. It is commonly used while building dashboards to present widespread data.
In order to create interactive maps we use pyth... | [
{
"code": null,
"e": 445,
"s": 172,
"text": "Geographical plotting is a method of displaying data on a global scale as well as for states of a country, often in a colorful manner. It plays a significant role in data analysis and visualization. It is commonly used while building dashboards to present... |
SciPy Statistical Significance Tests | In statistics, statistical significance means that the result that was produced has a reason behind it, it was not produced randomly, or by chance.
SciPy provides us with a module called scipy.stats, which has functions for performing statistical significance tests.
Here are some techniques and keywords that are impo... | [
{
"code": null,
"e": 148,
"s": 0,
"text": "In statistics, statistical significance means that the result that was produced has a reason behind it, it was not produced randomly, or by chance."
},
{
"code": null,
"e": 269,
"s": 148,
"text": "SciPy provides us with a module called s... |
How to create custom actionbar in android? | Before getting into example we should know what is action bar in android. Action bar just like header in android. Either we can use same action bar for all screen or we can change action bar for particular activity.
This example demonstrate about how to create a custom action bar in Android.
Step 1 − Create a new proje... | [
{
"code": null,
"e": 1278,
"s": 1062,
"text": "Before getting into example we should know what is action bar in android. Action bar just like header in android. Either we can use same action bar for all screen or we can change action bar for particular activity."
},
{
"code": null,
"e": ... |
The “Bias-Variance Trade-Off” Explained Practically (In Python) | by Samuele Mazzanti | Towards Data Science | The “bias-variance trade-off” is one of the most frequent topics in data science interviews. Still, many candidates struggle to understand the concept in depth. I guess it happens because this topic is always explained from a fully theoretical point of view.
However, I believe that the best way to understand something ... | [
{
"code": null,
"e": 431,
"s": 172,
"text": "The “bias-variance trade-off” is one of the most frequent topics in data science interviews. Still, many candidates struggle to understand the concept in depth. I guess it happens because this topic is always explained from a fully theoretical point of vi... |
How can we merge two JSON arrays in Java? | A JSON is a lightweight data-interchange format and the format of JSON is a key with value pair. The JSONArray can parse text from a String to produce a vector-like object and supports java.util.List interface. We can use org.json.simple.JSONArray class to merge two JSON arrays in Java.
We can merge two JSON arrays usi... | [
{
"code": null,
"e": 1350,
"s": 1062,
"text": "A JSON is a lightweight data-interchange format and the format of JSON is a key with value pair. The JSONArray can parse text from a String to produce a vector-like object and supports java.util.List interface. We can use org.json.simple.JSONArray class... |
Program to perform an Inorder Traversal of a binary tree in Python | Suppose we have a binary tree; we have to find a list that contains the inorder traversal of root as a list. As we know the inorder traversal is a way of traversing all nodes in a tree where we −
Recursively traverse the left subtree.
Recursively traverse the left subtree.
Traverse the current node.
Traverse the curren... | [
{
"code": null,
"e": 1258,
"s": 1062,
"text": "Suppose we have a binary tree; we have to find a list that contains the inorder traversal of root as a list. As we know the inorder traversal is a way of traversing all nodes in a tree where we −"
},
{
"code": null,
"e": 1297,
"s": 1258,... |
Get the number of columns in a MySQL table? | To get the number of columns, use the aggregate function count(*) with information_schema table from MySQL. The syntax is as follows to find the number of columns −
SELECT COUNT(*) as anyVariableName from INFORMATION_SCHEMA.COLUMNS where table_schema = ’yourDatabaseName’ and table_name = ’yourTableName’;
To understand ... | [
{
"code": null,
"e": 1227,
"s": 1062,
"text": "To get the number of columns, use the aggregate function count(*) with information_schema table from MySQL. The syntax is as follows to find the number of columns −"
},
{
"code": null,
"e": 1368,
"s": 1227,
"text": "SELECT COUNT(*) a... |
Convert string to integer without using any in-built functions - GeeksforGeeks | 27 Oct, 2021
Given a string str, the task is to convert the given string into the number without using any inbuilt function.
Examples:
Input: str = “985632”Output: 985632Explanation:Given input is in string form and returned output is in integer form.
Input: str = “123”Output: 123Explanation:Given input is in string f... | [
{
"code": null,
"e": 24796,
"s": 24768,
"text": "\n27 Oct, 2021"
},
{
"code": null,
"e": 24908,
"s": 24796,
"text": "Given a string str, the task is to convert the given string into the number without using any inbuilt function."
},
{
"code": null,
"e": 24919,
"s"... |
Bottom View of a Binary Tree - GeeksforGeeks | 02 Jul, 2021
Given a Binary Tree, we need to print the bottom view from left to right. A node x is there in output if x is the bottommost node at its horizontal distance. Horizontal distance of left child of a node x is equal to horizontal distance of x minus 1, and that of right child is horizontal distance of x plus ... | [
{
"code": null,
"e": 25280,
"s": 25252,
"text": "\n02 Jul, 2021"
},
{
"code": null,
"e": 25591,
"s": 25280,
"text": "Given a Binary Tree, we need to print the bottom view from left to right. A node x is there in output if x is the bottommost node at its horizontal distance. Horiz... |
How to find the real user home directory using Python? | To get the homedir in python, you can use os.path.expanduser('~') from the os module. This also works if its a part of a longer path like ~/Documents/my_folder/. If there is no ~ in the path, the function will return the path unchanged. You can use it like −
import os
print(os.path.expanduser('~'))
You can also query t... | [
{
"code": null,
"e": 1321,
"s": 1062,
"text": "To get the homedir in python, you can use os.path.expanduser('~') from the os module. This also works if its a part of a longer path like ~/Documents/my_folder/. If there is no ~ in the path, the function will return the path unchanged. You can use it l... |
DAX Other - UNION function | Creates a union (join) table from the specified tables.
DAX UNION function is new in Excel 2016.
UNION (<table_expression1>, <table_expression2>, [<table_expression3>] ...)
table_expression
Any DAX expression that returns a table.
A table that contains all the rows from each of the table expressions.
The tables must ... | [
{
"code": null,
"e": 2057,
"s": 2001,
"text": "Creates a union (join) table from the specified tables."
},
{
"code": null,
"e": 2098,
"s": 2057,
"text": "DAX UNION function is new in Excel 2016."
},
{
"code": null,
"e": 2176,
"s": 2098,
"text": "UNION (<table_... |
How to call a jQuery function after a certain delay? | To call a jQuery function after a certain delay, use the siteTimeout() method. Here, jQuery fadeOut() function is called after some seconds.
You can try to run the following code to learn how to work with setTimeout() method in jQuery to call a jQuery function after a delay −
Live Demo
<!DOCTYPE html>
<html>
<head>
... | [
{
"code": null,
"e": 1203,
"s": 1062,
"text": "To call a jQuery function after a certain delay, use the siteTimeout() method. Here, jQuery fadeOut() function is called after some seconds."
},
{
"code": null,
"e": 1339,
"s": 1203,
"text": "You can try to run the following code to ... |
How to invoke the IE browser in Selenium with python? | We can invoke any browsers with the help of the webdriver package. From this package we get access to numerous classes. Next we have to import the selenium.webdriver package. Then we shall be exposed to all the browsers belonging to that package.
For invoking the internet explorer browser, we have to select the Ie clas... | [
{
"code": null,
"e": 1309,
"s": 1062,
"text": "We can invoke any browsers with the help of the webdriver package. From this package we get access to numerous classes. Next we have to import the selenium.webdriver package. Then we shall be exposed to all the browsers belonging to that package."
},
... |
Clone an Undirected Graph - GeeksforGeeks | 24 Jan, 2019
Cloning of a LinkedList and a Binary Tree with random pointers has already been discussed. The idea behind cloning a graph is pretty much similar.
The idea is to do a BFS traversal of the graph and while visiting a node make a clone node of it (a copy of original node). If a node is encountered which is al... | [
{
"code": null,
"e": 24757,
"s": 24729,
"text": "\n24 Jan, 2019"
},
{
"code": null,
"e": 24904,
"s": 24757,
"text": "Cloning of a LinkedList and a Binary Tree with random pointers has already been discussed. The idea behind cloning a graph is pretty much similar."
},
{
"c... |
SudachiPy: A Japanese Morphological Analyzer in Python | by Ng Wai Foong | Towards Data Science | Python version of Sudachi that focuses on Natural Language Processing (NLP) for Japanese text
This article covers the basic functionality of SudachiPy which can be used to perform simple natural language processing tasks such as tokenization for Japanese language. Based on the official Github page:
Sudachi & SudachiPy ... | [
{
"code": null,
"e": 266,
"s": 172,
"text": "Python version of Sudachi that focuses on Natural Language Processing (NLP) for Japanese text"
},
{
"code": null,
"e": 472,
"s": 266,
"text": "This article covers the basic functionality of SudachiPy which can be used to perform simple... |
Data Science and Machine Learning with Scala and Spark (Episode 02/03) | by MA Raza, Ph.D. | Towards Data Science | Spark’s inventors chose Scala to write the low-level modules. In Data Science and Machine Learning with Scala and Spark (Episode 01/03), we covered the basics of Scala programming language while using a Google Colab environment. In this article, we learn about the Spark ecosystem and its higher-level API for Scala user... | [
{
"code": null,
"e": 582,
"s": 171,
"text": "Spark’s inventors chose Scala to write the low-level modules. In Data Science and Machine Learning with Scala and Spark (Episode 01/03), we covered the basics of Scala programming language while using a Google Colab environment. In this article, we learn ... |
Iterator vs ListIterator in Java? | An Iterator is an interface in Java and we can traverse the elements of a list in a forward direction whereas a ListIterator is an interface that extends the Iterator interface and we can traverse the elements in both forward and backward directions. An Iterator can be used in these collection types like List, Set, and... | [
{
"code": null,
"e": 1628,
"s": 1062,
"text": "An Iterator is an interface in Java and we can traverse the elements of a list in a forward direction whereas a ListIterator is an interface that extends the Iterator interface and we can traverse the elements in both forward and backward directions. An... |
How to mount windows drives in Ubuntu | 23 Dec, 2018
Figure: Error occurred while accessing the windows drive
Following are the step wise instructions to access windows drives in Ubuntu (Any Version),
1. Open terminal and type sudo ntfsfix error mounting location as shown in above picture and press enter button.2. It will ask for system password, enter passw... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Dec, 2018"
},
{
"code": null,
"e": 109,
"s": 52,
"text": "Figure: Error occurred while accessing the windows drive"
},
{
"code": null,
"e": 200,
"s": 109,
"text": "Following are the step wise instructions to acce... |
Check divisibility by 7 | 07 Jul, 2022
Given a number, check if it is divisible by 7. You are not allowed to use modulo operator, floating point arithmetic is also not allowed. A simple method is repeated subtraction. Following is another interesting method.Divisibility by 7 can be checked by a recursive method. A number of the form 10a + b is ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 740,
"s": 52,
"text": "Given a number, check if it is divisible by 7. You are not allowed to use modulo operator, floating point arithmetic is also not allowed. A simple method is repeated subtract... |
Print equal sum sets of array (Partition Problem) | Set 2 | 13 May, 2022
Given an array arr[]. Determine whether it is possible to split the array into two sets such that the sum of elements in both sets is equal. If it is possible, then print both sets. If it is not possible then output -1. Examples :
Input : arr = {5, 5, 1, 11}
Output : Set 1 = {5, 5, 1}, Set 2 = {11}
Sum o... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 May, 2022"
},
{
"code": null,
"e": 285,
"s": 52,
"text": "Given an array arr[]. Determine whether it is possible to split the array into two sets such that the sum of elements in both sets is equal. If it is possible, then print bot... |
Matplotlib.pyplot.show() in Python | 11 Apr, 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.
Sample Code –
# sample codeimport matplotlib.pyplot as plt plt.plot([1, 2, 3, 4], [16, 4, 1, 8]) plt.show() ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Apr, 2020"
},
{
"code": null,
"e": 223,
"s": 28,
"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 provides a MAT... |
GATE | GATE CS 2013 | Question 33 | 11 Oct, 2021
Consider the DFA given.
Which of the following are FALSE?
1. Complement of L(A) is context-free.
2. L(A) = L((11*0+0)(0 + 1)*0*1*)
3. For the language accepted by A, A is the minimal DFA.
4. A accepts all strings over {0, 1} of length at least 2.
(A) 1 and 3 only(B) 2 and 4 only(C) 2 and 3 only(D) 3 and 4... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 76,
"s": 52,
"text": "Consider the DFA given."
},
{
"code": null,
"e": 110,
"s": 76,
"text": "Which of the following are FALSE?"
},
{
"code": null,
"e": 300,
"s"... |
How to find the column and row indices of values in a matrix using which function in R? | To find the row and column indices of values in a matrix, we cannot simply use which function because it returns the index based on sequence of the numbers in the matrix. For example, if we have a matrix M as below −
1 2 3
4 1 6
7 8 1
Now if we try to find the index using which(M==1) then it will return 1 5 9
Because 1... | [
{
"code": null,
"e": 1279,
"s": 1062,
"text": "To find the row and column indices of values in a matrix, we cannot simply use which function because it returns the index based on sequence of the numbers in the matrix. For example, if we have a matrix M as below −"
},
{
"code": null,
"e":... |
Angular Material 7 - Sort Header | The <mat-sort-header> and matSort, an Angular Directives, are used to add sorting capability to a table header.
In this chapter, we will showcase the configuration required to show a Sort Header using Angular Material.
Following is the content of the modified module descriptor app.module.ts.
import { BrowserModule } f... | [
{
"code": null,
"e": 2868,
"s": 2755,
"text": "The <mat-sort-header> and matSort, an Angular Directives, are used to add sorting capability to a table header."
},
{
"code": null,
"e": 2975,
"s": 2868,
"text": "In this chapter, we will showcase the configuration required to show ... |
Difference between vi Editor and cat Command - GeeksforGeeks | 22 Sep, 2020
Both vi editor and cat command are used to input contents in a file.
1. vi Editor :vi editor stands for the visual editor which is an intelligent editing tool in UNIX Operating System used for reading, creating files, editing them, and more. It is the default editing tool in UNIX.
Command to open a particu... | [
{
"code": null,
"e": 24858,
"s": 24830,
"text": "\n22 Sep, 2020"
},
{
"code": null,
"e": 24927,
"s": 24858,
"text": "Both vi editor and cat command are used to input contents in a file."
},
{
"code": null,
"e": 25140,
"s": 24927,
"text": "1. vi Editor :vi edit... |
Data Structures and Algorithms | Set 6 - GeeksforGeeks | 27 Mar, 2017
Following questions have been asked in GATE CS exam.
1. The usual Θ(n^2) implementation of Insertion Sort to sort an array uses linear search to identify the position where an element is to be inserted into the already sorted part of the array. If, instead, we use binary search to identify the position, th... | [
{
"code": null,
"e": 24320,
"s": 24292,
"text": "\n27 Mar, 2017"
},
{
"code": null,
"e": 24373,
"s": 24320,
"text": "Following questions have been asked in GATE CS exam."
},
{
"code": null,
"e": 24750,
"s": 24373,
"text": "1. The usual Θ(n^2) implementation of... |
HTML <dl> Tag | The dl element in HTML is used to define description list. In HTML5, the <dl> is used to define a description list, whereas the <dl> in HTML4 defined definition list.
Let us now see an example to implement the <dl> tag −
Live Demo
<!DOCTYPE html>
<html>
<body>
<h2>Sports</h2>
<dl>
<dt>Football</dt>
<dd>It is ... | [
{
"code": null,
"e": 1229,
"s": 1062,
"text": "The dl element in HTML is used to define description list. In HTML5, the <dl> is used to define a description list, whereas the <dl> in HTML4 defined definition list."
},
{
"code": null,
"e": 1283,
"s": 1229,
"text": "Let us now see ... |
SAP Web Dynpro - URL of an Application | In a Web Dynpro application, the URL is automatically generated. You can find the URL of an application in the Properties tab. The URL structure can be of two types −
SAP namespace −
SAP namespace −
<schema>://<host>.<domain>.<extension>:<port>/sap/bc/webdynpro/<namespace>/<application name>
Custom namespace −
<schema... | [
{
"code": null,
"e": 2346,
"s": 2179,
"text": "In a Web Dynpro application, the URL is automatically generated. You can find the URL of an application in the Properties tab. The URL structure can be of two types −"
},
{
"code": null,
"e": 2362,
"s": 2346,
"text": "SAP namespace −... |
CICS - STARTBR | STARTBR is known as start browse. The STARTBR command gets the process started. It tells the CICS from where to start reading the file.
The FILE and RIDFLD parameters are the same as in a READ command.
The FILE and RIDFLD parameters are the same as in a READ command.
The options allowed are GTEQ and EQUAL.
The options ... | [
{
"code": null,
"e": 2062,
"s": 1926,
"text": "STARTBR is known as start browse. The STARTBR command gets the process started. It tells the CICS from where to start reading the file."
},
{
"code": null,
"e": 2128,
"s": 2062,
"text": "The FILE and RIDFLD parameters are the same as... |
Creating custom Loss functions using TensorFlow 2 | by Arjun Sarkar | Towards Data Science | A neural network learns to map a set of inputs to a set of outputs from training data. It does so by using some form of optimization algorithm such as gradient descent, stochastic gradient descent, AdaGrad, AdaDelta or some recent algorithms such as Adam, Nadam or RMSProp. The ‘gradient’ in gradient descent refers to e... | [
{
"code": null,
"e": 937,
"s": 172,
"text": "A neural network learns to map a set of inputs to a set of outputs from training data. It does so by using some form of optimization algorithm such as gradient descent, stochastic gradient descent, AdaGrad, AdaDelta or some recent algorithms such as Adam,... |
HTML5 - email | It accepts only email value. This type is used for input fields that should contain an e-mail address. If you try to submit a simple text, it forces to enter only email address in email@example.com format.
<!DOCTYPE HTML>
<html>
<body>
<form action = "/cgi-bin/html5.cgi" method = "get">
Enter email ... | [
{
"code": null,
"e": 2814,
"s": 2608,
"text": "It accepts only email value. This type is used for input fields that should contain an e-mail address. If you try to submit a simple text, it forces to enter only email address in email@example.com format."
},
{
"code": null,
"e": 3059,
... |
Assembly - SCAS Instruction | The SCAS instruction is used for searching a particular character or set of characters in a string. The data item to be searched should be in AL (for SCASB), AX (for SCASW) or EAX (for SCASD) registers. The string to be searched should be in memory and pointed by the ES:DI (or EDI) register.
Look at the following progr... | [
{
"code": null,
"e": 2378,
"s": 2085,
"text": "The SCAS instruction is used for searching a particular character or set of characters in a string. The data item to be searched should be in AL (for SCASB), AX (for SCASW) or EAX (for SCASD) registers. The string to be searched should be in memory and ... |
Writing Google Sheets Data to MySQL using Python | by Nathan Rasmussen | Towards Data Science | In data jobs, we often use different methods of writing and analyzing data. Google sheets is a great way to collaboratively enter and share data. For larger datasets, Google sheets becomes painfully slow to work with, and one way around that is to create a new worksheet when there are too many rows. One project my team... | [
{
"code": null,
"e": 1057,
"s": 172,
"text": "In data jobs, we often use different methods of writing and analyzing data. Google sheets is a great way to collaboratively enter and share data. For larger datasets, Google sheets becomes painfully slow to work with, and one way around that is to create... |
Unfolding AlphaFold. DeepMind AlphaFold Algorithm Explained... | by Naser Tamimi | Towards Data Science | On Monday, November 30th, 2020, the world received good news FINALLY. As you know, I am not talking about vaccine, but about a technology which eventually can lead to thousands of vaccines and treatments. This is a breakthrough not only for life sciences and biology but also for data science and artificial intelligence... | [
{
"code": null,
"e": 612,
"s": 171,
"text": "On Monday, November 30th, 2020, the world received good news FINALLY. As you know, I am not talking about vaccine, but about a technology which eventually can lead to thousands of vaccines and treatments. This is a breakthrough not only for life sciences ... |
C Language | Set 1 - GeeksforGeeks | 07 Oct, 2021
Following questions have been asked in GATE CS exam.
1. Consider the following three C functions :
[PI] int * g (void) { int x = 10; return (&x); } [P2] int * g (void) { int * px; *px = 10; return px; } [P3] int *g (void) { int *px; px = (int *) malloc (sizeof(int)); *px = 10; return p... | [
{
"code": null,
"e": 23958,
"s": 23930,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 24011,
"s": 23958,
"text": "Following questions have been asked in GATE CS exam."
},
{
"code": null,
"e": 24057,
"s": 24011,
"text": "1. Consider the following three C fun... |
ASP.NET MVC - Databases | In all ASP.NET MVC applications created in this tutorial we have been passing hard-coded data from the Controllers to the View templates. But, in order to build a real Web application, you might want to use a real database. In this chapter, we will see how to use a database engine in order to store and retrieve the dat... | [
{
"code": null,
"e": 2620,
"s": 2269,
"text": "In all ASP.NET MVC applications created in this tutorial we have been passing hard-coded data from the Controllers to the View templates. But, in order to build a real Web application, you might want to use a real database. In this chapter, we will see ... |
Write a program to print message without using println() method in java? | The println() method of the System class accepts aStringas parameter an prints the given String on the console.
public class PrintData {
public static void main(String args[]) {
System.out.println("Hello how are you");
}
}
Hello how are you
In addition to this you can print data on the console in several ot... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "The println() method of the System class accepts aStringas parameter an prints the given String on the console."
},
{
"code": null,
"e": 1297,
"s": 1174,
"text": "public class PrintData {\n public static void main(String args[]) {\... |
String after processing backspace characters - GeeksforGeeks | 21 Jul, 2021
Given a string S containing letters and ‘#‘. The ‘#” represents a backspace. The task is to print the new string without ‘#‘.Examples:
Input : S = "abc#de#f#ghi#jklmn#op#"
Output : abdghjklmo
Input : S = "##geeks##for##geeks#"
Output : geefgeek
Approach: A simple approach to this problem by using dequ... | [
{
"code": null,
"e": 24893,
"s": 24865,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 25030,
"s": 24893,
"text": "Given a string S containing letters and ‘#‘. The ‘#” represents a backspace. The task is to print the new string without ‘#‘.Examples: "
},
{
"code": null... |
What is the AddRange method in C# lists? | AddRange method in lists adds an entire collection of elements. Let us see an example −
Firstly, set a list in C# and add elements −
List<int> list = new List<int>();
list.Add(100);
list.Add(200);
list.Add(300);
list.Add(400);
Now set an array of elements to be added to the list −
// array of 4 elements
int[] arr = new... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "AddRange method in lists adds an entire collection of elements. Let us see an example −"
},
{
"code": null,
"e": 1195,
"s": 1150,
"text": "Firstly, set a list in C# and add elements −"
},
{
"code": null,
"e": 1289,
"s... |
Artificial Neural Network Implementation using NumPy and Classification of the Fruits360 Image Dataset | by Ahmed Gad | Towards Data Science | This tutorial builds artificial neural network in Python using NumPy from scratch in order to do an image classification application for the Fruits360 dataset. Everything (i.e. images and source codes) used in this tutorial, rather than the color Fruits360 images, are exclusive rights for my book cited as “Ahmed Fawzy ... | [
{
"code": null,
"e": 700,
"s": 172,
"text": "This tutorial builds artificial neural network in Python using NumPy from scratch in order to do an image classification application for the Fruits360 dataset. Everything (i.e. images and source codes) used in this tutorial, rather than the color Fruits36... |
jQWidgets jqxNavigationBar initContent Property - GeeksforGeeks | 29 Oct, 2021
jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful, optimized, platform-independent, and widely supported framework. The jqxNavigationBar is used for representing a jQuery widget that has header and content sections. On clicking over the h... | [
{
"code": null,
"e": 25364,
"s": 25336,
"text": "\n29 Oct, 2021"
},
{
"code": null,
"e": 25733,
"s": 25364,
"text": "jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful, optimized, platform-independent, and widely... |
Find element with maximum weight in given price range for Q queries - GeeksforGeeks | 18 Feb, 2022
Given an array arr[] of size N where each element denotes a pair in the form (price, weight) denoting the price and weight of each item. Given Q queries of the form [X, Y] denoting the price range. The task is to find the element with the highest weight within a given price range for each query.
Examples:... | [
{
"code": null,
"e": 24431,
"s": 24403,
"text": "\n18 Feb, 2022"
},
{
"code": null,
"e": 24729,
"s": 24431,
"text": "Given an array arr[] of size N where each element denotes a pair in the form (price, weight) denoting the price and weight of each item. Given Q queries of the for... |
List Data Type in Python | Lists are the most versatile of Python's compound data types. A list contains items separated by commas and enclosed within square brackets ([]). To some extent, lists are similar to arrays in C. One difference between them is that all the items belonging to a list can be of different data type.
The values stored in a ... | [
{
"code": null,
"e": 1359,
"s": 1062,
"text": "Lists are the most versatile of Python's compound data types. A list contains items separated by commas and enclosed within square brackets ([]). To some extent, lists are similar to arrays in C. One difference between them is that all the items belongi... |
JCL Online Quiz | Following quiz provides Multiple Choice Questions (MCQs) related to JCL Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the... | [
{
"code": null,
"e": 2191,
"s": 1864,
"text": "Following quiz provides Multiple Choice Questions (MCQs) related to JCL Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button... |
How to use a StringVar object in an Entry widget in Tkinter? | A StringVar object in Tkinter can help manage the value of a widget such as an Entry widget or a Label widget. You can assign a StringVar object to the textvariable of a widget. For example,
data = ['Car', 'Bus', 'Truck', 'Bike', 'Airplane']
var = StringVar(win)
my_spinbox = Spinbox(win, values=data, textvariable=var... | [
{
"code": null,
"e": 1253,
"s": 1062,
"text": "A StringVar object in Tkinter can help manage the value of a widget such as an Entry widget or a Label widget. You can assign a StringVar object to the textvariable of a widget. For example,"
},
{
"code": null,
"e": 1384,
"s": 1253,
... |
How to add the tag of Azure VM using PowerShell? | To add the tag to the Azure VM we need to use the Update-AZTag command. This command will merge the new tag to the existing tag(s) of the VM. If you are planning to add the entirely new VM tag, you can use the New-AZTag command. Once you use the New-AZTag command, other tags will be deleted for that particular VM and t... | [
{
"code": null,
"e": 1446,
"s": 1062,
"text": "To add the tag to the Azure VM we need to use the Update-AZTag command. This command will merge the new tag to the existing tag(s) of the VM. If you are planning to add the entirely new VM tag, you can use the New-AZTag command. Once you use the New-AZT... |
Pandas GroupBy - GeeksforGeeks | 29 Dec, 2021
Groupby is a pretty simple concept. We can create a grouping of categories and apply a function to the categories. It’s a simple concept but it’s an extremely valuable technique that’s widely used in data science. In real data science projects, you’ll be dealing with large amounts of data and trying things... | [
{
"code": null,
"e": 41553,
"s": 41525,
"text": "\n29 Dec, 2021"
},
{
"code": null,
"e": 42155,
"s": 41553,
"text": "Groupby is a pretty simple concept. We can create a grouping of categories and apply a function to the categories. It’s a simple concept but it’s an extremely valu... |
iBATIS - Quick Guide | iBATIS is a persistence framework which automates the mapping between SQL databases and objects in Java, .NET, and Ruby on Rails. The mappings are decoupled from the application logic by packaging the SQL statements in XML configuration files.
iBATIS is a lightweight framework and persistence API good for persisting PO... | [
{
"code": null,
"e": 2088,
"s": 1844,
"text": "iBATIS is a persistence framework which automates the mapping between SQL databases and objects in Java, .NET, and Ruby on Rails. The mappings are decoupled from the application logic by packaging the SQL statements in XML configuration files."
},
{... |
Python Pandas - Descriptive Statistics | A large number of methods collectively compute descriptive statistics and other related operations on DataFrame. Most of these are aggregations like sum(), mean(), but some of them, like sumsum(), produce an object of the same size. Generally speaking, these methods take an axis argument, just like ndarray.{sum, std, .... | [
{
"code": null,
"e": 2817,
"s": 2443,
"text": "A large number of methods collectively compute descriptive statistics and other related operations on DataFrame. Most of these are aggregations like sum(), mean(), but some of them, like sumsum(), produce an object of the same size. Generally speaking, ... |
How to Set Border of Tkinter Label Widget? - GeeksforGeeks | 11 Dec, 2020
The task here is to draft a python program using Tkinter module to set borders of a label widget. A Tkinter label Widget is an Area that displays text or images. We can update this text at any point in time.
Import module
Create a window
Set a label widget with required attributes for border
Place this wi... | [
{
"code": null,
"e": 25927,
"s": 25899,
"text": "\n11 Dec, 2020"
},
{
"code": null,
"e": 26136,
"s": 25927,
"text": "The task here is to draft a python program using Tkinter module to set borders of a label widget. A Tkinter label Widget is an Area that displays text or images. W... |
HTML | DOM Input Date value Property - GeeksforGeeks | 03 Feb, 2022
The Input Date value property is used for setting or returning the value of the value attribute of a date field. The Input Date value attribute can be used for specifying a date for the date field.Syntax:
For returning the value property:
inputdateObject.value
For setting the value property:
inputdat... | [
{
"code": null,
"e": 26218,
"s": 26190,
"text": "\n03 Feb, 2022"
},
{
"code": null,
"e": 26425,
"s": 26218,
"text": "The Input Date value property is used for setting or returning the value of the value attribute of a date field. The Input Date value attribute can be used for spe... |
Authenticate Using GitHub on Android - GeeksforGeeks | 06 Jun, 2021
GitHub is where over 65 million developers shape the future of software, together. Contribute to the open-source community, manage your Git repositories, review code like a pro, track bugs and features, power your CI/CD and DevOps workflows, and secure code before you commit it. So in this article, we are ... | [
{
"code": null,
"e": 26517,
"s": 26489,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 26942,
"s": 26517,
"text": "GitHub is where over 65 million developers shape the future of software, together. Contribute to the open-source community, manage your Git repositories, review co... |
Calculus — The Mathematics of ‘Change’ | by Gaurav Goel | Towards Data Science | Data Science and Machine Learning have fueled up interest in mathematics. A lot of people who are ramping up their skills in ML/AI domain have realized the practical applications of mathematical concepts, for the first time in their lives. During my venture into AI/ML space, I realized how difficult, mathematical ideas... | [
{
"code": null,
"e": 966,
"s": 172,
"text": "Data Science and Machine Learning have fueled up interest in mathematics. A lot of people who are ramping up their skills in ML/AI domain have realized the practical applications of mathematical concepts, for the first time in their lives. During my ventu... |
Is digital root of N a prime? | Practice | GeeksforGeeks | Given a number N, you need to find if its digital root is prime or not. DigitalRoot of a number is the repetitive sum of its digits until we get a single-digit number.
Eg.DigitalRoot(191)=1+9+1=>11=>1+1=>2
Example 1:
Input:
N = 89
Output:
0
Explanation:
DigitalRoot(89)=>17=>1+7=>8; not a prime.
Example 2:
Input:
N = 12... | [
{
"code": null,
"e": 432,
"s": 226,
"text": "Given a number N, you need to find if its digital root is prime or not. DigitalRoot of a number is the repetitive sum of its digits until we get a single-digit number.\nEg.DigitalRoot(191)=1+9+1=>11=>1+1=>2"
},
{
"code": null,
"e": 443,
"s... |
Is it possible to rename _id field after MongoDB group aggregation? | Yes, it is possible to rename using aggregation. Let us first create a collection with documents
> db.renameIdDemo.insertOne({"StudentName":"Chris"});
{
"acknowledged" : true,
"insertedId" : ObjectId("5c9a1760353decbc2fc927c5")
}
> db.renameIdDemo.insertOne({"StudentName":"Robert"});
{
"acknowledged" : true,
... | [
{
"code": null,
"e": 1159,
"s": 1062,
"text": "Yes, it is possible to rename using aggregation. Let us first create a collection with documents"
},
{
"code": null,
"e": 1577,
"s": 1159,
"text": "> db.renameIdDemo.insertOne({\"StudentName\":\"Chris\"});\n{\n \"acknowledged\" : t... |
find_element_by_id() driver method - Selenium Python - GeeksforGeeks | 07 Dec, 2021
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. After you have installed selenium and checked out – Navigating links using get method, you might want to play more with S... | [
{
"code": null,
"e": 26169,
"s": 26141,
"text": "\n07 Dec, 2021"
},
{
"code": null,
"e": 27059,
"s": 26169,
"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... |
Python | Numpy matrix.tobytes() - GeeksforGeeks | 29 May, 2019
With the help of Numpy matrix.tobytes() method, we can find the byte code for the matrix by using the matrix.tobytes() method.
Syntax : matrix.tobytes()Return : Return byte code for matrix
Example #1 :In this example we can see that by using matrix.tobytes() method we are able to find the byte code for the... | [
{
"code": null,
"e": 25673,
"s": 25645,
"text": "\n29 May, 2019"
},
{
"code": null,
"e": 25800,
"s": 25673,
"text": "With the help of Numpy matrix.tobytes() method, we can find the byte code for the matrix by using the matrix.tobytes() method."
},
{
"code": null,
"e":... |
Feature engineering and ensembled models for the top 10 in Kaggle “Housing Prices Competition” | by Gabriel Naya | Towards Data Science | Kaggle1 is one of the most significant online communities of data scientists and machine learners. Within Kaggle, it is common to find competitions, where different users generate prediction models and submit their results to be position according to the score, in the leaderboard.
The competition that supports the onli... | [
{
"code": null,
"e": 453,
"s": 171,
"text": "Kaggle1 is one of the most significant online communities of data scientists and machine learners. Within Kaggle, it is common to find competitions, where different users generate prediction models and submit their results to be position according to the ... |
Choose and Swap | Practice | GeeksforGeeks | You are given a string s of lower case english alphabets. You can choose any two characters in the string and replace all the occurences of the first character with the second character and replace all the occurences of the second character with the first character. Your aim is to find the lexicographically smallest st... | [
{
"code": null,
"e": 622,
"s": 238,
"text": "You are given a string s of lower case english alphabets. You can choose any two characters in the string and replace all the occurences of the first character with the second character and replace all the occurences of the second character with the first... |
C++ Algorithm Library - copy() Function | The C++ function std::algorithm::copy() copies a range of elements to a new location.
Following is the declaration for std::algorithm::copy() function form std::algorithm header.
template <class InputIterator, class OutputIterator>
OutputIterator copy (InputIterator first, InputIterator last, OutputIterator result);
f... | [
{
"code": null,
"e": 2689,
"s": 2603,
"text": "The C++ function std::algorithm::copy() copies a range of elements to a new location."
},
{
"code": null,
"e": 2782,
"s": 2689,
"text": "Following is the declaration for std::algorithm::copy() function form std::algorithm header."
... |
My Java Setup in Visual Studio Code | by Ryan Gleason | Towards Data Science | Launch a simple Java application after setting up a local development environment.
We are going to keep this as short and as simple as possible. You will be able to get Java code up and running in your VSCode environment in less than five minutes.
These are the tools we will be installing:
Visual Studio Code
Java Devel... | [
{
"code": null,
"e": 255,
"s": 172,
"text": "Launch a simple Java application after setting up a local development environment."
},
{
"code": null,
"e": 420,
"s": 255,
"text": "We are going to keep this as short and as simple as possible. You will be able to get Java code up and ... |
Program to calculate Area Of Octagon | 21 Jun, 2022
A regular octagon is a closed figure with sides of the same length and internal angles of the same size. It has eight lines of reflective symmetry and rotational symmetry of order 8. The internal angle at each vertex of a regular octagon is 135°. The central angle is 45°.Properties :
Convex polygon, Equi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 315,
"s": 28,
"text": "A regular octagon is a closed figure with sides of the same length and internal angles of the same size. It has eight lines of reflective symmetry and rotational symmetry of o... |
The implementation of import in Python (importlib) | The importlib package provides the implementation of the import statement in Python source code portable to any Python interpreter. This also provides an implementation which is easier to comprehend than one implemented in a programming language other than Python.
This package also exposes components to implement impor... | [
{
"code": null,
"e": 1327,
"s": 1062,
"text": "The importlib package provides the implementation of the import statement in Python source code portable to any Python interpreter. This also provides an implementation which is easier to comprehend than one implemented in a programming language other t... |
How to Remove Duplicate Values from Slice in Golang? - GeeksforGeeks | 05 Aug, 2021
An array is a data structure. Similarly, in Golang we have slice which is more flexible, powerful, lightweight and convenient than array. As slice is more flexible than array therefore, its flexibility is determined in terms of its size. Just like an array, it has indexing value and length but its size is ... | [
{
"code": null,
"e": 24470,
"s": 24442,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 24855,
"s": 24470,
"text": "An array is a data structure. Similarly, in Golang we have slice which is more flexible, powerful, lightweight and convenient than array. As slice is more flexible... |
Convert Text Image to Hand Written Text Image using Python - GeeksforGeeks | 29 Jun, 2021
In this article, we are going to see how to convert text images to handwritten text images using PyWhatkit, Pillow, and Tesseract in Python.
Pytesseract: Sometimes known as Python-tesseract, is a Python-based optical character recognition (OCR) program. It can read and recognize text in photos, license pla... | [
{
"code": null,
"e": 24318,
"s": 24290,
"text": "\n29 Jun, 2021"
},
{
"code": null,
"e": 24459,
"s": 24318,
"text": "In this article, we are going to see how to convert text images to handwritten text images using PyWhatkit, Pillow, and Tesseract in Python."
},
{
"code": ... |
How can we set Mnemonic Key Radio Button in Java? | Mnemonic key is set so that a user can use Keyboard keys to select a Radio Button. For example, a key can be set with ALT −
radio2.setMnemonic(KeyEvent.VK_R);
Above, we have set key ALT+R for radio2.
The following is an example to set Mnemonic key radio button −
package my;
import java.awt.FlowLayout;
import java.awt.e... | [
{
"code": null,
"e": 1186,
"s": 1062,
"text": "Mnemonic key is set so that a user can use Keyboard keys to select a Radio Button. For example, a key can be set with ALT −"
},
{
"code": null,
"e": 1221,
"s": 1186,
"text": "radio2.setMnemonic(KeyEvent.VK_R);"
},
{
"code": n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.