title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
C++ Fstream Library - Close Function | Closes the file currently associated with the object, disassociating it from the stream. If the stream is currently not associated with any file (i.e., no file has successfully been open with it), calling this function fails.
Following is the declaration for fstream::close.
void close();
none
If the operation fails (in... | [
{
"code": null,
"e": 2829,
"s": 2603,
"text": "Closes the file currently associated with the object, disassociating it from the stream. If the stream is currently not associated with any file (i.e., no file has successfully been open with it), calling this function fails."
},
{
"code": null,... |
How to install Minikube on Windows 10 | Install Kubeadm kubelet kubectl | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In this tutorial, I am going to show you how ... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
How to differentiate mouse “click” and “drag” event using JavaScript ? - GeeksforGeeks | 15 Oct, 2020
Working with web elements a user may drag or click an element as per requirement. It is important to distinguish between drag and click events. JavaScript is a high level, dynamically typed programming language that can be used to distinguish between the drag and click events. JavaScript has a drag and cli... | [
{
"code": null,
"e": 24171,
"s": 24143,
"text": "\n15 Oct, 2020"
},
{
"code": null,
"e": 24819,
"s": 24171,
"text": "Working with web elements a user may drag or click an element as per requirement. It is important to distinguish between drag and click events. JavaScript is a hig... |
Create Scatter plot from CSV in R - GeeksforGeeks | 27 Aug, 2021
In R Programming Language we use plot() function to display scatterplot. It takes eight parameters.
Syntax: plot(x, y, main, xlab, ylab, xlim, ylim, axes)
Parameters:
x: sets variable to be used for horizontal coordinates.
y: sets variable to be used for vertical coordinates.
xlab: label for horizontal axi... | [
{
"code": null,
"e": 24851,
"s": 24823,
"text": "\n27 Aug, 2021"
},
{
"code": null,
"e": 24951,
"s": 24851,
"text": "In R Programming Language we use plot() function to display scatterplot. It takes eight parameters."
},
{
"code": null,
"e": 25006,
"s": 24951,
... |
How to change font color of textView in android? | This example demonstrates how do I change font color of TextView in android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLa... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "This example demonstrates how do I change font color of TextView in android."
},
{
"code": null,
"e": 1268,
"s": 1139,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details t... |
Difference Between ConcurrentHashMap, HashTable and Synchronized Map in Java - GeeksforGeeks | 26 Jul, 2021
Here we will be discussing out one by one individually then rolling onto the difference after having an adequate understanding of all three of them. We will be discussing ConcurrentHashMap first followed by HashTable, lastly followed by Synchronized Map. Let us start with ConcurrentHashMap first.
The under... | [
{
"code": null,
"e": 24467,
"s": 24439,
"text": "\n26 Jul, 2021"
},
{
"code": null,
"e": 24765,
"s": 24467,
"text": "Here we will be discussing out one by one individually then rolling onto the difference after having an adequate understanding of all three of them. We will be dis... |
response.elapsed – Python requests | 01 Mar, 2020
Python requests are generally used to fetch the content from a particular resource URI. Whenever we make a request to a specified URI through Python, it returns a response object. Now, this response object would be used to access certain features such as content, headers, etc. This article revolves around ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n01 Mar, 2020"
},
{
"code": null,
"e": 627,
"s": 53,
"text": "Python requests are generally used to fetch the content from a particular resource URI. Whenever we make a request to a specified URI through Python, it returns a response ob... |
Python | Create video using multiple images using OpenCV | 08 Apr, 2019
As we know OpenCV is a widely used library for image processing. It provides a wide sense of image processing. Let’s see how to create video using multiple images using OpenCV.
Install the following libraries:
PILcv2
Also, check the path before running the code otherwise you will be full with errors.
How i... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n08 Apr, 2019"
},
{
"code": null,
"e": 230,
"s": 53,
"text": "As we know OpenCV is a widely used library for image processing. It provides a wide sense of image processing. Let’s see how to create video using multiple images using OpenC... |
GATE | GATE-CS-2015 (Set 3) | Question 65 | 28 Jun, 2021
Consider the following relation
Cinema (theater, address, capacity)
Which of the following options will be needed at the end of the SQL query
SELECT P1. address
FROM Cinema P1
Such that it always finds the addresses of theaters with maximum capacity?(A) WHERE P1. Capacity> = All (select P2. Capacity fr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 60,
"s": 28,
"text": "Consider the following relation"
},
{
"code": null,
"e": 99,
"s": 60,
"text": " Cinema (theater, address, capacity) "
},
{
"code": null,
"e": 1... |
TimeField – Django Forms | 13 Feb, 2020
TimeField in Django Forms is a time input field, for input of time for particular instance or similar. The default widget for this input is TimeInput. It validates that the given value is either a datetime.time or string formatted in a particular time format.
TimeField has following optional argument:
inpu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Feb, 2020"
},
{
"code": null,
"e": 288,
"s": 28,
"text": "TimeField in Django Forms is a time input field, for input of time for particular instance or similar. The default widget for this input is TimeInput. It validates that the gi... |
HashSet clear() Method in Java | 26 Nov, 2018
The Java.util.HashSet.clear() method is used to remove all the elements from a HashSet. Using the clear() method only clears all the element from the set and not deletes the set. In other words, we can say that the clear() method is used to only empty an existing HashSet.
Syntax:
Hash_Set.clear()
Parameter... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Nov, 2018"
},
{
"code": null,
"e": 301,
"s": 28,
"text": "The Java.util.HashSet.clear() method is used to remove all the elements from a HashSet. Using the clear() method only clears all the element from the set and not deletes the s... |
Program to replace a word with asterisks in a sentence | 15 Jul, 2022
For the given sentence as input, censor a specific word with asterisks ‘ * ‘. Example :
Input : word = “computer” text = “GeeksforGeeks is a computer science portal for geeks. People who love computer and computer codes can contribute their valuables/ideas on computer codes/structures on here.” Output : G... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Jul, 2022"
},
{
"code": null,
"e": 141,
"s": 52,
"text": "For the given sentence as input, censor a specific word with asterisks ‘ * ‘. Example : "
},
{
"code": null,
"e": 531,
"s": 141,
"text": "Input : word = “... |
Introduction to SAS programming | 09 Jun, 2022
Statistical Analysis System (SAS) is a software suite that has been developed by SAS Institute, one of the leaders in analytics. It is useful for performing advanced analytics, multivariate analyses, business intelligence, data management functions, and also for conducting predictive analytics.
Use of SAS... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 351,
"s": 54,
"text": "Statistical Analysis System (SAS) is a software suite that has been developed by SAS Institute, one of the leaders in analytics. It is useful for performing advanced analytic... |
Smallest string divisible by two given strings | 30 Jun, 2021
Given two strings S and T of length N and M respectively, the task is to find the smallest string that is divisible by both the two strings. If no such string exists, then print -1.
For any two strings A and B, B divides A if and only if A is the concatenation of B at least once.
Examples:
Input: S = “abab... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 236,
"s": 54,
"text": "Given two strings S and T of length N and M respectively, the task is to find the smallest string that is divisible by both the two strings. If no such string exists, then pr... |
Python | Sympy Plane.equation() method | 22 Apr, 2020
Syntax : Plane.equation(x, y, z)
Parameters :
x : optional
y : optional
z : optional
Returns : Equation of Plane
Example #1:
# import sympy, Point3D and Planefrom sympy import Point3D, Plane # using Plane() p1 = Plane(Point3D(1, 2, 3), Point3D(4, 5, 6), Point3D(0, 2, 0))p2 = p1.equation() print(p... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 148,
"s": 28,
"text": "Syntax : Plane.equation(x, y, z)\n\nParameters :\nx : optional\ny : optional\nz : optional\n\nReturns : Equation of Plane\n"
},
{
"code": null,
"e": 160,
"... |
Finding Difference between Images using PIL | 14 Feb, 2022
Python interpreter in itself doesn’t contain the ability to process images and making out a conclusion to it. So, PIL(Python Imaging Library) adds image processing powers to the interpreter. PIL is an open-source library that provides python with external file support and efficiency to process images and t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Feb, 2022"
},
{
"code": null,
"e": 459,
"s": 28,
"text": "Python interpreter in itself doesn’t contain the ability to process images and making out a conclusion to it. So, PIL(Python Imaging Library) adds image processing powers to t... |
Find Union and Intersection of two unsorted arrays | 07 Jul, 2022
Given two unsorted arrays that represent two sets (elements in every array are distinct), find the union and intersection of two arrays.
For example, if the input arrays are:
arr1[] = {7, 1, 5, 2, 3, 6}
arr2[] = {3, 8, 6, 20, 7}
Then your program should print Union as {1, 2, 3, 5, 6, 7, 8, 20} and Inter... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 189,
"s": 52,
"text": "Given two unsorted arrays that represent two sets (elements in every array are distinct), find the union and intersection of two arrays."
},
{
"code": null,
"e": ... |
Kotlin Variables | 09 May, 2019
In Kotlin, every variable should be declared before it’s used. Without declaring a variable, an attempt to use the variable gives a syntax error. Declaration of the variable type also decides the kind of data you are allowed to store in the memory location.
In case of local variables, the type of variable ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 May, 2019"
},
{
"code": null,
"e": 310,
"s": 52,
"text": "In Kotlin, every variable should be declared before it’s used. Without declaring a variable, an attempt to use the variable gives a syntax error. Declaration of the variable ... |
How to get the text without HTML element using JavaScript ? | 27 Apr, 2020
Given an HTML document containing some elements and the task is to get the text inside an HTML element using JavaScript. There are two methods to get the text without HTML element which are listed below:
Using innerText propertyUsing textContent property
Using innerText property
Using textContent property
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Apr, 2020"
},
{
"code": null,
"e": 232,
"s": 28,
"text": "Given an HTML document containing some elements and the task is to get the text inside an HTML element using JavaScript. There are two methods to get the text without HTML ele... |
Map.delete() In JavaScript | 22 Nov, 2021
What is a map in JavaScript?
Map is a data structure in JavaScript which allows storing of [key, value] pairs where any value can be either used as a key or value.
The keys and values in the map collection may be of any type and if a value is added to the map collection using a key which already exists in ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 57,
"s": 28,
"text": "What is a map in JavaScript?"
},
{
"code": null,
"e": 192,
"s": 57,
"text": "Map is a data structure in JavaScript which allows storing of [key, value] pair... |
Difference between Int32 and UInt32 in C# | 26 May, 2020
Int32: This Struct is used to represents 32-bit signed integer. The Int32 can store both types of values including negative and positive between the ranges of -2147483648 to +2147483647.
Example :
C#
// C# program to show the// difference between Int32// and UInt32 using System;using System.Text; publicc... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 May, 2020"
},
{
"code": null,
"e": 215,
"s": 28,
"text": "Int32: This Struct is used to represents 32-bit signed integer. The Int32 can store both types of values including negative and positive between the ranges of -2147483648 to +... |
Subarray with 0 sum | Practice | GeeksforGeeks | Given an array of positive and negative numbers. Find if there is a subarray (of size at-least one) with 0 sum.
Example 1:
Input:
5
4 2 -3 1 6
Output:
Yes
Explanation:
2, -3, 1 is the subarray
with sum 0.
Example 2:
Input:
5
4 2 0 1 6
Output:
Yes
Explanation:
0 is one of the element
in the array so there exis... | [
{
"code": null,
"e": 350,
"s": 238,
"text": "Given an array of positive and negative numbers. Find if there is a subarray (of size at-least one) with 0 sum."
},
{
"code": null,
"e": 361,
"s": 350,
"text": "Example 1:"
},
{
"code": null,
"e": 448,
"s": 361,
"te... |
A scale transform the element by using x-axis with CSS3 | The scaleX(x) method is used to scale transform the element using x-axis.
Let us see the syntax −
scaleX(x)
Here, x is a number representing the scaling factor to apply on the abscissa of each point of the element.
Let us see an example −
div {
width: 60px;
height: 60px;
background-color: yellow;
}
.scaled {
... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "The scaleX(x) method is used to scale transform the element using x-axis."
},
{
"code": null,
"e": 1160,
"s": 1136,
"text": "Let us see the syntax −"
},
{
"code": null,
"e": 1170,
"s": 1160,
"text": "scaleX(x)"
... |
Getting Started with Randomized Optimization in Python | by Genevieve Hayes | Towards Data Science | mlrose provides functionality for implementing some of the most popular randomization and search algorithms, and applying them to a range of different optimization problem domains.
In this tutorial, we will discuss what is meant by an optimization problem and step through an example of how mlrose can be used to solve t... | [
{
"code": null,
"e": 353,
"s": 172,
"text": "mlrose provides functionality for implementing some of the most popular randomization and search algorithms, and applying them to a range of different optimization problem domains."
},
{
"code": null,
"e": 602,
"s": 353,
"text": "In th... |
JavaScript Architecture Flux Components - GeeksforGeeks | 19 Jul, 2021
Flux: It is a JavaScript Architecture or pattern for UI which runs on a unidirectional data flow and has a centralized dispatcher. It is an application architecture designed to build client-side web apps. It is also one of the popular architectures that Facebook uses for building client-side web applicatio... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n19 Jul, 2021"
},
{
"code": null,
"e": 26917,
"s": 26545,
"text": "Flux: It is a JavaScript Architecture or pattern for UI which runs on a unidirectional data flow and has a centralized dispatcher. It is an application architectur... |
Count Subarrays with Consecutive elements differing by 1 - GeeksforGeeks | 07 May, 2021
Given an array arr[] of N integers. The task is to count the total number of subarrays of the given array such that difference between the consecutive elements in the subarrays is one. That is, for any index in the subarrays, arr[i+1] – arr[i] = 1.Note: Do not consider subarrays with single element.Example... | [
{
"code": null,
"e": 26175,
"s": 26147,
"text": "\n07 May, 2021"
},
{
"code": null,
"e": 26487,
"s": 26175,
"text": "Given an array arr[] of N integers. The task is to count the total number of subarrays of the given array such that difference between the consecutive elements in ... |
Python | Join tuple elements in a list - GeeksforGeeks | 21 Feb, 2019
Now days, data is something that is backbone of any Machine Learning technique. The data can come in any form and its sometimes required to be extracted out to be processed. This article deals with the issue of extracting information which is present in tuples in list. Let’s discuss certain ways in which t... | [
{
"code": null,
"e": 24390,
"s": 24362,
"text": "\n21 Feb, 2019"
},
{
"code": null,
"e": 24719,
"s": 24390,
"text": "Now days, data is something that is backbone of any Machine Learning technique. The data can come in any form and its sometimes required to be extracted out to be ... |
Merging only one file from a git branch (patching) | by Daniel Ellis | Towards Data Science | Say you have branches for different aspects of the same project and you want to merge only a single file (e.g. the configuration file). Short of copy-pasting all the changes by hand, how might you approach this problem?
So we have a branch. This branch contains an update, bug-fix or enchantment and we wish to pass that... | [
{
"code": null,
"e": 391,
"s": 171,
"text": "Say you have branches for different aspects of the same project and you want to merge only a single file (e.g. the configuration file). Short of copy-pasting all the changes by hand, how might you approach this problem?"
},
{
"code": null,
"e"... |
Python MySQL - Update Query - GeeksforGeeks | 09 Mar, 2020
A connector is employed when we have to use MySQL with other programming languages. The work of MySQL-connector is to provide access to MySQL Driver to the required language. Thus, it generates a connection between the programming language and the MySQL Server.
The update is used to change the existing val... | [
{
"code": null,
"e": 41614,
"s": 41586,
"text": "\n09 Mar, 2020"
},
{
"code": null,
"e": 41876,
"s": 41614,
"text": "A connector is employed when we have to use MySQL with other programming languages. The work of MySQL-connector is to provide access to MySQL Driver to the require... |
CSS | Pseudo Elements - GeeksforGeeks | 12 Sep, 2021
A CSS pseudo-element is a keyword added to a selector that lets you style a specific part of the selected elements. For Example, Styling the first letter or line of an element,
Insert content before or after the content of an element. All of these can be done using Pseudo Elements in CSS.
Note that in cont... | [
{
"code": null,
"e": 29401,
"s": 29373,
"text": "\n12 Sep, 2021"
},
{
"code": null,
"e": 29578,
"s": 29401,
"text": "A CSS pseudo-element is a keyword added to a selector that lets you style a specific part of the selected elements. For Example, Styling the first letter or line o... |
PyQt efficiently works with relational databases. No SQL queries needed. | Towards Data Science | Python is an easy-to-learn and powerful programming language.
You can get sophisticated outputs, and compared to other languages, you’ll need to write significantly fewer lines of code.
However, when it comes to GUI application development, you can experience difficulties. Especially when you need to work with huge dat... | [
{
"code": null,
"e": 234,
"s": 172,
"text": "Python is an easy-to-learn and powerful programming language."
},
{
"code": null,
"e": 358,
"s": 234,
"text": "You can get sophisticated outputs, and compared to other languages, you’ll need to write significantly fewer lines of code."... |
How to delete all records from a table in Oracle using JDBC API? | The SQL TRUNCATE statement is used to delete all the records from a table.
TRUNCATE TABLE table_name;
To delete all the records from a table from using JDBC API you need to −
Register the Driver: Register the driver class using the registerDriver() method of the DriverManager class. Pass the driver class name to it, as... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "The SQL TRUNCATE statement is used to delete all the records from a table."
},
{
"code": null,
"e": 1164,
"s": 1137,
"text": "TRUNCATE TABLE table_name;"
},
{
"code": null,
"e": 1237,
"s": 1164,
"text": "To delete... |
C++ Program to Find Fibonacci Numbers using Iteration | The following is an example to find fibonacci series using iteration.
Live Demo
#include <iostream>
using namespace std;
void fib(int num) {
int x = 0, y = 1, z = 0;
for (int i = 0; i < num; i++) {
cout << x << " ";
z = x + y;
x = y;
y = z;
}
}
int main() {
int num;
cout << "Ente... | [
{
"code": null,
"e": 1132,
"s": 1062,
"text": "The following is an example to find fibonacci series using iteration."
},
{
"code": null,
"e": 1143,
"s": 1132,
"text": " Live Demo"
},
{
"code": null,
"e": 1484,
"s": 1143,
"text": "#include <iostream>\nusing nam... |
Send CSV payload to API with Data Factory | by Miia Rämö | Towards Data Science | One might think that there is a straight forward way to read data from SQL table/CSV Blob with Data Factory and send it to an API expecting a text body with CSV format. Well, to my knowledge there is not, and we need to create a Function app to achieve this.
One example use case, where I’ve come across this problem is ... | [
{
"code": null,
"e": 431,
"s": 172,
"text": "One might think that there is a straight forward way to read data from SQL table/CSV Blob with Data Factory and send it to an API expecting a text body with CSV format. Well, to my knowledge there is not, and we need to create a Function app to achieve th... |
How to Format date using strftime() in Python ? - GeeksforGeeks | 17 Apr, 2021
In this article, we will see how to format date using strftime() in Python. localtime() and gmtime() returns a tuple representing a time and this tuple is converted into a string as specified by the format argument using python time method strftime().
Syntax:
time.strftime(format[, sec])
sec: This is the t... | [
{
"code": null,
"e": 24858,
"s": 24830,
"text": "\n17 Apr, 2021"
},
{
"code": null,
"e": 25110,
"s": 24858,
"text": "In this article, we will see how to format date using strftime() in Python. localtime() and gmtime() returns a tuple representing a time and this tuple is converte... |
Go - Slices | Go Slice is an abstraction over Go Array. Go Array allows you to define variables that can hold several data items of the same kind but it does not provide any inbuilt method to increase its size dynamically or get a sub-array of its own. Slices overcome this limitation. It provides many utility functions required on A... | [
{
"code": null,
"e": 2300,
"s": 1937,
"text": "Go Slice is an abstraction over Go Array. Go Array allows you to define variables that can hold several data items of the same kind but it does not provide any inbuilt method to increase its size dynamically or get a sub-array of its own. Slices overcom... |
3 Great Julia Editors — VSCode, Juno and Jupyter Notebooks | by Alan Jones | Towards Data Science | Julia is a young language and so support is not as comprehensive as it is for other more established languages such as Java or Python. However, while there may not be a vast number of development environments available for it, you do have the choice of some good ones.
I’m going to introduce you to my favorites; this wo... | [
{
"code": null,
"e": 315,
"s": 46,
"text": "Julia is a young language and so support is not as comprehensive as it is for other more established languages such as Java or Python. However, while there may not be a vast number of development environments available for it, you do have the choice of som... |
How to create a Stored procedure in Oracle database using JDBC API? | Stored procedures are sub routines, segment of SQL statements which are stored in SQL catalog. All the applications that can access Relational databases (Java, Python, PHP etc.), can access stored procedures.
Stored procedures contain IN and OUT parameters or both. They may return result sets in case you use SELECT sta... | [
{
"code": null,
"e": 1271,
"s": 1062,
"text": "Stored procedures are sub routines, segment of SQL statements which are stored in SQL catalog. All the applications that can access Relational databases (Java, Python, PHP etc.), can access stored procedures."
},
{
"code": null,
"e": 1442,
... |
Arcade Library in Python - GeeksforGeeks | 02 Nov, 2020
For many years, Python game programmers were limited to the Pygame Module. But, now we have other choices as well i.e Arcade Python Library. The Arcade library is a modern Python Module used widely for developing 2D video games with compelling graphics and sound. Arcade is an object-oriented library. It ca... | [
{
"code": null,
"e": 24368,
"s": 24340,
"text": "\n02 Nov, 2020"
},
{
"code": null,
"e": 24823,
"s": 24368,
"text": "For many years, Python game programmers were limited to the Pygame Module. But, now we have other choices as well i.e Arcade Python Library. The Arcade library is ... |
HTML | <frameset> cols Attribute - GeeksforGeeks | 17 Dec, 2021
The HTML <frameset> cols Attribute is used to specify the size and the number of columns in a frameset. The width of each frame is separated by a comma.
Note: It is not supported in HTML5.
Syntax:
<frameset cols="pixels | % | *">
Attribute Values:
pixels: The width of column is set in terms of pixels. Exam... | [
{
"code": null,
"e": 24636,
"s": 24608,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 24789,
"s": 24636,
"text": "The HTML <frameset> cols Attribute is used to specify the size and the number of columns in a frameset. The width of each frame is separated by a comma."
},
{
... |
Absolute and Relative Imports in Python - GeeksforGeeks | 29 Dec, 2018
Working of import in python :
Import in Python is similar to #include header_file in C/C++. Python modules can get access to code from another module by importing the file/function using import. The import statement is the most common way of invoking the import machinery, but it is not the only way. Import... | [
{
"code": null,
"e": 24647,
"s": 24619,
"text": "\n29 Dec, 2018"
},
{
"code": null,
"e": 24677,
"s": 24647,
"text": "Working of import in python :"
},
{
"code": null,
"e": 25031,
"s": 24677,
"text": "Import in Python is similar to #include header_file in C/C++... |
Kafdrop. An Open-Source Kafka UI | by Emil Koutanov | Towards Data Science | As a messaging platform, Kafka needs no introduction. Since its inception, it has virtually rewritten the book on event streaming and has catalyzed the adoption of the now household design patterns — microservices, event-sourcing, and CQRS.
Being such a godsend, it almost gets away with its notorious lack of tooling. Y... | [
{
"code": null,
"e": 412,
"s": 171,
"text": "As a messaging platform, Kafka needs no introduction. Since its inception, it has virtually rewritten the book on event streaming and has catalyzed the adoption of the now household design patterns — microservices, event-sourcing, and CQRS."
},
{
... |
My pick for top 48 advanced database systems interview questions | by Saeed Mohajeryami | Towards Data Science | Besides knowing how to query, you should have some knowledge about database systems. This is expected, and these knowledge questions often come up during the interview. Here I try to pick my top favorite advanced database system interview questions. The focus is on “advanced” and I assume you are familiar with database... | [
{
"code": null,
"e": 750,
"s": 172,
"text": "Besides knowing how to query, you should have some knowledge about database systems. This is expected, and these knowledge questions often come up during the interview. Here I try to pick my top favorite advanced database system interview questions. The f... |
Find distance between two nodes of a Binary Tree in C++ Program | In this problem, we are given a binary tree and two nodes. Our task is to create a program to Find distance between two nodes of a Binary Tree.
We need to find the distance between two nodes which is the minimum number of edges that will be traversed when we go from one node to another node.
Let’s take an example to un... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "In this problem, we are given a binary tree and two nodes. Our task is to create a program to Find distance between two nodes of a Binary Tree."
},
{
"code": null,
"e": 1355,
"s": 1206,
"text": "We need to find the distance between t... |
Find closest value for every element in array - GeeksforGeeks | 02 Dec, 2018
Given an array of integers, find the closest element for every element.
Examples:
Input : arr[] = {10, 5, 11, 6, 20, 12}Output : 6, -1, 10, 5, 12, 11
Input : arr[] = {10, 5, 11, 10, 20, 12}Output : 5 -1 10 5 12 11
A simple solution is to run two nested loops. We pick an outer element one by one. For every ... | [
{
"code": null,
"e": 24214,
"s": 24186,
"text": "\n02 Dec, 2018"
},
{
"code": null,
"e": 24286,
"s": 24214,
"text": "Given an array of integers, find the closest element for every element."
},
{
"code": null,
"e": 24296,
"s": 24286,
"text": "Examples:"
},
... |
Array of Arrays Representation in Data Structure | In this section we will see another representation of multidimensional arrays. Here we will see the Array of Arrays representation. In this form, we have an array, that is holding the starting addresses of multiple arrays. The representation will be look like this.
This is a two-dimensional array x of size [7 x 8]. Eac... | [
{
"code": null,
"e": 1328,
"s": 1062,
"text": "In this section we will see another representation of multidimensional arrays. Here we will see the Array of Arrays representation. In this form, we have an array, that is holding the starting addresses of multiple arrays. The representation will be loo... |
3 Ways To Compute A Weighted Average in Python | by AnBento | Towards Data Science | Update: Many of you contacted me asking for valuable resources to automate Excel tasks with Python or to apply popular statistical concepts in Python. Below I share four courses that I would recommend:
Programming For Data Science In Python (Nano-Degree) →Very high quality course! **UP TO 75% DISCOUNT IN JAN 2022**
Pyt... | [
{
"code": null,
"e": 248,
"s": 46,
"text": "Update: Many of you contacted me asking for valuable resources to automate Excel tasks with Python or to apply popular statistical concepts in Python. Below I share four courses that I would recommend:"
},
{
"code": null,
"e": 363,
"s": 248... |
Queue remove() method in Java - GeeksforGeeks | 26 Sep, 2018
The remove() method of Queue Interface returns and removes the element at the front the container. It deletes the head of the container. The method throws an NoSuchElementException when the Queue is empty.
Syntax:
E remove()
Returns: This method returns the head of the Queue.
Exception: The function throws... | [
{
"code": null,
"e": 23948,
"s": 23920,
"text": "\n26 Sep, 2018"
},
{
"code": null,
"e": 24154,
"s": 23948,
"text": "The remove() method of Queue Interface returns and removes the element at the front the container. It deletes the head of the container. The method throws an NoSuc... |
Finding the sum of integers from multiple MySQL rows in same column? | Let us first create a table −
mysql> create table DemoTable739 (Price int);
Query OK, 0 rows affected (0.65 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable739 values(100);
Query OK, 1 row affected (0.15 sec)
mysql> insert into DemoTable739 values(50);
Query OK, 1 row affected (... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1175,
"s": 1092,
"text": "mysql> create table DemoTable739 (Price int);\nQuery OK, 0 rows affected (0.65 sec)"
},
{
"code": null,
"e": 1231,
"s": 1175,
"text"... |
Django Template Filters - GeeksforGeeks | 07 Feb, 2020
Django Template Engine provides filters which are used to transform the values of variables;es and tag arguments. We have already discussed major Django Template Tags. Tags can’t modify value of a variable whereas filters can be used for incrementing value of a variable or modifying it to one’s own need.
{... | [
{
"code": null,
"e": 24221,
"s": 24193,
"text": "\n07 Feb, 2020"
},
{
"code": null,
"e": 24527,
"s": 24221,
"text": "Django Template Engine provides filters which are used to transform the values of variables;es and tag arguments. We have already discussed major Django Template T... |
Accounting - Basic Concepts | The first two accounting concepts, namely, Business Entity Concept and Money Measurement Concept are the fundamental concepts of accounting. Let us go through each one of them briefly:
According to this concept, the business and the owner of the business are two different entities. In other words, I and my business are... | [
{
"code": null,
"e": 2824,
"s": 2639,
"text": "The first two accounting concepts, namely, Business Entity Concept and Money Measurement Concept are the fundamental concepts of accounting. Let us go through each one of them briefly:"
},
{
"code": null,
"e": 2970,
"s": 2824,
"text"... |
Applying a Function over an Object in R Programming - sapply() Function - GeeksforGeeks | 19 Jun, 2020
sapply() function in R Language takes list, vector or data frame as input and gives output in vector or matrix. It is useful for operations on list objects and returns a list object of same length of original set.
Syntax: sapply(X, FUN)
Parameters:X: A vector or an objectFUN: Function applied to each eleme... | [
{
"code": null,
"e": 24815,
"s": 24787,
"text": "\n19 Jun, 2020"
},
{
"code": null,
"e": 25029,
"s": 24815,
"text": "sapply() function in R Language takes list, vector or data frame as input and gives output in vector or matrix. It is useful for operations on list objects and ret... |
How we can copy Python modules from one system to another? | If you have your own Python modules you want to copy, you can simply copy them and run on other systems with Python installed. If you want to copy installed modules, the best way is to install the same version of Python on the second system. Then run
$ pip freeze > installed_modules.txt
on the first system to get a lis... | [
{
"code": null,
"e": 1313,
"s": 1062,
"text": "If you have your own Python modules you want to copy, you can simply copy them and run on other systems with Python installed. If you want to copy installed modules, the best way is to install the same version of Python on the second system. Then run"
... |
C# Switch | Use the switch statement to select one of many code blocks to be executed.
switch(expression)
{
case x:
// code block
break;
case y:
// code block
break;
default:
// code block
break;
}
This is how it works:
The switch expression is evaluated once
The value of the expression is compared ... | [
{
"code": null,
"e": 75,
"s": 0,
"text": "Use the switch statement to select one of many code blocks to be executed."
},
{
"code": null,
"e": 218,
"s": 75,
"text": "switch(expression) \n{\n case x:\n // code block\n break;\n case y:\n // code block\n break;\n defau... |
Powershell - Read-Host Cmdlet | Read-Host cmdlet is used to read from the console.
In these example, we're see the Read-Host cmdlet in action.
In this example, we'll ask the user to pass an input and read the input into a variable.
$choice = Read-Host "Please put your choice"
Powershell will show a popup to enter the value. Once you enter the value, ... | [
{
"code": null,
"e": 2085,
"s": 2034,
"text": "Read-Host cmdlet is used to read from the console."
},
{
"code": null,
"e": 2145,
"s": 2085,
"text": "In these example, we're see the Read-Host cmdlet in action."
},
{
"code": null,
"e": 2234,
"s": 2145,
"text": "... |
Java Examples - Matching Phone Numbers | How to match phone numbers in a list?
Following example shows how to match phone numbers in a list to a particle pattern by using phone.matches(phoneNumberPattern) method.
public class MatchPhoneNumber {
public static void main(String args[]) {
isPhoneValid("1-999-585-4009");
isPhoneValid("999-585-4009")... | [
{
"code": null,
"e": 2106,
"s": 2068,
"text": "How to match phone numbers in a list?"
},
{
"code": null,
"e": 2240,
"s": 2106,
"text": "Following example shows how to match phone numbers in a list to a particle pattern by using phone.matches(phoneNumberPattern) method."
},
{
... |
Precision Handling in Java | Let us see how precisions are handled in Java −
Live Demo
import java.io.*;
import java.lang.*;
public class Demo{
public static void main(String[] args){
double my_val = 34.909;
System.out.println("The formatted value of 34.909 is ");
System.out.println(String.format("%.7f", my_val));
doubl... | [
{
"code": null,
"e": 1110,
"s": 1062,
"text": "Let us see how precisions are handled in Java −"
},
{
"code": null,
"e": 1121,
"s": 1110,
"text": " Live Demo"
},
{
"code": null,
"e": 1530,
"s": 1121,
"text": "import java.io.*;\nimport java.lang.*;\npublic class... |
Unit Testing for C# Code | Unit testing is a key for C# code since it can help in maintaining code in the development process. It lets you know about the problems in the development cycle.
With Unit Testing, you can make the code reliable and reusable.
One of the fundamental principles of adopting unit testing is to follow a TDD (Test Driven Dev... | [
{
"code": null,
"e": 1349,
"s": 1187,
"text": "Unit testing is a key for C# code since it can help in maintaining code in the development process. It lets you know about the problems in the development cycle."
},
{
"code": null,
"e": 1413,
"s": 1349,
"text": "With Unit Testing, y... |
How to Scrape Data From Local HTML Files using Python? | 21 Apr, 2021
BeautifulSoup module in Python allows us to scrape data from local HTML files. For some reason, website pages might get stored in a local (offline environment), and whenever in need, there may be requirements to get the data from them. Sometimes there may be a need to get data from multiple Locally stored ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Apr, 2021"
},
{
"code": null,
"e": 503,
"s": 28,
"text": "BeautifulSoup module in Python allows us to scrape data from local HTML files. For some reason, website pages might get stored in a local (offline environment), and whenever i... |
Pytest Plugins to Love ❤️. My top 5 and honorable 50 out of 600+... | by Martin Thoma | Towards Data Science | Pytest is extensible and has plenty of plugins. You don’t need to use any of them, but you might find some very useful. I love this because you have an easy time to get started with unit testing, while still finding amazing stuff when you’re more experienced 🤩
In this article, I’ll show you examples of plugins I use a... | [
{
"code": null,
"e": 308,
"s": 47,
"text": "Pytest is extensible and has plenty of plugins. You don’t need to use any of them, but you might find some very useful. I love this because you have an easy time to get started with unit testing, while still finding amazing stuff when you’re more experienc... |
Wand splice() function - Python - GeeksforGeeks | 10 Aug, 2021
The splice() function is an inbuilt function in the Python Wand ImageMagick library which is used to partition the image by splicing a width x height rectangle at (x, y) offset coordinate. The space inserted will be replaced by the available background color.
Syntax:
splice(width, height, x, y)
Parameters... | [
{
"code": null,
"e": 24591,
"s": 24563,
"text": "\n10 Aug, 2021"
},
{
"code": null,
"e": 24852,
"s": 24591,
"text": "The splice() function is an inbuilt function in the Python Wand ImageMagick library which is used to partition the image by splicing a width x height rectangle at ... |
GATE | GATE-CS-2007 | Question 64 - GeeksforGeeks | 28 Jun, 2021
Consider the following schedules involving two transactions. Which one of the following statements is TRUE?
(A) Both S1 and S2 are conflict serializable.(B) S1 is conflict serializable and S2 is not conflict serializable.(C) S1 is not conflict serializable and S2 is conflict serializable.(D) Both S1 and S2... | [
{
"code": null,
"e": 24524,
"s": 24496,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24632,
"s": 24524,
"text": "Consider the following schedules involving two transactions. Which one of the following statements is TRUE?"
},
{
"code": null,
"e": 24886,
"s": 24... |
What is a reentrant function in C/C++? | Here we will see what is the reentrant function in C or C++. One function is said to be a reentrant function if there is a provision to interrupt that function in the course of execution, then service the ISR (Interrupt Service Routine) and then resume the task. This type of functions is used in different cases like, r... | [
{
"code": null,
"e": 1422,
"s": 1062,
"text": "Here we will see what is the reentrant function in C or C++. One function is said to be a reentrant function if there is a provision to interrupt that function in the course of execution, then service the ISR (Interrupt Service Routine) and then resume ... |
WebGL - Quick Guide | A few years back, Java applications – as a combination of applets and JOGL – were used to process 3D graphics on the Web by addressing the GPU (Graphical Processing Unit). As applets require a JVM to run, it became difficult to rely on Java applets. A few years later, people stopped using Java applets.
The Stage3D APIs... | [
{
"code": null,
"e": 2351,
"s": 2047,
"text": "A few years back, Java applications – as a combination of applets and JOGL – were used to process 3D graphics on the Web by addressing the GPU (Graphical Processing Unit). As applets require a JVM to run, it became difficult to rely on Java applets. A f... |
GATE | GATE CS 2020 | Question 48 - GeeksforGeeks | 26 May, 2021
An organization requires a range of IP address to assign one to each of its 1500 computers. The organization has approached an Internet Service Provider (ISP) for this task. The ISP uses CIDR and serves the requests from the available IP address space 202.61.0.0/17. The ISP wants to assign an address space... | [
{
"code": null,
"e": 24083,
"s": 24055,
"text": "\n26 May, 2021"
},
{
"code": null,
"e": 24628,
"s": 24083,
"text": "An organization requires a range of IP address to assign one to each of its 1500 computers. The organization has approached an Internet Service Provider (ISP) for ... |
Alternative for <blink> tag - GeeksforGeeks | 04 Jan, 2022
In this article we will learn about the alternatives of the blink tag of HTML. The blink tag doesn’t have any alternative HTML tag but the same effect can be alternatively created with the help of CSS
Example:
In this example we will be using CSS animations to get the blink-effect
html
<!DOCTYPE html><html... | [
{
"code": null,
"e": 23989,
"s": 23961,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 24190,
"s": 23989,
"text": "In this article we will learn about the alternatives of the blink tag of HTML. The blink tag doesn’t have any alternative HTML tag but the same effect can be alter... |
You Should Start Using FastAPI Now | by Tivadar Danka | Towards Data Science | Python has always been a popular choice for developing lightweight web apps, thanks to the awesome frameworks like Flask, Django, Falcon and many others. Due to Python’s position as the number one language for machine learning, it is particularly convenient for packaging models and exposing them as a service.
For many ... | [
{
"code": null,
"e": 358,
"s": 47,
"text": "Python has always been a popular choice for developing lightweight web apps, thanks to the awesome frameworks like Flask, Django, Falcon and many others. Due to Python’s position as the number one language for machine learning, it is particularly convenien... |
Increase or decrease the size of a font with CSS | The font-size property is used to increase or decrease the font size. The font-size property is used to control the size of fonts. Possible values could be xx-small, x-small, small, medium, large, x-large, xx-large, smaller, larger, size in pixels or in %.
<html>
<head>
</head>
<body>
<p style = "font-si... | [
{
"code": null,
"e": 1319,
"s": 1062,
"text": "The font-size property is used to increase or decrease the font size. The font-size property is used to control the size of fonts. Possible values could be xx-small, x-small, small, medium, large, x-large, xx-large, smaller, larger, size in pixels or in... |
Dynamically Add/Delete HTML Table Rows Using Javascript | Theory of Computation
In this article, you will learn how to create a simple user interface where a user can add or delete multiple table rows in a form dynamically using Javascript.
Sometimes, there may be a requirement for the user to add multiple repeated row's fields in a form. We cannot assume how many fields we s... | [
{
"code": null,
"e": 112,
"s": 90,
"text": "Theory of Computation"
},
{
"code": null,
"e": 273,
"s": 112,
"text": "In this article, you will learn how to create a simple user interface where a user can add or delete multiple table rows in a form dynamically using Javascript."
}... |
Program to find whether a string is alphanumeric. | Any word that contains numbers and letters is known as alphanumeric. The following regular expression matches the combination of numbers and letters.
"^[a-zA-Z0-9]+$";
The matches method of the String class accepts a regular expression (in the form of a String) and matches it with the current string in case the match t... | [
{
"code": null,
"e": 1212,
"s": 1062,
"text": "Any word that contains numbers and letters is known as alphanumeric. The following regular expression matches the combination of numbers and letters."
},
{
"code": null,
"e": 1230,
"s": 1212,
"text": "\"^[a-zA-Z0-9]+$\";"
},
{
... |
Ruby | Enumerable each_cons() function - GeeksforGeeks | 05 Dec, 2019
The each_cons() of enumerable is an inbuilt method in Ruby iterates for consecutive N elements starting from each element every time. If no block is given, it returns the enumerator.
Syntax: enu.each_cons(N) { |obj| block }
Parameters: The function takes the block which is used to check the condition and N... | [
{
"code": null,
"e": 23595,
"s": 23567,
"text": "\n05 Dec, 2019"
},
{
"code": null,
"e": 23778,
"s": 23595,
"text": "The each_cons() of enumerable is an inbuilt method in Ruby iterates for consecutive N elements starting from each element every time. If no block is given, it retu... |
Create empty dataframe in Pandas - GeeksforGeeks | 28 Jul, 2020
The Pandas Dataframe is a structure that has data in the 2D format and labels with it. DataFrames are widely used in data science, machine learning, and other such places. DataFrames are the same as SQL tables or Excel sheets but these are faster in use.Empty DataFrame could be created with the help of pan... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 24251,
"s": 23901,
"text": "The Pandas Dataframe is a structure that has data in the 2D format and labels with it. DataFrames are widely used in data science, machine learning, and other such... |
Add headers inside the dropdown menu in Bootstrap | To add headers inside the dropdown menu, use the .dropdown-header class in Boostrap. The .dropdown-menu class is used to add a dropdown menu.
You can try to run the following code to implement the dropdown-header class in Bootstrap −
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "To add headers inside the dropdown menu, use the .dropdown-header class in Boostrap. The .dropdown-menu class is used to add a dropdown menu."
},
{
"code": null,
"e": 1296,
"s": 1204,
"text": "You can try to run the following code to... |
Count of Numbers in a Range where digit d occurs exactly K times - GeeksforGeeks | 15 Jun, 2021
Given two positive integers L and R which represents a range and two more positive integers d and K. The task is to find the count of numbers in the range where digit d occurs exactly K times.Examples:
Input: L = 11, R = 100, d = 2, k = 1 Output: 17 Required numbers are 12, 20, 21, 23, 24, 25, 26, 27, 28... | [
{
"code": null,
"e": 24702,
"s": 24674,
"text": "\n15 Jun, 2021"
},
{
"code": null,
"e": 24906,
"s": 24702,
"text": "Given two positive integers L and R which represents a range and two more positive integers d and K. The task is to find the count of numbers in the range where di... |
Assigning arrays in Java. | While creating variables first of all we will declare them, initialize them, assign/re-assign values to them.
Similarly, while creating arrays −
You can declare an array just like a variable −
You can declare an array just like a variable −
int myArray[];
You can create an array just like an object using the new keywor... | [
{
"code": null,
"e": 1172,
"s": 1062,
"text": "While creating variables first of all we will declare them, initialize them, assign/re-assign values to them."
},
{
"code": null,
"e": 1207,
"s": 1172,
"text": "Similarly, while creating arrays −"
},
{
"code": null,
"e": ... |
How to find the device driver version using PowerShell? | To find the device driver version using PowerShell, we need to use the class win32_PnpSignedDriver of the WMI object. For example,
Get-WmiObject win32_PnpSignedDriver
Or if you are using PowerShell core (PowerShell 6.0 or later), you can use the CIM Instance command. For example,
Get-CimInstance win32_PnpSignedDriver
T... | [
{
"code": null,
"e": 1193,
"s": 1062,
"text": "To find the device driver version using PowerShell, we need to use the class win32_PnpSignedDriver of the WMI object. For example,"
},
{
"code": null,
"e": 1229,
"s": 1193,
"text": "Get-WmiObject win32_PnpSignedDriver"
},
{
"... |
A detailed guide to PyTorch’s nn.Transformer() module. | by Daniel Melchor | Towards Data Science | I have recently been getting more involved in the world of machine learning. When I’ve had a problem understanding a complex issue or coding a neural network, the internet has seemed to have all the answers: from a simple linear regression to complex convolutional networks. At least that is what I thought...
Once I beg... | [
{
"code": null,
"e": 481,
"s": 171,
"text": "I have recently been getting more involved in the world of machine learning. When I’ve had a problem understanding a complex issue or coding a neural network, the internet has seemed to have all the answers: from a simple linear regression to complex conv... |
Kivy – Python Framework for Mobile App development | 20 Aug, 2020
Kivy is a free and open-source Python library used for developing mobile applications and other multitouch application software with a Natural User Interface.
Installation
We can download the latest version of Kivy from here. After opening the link you can choose your Platform and follow the instructions s... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Aug, 2020"
},
{
"code": null,
"e": 211,
"s": 52,
"text": "Kivy is a free and open-source Python library used for developing mobile applications and other multitouch application software with a Natural User Interface."
},
{
"... |
How to Update Contents of a Table using JDBC Connection? | 08 Dec, 2020
JDBC (Java Database Connectivity) is basically a standard API(application interface) between the java programming language and various databases like Oracle, SQL, PostgreSQL, etc. It connects the front end(for interacting with the users) with the backend( for storing data).
1. Create Database: You can crea... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Dec, 2020"
},
{
"code": null,
"e": 303,
"s": 28,
"text": "JDBC (Java Database Connectivity) is basically a standard API(application interface) between the java programming language and various databases like Oracle, SQL, PostgreSQL, ... |
Rename all file names in your directory using Python | 15 Aug, 2021
Given multiple files in a directory having different names, the task is to rename all those files in sorted order. We can use OS module in order to do this operation. The OS module in Python provides functions for interacting with the operating system and provides a portable way of using operating system-d... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Aug, 2021"
},
{
"code": null,
"e": 473,
"s": 28,
"text": "Given multiple files in a directory having different names, the task is to rename all those files in sorted order. We can use OS module in order to do this operation. The OS m... |
Python | Convert string tuples to list tuples | 18 Oct, 2019
Sometimes, while working with Python we can have a problem in which we have a list of records in form of tuples in stringified form and we desire to convert them to list of tuples. This kind of problem can have it’s occurrence in data science domain. Let’s discuss certain ways in which this task can be per... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Oct, 2019"
},
{
"code": null,
"e": 343,
"s": 28,
"text": "Sometimes, while working with Python we can have a problem in which we have a list of records in form of tuples in stringified form and we desire to convert them to list of tu... |
Maximum array from two given arrays keeping order same | 22 Jun, 2021
Given two same-sized arrays A[] and B[] (both arrays contain distinct elements individually but may have some common elements), the task is to form a third (or result) array of the same size. The resulting array should have maximum n elements from both arrays. It should have chosen elements of A[] first, t... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Jun, 2021"
},
{
"code": null,
"e": 557,
"s": 54,
"text": "Given two same-sized arrays A[] and B[] (both arrays contain distinct elements individually but may have some common elements), the task is to form a third (or result) array ... |
How to auto like all the comments on a facebook post using JavaScript ? | 07 Aug, 2020
In this article, we are going to learn how to like all the comments on a Facebook post automatically. Many times we want to like all the comments of friends on our post or on any other’s post, so this script helps us to save our time and effort by automatically liking all the comments on the post.
Approach... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Aug, 2020"
},
{
"code": null,
"e": 351,
"s": 52,
"text": "In this article, we are going to learn how to like all the comments on a Facebook post automatically. Many times we want to like all the comments of friends on our post or on... |
Java Program to Reverse a List | 21 Oct, 2021
Reversing a list means after reversing the list, the first element should be swapped with the last element, the second element should be swapped with the second last element, and so on till the middle element and the resultant list is the reversed list.
Example:
Input:
"PLATFORM", "LEARNING", "BEST", "THE... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 308,
"s": 54,
"text": "Reversing a list means after reversing the list, the first element should be swapped with the last element, the second element should be swapped with the second last element,... |
PyQt5 - Auto Adjusting Progress Bar size - GeeksforGeeks | 22 Apr, 2020
In this article we will see how to adjust the size of progress bar. Adjusting size means setting the size of progress bar as much as it is needed, nor too big nor to small, just the size which can comprise all the text in it. In order to do this we will use adjustSize method.
Note : Adjusting size will set... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 24178,
"s": 23901,
"text": "In this article we will see how to adjust the size of progress bar. Adjusting size means setting the size of progress bar as much as it is needed, nor too big nor ... |
How do you throw an Exception without breaking a for loop in java? | Whenever an exception occurred in a loop the control gets out of the loop, by handling the exception the statements after the catch block in the method will get executed. But, the loop breaks.
Live Demo
public class ExceptionInLoop{
public static void sampleMethod(){
String str[] = {"Mango", "Apple", "Banana"... | [
{
"code": null,
"e": 1255,
"s": 1062,
"text": "Whenever an exception occurred in a loop the control gets out of the loop, by handling the exception the statements after the catch block in the method will get executed. But, the loop breaks."
},
{
"code": null,
"e": 1266,
"s": 1255,
... |
Animate transform-origin property with CSS Animation | To implement animation on the transform-origin property with CSS, you can try to run the following code
Live Demo
<!DOCTYPE html>
<html>
<head>
<style>
#demo1 {
position: relative;
height: 300px;
width: 400px;
border: 2px solid black;
margin:... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "To implement animation on the transform-origin property with CSS, you can try to run the following code"
},
{
"code": null,
"e": 1176,
"s": 1166,
"text": "Live Demo"
},
{
"code": null,
"e": 1996,
"s": 1176,
"text"... |
How to create Definition Lists in HTML5? | Use the <dl> tag to add definition lists. The HTML <dl> tag is used for declaring a definition list. This tag is used within <dd> tag. A definition list is similar to other lists but in a definition list, each list item contains two entries; a term and a description.
You can try to run the following code to create Defi... | [
{
"code": null,
"e": 1330,
"s": 1062,
"text": "Use the <dl> tag to add definition lists. The HTML <dl> tag is used for declaring a definition list. This tag is used within <dd> tag. A definition list is similar to other lists but in a definition list, each list item contains two entries; a term and ... |
AI-Powered Code Completion in JupyterLab | by Robert Ritz | Towards Data Science | As a data scientist, you almost surely use a form of Jupyter Notebooks. Hopefully, you have moved over to the goodness of JupyterLab with its integrated sidebar, tabs, and more. When it first launched in 2018, JupyterLab was great but felt it was missing some things.
Now you can add a visual debugger and there is even ... | [
{
"code": null,
"e": 440,
"s": 172,
"text": "As a data scientist, you almost surely use a form of Jupyter Notebooks. Hopefully, you have moved over to the goodness of JupyterLab with its integrated sidebar, tabs, and more. When it first launched in 2018, JupyterLab was great but felt it was missing ... |
Convert Dashes to CamelCase in PHP | Following is the code to convert dashes to CamelCase in PHP −
Sample input − this-is-a-test-string
Sample output − thisIsATestString
Note − There is no need to use regex or callbacks. It can be achieved using ucwords.
function dashToCamelCase($string, $capitalizeFirstCharacter = false) {
$str = str_replace(' ', '', ... | [
{
"code": null,
"e": 1124,
"s": 1062,
"text": "Following is the code to convert dashes to CamelCase in PHP −"
},
{
"code": null,
"e": 1161,
"s": 1124,
"text": "Sample input − this-is-a-test-string"
},
{
"code": null,
"e": 1195,
"s": 1161,
"text": "Sample outpu... |
Specify a path for a file or a directory in Java | The path for a file can be obtained using the method java.io.File.getPath(). This method returns the abstract pathname in the form of a pathname string and it requires no parameters.
A program that demonstrates this is given as follows −
Live Demo
import java.io.File;
public class Demo {
public static void main(Str... | [
{
"code": null,
"e": 1245,
"s": 1062,
"text": "The path for a file can be obtained using the method java.io.File.getPath(). This method returns the abstract pathname in the form of a pathname string and it requires no parameters."
},
{
"code": null,
"e": 1300,
"s": 1245,
"text": ... |
How to delete registry key value (property) using PowerShell? | To delete the registry key value using PowerShell, we can use the Remove-ItemProperty command. Suppose we have the registry NodeSoftware and its Property is AppSecurity. We need to delete its key using the Remove-ItemProperty command.
PS C:\> Get-Item HKLM:\SOFTWARE\NodeSoftware
Hive: HKEY_LOCAL_MACHINE\SOFTWARE
Name ... | [
{
"code": null,
"e": 1297,
"s": 1062,
"text": "To delete the registry key value using PowerShell, we can use the Remove-ItemProperty command. Suppose we have the registry NodeSoftware and its Property is AppSecurity. We need to delete its key using the Remove-ItemProperty command."
},
{
"cod... |
INDEX-MATCH — An upgrade on VLOOKUP functions | by Anmol Bansal | Towards Data Science | In a previous article, we discussed about how and when to use VLOOKUP functions and what are the issues that we might face while using them. This article, on the other hand, will take you to a journey to understand an upgraded version of VLOOKUP. This upgrade is a combination of two functions in spreadsheets — INDEX an... | [
{
"code": null,
"e": 585,
"s": 172,
"text": "In a previous article, we discussed about how and when to use VLOOKUP functions and what are the issues that we might face while using them. This article, on the other hand, will take you to a journey to understand an upgraded version of VLOOKUP. This upg... |
Check if count of divisors is even or odd in Python | Suppose we have a number n, we have to find its total number of divisors are even or odd.
So, if the input is like n = 75, then the output will be Even, as the divisors are [1, 3, 5, 15, 25, 75].
To solve this we shall follow one simple and efficient approach. We have observed that when a number is perfect square then ... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "Suppose we have a number n, we have to find its total number of divisors are even or odd."
},
{
"code": null,
"e": 1258,
"s": 1152,
"text": "So, if the input is like n = 75, then the output will be Even, as the divisors are [1, 3, 5,... |
Android Project folder Structure - GeeksforGeeks | 02 Mar, 2022
Android Studio is the official IDE (Integrated Development Environment) developed by JetBrains community which is freely provided by Google for android app development.After completing the setup of Android Architecture we can create android application in the studio. We need to create new project for each ... | [
{
"code": null,
"e": 24664,
"s": 24636,
"text": "\n02 Mar, 2022"
},
{
"code": null,
"e": 25058,
"s": 24664,
"text": "Android Studio is the official IDE (Integrated Development Environment) developed by JetBrains community which is freely provided by Google for android app develop... |
java.util.regex.Pattern.quote() Method | The java.util.regex.Pattern.quote(String s) method returns a literal pattern String for the specified String.
Following is the declaration for java.util.regex.Pattern.quote(String s) method.
public static String quote(String s)
s − The string to be literalized.
s − The string to be literalized.
A literal string replac... | [
{
"code": null,
"e": 2234,
"s": 2124,
"text": "The java.util.regex.Pattern.quote(String s) method returns a literal pattern String for the specified String."
},
{
"code": null,
"e": 2315,
"s": 2234,
"text": "Following is the declaration for java.util.regex.Pattern.quote(String s)... |
Puppet - Environment Conf | In Puppet, all environments have the environment.conf file. This file can override several default settings whenever the master is serving any of the nodes or all the nodes assigned to that particular environment.
In Puppet, for all the environments which are defined, environment.conf file is located at the top level o... | [
{
"code": null,
"e": 2387,
"s": 2173,
"text": "In Puppet, all environments have the environment.conf file. This file can override several default settings whenever the master is serving any of the nodes or all the nodes assigned to that particular environment."
},
{
"code": null,
"e": 27... |
Write a program in Java to find the missing positive number in a given array of unsorted integers | Let’s suppose we have given an array of unsorted integers. The task is to find the positive missing number which is not present in the given array in the range [0 to n]. For example,
Input-1 −
N = 9
arr = [0,2,5,9,1,7,4,3,6]
Output −
8
Explanation − In the given unsorted array, ‘8’ is the only positive integer that is ... | [
{
"code": null,
"e": 1245,
"s": 1062,
"text": "Let’s suppose we have given an array of unsorted integers. The task is to find the positive missing number which is not present in the given array in the range [0 to n]. For example,"
},
{
"code": null,
"e": 1255,
"s": 1245,
"text": ... |
isalnum() function in C Language | The function isalnum() is used to check that the character is alphanumeric or not. It returns non-zero value, if the character is alphanumeric means letter or number otherwise, returns zero. It is declared in “ctype.h” header file.
Here is the syntax of isalnum() in C language,
int isalnum(int character);
Here,
charact... | [
{
"code": null,
"e": 1294,
"s": 1062,
"text": "The function isalnum() is used to check that the character is alphanumeric or not. It returns non-zero value, if the character is alphanumeric means letter or number otherwise, returns zero. It is declared in “ctype.h” header file."
},
{
"code":... |
Print structured MySQL SELECT at command prompt | To print, the syntax is as follows −
mysql -uroot -t -e "your Select Query " -p
To implement the above syntax, let us open the command prompt −
Now, reach the MySQL bin −
Let us implement the above syntax to easily print structured SQL select. Following is the query −
This will produce the following output − | [
{
"code": null,
"e": 1099,
"s": 1062,
"text": "To print, the syntax is as follows −"
},
{
"code": null,
"e": 1143,
"s": 1099,
"text": "mysql -uroot -t -e \"your Select Query \" -p"
},
{
"code": null,
"e": 1207,
"s": 1143,
"text": "To implement the above synta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.