title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to make a proper double scrollbar frame in Tkinter | 26 Mar, 2020
Tkinter is a Python binding to the Tk GUI(Graphical User Interface) Toolkit. It is a thin-object oriented layer on top of Tcl/Tk. When combined with Python, it helps create fast and efficient GUI applications.
Note: For more information refer, Python GUI-tkinter
1) Firstly, the module Tkinter will be impor... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 264,
"s": 54,
"text": "Tkinter is a Python binding to the Tk GUI(Graphical User Interface) Toolkit. It is a thin-object oriented layer on top of Tcl/Tk. When combined with Python, it helps create f... |
Convert a String to an Integer using Recursion | 04 Jun, 2022
Given a string str representing a string, the task is to convert the given string into an integer.Examples:
Input: str = “1234” Output: 1234Input: str = “0145” Output: 145
Approach: Write a recursive function that will take the first digit of the string and multiply it with the appropriate power of 1... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Jun, 2022"
},
{
"code": null,
"e": 162,
"s": 52,
"text": "Given a string str representing a string, the task is to convert the given string into an integer.Examples: "
},
{
"code": null,
"e": 228,
"s": 162,
"tex... |
How to make Profile Card Hover Effect using CSS ? | 03 Sep, 2021
Almost all of us must have heard that ‘the first impression is the last impression’. The profile card carries the most important details we should know about a person at the very first instant. A better impression attracts more traffic. So to engage more audience in a website it is very important to concen... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Sep, 2021"
},
{
"code": null,
"e": 436,
"s": 54,
"text": "Almost all of us must have heard that ‘the first impression is the last impression’. The profile card carries the most important details we should know about a person at the ... |
Python – Separate first word from String | 30 Jun, 2020
Sometimes, while working with Python strings, we can have a problem in which we need to separate the first word from the entire string. This can have possible applications in many domains such as day-day and web-development. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 317,
"s": 28,
"text": "Sometimes, while working with Python strings, we can have a problem in which we need to separate the first word from the entire string. This can have possible applications in ... |
RadioButtons in Android using Jetpack Compose | 04 Mar, 2022
RadioButtons are used to select only a specific option from the list of several options in a list or either. Radio buttons are used in many places for selecting only one option from the list of two or more options. In this article, we will take a look at the implementation of this Radio button in Android u... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Mar, 2022"
},
{
"code": null,
"e": 358,
"s": 28,
"text": "RadioButtons are used to select only a specific option from the list of several options in a list or either. Radio buttons are used in many places for selecting only one optio... |
Print all nodes that don’t have sibling | 23 Jun, 2022
Given a Binary Tree, print all nodes that don’t have a sibling (a sibling is a node that has same parent. In a Binary Tree, there can be at most one sibling). Root should not be printed as root cannot have a sibling.For example, the output should be “4 5 6” for the following tree.
This is a typical tree t... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 335,
"s": 52,
"text": "Given a Binary Tree, print all nodes that don’t have a sibling (a sibling is a node that has same parent. In a Binary Tree, there can be at most one sibling). Root should not... |
Node.js Export Module | 12 Oct, 2021
The module.exports in Node.js is used to export any literal, function or object as a module. It is used to include JavaScript file into node.js applications. The module is similar to variable that is used to represent the current module and exports is an object that is exposed as a module.
Syntax:
module.e... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 344,
"s": 53,
"text": "The module.exports in Node.js is used to export any literal, function or object as a module. It is used to include JavaScript file into node.js applications. The module is si... |
PHP - Environment Setup | In order to develop and run PHP Web pages three vital components need to be installed on your computer system.
Web Server − PHP will work with virtually all Web Server software, including Microsoft's Internet Information Server (IIS) but then most often used is freely available Apache Server. Download Apache for free h... | [
{
"code": null,
"e": 3002,
"s": 2891,
"text": "In order to develop and run PHP Web pages three vital components need to be installed on your computer system."
},
{
"code": null,
"e": 3255,
"s": 3002,
"text": "Web Server − PHP will work with virtually all Web Server software, incl... |
Using Tkinter in Jupyter Notebook | Tkinter is a Python library used for creating and developing GUI-based applications. It is completely open-source which works on Windows, Mac, Linux, and Ubuntu. In Windows operating system, we can install the Tkinter library using the command pip install tkinter. It will install all the other modules that come with Tk... | [
{
"code": null,
"e": 1687,
"s": 1187,
"text": "Tkinter is a Python library used for creating and developing GUI-based applications. It is completely open-source which works on Windows, Mac, Linux, and Ubuntu. In Windows operating system, we can install the Tkinter library using the command pip insta... |
Deletion at different positions in a Circular Linked List | 29 Jun, 2022
Given a Circular Linked List. The task is to write programs to delete nodes from this list present at:
First position.
Last Position.
At any given position .
Examples:
Input : 99->11->22->33->44->55->66
Output : 11->22->33->44->55->66
Input : 11->22->33->44->55->66
Output : 22->33->44->55->66
Deleting ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Jun, 2022"
},
{
"code": null,
"e": 156,
"s": 52,
"text": "Given a Circular Linked List. The task is to write programs to delete nodes from this list present at: "
},
{
"code": null,
"e": 172,
"s": 156,
"text": "F... |
How to change font color in dropdown navbar when collapsed in bootstrap ? | 05 Nov, 2020
Bootstrap 4 is one of the most widely used CSS frameworks along with HTML and JavaScript to build interactive websites. Bootstrap 4 offers a great variety of inbuilt components, classes, and utility methods that can be used to create a user-friendly web application. The following article accomplishes the p... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Nov, 2020"
},
{
"code": null,
"e": 418,
"s": 28,
"text": "Bootstrap 4 is one of the most widely used CSS frameworks along with HTML and JavaScript to build interactive websites. Bootstrap 4 offers a great variety of inbuilt component... |
turtle.window_width() function in Python | 26 Jul, 2020
The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support.
This function is used to return the width of the turtle window. It doesn’t require any arg... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Jul, 2020"
},
{
"code": null,
"e": 245,
"s": 28,
"text": "The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a ver... |
Understand CSV Files from your Terminal with XSV | by Khuyen Tran | Towards Data Science | Have you ever tried to have a general understanding of your CSV file by staring at it but ended up not understanding your file? You can open a Jupyter Notebook to analyze your CSV file, but it is time-consuming to open a notebook just to understand a CSV file, especially when you are working primarily with Python scrip... | [
{
"code": null,
"e": 508,
"s": 171,
"text": "Have you ever tried to have a general understanding of your CSV file by staring at it but ended up not understanding your file? You can open a Jupyter Notebook to analyze your CSV file, but it is time-consuming to open a notebook just to understand a CSV ... |
Can we stop with the SQL JOINs venn diagrams insanity? | by Randy Au | Towards Data Science | Really, please, OMG, stop
Pet peeve time. I’ve had to teach SQL to non-technical people multiple times over the years and everyone who’s ever tried to learn SQL and failed talk about how “joins are hard and scary”. If you were to search online for explanations of SQL joins, yeah, it looks insane.
What really gets me is... | [
{
"code": null,
"e": 198,
"s": 172,
"text": "Really, please, OMG, stop"
},
{
"code": null,
"e": 470,
"s": 198,
"text": "Pet peeve time. I’ve had to teach SQL to non-technical people multiple times over the years and everyone who’s ever tried to learn SQL and failed talk about how... |
Add and Remove vertex in Adjacency Matrix representation of Graph - GeeksforGeeks | 09 Aug, 2021
A graph is a presentation of a set of entities where some pairs of entities are linked by a connection. Interconnected entities are represented by points referred to as vertices, and the connections between the vertices are termed as edges. Formally, a graph is a pair of sets (V, E), where V is a collectio... | [
{
"code": null,
"e": 25270,
"s": 25242,
"text": "\n09 Aug, 2021"
},
{
"code": null,
"e": 25652,
"s": 25270,
"text": "A graph is a presentation of a set of entities where some pairs of entities are linked by a connection. Interconnected entities are represented by points referred ... |
Creating and Using a MySQL Database | Once MySQL has been installed, and the user is aware of how SQL statements need to be entered, a database can be accessed. Let us understand the steps needed to retrieve data from tables in a database −
Connect to the server
Connect to the server
Create a database
Create a database
Create a table
Create a table
Load th... | [
{
"code": null,
"e": 1265,
"s": 1062,
"text": "Once MySQL has been installed, and the user is aware of how SQL statements need to be entered, a database can be accessed. Let us understand the steps needed to retrieve data from tables in a database −"
},
{
"code": null,
"e": 1287,
"s"... |
Deploy Python APIs on CentOS Webservers | Towards Data Science | The web runs on Linux, and we are currently living in the age of APIs. These two facts alongside Python being the most popular programming language in the world make knowing how to deploy a Python API via Linux an invaluable skill.
API development in Python is typically regulated to Django, Flask, or FastAPI, alongside... | [
{
"code": null,
"e": 404,
"s": 172,
"text": "The web runs on Linux, and we are currently living in the age of APIs. These two facts alongside Python being the most popular programming language in the world make knowing how to deploy a Python API via Linux an invaluable skill."
},
{
"code": n... |
How to execute a command and get the output of command within C++ using POSIX? | You can use the popen and pclose functions to pipe to and from processes. The popen() function opens a process by creating a pipe, forking, and invoking the shell. We can use a buffer to read the contents of stdout and keep appending it to a result string and return this string when the processes exit.
#include <iostre... | [
{
"code": null,
"e": 1366,
"s": 1062,
"text": "You can use the popen and pclose functions to pipe to and from processes. The popen() function opens a process by creating a pipe, forking, and invoking the shell. We can use a buffer to read the contents of stdout and keep appending it to a result stri... |
How to append a list to a Pandas DataFrame using iloc in Python? | The iloc method is an integer-location based indexing for selection by position. We are using iloc to append a list to a DataFrame.
Let us first create a DataFrame. The data is in the form of lists of team rankings for our example −
# data in the form of list of team rankings
Team = [['India', 1, 100],['Australia', 2, ... | [
{
"code": null,
"e": 1194,
"s": 1062,
"text": "The iloc method is an integer-location based indexing for selection by position. We are using iloc to append a list to a DataFrame."
},
{
"code": null,
"e": 1295,
"s": 1194,
"text": "Let us first create a DataFrame. The data is in th... |
AngularJS - Views | AngularJS supports Single Page Application via multiple views on a single page. To do this, AngularJS has provided ng-view and ng-template directives, and $routeProvider services.
The ng-view directive simply creates a place holder where a corresponding view (HTML or ng-template view) can be placed based on the configu... | [
{
"code": null,
"e": 2879,
"s": 2699,
"text": "AngularJS supports Single Page Application via multiple views on a single page. To do this, AngularJS has provided ng-view and ng-template directives, and $routeProvider services."
},
{
"code": null,
"e": 3027,
"s": 2879,
"text": "Th... |
Difference between Join and union in SQL | Union is a set operator that can be used to combine the result set of two different SELECT statement. In the union number of columns and data type should be the same.
It has two types −
Union
Union All
On the other hand ,In a Relational database, tables are associated with each other and we used foreign key to mainta... | [
{
"code": null,
"e": 1230,
"s": 1062,
"text": "Union is a set operator that can be used to combine the result set of two different SELECT statement. In the union number of columns and data type should be the same. "
},
{
"code": null,
"e": 1249,
"s": 1230,
"text": "It has two typ... |
Java Regex - Pattern Class | The java.util.regex.Pattern class represents a compiled representation of a regular expression.
Following is the declaration for java.util.regex.Pattern class −
public final class Pattern
extends Object
implements Serializable
Following are the fields for java.util.regex.Duration class −
static int CANON_EQ −... | [
{
"code": null,
"e": 2220,
"s": 2124,
"text": "The java.util.regex.Pattern class represents a compiled representation of a regular expression."
},
{
"code": null,
"e": 2285,
"s": 2220,
"text": "Following is the declaration for java.util.regex.Pattern class −"
},
{
"code":... |
What is the !! (not not) operator in JavaScript? - GeeksforGeeks | 23 Apr, 2019
The !!(not not) is the repetition of the unary logical operator not(!) twice. The double negation(!!) operator calculates the truth value of a value. This operator returns a boolean value, which depends on the truthiness of the given expression.In general, logical not(!) determines the “truth” of what a va... | [
{
"code": null,
"e": 24271,
"s": 24243,
"text": "\n23 Apr, 2019"
},
{
"code": null,
"e": 24590,
"s": 24271,
"text": "The !!(not not) is the repetition of the unary logical operator not(!) twice. The double negation(!!) operator calculates the truth value of a value. This operator... |
3 Ways to Extract Features from Dates with Python | by Khuyen Tran | Towards Data Science | While working with time series, the values of your datasets might be affected by holidays, which day of the week, and how many days in a month. Is there a way that you can extract these features from your date feature with one line of code?
Yes! In this article, I will show you how to extract the three features mention... | [
{
"code": null,
"e": 413,
"s": 172,
"text": "While working with time series, the values of your datasets might be affected by holidays, which day of the week, and how many days in a month. Is there a way that you can extract these features from your date feature with one line of code?"
},
{
... |
Java - String toString() Method | This method returns itself a string.
Here is the syntax of this method −
public String toString()
Here is the detail of parameters −
NA
NA
This method returns the string itself.
import java.io.*;
public class Test {
public static void main(String args[]) {
String Str = new String("Welcome to Tutorialspoint.c... | [
{
"code": null,
"e": 2414,
"s": 2377,
"text": "This method returns itself a string."
},
{
"code": null,
"e": 2450,
"s": 2414,
"text": "Here is the syntax of this method −"
},
{
"code": null,
"e": 2476,
"s": 2450,
"text": "public String toString()\n"
},
{
... |
How to Get and Set Default Character Encoding or Charset in Java? | 24 Jun, 2021
Default Character encoding or Charset in Java is used by Java Virtual Machine (JVM) to convert bytes into a string of characters in the absence of file.encoding java system property. During JVM start-up, Java gets character encoding by calling System.getProperty(“file.encoding”,”UTF-8′′). In the absence of... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jun, 2021"
},
{
"code": null,
"e": 410,
"s": 28,
"text": "Default Character encoding or Charset in Java is used by Java Virtual Machine (JVM) to convert bytes into a string of characters in the absence of file.encoding java system pr... |
Lower case to upper case – An interesting fact | 16 Jun, 2022
Problem: Given a string containing only lowercase letters, generate a string with the same letters, but in uppercase.
Input : GeeksForGeeks
Output : GEEKSFORGEEKS
The first method that comes to our mind is
C++
Java
Python3
C#
Javascript
// C++ program to convert a string to uppercase#include <iostream>... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 171,
"s": 52,
"text": "Problem: Given a string containing only lowercase letters, generate a string with the same letters, but in uppercase. "
},
{
"code": null,
"e": 217,
"s": 171,... |
How to display error without alert box using JavaScript ? | 13 Jun, 2022
Errors in JavaScript can be displayed without the use of alert boxes but using the alert box is the traditional way to do that. We can show errors with two methods without using the alert box.
Method 1: By using textContent property. The textContent is basically used to change the content of any node dynam... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 221,
"s": 28,
"text": "Errors in JavaScript can be displayed without the use of alert boxes but using the alert box is the traditional way to do that. We can show errors with two methods without usi... |
Salt and Pepper Noise removal using C++ | 18 Jan, 2022
Salt-and-pepper noise is a form of noise sometimes seen on images. It is also known as impulse noise. This noise can be caused by sharp and sudden disturbances in the image signal. It presents itself as sparsely occurring white and black pixels. An effective noise reduction method for this type of noise is... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jan, 2022"
},
{
"code": null,
"e": 552,
"s": 28,
"text": "Salt-and-pepper noise is a form of noise sometimes seen on images. It is also known as impulse noise. This noise can be caused by sharp and sudden disturbances in the image si... |
Difference between input() and sys.stdin.readline() | 29 Oct, 2021
Python is a widely used general-purpose language that can be used for many purposes. Taking input in any language is as important as breathing for humans. Python provides various methods for taking input. However, we all may get confused about how each method is different from one another. In this article,... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Oct, 2021"
},
{
"code": null,
"e": 437,
"s": 52,
"text": "Python is a widely used general-purpose language that can be used for many purposes. Taking input in any language is as important as breathing for humans. Python provides var... |
Maximum value of |arr[i] – arr[j]| + |i – j| | 16 Nov, 2021
Given a array of N positive integers. The task is to find the maximum value of |arr[i] – arr[j]| + |i – j|, where 0 <= i, j <= N – 1 and arr[i], arr[j] belong to the array.
Examples:
Input : N = 4, arr[] = { 1, 2, 3, 1 } Output : 4Explanation:Choose i = 0 and j = 2. This will result in |1-3|+|0-2| = 4 whi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Nov, 2021"
},
{
"code": null,
"e": 225,
"s": 52,
"text": "Given a array of N positive integers. The task is to find the maximum value of |arr[i] – arr[j]| + |i – j|, where 0 <= i, j <= N – 1 and arr[i], arr[j] belong to the array."
... |
Output of C programs | Set 55 (Ternary Operators) | 19 Sep, 2017
Predict the output of below programsQuestion 1
#include <stdio.h>int main(){ int x, a = 0; x = sizeof(a++) ? printf("Geeks for Geeks\n") : 0; printf("Value of x:%d\n", x); printf("Value of a:%d", a); return 0;}
Output:
Geeks for Geeks
Value of x:16
Value of a:0
Explanation: sizeof is a compi... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Sep, 2017"
},
{
"code": null,
"e": 101,
"s": 54,
"text": "Predict the output of below programsQuestion 1"
},
{
"code": "#include <stdio.h>int main(){ int x, a = 0; x = sizeof(a++) ? printf(\"Geeks for Geeks\\n\") : 0; ... |
Creating a Dynamic Array in Java | 30 Jun, 2021
Arrays are linear data structures which means that similar types of elements will be inserted as known in a continuous manner. Now as we know there is an issue with arrays that size needs to be specified at the time of declaration or taken from the user in java which constricts ourselves. Hence, there aris... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 727,
"s": 52,
"text": "Arrays are linear data structures which means that similar types of elements will be inserted as known in a continuous manner. Now as we know there is an issue with arrays th... |
QUOTENAME() Function in SQL Server | 30 Dec, 2020
QUOTENAME() function :This function in SQL Server is used to return a Unicode string with delimiters added in order to make the string a valid SQL Server delimited identifier.
Features :
This function is used to find a Unicode string with delimiters added.
This function accepts only strings and delimiters.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Dec, 2020"
},
{
"code": null,
"e": 204,
"s": 28,
"text": "QUOTENAME() function :This function in SQL Server is used to return a Unicode string with delimiters added in order to make the string a valid SQL Server delimited identifier.... |
Reading Tabular Data from files in R Programming | 10 May, 2020
Often, the data which is to be read and worked upon is already stored in a file but is present outside the R environment. Hence, importing data into R is a mandatory task in such circumstances. The formats which are supported by R are CSV, JSON, Excel, Text, XML, etc. The majority of times, the data to be ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 809,
"s": 28,
"text": "Often, the data which is to be read and worked upon is already stored in a file but is present outside the R environment. Hence, importing data into R is a mandatory task in s... |
How to make a system tray application in Tkinter? | A System Tray application is created for the continuous execution of the program. Whenever an application is closed by the user, it will get its state running on the taskbar. To identify a system tray application, we can provide an image or icon to its application.
To create a System Tray icon of a tkinter application,... | [
{
"code": null,
"e": 1453,
"s": 1187,
"text": "A System Tray application is created for the continuous execution of the program. Whenever an application is closed by the user, it will get its state running on the taskbar. To identify a system tray application, we can provide an image or icon to its ... |
Node.js new X509Certificate() Function | 06 Apr, 2021
The new X509Certificate(buffer) is an inbuilt constructor of class X509Certificate within crypto module which is used to provide a PEM encoded X509 Certificate.
Syntax:
new X509Certificate(buffer)
Parameters: This function takes the buffer of strings representing public certificate.
Return Value: This fun... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Apr, 2021"
},
{
"code": null,
"e": 190,
"s": 28,
"text": "The new X509Certificate(buffer) is an inbuilt constructor of class X509Certificate within crypto module which is used to provide a PEM encoded X509 Certificate."
},
{
... |
sympy.integrals.inverse_laplace_transform() in python | 15 Jul, 2021
With the help of inverse_laplace_transform() method, we can compute the inverse of laplace transformation of F(s).
Syntax : inverse_laplace_transform(F, s, t) Return : Return the unevaluated transformation function.
Example #1 : In this example, we can see that by using inverse_laplace_transform() method... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Jul, 2021"
},
{
"code": null,
"e": 143,
"s": 28,
"text": "With the help of inverse_laplace_transform() method, we can compute the inverse of laplace transformation of F(s)."
},
{
"code": null,
"e": 246,
"s": 143,
... |
Password validation in Python | 29 Dec, 2020
Let’s take a password as a combination of alphanumeric characters along with special characters, and check whether the password is valid or not with the help of few conditions.
Conditions for a valid password are:
Should have at least one number.Should have at least one uppercase and one lowercase characte... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 229,
"s": 52,
"text": "Let’s take a password as a combination of alphanumeric characters along with special characters, and check whether the password is valid or not with the help of few condition... |
MongoDB – $nin Operator | 22 Apr, 2020
MongoDB provides different types of comparison query operators and $nin (not in) operator is one of them. This operator is used to select those documents where the value of the field is not equal to any of the given value in the array and the field that does not exist.If the field contain an array, then th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 567,
"s": 28,
"text": "MongoDB provides different types of comparison query operators and $nin (not in) operator is one of them. This operator is used to select those documents where the value of th... |
comm - Unix, Linux Command | comm - compare two sorted files line by line and write to standard output: the lines that are common, plus the lines that are unique.
comm [options]... File1 File2
Before 'comm' can be used, the input files must be sorted using the collating sequence specified by the 'LC_COLLATE' locale, with trailing newlines signifi... | [
{
"code": null,
"e": 10846,
"s": 10711,
"text": "comm - compare two sorted files line by line and write to standard output: the lines that are common, plus the lines that are unique."
},
{
"code": null,
"e": 10876,
"s": 10846,
"text": "comm [options]... File1 File2"
},
{
... |
Find profession in a special family | 12 Jun, 2022
Consider a special family of Engineers and Doctors with following rules :
Everybody has two children.First child of an Engineer is an Engineer and second child is a Doctor.First child of an Doctor is Doctor and second child is an Engineer.All generations of Doctors and Engineers start with Engineer.
Every... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Jun, 2022"
},
{
"code": null,
"e": 127,
"s": 52,
"text": "Consider a special family of Engineers and Doctors with following rules : "
},
{
"code": null,
"e": 354,
"s": 127,
"text": "Everybody has two children.Fir... |
Silly Window Syndrome | 05 Jul, 2022
Silly Window Syndrome is a problem that arises due to poor implementation of TCP. It degrades the TCP performance and makes the data transmission extremely inefficient. The problem is called so because:
It causes the sender window size to shrink to a silly value. The window size shrinks to such an exten... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Jul, 2022"
},
{
"code": null,
"e": 259,
"s": 54,
"text": "Silly Window Syndrome is a problem that arises due to poor implementation of TCP. It degrades the TCP performance and makes the data transmission extremely inefficient. The p... |
How to send data of HTML form directly to JSON file? | 01 Aug, 2021
The task is to send data of HTML form directly to JSON file.
Approach: We have an HTML form containing several fields such as name, college, etc. We want to send the data of our HTML form directly to the JSON file. For this we are using json_encode() function which returns a JSON encoded string.
We are mak... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Aug, 2021"
},
{
"code": null,
"e": 115,
"s": 54,
"text": "The task is to send data of HTML form directly to JSON file."
},
{
"code": null,
"e": 351,
"s": 115,
"text": "Approach: We have an HTML form containing se... |
Python program to reverse the content of a file and store it in another file - GeeksforGeeks | 31 Dec, 2020
Given a text file. The task is to reverse as well as stores the content from an input file to an output file. This reversing can be performed in two types.
Full reversing: In this type of reversing all the content gets reversed.
Word to word reversing: In this kind of reversing the last word comes firs... | [
{
"code": null,
"e": 24023,
"s": 23995,
"text": "\n31 Dec, 2020"
},
{
"code": null,
"e": 24181,
"s": 24023,
"text": "Given a text file. The task is to reverse as well as stores the content from an input file to an output file. This reversing can be performed in two types. "
},... |
C Program to check if a date is valid or not | Given date in format date, month and year in integer. The task is to find whether the date is possible on not.
Valid date should range from 1/1/1800 – 31/12/9999 the dates beyond these are invalid.
These dates would not only contains range of year but also all the constraints related to a calendar date.
Constraints are... | [
{
"code": null,
"e": 1173,
"s": 1062,
"text": "Given date in format date, month and year in integer. The task is to find whether the date is possible on not."
},
{
"code": null,
"e": 1260,
"s": 1173,
"text": "Valid date should range from 1/1/1800 – 31/12/9999 the dates beyond the... |
C++ program to Check if a Given Binary Tree is an AVL Tree or Not | AVL tree is a self-balancing Binary Search Tree where the difference between heights of left and right subtrees cannot be more than one for all nodes.
This is a C++ program to check if a given Binary Tree is an AVL Tree or not.
Begin
function AVL() returns true if the given tree is AVL otherwise false.
if(root == NU... | [
{
"code": null,
"e": 1213,
"s": 1062,
"text": "AVL tree is a self-balancing Binary Search Tree where the difference between heights of left and right subtrees cannot be more than one for all nodes."
},
{
"code": null,
"e": 1290,
"s": 1213,
"text": "This is a C++ program to check ... |
Self Destructing Code in C | Here we will see how to create self-destructing code in C. The self-destructing code is basically executing the code, and then remove the executable file after executing it.
This task is very simple. We need to get the executable file name to remove it. We can use the command line arguments. The argv[0] will hold the e... | [
{
"code": null,
"e": 1236,
"s": 1062,
"text": "Here we will see how to create self-destructing code in C. The self-destructing code is basically executing the code, and then remove the executable file after executing it."
},
{
"code": null,
"e": 1449,
"s": 1236,
"text": "This tas... |
0-1 Knapsack Problem | DP-10 - GeeksforGeeks | 08 Mar, 2022
Given weights and values of n items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack. In other words, given two integer arrays val[0..n-1] and wt[0..n-1] which represent values and weights associated with n items respectively. Also given an integer W which represe... | [
{
"code": null,
"e": 34205,
"s": 34177,
"text": "\n08 Mar, 2022"
},
{
"code": null,
"e": 34742,
"s": 34205,
"text": "Given weights and values of n items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack. In other words, given two integer ... |
How to find anchor tag in div and add class using jQuery? | To find anchor tag in div, use a selector and the addClass() method adds a class using jQuery.
You can try to run the following code to learn how to find anchor tag in div and add class:
Live Demo
<html>
<head>
<script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<sc... | [
{
"code": null,
"e": 1157,
"s": 1062,
"text": "To find anchor tag in div, use a selector and the addClass() method adds a class using jQuery."
},
{
"code": null,
"e": 1249,
"s": 1157,
"text": "You can try to run the following code to learn how to find anchor tag in div and add cl... |
Multiple Inheritance in C++ | Multiple inheritance occurs when a class inherits from more than one base class. So the class can inherit features from multiple base classes using multiple inheritance. This is an important feature of object oriented programming languages such as C++.
A diagram that demonstrates multiple inheritance is given below −
A... | [
{
"code": null,
"e": 1315,
"s": 1062,
"text": "Multiple inheritance occurs when a class inherits from more than one base class. So the class can inherit features from multiple base classes using multiple inheritance. This is an important feature of object oriented programming languages such as C++."... |
C library function - strtol() | The C library function long int strtol(const char *str, char **endptr, int base) converts the initial part of the string in str to a long int value according to the given base, which must be between 2 and 36 inclusive, or be the special value 0.
Following is the declaration for strtol() function.
long int strtol(const ... | [
{
"code": null,
"e": 2253,
"s": 2007,
"text": "The C library function long int strtol(const char *str, char **endptr, int base) converts the initial part of the string in str to a long int value according to the given base, which must be between 2 and 36 inclusive, or be the special value 0."
},
... |
Largest Sum Contiguous Subarray | An array of integers is given. We have to find the sum of all elements which are contiguous, whose sum is largest, that will be sent as output.
Using dynamic programming we will store the maximum sum up to current term. It will help to find the sum for contiguous elements in the array.
Input:
An array of integers. {-2,... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "An array of integers is given. We have to find the sum of all elements which are contiguous, whose sum is largest, that will be sent as output."
},
{
"code": null,
"e": 1349,
"s": 1206,
"text": "Using dynamic programming we will stor... |
Difference between Methods and Functions in JavaScript - GeeksforGeeks | 11 Apr, 2022
JavaScript Functions: A function is a block of code written to perform some specific set of tasks. We can define a function using the function keyword, followed by Name and optional parameters. Body of function is enclosed in Curly braces.
Syntax:
function functionName(parameters) {
// Content
}
Featu... | [
{
"code": null,
"e": 24493,
"s": 24465,
"text": "\n11 Apr, 2022"
},
{
"code": null,
"e": 24733,
"s": 24493,
"text": "JavaScript Functions: A function is a block of code written to perform some specific set of tasks. We can define a function using the function keyword, followed by... |
How to Add Cron Jobs to A Specific User in a Linux System | This article we will teach you to schedule a cron job to be executed at a specific time in a day.
MIN HOUR Day of month Month Day of Week Command
0-59 0-23 1-31 1-12 0-6 linux command or script
To see the list of cron jobs which exists on the machine, run the below command
# ... | [
{
"code": null,
"e": 1160,
"s": 1062,
"text": "This article we will teach you to schedule a cron job to be executed at a specific time in a day."
},
{
"code": null,
"e": 1300,
"s": 1160,
"text": "MIN HOUR Day of month Month Day of Week Command\n0-59 0-23 1-... |
Search an element of ArrayList in Java | An element in an ArrayList can be searched using the method java.util.ArrayList.indexOf(). This method returns the index of the first occurance of the element that is specified. If the element is not available in the ArrayList, then this method returns -1.
A program that demonstrates this is given as follows −
Live De... | [
{
"code": null,
"e": 1319,
"s": 1062,
"text": "An element in an ArrayList can be searched using the method java.util.ArrayList.indexOf(). This method returns the index of the first occurance of the element that is specified. If the element is not available in the ArrayList, then this method returns ... |
How can we update a record in MongoDB? | To update a record, you need to update on the basis of _id. Let us create a collection with documents −
> db.demo458.insertOne( {_id:101,"Name":"David" } );
{ "acknowledged" : true, "insertedId" : 101 }
> db.demo458.insertOne( {_id:102,"Name":"Chris" } );
{ "acknowledged" : true, "insertedId" : 102 }
> db.demo458.inser... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "To update a record, you need to update on the basis of _id. Let us create a collection with documents −"
},
{
"code": null,
"e": 1461,
"s": 1166,
"text": "> db.demo458.insertOne( {_id:101,\"Name\":\"David\" } );\n{ \"acknowledged\" :... |
Deploy Machine Learning Model using Flask - GeeksforGeeks | 14 Feb, 2022
Machine learning is a process that is widely used for prediction. N number of algorithms are available in various libraries which can be used for prediction. In this article, we are going to build a prediction model on historic data using different machine learning algorithms and classifiers, plot the resu... | [
{
"code": null,
"e": 25000,
"s": 24972,
"text": "\n14 Feb, 2022"
},
{
"code": null,
"e": 25959,
"s": 25000,
"text": "Machine learning is a process that is widely used for prediction. N number of algorithms are available in various libraries which can be used for prediction. In th... |
Perl split Function | This function splits a string expression into fields based on the delimiter specified by PATTERN. If no pattern is specified whitespace is the default. An optional limit restricts the number of elements returned.
A negative limit has the same effect as no limit. This function is often used in conjunction with join() to... | [
{
"code": null,
"e": 2433,
"s": 2220,
"text": "This function splits a string expression into fields based on the delimiter specified by PATTERN. If no pattern is specified whitespace is the default. An optional limit restricts the number of elements returned."
},
{
"code": null,
"e": 257... |
dirname command in Linux with examples - GeeksforGeeks | 15 May, 2019
dirname is a command in Linux which is used to remove the trailing forward slahes “/” from the NAME and prints the remaining portion. If the argument NAME does not contains the forward slash “/” then it simply prints dot “.”.
Syntax:
dirname [OPTION] NAME
Options provided by dirname:
dirname -zero NAME or ... | [
{
"code": null,
"e": 24406,
"s": 24378,
"text": "\n15 May, 2019"
},
{
"code": null,
"e": 24632,
"s": 24406,
"text": "dirname is a command in Linux which is used to remove the trailing forward slahes “/” from the NAME and prints the remaining portion. If the argument NAME does not... |
How to find the row sums by excluding a column in R data frame? | Suppose we have a numerical column in an R data frame that we do not want to include
our analysis due to some characteristics such is similarity or distinction with the rest of the data then we might want to exclude that column from the analysis. One such situation would be finding the row sums by excluding a column. F... | [
{
"code": null,
"e": 1428,
"s": 1062,
"text": "Suppose we have a numerical column in an R data frame that we do not want to include\nour analysis due to some characteristics such is similarity or distinction with the rest of the data then we might want to exclude that column from the analysis. One s... |
How to sum values of a Python dictionary? | It is pretty easy to get the sum of values of a python dictionary. You can first get the values in a list using the dict.values(). Then you can call the sum method to get the sum of these values.
d = {
'foo': 10,
'bar': 20,
'baz': 30
}
print(sum(d.values()))
This will give the output −
60 | [
{
"code": null,
"e": 1259,
"s": 1062,
"text": "It is pretty easy to get the sum of values of a python dictionary. You can first get the values in a list using the dict.values(). Then you can call the sum method to get the sum of these values. "
},
{
"code": null,
"e": 1331,
"s": 1259... |
C++ program to test inheritance through triangle class | Suppose we want to make one Triangle class and another child class called Isosceles. The triangle class has a function that prints that the object is of type triangle, and Isosceles has two functions to show that it is an isosceles triangle and one description. We also need to call the parent class function through Iso... | [
{
"code": null,
"e": 1472,
"s": 1062,
"text": "Suppose we want to make one Triangle class and another child class called Isosceles. The triangle class has a function that prints that the object is of type triangle, and Isosceles has two functions to show that it is an isosceles triangle and one desc... |
MomentJS - Long Date Formats | This method helps in customizing longdateformat for a locale.
moment.updateLocale('en', {
longDateFormat : Object
});
Here longDateFormat is an object containing key / value pair for each format.
var localeData = moment.updateLocale('fr', {
longDateFormat: {
LT: "h:mm",
LTS: "h:mm:ss A",
L: "MM... | [
{
"code": null,
"e": 2022,
"s": 1960,
"text": "This method helps in customizing longdateformat for a locale."
},
{
"code": null,
"e": 2082,
"s": 2022,
"text": "moment.updateLocale('en', {\n longDateFormat : Object\n});\n"
},
{
"code": null,
"e": 2160,
"s": 2082,... |
Remainder Evaluation | Practice | GeeksforGeeks | Given two positive integers num1 and num2, the task is to find the remainder when num1 is divided by num2.
Example 1:
Input:
num1 = 5
num2 = 3
Output:
2
Explanation:
The remainder after dividing 5 by 3 is: 2.
Example 2:
Input:
num1 = 5
num2 = 10
Output:
5
Explanation:
5 cannot be divided by 10 so it is
the Remaind... | [
{
"code": null,
"e": 345,
"s": 238,
"text": "Given two positive integers num1 and num2, the task is to find the remainder when num1 is divided by num2."
},
{
"code": null,
"e": 356,
"s": 345,
"text": "Example 1:"
},
{
"code": null,
"e": 449,
"s": 356,
"text": ... |
How to add fade-out effect using pure JavaScript ? - GeeksforGeeks | 08 May, 2020
The fade effect is described as the gradual increase and decrease in the opacity of the selected portion. In other words, the fade effect is termed as the increase and decrease in opacity with respect to time. When this effect is applied with a gradual decrease in the opacity it is known as the fade-out ef... | [
{
"code": null,
"e": 39239,
"s": 39211,
"text": "\n08 May, 2020"
},
{
"code": null,
"e": 39766,
"s": 39239,
"text": "The fade effect is described as the gradual increase and decrease in the opacity of the selected portion. In other words, the fade effect is termed as the increase... |
Getting binomial coefficient of a number in Julia - binomial() Method - GeeksforGeeks | 21 Apr, 2020
The binomial() is an inbuilt function in julia which is used to return the binomial coefficient which is the coefficient of the kth term in the polynomial expansion of .Its formula is –
, where is the factorial of n.If n is negative, then it is defined in terms of the identity
.
Syntax: binomia... | [
{
"code": null,
"e": 25789,
"s": 25761,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 25976,
"s": 25789,
"text": "The binomial() is an inbuilt function in julia which is used to return the binomial coefficient which is the coefficient of the kth term in the polynomial expansi... |
Spring Security - XML Configuration | Fundamentals
Getting started (Practical Guide)
In this we are going to discuss how to configure Spring Security with XML configuration. We shall be developing a simple Spring application with Spring Security. While doing so, we will discuss in details about each component that we are using.
Authentication − Authenticat... | [
{
"code": null,
"e": 1848,
"s": 1835,
"text": "Fundamentals"
},
{
"code": null,
"e": 1882,
"s": 1848,
"text": "Getting started (Practical Guide)"
},
{
"code": null,
"e": 2127,
"s": 1882,
"text": "In this we are going to discuss how to configure Spring Security... |
Pascal - Repeat-Until Loop | Unlike for and while loops, which test the loop condition at the top of the loop, the repeat ... until loop in Pascal checks its condition at the bottom of the loop.
A repeat ... until loop is similar to a while loop, except that a repeat ... until loop is guaranteed to execute at least one time.
repeat
S1;
S2;
... | [
{
"code": null,
"e": 2249,
"s": 2083,
"text": "Unlike for and while loops, which test the loop condition at the top of the loop, the repeat ... until loop in Pascal checks its condition at the bottom of the loop."
},
{
"code": null,
"e": 2381,
"s": 2249,
"text": "A repeat ... unt... |
Auth Schemes of REST API. Policies, Key management, Security, and... | by Bibhash Biswas | Towards Data Science | The user’s data is the underlying currency that is driving the API economy. Like any currency, you need to handle it with care and transport it with caution to prevent theft.
Different devices and platforms have different vulnerabilities. Your desktop at home is not as vulnerable as your mobile phone. It’s easier to lo... | [
{
"code": null,
"e": 347,
"s": 172,
"text": "The user’s data is the underlying currency that is driving the API economy. Like any currency, you need to handle it with care and transport it with caution to prevent theft."
},
{
"code": null,
"e": 656,
"s": 347,
"text": "Different d... |
Tcl - Procedures | Procedures are nothing but code blocks with series of commands that provide a specific reusable functionality. It is used to avoid same code being repeated in multiple locations. Procedures are equivalent to the functions used in many programming languages and are made available in Tcl with the help of proc command.
Th... | [
{
"code": null,
"e": 2519,
"s": 2201,
"text": "Procedures are nothing but code blocks with series of commands that provide a specific reusable functionality. It is used to avoid same code being repeated in multiple locations. Procedures are equivalent to the functions used in many programming langua... |
Bootstrap 4 .card-columns class | Create a grid of cards with Bootstrap 4, using the card-columns class −
<div class="card-columns">
<!—Add cards- ->
</div>
Set the card classes inside the card-columns class −
<div class="card-columns">
<div class="card bg-primary">
<div class="card-body">
<p class="card-text">One</p>
</div>
</div>
... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "Create a grid of cards with Bootstrap 4, using the card-columns class −"
},
{
"code": null,
"e": 1187,
"s": 1134,
"text": "<div class=\"card-columns\">\n <!—Add cards- ->\n</div>"
},
{
"code": null,
"e": 1240,
"s": 1... |
Inheritance vs Composition in C# | With Inheritance, you can designate that the new class should inherit the members of an existing class. This existing class is called the baseclass, and the new class is referred to as the derived class. Inheritance implements the IS-A relationship. For example, mammal IS A animal, dog IS-A mammal hence dog IS-A animal... | [
{
"code": null,
"e": 1403,
"s": 1062,
"text": "With Inheritance, you can designate that the new class should inherit the members of an existing class. This existing class is called the baseclass, and the new class is referred to as the derived class. Inheritance implements the IS-A relationship. For... |
EnumerateFiles method in C# | EnumerateFile() method is used in C# to get all the files. Use AllDirectories property to recurse through directories −
Directory.EnumerateFiles(@"D:\NEW", "*.*", SearchOption.AllDirectories)
To get the list of files in a directory, use the SearchOptions.AllDirectories in C# as shown above.
Let us see how −
using Syste... | [
{
"code": null,
"e": 1182,
"s": 1062,
"text": "EnumerateFile() method is used in C# to get all the files. Use AllDirectories property to recurse through directories −"
},
{
"code": null,
"e": 1254,
"s": 1182,
"text": "Directory.EnumerateFiles(@\"D:\\NEW\", \"*.*\", SearchOption.A... |
Perform Binary Search in Java using Collections.binarySearch | Binary Search can be performed in Java using the method java.util.Collections.binarySearch(). This method requires two parameters i.e. the list in which binary search is to be performed and the element that is to be searched. It returns the index of the element if it is in the list and returns -1 if it is not in the li... | [
{
"code": null,
"e": 1386,
"s": 1062,
"text": "Binary Search can be performed in Java using the method java.util.Collections.binarySearch(). This method requires two parameters i.e. the list in which binary search is to be performed and the element that is to be searched. It returns the index of the... |
Selenium - Drag and Drop | As a tester, you might be in a situation to perform a 'Drag & drop' operation. We will perform a drag and drop operation by picking up a tree grid that is available for us on http://www.keenthemes.com/preview/metronic/templates/admin/ui_tree.html. In the example, we would like to drag an element 'Disable Node' from 'in... | [
{
"code": null,
"e": 2241,
"s": 1875,
"text": "As a tester, you might be in a situation to perform a 'Drag & drop' operation. We will perform a drag and drop operation by picking up a tree grid that is available for us on http://www.keenthemes.com/preview/metronic/templates/admin/ui_tree.html. In th... |
Graph Homomorphism - GeeksforGeeks | 04 Jul, 2021
A graph G is a collection of a set of vertices and a set of edges that connects those vertices. It consists of two sets:
Set of Vertices: V = {v1, v2, ..., vn}
Set of edges: E = {e1, e2, ..., en}
The graph G is denoted as G = (V, E).
Homomorphism of Graphs: A graph Homomorphism is a mapping between two gra... | [
{
"code": null,
"e": 25829,
"s": 25801,
"text": "\n04 Jul, 2021"
},
{
"code": null,
"e": 25950,
"s": 25829,
"text": "A graph G is a collection of a set of vertices and a set of edges that connects those vertices. It consists of two sets:"
},
{
"code": null,
"e": 25989... |
Check if a number is Quartan Prime or not - GeeksforGeeks | 07 May, 2021
Given a positive integer N, check if it is Quartan prime or not. Print ‘Yes’ if it is a Quartan prime otherwise Print ‘No’.Quartan Prime : A prime number of the form x4 + y4 where x > 0, y > 0, and x and y are integers is a Quartan Prime. Quartan Prime in the range 1 – 100 are:
2, 17, 97
Examples:
In... | [
{
"code": null,
"e": 26047,
"s": 26019,
"text": "\n07 May, 2021"
},
{
"code": null,
"e": 26328,
"s": 26047,
"text": "Given a positive integer N, check if it is Quartan prime or not. Print ‘Yes’ if it is a Quartan prime otherwise Print ‘No’.Quartan Prime : A prime number of the fo... |
Ruby Programming Language (Introduction) - GeeksforGeeks | 25 Sep, 2019
Ruby is a pure Object-Oriented language developed by Yukihiro Matsumoto (also known as Matz in the Ruby community) in the mid 1990’s in Japan. Everything in Ruby is an object except the blocks but there are replacements too for it i.e procs and lambda. The objective of Ruby’s development was to make it act... | [
{
"code": null,
"e": 25033,
"s": 25005,
"text": "\n25 Sep, 2019"
},
{
"code": null,
"e": 25621,
"s": 25033,
"text": "Ruby is a pure Object-Oriented language developed by Yukihiro Matsumoto (also known as Matz in the Ruby community) in the mid 1990’s in Japan. Everything in Ruby i... |
How to Add New Disk in Linux CentOS 7 Without Rebooting - GeeksforGeeks | 18 Nov, 2021
Let’s Say we hosted the DataBase on our Server Initially with 500GB given space and as we know Database should run 24/7 because the user’s using it. One day it consumes space about 400GB only 100GB left Now we want to Increase the Space at the runtime only and In the case of static partitioning we need to... | [
{
"code": null,
"e": 24978,
"s": 24950,
"text": "\n18 Nov, 2021"
},
{
"code": null,
"e": 25603,
"s": 24978,
"text": "Let’s Say we hosted the DataBase on our Server Initially with 500GB given space and as we know Database should run 24/7 because the user’s using it. One day it co... |
SKORCH: PyTorch Models Trained with a Scikit-Learn Wrapper | by Fernando López | Towards Data Science | Have you ever wondered if there is a tool to train and evaluate a PyTorch model in a simple and easy way? Well, that tool exists and it is SKORCH, a scikit-learn wrapper for training PyTorch models.
In this blog, we are going to talk about what SKORCH is, its components and how easy it is to wrap a PyTorch model to tra... | [
{
"code": null,
"e": 370,
"s": 171,
"text": "Have you ever wondered if there is a tool to train and evaluate a PyTorch model in a simple and easy way? Well, that tool exists and it is SKORCH, a scikit-learn wrapper for training PyTorch models."
},
{
"code": null,
"e": 565,
"s": 370,
... |
Apache NiFi - Environment Setup | In this chapter, we will learn about the environment setup ofApache NiFi. The steps for installation of Apache NiFi are as follows −
Step 1 − Install the current version of Java in your computer. Please set theJAVA_HOME in your machine. You can check the version as shown below:
In Windows Operating System (OS) (using c... | [
{
"code": null,
"e": 2451,
"s": 2318,
"text": "In this chapter, we will learn about the environment setup ofApache NiFi. The steps for installation of Apache NiFi are as follows −"
},
{
"code": null,
"e": 2597,
"s": 2451,
"text": "Step 1 − Install the current version of Java in y... |
Bootstrap Filter list | To create a filter list, use the .list-group class in Bootstrap.
You can try to run the following code to create a filter list −
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
<script src = "/scripts/jquer... | [
{
"code": null,
"e": 1127,
"s": 1062,
"text": "To create a filter list, use the .list-group class in Bootstrap."
},
{
"code": null,
"e": 1191,
"s": 1127,
"text": "You can try to run the following code to create a filter list −"
},
{
"code": null,
"e": 1201,
"s": 1... |
Using machine learning to generate recipes that actually work | by Mikael Davidsson | Towards Data Science | The field of generative models has in recent years had some great success in regards to facial generation, or creating interesting landscapes from drawings.
However, making a recipe for a dish that humans actually would like to eat seems to be outside of our current capabilities. The results are often hilariously bad, ... | [
{
"code": null,
"e": 329,
"s": 172,
"text": "The field of generative models has in recent years had some great success in regards to facial generation, or creating interesting landscapes from drawings."
},
{
"code": null,
"e": 577,
"s": 329,
"text": "However, making a recipe for ... |
DirectX - Blending | DirectX includes a blending property which defines the combination of creation from the existing one. Consider that there are two sources namely: Source 1 and Source 2 where Source 1 refers to the data source for source pixel blending factor and Source 2 is the data source for destination pixel blending factor. DirectX... | [
{
"code": null,
"e": 2819,
"s": 2298,
"text": "DirectX includes a blending property which defines the combination of creation from the existing one. Consider that there are two sources namely: Source 1 and Source 2 where Source 1 refers to the data source for source pixel blending factor and Source ... |
How to display data from MySQL in HTML table using Python | Theory of Computation
In this article, you will learn very simple code to fetch data from a MySQL database and display it in an HTML table using Python.
MySQL is the most popular and widely used Open Source Relational Database Management System. It can run on many different platforms without failure, even in a low-powe... | [
{
"code": null,
"e": 112,
"s": 90,
"text": "Theory of Computation"
},
{
"code": null,
"e": 243,
"s": 112,
"text": "In this article, you will learn very simple code to fetch data from a MySQL database and display it in an HTML table using Python."
},
{
"code": null,
"e... |
Largest Rectangular Area in a Histogram | Set 2 - GeeksforGeeks | 05 Apr, 2022
Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars. For simplicity, assume that all bars have same width and the width is 1 unit. For example, consider the following histogram with 7 bars of heights {6, 2, 5, 4, 5, 1, 6}. T... | [
{
"code": null,
"e": 24439,
"s": 24411,
"text": "\n05 Apr, 2022"
},
{
"code": null,
"e": 24861,
"s": 24439,
"text": "Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars. For simplicity, assume that... |
Find unique rows in a NumPy array - GeeksforGeeks | 02 Sep, 2020
In this article we will discuss how to find unique rows in a NumPy array. To find unique rows in a NumPy array we are using numpy.unique() function of NumPy library.
Syntax : numpy.unique(ar, return_index=False, return_inverse=False, return_counts=False, axis=None)
Now, let’s see an example:
Example 1:
Pyt... | [
{
"code": null,
"e": 25561,
"s": 25533,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 25727,
"s": 25561,
"text": "In this article we will discuss how to find unique rows in a NumPy array. To find unique rows in a NumPy array we are using numpy.unique() function of NumPy librar... |
Stack peek() Method in Java - GeeksforGeeks | 02 Aug, 2018
The java.util.Stack.peek() method in Java is used to retrieve or fetch the first element of the Stack or the element present at the top of the Stack. The element retrieved does not get deleted or removed from the Stack.
Syntax:
STACK.peek()
Parameters: The method does not take any parameters.
Return Value:... | [
{
"code": null,
"e": 25720,
"s": 25692,
"text": "\n02 Aug, 2018"
},
{
"code": null,
"e": 25940,
"s": 25720,
"text": "The java.util.Stack.peek() method in Java is used to retrieve or fetch the first element of the Stack or the element present at the top of the Stack. The element r... |
Print substring of a given string without using any string function and loop in C - GeeksforGeeks | 14 Jul, 2017
Write a function mysubstr() in C that doesn’t use any string function, doesn’t use any loop and prints substring of a string. The function should not modify contents of string and should not use a temporary char array or string.
For example mysubstr(“geeksforgeeks”, 1, 3) should print “eek” i.e., the subst... | [
{
"code": null,
"e": 25477,
"s": 25449,
"text": "\n14 Jul, 2017"
},
{
"code": null,
"e": 25706,
"s": 25477,
"text": "Write a function mysubstr() in C that doesn’t use any string function, doesn’t use any loop and prints substring of a string. The function should not modify conten... |
Maximum number of partitions that can be sorted individually to make sorted - GeeksforGeeks | 28 Apr, 2022
Given an array arr[] of size n such that elements of arr[] in range [0, 1, ..n-1] where every number is present at most once. Our task is to divide the array into maximum number of partitions that can be sorted individually, then concatenated to make the whole array sorted.Examples :
Input : arr[] = [2, 1... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n28 Apr, 2022"
},
{
"code": null,
"e": 26353,
"s": 26067,
"text": "Given an array arr[] of size n such that elements of arr[] in range [0, 1, ..n-1] where every number is present at most once. Our task is to divide the array into ... |
Java Program to Print the Elements of an Array Present on Even Position - GeeksforGeeks | 21 Oct, 2021
The task is to print all the elements that are present in even position. Consider an example, we have an array of length 6, and we need to display all the elements that are present in 2,4 and 6 positions i.e; at indices 1, 3, 5.
Example:
Input: [1,2,3,4,5,6]
Output: 2
4
6
Input: [1,2]
O... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 25455,
"s": 25225,
"text": "The task is to print all the elements that are present in even position. Consider an example, we have an array of length 6, and we need to display all the elements... |
Minimum operations required to convert a binary string to all 0s or all 1s - GeeksforGeeks | 06 May, 2021
Given a binary string str, the task is to find the minimum number of operations required to make all the characters of the string same i.e. either the resultant string contains all 0s or all 1s. In a single operation, any block of consecutive 0s can be converted to a block of consecutive 1s of the same len... | [
{
"code": null,
"e": 26191,
"s": 26163,
"text": "\n06 May, 2021"
},
{
"code": null,
"e": 26529,
"s": 26191,
"text": "Given a binary string str, the task is to find the minimum number of operations required to make all the characters of the string same i.e. either the resultant st... |
Compare two strings represented as linked lists - GeeksforGeeks | 09 May, 2022
Given two strings, represented as linked lists (every character is a node in a linked list). Write a function compare() that works similar to strcmp(), i.e., it returns 0 if both strings are the same, 1 if the first linked list is lexicographically greater, and -1 if the second string is lexicographically ... | [
{
"code": null,
"e": 26216,
"s": 26188,
"text": "\n09 May, 2022"
},
{
"code": null,
"e": 26532,
"s": 26216,
"text": "Given two strings, represented as linked lists (every character is a node in a linked list). Write a function compare() that works similar to strcmp(), i.e., it re... |
Check if the sum of digits of number is divisible by all of its digits - GeeksforGeeks | 15 Mar, 2022
Given an integer N, the task is to check whether the sum of digits of the given number is divisible by all of its digits or not. If divisible then print Yes else print No.
Examples:
Input: N = 12 Output: No Sum of digits = 1 + 2 = 3 3 is divisible by 1 but not 2.
Input: N = 123 Output: Yes
Approach: Firs... | [
{
"code": null,
"e": 26319,
"s": 26291,
"text": "\n15 Mar, 2022"
},
{
"code": null,
"e": 26491,
"s": 26319,
"text": "Given an integer N, the task is to check whether the sum of digits of the given number is divisible by all of its digits or not. If divisible then print Yes else p... |
Flutter - FloatingActionButton - GeeksforGeeks | 17 Nov, 2020
A floating action button is a circular icon button that hovers over content to promote a primary action in the application. Floating action buttons are most commonly used in the Scaffold.floatingActionButton field.
Syntax:
FloatingActionButton({Key key,
Widget child,
String tooltip,
Color foregroundColo... | [
{
"code": null,
"e": 25261,
"s": 25233,
"text": "\n17 Nov, 2020"
},
{
"code": null,
"e": 25476,
"s": 25261,
"text": "A floating action button is a circular icon button that hovers over content to promote a primary action in the application. Floating action buttons are most common... |
Python | shutil.disk_usage() method - GeeksforGeeks | 07 Jun, 2019
Shutil module in Python provides many functions of high-level operations on files and collections of files. It comes under Python’s standard utility modules. This module helps in automating process of copying and removal of files and directories.
shutil.disk_usage() method in Python is to get disk usage st... | [
{
"code": null,
"e": 25653,
"s": 25625,
"text": "\n07 Jun, 2019"
},
{
"code": null,
"e": 25900,
"s": 25653,
"text": "Shutil module in Python provides many functions of high-level operations on files and collections of files. It comes under Python’s standard utility modules. This ... |
How to Select Data Between Two Dates and Times in SQL Server? - GeeksforGeeks | 19 Nov, 2021
In SQL, some transactions need to be extracted based on their completion times and dates. Here, the DATETIME2 data type in SQL to perform such operations. For this article, we will be using the Microsoft SQL Server as our database.
Note: Here, we will use the two dates and times given in the query and sepa... | [
{
"code": null,
"e": 25139,
"s": 25111,
"text": "\n19 Nov, 2021"
},
{
"code": null,
"e": 25371,
"s": 25139,
"text": "In SQL, some transactions need to be extracted based on their completion times and dates. Here, the DATETIME2 data type in SQL to perform such operations. For this... |
Fibonacci Search - GeeksforGeeks | 07 Jan, 2022
Given a sorted array arr[] of size n and an element x to be searched in it. Return index of x if it is present in array else return -1. Examples:
Input: arr[] = {2, 3, 4, 10, 40}, x = 10
Output: 3
Element x is present at index 3.
Input: arr[] = {2, 3, 4, 10, 40}, x = 11
Output: -1
Element x is not pr... | [
{
"code": null,
"e": 25709,
"s": 25681,
"text": "\n07 Jan, 2022"
},
{
"code": null,
"e": 25856,
"s": 25709,
"text": "Given a sorted array arr[] of size n and an element x to be searched in it. Return index of x if it is present in array else return -1. Examples: "
},
{
"c... |
How to generate a documentation using Python? - GeeksforGeeks | 01 Oct, 2020
Documentation improves the readability of the code. There are many tools that help us to create documentations. One such tool is pdoc to write documentation for python projects.
Installation: Run the following pip command on the terminal.
pip3 install pdoc3
Now navigate (through command line) to the fold... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 25716,
"s": 25537,
"text": "Documentation improves the readability of the code. There are many tools that help us to create documentations. One such tool is pdoc to write documentation for py... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.