title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to convert python tuple into a two-dimensional table? | If you have a numeric library like numpy available, you should use the reshape method to reshape the tuple to a multidimensional array.
import numpy
data = numpy.array(range(1,10))
data.reshape([3,3])
print(data)
This will give the output −
array([[1, 2, 3],
[4, 5, 6],
[7, 8, 9]])
If you prefer to do it ... | [
{
"code": null,
"e": 1199,
"s": 1062,
"text": "If you have a numeric library like numpy available, you should use the reshape method to reshape the tuple to a multidimensional array. "
},
{
"code": null,
"e": 1276,
"s": 1199,
"text": "import numpy\ndata = numpy.array(range(1,10))... |
Python Environment Setup for Deep Learning on Windows 10 | by Tamim Mirza | Towards Data Science | A detailed introduction on how to get started with Deep Learning starting with enabling an environment suited to it on the Microsoft Windows 10. The frameworks to be installed will be Keras API with Google’s TensorFlow GPU version as the back end engine.
This guide is the same procedure I had utilized during my own dee... | [
{
"code": null,
"e": 301,
"s": 46,
"text": "A detailed introduction on how to get started with Deep Learning starting with enabling an environment suited to it on the Microsoft Windows 10. The frameworks to be installed will be Keras API with Google’s TensorFlow GPU version as the back end engine."
... |
How to handle frame in Selenium WebDriver using java? | We can handle frames in Selenium webdriver. A frame is identified with <frame> tag in the html document. A frame is used to insert an HTML document inside another HTML document.
To work with frames, we should first understand switching between frames and identify the frame to which we want to move. There are multiple w... | [
{
"code": null,
"e": 1240,
"s": 1062,
"text": "We can handle frames in Selenium webdriver. A frame is identified with <frame> tag in the html document. A frame is used to insert an HTML document inside another HTML document."
},
{
"code": null,
"e": 1408,
"s": 1240,
"text": "To w... |
Java ResultSet beforeFirst() method with example | When we execute certain SQL queries (SELECT query in general) they return tabular data.
The java.sql.ResultSet interface represents such tabular data returned by the SQL statements.
i.e. the ResultSet object holds the tabular data returned by the methods that execute the statements which quires the database (executeQue... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "When we execute certain SQL queries (SELECT query in general) they return tabular data."
},
{
"code": null,
"e": 1244,
"s": 1150,
"text": "The java.sql.ResultSet interface represents such tabular data returned by the SQL statements."... |
Git - Stash Operation | Suppose you are implementing a new feature for your product. Your code is in progress and suddenly a customer escalation comes. Because of this, you have to keep aside your new feature work for a few hours. You cannot commit your partial code and also cannot throw away your changes. So you need some temporary space, wh... | [
{
"code": null,
"e": 2428,
"s": 2045,
"text": "Suppose you are implementing a new feature for your product. Your code is in progress and suddenly a customer escalation comes. Because of this, you have to keep aside your new feature work for a few hours. You cannot commit your partial code and also c... |
C program to store the car information using dynamic linked list. | Linked lists use dynamic memory allocation i.e. they grow and shrink accordingly. It is collection of nodes.
Node has two parts which are as follows −
Data
Link
The types of linked lists in C programming language are as follows −
Single / Singly linked lists
Double / Doubly linked lists
Circular single linked list
Circ... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "Linked lists use dynamic memory allocation i.e. they grow and shrink accordingly. It is collection of nodes."
},
{
"code": null,
"e": 1213,
"s": 1171,
"text": "Node has two parts which are as follows −"
},
{
"code": null,
... |
numpy.pad() function in Python | 01 Oct, 2020
numpy.pad() function is used to pad the Numpy arrays. Sometimes there is a need to perform padding in Numpy arrays, then numPy.pad() function is used. The function returns the padded array of rank equal to the given array and the shape will increase according to pad_width.
Syntax: numpy.pad(array, pad_widt... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 327,
"s": 53,
"text": "numpy.pad() function is used to pad the Numpy arrays. Sometimes there is a need to perform padding in Numpy arrays, then numPy.pad() function is used. The function returns th... |
Python – Split String on all punctuations | 02 Sep, 2020
Given a String, Split the String on all the punctuations.
Input : test_str = ‘geeksforgeeks! is-best’Output : [‘geeksforgeeks’, ‘!’, ‘is’, ‘-‘, ‘best’]Explanation : Splits on ‘!’ and ‘-‘.
Input : test_str = ‘geek-sfo, rgeeks! is-best’Output : [‘geek’, ‘-‘, ‘sfo’, ‘, ‘, ‘rgeeks’, ‘!’, ‘is’, ‘-‘, ‘best’]Expl... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 86,
"s": 28,
"text": "Given a String, Split the String on all the punctuations."
},
{
"code": null,
"e": 216,
"s": 86,
"text": "Input : test_str = ‘geeksforgeeks! is-best’Output ... |
Python | Combine two dictionary adding values for common keys | 31 Mar, 2022
Given two dictionary, the task is to combine the dictionaries such that we get the added values for common keys in resultant dictionary. Example:
Input: dict1 = {'a': 12, 'for': 25, 'c': 9}
dict2 = {'Geeks': 100, 'geek': 200, 'for': 300}
Output: {'for': 325, 'Geeks': 100, 'geek': 200}
Let’s see s... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n31 Mar, 2022"
},
{
"code": null,
"e": 202,
"s": 54,
"text": "Given two dictionary, the task is to combine the dictionaries such that we get the added values for common keys in resultant dictionary. Example: "
},
{
"code": null... |
Wrapper Classes in Java | 06 Aug, 2020
A Wrapper class is a class whose object wraps or contains primitive data types. When we create an object to a wrapper class, it contains a field and in this field, we can store primitive data types. In other words, we can wrap a primitive value into a wrapper class object.
Need of Wrapper Classes
They conv... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Aug, 2020"
},
{
"code": null,
"e": 328,
"s": 54,
"text": "A Wrapper class is a class whose object wraps or contains primitive data types. When we create an object to a wrapper class, it contains a field and in this field, we can sto... |
Phishing Attack | 29 Dec, 2020
Phishing is a type of cybersecurity attack that attempts to obtain data that are sensitive like Username, Password, and more. It attacks the user through mail, text, or direct messages. Now the attachment sends by the attacker is opened by the user because the user thinks that the email, text, messages cam... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 777,
"s": 52,
"text": "Phishing is a type of cybersecurity attack that attempts to obtain data that are sensitive like Username, Password, and more. It attacks the user through mail, text, or direc... |
Python – Group Similar keys in dictionary | 22 Apr, 2020
Sometimes while working with dictionary data, we can have problems in which we need to perform grouping based on substring of keys and reform the data grouped on similar keys. This can have application in data preprocessing. Lets discuss certain ways in which this task can be performed.
Method #1 : Using l... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 316,
"s": 28,
"text": "Sometimes while working with dictionary data, we can have problems in which we need to perform grouping based on substring of keys and reform the data grouped on similar keys.... |
HTML | onload Event Attribute | 08 Aug, 2021
This attribute works when an object has been loaded. This attribute mostly used within the <body> element to execute a script. It can be used with other elements as well. This attribute is used to check the visitor’s browser type and browser version, and load the proper version of the web page based on the... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n08 Aug, 2021"
},
{
"code": null,
"e": 390,
"s": 53,
"text": "This attribute works when an object has been loaded. This attribute mostly used within the <body> element to execute a script. It can be used with other elements as well. Thi... |
WebGL - Modes of Drawing | In the previous chapter (Chapter 12), we discussed how to draw a triangle using WebGL. In addition to triangles, WebGL supports various other drawing modes. This chapter explains the drawing modes supported by WebGL.
Let’s take a look at the syntax of the methods − drawElements() and draw Arrays().
void drawElements(en... | [
{
"code": null,
"e": 2398,
"s": 2181,
"text": "In the previous chapter (Chapter 12), we discussed how to draw a triangle using WebGL. In addition to triangles, WebGL supports various other drawing modes. This chapter explains the drawing modes supported by WebGL."
},
{
"code": null,
"e":... |
Python @staticmethod | 21 Nov, 2019
There can be some functionality that relates to the class, but does not require any instance(s) to do some work, static methods can be used in such cases. A static method is a method which is bound to the class and not the object of the class. It can’t access or modify class state. It is present in a class... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Nov, 2019"
},
{
"code": null,
"e": 483,
"s": 52,
"text": "There can be some functionality that relates to the class, but does not require any instance(s) to do some work, static methods can be used in such cases. A static method is ... |
Launch Website URL shortcut using Python | 14 Sep, 2021
In this article, we are going to launch favorite websites using shortcuts, for this, we will use Python’s sqlite3 and webbrowser modules to launch your favorite websites using shortcuts.
Both sqlite3 and webbrowser are a part of the python standard library, so we don’t need to install anything separately. ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 241,
"s": 54,
"text": "In this article, we are going to launch favorite websites using shortcuts, for this, we will use Python’s sqlite3 and webbrowser modules to launch your favorite websites usin... |
SQL - INTERSECT Clause | The SQL INTERSECT clause/operator is used to combine two SELECT statements, but returns rows only from the first SELECT statement that are identical to a row in the second SELECT statement. This means INTERSECT returns only common rows returned by the two SELECT statements.
Just as with the UNION operator, the same rul... | [
{
"code": null,
"e": 2862,
"s": 2587,
"text": "The SQL INTERSECT clause/operator is used to combine two SELECT statements, but returns rows only from the first SELECT statement that are identical to a row in the second SELECT statement. This means INTERSECT returns only common rows returned by the t... |
subfinder Tool in Linux | 25 Jan, 2021
subfinder is a subdomain enumeration tool written in the Go programming language. Subfinder is used for discovering passive subdomains of websites by using digital sources like Censys, Chaos, Recon.dev, Shodan, Spyse, Virustotal, and many other passive online sources. Subfinder is widely used by Ethical Ha... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Jan, 2021"
},
{
"code": null,
"e": 438,
"s": 28,
"text": "subfinder is a subdomain enumeration tool written in the Go programming language. Subfinder is used for discovering passive subdomains of websites by using digital sources lik... |
Python – Measure time taken by program to execute | 26 May, 2020
This article aims to show how to measure the time taken by the program to execute. Calculating time helps to optimize your Python script to perform better.
Approach #1 :A simple solution to it is to use time module to get the current time. The following steps calculate the running time of a program or sect... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 May, 2020"
},
{
"code": null,
"e": 208,
"s": 52,
"text": "This article aims to show how to measure the time taken by the program to execute. Calculating time helps to optimize your Python script to perform better."
},
{
"cod... |
Math.round() function in JavaScript | The round() function of the Math object accepts a floating point random number and returns its nearest integer value.
If the given number is x.5 or more this function returns the next number (x+1)
If the given number is x.4 or less this function returns the previous number (x-1).
If the given number itself is an intege... | [
{
"code": null,
"e": 1305,
"s": 1187,
"text": "The round() function of the Math object accepts a floating point random number and returns its nearest integer value."
},
{
"code": null,
"e": 1384,
"s": 1305,
"text": "If the given number is x.5 or more this function returns the nex... |
Clone a Directed Acyclic Graph | 27 Jan, 2022
A directed acyclic graph (DAG) is a graph which doesn’t contain a cycle and has directed edges. We are given a DAG, we need to clone it, i.e., create another graph that has copy of its vertices and edges connecting them.
Examples:
Input :
0 - - - > 1 - - - -> 4
| / \ ^
| / \ ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 275,
"s": 54,
"text": "A directed acyclic graph (DAG) is a graph which doesn’t contain a cycle and has directed edges. We are given a DAG, we need to clone it, i.e., create another graph that has c... |
TextField – Django Models | 12 Feb, 2020
TextField is a large text field for large-sized text. TextField is generally used for storing paragraphs and all other text data. The default form widget for this field is TextArea.
Syntax –
field_name = models.TextField( **options)
Illustration of TextField using an Example. Consider a project named geeks... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n12 Feb, 2020"
},
{
"code": null,
"e": 235,
"s": 53,
"text": "TextField is a large text field for large-sized text. TextField is generally used for storing paragraphs and all other text data. The default form widget for this field is Te... |
C# | Dictionary Class | 01 Sep, 2021
The Dictionary<TKey, TValue> Class in C# is a collection of Keys and Values. It is a generic collection class in the System.Collections.Generic namespace. The Dictionary <TKey, TValue> generic class provides a mapping from a set of keys to a set of values. Each addition to the dictionary consists of a valu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Sep, 2021"
},
{
"code": null,
"e": 591,
"s": 28,
"text": "The Dictionary<TKey, TValue> Class in C# is a collection of Keys and Values. It is a generic collection class in the System.Collections.Generic namespace. The Dictionary <TKey... |
LinkedHashSet in Java with Examples | 04 Mar, 2022
The LinkedHashSet is an ordered version of HashSet that maintains a doubly-linked List across all elements. When the iteration order is needed to be maintained this class is used. When iterating through a HashSet the order is unpredictable, while a LinkedHashSet lets us iterate through the elements in the ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Mar, 2022"
},
{
"code": null,
"e": 520,
"s": 52,
"text": "The LinkedHashSet is an ordered version of HashSet that maintains a doubly-linked List across all elements. When the iteration order is needed to be maintained this class is ... |
How to convert a PDF document to a preview image in PHP? | 22 Sep, 2021
Converting a PDF document into a set of images may not sound that fun, but it can have a few applications. As the content from images cannot be copied that easily, the conversion makes the document strictly ‘read-only’ and brings an extra layer of protection from plagiarism. The images may also come in han... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Sep, 2021"
},
{
"code": null,
"e": 1097,
"s": 28,
"text": "Converting a PDF document into a set of images may not sound that fun, but it can have a few applications. As the content from images cannot be copied that easily, the conver... |
Prune-and-Search | A Complexity Analysis Overview | 19 Jul, 2021
The word “prune” means to reduce something by removing things that are not necessary. So, Prune-and-Search is an excellent algorithmic paradigm for solving various optimization problems. This approach was first suggested by Nimrod Megiddo in 1983. This approach always consists of several iterations. At eac... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jul, 2021"
},
{
"code": null,
"e": 485,
"s": 28,
"text": "The word “prune” means to reduce something by removing things that are not necessary. So, Prune-and-Search is an excellent algorithmic paradigm for solving various optimizatio... |
Kotlin - Basic Syntax | An entry point of a Kotlin application is the main() function. A function can be defined as a block of code designed to perform a particular task.
Let's start with a basic Kotlin program to print "Hello, World!" on the standard output:
fun main() {
var string: String = "Hello, World!"
println("$string")
}
When ... | [
{
"code": null,
"e": 2572,
"s": 2425,
"text": "An entry point of a Kotlin application is the main() function. A function can be defined as a block of code designed to perform a particular task."
},
{
"code": null,
"e": 2661,
"s": 2572,
"text": "Let's start with a basic Kotlin pro... |
Solidity - do...while loop | The do...while loop is similar to the while loop except that the condition check happens at the end of the loop. This means that the loop will always be executed at least once, even if the condition is false.
The flow chart of a do-while loop would be as follows −
The syntax for do-while loop in Solidity is as follows ... | [
{
"code": null,
"e": 2764,
"s": 2555,
"text": "The do...while loop is similar to the while loop except that the condition check happens at the end of the loop. This means that the loop will always be executed at least once, even if the condition is false."
},
{
"code": null,
"e": 2820,
... |
CSS - Rotate In Effect | It provides to move or cause to move in a circle round an axis or centre.
@keyframes rotateIn {
0% {
transform-origin: center center;
transform: rotate(-200deg);
opacity: 0;
}
100% {
transform-origin: center center;
transform: rotate(0);
opacity: 1;
}
}
Transform − Tran... | [
{
"code": null,
"e": 2700,
"s": 2626,
"text": "It provides to move or cause to move in a circle round an axis or centre."
},
{
"code": null,
"e": 2930,
"s": 2700,
"text": "@keyframes rotateIn {\n 0% {\n transform-origin: center center;\n transform: rotate(-200deg);\n ... |
OVER 100 Data Scientist Interview Questions and Answers! | by Terence Shin | Towards Data Science | I know this is long...
Really long. But don’t be intimidated by the length — I have broken this down into four sections (machine learning, stats, SQL, miscellaneous) so that you can go through this bit by bit.
Think of this as a workbook or a crash course filled with hundreds of data science interview questions that yo... | [
{
"code": null,
"e": 195,
"s": 172,
"text": "I know this is long..."
},
{
"code": null,
"e": 382,
"s": 195,
"text": "Really long. But don’t be intimidated by the length — I have broken this down into four sections (machine learning, stats, SQL, miscellaneous) so that you can go t... |
JavaFX | Polygon with examples - GeeksforGeeks | 25 Oct, 2019
Polygon is a part of the JavaFX library. Polygon class creates a polygon with the given set of x and y coordinates. Polygon class inherits the shape class.
Constructors of the class are:
Polygon(): creates a empty polygon with no set of defined coordinates of points(vertices)Polygon(double points[])creates... | [
{
"code": null,
"e": 24073,
"s": 24045,
"text": "\n25 Oct, 2019"
},
{
"code": null,
"e": 24229,
"s": 24073,
"text": "Polygon is a part of the JavaFX library. Polygon class creates a polygon with the given set of x and y coordinates. Polygon class inherits the shape class."
},
... |
Primality Test | Set 4 (Solovay-Strassen) - GeeksforGeeks | 19 May, 2021
We have already been introduced to primality testing in the previous articles in this series.
Primality Test | Set 1 (Introduction and School Method)
Primality Test | Set 2 (Fermat Method)
Primality Test | Set 3 (Miller–Rabin)
The Solovay–Strassen primality test is a probabilistic test to determine if a n... | [
{
"code": null,
"e": 24692,
"s": 24664,
"text": "\n19 May, 2021"
},
{
"code": null,
"e": 24787,
"s": 24692,
"text": "We have already been introduced to primality testing in the previous articles in this series. "
},
{
"code": null,
"e": 24843,
"s": 24787,
"tex... |
How to get the system configuration information relevant to an open file using Python? | You can call the fpathconf(file_descriptor, name) function to get the system configuration information relevant to an open file. name specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these names are specified in a number of standards. Note that this function... | [
{
"code": null,
"e": 1431,
"s": 1062,
"text": "You can call the fpathconf(file_descriptor, name) function to get the system configuration information relevant to an open file. name specifies the configuration value to retrieve; it may be a string which is the name of a defined system value; these na... |
numpy.exp() in Python | 29 Nov, 2018
numpy.exp(array, out = None, where = True, casting = ‘same_kind’, order = ‘K’, dtype = None) :This mathematical function helps user to calculate exponential of all the elements in the input array.
Parameters :
array : [array_like]Input array or object whose elements, we need to test.
out : [ndarray... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Nov, 2018"
},
{
"code": null,
"e": 225,
"s": 28,
"text": "numpy.exp(array, out = None, where = True, casting = ‘same_kind’, order = ‘K’, dtype = None) :This mathematical function helps user to calculate exponential of all the element... |
Plotly - Heatmap | A heat map (or heatmap) is a graphical representation of data where the individual values contained in a matrix are represented as colors. The primary purpose of Heat Maps is to better visualize the volume of locations/events within a dataset and assist in directing viewers towards areas on data visualizations that mat... | [
{
"code": null,
"e": 2824,
"s": 2494,
"text": "A heat map (or heatmap) is a graphical representation of data where the individual values contained in a matrix are represented as colors. The primary purpose of Heat Maps is to better visualize the volume of locations/events within a dataset and assist... |
Log and natural Logarithmic value of a column in Pandas – Python | 28 Jul, 2020
Log and natural logarithmic value of a column in pandas can be calculated using the log(), log2(), and log10() numpy functions respectively. Before applying the functions, we need to create a dataframe.
Code:
Python3
# Import required librariesimport pandas as pdimport numpy as np # Dictionarydata = { ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 231,
"s": 28,
"text": "Log and natural logarithmic value of a column in pandas can be calculated using the log(), log2(), and log10() numpy functions respectively. Before applying the functions, we ... |
Shortest path between two points in a Matrix with at most K obstacles | 04 Apr, 2022
Given a 2-D array matrix[][] of size ROW * COL and an integer K, where each cell matrix[i][j] is either 0 (empty) or 1 (obstacle). A pointer can move up, down, left, or right from and to an empty cell in a single step. The task is to find the minimum number of steps required to go from the source (0, 0) to... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Apr, 2022"
},
{
"code": null,
"e": 571,
"s": 52,
"text": "Given a 2-D array matrix[][] of size ROW * COL and an integer K, where each cell matrix[i][j] is either 0 (empty) or 1 (obstacle). A pointer can move up, down, left, or right... |
Pygame – Time | 25 Oct, 2021
While using pygame we sometimes need to perform certain operations that include the usage of time. Like finding how much time our program has been running, pausing the program for an amount of time, etc. For operations of this kind, we need to use the time methods of pygame. In this article, we will be dis... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 Oct, 2021"
},
{
"code": null,
"e": 413,
"s": 28,
"text": "While using pygame we sometimes need to perform certain operations that include the usage of time. Like finding how much time our program has been running, pausing the program... |
Python Web Development – Django Tutorial | 29 Dec, 2021
Python Django is a web framework that allows to quickly create efficient web pages. Django is also called batteries included framework because it provides built-in features such as Django Admin Interface, default database – SQLite3, etc. When you’re building a website, you always need a similar set of comp... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n29 Dec, 2021"
},
{
"code": null,
"e": 562,
"s": 53,
"text": "Python Django is a web framework that allows to quickly create efficient web pages. Django is also called batteries included framework because it provides built-in features s... |
Flappy Bird Game in JavaScript | 19 Mar, 2021
Flappy Bird is an endless game that involves a bird that the player can control. The player has to save the bird from colliding with the hurdles like pipes. Each time the bird passes through the pipes, the score gets incremented by one. The game ends when the bird collides with the pipes or falls down due ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 Mar, 2021"
},
{
"code": null,
"e": 455,
"s": 52,
"text": "Flappy Bird is an endless game that involves a bird that the player can control. The player has to save the bird from colliding with the hurdles like pipes. Each time the bir... |
How to use Google Colab | 01 May, 2019
If you want to create a machine learning model but say you don’t have a computer that can take the workload, Google Colab is the platform for you. Even if you have a GPU or a good computer creating a local environment with anaconda and installing packages and resolving installation issues are a hassle.Cola... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n01 May, 2019"
},
{
"code": null,
"e": 498,
"s": 53,
"text": "If you want to create a machine learning model but say you don’t have a computer that can take the workload, Google Colab is the platform for you. Even if you have a GPU or a... |
How do I select elements inside an iframe with Xpath? | We can select elements inside an iframe with xpath in Selenium webdriver. A frame is defined with <iframe>, <frameset> or <frame> tag in html code. A frame is used to embed an HTML document within another HTML document. Let us see the html code of a frame.
Selenium by default has access to the parent browser driver. In... | [
{
"code": null,
"e": 1444,
"s": 1187,
"text": "We can select elements inside an iframe with xpath in Selenium webdriver. A frame is defined with <iframe>, <frameset> or <frame> tag in html code. A frame is used to embed an HTML document within another HTML document. Let us see the html code of a fra... |
Python OpenCV – cv2.polylines() method | 15 Jun, 2022
OpenCV is the huge open-source library for computer vision, machine learning, and image processing and it now plays a major role in real-time operations which are very important in today’s systems. By using OpenCV one can process images and videos to identify objects, faces, or even the handwriting of a hu... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n15 Jun, 2022"
},
{
"code": null,
"e": 497,
"s": 53,
"text": "OpenCV is the huge open-source library for computer vision, machine learning, and image processing and it now plays a major role in real-time operations which are very import... |
Java Program to Convert Byte Array to Hex String | 24 Sep, 2021
Byte Array – A Java Byte Array is an array used to store byte data types only. The default value of each element of the byte array is 0.
Hex String – A Hex String is a combination of the digits 0-9 and characters A-F, just like how a binary string comprises only 0’s and 1’s. Eg: “245FC” is a hexadecimal st... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Sep, 2021"
},
{
"code": null,
"e": 165,
"s": 28,
"text": "Byte Array – A Java Byte Array is an array used to store byte data types only. The default value of each element of the byte array is 0."
},
{
"code": null,
"e": 3... |
time.Time.Truncate() Function in Golang with Examples | 28 Apr, 2020
In Go language, time packages supplies functionality for determining as well as viewing time. The Time.Truncate() function in Go language is used to find the output of rounding the stated time “t” to the closest multiple of the given duration “d” from the zero time. Moreover, this function is defined under... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Apr, 2020"
},
{
"code": null,
"e": 431,
"s": 28,
"text": "In Go language, time packages supplies functionality for determining as well as viewing time. The Time.Truncate() function in Go language is used to find the output of roundin... |
How to make checkbox visible when hover or select the element? | 31 Jan, 2020
The problem here is how to make a checkbox visible only when:
It is hovered overSelected
It is hovered over
Selected
Approach:The checkbox shouldn’t be visible when not selected. It only becomes visible when hovered over again.The solution to the problem is simple. We can use the opacity property of the ch... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n31 Jan, 2020"
},
{
"code": null,
"e": 116,
"s": 54,
"text": "The problem here is how to make a checkbox visible only when:"
},
{
"code": null,
"e": 143,
"s": 116,
"text": "It is hovered overSelected"
},
{
"c... |
C/C++ Program to find Prime Numbers between given range | 05 Jul, 2021
Given two numbers L and R, the task is to find the prime numbers between L and R.
Examples:
Input: L = 1, R = 10Output: 2 3 5 7Explanation:Prime number between the 1 and 10 are 2, 3, 5, and 7
Input: L = 30, R = 40Output: 31 37
Approach: The idea is to iterate from in the range [L, R] and check if any n... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n05 Jul, 2021"
},
{
"code": null,
"e": 135,
"s": 53,
"text": "Given two numbers L and R, the task is to find the prime numbers between L and R."
},
{
"code": null,
"e": 145,
"s": 135,
"text": "Examples:"
},
{
... |
How to remove the space between inline-block elements? | 10 Aug, 2021
There are two methods to remove the space between inline-block elements.
Method 1: Assign the font size of the parent of the inline block element to 0px and then assign the proper font-size to the inline block element
Syntax:parent-element{ font-size:0px;}parent-element child-element{ display:i... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 Aug, 2021"
},
{
"code": null,
"e": 127,
"s": 54,
"text": "There are two methods to remove the space between inline-block elements."
},
{
"code": null,
"e": 272,
"s": 127,
"text": "Method 1: Assign the font size o... |
ReactJS useContext Hook | 01 Nov, 2020
Context provides a way to pass data or state through the component tree without having to pass props down manually through each nested component. It is designed to share data that can be considered as global data for a tree of React components, such as the current authenticated user or theme(e.g. color, pa... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Nov, 2020"
},
{
"code": null,
"e": 391,
"s": 54,
"text": "Context provides a way to pass data or state through the component tree without having to pass props down manually through each nested component. It is designed to share data... |
Running Commands Inside Docker Container | 31 Oct, 2020
If you are working on an application inside Docker Container, you might need commands to install packages or access file system inside the Docker Container. Executing commands inside Docker Containers should be easy enough for you since you have to do it multiple times across your development phase. Docker... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n31 Oct, 2020"
},
{
"code": null,
"e": 432,
"s": 53,
"text": "If you are working on an application inside Docker Container, you might need commands to install packages or access file system inside the Docker Container. Executing command... |
Memory leak in C++ and How to avoid it? | 16 Jun, 2021
Memory leakage occurs in C++ when programmers allocates memory by using new keyword and forgets to deallocate the memory by using delete() function or delete[] operator. One of the most memory leakage occurs in C++ by using wrong delete operator. The delete operator should be used to free a single allocate... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Jun, 2021"
},
{
"code": null,
"e": 702,
"s": 52,
"text": "Memory leakage occurs in C++ when programmers allocates memory by using new keyword and forgets to deallocate the memory by using delete() function or delete[] operator. One ... |
vector : : resize() in C++ STL | 26 Apr, 2018
Vectors are known as dynamic arrays which can change its size automatically when an element is inserted or deleted. This storage is maintained by container.
The function alters the container’s content in actual by inserting or deleting the elements from it. It happens so,
If the given value of n is less th... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 Apr, 2018"
},
{
"code": null,
"e": 209,
"s": 52,
"text": "Vectors are known as dynamic arrays which can change its size automatically when an element is inserted or deleted. This storage is maintained by container."
},
{
"co... |
Social Mapper – Find Social Media Profiles Using Photo Only | 23 Sep, 2021
OSINT techniques are too powerful that they can even search the information about the anonymous person on the internet by using his/her face without knowing the actual name of the person. Social Mapper is a Python-based open-source intelligence tool that correlates social media profiles via facial recognit... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 513,
"s": 28,
"text": "OSINT techniques are too powerful that they can even search the information about the anonymous person on the internet by using his/her face without knowing the actual name of... |
How to list the Azure VMs using Azure CLI in PowerShell? | To list all the Azure VMs connected to the particular subscription, we need to use the “Az vm” command. Before that, we need to make sure the Azure is connected to the desired subscription, if not use the below command to set the Azure Subscription.
az account set -s 'subscription name or id'
Once the Azure subscriptio... | [
{
"code": null,
"e": 1437,
"s": 1187,
"text": "To list all the Azure VMs connected to the particular subscription, we need to use the “Az vm” command. Before that, we need to make sure the Azure is connected to the desired subscription, if not use the below command to set the Azure Subscription."
... |
Underscore.js _.merge() Method | 04 Aug, 2020
The _.merge() method merges two or more objects starting with the left-most to the rightmost to create a parent mapping object.
Syntax:
_.merge(obj1, obj2,..., objn);
Parameters: This method takes n objects to merge them.
Return Value: This method returns a newly generated merged object.
Note: This will n... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Aug, 2020"
},
{
"code": null,
"e": 156,
"s": 28,
"text": "The _.merge() method merges two or more objects starting with the left-most to the rightmost to create a parent mapping object."
},
{
"code": null,
"e": 164,
"... |
LinkedList getLast() Method in Java | 02 Jun, 2022
Linked List is a part of the Collection framework present in java.util package. This class is an implementation of the LinkedList data structure which is a linear data structure where the elements are not stored in contiguous locations and every element is a separate object with a data part and. The Java.u... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Jun, 2022"
},
{
"code": null,
"e": 479,
"s": 28,
"text": "Linked List is a part of the Collection framework present in java.util package. This class is an implementation of the LinkedList data structure which is a linear data structu... |
Python | Split strings and digits from string list | 02 Dec, 2019
Sometimes, while working with String list, we can have a problem in which we need to remove the surrounding stray characters or noise from list of digits. This can be in form of Currency prefix, signs of numbers etc. Let’s discuss a way in which this task can be performed.
Method : Using list comprehension... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Dec, 2019"
},
{
"code": null,
"e": 302,
"s": 28,
"text": "Sometimes, while working with String list, we can have a problem in which we need to remove the surrounding stray characters or noise from list of digits. This can be in form ... |
HTTP headers | Clear-Site-Data | 31 Oct, 2019
The HTTP header Clear-Site-Header is a response-type header. This header is used in deleting the browsing data which is in the requesting website. These browsing data includes cache, cookies, storage and executionContents. It helps the web developers to have an improved level of control over data stored by... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Oct, 2019"
},
{
"code": null,
"e": 357,
"s": 28,
"text": "The HTTP header Clear-Site-Header is a response-type header. This header is used in deleting the browsing data which is in the requesting website. These browsing data includes... |
How to Shake Text on hover using HTML and CSS? | 31 Jul, 2020
Shaking Text animation is a very cool animation which can be used in websites, this animation can be easily created using some basic HTML and CSS, the below section will guide on how to create the animation.
HTML Code: In this section we have a basic div element which contains some text inside of it.
<!DOC... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Jul, 2020"
},
{
"code": null,
"e": 236,
"s": 28,
"text": "Shaking Text animation is a very cool animation which can be used in websites, this animation can be easily created using some basic HTML and CSS, the below section will guide... |
Create Rock Paper Scissor Game using ReactJS | 10 Dec, 2020
Here both the players will take their turn one by one. Starting with player one followed by player two. There are three weapons to select from namely stone, paper, scissors. Once player two plays his turn result is computed updating the win/lose the status of both the players.
Technologies Used / Pre-requi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Dec, 2020"
},
{
"code": null,
"e": 306,
"s": 28,
"text": "Here both the players will take their turn one by one. Starting with player one followed by player two. There are three weapons to select from namely stone, paper, scissors. O... |
Temporal Data and Temporal Consistency | 28 Jun, 2022
Temporal Data is the temporary data that is valid only for a prescribed time. Temporal data becomes invalid or obsolete after a certain period of time. For example, the current temperature of a particular region is temporal data as it keeps on updating and the validity of this temporal data (current temper... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jun, 2022"
},
{
"code": null,
"e": 1327,
"s": 28,
"text": "Temporal Data is the temporary data that is valid only for a prescribed time. Temporal data becomes invalid or obsolete after a certain period of time. For example, the curre... |
Word Ladder (Length of shortest chain to reach a target word) | 24 Feb, 2022
Given a dictionary, and two words ‘start’ and ‘target’ (both of same length). Find length of the smallest chain from ‘start’ to ‘target’ if it exists, such that adjacent words in the chain only differ by one character and each word in the chain is a valid word i.e., it exists in the dictionary. It may be a... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Feb, 2022"
},
{
"code": null,
"e": 457,
"s": 54,
"text": "Given a dictionary, and two words ‘start’ and ‘target’ (both of same length). Find length of the smallest chain from ‘start’ to ‘target’ if it exists, such that adjacent word... |
Mean of range in array | 31 May, 2022
Given an array of n integers. You are given q queries. Write a program to print floor value of mean in range l to r for each query in a new line.
Examples :
Input : arr[] = {1, 2, 3, 4, 5}
q = 3
0 2
1 3
0 4
Output : 2
3
3
Here for 0 to 2 (1 + 2 + 3) / 3 = ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n31 May, 2022"
},
{
"code": null,
"e": 198,
"s": 52,
"text": "Given an array of n integers. You are given q queries. Write a program to print floor value of mean in range l to r for each query in a new line."
},
{
"code": null,
... |
How to Skew Text on Hover using HTML and CSS? | 15 Jul, 2020
Skewed text animation effect can be created using HTML and CSS, this animation looks very cool and can be used in websites to make them look more dynamic, the following sections will guide on how to create the desired animation effect.
First Section: In this section we will create a basic div tag which con... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Jul, 2020"
},
{
"code": null,
"e": 264,
"s": 28,
"text": "Skewed text animation effect can be created using HTML and CSS, this animation looks very cool and can be used in websites to make them look more dynamic, the following sectio... |
Spring Boot - Admin Server | Monitoring your application by using Spring Boot Actuator Endpoint is slightly difficult. Because, if you have ‘n’ number of applications, every application has separate actuator endpoints, thus making monitoring difficult. Spring Boot Admin Server is an application used to manage and monitor your Microservice applicat... | [
{
"code": null,
"e": 3484,
"s": 3159,
"text": "Monitoring your application by using Spring Boot Actuator Endpoint is slightly difficult. Because, if you have ‘n’ number of applications, every application has separate actuator endpoints, thus making monitoring difficult. Spring Boot Admin Server is a... |
Python | Pandas dataframe.to_clipboard() | 29 Jan, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas dataframe.to_clipboard() function copy object to the system clipboard. This function w... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n29 Jan, 2019"
},
{
"code": null,
"e": 267,
"s": 53,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes im... |
TemplateView – Class Based Generic View Django | 25 May, 2021
Django provides several class based generic views to accomplish common tasks. The simplest among them is TemplateView. It Renders a given template, with the context containing parameters captured in the URL.
TemplateView should be used when you want to present some information on an HTML page. TemplateView... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 May, 2021"
},
{
"code": null,
"e": 236,
"s": 28,
"text": "Django provides several class based generic views to accomplish common tasks. The simplest among them is TemplateView. It Renders a given template, with the context containing... |
Python Program for Cocktail Sort | 22 Jun, 2022
Cocktail Sort is a variation of Bubble sort. The Bubble sort algorithm always traverses elements from left and moves the largest element to its correct position in first iteration and second largest in second iteration and so on. Cocktail Sort traverses through a given array in both directions alternativel... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 409,
"s": 28,
"text": "Cocktail Sort is a variation of Bubble sort. The Bubble sort algorithm always traverses elements from left and moves the largest element to its correct position in first itera... |
Runs Test of Randomness in Python | 08 Jun, 2020
Random numbers are an imperative part of many systems, including simulations, cryptography and much more. So the ability to produce values randomly, with no apparent logic and predictability, becomes a prime function. Since computers cannot produce values which are completely random, algorithms, known as p... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jun, 2020"
},
{
"code": null,
"e": 406,
"s": 28,
"text": "Random numbers are an imperative part of many systems, including simulations, cryptography and much more. So the ability to produce values randomly, with no apparent logic and... |
MongoDB - Rename Operator ($rename) - GeeksforGeeks | 10 May, 2020
MongoDB provides different types of field update operators to update the values of the fields of the documents and $rename operator is one of them. This operator is used to update the names of the fields with new names. The new name of the field should be different from the existing name of the field.
$ren... | [
{
"code": null,
"e": 24192,
"s": 24164,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 24495,
"s": 24192,
"text": "MongoDB provides different types of field update operators to update the values of the fields of the documents and $rename operator is one of them. This operator i... |
Python Program for Rat in a Maze | Backtracking-2 - GeeksforGeeks | 22 Apr, 2022
We have discussed Backtracking and Knight’s tour problem in Set 1. Let us discuss Rat in a Maze as another example problem that can be solved using Backtracking.
A Maze is given as N*N binary matrix of blocks where source block is the upper left most block i.e., maze[0][0] and destination block is lower ri... | [
{
"code": null,
"e": 26741,
"s": 26713,
"text": "\n22 Apr, 2022"
},
{
"code": null,
"e": 26903,
"s": 26741,
"text": "We have discussed Backtracking and Knight’s tour problem in Set 1. Let us discuss Rat in a Maze as another example problem that can be solved using Backtracking."
... |
Level order traversal | Practice | GeeksforGeeks | Given a binary tree, find its level order traversal.
Level order traversal of a tree is breadth-first traversal for the tree.
Example 1:
Input:
1
/ \
3 2
Output:1 3 2
Example 2:
Input:
10
/ \
20 30
/ \
40 60
Output:10 20 30 40 60
Your Task:
You don't have to take any... | [
{
"code": null,
"e": 364,
"s": 238,
"text": "Given a binary tree, find its level order traversal.\nLevel order traversal of a tree is breadth-first traversal for the tree."
},
{
"code": null,
"e": 376,
"s": 364,
"text": "\nExample 1:"
},
{
"code": null,
"e": 421,
... |
Sort Java Vector in Descending Order Using Comparator - GeeksforGeeks | 27 Jan, 2021
The Vector class implements a growable array of objects. Vectors basically fall in legacy classes but now it is fully compatible with collections. It is found in java.util package and implements the List interface, so we can use all the methods of the List interface.
There are two types of Sorting techniqu... | [
{
"code": null,
"e": 25561,
"s": 25533,
"text": "\n27 Jan, 2021"
},
{
"code": null,
"e": 25829,
"s": 25561,
"text": "The Vector class implements a growable array of objects. Vectors basically fall in legacy classes but now it is fully compatible with collections. It is found in j... |
CGI Programming in Python - GeeksforGeeks | 08 Dec, 2020
What is CGI?Common Gateway Interface (also known as CGI) is not a kind of language but just a specification(set of rules) that helps to establish a dynamic interaction between a web application and the browser (or the client application). The CGI programs make possible communication between client and web ... | [
{
"code": null,
"e": 24258,
"s": 24230,
"text": "\n08 Dec, 2020"
},
{
"code": null,
"e": 24741,
"s": 24258,
"text": "What is CGI?Common Gateway Interface (also known as CGI) is not a kind of language but just a specification(set of rules) that helps to establish a dynamic interac... |
AngularJS | ng-value Directive - GeeksforGeeks | 05 Apr, 2019
The ng-value Directive in AngularJS is used to specify the value of an input element. It is supported by <input> and <select> elements.
Syntax:
<element ng-value="expression"> Content ... </element>
Example 1:
<!DOCTYPE html><html> <head> <title>ng-value Directive</title> <script src= ... | [
{
"code": null,
"e": 24718,
"s": 24690,
"text": "\n05 Apr, 2019"
},
{
"code": null,
"e": 24854,
"s": 24718,
"text": "The ng-value Directive in AngularJS is used to specify the value of an input element. It is supported by <input> and <select> elements."
},
{
"code": null,... |
SQL | MERGE Statement - GeeksforGeeks | 31 Jan, 2019
Prerequisite – INSERT, UPDATE, DELETE
The MERGE command in SQL is actually a combination of three SQL statements: INSERT, UPDATE and DELETE. In simple words, the MERGE statement in SQL provides a convenient way to perform all these three operations together which can be very helpful when it comes to handle... | [
{
"code": null,
"e": 23994,
"s": 23966,
"text": "\n31 Jan, 2019"
},
{
"code": null,
"e": 24032,
"s": 23994,
"text": "Prerequisite – INSERT, UPDATE, DELETE"
},
{
"code": null,
"e": 24502,
"s": 24032,
"text": "The MERGE command in SQL is actually a combination o... |
PHP - Mutex Functions | Static methods contained in the Mutex class can provide direct access to Posix Mutex functionality.
Mutex {
/* Methods */
final public static long create([ boolean $lock ] )
final public static boolean destroy( long $mutex )
final public static boolean lock( long $mutex )
final public static boolean tryl... | [
{
"code": null,
"e": 2857,
"s": 2757,
"text": "Static methods contained in the Mutex class can provide direct access to Posix Mutex functionality."
},
{
"code": null,
"e": 3173,
"s": 2857,
"text": "Mutex {\n /* Methods */\n final public static long create([ boolean $lock ] )\... |
Android - Styles and Themes | A style resource defines the format and look for a UI. A style can be applied to an individual View (from within a layout file) or to an entire Activity or application (from within the manifest file).
A style is defined in an XML resource that is separate from the XML that specifies the layout. This XML file resides un... | [
{
"code": null,
"e": 3808,
"s": 3607,
"text": "A style resource defines the format and look for a UI. A style can be applied to an individual View (from within a layout file) or to an entire Activity or application (from within the manifest file)."
},
{
"code": null,
"e": 4126,
"s": ... |
Count numbers in a given range whose count of prime factors is a Prime Number - GeeksforGeeks | 17 May, 2021
Given a 2D array Q[][] of size N * 2 representing queries of the form {L, R}. For each query, the task is to print the count of numbers in the range [L, R] with a count of prime factors equal to a prime number.
Examples:
Input: Q[][] = {{4, 8}, {30, 32}} Output: 3 2 Explanation: Query 1: Prime factors of 4... | [
{
"code": null,
"e": 24894,
"s": 24866,
"text": "\n17 May, 2021"
},
{
"code": null,
"e": 25105,
"s": 24894,
"text": "Given a 2D array Q[][] of size N * 2 representing queries of the form {L, R}. For each query, the task is to print the count of numbers in the range [L, R] with a ... |
C++ String Library - pop_back | It erases the last character of the string, effectively reducing its length by one.
Following is the declaration for std::string::pop_back.
void pop_back();
void pop_back();
void pop_back();
none
none
if an exception is thrown, there are no changes in the string.
In below example for std::string::pop_back.
#include <io... | [
{
"code": null,
"e": 2687,
"s": 2603,
"text": "It erases the last character of the string, effectively reducing its length by one."
},
{
"code": null,
"e": 2743,
"s": 2687,
"text": "Following is the declaration for std::string::pop_back."
},
{
"code": null,
"e": 2760,... |
How to disable logging from imported modules in Python? | You can disable logging from imported modules using the logging module. You can configure it to not log messages unless they are at least warnings using the following code:
import logging
logging.getLogger("imported_module").setLevel(logging.WARNING)
If you dont want to write the module name as a string, you can also u... | [
{
"code": null,
"e": 1235,
"s": 1062,
"text": "You can disable logging from imported modules using the logging module. You can configure it to not log messages unless they are at least warnings using the following code:"
},
{
"code": null,
"e": 1313,
"s": 1235,
"text": "import lo... |
SQL NULL Values - IS NULL and IS NOT NULL | A field with a NULL value is a field with no value.
If a field in a table is optional, it is possible to insert a new record or
update a record without adding a value to this field. Then, the field will be
saved with a NULL value.
Note: A NULL value is different from a zero value or a field that
contains spaces. A f... | [
{
"code": null,
"e": 52,
"s": 0,
"text": "A field with a NULL value is a field with no value."
},
{
"code": null,
"e": 233,
"s": 52,
"text": "If a field in a table is optional, it is possible to insert a new record or \nupdate a record without adding a value to this field. Then, ... |
Generate OneDrive Direct-Download Link with C# or Python | by Joe T. Santhanavanich | Towards Data Science | In many projects, you may need file hosting services to share a large number of datasets, scripts, or any files with the direct download option. You may already use the most popular hosting services such as Google Drive, Microsoft OneDrive, DropBox, and iCloud. In this article, I will focus on how to make a direct down... | [
{
"code": null,
"e": 525,
"s": 172,
"text": "In many projects, you may need file hosting services to share a large number of datasets, scripts, or any files with the direct download option. You may already use the most popular hosting services such as Google Drive, Microsoft OneDrive, DropBox, and i... |
Introduction to Mesa: Agent-based Modeling in Python | by Ng Wai Foong | Towards Data Science | Python-based alternative to NetLogo, Repast, or MASON for agent-based modeling
Agent-based modeling relies on simulating the actions and interactions of autonomous agents to evaluate their effects on the system. It is often used to predict the projections that we will obtain given a complex phenomena. The main purpose ... | [
{
"code": null,
"e": 250,
"s": 171,
"text": "Python-based alternative to NetLogo, Repast, or MASON for agent-based modeling"
},
{
"code": null,
"e": 886,
"s": 250,
"text": "Agent-based modeling relies on simulating the actions and interactions of autonomous agents to evaluate the... |
Making network graphs interactive with Python and Pyvis. | by JOSÉ MANUEL NÁPOLES DUARTE | Towards Data Science | For a while, I and others in the Streamlit community [1] have been seeking a tool to render interactive graphs, but until now this has been something only a few can achieve. This can be due to the fact that a level of expertise with javascript is required, something that many Streamlit users may want to avoid, as this ... | [
{
"code": null,
"e": 669,
"s": 171,
"text": "For a while, I and others in the Streamlit community [1] have been seeking a tool to render interactive graphs, but until now this has been something only a few can achieve. This can be due to the fact that a level of expertise with javascript is required... |
Lua - Arithmetic Operators | Following table shows all the arithmetic operators supported by Lua language. Assume variable A holds 10 and variable B holds 20, then −
Try the following example to understand all the arithmetic operators available in the Lua programming language −
a = 21
b = 10
c = a + b
print("Line 1 - Value of c is ", c )
c = a - ... | [
{
"code": null,
"e": 2240,
"s": 2103,
"text": "Following table shows all the arithmetic operators supported by Lua language. Assume variable A holds 10 and variable B holds 20, then −"
},
{
"code": null,
"e": 2353,
"s": 2240,
"text": "Try the following example to understand all t... |
How to write a custom adapter for my list view on Android using Kotlin? | This example demonstrates how to write a custom adapter for my list view on Android using Kotlin.
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... | [
{
"code": null,
"e": 1160,
"s": 1062,
"text": "This example demonstrates how to write a custom adapter for my list view on Android using Kotlin."
},
{
"code": null,
"e": 1289,
"s": 1160,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill a... |
Clojure - REPL | REPL (read-eval-print loop) is a tool for experimenting with Clojure code. It allows you to interact with a running program and quickly try out if things work out as they should. It does this by presenting you with a prompt where you can enter the code. It then reads your input, evaluates it, prints the result, and loo... | [
{
"code": null,
"e": 2734,
"s": 2374,
"text": "REPL (read-eval-print loop) is a tool for experimenting with Clojure code. It allows you to interact with a running program and quickly try out if things work out as they should. It does this by presenting you with a prompt where you can enter the code.... |
Find maximum element of each column in a matrix - GeeksforGeeks | 29 Aug, 2021
Given a matrix, the task is to find the maximum element of each column.Examples:
Input: [1, 2, 3]
[1, 4, 9]
[76, 34, 21]
Output:
76
34
21
Input: [1, 2, 3, 21]
[12, 1, 65, 9]
[1, 56, 34, 2]
Output:
12
56
65
21
Approach: The idea is to run the loop for no_of_cols. Che... | [
{
"code": null,
"e": 25000,
"s": 24972,
"text": "\n29 Aug, 2021"
},
{
"code": null,
"e": 25083,
"s": 25000,
"text": "Given a matrix, the task is to find the maximum element of each column.Examples: "
},
{
"code": null,
"e": 25248,
"s": 25083,
"text": "Input: ... |
Creating Interactive Data Tables in Plotly Dash | by Akash Kaul | Towards Data Science | Plotly Dash is an incredibly powerful framework that allows you to create fully functional data visualization dashboards. Using Dash, you can create a full front-end experience using only Python. The library does a great job of abstracting away from the complicated HTML, CSS, and JS associated with all of the different... | [
{
"code": null,
"e": 513,
"s": 172,
"text": "Plotly Dash is an incredibly powerful framework that allows you to create fully functional data visualization dashboards. Using Dash, you can create a full front-end experience using only Python. The library does a great job of abstracting away from the c... |
ConcurrentHashMap in Java - GeeksforGeeks | 22 Mar, 2021
Prerequisites: ConcurrentMap
The ConcurrentHashMap class is introduced in JDK 1.5 belongs to java.util.concurrent package, which implements ConcurrentMap as well as to Serializable interface also. ConcurrentHashMap is an enhancement of HashMap as we know that while dealing with Threads in our application H... | [
{
"code": null,
"e": 24112,
"s": 24084,
"text": "\n22 Mar, 2021"
},
{
"code": null,
"e": 24141,
"s": 24112,
"text": "Prerequisites: ConcurrentMap"
},
{
"code": null,
"e": 24503,
"s": 24141,
"text": "The ConcurrentHashMap class is introduced in JDK 1.5 belongs ... |
What is Redux Toolkit and why it is more preferred? - GeeksforGeeks | 27 Oct, 2020
While working as a Front-end Developer or Full Stack Developer, many engineers encountered Redux. But Recently Redux Team launched Redux Toolkit, an officially recommended and a SOPE library that stands for Simple, Opinionated, Powerful, and Effective state management library. It allows us to write more ef... | [
{
"code": null,
"e": 26279,
"s": 26251,
"text": "\n27 Oct, 2020"
},
{
"code": null,
"e": 26756,
"s": 26279,
"text": "While working as a Front-end Developer or Full Stack Developer, many engineers encountered Redux. But Recently Redux Team launched Redux Toolkit, an officially rec... |
How to change the color of the alert box in JavaScript? | You can try to run the following code to change the color of the alert box. To change the color of the alert box, use the following custom alert box. We’re using JavaScript library, jQuery to achieve this and will change the color of the alert box to “blue” −
Live Demo
<!DOCTYPE html>
<html>
<head>
<script src... | [
{
"code": null,
"e": 1322,
"s": 1062,
"text": "You can try to run the following code to change the color of the alert box. To change the color of the alert box, use the following custom alert box. We’re using JavaScript library, jQuery to achieve this and will change the color of the alert box to “b... |
Char.ConvertToUtf32(String, Int32) Method in C# | The Char.ConvertToUtf32(String, Int32) method in C# is used to convert the value of a UTF-16 encoded character or surrogate pair at a specified position in a string into a Unicode code point.
Following is the syntax −
public static int ConvertToUtf32 (string str, int index);
Above, str is the string that contains a cha... | [
{
"code": null,
"e": 1254,
"s": 1062,
"text": "The Char.ConvertToUtf32(String, Int32) method in C# is used to convert the value of a UTF-16 encoded character or surrogate pair at a specified position in a string into a Unicode code point."
},
{
"code": null,
"e": 1280,
"s": 1254,
... |
Addressing modes in 8086 microprocessor | In this section we will see the addressing modes of Intel 8086 microprocessor.
There are eight addressing modes in 8086 MPU. These modes are:
Immediate Addressing Mode
Immediate Addressing Mode
Register Addressing Mode
Register Addressing Mode
Direct Addressing Mode
Direct Addressing Mode
Register Indirect Addressing M... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "In this section we will see the addressing modes of Intel 8086 microprocessor."
},
{
"code": null,
"e": 1204,
"s": 1141,
"text": "There are eight addressing modes in 8086 MPU. These modes are:"
},
{
"code": null,
"e": 123... |
How to rename all files of a folder using Java? - GeeksforGeeks | 24 Mar, 2018
Often, when transferring files from the camera folder to a workspace where we would like to analyze the pictures, it becomes difficult to deal with long file and type them out again and again when testing them through a code. Also, the number of files might be too large to manually rename each one of them.... | [
{
"code": null,
"e": 24840,
"s": 24812,
"text": "\n24 Mar, 2018"
},
{
"code": null,
"e": 25212,
"s": 24840,
"text": "Often, when transferring files from the camera folder to a workspace where we would like to analyze the pictures, it becomes difficult to deal with long file and t... |
wxPython | Exit() function in wxPython - GeeksforGeeks | 15 Jun, 2020
In this article we are going to learn about wx.Exit() which is a inbuilt parent function present in wxPython.Exit() function exits application after calling wx.App.OnExit .
Should only be used in an emergency: normally the top-level frame should be deleted (after deleting all other frames) to terminate the... | [
{
"code": null,
"e": 24183,
"s": 24155,
"text": "\n15 Jun, 2020"
},
{
"code": null,
"e": 24356,
"s": 24183,
"text": "In this article we are going to learn about wx.Exit() which is a inbuilt parent function present in wxPython.Exit() function exits application after calling wx.App... |
Drawing borders around an image using OpenCV | In this program, we will draw borders around an image. We will use the copyMakeBorder() method in the openCV library. This function takes various parameters like image, top, bottom, left, right border values.
Step 1: Import cv2.
Step 2: Read the image.
Step 3: Dall the cv2.copymakeborder() method.
Step 4: Display the o... | [
{
"code": null,
"e": 1271,
"s": 1062,
"text": "In this program, we will draw borders around an image. We will use the copyMakeBorder() method in the openCV library. This function takes various parameters like image, top, bottom, left, right border values."
},
{
"code": null,
"e": 1389,
... |
How to get the Tkinter widget's current x and y coordinates? | Tkinter is widely used to create GUI based applications. It has many toolkits and
functions or modules available which can be used to define the different attributes
of a particular application. For building GUI applications it provides some widgets
including buttons, text boxes and labels. We can customize the positio... | [
{
"code": null,
"e": 1476,
"s": 1062,
"text": "Tkinter is widely used to create GUI based applications. It has many toolkits and\nfunctions or modules available which can be used to define the different attributes\nof a particular application. For building GUI applications it provides some widgets\n... |
C++ Stdexcept Library - invalid_argument | It is an invalid argument exception and this class defines the type of objects thrown as exceptions to report an invalid argument.
Following is the declaration for std::invalid_argument.
class invalid_argument;
class invalid_argument;
none
none
constructor − Here the string passed as what_arg has the same content as th... | [
{
"code": null,
"e": 2734,
"s": 2603,
"text": "It is an invalid argument exception and this class defines the type of objects thrown as exceptions to report an invalid argument."
},
{
"code": null,
"e": 2790,
"s": 2734,
"text": "Following is the declaration for std::invalid_argum... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.