title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Machine Learning Visualization. A collection of a few interesting... | by Pier Paolo Ippolito | Towards Data Science | 1
2
3
4
5
6
7
8
9
10
Powered by Play.ht
Create audio with Play.ht
Create Audio Narrations with Play.ht
As part of any Data Science project, Data Visualization plays an important part in order to learn more about the available data and to identify any main pattern.
Wouldn’t be great if it could be possible to make as vi... | [
{
"code": null,
"e": 173,
"s": 171,
"text": "1"
},
{
"code": null,
"e": 175,
"s": 173,
"text": "2"
},
{
"code": null,
"e": 177,
"s": 175,
"text": "3"
},
{
"code": null,
"e": 179,
"s": 177,
"text": "4"
},
{
"code": null,
"e": 181... |
Find my public ip address from linux command line | An IP address stands for Internet Protocol Address. Devices are assigned with specified IP Address to identify the device which are connected on internet. Public IP addresses are routable on Internet and are generally provided by an ISP (Internet service provider) which are accessible over the Internet.
Do you know how... | [
{
"code": null,
"e": 1367,
"s": 1062,
"text": "An IP address stands for Internet Protocol Address. Devices are assigned with specified IP Address to identify the device which are connected on internet. Public IP addresses are routable on Internet and are generally provided by an ISP (Internet servic... |
JavaScript Function Invocation | The function invocation is used to execute the code inside the curly braces in the function definition by adding () after function name after it has been defined to invoke that particular function.
Following is the code for implementing JavaScript function invocation −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>... | [
{
"code": null,
"e": 1260,
"s": 1062,
"text": "The function invocation is used to execute the code inside the curly braces in the function definition by adding () after function name after it has been defined to invoke that particular function."
},
{
"code": null,
"e": 1332,
"s": 126... |
How to add a new column to a matrix in R? | A data collection process is one of the initial and very important tasks in a data analysis project and sometimes we miss something. Therefore, we need to collect that data later and add it to the originally collected data. This mistake can be done for matrix data as well, hence we might need to add a new column to ori... | [
{
"code": null,
"e": 1441,
"s": 1062,
"text": "A data collection process is one of the initial and very important tasks in a data analysis project and sometimes we miss something. Therefore, we need to collect that data later and add it to the originally collected data. This mistake can be done for ... |
Is there any way to skip finally block even if some exception occurs in exception block using java? | An exception is an issue (run time error) occurred during the execution of a program. When an exception occurred the program gets terminated abruptly and, the code past the line that generated the exception never gets executed.
To handle exceptions Java provides a try-catch block mechanism.
A try/catch block is placed ... | [
{
"code": null,
"e": 1290,
"s": 1062,
"text": "An exception is an issue (run time error) occurred during the execution of a program. When an exception occurred the program gets terminated abruptly and, the code past the line that generated the exception never gets executed."
},
{
"code": nul... |
Finding Additional functional dependencies in a relation | 04 May, 2020
A functional dependency is simply a constraint between two sets of attributes from the database. A functional dependency is used in normalization. A functional dependency is denoted by an arrow → .The functional dependency of A on B is represented by A → B. Functional Dependency plays a vital role in findi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 May, 2020"
},
{
"code": null,
"e": 391,
"s": 28,
"text": "A functional dependency is simply a constraint between two sets of attributes from the database. A functional dependency is used in normalization. A functional dependency is d... |
Lowest Common Ancestor in a Binary Search Tree. | 16 Jun, 2022
Given values of two values n1 and n2 in a Binary Search Tree, find the Lowest Common Ancestor (LCA). You may assume that both the values exist in the tree.
Examples:
Tree:
Input: LCA of 10 and 14
Output: 12
Explanation: 12 is the closest node to both 10 and 14
which is a ancestor of both the nodes.
I... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 209,
"s": 52,
"text": "Given values of two values n1 and n2 in a Binary Search Tree, find the Lowest Common Ancestor (LCA). You may assume that both the values exist in the tree. "
},
{
"co... |
How to Recognize Optical Characters in Images in Python? | 17 Feb, 2022
Prerequisite: Pytesseract, OpenCV
In this article, we are going to recognize the character from the images and get text data out of an image. Let’s take a quick introduction to the required module.
OpenCV: It is a Python module in which we can do image processing, video capture, and some analysis tools lik... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Feb, 2022"
},
{
"code": null,
"e": 62,
"s": 28,
"text": "Prerequisite: Pytesseract, OpenCV"
},
{
"code": null,
"e": 226,
"s": 62,
"text": "In this article, we are going to recognize the character from the images a... |
How to rotate an image using Python? | 03 Jun, 2022
In this article, let’s see how to rotate an Image using Python. By Image Rotation, the image is rotated about its center by a specified number of degrees. The rotation of an image is a geometric transformation. It can be done either by Forward Transformation (or) Inverse Transformation.
Here Image Processi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Jun, 2022"
},
{
"code": null,
"e": 316,
"s": 28,
"text": "In this article, let’s see how to rotate an Image using Python. By Image Rotation, the image is rotated about its center by a specified number of degrees. The rotation of an i... |
Python | Decimal max() method | 17 Sep, 2019
Decimal#max() : max() is a Decimal class method which compares the two Decimal values and return the max of two.
Syntax: Decimal.max()
Parameter: Decimal values
Return: the max of two.
Code #1 : Example for max() method
# Python Program explaining # max() method # loading decimal libraryfrom decimal... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Sep, 2019"
},
{
"code": null,
"e": 141,
"s": 28,
"text": "Decimal#max() : max() is a Decimal class method which compares the two Decimal values and return the max of two."
},
{
"code": null,
"e": 219,
"s": 141,
"t... |
Program to evaluate simple expressions | 03 Nov, 2021
You are given a string that represent an expression of digits and operands. E.g. 1+2*3, 1-2+4. You need to evaluate the string or the expression. NO BODMAS is followed. If the expression is of incorrect syntax return -1. Test cases: a) 1+2*3 will be evaluated to 9. b) 4-2+6*3 will be evaluated to 24. c) 1+... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Nov, 2021"
},
{
"code": null,
"e": 913,
"s": 54,
"text": "You are given a string that represent an expression of digits and operands. E.g. 1+2*3, 1-2+4. You need to evaluate the string or the expression. NO BODMAS is followed. If th... |
Spring Boot - Thymeleaf | Thymeleaf is a Java-based library used to create a web application. It provides a good support for serving a XHTML/HTML5 in web applications. In this chapter, you will learn in detail about Thymeleaf.
Thymeleaf converts your files into well-formed XML files. It contains 6 types of templates as given below −
XML
Valid X... | [
{
"code": null,
"e": 3360,
"s": 3159,
"text": "Thymeleaf is a Java-based library used to create a web application. It provides a good support for serving a XHTML/HTML5 in web applications. In this chapter, you will learn in detail about Thymeleaf."
},
{
"code": null,
"e": 3468,
"s": ... |
Difference between Clustered and Non-clustered index | 07 Jul, 2022
Prerequisite – SQL queries on clustered and non-clustered Indexes
1. Clustered Index : Clustered index is created only when both the following conditions satisfy –
The data or file, that you are moving into secondary memory should be in sequential or sorted order.There should be a key value, meaning it c... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 121,
"s": 54,
"text": "Prerequisite – SQL queries on clustered and non-clustered Indexes "
},
{
"code": null,
"e": 220,
"s": 121,
"text": "1. Clustered Index : Clustered index i... |
The Null Object in Python | Python does not have a null object. But the most closely related similar object is none. In this article, we will see how how None behaves in Python.
Checking the type of Null and None we see that there is no Null Type and the None object is of type NoneType.
print(type(None))
print(type(Null))
Running the above code g... | [
{
"code": null,
"e": 1337,
"s": 1187,
"text": "Python does not have a null object. But the most closely related similar object is none. In this article, we will see how how None behaves in Python."
},
{
"code": null,
"e": 1447,
"s": 1337,
"text": "Checking the type of Null and No... |
HTML | draggable Attribute | 02 Jun, 2022
This attribute is used to specify whether an element is draggable or not. Links and images are by default draggable. The draggable attribute is often used in the drag and drop operations.
Supported Tags: It supports all HTML elements.
Syntax:
<element draggable = "true|false|auto">
Attribute Value: This ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n02 Jun, 2022"
},
{
"code": null,
"e": 242,
"s": 54,
"text": "This attribute is used to specify whether an element is draggable or not. Links and images are by default draggable. The draggable attribute is often used in the drag and dro... |
Online Group Chat application using PHP - GeeksforGeeks | 07 Aug, 2021
Prerequisites: Technical knowledge:
HTML
CSS
Javascript (basics)
PHP (Database connectivity)
SQL queries
Softwares to be installed:
XAMPP server: This is a free software which contains web server Apache, Database management system for MySQL (or MariaDB). It can be downloaded for free from the official site... | [
{
"code": null,
"e": 26383,
"s": 26355,
"text": "\n07 Aug, 2021"
},
{
"code": null,
"e": 26419,
"s": 26383,
"text": "Prerequisites: Technical knowledge:"
},
{
"code": null,
"e": 26424,
"s": 26419,
"text": "HTML"
},
{
"code": null,
"e": 26428,
"... |
How to Make Dark Mode for Websites using HTML CSS & JavaScript ? - GeeksforGeeks | 22 Jul, 2021
Light-on-dark color scheme, also called black mode, dark mode, dark theme, or night mode. In this mode, light-colored text, icons are displayed on a dark-colored background. In short, the contents of a webpage are displayed on a dark background. Dark-mode is better for your eyes in low-light surroundings. ... | [
{
"code": null,
"e": 26647,
"s": 26619,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 27227,
"s": 26647,
"text": "Light-on-dark color scheme, also called black mode, dark mode, dark theme, or night mode. In this mode, light-colored text, icons are displayed on a dark-colored b... |
How to use NamedTuple and Dataclass in Python? - GeeksforGeeks | 26 Jul, 2020
We have all worked with classes and objects for more than once while coding. But have you ever wondered how to create a class other than the naive methods we have all been taught. Don’t worry in this article we are going to cover these alternate methods. There are two alternative ways to construct a class ... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n26 Jul, 2020"
},
{
"code": null,
"e": 25856,
"s": 25537,
"text": "We have all worked with classes and objects for more than once while coding. But have you ever wondered how to create a class other than the naive methods we have ... |
Find Tangent at a given point on the curve - GeeksforGeeks | 24 May, 2021
Given a curve [ y = x(A – x) ], the task is to find tangent at given point (x, y) on that curve, where A, x, y are integers.Examples:
Input: A = 2, x = 2, y = 0
Output: y = -2x - 4
Since y = x(2 - x)
y = 2x - x^2 differentiate it with respect to x
dy/dx = 2 - 2x put x = 2, y = 0 in this equa... | [
{
"code": null,
"e": 26561,
"s": 26533,
"text": "\n24 May, 2021"
},
{
"code": null,
"e": 26697,
"s": 26561,
"text": "Given a curve [ y = x(A – x) ], the task is to find tangent at given point (x, y) on that curve, where A, x, y are integers.Examples: "
},
{
"code": null,... |
iomanip setbase() function in C++ with Examples - GeeksforGeeks | 10 Oct, 2019
The setbase() method of iomaip library in C++ is used to set the ios library basefield flag based on the argument specified as the parameter to this method.
Syntax:
setbase (int base)
Parameters: This method accepts base as a parameter which is the integer argument corresponding to which the base is to be... | [
{
"code": null,
"e": 25343,
"s": 25315,
"text": "\n10 Oct, 2019"
},
{
"code": null,
"e": 25500,
"s": 25343,
"text": "The setbase() method of iomaip library in C++ is used to set the ios library basefield flag based on the argument specified as the parameter to this method."
},
... |
jQuery UI datepicker onSelect Option - GeeksforGeeks | 19 Mar, 2021
jQuery UI consists of GUI widgets, visual effects, and themes implemented using jQuery, CSS, and HTML. jQuery UI is great for building UI interfaces for the webpages. The jQuery UI datepicker onSelect Option is called when the datepicker option is selected. The onSelect option holds a function that contain... | [
{
"code": null,
"e": 27144,
"s": 27116,
"text": "\n19 Mar, 2021"
},
{
"code": null,
"e": 27518,
"s": 27144,
"text": "jQuery UI consists of GUI widgets, visual effects, and themes implemented using jQuery, CSS, and HTML. jQuery UI is great for building UI interfaces for the webpag... |
Iterator Functions in Python | Set 1 - GeeksforGeeks | 22 Jan, 2022
Perquisite: Iterators in PythonPython in its definition also allows some interesting and useful iterator functions for efficient looping and making execution of the code faster. There are many build-in iterators in the module “itertools“. This module implements a number of iterator building blocks. Some us... | [
{
"code": null,
"e": 24949,
"s": 24921,
"text": "\n22 Jan, 2022"
},
{
"code": null,
"e": 25702,
"s": 24949,
"text": "Perquisite: Iterators in PythonPython in its definition also allows some interesting and useful iterator functions for efficient looping and making execution of th... |
Ruby | Array map() function - GeeksforGeeks | 06 Dec, 2019
Array#map() : map() is a Array class method which returns a new array containing the values returned by the block.
Syntax: Array.map()
Parameter: Array
Return: a new array containing the values returned by the block.
Example #1 :
# Ruby code for map() method # declaring arraya = [18, 22, 33, 3, 5, 6] # d... | [
{
"code": null,
"e": 24835,
"s": 24807,
"text": "\n06 Dec, 2019"
},
{
"code": null,
"e": 24950,
"s": 24835,
"text": "Array#map() : map() is a Array class method which returns a new array containing the values returned by the block."
},
{
"code": null,
"e": 24970,
... |
Python Arcade - Handling Keyboard Input - GeeksforGeeks | 23 Sep, 2021
In this article, we will discuss how to handle keyboard inputs in Python arcade module.
In Arcade, you can easily check which keyboard button is pressed and perform tasks according to that.
For this, we are going to use these functions:
on_key_press()
on_key_release()
Syntax:
on_key_press(symbol,modifiers... | [
{
"code": null,
"e": 25561,
"s": 25533,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 25649,
"s": 25561,
"text": "In this article, we will discuss how to handle keyboard inputs in Python arcade module."
},
{
"code": null,
"e": 25752,
"s": 25649,
"text": "In... |
Simple Calculator in Bash - GeeksforGeeks | 15 Jul, 2021
Create a simple calculator which can perform basic arithmetic operations like addition, subtraction, multiplication or division depending upon the user input in Bash.
Example:
Enter two numbers:
5.6
3.4
Enter Choice:
1. Addition
2. Subtraction
3. Multiplication
4. Division
3
5.6 * 3.4 = 19.0
Approach: ... | [
{
"code": null,
"e": 25682,
"s": 25654,
"text": "\n15 Jul, 2021"
},
{
"code": null,
"e": 25849,
"s": 25682,
"text": "Create a simple calculator which can perform basic arithmetic operations like addition, subtraction, multiplication or division depending upon the user input in Ba... |
Flutter - GetX State Management Library - GeeksforGeeks | 14 May, 2021
GetX is a fast, stable, and light state management library in flutter. There are so many State Management libraries in flutter like MobX, BLoC, Redux, Provider, etc. GetX is also a powerful micro framework and using this, we can manage states, make routing, and can perform dependency injection.
There are t... | [
{
"code": null,
"e": 25287,
"s": 25259,
"text": "\n14 May, 2021"
},
{
"code": null,
"e": 25583,
"s": 25287,
"text": "GetX is a fast, stable, and light state management library in flutter. There are so many State Management libraries in flutter like MobX, BLoC, Redux, Provider, et... |
Files size() method in Java with Examples - GeeksforGeeks | 29 Jul, 2019
size() method of java.nio.file.Files help us to get the size of a file (in bytes). This method returns the file size, in bytes by taking the path of the file as a parameter. The size may differ from the actual size on the file system due to compression, support for sparse files, or other reasons. The size ... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n29 Jul, 2019"
},
{
"code": null,
"e": 25622,
"s": 25225,
"text": "size() method of java.nio.file.Files help us to get the size of a file (in bytes). This method returns the file size, in bytes by taking the path of the file as a ... |
Iterate through LinkedHashMap using an Iterator in Java - GeeksforGeeks | 04 Jan, 2021
LinkedHashMap is a pre-defined class in java like HashMap. The only difference between LinkedHashMap and HashMap is LinkedHashMap preserve insertion order while HashMap does not preserve insertion order. The task is to iterate through a LinkedHashMap using an Iterator. We use the Iterator object to iterate... | [
{
"code": null,
"e": 25657,
"s": 25629,
"text": "\n04 Jan, 2021"
},
{
"code": null,
"e": 25990,
"s": 25657,
"text": "LinkedHashMap is a pre-defined class in java like HashMap. The only difference between LinkedHashMap and HashMap is LinkedHashMap preserve insertion order while Ha... |
Find all cliques of size K in an undirected graph - GeeksforGeeks | 25 Aug, 2021
Given an undirected graph with N nodes and E edges and a value K, the task is to print all set of nodes which form a K size clique. A clique is a complete subgraph of a graph.Examples:
Input: N = 5, edges[] = { {1, 2}, {2, 3}, {3, 1}, {4, 3}, {4, 5}, {5, 3} }, K = 3 Output: 1 2 3, 3 4 5 Explanation: Clea... | [
{
"code": null,
"e": 26245,
"s": 26217,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 26432,
"s": 26245,
"text": "Given an undirected graph with N nodes and E edges and a value K, the task is to print all set of nodes which form a K size clique. A clique is a complete subgraph... |
Python EasyGUI - Message Box - GeeksforGeeks | 11 Jun, 2021
Message Box : It is used to display a window having a message or information in EasyGUI, it can be used where there is a need to display some message or some important information, it contains message and a “Ok” button which when pressed closes the message, below is how the message box looks like
EasyGUI... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 25837,
"s": 25537,
"text": "Message Box : It is used to display a window having a message or information in EasyGUI, it can be used where there is a need to display some message or some impor... |
Triple Quotes in Python - GeeksforGeeks | 10 Aug, 2021
Spanning strings over multiple lines can be done using python’s triple quotes. It can also be used for long comments in code. Special characters like TABs, verbatim or NEWLINEs can also be used within the triple quotes. As the name suggests its syntax consists of three consecutive single or double-quotes. ... | [
{
"code": null,
"e": 25367,
"s": 25339,
"text": "\n10 Aug, 2021"
},
{
"code": null,
"e": 25675,
"s": 25367,
"text": "Spanning strings over multiple lines can be done using python’s triple quotes. It can also be used for long comments in code. Special characters like TABs, verbati... |
Insert JSON into a MySQL table? | Let us create a table and set a column value with type JSON
mysql> create table DemoTable1832
(
ListOfNames JSON
);
Query OK, 0 rows affected (0.00 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1832(ListOfNames) values('["Sam", "Mike", "Carol"]');
Query OK, 1 ro... | [
{
"code": null,
"e": 1122,
"s": 1062,
"text": "Let us create a table and set a column value with type JSON"
},
{
"code": null,
"e": 1230,
"s": 1122,
"text": "mysql> create table DemoTable1832\n (\n ListOfNames JSON\n );\nQuery OK, 0 rows affected (0.00 sec)"
},
{
... |
C# | How to get Synchronize access to the ArrayList - GeeksforGeeks | 18 Feb, 2019
ArrayList.SyncRoot Property is used to get an object which can be used to synchronize access to the ArrayList. ArrayList represents an ordered collection of an object that can be indexed individually. It is basically an alternative to an array. It also allows dynamic memory allocation, adding, searching an... | [
{
"code": null,
"e": 24748,
"s": 24720,
"text": "\n18 Feb, 2019"
},
{
"code": null,
"e": 25084,
"s": 24748,
"text": "ArrayList.SyncRoot Property is used to get an object which can be used to synchronize access to the ArrayList. ArrayList represents an ordered collection of an obj... |
ReactJS - Component Life Cycle | In React, Life cycle of a component represents the different stages of the component during its existence. React provides callback function to attach functionality in each and every stages of the React life cycle. Let us learn the life cycle (and the related API) of a React component in this chapter.
Each React compone... | [
{
"code": null,
"e": 2335,
"s": 2033,
"text": "In React, Life cycle of a component represents the different stages of the component during its existence. React provides callback function to attach functionality in each and every stages of the React life cycle. Let us learn the life cycle (and the re... |
Raster Data Scatter Plot Using Python | by Sutan Ashari Mufti | Towards Data Science | Raster data is basically an image or matrix. As an image or matrix, it is consisted of arrays and can be formed as data frames or spreadsheets. You can even visualize raster data in Adobe Photoshop or Ms. Excel! Each raster cell holds a single numeric value that can mean anything as it depends on the context. This valu... | [
{
"code": null,
"e": 606,
"s": 172,
"text": "Raster data is basically an image or matrix. As an image or matrix, it is consisted of arrays and can be formed as data frames or spreadsheets. You can even visualize raster data in Adobe Photoshop or Ms. Excel! Each raster cell holds a single numeric val... |
delete_cookie driver method - Selenium Python - GeeksforGeeks | 23 Sep, 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. To open a webpage using Selenium Python, checkout – Navigating links using get method – Selenium Python. Just being able ... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 25184,
"s": 24292,
"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... |
A Beginner’s Guide to Preprocessing Text Data Using NLP | by Nabil M Abbas | Towards Data Science | Below I’ve outlined the code I used to preprocess my Natural Language Processing projects. This code has mostly been used on tweets obtained from Twitter for classifers. My hope is that this guide assists aspiring data scientists and machine learning engineers by familiarizing them with some of the very useful NLP tool... | [
{
"code": null,
"e": 547,
"s": 172,
"text": "Below I’ve outlined the code I used to preprocess my Natural Language Processing projects. This code has mostly been used on tweets obtained from Twitter for classifers. My hope is that this guide assists aspiring data scientists and machine learning engi... |
C++ Queue Library - pop() Function | The C++ function std::queue::pop() removes front element of the queue and reduces size of the queue by one.
This member function effectively calls the pop_front member function of the underlying container.
Following is the declaration for std::queue::pop() function form std::queue header.
void pop();
None
None
Constan... | [
{
"code": null,
"e": 2711,
"s": 2603,
"text": "The C++ function std::queue::pop() removes front element of the queue and reduces size of the queue by one."
},
{
"code": null,
"e": 2809,
"s": 2711,
"text": "This member function effectively calls the pop_front member function of th... |
Drawing with Mouse on Images using Python-OpenCV - GeeksforGeeks | 17 May, 2020
OpenCV is a huge open-source library for computer vision, machine learning, and image processing. OpenCV supports a wide variety of programming languages like Python, C++, Java, etc. It can process images and videos to identify objects, faces, or even the handwriting of a human. In this article, we will tr... | [
{
"code": null,
"e": 24490,
"s": 24462,
"text": "\n17 May, 2020"
},
{
"code": null,
"e": 24941,
"s": 24490,
"text": "OpenCV is a huge open-source library for computer vision, machine learning, and image processing. OpenCV supports a wide variety of programming languages like Pyth... |
reflect.Copy() Function in Golang with Examples - GeeksforGeeks | 28 Apr, 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.Copy() Function in Golang is used to copies the contents of the source into destination until either destination has bee... | [
{
"code": null,
"e": 23865,
"s": 23837,
"text": "\n28 Apr, 2020"
},
{
"code": null,
"e": 24293,
"s": 23865,
"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... |
Angular Material - Bottom Sheet | The $mdBottomSheet, an Angular Service, is used to open a bottom sheet over the application and provides a simple promise API.
$mdBottomSheet.show(options);
Show a bottom sheet with the specified options.
* options
An options object, with the following properties −
templateUrl - {string=} − The url of an html template ... | [
{
"code": null,
"e": 2317,
"s": 2190,
"text": "The $mdBottomSheet, an Angular Service, is used to open a bottom sheet over the application and provides a simple promise API."
},
{
"code": null,
"e": 2347,
"s": 2317,
"text": "$mdBottomSheet.show(options);"
},
{
"code": nul... |
Flexbox - Align Items | The align-items property is same as justify content. But here, the items were aligned across the cross access (vertically).
Usage −
align-items: flex-start | flex-end | center | baseline | stretch;
This property accepts the following values −
flex-start − The flex items were aligned vertically at the top of the contai... | [
{
"code": null,
"e": 1935,
"s": 1811,
"text": "The align-items property is same as justify content. But here, the items were aligned across the cross access (vertically)."
},
{
"code": null,
"e": 1943,
"s": 1935,
"text": "Usage −"
},
{
"code": null,
"e": 2010,
"s"... |
How to Find DNA Binding Motifs in the Genome | Towards Data Science | If I asked you to find me a needle in a haystack, you’d oblige only out of etiquette.
If I then told you there are actually 10 needles in the haystack and they all look slightly different, rage would consume you as punched my teeth out.
This is the mission biologists face when looking for regulatory motifs. These are s... | [
{
"code": null,
"e": 133,
"s": 47,
"text": "If I asked you to find me a needle in a haystack, you’d oblige only out of etiquette."
},
{
"code": null,
"e": 284,
"s": 133,
"text": "If I then told you there are actually 10 needles in the haystack and they all look slightly different... |
Why are parenthesis used to wrap a JavaScript function call? | In JavaScript, the functions wrapped with parenthesis are called “Immediately Invoked Function Expressions" or "Self Executing Functions.
The purpose of wrapping is to namespace and control the visibility of member functions. It wraps code inside a function scope and decrease clashing with other libraries. This is what... | [
{
"code": null,
"e": 1200,
"s": 1062,
"text": "In JavaScript, the functions wrapped with parenthesis are called “Immediately Invoked Function Expressions\" or \"Self Executing Functions."
},
{
"code": null,
"e": 1476,
"s": 1200,
"text": "The purpose of wrapping is to namespace an... |
CodeIgniter - Flashdata | While building web application, we need to store some data for only one time and after that we want to remove that data. For example, to display some error message or information message. In PHP, we have to do it manually but CodeIgniter has made this job simple for us. In CodeIgniter, flashdata will only be available ... | [
{
"code": null,
"e": 2702,
"s": 2319,
"text": "While building web application, we need to store some data for only one time and after that we want to remove that data. For example, to display some error message or information message. In PHP, we have to do it manually but CodeIgniter has made this j... |
sp_help for MySQL to display field types and foreign key constraints? | In MySQL, you can achieve sp_help with the help of SHOW CREATE command.
CASE 1 −
For table, the syntax is as follows −
SHOW CREATE TABLE yourTableName;
CASE 2 −
For stored procedure, the syntax is as follows −
SHOW CREATE PROCEDURE yourProcedureName;
Let us first create a table −
mysql> create table DemoTable
(
Empl... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "In MySQL, you can achieve sp_help with the help of SHOW CREATE command."
},
{
"code": null,
"e": 1143,
"s": 1134,
"text": "CASE 1 −"
},
{
"code": null,
"e": 1181,
"s": 1143,
"text": "For table, the syntax is as fo... |
How to make Heart Fill animation in Android - GeeksforGeeks | 16 Oct, 2021
AnimatedVectorDrawable class was introduced in API 21 and is used to animate Vector Drawables beautifully and easily. Using AnimatedVectorDrawable, one can:
Rotate, Scale, Translate VectorDrawables
Animate the VectorDrawable such as fill color etc.
Draw paths and do Path Morphing
An AnimatedVectorDrawable ... | [
{
"code": null,
"e": 25528,
"s": 25500,
"text": "\n16 Oct, 2021"
},
{
"code": null,
"e": 25685,
"s": 25528,
"text": "AnimatedVectorDrawable class was introduced in API 21 and is used to animate Vector Drawables beautifully and easily. Using AnimatedVectorDrawable, one can:"
},
... |
All permutations of an array using STL in C++ - GeeksforGeeks | 27 Mar, 2019
Given an array, the task is to print or display all the permutations of this array using STL in C++.
Examples:
Input: a[] = {1, 2, 3}
Output:
1 2 3
1 3 2
2 1 3
2 3 1
3 1 2
3 2 1
Input: a[] = {10, 20, 30, 40}
Output:
10 20 30 40
10 20 40 30
10 30 20 40
10 30 40 20 ... | [
{
"code": null,
"e": 24726,
"s": 24698,
"text": "\n27 Mar, 2019"
},
{
"code": null,
"e": 24827,
"s": 24726,
"text": "Given an array, the task is to print or display all the permutations of this array using STL in C++."
},
{
"code": null,
"e": 24837,
"s": 24827,
... |
Decorator Pattern | Set 1 (Background) - GeeksforGeeks | 15 Feb, 2018
To understand decorator pattern let us consider a scenario inspired from the book “Head First Design Pattern”. Suppose we are building an application for a pizza store and we need to model their pizza classes. Assume they offer four types of pizzas namely Peppy Paneer, Farmhouse, Margherita and Chicken F... | [
{
"code": null,
"e": 24556,
"s": 24528,
"text": "\n15 Feb, 2018"
},
{
"code": null,
"e": 24964,
"s": 24556,
"text": "To understand decorator pattern let us consider a scenario inspired from the book “Head First Design Pattern”. Suppose we are building an application for a pizza ... |
How to get entered text from a textbox in selenium? | We can get the entered text from a textbox in Selenium webdriver. To obtain the value attribute of an element in the html document, we have to use the getAttribute() method. Then the value is passed as a parameter to the method.
Let us consider a textbox where we entered some text and then want to get the entered text.... | [
{
"code": null,
"e": 1291,
"s": 1062,
"text": "We can get the entered text from a textbox in Selenium webdriver. To obtain the value attribute of an element in the html document, we have to use the getAttribute() method. Then the value is passed as a parameter to the method."
},
{
"code": nu... |
Spring Boot - CORS Support | Cross-Origin Resource Sharing (CORS) is a security concept that allows restricting the resources implemented in web browsers. It prevents the JavaScript code producing or consuming the requests against different origin.
For example, your web application is running on 8080 port and by using JavaScript you are trying to ... | [
{
"code": null,
"e": 3245,
"s": 3025,
"text": "Cross-Origin Resource Sharing (CORS) is a security concept that allows restricting the resources implemented in web browsers. It prevents the JavaScript code producing or consuming the requests against different origin."
},
{
"code": null,
"... |
Does Python support multiple inheritance? | Yes,Python supports multiple inheritance
Like C++, a class can be derived from more than one base classes in Python. This is called multiple inheritance.
In multiple inheritance, the features of all the base classes are inherited into the derived class.
class Animal:
def eat(self):
print("It eats insects.")
... | [
{
"code": null,
"e": 1103,
"s": 1062,
"text": "Yes,Python supports multiple inheritance"
},
{
"code": null,
"e": 1216,
"s": 1103,
"text": "Like C++, a class can be derived from more than one base classes in Python. This is called multiple inheritance."
},
{
"code": null,
... |
Python Code for time Complexity plot of Heap Sort - GeeksforGeeks | 06 Sep, 2021
Prerequisite : HeapSort Heap sort is a comparison based sorting technique based on Binary Heap data structure. It is similar to selection sort where we first find the maximum element and place the maximum element at the end. We repeat the same process for remaining element.We implement Heap Sort here, call... | [
{
"code": null,
"e": 25020,
"s": 24992,
"text": "\n06 Sep, 2021"
},
{
"code": null,
"e": 25454,
"s": 25020,
"text": "Prerequisite : HeapSort Heap sort is a comparison based sorting technique based on Binary Heap data structure. It is similar to selection sort where we first find ... |
D3.js | d3.extent() function - GeeksforGeeks | 26 Jun, 2019
The d3.extent() function in D3.js is used to returns the minimum and maximum value in an array from the given array using natural order. If an array is empty then it returns undefined, undefined as output.
Syntax:
d3.extent(Array)
Parameters: This function accepts a parameters Array which is an array of el... | [
{
"code": null,
"e": 23831,
"s": 23803,
"text": "\n26 Jun, 2019"
},
{
"code": null,
"e": 24037,
"s": 23831,
"text": "The d3.extent() function in D3.js is used to returns the minimum and maximum value in an array from the given array using natural order. If an array is empty then ... |
How to call PHP function on the click of a Button ? - GeeksforGeeks | 23 Aug, 2019
Given a document containing HTML and PHP code and the task is to call the PHP function after clicking on the button. There are various methods to solve this problem. Also, apart from doing this with the click of a button, a PHP function can be called using Ajax, JavaScript, and JQuery. But this article mai... | [
{
"code": null,
"e": 24576,
"s": 24548,
"text": "\n23 Aug, 2019"
},
{
"code": null,
"e": 24956,
"s": 24576,
"text": "Given a document containing HTML and PHP code and the task is to call the PHP function after clicking on the button. There are various methods to solve this proble... |
How to Customize JupyterLab Keyboard Shortcuts | by Jeff Hale | Towards Data Science | I often find myself wanting to restart and run all cells, so I wanted to make a keyboard shortcut. I made this tutorial to help other folks out, because it’s not a one-click-selection kind of thing
JupyterLab is like Jupyter notebook on anabolic steroids — without the increased cancer risk and other negative side effec... | [
{
"code": null,
"e": 245,
"s": 47,
"text": "I often find myself wanting to restart and run all cells, so I wanted to make a keyboard shortcut. I made this tutorial to help other folks out, because it’s not a one-click-selection kind of thing"
},
{
"code": null,
"e": 478,
"s": 245,
... |
String indexOf(String str, int fromIndex) | This method returns the index within this string of the first occurrence of the specified substring, starting at the specified index. If it does not occur, -1 is returned.
Here is the syntax of this method −
int indexOf(String str, int fromIndex)
Here is the detail of parameters −
fromIndex − the index to start the se... | [
{
"code": null,
"e": 2549,
"s": 2377,
"text": "This method returns the index within this string of the first occurrence of the specified substring, starting at the specified index. If it does not occur, -1 is returned."
},
{
"code": null,
"e": 2585,
"s": 2549,
"text": "Here is th... |
How to extract date from string in MySQL? | To extract date from the string in MySQL, use SUBSTRING_INDEX(). Let us first create a table −
mysql> create table DemoTable
-> (
-> Title text
-> );
Query OK, 0 rows affected (0.58 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values('John has got joining date.12/31... | [
{
"code": null,
"e": 1157,
"s": 1062,
"text": "To extract date from the string in MySQL, use SUBSTRING_INDEX(). Let us first create a table −"
},
{
"code": null,
"e": 1258,
"s": 1157,
"text": "mysql> create table DemoTable\n -> (\n -> Title text\n -> );\nQuery OK, 0 rows af... |
Altering a table to add a collection data type in Cassandra - GeeksforGeeks | 13 Dec, 2019
In this article, we will discuss how we can alter a table to add MAP collection data type and how we insert data after altering the table with the help of the UPDATE command. Let’s discuss one by one.First, we are going to create a table let’s consider E_book is a table name and Bookk_name, Author_name, Se... | [
{
"code": null,
"e": 24304,
"s": 24276,
"text": "\n13 Dec, 2019"
},
{
"code": null,
"e": 24678,
"s": 24304,
"text": "In this article, we will discuss how we can alter a table to add MAP collection data type and how we insert data after altering the table with the help of the UPDA... |
Display MySQL Results as comma separated list? | We can show the result as a comma separated list with the help of the ‘concat()’ function with the parameter ‘,’.
Let us see an example now. Firstly, we will create a table. The CREATE command is used to create a table.
mysql> create table CommaSeperateDemo
- > (
- > Id int,
- > FirstName varchar(100),
- > ... | [
{
"code": null,
"e": 1176,
"s": 1062,
"text": "We can show the result as a comma separated list with the help of the ‘concat()’ function with the parameter ‘,’."
},
{
"code": null,
"e": 1282,
"s": 1176,
"text": "Let us see an example now. Firstly, we will create a table. The CREA... |
Build an Application for Changing PC's Wallpaper using Python - GeeksforGeeks | 04 Dec, 2021
Prerequisite: Python GUI – tkinter
In this article, we are going to write a script for background changing application using the py-wallpaper module in Python. The py-wallpaper module is used to change the background wallpaper. Before starting we need to install py-wallpaper.
Installation:
To install this... | [
{
"code": null,
"e": 23926,
"s": 23898,
"text": "\n04 Dec, 2021"
},
{
"code": null,
"e": 23961,
"s": 23926,
"text": "Prerequisite: Python GUI – tkinter"
},
{
"code": null,
"e": 24204,
"s": 23961,
"text": "In this article, we are going to write a script for bac... |
How to find the Eigenvalues and Eigenvectors of a square matrix using SciPy? | We can find the Eigenvalues and Eigenvectors for a square matrix, say A, with the help of following relation −
SciPy library has scipy.linalg.eig() function for computing the eigenvalues and eigenvectors of a square matrix.
Let’s understand how we can use this function to calculate the inverse of a matrix −
Eigenvalues... | [
{
"code": null,
"e": 1173,
"s": 1062,
"text": "We can find the Eigenvalues and Eigenvectors for a square matrix, say A, with the help of following relation −"
},
{
"code": null,
"e": 1286,
"s": 1173,
"text": "SciPy library has scipy.linalg.eig() function for computing the eigenva... |
C Program for compound interest - GeeksforGeeks | 07 Feb, 2018
Compound Interest formula:
Formula to calculate compound interest annually is given by:Compound Interest = P(1 + R/100)rWhere,P is principle amountR is the rate andT is the time span
Example:
Input : Principle (amount): 1200
Time: 2
Rate: 5.4
Output : Compound Interest = 1333.099243
// CPP... | [
{
"code": null,
"e": 24930,
"s": 24902,
"text": "\n07 Feb, 2018"
},
{
"code": null,
"e": 24957,
"s": 24930,
"text": "Compound Interest formula:"
},
{
"code": null,
"e": 25113,
"s": 24957,
"text": "Formula to calculate compound interest annually is given by:Com... |
Python | Pandas Dataframe.at[ ] - GeeksforGeeks | 16 Jul, 2021
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 at[] is used to return data in a dataframe at the passed location. The passed location... | [
{
"code": null,
"e": 24447,
"s": 24419,
"text": "\n16 Jul, 2021"
},
{
"code": null,
"e": 24661,
"s": 24447,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages a... |
GET method - Python requests - GeeksforGeeks | 26 Feb, 2020
Requests library is one of the important aspects of Python for making HTTP requests to a specified URL. This article revolves around how one can make GET request to a specified URL using requests.GET() method. Before checking out GET method, let’s figure out what a GET request is –
The GET method is used t... | [
{
"code": null,
"e": 24053,
"s": 24025,
"text": "\n26 Feb, 2020"
},
{
"code": null,
"e": 24336,
"s": 24053,
"text": "Requests library is one of the important aspects of Python for making HTTP requests to a specified URL. This article revolves around how one can make GET request t... |
PyQt5 QSpinBox - Getting bounding rectangle of the character - GeeksforGeeks | 26 May, 2020
In this article we will see how we can get the bounding rectangle of given character of the spin box, i.e rectangle that is covered by ink if character ‘ch’ were to be drawn at the origin of the coordinate system. The bounding rectangle may extend to the left of (0, 0) (e.g., for italicized fonts), and tha... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n26 May, 2020"
},
{
"code": null,
"e": 24333,
"s": 23901,
"text": "In this article we will see how we can get the bounding rectangle of given character of the spin box, i.e rectangle that is covered by ink if character ‘ch’ were t... |
C++ program to convert Fahrenheit to Celsius | In this program we will see how to convert Celsius to Fahrenheit using C++. As we know the formula is simple.
Begin
Take the Celsius temperature in C
calculate F = (9C/5)+32
return F
End
#include<iostream>
using namespace std;
main() {
float f, c;
cout << "Enter temperature in Celsius: ";
cin >> c;
f = (9.0... | [
{
"code": null,
"e": 1172,
"s": 1062,
"text": "In this program we will see how to convert Celsius to Fahrenheit using C++. As we know the formula is simple."
},
{
"code": null,
"e": 1249,
"s": 1172,
"text": "Begin\nTake the Celsius temperature in C\ncalculate F = (9C/5)+32\nretur... |
Can a constructor be overridden in java? | If super class and sub class have same methods including name, return type and parameters, and if you try to call it using the object of the sub class
Then the method in the sub class is invoked.
Constructor looks like method but it is not. It does not have a return type and its name is same as the class name.
But, a c... | [
{
"code": null,
"e": 1213,
"s": 1062,
"text": "If super class and sub class have same methods including name, return type and parameters, and if you try to call it using the object of the sub class"
},
{
"code": null,
"e": 1258,
"s": 1213,
"text": "Then the method in the sub clas... |
Reverse a String | Practice | GeeksforGeeks | You are given a string s. You need to reverse the string.
Example 1:
Input:
s = Geeks
Output: skeeG
Example 2:
Input:
s = for
Output: rof
Your Task:
You only need to complete the function reverseWord() that takes s as parameter and returns the reversed string.
Expected Time Complexity: O(|S|).
Expected Auxiliary Space... | [
{
"code": null,
"e": 284,
"s": 226,
"text": "You are given a string s. You need to reverse the string."
},
{
"code": null,
"e": 295,
"s": 284,
"text": "Example 1:"
},
{
"code": null,
"e": 327,
"s": 295,
"text": "Input:\ns = Geeks\nOutput: skeeG\n"
},
{
... |
How to Train a Joint Entities and Relation Extraction Classifier using BERT Transformer with spaCy 3 | by Walid Amamou | Towards Data Science | One of the most useful applications of NLP technology is information extraction from unstructured texts — contracts, financial documents, healthcare records, etc. — that enables automatic data query to derive new insights. Traditionally, named entity recognition has been widely used to identify entities inside a text a... | [
{
"code": null,
"e": 970,
"s": 171,
"text": "One of the most useful applications of NLP technology is information extraction from unstructured texts — contracts, financial documents, healthcare records, etc. — that enables automatic data query to derive new insights. Traditionally, named entity reco... |
How to use Lua Programming to check if a file exists? | Lua provides us with different functions and methods that we can use when we want to work with files. These methods or functions do different operations, like from opening a file, to closing a file, to opening a file with a specific mode also.
While many of these functions that Lua provides to work with files, two of t... | [
{
"code": null,
"e": 1306,
"s": 1062,
"text": "Lua provides us with different functions and methods that we can use when we want to work with files. These methods or functions do different operations, like from opening a file, to closing a file, to opening a file with a specific mode also."
},
{... |
How to check if android editText is empty? | This example demonstrates how do I check if android editText is empty.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
... | [
{
"code": null,
"e": 1133,
"s": 1062,
"text": "This example demonstrates how do I check if android editText is empty."
},
{
"code": null,
"e": 1262,
"s": 1133,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to crea... |
Rename all tables and columns to lower case in MySQL? | You can achieve this with the help of INFORMATION_SCHEMA.COLUMNS. The syntax is as follows −
SELECT CONCAT('ALTER TABLE ', TABLE_NAME, ' CHANGE `', COLUMN_NAME, '` `',
LOWER(COLUMN_NAME), '` ', COLUMN_TYPE, ';') AS anyAliasName
FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = ‘yourDatabaseName’;
Now use the databas... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "You can achieve this with the help of INFORMATION_SCHEMA.COLUMNS. The syntax is as follows −"
},
{
"code": null,
"e": 1363,
"s": 1155,
"text": "SELECT CONCAT('ALTER TABLE ', TABLE_NAME, ' CHANGE `', COLUMN_NAME, '` `',\nLOWER(COLUMN_... |
Search in a SortedList object in C# | To search in a SortedList object, the code is as follows −
Live Demo
using System;
using System.Collections;
public class Demo {
public static void Main() {
SortedList list = new SortedList();
list.Add("1", "One");
list.Add("2", "Two");
list.Add("3", "Three");
list.Add("4", "Four");
... | [
{
"code": null,
"e": 1121,
"s": 1062,
"text": "To search in a SortedList object, the code is as follows −"
},
{
"code": null,
"e": 1132,
"s": 1121,
"text": " Live Demo"
},
{
"code": null,
"e": 1952,
"s": 1132,
"text": "using System;\nusing System.Collections;\... |
How to pass the individual members as arguments to function using structure elements? | There are three ways by which the values of structure can be transferred from one function to another. They are as follows −
Passing individual members as arguments to function.
Passing entire structure as an argument to function.
Passing the address of structure as an argument to function.
Now let’s see how to pass an... | [
{
"code": null,
"e": 1187,
"s": 1062,
"text": "There are three ways by which the values of structure can be transferred from one function to another. They are as follows −"
},
{
"code": null,
"e": 1240,
"s": 1187,
"text": "Passing individual members as arguments to function."
}... |
Operations on Vectors in R - GeeksforGeeks | 25 Jan, 2022
Vectors are the most basic data types in R. Even a single object created is also stored in the form of a vector. Vectors are nothing but arrays as defined in other languages. Vectors contain a sequence of homogeneous types of data. If mixed values are given then it auto converts the data according to the p... | [
{
"code": null,
"e": 24518,
"s": 24490,
"text": "\n25 Jan, 2022"
},
{
"code": null,
"e": 24906,
"s": 24518,
"text": "Vectors are the most basic data types in R. Even a single object created is also stored in the form of a vector. Vectors are nothing but arrays as defined in other... |
Uber Interview Experience for SDE-1 | Off-Campus 2021 - GeeksforGeeks | 06 Jul, 2021
Uber started an off-campus drive in the first week of June. I got a referral through a college pass-out. After a week, I got the test link for the online coding round.
Online Coding Round(60 minutes): There were four coding questions(some students got three questions). The test was conducted on the CodeSig... | [
{
"code": null,
"e": 24903,
"s": 24875,
"text": "\n06 Jul, 2021"
},
{
"code": null,
"e": 25071,
"s": 24903,
"text": "Uber started an off-campus drive in the first week of June. I got a referral through a college pass-out. After a week, I got the test link for the online coding ro... |
C++ Program to find the median of two sorted arrays using binary search approach | We shall develop a C++ program to find the median of two sorted arrays using Binary Search approach.
Begin
Function median() with both the arrays and the start and end indexes of each array, which have two arrays and their respective elements as argument.
A) first calculate the array length as e1 - s1, here e1... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "We shall develop a C++ program to find the median of two sorted arrays using Binary Search approach."
},
{
"code": null,
"e": 2011,
"s": 1163,
"text": "Begin\n Function median() with both the arrays and the start and end indexes of... |
How to loop through all the iframes elements of a page using jQuery? | To loop through all the iframes element of a page, use the jQuery each() method. You can try to run the following code to learn how to loop through all iframes. We have created three iframes below −
Live Demo
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "To loop through all the iframes element of a page, use the jQuery each() method. You can try to run the following code to learn how to loop through all iframes. We have created three iframes below −"
},
{
"code": null,
"e": 1271,
"s": 12... |
Implementing String Comparison in MongoDB? | To implement string comparison in MongoDB, use $strcasecmp. It performs case-insensitive comparison of two strings. It returns −
1 if first string is “greater than” the second string.
1 if first string is “greater than” the second string.
0 if the two strings are equal.
0 if the two strings are equal.
-1 if the first s... | [
{
"code": null,
"e": 1191,
"s": 1062,
"text": "To implement string comparison in MongoDB, use $strcasecmp. It performs case-insensitive comparison of two strings. It returns −"
},
{
"code": null,
"e": 1246,
"s": 1191,
"text": "1 if first string is “greater than” the second string... |
Console.ReadKey() Method in C# - GeeksforGeeks | 17 Feb, 2020
Console.ReadKey() Method makes the program wait for a key press and it prevents the screen until a key is pressed. In short, it obtains the next character or any key pressed by the user. The pressed key is displayed in the console window(if any input process will happen). There are two methods in the overl... | [
{
"code": null,
"e": 25006,
"s": 24978,
"text": "\n17 Feb, 2020"
},
{
"code": null,
"e": 25349,
"s": 25006,
"text": "Console.ReadKey() Method makes the program wait for a key press and it prevents the screen until a key is pressed. In short, it obtains the next character or any k... |
C# | How to perform a specified action on each element of the List | 01 Feb, 2019
List<T>.ForEach(Action<T>) Method is used to perform a specified action on each element of the List<T>.
Properties of List:
It is different from the arrays. A list can be resized dynamically but arrays cannot.
List class can accept null as a valid value for reference types and it also allows duplicate elem... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 132,
"s": 28,
"text": "List<T>.ForEach(Action<T>) Method is used to perform a specified action on each element of the List<T>."
},
{
"code": null,
"e": 152,
"s": 132,
"text": "Pr... |
JavaScript RangeError – Invalid array length | 18 Jul, 2020
This JavaScript exception Invalid array length occurs when creating an Array or an ArrayBuffer of the array length either negative or greater than or equal to 232. It can also occur if the length property is set manually to a value either negative or greater than equal to 232.
Message:
RangeError: Array le... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jul, 2020"
},
{
"code": null,
"e": 306,
"s": 28,
"text": "This JavaScript exception Invalid array length occurs when creating an Array or an ArrayBuffer of the array length either negative or greater than or equal to 232. It can also... |
Multiset Interface | Guava | Java | 18 May, 2018
Introduction : Multiset is a collection that supports order-independent equality, like Set, but may have duplicate elements. We might think that a Multiset is a List then, but it is not so.
Lists can hold duplicates of the same object, and Lists are always ordered.
Sets can’t hold duplicates, and there’s n... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n18 May, 2018"
},
{
"code": null,
"e": 242,
"s": 52,
"text": "Introduction : Multiset is a collection that supports order-independent equality, like Set, but may have duplicate elements. We might think that a Multiset is a List then, bu... |
ReactJS Evergreen Filepicker Component | 05 Jun, 2021
React Evergreen is a popular front-end library with a set of React components for building beautiful products as this library is flexible, sensible defaults, and User friendly. Filepicker Component allows the user to select one or multiple files from the file system. We can use the following approach in Re... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Jun, 2021"
},
{
"code": null,
"e": 384,
"s": 28,
"text": "React Evergreen is a popular front-end library with a set of React components for building beautiful products as this library is flexible, sensible defaults, and User friendly... |
Why Node.js doesn’t see files in node_modules folder ? | 18 Apr, 2021
Sometimes developers want to serve some static asset from node_modules. Usually, we don’t want to expose any of your internal paths to the outside world. If your files are in the node_modules directory then you can make a static route in your server that fetches its files from whatever directory you specif... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Apr, 2021"
},
{
"code": null,
"e": 339,
"s": 28,
"text": "Sometimes developers want to serve some static asset from node_modules. Usually, we don’t want to expose any of your internal paths to the outside world. If your files are in ... |
Python OpenCV – Getting and Setting Pixels | 03 Nov, 2021
In this article, we will discuss Getting and Setting Pixels through OpenCV in Python.
Image is made up of pixels. A pixel will be denoted as an array. The 3 integers represent the intensity of red, green, blue in the same order. Eg. [0,0,0] in RGB mode represent black color. There are other modes as well-... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Nov, 2021"
},
{
"code": null,
"e": 115,
"s": 28,
"text": "In this article, we will discuss Getting and Setting Pixels through OpenCV in Python. "
},
{
"code": null,
"e": 336,
"s": 115,
"text": "Image is made up of... |
Count of Pairs in given Array having both even or both odd or sum as K | 25 Jan, 2022
Given an array arr[] of distinct integers of size N and an integer K, The task is to find the total no of possible pairs in the array such that, either both are even or both are odd or the sum of the pair is K
Note: No element is part of more than one pair.
Examples:
Input: N = 6, K = 7, arr[] = {1, 2, 3, ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Jan, 2022"
},
{
"code": null,
"e": 238,
"s": 28,
"text": "Given an array arr[] of distinct integers of size N and an integer K, The task is to find the total no of possible pairs in the array such that, either both are even or both a... |
Integrating Lua in C++ | 19 Apr, 2021
Lua is a high-level, multi-paradigm programming language, mainly used in embedded applications as well as powerful scripting support for existing products. For Example Scripting enhancement of an NGINX, HA Proxy, Wireshark, etc. Another major area where Lua had found application is the game engine framewor... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Apr, 2021"
},
{
"code": null,
"e": 339,
"s": 28,
"text": "Lua is a high-level, multi-paradigm programming language, mainly used in embedded applications as well as powerful scripting support for existing products. For Example Scripti... |
Flutter – UI Orientation | 16 Oct, 2020
All applications should be able to adjust their User Interface (UI) based on the orientation of the phone. By orientation, we implicate the portrait and landscape mode in smartphones rather the physical orientation. In, Flutter it is done so by using the OrientationBuilder, which determines the app’s curre... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Oct, 2020"
},
{
"code": null,
"e": 466,
"s": 28,
"text": "All applications should be able to adjust their User Interface (UI) based on the orientation of the phone. By orientation, we implicate the portrait and landscape mode in smar... |
Sum of square of first n odd numbers | 13 Jun, 2022
Given a number n, find sum of square of first n odd natural numbers.
Examples :
Input : 3
Output : 35
12 + 32 + 52 = 35
Input : 8
Output : 680
12 + 32 + 52 + 72 + 92 + 112 + 132 + 152
A simple solution is to traverse through n odd numbers and find the sum of square.
Below is the implementation of the ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 121,
"s": 52,
"text": "Given a number n, find sum of square of first n odd natural numbers."
},
{
"code": null,
"e": 133,
"s": 121,
"text": "Examples : "
},
{
"code": nu... |
Understanding Chebyshev’s inequality with an example | 08 Apr, 2021
In this article, we will discuss the overview of Chebyshev’s inequality algorithm, and will cover the Understanding Chebyshev’s inequality with an example. Pre-requisite is to go to given below link to understand Markov’s theorem to get more deep mathematical insights behind the Chebyshev’s inequality, and... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Apr, 2021"
},
{
"code": null,
"e": 401,
"s": 52,
"text": "In this article, we will discuss the overview of Chebyshev’s inequality algorithm, and will cover the Understanding Chebyshev’s inequality with an example. Pre-requisite is t... |
Pyperclip module in Python | 27 Feb, 2020
Pyperclip is a cross-platform Python module for copy and paste clipboard functions. It works with both Python 2 and 3. This module was created to enable cross-platform copy-pasting in Python which was earlier absent. The pyperclip module has copy() and paste() functions that can send text to and receive te... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n27 Feb, 2020"
},
{
"code": null,
"e": 530,
"s": 53,
"text": "Pyperclip is a cross-platform Python module for copy and paste clipboard functions. It works with both Python 2 and 3. This module was created to enable cross-platform copy-p... |
How to display errors in PHP file? | A PHP application produces many levels of errors during the runtime of the script . So in this article, we will learn how to display all the errors and warning messages.
The quickest way to display all php errors and warnings is to add these lines to your PHP code file:
ini_set('display_errors', 1);
ini_set('display_st... | [
{
"code": null,
"e": 1357,
"s": 1187,
"text": "A PHP application produces many levels of errors during the runtime of the script . So in this article, we will learn how to display all the errors and warning messages."
},
{
"code": null,
"e": 1458,
"s": 1357,
"text": "The quickest... |
How to Install Geopandas on Windows? | 22 Sep, 2021
Geopandas is a Python library used to add geographical data to pandas as an object. In this article, we will look into the process of installing Geopandas on a windows machine.
The only thing that you need for installing Numpy on Windows are:
Python
PIP or Conda (depending upon user preference)
If you wa... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Sep, 2021"
},
{
"code": null,
"e": 206,
"s": 28,
"text": "Geopandas is a Python library used to add geographical data to pandas as an object. In this article, we will look into the process of installing Geopandas on a windows machin... |
How to Use Google Cloud Function with Python ? | 13 Aug, 2021
In this article, we will look into how to use the Google Cloud Function with python on any website.
To do so follow the below steps:
Step 1: Let’s first head to the functions manager site on Google Cloud Platform (GCP). It should look like below:
Function manager site
Step 2: Now let’s create our function... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Aug, 2021"
},
{
"code": null,
"e": 129,
"s": 28,
"text": "In this article, we will look into how to use the Google Cloud Function with python on any website. "
},
{
"code": null,
"e": 162,
"s": 129,
"text": "To do... |
Difference between SSH and Telnet | 15 Jun, 2022
If you have been using a linux distro for quite long time now and you are not a newbie at linux anymore then you might have come across the terms like SSH and telnet. They are pretty similar when it comes to facility they provide but did SSH come into play when Telnet already existed?
SSH or Secure SHell... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n15 Jun, 2022"
},
{
"code": null,
"e": 342,
"s": 54,
"text": "If you have been using a linux distro for quite long time now and you are not a newbie at linux anymore then you might have come across the terms like SSH and telnet. They ar... |
Themes in PySimpleGUI | 17 May, 2020
Themes are used for designing Beautiful windows. It gives the user a choice to showcase his creativity on the GUI with colors. Coloring the GUI window can be accomplished with 1 line of code.
sg.theme('Dark Amber 5')
Note: Dark Amber is the name of the Theme and 5 is the version or the patch.
We make a ca... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 May, 2020"
},
{
"code": null,
"e": 220,
"s": 28,
"text": "Themes are used for designing Beautiful windows. It gives the user a choice to showcase his creativity on the GUI with colors. Coloring the GUI window can be accomplished with... |
Print all array elements appearing more than N / K times | 11 Mar, 2022
Given an array arr[] of size N and an integer K, the task is to find all the array elements that appear more than (N / K) times.
Examples:
Input: arr[] = { 1, 2, 6, 6, 6, 6, 6, 10 }, K = 4Output: 6Explanation: The frequency of 6 in the array is greater than N / K(= 2). Therefore, the required output is 6.
... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Mar, 2022"
},
{
"code": null,
"e": 183,
"s": 54,
"text": "Given an array arr[] of size N and an integer K, the task is to find all the array elements that appear more than (N / K) times."
},
{
"code": null,
"e": 193,
... |
turtle.right() method in Python | 16 Jul, 2020
The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support.
The turtle.right() method is used to change the direction of the turtle by the value of th... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n16 Jul, 2020"
},
{
"code": null,
"e": 270,
"s": 53,
"text": "The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a ve... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.