title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to create an array containing non-repeating elements in JavaScript ? - GeeksforGeeks | 30 Nov, 2020
The following are the two approaches to generate an array containing n number of non-repeating random numbers.
Using do-while loop and includes() function.Using a set and checking with its size.
Using do-while loop and includes() function.
Using a set and checking with its size.
Using do-while loop and inc... | [
{
"code": null,
"e": 24934,
"s": 24906,
"text": "\n30 Nov, 2020"
},
{
"code": null,
"e": 25045,
"s": 24934,
"text": "The following are the two approaches to generate an array containing n number of non-repeating random numbers."
},
{
"code": null,
"e": 25129,
"s":... |
Simple Calculator App using Flutter - GeeksforGeeks | 04 Oct, 2021
Flutter SDK is an open-source software development kit for building beautiful UI which is natively compiled. In this article we will build a Simple Calculator App that can perform basic arithmetic operations like addition, subtraction, multiplication or division depending upon the user input. Making this a... | [
{
"code": null,
"e": 23643,
"s": 23615,
"text": "\n04 Oct, 2021"
},
{
"code": null,
"e": 24033,
"s": 23643,
"text": "Flutter SDK is an open-source software development kit for building beautiful UI which is natively compiled. In this article we will build a Simple Calculator App ... |
Introducing 3D ggplots with Rayshader (R) | by Carrie Lo | Towards Data Science | Rayshader is a powerful package in R supporting 2D and 3D data visualisation. What amazes me is its details of displaying the 3D plots and it provides lots of customisation. Most importantly, it allows you to directly transform the ggplot2 objects into 3D plot.
In this demonstration, the Hong Kong population and housin... | [
{
"code": null,
"e": 434,
"s": 172,
"text": "Rayshader is a powerful package in R supporting 2D and 3D data visualisation. What amazes me is its details of displaying the 3D plots and it provides lots of customisation. Most importantly, it allows you to directly transform the ggplot2 objects into 3D... |
Almost Prime Numbers - GeeksforGeeks | 30 Sep, 2021
A k-Almost Prime Number is a number having exactly k prime factors (not necessarily distinct).
For example,
2, 3, 5, 7, 11 ....(in fact all prime numbers) are 1-Almost Prime Numbers as they have only 1 prime factor (which is themselves).
4, 6, 9.... are 2-Almost Prime Numbers as they have exactly 2 prime f... | [
{
"code": null,
"e": 24429,
"s": 24401,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 24524,
"s": 24429,
"text": "A k-Almost Prime Number is a number having exactly k prime factors (not necessarily distinct)."
},
{
"code": null,
"e": 24537,
"s": 24524,
"tex... |
Fortran - Numbers | Numbers in Fortran are represented by three intrinsic data types −
Integer type
Real type
Complex type
The integer types can hold only integer values. The following example extracts the largest value that could be hold in a usual four byte integer −
program testingInt
implicit none
integer :: largeval
print *, h... | [
{
"code": null,
"e": 2213,
"s": 2146,
"text": "Numbers in Fortran are represented by three intrinsic data types −"
},
{
"code": null,
"e": 2226,
"s": 2213,
"text": "Integer type"
},
{
"code": null,
"e": 2236,
"s": 2226,
"text": "Real type"
},
{
"code":... |
Intersect two lists in C# | Firstly, set two lists.
List<int> val1 = new List<int> { 25, 30, 40, 60, 80, 95, 110 };
List<int> val2 = new List<int> { 27, 35, 40, 75, 95, 100, 110 };
Now, use the Intersect() method to get the intersection between two lists.
IEnumerable<int> res = val1.AsQueryable().Intersect(val2);
Live Demo
using System;
using Sy... | [
{
"code": null,
"e": 1086,
"s": 1062,
"text": "Firstly, set two lists."
},
{
"code": null,
"e": 1215,
"s": 1086,
"text": "List<int> val1 = new List<int> { 25, 30, 40, 60, 80, 95, 110 };\nList<int> val2 = new List<int> { 27, 35, 40, 75, 95, 100, 110 };"
},
{
"code": null,
... |
Calendar setTimeInMillis() Method in Java with Examples - GeeksforGeeks | 06 Mar, 2019
The setTimeInMillis(long mill_sec) method in Calendar class is used to set Calendars time represented by this Calendar from the passed long value.
Syntax:
public void setTimeInMillis(long mill_sec)
Parameters: The method takes one parameter mill_sec of long datat-type and refers to the given date that is t... | [
{
"code": null,
"e": 25347,
"s": 25319,
"text": "\n06 Mar, 2019"
},
{
"code": null,
"e": 25494,
"s": 25347,
"text": "The setTimeInMillis(long mill_sec) method in Calendar class is used to set Calendars time represented by this Calendar from the passed long value."
},
{
"c... |
C Program For Stock Buy Sell To Maximize Profit - GeeksforGeeks | 30 Dec, 2021
Efficient approach: If we are allowed to buy and sell only once, then we can use following algorithm. Maximum difference between two elements. Here we are allowed to buy and sell multiple times. Following is the algorithm for this problem.
Find the local minima and store it as starting index. If not exis... | [
{
"code": null,
"e": 26151,
"s": 26123,
"text": "\n30 Dec, 2021"
},
{
"code": null,
"e": 26393,
"s": 26151,
"text": "Efficient approach: If we are allowed to buy and sell only once, then we can use following algorithm. Maximum difference between two elements. Here we are allowed ... |
Set Theory & Algebra - GeeksforGeeks | 21 Jan, 2014
*
a
b
c
d
a
a
b
c
d
b
b
a
d
c
c
c
d
b
a
d
d
c
a
b
Check for all:-
a1 = a ,
a2 = a * a = a
a3 = a2 * a = a * a = a
a is not the generator since we are not able to express
other members of the group in powers of a
Check for c -
c1 = c
c2 = c * c = b
c3 = c2 * c = b * c = d
c4 = c2 * c2 = b * b = a
We are a... | [
{
"code": null,
"e": 31896,
"s": 31868,
"text": "\n21 Jan, 2014"
},
{
"code": null,
"e": 31898,
"s": 31896,
"text": "*"
},
{
"code": null,
"e": 31900,
"s": 31898,
"text": "a"
},
{
"code": null,
"e": 31902,
"s": 31900,
"text": "b"
},
{
... |
One-Way ANOVA | 18 Apr, 2022
ANOVA is a parametric statistical technique that helps in finding out if there is a significant difference between the mean of three or more groups. It checks the impact of various factors by comparing groups (samples) on the basis of their respective mean.
We can use this only when:
the samples have a n... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Apr, 2022"
},
{
"code": null,
"e": 287,
"s": 28,
"text": "ANOVA is a parametric statistical technique that helps in finding out if there is a significant difference between the mean of three or more groups. It checks the impact of va... |
Python – Fill list characters in String | 29 Aug, 2020
Given String and list, construct a string with only list values filled.
Input : test_str = “geeksforgeeks”, fill_list = [‘g’, ‘s’, ‘f’, k]Output : g__ksf__g__ksExplanation : All occurrences are filled in their position of g, s, f and k.
Input : test_str = “geeksforgeeks”, fill_list = [‘g’, ‘s’]Output : g__... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 100,
"s": 28,
"text": "Given String and list, construct a string with only list values filled."
},
{
"code": null,
"e": 265,
"s": 100,
"text": "Input : test_str = “geeksforgeeks”... |
How to get current_url using Selenium in Python? | 06 Mar, 2020
While doing work with selenium many URL get opened and redirected in order to keeping track of URL current_url method is used. The current_url method is used to retrieve the URL of the webpage the user is currently accessing. It gives the URL of the current webpage loaded by the driver in selenium.
URL : U... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Mar, 2020"
},
{
"code": null,
"e": 328,
"s": 28,
"text": "While doing work with selenium many URL get opened and redirected in order to keeping track of URL current_url method is used. The current_url method is used to retrieve the U... |
Count special palindromes in a String | 14 Mar, 2022
Given a String s, count all special palindromic substrings of size greater than 1. A Substring is called special palindromic substring if all the characters in the substring are same or only the middle character is different for odd length. Example “aabaa” and “aaa” are special palindromic substrings and “... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Mar, 2022"
},
{
"code": null,
"e": 416,
"s": 52,
"text": "Given a String s, count all special palindromic substrings of size greater than 1. A Substring is called special palindromic substring if all the characters in the substring ... |
String Slicing in Python | 21 Jun, 2022
Python slicing is about obtaining a sub-string from the given string by slicing it respectively from start to end.
For understanding slicing we will use different methods, here we will cover 2 methods of string slicing, the one is using the in-build slice() method and another using the [:] array slice. St... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 168,
"s": 52,
"text": "Python slicing is about obtaining a sub-string from the given string by slicing it respectively from start to end. "
},
{
"code": null,
"e": 483,
"s": 168,
... |
Data Mining For Intrusion Detection and Prevention | 22 Sep, 2021
The security of our computer systems and data is at continual risk. The extensive growth of the Internet and the increasing availability of tools and tricks for intruding and attacking networks have prompted intrusion detection and prevention to become a critical component of networked systems.
Unauthorize... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Sep, 2021"
},
{
"code": null,
"e": 348,
"s": 52,
"text": "The security of our computer systems and data is at continual risk. The extensive growth of the Internet and the increasing availability of tools and tricks for intruding and... |
Spark SQL - Quick Guide | Industries are using Hadoop extensively to analyze their data sets. The reason is that Hadoop framework is based on a simple programming model (MapReduce) and it enables a computing solution that is scalable, flexible, fault-tolerant and cost effective. Here, the main concern is to maintain speed in processing large da... | [
{
"code": null,
"e": 2259,
"s": 1854,
"text": "Industries are using Hadoop extensively to analyze their data sets. The reason is that Hadoop framework is based on a simple programming model (MapReduce) and it enables a computing solution that is scalable, flexible, fault-tolerant and cost effective.... |
Sets in Python | 03 Mar, 2022
A Set is an unordered collection data type that is iterable, mutable and has no duplicate elements. Python’s set class represents the mathematical notion of a set. The major advantage of using a set, as opposed to a list, is that it has a highly optimized method for checking whether a specific element is c... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n03 Mar, 2022"
},
{
"code": null,
"e": 522,
"s": 52,
"text": "A Set is an unordered collection data type that is iterable, mutable and has no duplicate elements. Python’s set class represents the mathematical notion of a set. The major ... |
SQL Query to Check or Find the Column Name Which Is Primary Key Column | 08 Apr, 2021
Structured Query Language or SQL, is composed of commands that enable users to create database and table structures, perform various types of data manipulation and data administration and query the database to extract useful information. We will start with creating the database “geeksforgeeks” and then we ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n08 Apr, 2021"
},
{
"code": null,
"e": 475,
"s": 54,
"text": "Structured Query Language or SQL, is composed of commands that enable users to create database and table structures, perform various types of data manipulation and data admin... |
PostgreSQL – Create table using Python | 30 Aug, 2020
This article explores the process of creating table in The PostgreSQL database using Python.
psycopg2 module
sample database
To create a table in the database use the following steps:
First create a CREATE TABLE statement
Second establish a connection to the database using the connect() function
Third cons... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Aug, 2020"
},
{
"code": null,
"e": 121,
"s": 28,
"text": "This article explores the process of creating table in The PostgreSQL database using Python."
},
{
"code": null,
"e": 137,
"s": 121,
"text": "psycopg2 modu... |
What is the difference between getter/setter methods and constructor in Java? | A constructor in Java is similar to method and it is invoked at the time creating an object of the class, it is generally used to initialize the instance variables of a class. The constructors have the same name as their class and, have no return type.
If you do not provide a constructor the compiler defines one on you... | [
{
"code": null,
"e": 1440,
"s": 1187,
"text": "A constructor in Java is similar to method and it is invoked at the time creating an object of the class, it is generally used to initialize the instance variables of a class. The constructors have the same name as their class and, have no return type."... |
How to align text content into center using JavaScript ? | 05 Nov, 2021
In this article, we will align the text content into center by using JavaScript. TWe use HTML DOM style textAlign property to set the alignment of text.
Syntax:
object.style.textAlign = "center"
The above syntax set the text alignment into center dynamically.
Example:
HTML
<!DOCTYPE html><html> <head> <... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Nov, 2021"
},
{
"code": null,
"e": 181,
"s": 28,
"text": "In this article, we will align the text content into center by using JavaScript. TWe use HTML DOM style textAlign property to set the alignment of text."
},
{
"code": ... |
Difference between link and anchor Tags | 22 Sep, 2021
The HTML language is the most basic component of web development. If you are a beginner to web development, learning about HTML then you must have discovered the “link” and “a” tag. These two entities <link> and <a>, are used for some kind of linking so if you are confused between them or want to learn abo... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Sep, 2021"
},
{
"code": null,
"e": 543,
"s": 54,
"text": "The HTML language is the most basic component of web development. If you are a beginner to web development, learning about HTML then you must have discovered the “link” and “... |
EnumMap class in Java | 06 Dec, 2021
EnumMap is a specialized implementation of the Map interface for enumeration types. It extends AbstractMap and implements the Map interface in Java. It belongs to java.util package. A few important features of EnumMap are as follows:
EnumMap class is a member of the Java Collections Framework & is not syn... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Dec, 2021"
},
{
"code": null,
"e": 287,
"s": 52,
"text": "EnumMap is a specialized implementation of the Map interface for enumeration types. It extends AbstractMap and implements the Map interface in Java. It belongs to java.util p... |
How to Create Dynamic Bottom Sheet Dialog in Android using Firebase Firestore? | 24 Jan, 2021
Bottom Sheet Dialog is one of the famous Material UI Component which is used to display the data or notifications in it. We can display any type of data or any UI component in our Bottom Sheet Dialog. In this article, we will take a look at the implementation of dynamic Bottom Sheet Dialog in Android using... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Jan, 2021"
},
{
"code": null,
"e": 357,
"s": 28,
"text": "Bottom Sheet Dialog is one of the famous Material UI Component which is used to display the data or notifications in it. We can display any type of data or any UI component in... |
HTML | DOM lastModified Property | 08 Jul, 2022
The DOM lastModified property in HTML is used to return the date and time of the current document that was last modified. This property is read-only. This property returns a string which contains the date and time when the document was last modified.
Syntax:
document.lastModified
Example:
html
<!DOCTYPE ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jul, 2022"
},
{
"code": null,
"e": 280,
"s": 28,
"text": "The DOM lastModified property in HTML is used to return the date and time of the current document that was last modified. This property is read-only. This property returns a s... |
Python | Exceptional Conditions Testing in Unit Tests | 12 Jun, 2019
This article aims to write a unit test that cleanly tests if an exception is raised. To test for exceptions, the assertRaises() method is used.
Code #1 : Testing that a function raised a ValueError exception
import unittest # A simple function to illustratedef parse_int(s): return int(s) class TestCon... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Jun, 2019"
},
{
"code": null,
"e": 172,
"s": 28,
"text": "This article aims to write a unit test that cleanly tests if an exception is raised. To test for exceptions, the assertRaises() method is used."
},
{
"code": null,
... |
Covariance and Correlation in R Programming | 14 Jan, 2022
Covariance and Correlation are terms used in statistics to measure relationships between two random variables. Both of these terms measure linear dependency between a pair of random variables or bivariate data.
In this article, we are going to discuss cov(), cor() and cov2cor() functions in R which use co... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Jan, 2022"
},
{
"code": null,
"e": 240,
"s": 28,
"text": "Covariance and Correlation are terms used in statistics to measure relationships between two random variables. Both of these terms measure linear dependency between a pair of ... |
Check if strings are rotations of each other or not | Practice | GeeksforGeeks | Given two strings s1 and s2. The task is to check if s2 is a rotated version of the string s1. The characters in the strings are in lowercase.
Example 1:
Input:
geeksforgeeks
forgeeksgeeks
Output:
1
Explanation: s1 is geeksforgeeks, s2 is
forgeeksgeeks. Clearly, s2 is a rotated
version of s1 as s2 can be obtained by... | [
{
"code": null,
"e": 369,
"s": 226,
"text": "Given two strings s1 and s2. The task is to check if s2 is a rotated version of the string s1. The characters in the strings are in lowercase."
},
{
"code": null,
"e": 382,
"s": 371,
"text": "Example 1:"
},
{
"code": null,
... |
Generating hash id’s using uuid3() and uuid5() in Python | 21 Sep, 2021
Python’s UUID class defines four functions and each generates different version of UUIDs. Let’s see how to generate UUID based on MD5 and SHA-1 hash using uuid3() and uuid5() .Cryptographic hashes can be used to generate different ID’s taking NAMESPACE identifier and a string as input. The functions that s... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 380,
"s": 28,
"text": "Python’s UUID class defines four functions and each generates different version of UUIDs. Let’s see how to generate UUID based on MD5 and SHA-1 hash using uuid3() and uuid5() ... |
Up-sampling in MATLAB | 01 Oct, 2020
Interpolation or up-sampling is the specific inverse of decimation. It is a data saving operation, in that all examples of x[n] are available in the extended signal y[n]. Interpolation works by adding (L–1) zero-valued examples for each input sample.
We will be using the interp() function to interpolate a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 280,
"s": 28,
"text": "Interpolation or up-sampling is the specific inverse of decimation. It is a data saving operation, in that all examples of x[n] are available in the extended signal y[n]. Inte... |
Using range in switch case in C/C++ | In C or C++, we have used the switch-case statement. In the switch statement we pass some value, and using different cases, we can check the value. Here we will see that we can use ranges in the case statement.
The syntax of using range in Case is like below −
case low ... high
After writing case, we have to put lower ... | [
{
"code": null,
"e": 1398,
"s": 1187,
"text": "In C or C++, we have used the switch-case statement. In the switch statement we pass some value, and using different cases, we can check the value. Here we will see that we can use ranges in the case statement."
},
{
"code": null,
"e": 1448,... |
Bucket Sort | 22 Oct, 2021
Bucket sort is mainly useful when input is uniformly distributed over a range. For example, consider the following problem. Sort a large set of floating point numbers which are in range from 0.0 to 1.0 and are uniformly distributed across the range. How do we sort the numbers efficiently?A simple way is to... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Oct, 2021"
},
{
"code": null,
"e": 777,
"s": 52,
"text": "Bucket sort is mainly useful when input is uniformly distributed over a range. For example, consider the following problem. Sort a large set of floating point numbers which a... |
Lodash _.isObject() Method | 05 Sep, 2020
Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc.
The _.isObject() method is used to find whether the given value is an object or not. It returns a Boolean value True if the given value parameter is an object and retu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Sep, 2020"
},
{
"code": null,
"e": 168,
"s": 28,
"text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc."
},
{
"code": null,
"e"... |
Mathematics | Power Set and its Properties | 23 Feb, 2022
Prerequisite – Introduction of Set theory, Set Operations (Set theory) For a given set S, Power set P(S) or 2^S represents the set containing all possible subsets of S as its elements. For example, S = {1, 2, 3} P(S) = {ɸ, {1}, {2}, {3} {1,2}, {1,3}, {2,3}, {1,2,3}}
Number of Elements in Power Set – For a... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n23 Feb, 2022"
},
{
"code": null,
"e": 321,
"s": 53,
"text": "Prerequisite – Introduction of Set theory, Set Operations (Set theory) For a given set S, Power set P(S) or 2^S represents the set containing all possible subsets of S as its... |
Angular7 - Modules | Module in Angular refers to a place where you can group the components, directives, pipes, and services, which are related to the application.
In case you are developing a website, the header, footer, left, center and the right section become part of a module.
To define module, we can use the NgModule. When you create ... | [
{
"code": null,
"e": 2204,
"s": 2061,
"text": "Module in Angular refers to a place where you can group the components, directives, pipes, and services, which are related to the application."
},
{
"code": null,
"e": 2322,
"s": 2204,
"text": "In case you are developing a website, t... |
Find maximum value from a VARCHAR column in MySQL | To find maximum value, use MAX() along with CAST(), since the values are of VARCHAR type. Let us first create a table −
mysql> create table DemoTable2030
-> (
-> Value varchar(20)
-> );
Query OK, 0 rows affected (0.44 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable2030... | [
{
"code": null,
"e": 1182,
"s": 1062,
"text": "To find maximum value, use MAX() along with CAST(), since the values are of VARCHAR type. Let us first create a table −"
},
{
"code": null,
"e": 1294,
"s": 1182,
"text": "mysql> create table DemoTable2030\n -> (\n -> Value varcha... |
Python - Check if all elements in a List are same | Sometimes we come across the need to check if we have one single value repeated in a list as list elements. We can check for such scenario using the below python programs. There are different approaches.
In this method we grab the first element from the list and use a traditional for loop to keep comparing each element... | [
{
"code": null,
"e": 1266,
"s": 1062,
"text": "Sometimes we come across the need to check if we have one single value repeated in a list as list elements. We can check for such scenario using the below python programs. There are different approaches."
},
{
"code": null,
"e": 1505,
"s... |
Java String subSequence() method with Examples - GeeksforGeeks | 04 Dec, 2018
The Java.lang.String.subSequence() is a built-in function in Java that returns a CharSequence. CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at (end-1). The length (in chars) of the returned sequence is (e... | [
{
"code": null,
"e": 24635,
"s": 24607,
"text": "\n04 Dec, 2018"
},
{
"code": null,
"e": 25007,
"s": 24635,
"text": "The Java.lang.String.subSequence() is a built-in function in Java that returns a CharSequence. CharSequence that is a subsequence of this sequence. The subsequence... |
Rexx - do Loop | The do loop is used to execute a number of statements for a certain number of times. The number of times that the statement needs to be executed is determined by the value passed to the do loop.
The syntax of the do loop statement is as follows −
do count
statement #1
statement #2
...
End
Statement#1 and... | [
{
"code": null,
"e": 2534,
"s": 2339,
"text": "The do loop is used to execute a number of statements for a certain number of times. The number of times that the statement needs to be executed is determined by the value passed to the do loop."
},
{
"code": null,
"e": 2586,
"s": 2534,
... |
PHP | join() Function | 08 Jan, 2018
The join() function is built-in function in PHP and is used to join an array of elements which are separated by a string.
Syntax
string join( $separator, $array)
Parameter: The join() function accepts two parameter out of which one is optional and one is mandatory.
$separator : This is an optional paramete... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jan, 2018"
},
{
"code": null,
"e": 150,
"s": 28,
"text": "The join() function is built-in function in PHP and is used to join an array of elements which are separated by a string."
},
{
"code": null,
"e": 157,
"s": 15... |
Edge detection using in-built function in MATLAB | 25 Aug, 2021
Edge detection: In an image, an edge is a curve that follows a path of rapid change in intensity of that image. Edges are often associated with the boundaries of the object in a scene environment. Edge detection is used to identify the edges in an image to make image processing easy. Edge detection works b... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n25 Aug, 2021"
},
{
"code": null,
"e": 549,
"s": 53,
"text": "Edge detection: In an image, an edge is a curve that follows a path of rapid change in intensity of that image. Edges are often associated with the boundaries of the object i... |
Object Oriented Programming in PHP | We can imagine our universe made of different objects like sun, earth, moon etc. Similarly we can imagine our car made of different objects like wheel, steering, gear etc. Same way there is object oriented programming concepts which assume everything as an object and implement a software using different objects.
Before... | [
{
"code": null,
"e": 3205,
"s": 2891,
"text": "We can imagine our universe made of different objects like sun, earth, moon etc. Similarly we can imagine our car made of different objects like wheel, steering, gear etc. Same way there is object oriented programming concepts which assume everything as... |
Instagram-explore module in Python | 20 Aug, 2020
instagram-explore module is an Instagram scrapping module.
Run the following pip command :
pip install instagram-explore
This module has 8 functions currently for exploring Instagram:
Getting user informationGetting tagGetting user imagesGetting locationsLocationLocation imagesMediaMedia images
Getting us... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Aug, 2020"
},
{
"code": null,
"e": 87,
"s": 28,
"text": "instagram-explore module is an Instagram scrapping module."
},
{
"code": null,
"e": 119,
"s": 87,
"text": "Run the following pip command :"
},
{
"co... |
Python | Random Password Generator using Tkinter | 13 May, 2022
With growing technology, everything has relied on data, and securing this data is the main concern. Passwords are meant to keep the data safe that we upload on the Internet. An easy password can be hacked easily and all personal information can be misused. In order to prevent such things and keep the data ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n13 May, 2022"
},
{
"code": null,
"e": 416,
"s": 52,
"text": "With growing technology, everything has relied on data, and securing this data is the main concern. Passwords are meant to keep the data safe that we upload on the Internet. ... |
How to create a canvas ellipse using Fabric.js ? | 08 Feb, 2022
In this article, we are going to see how to create a canvas ellipse using FabricJS. The canvas means ellipse is movable and can be stretched according to requirement. Further, the ellipse can be customized when it comes to initial stroke color, fill color, stroke width or radius.Approach: To make it possib... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Feb, 2022"
},
{
"code": null,
"e": 674,
"s": 28,
"text": "In this article, we are going to see how to create a canvas ellipse using FabricJS. The canvas means ellipse is movable and can be stretched according to requirement. Further,... |
StringBuffer toString() method in Java with Examples | 04 Dec, 2018
The toString() method of StringBuffer class is the inbuilt method used to returns a string representing the data contained by StringBuffer Object. A new String object is created and initialized to get the character sequence from this StringBuffer object and then String is returned by toString(). Subsequent... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Dec, 2018"
},
{
"code": null,
"e": 423,
"s": 28,
"text": "The toString() method of StringBuffer class is the inbuilt method used to returns a string representing the data contained by StringBuffer Object. A new String object is creat... |
java.time.LocalDate.isBefore() Method Example | The java.time.LocalDate.isBefore(ChronoLocalDate other) method checks if this date is before the specified date.
Following is the declaration for java.time.LocalDate.isBefore(ChronoLocalDate other) method.
public boolean isBefore(ChronoLocalDate other)
other − the other date to compare to, not null.
true if this date ... | [
{
"code": null,
"e": 2162,
"s": 2049,
"text": "The java.time.LocalDate.isBefore(ChronoLocalDate other) method checks if this date is before the specified date."
},
{
"code": null,
"e": 2255,
"s": 2162,
"text": "Following is the declaration for java.time.LocalDate.isBefore(ChronoL... |
Why Linked List is implemented on Heap memory rather than Stack memory? | 05 Jul, 2022
Pre-requisite:
Linked List Data StructureStack vsHeap Memory Allocation
The Linked List is a linear data structure, in which the elements are not stored at contiguous memory locations. The elements in a linked list are linked using pointers. It is implemented on the heap memory rather than the stack memor... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Jul, 2022"
},
{
"code": null,
"e": 70,
"s": 54,
"text": "Pre-requisite: "
},
{
"code": null,
"e": 127,
"s": 70,
"text": "Linked List Data StructureStack vsHeap Memory Allocation"
},
{
"code": null,
"e... |
Formatted Output in Java | String provides format() method can be used to print formatted output in java.
String provides format() method can be used to print formatted output in java.
System.out.printf() method can be used to print formatted output in java.
System.out.printf() method can be used to print formatted output in java.
Following exam... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "String provides format() method can be used to print formatted output in java."
},
{
"code": null,
"e": 1220,
"s": 1141,
"text": "String provides format() method can be used to print formatted output in java."
},
{
"code": nu... |
chgrp - Unix, Linux Command | chgrp - To change group ownership.
chgrp [Options]... {Group | --reference=File} File...
'chgrp' command changes the group ownership of each given File to Group (which can be either a group name or a numeric group id) or to match the same group as an existing reference file.
To Make oracleadmin the owner of the databas... | [
{
"code": null,
"e": 10612,
"s": 10577,
"text": "chgrp - To change group ownership."
},
{
"code": null,
"e": 10666,
"s": 10612,
"text": "chgrp [Options]... {Group | --reference=File} File..."
},
{
"code": null,
"e": 10853,
"s": 10666,
"text": "'chgrp' command ... |
Python Comments - GeeksforGeeks | 11 Apr, 2022
Comments in Python are the lines in the code that are ignored by the interpreter during the execution of the program. Comments enhance the readability of the code and help the programmers to understand the code very carefully. There are three types of comments in Python –
Single line Comments
Multiline Co... | [
{
"code": null,
"e": 23926,
"s": 23898,
"text": "\n11 Apr, 2022"
},
{
"code": null,
"e": 24200,
"s": 23926,
"text": "Comments in Python are the lines in the code that are ignored by the interpreter during the execution of the program. Comments enhance the readability of the code ... |
Find a matrix or vector norm using NumPy - GeeksforGeeks | 06 Jun, 2021
To find a matrix or vector norm we use function numpy.linalg.norm() of Python library Numpy. This function returns one of the seven matrix norms or one of the infinite vector norms depending upon the value of its parameters.
Syntax: numpy.linalg.norm(x, ord=None, axis=None)Parameters: x: input ord: order ... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 24438,
"s": 24212,
"text": "To find a matrix or vector norm we use function numpy.linalg.norm() of Python library Numpy. This function returns one of the seven matrix norms or one of the infi... |
Your Ultimate Data Science Statistics & Mathematics Cheat Sheet | by Andre Ye | Towards Data Science | All images created by author unless stated otherwise.
In data science, having a solid understanding of the statistics and mathematics of your data is essential to applying and interpreting machine learning methods appropriately and effectively.
Classifier Metrics. Confusion matrix, sensitivity, recall, specificity, pre... | [
{
"code": null,
"e": 226,
"s": 172,
"text": "All images created by author unless stated otherwise."
},
{
"code": null,
"e": 417,
"s": 226,
"text": "In data science, having a solid understanding of the statistics and mathematics of your data is essential to applying and interpreti... |
How to read an image file in external storage with runtime permission in android? | This example demonstrates How to read an image file in external storage with runtime permission 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... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "This example demonstrates How to read an image file in external storage with runtime permission in android."
},
{
"code": null,
"e": 1299,
"s": 1170,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project ... |
Python Tkinter – How do I change the text size in a label widget? | Tkinter Label Widgets are used to create labels in a window. We can style the widgets using the tkinter.ttk package. In order to resize the font-size, font-family and font-style of Label widgets, we can use the inbuilt property of font(‘font-family font style’, font-size).
In this example, we will create buttons that w... | [
{
"code": null,
"e": 1336,
"s": 1062,
"text": "Tkinter Label Widgets are used to create labels in a window. We can style the widgets using the tkinter.ttk package. In order to resize the font-size, font-family and font-style of Label widgets, we can use the inbuilt property of font(‘font-family font... |
Find N-th term in the series 0, 4, 18, 48, 100 ... - GeeksforGeeks | 06 Dec, 2021
Given a series 0, 4, 18, 48, 100 . . . and an integer N, the task is to find the N-th term of the series.
Examples:
Input: N = 4Output: 48Explanation: As given in the sequence we can see that 4th term is 48
Input: N = 6Output: 180
Approach: Consider the below observation:
For N = 2, the 2nd term is 4, whi... | [
{
"code": null,
"e": 24612,
"s": 24584,
"text": "\n06 Dec, 2021"
},
{
"code": null,
"e": 24719,
"s": 24612,
"text": "Given a series 0, 4, 18, 48, 100 . . . and an integer N, the task is to find the N-th term of the series."
},
{
"code": null,
"e": 24729,
"s": 247... |
Java 8 Streams and its operations | Streams are sequences of objects from a source, which support aggregate operations. These were introduced in Java 8.
With Java 8, Collection interface has two methods to generate a Stream.
stream() − Returns a sequential stream considering collection as its source.
stream() − Returns a sequential stream considering col... | [
{
"code": null,
"e": 1179,
"s": 1062,
"text": "Streams are sequences of objects from a source, which support aggregate operations. These were introduced in Java 8."
},
{
"code": null,
"e": 1251,
"s": 1179,
"text": "With Java 8, Collection interface has two methods to generate a S... |
When Data Science Meet Football (Part 1): Introduction | by Fahmi Nurfikri | Towards Data Science | The utilization of data in football (or soccer) has become very important to develop player skills or match analysis. Today, we can discuss the world of football in greater depth and detail than in the previous period. For those of you who are starting to explore data analytics in football, there are public data sets p... | [
{
"code": null,
"e": 543,
"s": 172,
"text": "The utilization of data in football (or soccer) has become very important to develop player skills or match analysis. Today, we can discuss the world of football in greater depth and detail than in the previous period. For those of you who are starting to... |
casefold() string in Python | This function is helpful in converting the letters of a word into lowercase. When applied to two strings it can match their values irrespective of the type up of the case of the letters.
The below example we apply the casefold() function to a string and the result comes out in all lower case letters.
string = "BestTuto... | [
{
"code": null,
"e": 1249,
"s": 1062,
"text": "This function is helpful in converting the letters of a word into lowercase. When applied to two strings it can match their values irrespective of the type up of the case of the letters."
},
{
"code": null,
"e": 1364,
"s": 1249,
"tex... |
Count Numbers with Unique Digits in C++ | Suppose we have a non-negative integer n. We have to count all numbers with unique digits x, where x is in range 0 to 10^n. So if the number n is 2, then the result will be 91, as we want to find numbers from 0 to 100 without 11, 22, 33, 44, 55, 66, 77, 88, 99.
To solve this, we will follow these steps −
if n is 0, the... | [
{
"code": null,
"e": 1324,
"s": 1062,
"text": "Suppose we have a non-negative integer n. We have to count all numbers with unique digits x, where x is in range 0 to 10^n. So if the number n is 2, then the result will be 91, as we want to find numbers from 0 to 100 without 11, 22, 33, 44, 55, 66, 77,... |
Sorting Operators in LINQ | A sorting operation allows ordering the elements of a sequence on basis of a single or more attributes.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Operators {
class Program {
static void Main(string[] args) {
int[] num = { -20, 12, 6, 10, 0,... | [
{
"code": null,
"e": 1840,
"s": 1736,
"text": "A sorting operation allows ordering the elements of a sequence on basis of a single or more attributes."
},
{
"code": null,
"e": 2838,
"s": 1840,
"text": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Sy... |
Real-time dashboard in Python. Streaming and Refreshing | by Sophia Yang | Towards Data Science | Data scientists use data visualization to communicate data and generate insights. It’s essential for data scientists to know how to create meaningful visualization dashboards, especially real-time dashboards. This article talks about two ways to get your real-time dashboard in Python:
First, we use streaming data and c... | [
{
"code": null,
"e": 457,
"s": 171,
"text": "Data scientists use data visualization to communicate data and generate insights. It’s essential for data scientists to know how to create meaningful visualization dashboards, especially real-time dashboards. This article talks about two ways to get your ... |
Flip Bits | Practice | GeeksforGeeks | Given an array A[] consisting of 0’s and 1’s. A flip operation is one in which you turn 1 into 0 and a 0 into 1. You have to do at most one “Flip” operation of any subarray. Formally, select a range (l, r) in the array A[], such that (0 ≤ l ≤ r < n) holds and flip the elements in this range to get the maximum ones in t... | [
{
"code": null,
"e": 631,
"s": 238,
"text": "Given an array A[] consisting of 0’s and 1’s. A flip operation is one in which you turn 1 into 0 and a 0 into 1. You have to do at most one “Flip” operation of any subarray. Formally, select a range (l, r) in the array A[], such that (0 ≤ l ≤ r < n) holds... |
Input/Output Operators Overloading in C++ | C++ is able to input and output the built-in data types using the stream extraction operator >> and the stream insertion operator <<. The stream insertion and stream extraction operators also can be overloaded to perform input and output for user-defined types like an object.
Here, it is important to make operator ove... | [
{
"code": null,
"e": 2596,
"s": 2318,
"text": "C++ is able to input and output the built-in data types using the stream extraction operator >> and the stream insertion operator <<. The stream insertion and stream extraction operators also can be overloaded to perform input and output for user-defin... |
Git - Push Operation | Jerry modified his last commit by using the amend operation and he is ready to push the changes. The Push operation stores data permanently to the Git repository. After a successful push operation, other developers can see Jerry’s changes.
He executes the git log command to view the commit details.
[jerry@CentOS projec... | [
{
"code": null,
"e": 2285,
"s": 2045,
"text": "Jerry modified his last commit by using the amend operation and he is ready to push the changes. The Push operation stores data permanently to the Git repository. After a successful push operation, other developers can see Jerry’s changes."
},
{
... |
Deep Reinforcement Learning for Automated Stock Trading | by Bruce Yang | Towards Data Science | Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking professional advice. See our Reader Terms for details.
This blog is based o... | [
{
"code": null,
"e": 472,
"s": 172,
"text": "Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking profession... |
Linear search in Java. | Following is the required program.
Live Demo
public class Tester {
public static int linearSearch(int[] arr, int element) {
for (int i = 0; i < arr.length; i++) {
if (arr[i] == element) {
return i;
}
}
return -1;
}
public static void main(String a[]) {
int[... | [
{
"code": null,
"e": 1097,
"s": 1062,
"text": "Following is the required program."
},
{
"code": null,
"e": 1107,
"s": 1097,
"text": "Live Demo"
},
{
"code": null,
"e": 1675,
"s": 1107,
"text": "public class Tester {\n public static int linearSearch(int[] arr... |
How can we parse a nested JSON object in Java? | The JSON is a lightweight, text-based and language-independent data exchange format. The JSON can represent two structured types like objects and arrays. A JSONArray can parse text from a String to produce a vector-like object. We can parse a nested JSON object using the getString(index) method of JSONArray. This is a ... | [
{
"code": null,
"e": 1506,
"s": 1062,
"text": "The JSON is a lightweight, text-based and language-independent data exchange format. The JSON can represent two structured types like objects and arrays. A JSONArray can parse text from a String to produce a vector-like object. We can parse a nested JSO... |
Python | os.path.dirname() method | 26 Aug, 2019
OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality. os.path module is sub module of OS module in Python used for common path name manipulati... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Aug, 2019"
},
{
"code": null,
"e": 339,
"s": 28,
"text": "OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of usin... |
Creating a dataframe from Pandas series | 05 Feb, 2019
Series is a type of list in pandas which can take integer values, string values, double values and more. But in Pandas Series we return an object in the form of list, having index starting from 0 to n, Where n is the length of values in series.
Later in this article, we will discuss dataframes in pandas, b... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Feb, 2019"
},
{
"code": null,
"e": 299,
"s": 54,
"text": "Series is a type of list in pandas which can take integer values, string values, double values and more. But in Pandas Series we return an object in the form of list, having ... |
Calculate standard deviation of a Matrix in Python | 26 Nov, 2020
In this article we will learn how to calculate standard deviation of a Matrix using Python.
Standard deviation is used to measure the spread of values within the dataset. It indicates variations or dispersion of values in the dataset and also helps to determine the confidence in a model’s statistical concl... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Nov, 2020"
},
{
"code": null,
"e": 120,
"s": 28,
"text": "In this article we will learn how to calculate standard deviation of a Matrix using Python."
},
{
"code": null,
"e": 650,
"s": 120,
"text": "Standard devia... |
Left rotation of an array using vectors in C++ | 01 Jun, 2022
Given an array arr[] of integers and another integer D, the task is to perform D left rotations on the array and print the modified array.
Examples:
Input: arr[] = {1, 2, 3, 4, 5, 6}, D = 2
Output: 3 4 5 6 1 2
Input: arr[] = {1, 2, 3, 4, 5, 6}, D = 12
Output: 1 2 3 4 5 6
Approach: Using vectors in C++, a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Jun, 2022"
},
{
"code": null,
"e": 167,
"s": 28,
"text": "Given an array arr[] of integers and another integer D, the task is to perform D left rotations on the array and print the modified array."
},
{
"code": null,
"e":... |
Python Program for Difference between sums of odd and even digits | 09 Jun, 2022
Given a long integer, we need to find if the difference between sum of odd digits and sum of even digits is 0 or not. The indexes start from zero (0 index is for the leftmost digit).
Examples:
Input : 1212112
Output : Yes
Explanation:-
the odd position element is 2+2+1=5
the even position element is 1+1+1+... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 211,
"s": 28,
"text": "Given a long integer, we need to find if the difference between sum of odd digits and sum of even digits is 0 or not. The indexes start from zero (0 index is for the leftmost ... |
XMLStreamWriter in Java StAX | 16 Sep, 2021
Streaming API for XML added in Java 6 provides a handy interface XMLStreamWriter which is used for writing XML documents. this API does not require building any specific object structure like in DOM and doing any intermediate tasks. It also supports namespaces by default which is very useful in more advanc... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Sep, 2021"
},
{
"code": null,
"e": 350,
"s": 28,
"text": "Streaming API for XML added in Java 6 provides a handy interface XMLStreamWriter which is used for writing XML documents. this API does not require building any specific objec... |
Swing Examples - Show a Modal Dialog | Following example showcase how to create a modal dialog in swing based application.
We are using the following APIs.
JDialog − To create a standard dialog box.
JDialog − To create a standard dialog box.
JDialog.getContentPane() − To get the content panel of the dialog box.
JDialog.getContentPane() − To get the content ... | [
{
"code": null,
"e": 2257,
"s": 2173,
"text": "Following example showcase how to create a modal dialog in swing based application."
},
{
"code": null,
"e": 2290,
"s": 2257,
"text": "We are using the following APIs."
},
{
"code": null,
"e": 2333,
"s": 2290,
"te... |
Check if a string has m consecutive 1’s or 0’s | 27 May, 2021
Given a binary string and a number m, the task is to check if the string has m consecutive 1’s or 0’s.
Examples:
Input : str = “001001”, m = 2 Output : YES
Input : str = “1000000001”, m = 10 Output : NO
The approach is to count the consecutive 1’s or 0’s by traversing the binary string. While traversing ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n27 May, 2021"
},
{
"code": null,
"e": 156,
"s": 53,
"text": "Given a binary string and a number m, the task is to check if the string has m consecutive 1’s or 0’s."
},
{
"code": null,
"e": 167,
"s": 156,
"text": "Ex... |
Construct Binary Tree from String with bracket representation | 04 May, 2022
Construct a binary tree from a string consisting of parenthesis and integers. The whole input represents a binary tree. It contains an integer followed by zero, one or two pairs of parenthesis. The integer represents the root’s value and a pair of parenthesis contains a child binary tree with the same stru... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 May, 2022"
},
{
"code": null,
"e": 448,
"s": 54,
"text": "Construct a binary tree from a string consisting of parenthesis and integers. The whole input represents a binary tree. It contains an integer followed by zero, one or two pa... |
Vampire Number | 14 Jun, 2019
Introduction to Vampire Number and its implementation using python.
IntroductionIn mathematics, a vampire number (or true vampire number) is a composite natural number v, with an even number of digits n, that can be factored into two integers x and y each with n/2 digits and not both with trailing zeroes, ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Jun, 2019"
},
{
"code": null,
"e": 122,
"s": 54,
"text": "Introduction to Vampire Number and its implementation using python."
},
{
"code": null,
"e": 503,
"s": 122,
"text": "IntroductionIn mathematics, a vampire... |
Working with Images – Python .docx Module | 03 Jan, 2021
Prerequisites: docx
Word documents contain formatted text wrapped within three object levels. Lowest level- run objects, middle level- paragraph objects and highest level- document object. So, we cannot work with these documents using normal text editors. But, we can manipulate these word documents in pyth... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Jan, 2021"
},
{
"code": null,
"e": 48,
"s": 28,
"text": "Prerequisites: docx"
},
{
"code": null,
"e": 369,
"s": 48,
"text": "Word documents contain formatted text wrapped within three object levels. Lowest level- ... |
Python | Ways to rotate a list | 30 Nov, 2018
The rotation of a list has been discussed earlier also, but this particular article focuses on shorthands and various short techniques to achieve this in one-liners or one word. This operation is quite essential in a programmers life to achieve various tasks.
Let’s discuss different ways we can rotate a li... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n30 Nov, 2018"
},
{
"code": null,
"e": 313,
"s": 53,
"text": "The rotation of a list has been discussed earlier also, but this particular article focuses on shorthands and various short techniques to achieve this in one-liners or one wo... |
How to Implement Chat Functionality in Social Media Android App? | 09 May, 2022
This is the Part 14 of “Build a Social Media App on Android Studio” tutorial, and we are going to cover the following functionalities in this article:
We are going to Create a Layout for chat & Send Messages in Chat.
A user can send either a Message or an Image.
A user can send an image either using a came... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 May, 2022"
},
{
"code": null,
"e": 179,
"s": 28,
"text": "This is the Part 14 of “Build a Social Media App on Android Studio” tutorial, and we are going to cover the following functionalities in this article:"
},
{
"code": nu... |
Python – Create window button in GTK+ 3 | 30 Jun, 2021
GTK+ 3 is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License. Along with Qt, it is one of the most popular toolkits for the Wayland and X11 windowing systems. Let’s see how to create a w... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 417,
"s": 52,
"text": "GTK+ 3 is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public ... |
LocalDate getMonthValue() method in Java with Examples | 29 Nov, 2018
The getMonthValue() method of LocalDate class in Java gets the month-of-year field from 1 to 12.
Syntax:
public int getMonthValue()
Parameter: This method does not accepts any parameter.
Return Value: The function returns the month of the year from 1-12 in numbers.
Below programs illustrate the getMonthVa... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Nov, 2018"
},
{
"code": null,
"e": 125,
"s": 28,
"text": "The getMonthValue() method of LocalDate class in Java gets the month-of-year field from 1 to 12."
},
{
"code": null,
"e": 133,
"s": 125,
"text": "Syntax:"
... |
Python | Ways to merge strings into list | 27 Feb, 2019
Given n strings, the task is to merge all strings into a single list.
While developing an application, there come many scenarios when we need to operate on the string and convert it as some mutable data structure, say list. There are multiple ways we can convert strings into list based on the requirement. ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Feb, 2019"
},
{
"code": null,
"e": 98,
"s": 28,
"text": "Given n strings, the task is to merge all strings into a single list."
},
{
"code": null,
"e": 385,
"s": 98,
"text": "While developing an application, there... |
Matplotlib.figure.Figure.align_labels() in Python - GeeksforGeeks | 30 Apr, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains all the plot elements. This module is used to control the default spacing of the subplots and top level container for all plot elemen... | [
{
"code": null,
"e": 24916,
"s": 24888,
"text": "\n30 Apr, 2020"
},
{
"code": null,
"e": 25227,
"s": 24916,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, whic... |
Group Management in Linux - GeeksforGeeks | 21 Apr, 2020
There are 2 categories of groups in the Linux operating system i.e. Primary and Secondary groups. The Primary Group is a group that is automatically generated while creating a user with a unique user ID simultaneously a group with ID same as the user ID is created and the user gets added to the group and b... | [
{
"code": null,
"e": 24406,
"s": 24378,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 24955,
"s": 24406,
"text": "There are 2 categories of groups in the Linux operating system i.e. Primary and Secondary groups. The Primary Group is a group that is automatically generated whil... |
Bias-variance tradeoff in machine learning: an intuition | by Mahbubul Alam | Towards Data Science | If we had more money in our pockets, we tend to spend more — that’s almost a fact that everyone knows. But what’s often not known is the exact relationship between income and expenditure, i.e. how much people would spend on a known income.
An approximate solution is to build a statistical model by observing people’s in... | [
{
"code": null,
"e": 412,
"s": 172,
"text": "If we had more money in our pockets, we tend to spend more — that’s almost a fact that everyone knows. But what’s often not known is the exact relationship between income and expenditure, i.e. how much people would spend on a known income."
},
{
"... |
ios fail() function in C++ with Examples - GeeksforGeeks | 02 Sep, 2019
The fail() method of ios class in C++ is used to check if the stream is has raised any fail error. It means that this function will check if this stream has its failbit set.
Syntax:
bool fail() const;
Parameters: This method does not accept any parameter.
Return Value: This method returns true if the stre... | [
{
"code": null,
"e": 24221,
"s": 24193,
"text": "\n02 Sep, 2019"
},
{
"code": null,
"e": 24395,
"s": 24221,
"text": "The fail() method of ios class in C++ is used to check if the stream is has raised any fail error. It means that this function will check if this stream has its fa... |
How to Install SQLAlchemy in Python in Windows? - GeeksforGeeks | 22 Sep, 2021
SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that is used as flexible database access using SQL. In this article, we will look into the process of installing SQLAlchemy on a windows machine.
The only thing that you need for installing Numpy on Windows are:
Python
PIP or Conda (depend... | [
{
"code": null,
"e": 26207,
"s": 26179,
"text": "\n22 Sep, 2021"
},
{
"code": null,
"e": 26420,
"s": 26207,
"text": "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that is used as flexible database access using SQL. In this article, we will look into the proce... |
Differences between Functional Components and Class Components in React - GeeksforGeeks | 29 Mar, 2022
Make a counter app that will increase the number of counts as users click on the “Add” button using Functional and Class components.
Functional Components: Functional components are some of the more common components that will come across while working in React. These are simply JavaScript functions. We ca... | [
{
"code": null,
"e": 28522,
"s": 28494,
"text": "\n29 Mar, 2022"
},
{
"code": null,
"e": 28655,
"s": 28522,
"text": "Make a counter app that will increase the number of counts as users click on the “Add” button using Functional and Class components."
},
{
"code": null,
... |
GATE | GATE-CS-2015 (Set 1) | Question 65 - GeeksforGeeks | 11 Oct, 2021
For any two languages L1 and L2 such that L1 is context free and L2 is recursively enumerable but not recursive, which of the following is/are necessarily true?
1. L1' (complement of L1) is recursive
2. L2' (complement of L2) is recursive
3. L1' is context-free
4. L1' ∪ L2 is recursively enumerable
(A) ... | [
{
"code": null,
"e": 24075,
"s": 24047,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 24236,
"s": 24075,
"text": "For any two languages L1 and L2 such that L1 is context free and L2 is recursively enumerable but not recursive, which of the following is/are necessarily true?"
... |
How to remove margin introduced in pre tag in bootstrap 4? - GeeksforGeeks | 25 May, 2020
The problem is that whenever you apply margin space as per your margin value it will give you output. But in <pre> tag if you apply it by keeping any space then it will consider as margin. Because pre is acted vice versa, means as you have written inside the pre tag the output will be the same.
Note: The e... | [
{
"code": null,
"e": 23791,
"s": 23763,
"text": "\n25 May, 2020"
},
{
"code": null,
"e": 24087,
"s": 23791,
"text": "The problem is that whenever you apply margin space as per your margin value it will give you output. But in <pre> tag if you apply it by keeping any space then it... |
How to split a big data frame into smaller ones in R? | Dealing with big data frames is not an easy task therefore we might want to split that into some smaller data frames. These smaller data frames can be extracted from the big one based on some criteria such as for levels of a factor variable or with some other conditions. This can be done by using split function.
Consid... | [
{
"code": null,
"e": 1376,
"s": 1062,
"text": "Dealing with big data frames is not an easy task therefore we might want to split that into some smaller data frames. These smaller data frames can be extracted from the big one based on some criteria such as for levels of a factor variable or with some... |
🎲 Picking a Random Sample From a Non-Uniform Distribution | by Marte Løge | Towards Data Science | I bet you have come across the situation where you have to pick a random item for a set of items? This has a quite simple solution as all items have the same probability of being picked.
But what if each item has a different probability for being picked — in other words — the distribution is not uniform. How can this b... | [
{
"code": null,
"e": 358,
"s": 171,
"text": "I bet you have come across the situation where you have to pick a random item for a set of items? This has a quite simple solution as all items have the same probability of being picked."
},
{
"code": null,
"e": 637,
"s": 358,
"text": ... |
How to add image to the menu item in JavaFX? | A menu is a list of options or commands presented to the user. In JavaFX a menu is represented by the javafx.scene.control.Menu class, you can create a menu by instantiating this class.
A menu item is an option in the menu it is represented by the javafx.scene.control.MenuItem class, a superclass of the Menu class. You... | [
{
"code": null,
"e": 1248,
"s": 1062,
"text": "A menu is a list of options or commands presented to the user. In JavaFX a menu is represented by the javafx.scene.control.Menu class, you can create a menu by instantiating this class."
},
{
"code": null,
"e": 1464,
"s": 1248,
"text... |
Distinct permutations of a string containing duplicates using HashSet in Java - GeeksforGeeks | 19 Sep, 2019
Given a string str that may contain duplicate characters, the task is to print all the distinct permutations of the given string such that no permutation is repeated in the output.
Examples:
Input: str = “ABA”Output:ABAAABBAA
Input: str = “ABC”Output:ABCACBBACBCACBACAB
Approach: An approach to generate all... | [
{
"code": null,
"e": 24772,
"s": 24744,
"text": "\n19 Sep, 2019"
},
{
"code": null,
"e": 24953,
"s": 24772,
"text": "Given a string str that may contain duplicate characters, the task is to print all the distinct permutations of the given string such that no permutation is repeat... |
How to give a limit to the input field in HTML? | The HTML <input> tag is used to get user input in HTML. To give a limit to the input field, use the min and max attributes, which is to specify a maximum and minimum value for an input field respectively.
The max and min attributes are used with number, range, date, datetime, datetime-local, month, time and week input ... | [
{
"code": null,
"e": 1267,
"s": 1062,
"text": "The HTML <input> tag is used to get user input in HTML. To give a limit to the input field, use the min and max attributes, which is to specify a maximum and minimum value for an input field respectively."
},
{
"code": null,
"e": 1389,
"... |
PHP mysqli_fetch_field() Function | A PHP result object (of the class mysqli_result) represents the MySQL result, returned by the SELECT or, DESCRIBE or, EXPLAIN queries.
The mysqli_fetch_field() function accepts a result object as a parameter and returns the definition information of the next column/field in the form of an object.
mysqli_fetch_field($re... | [
{
"code": null,
"e": 2892,
"s": 2757,
"text": "A PHP result object (of the class mysqli_result) represents the MySQL result, returned by the SELECT or, DESCRIBE or, EXPLAIN queries."
},
{
"code": null,
"e": 3055,
"s": 2892,
"text": "The mysqli_fetch_field() function accepts a res... |
How to disable Home and other system buttons in Android using Kotlin? | This example demonstrates how to disable Home and other system buttons in Android using Kotlin.
Step 1 − Create a new project in Android Studio, go to File? New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="u... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "This example demonstrates how to disable Home and other system buttons in Android using Kotlin."
},
{
"code": null,
"e": 1286,
"s": 1158,
"text": "Step 1 − Create a new project in Android Studio, go to File? New Project and fill all ... |
Form a palindrome | Practice | GeeksforGeeks | Given a string, find the minimum number of characters to be inserted to convert it to palindrome.
For Example:
ab: Number of insertions required is 1. bab or aba
aa: Number of insertions required is 0. aa
abcd: Number of insertions required is 3. dcbabcd
Example 1:
Input: str = "abcd"
Output: 3
Explanation: Inserted c... | [
{
"code": null,
"e": 493,
"s": 238,
"text": "Given a string, find the minimum number of characters to be inserted to convert it to palindrome.\nFor Example:\nab: Number of insertions required is 1. bab or aba\naa: Number of insertions required is 0. aa\nabcd: Number of insertions required is 3. dcba... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.