title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Get database data size in MongoDB? | To get the database data size in MongoDB, you can use stats() method. The syntax is as follows −
db.stats();
Let us use the database with the name ‘test’.
Now, check the current database with the help of the following query −
> db;
The following is the output −
test
Here is the query to get database data size in MongoD... | [
{
"code": null,
"e": 1159,
"s": 1062,
"text": "To get the database data size in MongoDB, you can use stats() method. The syntax is as follows −"
},
{
"code": null,
"e": 1171,
"s": 1159,
"text": "db.stats();"
},
{
"code": null,
"e": 1217,
"s": 1171,
"text": "Le... |
Calculating the Semantic Brand Score with Python | by Andrea Fronzetti Colladon | Towards Data Science | The Semantic Brand Score (SBS) is a novel metric designed to assess the importance of one or more brands, in different contexts and whenever it is possible to analyze textual data, even big data.
The advantage with respect to some traditional measures is that the SBS does not rely on surveys administered to small sampl... | [
{
"code": null,
"e": 368,
"s": 172,
"text": "The Semantic Brand Score (SBS) is a novel metric designed to assess the importance of one or more brands, in different contexts and whenever it is possible to analyze textual data, even big data."
},
{
"code": null,
"e": 1237,
"s": 368,
... |
Array.GetValue() Method in C# with Examples | Set – 3 - GeeksforGeeks | 23 Mar, 2022
Array.GetValue() Method in C# is used to gets the value of the specified element in the current Array. There are total 8 methods in the overload list of this method which are as follows:
Array.GetValue(Int32, Int32)
Array.GetValue(Int64, Int64)
Array.GetValue(Int32)
Array.GetValue(Int64)
Array.GetValue(In... | [
{
"code": null,
"e": 24552,
"s": 24524,
"text": "\n23 Mar, 2022"
},
{
"code": null,
"e": 24740,
"s": 24552,
"text": "Array.GetValue() Method in C# is used to gets the value of the specified element in the current Array. There are total 8 methods in the overload list of this metho... |
Shift Left Testing approach | 06 Apr, 2020
Software testing is a necessity. It ensures that a product is being released to end customers without faults. And being a widely discussed topic, there are many approaches to testing software.
Some companies champion a “waterfall approach” to product design. Here, the software is designed sequentially. It ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Apr, 2020"
},
{
"code": null,
"e": 221,
"s": 28,
"text": "Software testing is a necessity. It ensures that a product is being released to end customers without faults. And being a widely discussed topic, there are many approaches to ... |
How to use SUM () in Android sqlite? | Before getting into example, we should know what sqlite
data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to access this database, you d... | [
{
"code": null,
"e": 1582,
"s": 1187,
"text": "Before getting into example, we should know what sqlite\ndata base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the r... |
Solidity - Enums | Enums restrict a variable to have one of only a few predefined values. The values in this enumerated list are called enums.
With the use of enums it is possible to reduce the number of bugs in your code.
For example, if we consider an application for a fresh juice shop, it would be possible to restrict the glass size t... | [
{
"code": null,
"e": 2813,
"s": 2689,
"text": "Enums restrict a variable to have one of only a few predefined values. The values in this enumerated list are called enums."
},
{
"code": null,
"e": 2893,
"s": 2813,
"text": "With the use of enums it is possible to reduce the number ... |
Python Variables | 19 Feb, 2021
Python is not “statically typed”. We do not need to declare variables before using them or declare their type. A variable is created the moment we first assign a value to it. A variable is a name given to a memory location. It is the basic unit of storage in a program.
The value stored in a variable can be... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n19 Feb, 2021"
},
{
"code": null,
"e": 323,
"s": 53,
"text": "Python is not “statically typed”. We do not need to declare variables before using them or declare their type. A variable is created the moment we first assign a value to it.... |
Python | wxPython module Introduction | 19 May, 2021
Python provides wxpython module which allows us to create high functional graphical user interface. It is an Open Source module, which means it is free for anyone to use and the source code is available for anyone to look and modify. It is implemented as a set of extension modules that wrap the GUI compone... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n19 May, 2021"
},
{
"code": null,
"e": 618,
"s": 53,
"text": "Python provides wxpython module which allows us to create high functional graphical user interface. It is an Open Source module, which means it is free for anyone to use and ... |
Python | Sort list of lists by the size of sublists | 05 Apr, 2022
Given a list of lists, the task is to sort a list on the basis of size of sublists. Let’s discuss a few methods to do the same. Method #1: Using sort
Python3
# Python code to demonstrate# sort list of list# on the basis of size of sublist ini_list = [[1, 2, 3], [1, 2], [1, 2, 3, 4], [1, 2, ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Apr, 2022"
},
{
"code": null,
"e": 179,
"s": 28,
"text": "Given a list of lists, the task is to sort a list on the basis of size of sublists. Let’s discuss a few methods to do the same. Method #1: Using sort "
},
{
"code": nu... |
Display all tables inside a MySQL database using Java? | We will see here how to display all tables inside a MySQL database using Java. You can use show command from MySQL to get all tables inside a MySQL database.
Let’s say our database is ‘test’. The Java code is as follows to show all table names inside a database ‘test’.
The Java code is as follows. Here, connection is e... | [
{
"code": null,
"e": 1345,
"s": 1187,
"text": "We will see here how to display all tables inside a MySQL database using Java. You can use show command from MySQL to get all tables inside a MySQL database."
},
{
"code": null,
"e": 1457,
"s": 1345,
"text": "Let’s say our database i... |
XOR of path between any two nodes in a Binary Tree | 28 Jun, 2021
Given a binary tree with distinct nodes and a pair of two nodes. The task is to find the XOR of all of the nodes which comes on the path between the given two nodes.
For Example, in the above binary tree for nodes (3, 5) XOR of path will be (3 XOR 1 XOR 0 XOR 2 XOR 5) = 5.
The idea is to make use of thes... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 221,
"s": 54,
"text": "Given a binary tree with distinct nodes and a pair of two nodes. The task is to find the XOR of all of the nodes which comes on the path between the given two nodes. "
},
... |
Python List Comprehension | Segregate 0’s and 1’s in an array list | 07 Jan, 2018
You are given an array of 0s and 1s in random order. Segregate 0s on left side and 1s on right side of the array.
Examples:
Input : arr = [0, 1, 0, 1, 0, 0, 1, 1, 1, 0]
Output : [0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
We have existing solution for this problem please refer Segregate 0s and 1s in an array link... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n07 Jan, 2018"
},
{
"code": null,
"e": 167,
"s": 53,
"text": "You are given an array of 0s and 1s in random order. Segregate 0s on left side and 1s on right side of the array."
},
{
"code": null,
"e": 177,
"s": 167,
... |
Selenium - Capture videos | Sometimes we may not be able to analyze the failures just with the help of a log file or a screenshot. At times, it helps to capture the complete execution as a video. Let us understand how to capture videos.
We will make use of Monte Media Library to perform this operation.
Step 1 − Navigate to the URL - https://www.r... | [
{
"code": null,
"e": 2218,
"s": 2009,
"text": "Sometimes we may not be able to analyze the failures just with the help of a log file or a screenshot. At times, it helps to capture the complete execution as a video. Let us understand how to capture videos."
},
{
"code": null,
"e": 2285,
... |
Removing duplicate columns after DataFrame join in PySpark | 29 Dec, 2021
In this article, we will discuss how to remove duplicate columns after a DataFrame join in PySpark.
Python3
# Importing necessary librariesfrom pyspark.sql import SparkSession # Create a spark sessionspark = SparkSession.builder.appName('pyspark \- example join').getOrCreate() # Create data in dataframedat... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Dec, 2021"
},
{
"code": null,
"e": 128,
"s": 28,
"text": "In this article, we will discuss how to remove duplicate columns after a DataFrame join in PySpark."
},
{
"code": null,
"e": 136,
"s": 128,
"text": "Python... |
Can private methods of a class be accessed from outside of a class in Java? | You can access the private methods of a class using java reflection package.
Step1 − Instantiate the Method class of the java.lang.reflect package by passing the method name of the method which is declared private.
Step2 − Set the method accessible by passing value true to the setAccessible() method.
Step3 − Finally, i... | [
{
"code": null,
"e": 1264,
"s": 1187,
"text": "You can access the private methods of a class using java reflection package."
},
{
"code": null,
"e": 1402,
"s": 1264,
"text": "Step1 − Instantiate the Method class of the java.lang.reflect package by passing the method name of the m... |
Boolean Fields in Serializers – Django REST Framework | 14 Dec, 2021
In Django REST Framework the very concept of Serializing is to convert DB data to a datatype that can be used by javascript. Every serializer comes with some fields (entries) which are going to be processed. For example if you have a class with name Employee and its fields as Employee_id, Employee_name, is... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Dec, 2021"
},
{
"code": null,
"e": 733,
"s": 28,
"text": "In Django REST Framework the very concept of Serializing is to convert DB data to a datatype that can be used by javascript. Every serializer comes with some fields (entries) ... |
Passing arrays as arguments in C# | 22 Sep, 2021
An array is a collection of similar type variables which are referred to by a common name. In C#, arrays are the reference types so it can be passed as arguments to the method. A method can modify the value of the elements of the array. Both single-dimensional and multidimensional arrays can be passed as a... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Sep, 2021"
},
{
"code": null,
"e": 388,
"s": 54,
"text": "An array is a collection of similar type variables which are referred to by a common name. In C#, arrays are the reference types so it can be passed as arguments to the metho... |
Shell Program to Calculate the Factorial of a Number | 01 Sep, 2021
Here we are going to see to calculate the factorial of a number. Factorial of a non-negative integer is the multiplication of all integers smaller than or equal to n.
For example factorial of 5 is 5*4*3*2*1 which is 120.
Factorial can be calculated using the following recursive formula.
Below is implemen... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Sep, 2021"
},
{
"code": null,
"e": 222,
"s": 54,
"text": "Here we are going to see to calculate the factorial of a number. Factorial of a non-negative integer is the multiplication of all integers smaller than or equal to n. "
},
... |
Using WaitGroup in Golang | 03 Jun, 2020
Go routines are a great selling point for golang, making it a choice of a lots of developers out there. In this post we will see a common problem with these goroutines and try to solve it.
Let’s see a simple code snippet illustrating this problem,
Go
package main import "fmt" func runner1() { fmt.Prin... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n03 Jun, 2020"
},
{
"code": null,
"e": 242,
"s": 53,
"text": "Go routines are a great selling point for golang, making it a choice of a lots of developers out there. In this post we will see a common problem with these goroutines and tr... |
Equal Tree Partition in C++ | Suppose we have a binary tree with n nodes, our task is to check whether it's possible to partition the tree to two trees which have the equal sum of values after deleting exactly one edge on the original tree.
So, if the input is like
then the output will be true.
To solve this, we will follow these steps −
To solve t... | [
{
"code": null,
"e": 1273,
"s": 1062,
"text": "Suppose we have a binary tree with n nodes, our task is to check whether it's possible to partition the tree to two trees which have the equal sum of values after deleting exactly one edge on the original tree."
},
{
"code": null,
"e": 1298,... |
Solving Staff Attrition with Data | by Andrew Olton | Towards Data Science | Every now and then I enjoy hopping over to Kaggle to see if there are any interesting data sets that I may want to play with. Earlier this week I came across a fictional dataset on staff attrition. You can find the dataset using the link below:
www.kaggle.com
The dataset was shared by a Mr. Ludovic Benistant who asks t... | [
{
"code": null,
"e": 417,
"s": 172,
"text": "Every now and then I enjoy hopping over to Kaggle to see if there are any interesting data sets that I may want to play with. Earlier this week I came across a fictional dataset on staff attrition. You can find the dataset using the link below:"
},
{
... |
How to set a background Image With React Inline Styles ? - GeeksforGeeks | 22 Dec, 2020
A React project is created using create-react-app command and the task is to set a background image using react inline styles. There are three approaches that are discussed below:
Approach 1: Set background image using external URL: If the image located somewhere online, then the background image of the el... | [
{
"code": null,
"e": 24960,
"s": 24932,
"text": "\n22 Dec, 2020"
},
{
"code": null,
"e": 25140,
"s": 24960,
"text": "A React project is created using create-react-app command and the task is to set a background image using react inline styles. There are three approaches that are ... |
Scala - Arrays | Scala provides a data structure, the array, which stores a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.
Instead of declaring individual variables, such as num... | [
{
"code": null,
"e": 2264,
"s": 1998,
"text": "Scala provides a data structure, the array, which stores a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of th... |
Apache Spark with Kubernetes and Fast S3 Access | by Yifeng Jiang | Towards Data Science | To make the most of Apache Spark, we need two things:
A distributed storage to store the data
A scheduler to run the Spark executors across a computing cluster
People have been doing this differently on-premise and cloud. With on-premise, most use Spark with Hadoop, or particularly HDFS for the storage and YARN for the... | [
{
"code": null,
"e": 225,
"s": 171,
"text": "To make the most of Apache Spark, we need two things:"
},
{
"code": null,
"e": 265,
"s": 225,
"text": "A distributed storage to store the data"
},
{
"code": null,
"e": 331,
"s": 265,
"text": "A scheduler to run the ... |
Python Pillow - Writing Text on Image | You can write text on images by passing the location of the text, the text itself and the color of the text. We can pass multiple other parameters to this method.
from PIL import Image, ImageDraw
img = Image.open(beach1.jpg')
d1 = ImageDraw.Draw(img)
d1.text((28, 36), "Hello, TutorialsPoint!", fill=(255, 0, 0))
img.sh... | [
{
"code": null,
"e": 2363,
"s": 2200,
"text": "You can write text on images by passing the location of the text, the text itself and the color of the text. We can pass multiple other parameters to this method."
},
{
"code": null,
"e": 2559,
"s": 2363,
"text": "from PIL import Ima... |
NHibernate - Batch Size | In this chapter, we will be covering the batch size update. The batch size allows you to control the number of updates that go out in a single round trip to your database for the supported databases.
The update batch size has been defaulted as of NHibernate 3.2.
The update batch size has been defaulted as of NHibernate... | [
{
"code": null,
"e": 2533,
"s": 2333,
"text": "In this chapter, we will be covering the batch size update. The batch size allows you to control the number of updates that go out in a single round trip to your database for the supported databases."
},
{
"code": null,
"e": 2596,
"s": 2... |
Instant ofEpochMilli() method in Java with Examples - GeeksforGeeks | 28 Nov, 2018
The ofEpochMilli() method of Instant class helps to get an Instant using milliseconds passed as parameter from the epoch of 1970-01-01T00:00:00Z. This returned milliseconds is used to get the different time units like seconds, etc by conversion.
Syntax:
public static Instant
ofEpochMilli(long epochMil... | [
{
"code": null,
"e": 24161,
"s": 24133,
"text": "\n28 Nov, 2018"
},
{
"code": null,
"e": 24407,
"s": 24161,
"text": "The ofEpochMilli() method of Instant class helps to get an Instant using milliseconds passed as parameter from the epoch of 1970-01-01T00:00:00Z. This returned mil... |
Cookie Tracking and Stealing using Cross-Site Scripting - GeeksforGeeks | 19 Feb, 2019
How are cookies used in a website
A cookie is a randomly generated alphanumeric string which is generated when you visit a webpage and is sent to your browser by that webpage to be kept as a record of your presence on that website so that you can be recognized by that site when you visit it again because o... | [
{
"code": null,
"e": 25863,
"s": 25835,
"text": "\n19 Feb, 2019"
},
{
"code": null,
"e": 25897,
"s": 25863,
"text": "How are cookies used in a website"
},
{
"code": null,
"e": 26507,
"s": 25897,
"text": "A cookie is a randomly generated alphanumeric string whi... |
File transfer protocol server configuration using cisco packet tracer - GeeksforGeeks | 02 Nov, 2021
In this article we are going to design a file transfer protocol server configuration in cisco packet tracer and checking the connectivity for uploading and downloading the file from remote PC.
Objectives:
To Configure FTP Services on Server.
To Upload a File into the FTP Server from Remote PC.
To Download ... | [
{
"code": null,
"e": 25781,
"s": 25753,
"text": "\n02 Nov, 2021"
},
{
"code": null,
"e": 25974,
"s": 25781,
"text": "In this article we are going to design a file transfer protocol server configuration in cisco packet tracer and checking the connectivity for uploading and downloa... |
Sum of all perfect numbers present in an array - GeeksforGeeks | 26 Apr, 2021
Given an array arr[] containing N positive integer. The task is to find the sum of all the perfect numbers from the array. A number is perfect if is equal to the sum of its proper divisors i.e. the sum of its positive divisors excluding the number itself.
Examples:
Input: arr[] = {3, 6, 9} Output: 6Proper... | [
{
"code": null,
"e": 26041,
"s": 26013,
"text": "\n26 Apr, 2021"
},
{
"code": null,
"e": 26298,
"s": 26041,
"text": "Given an array arr[] containing N positive integer. The task is to find the sum of all the perfect numbers from the array. A number is perfect if is equal to the s... |
Implementation of CI/CD in C/C++ Application(Linux) Using Shell and Docker Executor on GitLab - GeeksforGeeks | 01 Feb, 2021
There are many executors available to implement CI/CD with GitLab Runner. However, Shell and Docker are more popular among them, and we can easily configure a repository with these runners. These runners can be chosen based on the requirements and availability of the resources. This article mainly focuses... | [
{
"code": null,
"e": 25493,
"s": 25465,
"text": "\n01 Feb, 2021"
},
{
"code": null,
"e": 25950,
"s": 25493,
"text": "There are many executors available to implement CI/CD with GitLab Runner. However, Shell and Docker are more popular among them, and we can easily configure a repo... |
PostgreSQL - DROP VIEWS Statement - GeeksforGeeks | 15 Mar, 2021
A view can be seen as a virtual table that can contain all rows of a table or selected rows from one or more tables. These allow us to see limited data only instead of complete information stored in a table. A view can be created from one or many Base Tables (the table from which view is created). We can p... | [
{
"code": null,
"e": 25367,
"s": 25339,
"text": "\n15 Mar, 2021"
},
{
"code": null,
"e": 25895,
"s": 25367,
"text": "A view can be seen as a virtual table that can contain all rows of a table or selected rows from one or more tables. These allow us to see limited data only instea... |
Getting sine and hyperbolic sine in Julia - sin(), sinh() and sind() Methods - GeeksforGeeks | 26 Mar, 2020
The sin() is an inbuilt function in julia which is used to calculate sine of the specified radian values.
Syntax: sin(x)
Parameters:
x: Specified radian values.
Returns: It returns the calculated sine of the specified radian values.
Example:
# Julia program to illustrate # the use of sin() method # Gettin... | [
{
"code": null,
"e": 25683,
"s": 25655,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 25789,
"s": 25683,
"text": "The sin() is an inbuilt function in julia which is used to calculate sine of the specified radian values."
},
{
"code": null,
"e": 25804,
"s": 2578... |
Java Program to Convert String to InputStream - GeeksforGeeks | 12 Jun, 2021
Given a string, the task is to convert the string to InputStream which is shown in the below illustrations.
Illustration:
Input : String : "Geeks for Geeks"
Output : Input Stream : Geeks for Geeks
Input : String : "A computer science portal"
Output : Input stream : A computer science portal
In order t... | [
{
"code": null,
"e": 25237,
"s": 25209,
"text": "\n12 Jun, 2021"
},
{
"code": null,
"e": 25345,
"s": 25237,
"text": "Given a string, the task is to convert the string to InputStream which is shown in the below illustrations."
},
{
"code": null,
"e": 25359,
"s": 25... |
Sum of an array using MPI - GeeksforGeeks | 28 Jun, 2019
Prerequisite: MPI – Distributed Computing made easy
Message Passing Interface(MPI) is a library of routines that can be used to create parallel programs in C or Fortran77. It allows users to build parallel applications by creating parallel processes and exchange information among these processes.MPI uses t... | [
{
"code": null,
"e": 25801,
"s": 25773,
"text": "\n28 Jun, 2019"
},
{
"code": null,
"e": 25853,
"s": 25801,
"text": "Prerequisite: MPI – Distributed Computing made easy"
},
{
"code": null,
"e": 26141,
"s": 25853,
"text": "Message Passing Interface(MPI) is a li... |
Java Program To Find Decimal Equivalent Of Binary Linked List - GeeksforGeeks | 03 Jan, 2022
Given a singly linked list of 0s and 1s find its decimal equivalent.
Input: 0->0->0->1->1->0->0->1->0
Output: 50
Input: 1->0->0
Output: 4
The decimal value of an empty linked list is considered as 0.
Initialize the result as 0. Traverse the linked list and for each node, multiply the result by 2 and ad... | [
{
"code": null,
"e": 26185,
"s": 26157,
"text": "\n03 Jan, 2022"
},
{
"code": null,
"e": 26254,
"s": 26185,
"text": "Given a singly linked list of 0s and 1s find its decimal equivalent."
},
{
"code": null,
"e": 26327,
"s": 26254,
"text": "Input: 0->0->0->1->1-... |
Program to print the Zigzag pattern - GeeksforGeeks | 11 Aug, 2021
Given a number N denoting the number of rows. The task is to print the zigzag pattern with N rows as shown in the below examples.Examples:
Input : N = 3
Output : 1
3*2
4*5*6
Input : N = 5
Output : 1
3*2
4*5*6
10*9*8*7
11*12*13*14*15
Approach... | [
{
"code": null,
"e": 25643,
"s": 25615,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 25784,
"s": 25643,
"text": "Given a number N denoting the number of rows. The task is to print the zigzag pattern with N rows as shown in the below examples.Examples: "
},
{
"code": ... |
Largest increasing subsequence of consecutive integers - GeeksforGeeks | 22 Jun, 2021
Given an array of n positive integers. We need to find the largest increasing sequence of consecutive positive integers.Examples:
Input : arr[] = {5, 7, 6, 7, 8}
Output : Size of LIS = 4
LIS = 5, 6, 7, 8
Input : arr[] = {5, 7, 8, 7, 5}
Output : Size of LIS = 2
LIS = 7, 8
This probl... | [
{
"code": null,
"e": 26349,
"s": 26321,
"text": "\n22 Jun, 2021"
},
{
"code": null,
"e": 26481,
"s": 26349,
"text": "Given an array of n positive integers. We need to find the largest increasing sequence of consecutive positive integers.Examples: "
},
{
"code": null,
... |
p5.js | httpGet() Function - GeeksforGeeks | 13 Dec, 2021
The httpGet() function in p5.js is used to execute an HTTP GET request. The datatype returned is automatically guessed by p5 based on the URL, when it is not specified.The data could be loaded in the preload() function so that it can be accessed immediately in the program.Syntax:
httpGet( path, [datatype]... | [
{
"code": null,
"e": 26627,
"s": 26599,
"text": "\n13 Dec, 2021"
},
{
"code": null,
"e": 26909,
"s": 26627,
"text": "The httpGet() function in p5.js is used to execute an HTTP GET request. The datatype returned is automatically guessed by p5 based on the URL, when it is not speci... |
Java.net.URLDecoder class in Java - GeeksforGeeks | 16 Jun, 2017
This is a utility class for HTML form decoding. It just performs the reverse of what URLEncoder class do, i.e. given an encoded string, it decodes it using the scheme specified. Generally when accessing the contents of request using getParameter() method in servlet programming, the values are automatically... | [
{
"code": null,
"e": 25683,
"s": 25655,
"text": "\n16 Jun, 2017"
},
{
"code": null,
"e": 26173,
"s": 25683,
"text": "This is a utility class for HTML form decoding. It just performs the reverse of what URLEncoder class do, i.e. given an encoded string, it decodes it using the sch... |
Print Levels of all nodes in a Binary Tree - GeeksforGeeks | 14 Mar, 2022
Given a Binary Tree and a key, write a function that prints levels of all keys in given binary tree.For example, consider the following tree. If the input key is 3, then your function should return 1. If the input key is 4, then your function should return 3. And for key which is not present in key, then y... | [
{
"code": null,
"e": 26259,
"s": 26231,
"text": "\n14 Mar, 2022"
},
{
"code": null,
"e": 26597,
"s": 26259,
"text": "Given a Binary Tree and a key, write a function that prints levels of all keys in given binary tree.For example, consider the following tree. If the input key is 3... |
lsblk Command in Linux with Examples - GeeksforGeeks | 27 Sep, 2021
Lsblk is used to display details about block devices and these block devices(Except ram disk) are basically those files that represent devices connected to the pc. It queries /sys virtual file system and udev db to obtain information that it displays. And it basically displays output in a tree-like struct... | [
{
"code": null,
"e": 24475,
"s": 24444,
"text": " \n27 Sep, 2021\n"
},
{
"code": null,
"e": 24849,
"s": 24475,
"text": "Lsblk is used to display details about block devices and these block devices(Except ram disk) are basically those files that represent devices connected to the ... |
default - Django Built-in Field Validation - GeeksforGeeks | 24 Jun, 2020
Built-in Field Validations in Django models are the validations that come predefined to all Django fields. Every field comes in with built-in validations from Django validators. One can also add more built-in field validations for applying or removing certain constraints on a particular field. default=valu... | [
{
"code": null,
"e": 24170,
"s": 24142,
"text": "\n24 Jun, 2020"
},
{
"code": null,
"e": 24746,
"s": 24170,
"text": "Built-in Field Validations in Django models are the validations that come predefined to all Django fields. Every field comes in with built-in validations from Djan... |
Average of Squares of Natural Numbers - GeeksforGeeks | 24 Mar, 2021
Given a number n, find the average of square of natural Numbers till nExamples :
Input : n = 2
Output :2.5
12 + 22 = 2.5
Input : n = 3
Output : 4.666667
12 + 22 + 32 = 4.666667
Naive approach : A naive approach will be to run a loop from 1 to n and and find the average of sum up all the squares.
C
C... | [
{
"code": null,
"e": 24612,
"s": 24584,
"text": "\n24 Mar, 2021"
},
{
"code": null,
"e": 24695,
"s": 24612,
"text": "Given a number n, find the average of square of natural Numbers till nExamples : "
},
{
"code": null,
"e": 24793,
"s": 24695,
"text": "Input :... |
Access object within another objects in Python - GeeksforGeeks | 20 Aug, 2020
Prerequisite: Basics of OOPs in Python
In this article, we will learn how to access object methods and attributes within other objects in Python. If we have two different classes and one of these defined another class on calling the constructor. Then, the method and attributes of another class can be acces... | [
{
"code": null,
"e": 24402,
"s": 24374,
"text": "\n20 Aug, 2020"
},
{
"code": null,
"e": 24441,
"s": 24402,
"text": "Prerequisite: Basics of OOPs in Python"
},
{
"code": null,
"e": 24769,
"s": 24441,
"text": "In this article, we will learn how to access object... |
A Simple Guide to NumPy in Python | by Frank Andrade | Towards Data Science | NumPy is a Python library on which most data science packages such as SciPy (Scientific Python), Matplotlib, and Scikit-learn depends to some extent. It adds support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays.
Without a... | [
{
"code": null,
"e": 483,
"s": 172,
"text": "NumPy is a Python library on which most data science packages such as SciPy (Scientific Python), Matplotlib, and Scikit-learn depends to some extent. It adds support for large, multi-dimensional arrays and matrices, along with a large collection of high-l... |
HTML | <table> rules Attribute - GeeksforGeeks | 29 May, 2019
The HTML <table> rules Attribute is used to specify the which parts of the inside borders that should be visible.
Syntax:
<table rules="value">
Attribute Values:
none: It does not create any lines.
groups: It create lines between row and column groups.
rows: It creates line between the rows.
cols: It creat... | [
{
"code": null,
"e": 24764,
"s": 24736,
"text": "\n29 May, 2019"
},
{
"code": null,
"e": 24878,
"s": 24764,
"text": "The HTML <table> rules Attribute is used to specify the which parts of the inside borders that should be visible."
},
{
"code": null,
"e": 24886,
"... |
Vue.js | Routing | 26 Jul, 2021
Routing is one of the many features provided by Vue.js to allow users to switch between pages without refreshing every time a page is loaded. This results in smooth transitions between pages giving a better feel for the user.Setting Up The Application: Firstly, we need to create a project to work on. We ca... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 443,
"s": 28,
"text": "Routing is one of the many features provided by Vue.js to allow users to switch between pages without refreshing every time a page is loaded. This results in smooth transition... |
How to Configure SSH on Cisco Routers and Switches? | 16 Aug, 2021
Overview :SSH is a security mechanism, which can be used to access the privilege and configuration mode of a Router and a Switch from a remote location to perform the required action. The primary aim to configure SSH is to access devices deployed in a network from a remote location so that the required con... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Aug, 2021"
},
{
"code": null,
"e": 686,
"s": 28,
"text": "Overview :SSH is a security mechanism, which can be used to access the privilege and configuration mode of a Router and a Switch from a remote location to perform the required... |
Matplotlib.axis.Axis.set_ticks() function in Python | 08 Jun, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack.
The Axis.set_ticks() function in axis module of matplotlib library is used to set the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jun, 2020"
},
{
"code": null,
"e": 249,
"s": 28,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and u... |
How to Create Scroll Indicator using HTML CSS and JavaScript ? | 29 May, 2020
Scroll Indicator is a progress bar that represents how much a page has been scrolled. When we scroll down the bar fills up and when we scroll up the bar amount reduces.
Approach: Now, we will create a basic webpage with text to enable scrolling and then use JavaScript to make the scroll indicator work.
HTM... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 May, 2020"
},
{
"code": null,
"e": 223,
"s": 54,
"text": "Scroll Indicator is a progress bar that represents how much a page has been scrolled. When we scroll down the bar fills up and when we scroll up the bar amount reduces."
},... |
HTML | DOM Location reload() Method | 05 Jul, 2022
The location reload() method in HTML DOM is used to reload the current document. This method refreshes the current documents. It is similar to the refresh button in the browser.
Syntax:
location.reload( forceGet )
Parameters: This method contains single parameter forceGet which is optional. This parameter... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Jul, 2022"
},
{
"code": null,
"e": 207,
"s": 28,
"text": "The location reload() method in HTML DOM is used to reload the current document. This method refreshes the current documents. It is similar to the refresh button in the browse... |
Node.js | fs.appendFileSync() Function | 08 May, 2020
The fs.appendFileSync() method is used to synchronously append the given data to a file. A new file is created if it does not exist. The optional options parameter can be used to modify the behavior of the operation.
Syntax:
fs.appendFileSync( path, data, options])
Parameters: This method accepts three par... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 May, 2020"
},
{
"code": null,
"e": 245,
"s": 28,
"text": "The fs.appendFileSync() method is used to synchronously append the given data to a file. A new file is created if it does not exist. The optional options parameter can be used... |
Difference between Horizontal and Vertical micro-programmed Control Unit | 04 Jan, 2022
Prerequisite – Hardwired v/s Micro-programmed Control Unit
The control unit (CU) is the engine that runs the entire functions of a computer with the help of control signals in the proper sequence. In the micro-programmed control unit approach, the control signals that are associated with the operations ar... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 114,
"s": 54,
"text": "Prerequisite – Hardwired v/s Micro-programmed Control Unit "
},
{
"code": null,
"e": 611,
"s": 114,
"text": "The control unit (CU) is the engine that runs... |
OptionalDouble getAsDouble() method in Java with examples | 30 Jul, 2019
OptionalDouble help us to create an object which may or may not contain a double value. The getAsDouble() method returns value If a value is present in OptionalDouble object, otherwise throws NoSuchElementException.
Syntax:
public double getAsDouble()
Parameters: This method accepts nothing.
Return value:... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jul, 2019"
},
{
"code": null,
"e": 244,
"s": 28,
"text": "OptionalDouble help us to create an object which may or may not contain a double value. The getAsDouble() method returns value If a value is present in OptionalDouble object, ... |
Entity Framework - Concurrency | Any data access developer faces difficulty while answering the question regarding data concurrency, “What happens if more than one person is editing the same data at the same time?”
The more fortunate among us deal with business rules that say “no problem, last one in wins.”
The more fortunate among us deal with busine... | [
{
"code": null,
"e": 3214,
"s": 3032,
"text": "Any data access developer faces difficulty while answering the question regarding data concurrency, “What happens if more than one person is editing the same data at the same time?”"
},
{
"code": null,
"e": 3308,
"s": 3214,
"text": "... |
How to remove rows from data frame in R that contains NaN? | The NaN values are referred to as the Not A Number in R. It is also called undefined or unrepresentable but it belongs to numeric data type for the values that are not numeric, especially in case of floating-point arithmetic. To remove rows from data frame in R that contains NaN, we can use the function na.omit.
Live ... | [
{
"code": null,
"e": 1376,
"s": 1062,
"text": "The NaN values are referred to as the Not A Number in R. It is also called undefined or unrepresentable but it belongs to numeric data type for the values that are not numeric, especially in case of floating-point arithmetic. To remove rows from data fr... |
Introduction to Image Processing with Python — Dilation and Erosion for Beginners | by Tonichi Edeza | Towards Data Science | In a previous article, we briefly discussed the idea of adjusting an image with the use of kernels. For this article, we shall go over the finer points of this concept. In this article we shall stick to artificially generated images. Though this is a step away from how I usually discuss a topic, I believe that for this... | [
{
"code": null,
"e": 693,
"s": 172,
"text": "In a previous article, we briefly discussed the idea of adjusting an image with the use of kernels. For this article, we shall go over the finer points of this concept. In this article we shall stick to artificially generated images. Though this is a step... |
Java Generics - Unbounded Types Erasure | Java Compiler replaces type parameters in generic type with Object if unbounded type parameters are used.
package com.tutorialspoint;
public class GenericsTester {
public static void main(String[] args) {
Box<Integer> integerBox = new Box<Integer>();
Box<String> stringBox = new Box<String>();
int... | [
{
"code": null,
"e": 2746,
"s": 2640,
"text": "Java Compiler replaces type parameters in generic type with Object if unbounded type parameters are used."
},
{
"code": null,
"e": 3305,
"s": 2746,
"text": "package com.tutorialspoint;\n\npublic class GenericsTester {\n public stat... |
C program to compare two files and report mismatches | In the C programming language, the programmer can excess the files and read and write content in them.
A file is a simple memory block that can store information, here we are concerned with text only.
In this program, we will compare two files and report mismatches that occur. These files are almost identical but may h... | [
{
"code": null,
"e": 1165,
"s": 1062,
"text": "In the C programming language, the programmer can excess the files and read and write content in them."
},
{
"code": null,
"e": 1263,
"s": 1165,
"text": "A file is a simple memory block that can store information, here we are concern... |
Client-Server Programming in Android | This example demonstrate about Client-Server Programming in Android
Need Server and Client Project
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" encod... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "This example demonstrate about Client-Server Programming in Android"
},
{
"code": null,
"e": 1161,
"s": 1130,
"text": "Need Server and Client Project"
},
{
"code": null,
"e": 1290,
"s": 1161,
"text": "Step 1 − Cre... |
GATE | GATE-CS-2014-(Set-1) | Question 44 - GeeksforGeeks | 10 Sep, 2021
A canonical set of items is given below
S --> L. > R
Q --> R.
On input symbol < the set has
(A) a shift-reduce conflict and a reduce-reduce conflict.(B) a shift-reduce conflict but not a reduce-reduce conflict.(C) a reduce-reduce conflict but not a shift-reduce conflict.(D) neither a shift-reduce nor a red... | [
{
"code": null,
"e": 24466,
"s": 24438,
"text": "\n10 Sep, 2021"
},
{
"code": null,
"e": 24506,
"s": 24466,
"text": "A canonical set of items is given below"
},
{
"code": null,
"e": 24528,
"s": 24506,
"text": "S --> L. > R\nQ --> R."
},
{
"code": null,... |
C Program For Finding The Length Of Loop In Linked List - GeeksforGeeks | 11 Jan, 2022
Write a function detectAndCountLoop() that checks whether a given Linked List contains loop and if loop is present then returns count of nodes in loop. For example, the loop is present in below-linked list and length of the loop is 4. If the loop is not present, then the function should return 0.
Approach:... | [
{
"code": null,
"e": 24286,
"s": 24258,
"text": "\n11 Jan, 2022"
},
{
"code": null,
"e": 24584,
"s": 24286,
"text": "Write a function detectAndCountLoop() that checks whether a given Linked List contains loop and if loop is present then returns count of nodes in loop. For example... |
VBScript and Cookies | Web Browsers and Servers use HTTP protocol to communicate and HTTP is a stateless protocol. But for a commercial website, it is required to maintain session information among different pages. For example, one user registration ends after completing many pages. But how to maintain user's session information across all t... | [
{
"code": null,
"e": 2622,
"s": 2080,
"text": "Web Browsers and Servers use HTTP protocol to communicate and HTTP is a stateless protocol. But for a commercial website, it is required to maintain session information among different pages. For example, one user registration ends after completing many... |
How to display a list of images and text in a ListView in Android? | Before getting into listview example, we should know about listview, Listview is a collection of items pulled from arraylist, list or any databases. Most uses of listview is a collection of items in vertical format, we can scroll up/down and click on any item.
Custom listview works based on customAdapter. In this custo... | [
{
"code": null,
"e": 1323,
"s": 1062,
"text": "Before getting into listview example, we should know about listview, Listview is a collection of items pulled from arraylist, list or any databases. Most uses of listview is a collection of items in vertical format, we can scroll up/down and click on an... |
ALTER TABLE to add a composite primary key in MySQL? | To add composite primary key, use the ALTER command. Let us first create a demo table
The query to create a table.
mysql> create table CompositePrimaryKey
-> (
-> Id int,
-> StudentName varchar(100),
-> Age int
-> );
Query OK, 0 rows affected (0.56 sec)
Haven’t added composite primary key above till now.... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "To add composite primary key, use the ALTER command. Let us first create a demo table"
},
{
"code": null,
"e": 1177,
"s": 1148,
"text": "The query to create a table."
},
{
"code": null,
"e": 1331,
"s": 1177,
"text... |
How to automate menu box/pop up of right click in Python Selenium? | We can automate right click action with Selenium webdriver in Python by using the ActionChains class. We have to create an object of the ActionChains class and then apply the relevant method on it.
In order to move the mouse to the element on which right click is to be performed, we shall use the move_to_element method... | [
{
"code": null,
"e": 1260,
"s": 1062,
"text": "We can automate right click action with Selenium webdriver in Python by using the ActionChains class. We have to create an object of the ActionChains class and then apply the relevant method on it."
},
{
"code": null,
"e": 1428,
"s": 126... |
Draw a Chess Board using Graphics Programming in C - GeeksforGeeks | 21 Jun, 2020
Prerequisite: graphics.h, How to include graphics.h in CodeBlocks?
In Computer Graphics, we use graphics.h which provide direct functions to draw different coordinate shapes(like circle, rectangle etc). By using these functions we can draw different objects like car, hut, trees etc. In this program, the ta... | [
{
"code": null,
"e": 24228,
"s": 24200,
"text": "\n21 Jun, 2020"
},
{
"code": null,
"e": 24295,
"s": 24228,
"text": "Prerequisite: graphics.h, How to include graphics.h in CodeBlocks?"
},
{
"code": null,
"e": 24596,
"s": 24295,
"text": "In Computer Graphics, w... |
Sum of XOR of all pairs in an array in C++ | In this problem, we are given an array arr[] of n integers. Our task is to create a program to find the sum of XOR of all pairs in an array.
Input: arr[] = {5, 1, 4}
Output: 10
Explanation: the sum of all pairs:
5 ^ 1 = 4
1 ^ 4 = 5
5 ^ 4 = 1
sum = 4 + 5 + 1 = 10
One simple approach to solve this problem is to run neste... | [
{
"code": null,
"e": 1203,
"s": 1062,
"text": "In this problem, we are given an array arr[] of n integers. Our task is to create a program to find the sum of XOR of all pairs in an array."
},
{
"code": null,
"e": 1325,
"s": 1203,
"text": "Input: arr[] = {5, 1, 4}\nOutput: 10\nExp... |
Java program to find the square root of a given number | The process of finding the square root of a number can be divided into two steps. One step is to find integer part and the second one is for fraction part.
Define value n to find the square root of.
Define variable i and set it to 1. (For integer part)
Define variable p and set it to 0.00001. (For fraction part)
While ... | [
{
"code": null,
"e": 1218,
"s": 1062,
"text": "The process of finding the square root of a number can be divided into two steps. One step is to find integer part and the second one is for fraction part."
},
{
"code": null,
"e": 1261,
"s": 1218,
"text": "Define value n to find the... |
How to style labels with CSS? | To style labels with CSS, the code is as follows −
Live Demo
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
margin: 20px;
}
span {
font-size: 18px;
font-we... | [
{
"code": null,
"e": 1113,
"s": 1062,
"text": "To style labels with CSS, the code is as follows −"
},
{
"code": null,
"e": 1124,
"s": 1113,
"text": " Live Demo"
},
{
"code": null,
"e": 1949,
"s": 1124,
"text": "<!DOCTYPE html>\n<html>\n<head>\n<meta name=\"vie... |
Servlets - Handling Date | One of the most important advantages of using Servlet is that you can use most of the methods available in core Java. This tutorial would take you through Java provided Date class which is available in java.util package, this class encapsulates the current date and time.
The Date class supports two constructors. The fi... | [
{
"code": null,
"e": 2457,
"s": 2185,
"text": "One of the most important advantages of using Servlet is that you can use most of the methods available in core Java. This tutorial would take you through Java provided Date class which is available in java.util package, this class encapsulates the curr... |
C Program for sparse matrix | In a given matrix, when most of the elements are zero then, we call it as sparse matrix. Example − 3 x3 matrix
1 1 0
0 0 2
0 0 0
In this matrix, most of the elements are zero, so it is sparse matrix.
Check whether a matrix is a sparse matrix or not.
Let us assume ZERO in the matrix is greater than (row * column)/2.
Let... | [
{
"code": null,
"e": 1173,
"s": 1062,
"text": "In a given matrix, when most of the elements are zero then, we call it as sparse matrix. Example − 3 x3 matrix"
},
{
"code": null,
"e": 1191,
"s": 1173,
"text": "1 1 0\n0 0 2\n0 0 0"
},
{
"code": null,
"e": 1262,
"s":... |
Python Bokeh tutorial – Interactive Data Visualization with Bokeh | 19 Jan, 2022
Python Bokeh is a Data Visualization library that provides interactive charts and plots. Bokeh renders its plots using HTML and JavaScript that uses modern web browsers for presenting elegant, concise construction of novel graphics with high-level interactivity.
Features of Bokeh:
Flexibility: Bokeh can b... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jan, 2022"
},
{
"code": null,
"e": 292,
"s": 28,
"text": "Python Bokeh is a Data Visualization library that provides interactive charts and plots. Bokeh renders its plots using HTML and JavaScript that uses modern web browsers for pr... |
How to Make an Activity Appear Only Once in Android? | 01 Sep, 2020
There are many android applications that require an activity to appear only once when the user opens the app for the first time. Here, let’s learn how to implement this in our own android app.
Why might we need an activity to appear only once?
It may be used for getting user’s login information or other on... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Sep, 2020"
},
{
"code": null,
"e": 245,
"s": 52,
"text": "There are many android applications that require an activity to appear only once when the user opens the app for the first time. Here, let’s learn how to implement this in ou... |
How to Write Spark UDF (User Defined Functions) in Python ? | 06 Jun, 2021
In this article, we will talk about UDF(User Defined Functions) and how to write these in Python Spark. UDF, basically stands for User Defined Functions. The UDF will allow us to apply the functions directly in the dataframes and SQL databases in python, without making them registering individually. It can... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 543,
"s": 28,
"text": "In this article, we will talk about UDF(User Defined Functions) and how to write these in Python Spark. UDF, basically stands for User Defined Functions. The UDF will allow us... |
Python | Passing dictionary as keyword arguments | 28 Aug, 2019
Many times while working with Python dictionaries, due to advent of OOP Paradigm, Modularity is focussed in different facets of programming. Hence there can be many use cases in which we require to pass a dictionary as argument to a function. But this required the unpacking of dictionary keys as arguments ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Aug, 2019"
},
{
"code": null,
"e": 426,
"s": 28,
"text": "Many times while working with Python dictionaries, due to advent of OOP Paradigm, Modularity is focussed in different facets of programming. Hence there can be many use cases ... |
Double.equals() Method in Java with Examples | 19 Jun, 2018
The java.lang.Double.equals() is a built-in function in java that compares this object to the specified object. The result is true if and only if the argument is not null and is a Double object that contains the same double value as this object. It returns false if both the objects are not same. In all oth... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jun, 2018"
},
{
"code": null,
"e": 383,
"s": 28,
"text": "The java.lang.Double.equals() is a built-in function in java that compares this object to the specified object. The result is true if and only if the argument is not null and ... |
How to Create a Wallpaper App in Android Studio? | 15 Nov, 2021
Almost all Android devices are having a wallpaper set on their home screen. For setting this wallpaper to the screen many Android devices provides a Wallpaper Application where we can browse different types of wallpapers based on various categories. In this article we will look at, building a similar appli... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n15 Nov, 2021"
},
{
"code": null,
"e": 406,
"s": 53,
"text": "Almost all Android devices are having a wallpaper set on their home screen. For setting this wallpaper to the screen many Android devices provides a Wallpaper Application whe... |
Scala | Variances | 10 Apr, 2019
Variance is the interconnection of Sub-Typing relationships which are either of complicated types or of their constituent types. Variance explains inheritance correlation of Types that have parameters or arguments within them. These types belongs to the generic classes, which takes a type like a parameter.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Apr, 2019"
},
{
"code": null,
"e": 549,
"s": 28,
"text": "Variance is the interconnection of Sub-Typing relationships which are either of complicated types or of their constituent types. Variance explains inheritance correlation of T... |
Python | Split string on Kth Occurrence of Character | 17 Jun, 2021
Many problems of the split have been dealt with in the past, but sometimes, one can also encounter this problem in which we need to split the string on the Kth occurrence of a character. Let’s discuss certain ways in which this problem can be solved.
Method #1 : Using split() + join() The split and join m... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 280,
"s": 28,
"text": "Many problems of the split have been dealt with in the past, but sometimes, one can also encounter this problem in which we need to split the string on the Kth occurrence of a... |
What is the difference between public, private, and protected in PHP? | 06 Oct, 2021
Public, private and protected are called access modifiers. Just like C++, PHP also have three access modifiers such as public, private and protected. The visibility of a property, a method or a constant can be defined by prefixing the declaration with these keywords.
If the class member declared as publi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 322,
"s": 52,
"text": "Public, private and protected are called access modifiers. Just like C++, PHP also have three access modifiers such as public, private and protected. The visibility of a prop... |
Matplotlib.ticker.AutoMinorLocator Class in Python | 21 Apr, 2020
Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack.
The matplotlib.ticker.AutoMinorLocator class is used to find minor tick positions based on the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 240,
"s": 28,
"text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed t... |
Extract Numbers from Character String Vector in R | 16 May, 2021
In this article, we are going to see how to extract Numbers from Character String Vector in R Programming Language. There are different approaches to extract numbers from character string vectors using some in-built functions. It can be done in the following ways:
Extracting numbers from character string u... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 May, 2021"
},
{
"code": null,
"e": 293,
"s": 28,
"text": "In this article, we are going to see how to extract Numbers from Character String Vector in R Programming Language. There are different approaches to extract numbers from char... |
Register Organization in RISC CPU | 21 Jun, 2021
RISC processors :They are processors that use a small instruction set and simple addressing mode so that their instructions can be executed much faster within the CPU with less referring to the memory. This type of processor is classified as a reduced instruction set computer( RISC).
For detailed understan... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jun, 2021"
},
{
"code": null,
"e": 337,
"s": 52,
"text": "RISC processors :They are processors that use a small instruction set and simple addressing mode so that their instructions can be executed much faster within the CPU with le... |
move_by_offset – Action Chains in Selenium Python | 15 May, 2020
Selenium’s Python Module is built to perform automated testing with Python. ActionChains are a way to automate low-level interactions such as mouse movements, mouse button actions, keypress, and context menu interactions. This is useful for doing more complex actions like hover over and drag and drop. Acti... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 May, 2020"
},
{
"code": null,
"e": 640,
"s": 28,
"text": "Selenium’s Python Module is built to perform automated testing with Python. ActionChains are a way to automate low-level interactions such as mouse movements, mouse button act... |
Level Order Binary Tree Traversal | 16 Jun, 2022
Level order traversal of a tree is breadth first traversal for the tree.
Level order traversal of the above tree is 1 2 3 4 5
Method 1 (Use function to print a current level)
Algorithm: There are basically two functions in this method. One is to print all nodes at a given level (printCurrentLevel), and t... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 126,
"s": 52,
"text": "Level order traversal of a tree is breadth first traversal for the tree. "
},
{
"code": null,
"e": 180,
"s": 126,
"text": "Level order traversal of the ab... |
Quality of Service (QoS) in ATM | 08 Jul, 2022
Quality of Service (QoS) is a type of Networking Technology that can guarantee a specific level of output for a specific connection, path, or type of traffic. QoS mechanisms provide control on both quality and availability of bandwidth whereas another network provides only a best-effort delivery.
QoS featu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jul, 2022"
},
{
"code": null,
"e": 326,
"s": 28,
"text": "Quality of Service (QoS) is a type of Networking Technology that can guarantee a specific level of output for a specific connection, path, or type of traffic. QoS mechanisms p... |
Ruby/TK - Standard Dailog Box | Dialog boxes are a type of window used in applications to get some information from the user, inform them that some event has occurred, confirm an action and more.
The appearance and usage of dialog boxes is usually quite specifically detailed in a platform's style guide. Tk comes with a number of dialog boxes built-in... | [
{
"code": null,
"e": 2458,
"s": 2294,
"text": "Dialog boxes are a type of window used in applications to get some information from the user, inform them that some event has occurred, confirm an action and more."
},
{
"code": null,
"e": 2699,
"s": 2458,
"text": "The appearance and... |
Spring Boot CLI - Hello World Example | In this example, we'll create a Spring Boot + MVC + Rest based Web application.
Create a folder FirstApplication in E:\Test folder.
Create FirstApplication.groovy file in E:\Test folder with following source code.
@RestController
class FirstApplication {
@RequestMapping("/")
String welcome() {
"Welcome to T... | [
{
"code": null,
"e": 2089,
"s": 2009,
"text": "In this example, we'll create a Spring Boot + MVC + Rest based Web application."
},
{
"code": null,
"e": 2141,
"s": 2089,
"text": "Create a folder FirstApplication in E:\\Test folder."
},
{
"code": null,
"e": 2223,
"s... |
How to organize code in Python if you are a scientist | by Victor Serban | Towards Data Science | If you work in computational research or data science and you don’t come from a Computer Science background, you probably generated amazing pieces of scientific knowledge, but the code you wrote to do it prevents you from indulging in academic glory. You might need a week yourself to make your scripts do the same thing... | [
{
"code": null,
"e": 621,
"s": 172,
"text": "If you work in computational research or data science and you don’t come from a Computer Science background, you probably generated amazing pieces of scientific knowledge, but the code you wrote to do it prevents you from indulging in academic glory. You ... |
Find and print duplicate words in std::vector<string> using STL functions - GeeksforGeeks | 25 Nov, 2020
Consider an array of string and find duplicate words in that array and print that duplicate words if exist.Examples:
Input : { "welcome", "to", "geeks", "for", "geeks" }
Output : geeks
Input : { "reduce", "reuse", "recycle", "reduce",
"reuse", "recycle", " recycle" }
Output : recycle
reduce
r... | [
{
"code": null,
"e": 25367,
"s": 25339,
"text": "\n25 Nov, 2020"
},
{
"code": null,
"e": 25486,
"s": 25367,
"text": "Consider an array of string and find duplicate words in that array and print that duplicate words if exist.Examples: "
},
{
"code": null,
"e": 25734,
... |
Minimum cost path from source node to destination node via an intermediate node - GeeksforGeeks | 13 Jan, 2022
Given an undirected weighted graph. The task is to find the minimum cost of the path from source node to the destination node via an intermediate node. Note: If an edge is traveled twice, only once weight is calculated as cost.
Examples:
Input: source = 0, destination = 2, intermediate = 3; Output: 6 T... | [
{
"code": null,
"e": 26821,
"s": 26793,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 27051,
"s": 26821,
"text": "Given an undirected weighted graph. The task is to find the minimum cost of the path from source node to the destination node via an intermediate node. Note: If an... |
reflect.ValueOf() Function in Golang with Examples - GeeksforGeeks | 03 May, 2020
Go language provides inbuilt support implementation of run-time reflection and allowing a program to manipulate objects with arbitrary types with the help of reflect package. The reflect.ValueOf() Function in Golang is used to get the new Value initialized to the concrete value stored in the interface i. T... | [
{
"code": null,
"e": 25587,
"s": 25559,
"text": "\n03 May, 2020"
},
{
"code": null,
"e": 25975,
"s": 25587,
"text": "Go language provides inbuilt support implementation of run-time reflection and allowing a program to manipulate objects with arbitrary types with the help of refle... |
p5.js | arc() Function - GeeksforGeeks | 24 Oct, 2018
The arc() function is an inbuilt function in p5.js which is used to draw an arc. This function accepts seven parameters which are x-ordinate, y-ordinate, width, height, start, stop and an optional parameter mode.
Syntax:
arc(x, y, w, h, start, stop, mode)
Parameters: This function accepts seven parameters ... | [
{
"code": null,
"e": 44963,
"s": 44935,
"text": "\n24 Oct, 2018"
},
{
"code": null,
"e": 45176,
"s": 44963,
"text": "The arc() function is an inbuilt function in p5.js which is used to draw an arc. This function accepts seven parameters which are x-ordinate, y-ordinate, width, he... |
When should one use require_once() vs require() in PHP ? - GeeksforGeeks | 25 Aug, 2021
In this article, we will learn, when should one use the require_once() method and when to use require() method in PHP.
require() Method: PHP require() is a library or built-in function in PHP. It is generally used in situations where we want to include a file in the PHP code or program. The require() metho... | [
{
"code": null,
"e": 26217,
"s": 26189,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 26336,
"s": 26217,
"text": "In this article, we will learn, when should one use the require_once() method and when to use require() method in PHP."
},
{
"code": null,
"e": 26772,
... |
Spinner in Kotlin - GeeksforGeeks | 28 Mar, 2022
Android Spinner is a view similar to dropdown list which is used to select one option from the list of options. It provides an easy way to select one item from the list of items and it shows a dropdown list of all values when we click on it.
Default value of the android spinner will be currently selected v... | [
{
"code": null,
"e": 25414,
"s": 25386,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 25656,
"s": 25414,
"text": "Android Spinner is a view similar to dropdown list which is used to select one option from the list of options. It provides an easy way to select one item from the... |
Cmdparse module in Python - GeeksforGeeks | 28 Feb, 2022
The Class which provides a simple framework for writing line-oriented command interpreters is called cmd class. These are often useful for administrative tools, prototypes and test harnesses that will later be wrapped in a more sophisticated interface. The command-line interface can be easily made using th... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n28 Feb, 2022"
},
{
"code": null,
"e": 26015,
"s": 25537,
"text": "The Class which provides a simple framework for writing line-oriented command interpreters is called cmd class. These are often useful for administrative tools, pr... |
How to create a div element in jQuery ? - GeeksforGeeks | 17 Jul, 2019
There are various method to create HTML element inside an HTML document using JQuery. But the simplest of all is append() and prepend() method.
Method 1: Using prepend() Method: The prepend() method is used to insert a specified content at the beginning of the selected element.
Example: This example uses p... | [
{
"code": null,
"e": 26234,
"s": 26206,
"text": "\n17 Jul, 2019"
},
{
"code": null,
"e": 26378,
"s": 26234,
"text": "There are various method to create HTML element inside an HTML document using JQuery. But the simplest of all is append() and prepend() method."
},
{
"code... |
Program to multiply two matrices - GeeksforGeeks | 02 Mar, 2022
Given two matrices, the task to multiply them. Matrices can either be square or rectangular.
Examples:
(Square Matrix Multiplication)
Input : mat1[m][n] = {
{1, 1},
{2, 2}
}
mat2[n][p] = {
{1, 1},
{2, 2}
}
Output : result[m][p] = {
... | [
{
"code": null,
"e": 26571,
"s": 26543,
"text": "\n02 Mar, 2022"
},
{
"code": null,
"e": 26664,
"s": 26571,
"text": "Given two matrices, the task to multiply them. Matrices can either be square or rectangular."
},
{
"code": null,
"e": 26675,
"s": 26664,
"text"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.