title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to set delay in android? | In some cases, after some time we need to update on UI to solve this problem, In this example demonstrate how to set a delay 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_... | [
{
"code": null,
"e": 1199,
"s": 1062,
"text": "In some cases, after some time we need to update on UI to solve this problem, In this example demonstrate how to set a delay in android."
},
{
"code": null,
"e": 1328,
"s": 1199,
"text": "Step 1 − Create a new project in Android Stud... |
Python break statement | 13 Jun, 2022
Using loops in Python automates and repeats the tasks in an efficient manner. But sometimes, there may arise a condition where you want to exit the loop completely, skip an iteration or ignore some statements of the loop before continuing further in the loop. These can be done by loop control statements ca... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 613,
"s": 54,
"text": "Using loops in Python automates and repeats the tasks in an efficient manner. But sometimes, there may arise a condition where you want to exit the loop completely, skip an i... |
Dart – Fat Arrow Notation | 07 Sep, 2021
In Dart, we have fat arrow notation ( => ). A fat arrow is used to define a single expression in a function. This is a cleaner way to write functions with a single statement.
Declaring Fat arrow expression in dart –
Syntax :
ReturnType FunctionName(Parameters...) => Expression;
In the above syntax:
Return... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Sep, 2021"
},
{
"code": null,
"e": 204,
"s": 28,
"text": "In Dart, we have fat arrow notation ( => ). A fat arrow is used to define a single expression in a function. This is a cleaner way to write functions with a single statement.... |
Python program to check if given string is pangram | 05 Feb, 2019
Given a string, write a Python program to check if that string is Pangram or not. A pangram is a sentence containing every letter in the English Alphabet.
Examples:
Input : The quick brown fox jumps over the lazy dog
Output : Yes
Input : abcdefgxyz
Output : No
We have already discussed the naive approa... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Feb, 2019"
},
{
"code": null,
"e": 209,
"s": 54,
"text": "Given a string, write a Python program to check if that string is Pangram or not. A pangram is a sentence containing every letter in the English Alphabet."
},
{
"code... |
How to use Particle.js in JavaScript project ? | 18 Aug, 2020
Particles.js is a lightweight JavaScript library used for creating particles which looks likes the vertices of polygon. We can also interact by hovering over the particles and create more particles by clicking on particles.
Here is the example of particle.js
We can use this library in our portfolios which ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Aug, 2020"
},
{
"code": null,
"e": 252,
"s": 28,
"text": "Particles.js is a lightweight JavaScript library used for creating particles which looks likes the vertices of polygon. We can also interact by hovering over the particles and... |
Python | Ways to split a string in different ways | 22 Jun, 2022
The most common problem we have encountered in Python is splitting a string by a delimiter, But in some cases we have to split in different ways to get the answer. In this article, we will get substrings obtained by splitting string in different ways. Examples:
Input : Paras_Jain_Moengage_best Output : [‘P... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 316,
"s": 54,
"text": "The most common problem we have encountered in Python is splitting a string by a delimiter, But in some cases we have to split in different ways to get the answer. In this ar... |
Hamiltonian Cycle | Backtracking-6 | 06 Jan, 2022
Hamiltonian Path in an undirected graph is a path that visits each vertex exactly once. A Hamiltonian cycle (or Hamiltonian circuit) is a Hamiltonian Path such that there is an edge (in the graph) from the last vertex to the first vertex of the Hamiltonian Path. Determine whether a given graph contains Ham... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jan, 2022"
},
{
"code": null,
"e": 1000,
"s": 52,
"text": "Hamiltonian Path in an undirected graph is a path that visits each vertex exactly once. A Hamiltonian cycle (or Hamiltonian circuit) is a Hamiltonian Path such that there is... |
Count number of trailing zeros in Binary representation of a number using Bitset | 09 Jun, 2022
Given a number. The task is to count the number of Trailing Zero in Binary representation of a number using bitset.Examples:
Input : N = 16
Output : 4
Binary representation of N is 10000. Therefore,
number of zeroes at the end is 4.
Input : N = 8
Output : 3
Approach: We simply set the number in the bi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Jun, 2022"
},
{
"code": null,
"e": 155,
"s": 28,
"text": "Given a number. The task is to count the number of Trailing Zero in Binary representation of a number using bitset.Examples: "
},
{
"code": null,
"e": 289,
"s... |
How to globally replace a forward slash in a JavaScript string ? | 16 Oct, 2019
Method 1: Using replace() method with a regular expression: The replace() method is used to replace the given pattern with another string. The pattern string can be a string or a regular expression. This function will return a new string with the replaced string.
A regular expression is used to replace all... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Oct, 2019"
},
{
"code": null,
"e": 292,
"s": 28,
"text": "Method 1: Using replace() method with a regular expression: The replace() method is used to replace the given pattern with another string. The pattern string can be a string o... |
How to generate a random color for a Matplotlib plot in Python? | 11 Dec, 2020
Handling huge dataset requires libraries and methods that can be used to store, analyze and manipulate the datasets. Python is a popular choice when it comes to data science and analytics. Data scientists prefer Python due to its wide library support that contains functions which can be used to work with d... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Dec, 2020"
},
{
"code": null,
"e": 842,
"s": 28,
"text": "Handling huge dataset requires libraries and methods that can be used to store, analyze and manipulate the datasets. Python is a popular choice when it comes to data science a... |
Matplotlib.pyplot.draw() in Python | 21 Apr, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface.
The draw() function in pyplot module of matplotlib library is used to redraw the current figure.
Syntax: matplot... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 247,
"s": 52,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MA... |
Java.util.Arrays.deepEquals() in Java | 07 Aug, 2017
Arrays.deepEquals() is used to check whether two arrays of single dimensional or multi-dimensional arrays are equal or not. It can compare two nested arrays (i.e. multidimensional array), irrespective of its dimension.
Two array references are considered deeply equal if both are null, or if they refer to a... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n07 Aug, 2017"
},
{
"code": null,
"e": 272,
"s": 53,
"text": "Arrays.deepEquals() is used to check whether two arrays of single dimensional or multi-dimensional arrays are equal or not. It can compare two nested arrays (i.e. multidimens... |
HTML | <input> align Attribute | 18 Feb, 2022
The HTML <input> align attribute is used with <input type=”image”> to set the horizontal alignment of image. It is not supported by HTML 5.
Syntax:
<input align="left|right|middle|top|bottom">
Attribute Values:
left: It sets the alignment of image to the left. it is a default value.
right: It sets the alig... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 Feb, 2022"
},
{
"code": null,
"e": 194,
"s": 54,
"text": "The HTML <input> align attribute is used with <input type=”image”> to set the horizontal alignment of image. It is not supported by HTML 5."
},
{
"code": null,
"e... |
Plot a Horizontal line in Matplotlib | 12 Nov, 2020
Matplotlib is a popular python library used for plotting, It provides an object-oriented API to render GUI plots
Plotting a horizontal line is fairly simple, Using axhline()
The axhline() function in pyplot module of matplotlib library is used to add a horizontal line across the axis.
Syntax: matplotlib.py... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Nov, 2020"
},
{
"code": null,
"e": 141,
"s": 28,
"text": "Matplotlib is a popular python library used for plotting, It provides an object-oriented API to render GUI plots"
},
{
"code": null,
"e": 202,
"s": 141,
"t... |
std::gcd | C++ inbuilt function for finding GCD | 24 Jun, 2022
In many competitive programming problems, we need to find greatest common divisor also known as gcd. Euclids algorithm to find gcd has been discussed here.C++ has the built-in function for calculating GCD. This function is present in header file. Syntax for C++14 :
Library: 'algorithm'
__gcd(m, n)
Param... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n24 Jun, 2022"
},
{
"code": null,
"e": 319,
"s": 53,
"text": "In many competitive programming problems, we need to find greatest common divisor also known as gcd. Euclids algorithm to find gcd has been discussed here.C++ has the built-i... |
Puppet - Overview | Puppet is a configuration management tool developed by Puppet Labs in order to automate infrastructure management and configuration. Puppet is a very powerful tool which helps in the concept of Infrastructure as code. This tool is written in Ruby DSL language that helps in converting a complete infrastructure in code f... | [
{
"code": null,
"e": 2544,
"s": 2173,
"text": "Puppet is a configuration management tool developed by Puppet Labs in order to automate infrastructure management and configuration. Puppet is a very powerful tool which helps in the concept of Infrastructure as code. This tool is written in Ruby DSL la... |
How to define preformatted text using HTML ? - GeeksforGeeks | 24 Jun, 2020
In this article, we define a preformatted text in HTML by using the <pre> tag in the document. It is used to define the block of preformatted text that preserves the text spaces, line breaks, tabs, and other formatting characters which are ignored by web browsers. Text in the pre tag is displayed in a fixe... | [
{
"code": null,
"e": 25428,
"s": 25400,
"text": "\n24 Jun, 2020"
},
{
"code": null,
"e": 25830,
"s": 25428,
"text": "In this article, we define a preformatted text in HTML by using the <pre> tag in the document. It is used to define the block of preformatted text that preserves t... |
Python set operation. | In mathematics, a set is a collection of distinct objects, considered as an object in its own right. For example, the numbers 2, 4, and 6 are distinct objects when considered separately, but when they are considered collectively they form a single set of size three, written {2,4,6}.
In python, compared to list, the mai... | [
{
"code": null,
"e": 1346,
"s": 1062,
"text": "In mathematics, a set is a collection of distinct objects, considered as an object in its own right. For example, the numbers 2, 4, and 6 are distinct objects when considered separately, but when they are considered collectively they form a single set o... |
Count number of Distinct Substring in a String in C++ | According to the problem we are given a string str, we must count all the substrings in the given string. Substring is a string which is a part of an already existing string whose size may be smaller than or equal to the existing string.
Let's understand the problem and its solution with the help of examples.
Input − s... | [
{
"code": null,
"e": 1300,
"s": 1062,
"text": "According to the problem we are given a string str, we must count all the substrings in the given string. Substring is a string which is a part of an already existing string whose size may be smaller than or equal to the existing string."
},
{
"... |
Cheat sheet for Python dataframe ↔ R dataframe syntax conversions | by Shiu-Tang Li | Towards Data Science | In this guide, for Python, all the following commands are based on the ‘pandas’ package. For R, the ‘dplyr’ and ‘tidyr’ package are required for certain commands.
Comments / suggestions are welcome.
# Python ⇔ R: object typestype(a) ⇔ class(a) # "class" is better than "typeof"# Python ⇔ R: variable assignmenta=5 ... | [
{
"code": null,
"e": 334,
"s": 171,
"text": "In this guide, for Python, all the following commands are based on the ‘pandas’ package. For R, the ‘dplyr’ and ‘tidyr’ package are required for certain commands."
},
{
"code": null,
"e": 370,
"s": 334,
"text": "Comments / suggestions ... |
DAX Logical - AND function | Checks the two arguments if they are TRUE or FALSE, and returns TRUE only when both are TRUE. Otherwise, returns FALSE.
AND (<logical1>, <logical2>)
TRUE, if both the arguments are TRUE.
FALSE, otherwise.
AND function takes only two arguments. If you have more than two arguments, either nest the AND functions or use ... | [
{
"code": null,
"e": 2121,
"s": 2001,
"text": "Checks the two arguments if they are TRUE or FALSE, and returns TRUE only when both are TRUE. Otherwise, returns FALSE."
},
{
"code": null,
"e": 2152,
"s": 2121,
"text": "AND (<logical1>, <logical2>) \n"
},
{
"code": null,
... |
Bottom Navigation Bar in Android Jetpack Compose - GeeksforGeeks | 08 Sep, 2021
We all have seen BottomNavigationBar in so many apps, such as Instagram, Quora. In this article, we will learn how to add bottom navigation in Jetpack Compose. Below is a sample of how it will look.
Why do we need a Bottom Navigation Bar?
It allows the user to switch to different activities/fragments easi... | [
{
"code": null,
"e": 25116,
"s": 25088,
"text": "\n08 Sep, 2021"
},
{
"code": null,
"e": 25316,
"s": 25116,
"text": "We all have seen BottomNavigationBar in so many apps, such as Instagram, Quora. In this article, we will learn how to add bottom navigation in Jetpack Compose. Bel... |
Passing a vector to constructor in C++ - GeeksforGeeks | 31 Jan, 2022
When class member is a vector object (not a reference).We can simply assign in constructor.
CPP
// Passing vector object to a constructor.#include <iostream>#include <vector>using namespace std; class MyClass { vector<int> vec; public: MyClass(vector<int> v) { vec = v; } void print()... | [
{
"code": null,
"e": 23731,
"s": 23703,
"text": "\n31 Jan, 2022"
},
{
"code": null,
"e": 23825,
"s": 23731,
"text": "When class member is a vector object (not a reference).We can simply assign in constructor. "
},
{
"code": null,
"e": 23829,
"s": 23825,
"text... |
Groovy - compareTo() | The compareTo method is to use compare one number against another. This is useful if you want to compare the value of numbers.
public int compareTo( NumberSubClass referenceName )
referenceName - This could be a Byte, Double, Integer, Float, Long or Short.
If the Integer is equal to the argument then 0 is returned.
I... | [
{
"code": null,
"e": 2365,
"s": 2238,
"text": "The compareTo method is to use compare one number against another. This is useful if you want to compare the value of numbers."
},
{
"code": null,
"e": 2420,
"s": 2365,
"text": "public int compareTo( NumberSubClass referenceName ) \n... |
Android - Localization | An android application can run on many devices in many different regions. In order to make your application more interactive, your application should handle text,numbers,files e.t.c in ways appropriate to the locales where your application will be used.
The way of changing string into different languages is called as l... | [
{
"code": null,
"e": 3861,
"s": 3607,
"text": "An android application can run on many devices in many different regions. In order to make your application more interactive, your application should handle text,numbers,files e.t.c in ways appropriate to the locales where your application will be used.... |
Visualizing the Nothing. How to visualize the incompleteness of... | by Thiago Carvalho | Towards Data Science | It’s hard to know what to do with null values in our data. Most times, it’s easier to drop them and follow with what’s left.
But they can eventually have meaning and can be investigated. Taking some time to have a good look at them can often bring a better understanding of how the data was collected and even reveal som... | [
{
"code": null,
"e": 296,
"s": 171,
"text": "It’s hard to know what to do with null values in our data. Most times, it’s easier to drop them and follow with what’s left."
},
{
"code": null,
"e": 509,
"s": 296,
"text": "But they can eventually have meaning and can be investigated.... |
C# | Reverse the order of the elements in the entire List or in the specified range - GeeksforGeeks | 10 Oct, 2018
List<T>.Reverse Method is used to reverse the order of the elements in the List<T> or a portion of it. There are two methods in the overload list of List<T>.Reverse Method as follows:
Reverse()
Reverse(Int32, Int32)
This method is used to reverse the order of the elements in the entire List<T>.
Syntax:
pub... | [
{
"code": null,
"e": 25204,
"s": 25176,
"text": "\n10 Oct, 2018"
},
{
"code": null,
"e": 25388,
"s": 25204,
"text": "List<T>.Reverse Method is used to reverse the order of the elements in the List<T> or a portion of it. There are two methods in the overload list of List<T>.Revers... |
What is the difference between findElement and findElements in Selenium Webdriver? | There are differences between findElement and findElements in the Selenium webdriver. Both of them can be used to locate elements on a webpage. The findElement points to a single element, while the findElements method
returns a list of matching elements.
The return type of findElements is a list but the return type of ... | [
{
"code": null,
"e": 1317,
"s": 1062,
"text": "There are differences between findElement and findElements in the Selenium webdriver. Both of them can be used to locate elements on a webpage. The findElement points to a single element, while the findElements method\nreturns a list of matching element... |
C# - Structures | In C#, a structure is a value type data type. It helps you to make a single variable hold related data of various data types. The struct keyword is used for creating a structure.
Structures are used to represent a record. Suppose you want to keep track of your books in a library. You might want to track the following a... | [
{
"code": null,
"e": 2449,
"s": 2270,
"text": "In C#, a structure is a value type data type. It helps you to make a single variable hold related data of various data types. The struct keyword is used for creating a structure."
},
{
"code": null,
"e": 2618,
"s": 2449,
"text": "Str... |
Java Program to reverse a given String with preserving the position of space. | You can reverse the contents of a given String using leaving the spaces using the reverse() method of the StringBuffer class.
public class Test {
public static void main(String args[]) {
String str = "hi welcome to Tutorialspoint";
String strArray[] = str.split(" ");
StringBuffer sb= new StringBuff... | [
{
"code": null,
"e": 1188,
"s": 1062,
"text": "You can reverse the contents of a given String using leaving the spaces using the reverse() method of the StringBuffer class."
},
{
"code": null,
"e": 1572,
"s": 1188,
"text": "public class Test {\n public static void main(String a... |
Customized Debugging in Sublime Text using C++ for Competitive Programming - GeeksforGeeks | 13 Jan, 2022
Competitive Programming is a mental sport that enables us to code a given problem under provided constraints. The purpose of this article is to guide every individual on how they can debug their code efficiently during a contest.
Prerequisite: Setting up Sublime Text for C++ Competitive Programming Environ... | [
{
"code": null,
"e": 25479,
"s": 25451,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 25709,
"s": 25479,
"text": "Competitive Programming is a mental sport that enables us to code a given problem under provided constraints. The purpose of this article is to guide every individ... |
Grunt - Getting Started | To make use of Grunt, you need to have Node.js installed. The installation of Node.js has been explained in the previous chapter. You can install Grunt and Grunt plugins by using Node.js package manager.
Before setting up Grunt on system, you can update the Node package manager by using the following command −
npm upda... | [
{
"code": null,
"e": 1919,
"s": 1715,
"text": "To make use of Grunt, you need to have Node.js installed. The installation of Node.js has been explained in the previous chapter. You can install Grunt and Grunt plugins by using Node.js package manager."
},
{
"code": null,
"e": 2027,
"s... |
Redis - Scripting | Redis scripting is used to evaluate scripts using the Lua interpreter. It is built into Redis starting from version 2.6.0. The command used for scripting is EVAL command.
Following is the basic syntax of EVAL command.
redis 127.0.0.1:6379> EVAL script numkeys key [key ...] arg [arg ...]
Following example explains how ... | [
{
"code": null,
"e": 2216,
"s": 2045,
"text": "Redis scripting is used to evaluate scripts using the Lua interpreter. It is built into Redis starting from version 2.6.0. The command used for scripting is EVAL command."
},
{
"code": null,
"e": 2263,
"s": 2216,
"text": "Following i... |
Python Dictionary update() method - GeeksforGeeks | 04 Oct, 2021
Python Dictionary update() method updates the dictionary with the elements from another dictionary object or from an iterable of key/value pairs.
Syntax: dict.update([other])
Parameters: This method takes either a dictionary or an iterable object of key/value pairs (generally tuples) as parameters.
Returns... | [
{
"code": null,
"e": 22677,
"s": 22649,
"text": "\n04 Oct, 2021"
},
{
"code": null,
"e": 22823,
"s": 22677,
"text": "Python Dictionary update() method updates the dictionary with the elements from another dictionary object or from an iterable of key/value pairs."
},
{
"co... |
List Methods in Python? | Python provides some very useful list methods that we can use to perform list operation very easily.
Below are the list of python built-in methods which we can use on list:
Adds an element at the end of the list
#Append
lst = ['Hello', 'Python']
print(lst)
lst.append('Tutorialspoint')
print(lst)
['Hello', 'Python']
['H... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "Python provides some very useful list methods that we can use to perform list operation very easily."
},
{
"code": null,
"e": 1235,
"s": 1163,
"text": "Below are the list of python built-in methods which we can use on list:"
},
{... |
How to Get Saved Contacts in Android Application using Cursor? | 14 Feb, 2021
Phone Contacts are very important source of data for everyone and hence accessing phone contacts is the main feature for many applications like Truecaller to help their users and provide them a better experience. We all have a default application in our mobile to manage contacts but what happens if we will... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Feb, 2021"
},
{
"code": null,
"e": 613,
"s": 54,
"text": "Phone Contacts are very important source of data for everyone and hence accessing phone contacts is the main feature for many applications like Truecaller to help their users... |
Global and Local Variables in Python | 22 Jun, 2022
Global variables are those which are not defined inside any function and have a global scope whereas local variables are those which are defined inside a function and its scope is limited to that function only. In other words, we can say that local variables are accessible only inside the function in which... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 679,
"s": 52,
"text": "Global variables are those which are not defined inside any function and have a global scope whereas local variables are those which are defined inside a function and its sco... |
Protected Keyword in Java with Examples | 01 May, 2022
Access modifiers in Java help to restrict the scope of a class, constructor, variable, method, or data member. There are four types of access modifiers available in java. The access of various modifiers can be seen in the following table below as follows:
The protected keyword in Java refers to one of its... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 May, 2022"
},
{
"code": null,
"e": 309,
"s": 52,
"text": "Access modifiers in Java help to restrict the scope of a class, constructor, variable, method, or data member. There are four types of access modifiers available in java. The... |
SQLite - DETACH Database | SQLite DETACH DATABASE statement is used to detach and dissociate a named database from a database connection which was previously attached using ATTACH statement. If the same database file has been attached with multiple aliases, then DETACH command will disconnect only the given name and rest of the attachment will s... | [
{
"code": null,
"e": 3153,
"s": 2772,
"text": "SQLite DETACH DATABASE statement is used to detach and dissociate a named database from a database connection which was previously attached using ATTACH statement. If the same database file has been attached with multiple aliases, then DETACH command wi... |
Multilevel Cache Organisation | 02 Aug, 2021
Cache is a random access memory used by the CPU to reduce the average time taken to access memory. Multilevel Caches is one of the techniques to improve Cache Performance by reducing the “MISS PENALTY”. Miss Penalty refers to the extra time required to bring the data into cache from the Main memory wheneve... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n02 Aug, 2021"
},
{
"code": null,
"e": 600,
"s": 54,
"text": "Cache is a random access memory used by the CPU to reduce the average time taken to access memory. Multilevel Caches is one of the techniques to improve Cache Performance by ... |
How to get client_id and client_secret for Python Reddit API registration ? | 26 May, 2020
Reddit is a network of communities based on people’s interests. Each of these communities is called a subreddit. Users can subscribe to multiple subreddits to post, comment and interact with them.A Reddit bot is something that automatically responds to a user’s post or automatically posts things at certain... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 May, 2020"
},
{
"code": null,
"e": 773,
"s": 28,
"text": "Reddit is a network of communities based on people’s interests. Each of these communities is called a subreddit. Users can subscribe to multiple subreddits to post, comment an... |
Python Property Decorator – @property | 27 May, 2022
A decorator feature in Python wraps in a function, appends several functionalities to existing code and then returns it. Methods and functions are known to be callable as they can be called. Therefore, a decorator is also a callable that returns callable. This is also known as metaprogramming as at compile... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 May, 2022"
},
{
"code": null,
"e": 483,
"s": 52,
"text": "A decorator feature in Python wraps in a function, appends several functionalities to existing code and then returns it. Methods and functions are known to be callable as the... |
PHP | Basics of File Handling | 08 Nov, 2017
File handling is needed for any application. For some tasks to be done file needs to be processed. File handling in PHP is similar as file handling is done by using any programming language like C. PHP has many functions to work with normal files. Those functions are:
1) fopen() – PHP fopen() function is u... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n08 Nov, 2017"
},
{
"code": null,
"e": 322,
"s": 53,
"text": "File handling is needed for any application. For some tasks to be done file needs to be processed. File handling in PHP is similar as file handling is done by using any progr... |
LEX Code that accepts the string ending with ‘abb’ over input alphabet {a,b} | 23 Jul, 2021
In this article, we will discuss the LEX Code that accepts the string ending with ‘abb’ over input alphabet {a,b} and will see the implementation using LEX code and will understand the approach. Let’s discuss it one by one.
Problem Overview :LEX Code that accepts the string ending with ‘abb’ over input a... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jul, 2021"
},
{
"code": null,
"e": 278,
"s": 52,
"text": "In this article, we will discuss the LEX Code that accepts the string ending with ‘abb’ over input alphabet {a,b} and will see the implementation using LEX code and will und... |
Python OOPs Concepts | 14 Jun, 2022
In Python, object-oriented Programming (OOPs) is a programming paradigm that uses objects and classes in programming. It aims to implement real-world entities like inheritance, polymorphisms, encapsulation, etc. in the programming. The main concept of OOPs is to bind the data and the functions that work on... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 447,
"s": 52,
"text": "In Python, object-oriented Programming (OOPs) is a programming paradigm that uses objects and classes in programming. It aims to implement real-world entities like inheritanc... |
Servlets - Exception Handling | When a servlet throws an exception, the web container searches the configurations in web.xml that use the exception-type element for a match with the thrown exception type.
You would have to use the error-page element in web.xml to specify the invocation of servlets in response to certain exceptions or HTTP status code... | [
{
"code": null,
"e": 2492,
"s": 2319,
"text": "When a servlet throws an exception, the web container searches the configurations in web.xml that use the exception-type element for a match with the thrown exception type."
},
{
"code": null,
"e": 2642,
"s": 2492,
"text": "You would... |
How to work Date query with ISODate in MongoDB? | Use $gte operator along with ISODate() to work Date query with ISODate in MongoDB.
To understand the concept, let us create a collection with the document. The query to create a collection with a document is as follows −
> db.dateDemo.insertOne({"StudentName":"John","StudentAge":26,"AdmissionDate":new ISODate("2013-06-... | [
{
"code": null,
"e": 1270,
"s": 1187,
"text": "Use $gte operator along with ISODate() to work Date query with ISODate in MongoDB."
},
{
"code": null,
"e": 1408,
"s": 1270,
"text": "To understand the concept, let us create a collection with the document. The query to create a coll... |
Showing data values on stacked bar chart in ggplot2 in R | 29 Jun, 2021
In this article, you’ll learn how to show data values on a stacked bar chart in ggplot2 in R Programming Language.
To show the data into the Stacked bar chart you have to use another parameter called geom_text().
Syntax:
geom_text(size, position = position_stack(vjust = value), colour)
Here the size repr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jun, 2021"
},
{
"code": null,
"e": 144,
"s": 28,
"text": "In this article, you’ll learn how to show data values on a stacked bar chart in ggplot2 in R Programming Language. "
},
{
"code": null,
"e": 242,
"s": 144,
... |
Print path from a node to root of given Complete Binary Tree | 11 Jun, 2021
Given an integer N, the task is to find the path from the Nth node to the root of a Binary Tree of the following form:
The Binary Tree is a Complete Binary Tree up to the level of the Nth node.
The nodes are numbered 1 to N, starting from the root as 1.
The structure of the Tree is as follows:
... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 173,
"s": 54,
"text": "Given an integer N, the task is to find the path from the Nth node to the root of a Binary Tree of the following form:"
},
{
"code": null,
"e": 248,
"s": 173,... |
Delete rows and columns of NumPy ndarray | 21 Apr, 2021
In this article, we will discuss how to delete the specified rows and columns in an n-dimensional array. We are going to delete the rows and columns using numpy.delete() method.
Syntax: numpy.delete(array_name, obj, axis=None)
Let’s discuss with the help of some examples:
Example 1:
Program to create a 2-d... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Apr, 2021"
},
{
"code": null,
"e": 206,
"s": 28,
"text": "In this article, we will discuss how to delete the specified rows and columns in an n-dimensional array. We are going to delete the rows and columns using numpy.delete() metho... |
Inorder Successor of a node in Binary Tree | 21 Jun, 2022
Given a binary tree and a node, we need to write a program to find inorder successor of this node.Inorder Successor of a node in binary tree is the next node in Inorder traversal of the Binary Tree. Inorder Successor is NULL for the last node in Inorder traversal.
In the above diagram, inorder successor of... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 317,
"s": 52,
"text": "Given a binary tree and a node, we need to write a program to find inorder successor of this node.Inorder Successor of a node in binary tree is the next node in Inorder trave... |
Single Side Band (SSB) Modulation and Demodulation using MATLAB | 06 Jun, 2022
Single sideband (SSB) modulation might be a sort of modulation used to send data, which includes an audio signal. Amplitude modulation produces an output signal in which the bandwidth is two times the most frequency of the original baseband signal. SSB modulation neglects this bandwidth increase, and also ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jun, 2022"
},
{
"code": null,
"e": 446,
"s": 28,
"text": "Single sideband (SSB) modulation might be a sort of modulation used to send data, which includes an audio signal. Amplitude modulation produces an output signal in which the b... |
Convert CSV to JSON using Python | 21 Jan, 2021
CSV (or Comma Separated Value) files represent data in a tabular format, with several rows and columns. An example of a CSV file can be an Excel Spreadsheet. These files have the extension of .csv, for instance, geeksforgeeks.csv. In this sample file, every row will represent a record of the dataset, and e... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Jan, 2021"
},
{
"code": null,
"e": 413,
"s": 54,
"text": "CSV (or Comma Separated Value) files represent data in a tabular format, with several rows and columns. An example of a CSV file can be an Excel Spreadsheet. These files have... |
Display MongoDB explain query plan? | For information on query plan, use explain() in MongoDB. Let us create a collection with documents −
> db.demo202.insertOne({"StudentFirstName":"Chris","StudentAge":21});
{
"acknowledged" : true,
"insertedId" : ObjectId("5e3c3bd103d395bdc21346e8")
}
> db.demo202.insertOne({"StudentFirstName":"David","StudentAge":... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "For information on query plan, use explain() in MongoDB. Let us create a collection with documents −"
},
{
"code": null,
"e": 1626,
"s": 1163,
"text": "> db.demo202.insertOne({\"StudentFirstName\":\"Chris\",\"StudentAge\":21});\n{\n ... |
GATE | GATE-CS-2014-(Set-3) | Question 65 - GeeksforGeeks | 28 Jun, 2021
Consider a hash table with 100 slots. Collisions are resolved using chaining. Assuming simple uniform hashing, what is the probability that the first 3 slots are unfilled after the first 3 insertions?(A) (97 × 97 × 97)/1003(B) (99 × 98 × 97)/1003(C) (97 × 96 × 95)/1003(D) (97 × 96 × 95)/(3! × 1003)Answer: ... | [
{
"code": null,
"e": 24091,
"s": 24063,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24748,
"s": 24091,
"text": "Consider a hash table with 100 slots. Collisions are resolved using chaining. Assuming simple uniform hashing, what is the probability that the first 3 slots are u... |
Find the Symmetric difference between two arrays - JavaScript | In Mathematics, the symmetric difference of two sets, say A and B is represented by A △ B
And it is defined as the set of all those elements which belongs either to A or to B but not to both.
For example −
const A = [1, 2, 3, 4, 5, 6, 7, 8];
const B = [1, 3, 5, 6, 7, 8, 9];
Then the symmetric difference of A and B will... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "In Mathematics, the symmetric difference of two sets, say A and B is represented by A △ B"
},
{
"code": null,
"e": 1254,
"s": 1152,
"text": "And it is defined as the set of all those elements which belongs either to A or to B but not... |
Find square root of number upto given precision using binary search - GeeksforGeeks | 24 Jun, 2021
Given a positive number n and precision p, find the square root of number upto p decimal places using binary search. Note : Prerequisite : Binary search Examples:
Input : number = 50, precision = 3
Output : 7.071
Input : number = 10, precision = 4
Output : 3.1622
We have discussed how to compute the i... | [
{
"code": null,
"e": 24228,
"s": 24200,
"text": "\n24 Jun, 2021"
},
{
"code": null,
"e": 24393,
"s": 24228,
"text": "Given a positive number n and precision p, find the square root of number upto p decimal places using binary search. Note : Prerequisite : Binary search Examples: ... |
How to Convert HTML Table into Excel Spreadsheet using jQuery ? - GeeksforGeeks | 03 Aug, 2021
Any HTML table that you have created can be converted into an Excel Spreadsheet by using jQuery and it is compatible with all browsers. There are two simple approaches that require basic HTML and jQuery knowledge to achieve this.
Approach 1: Using jQuery plugin: A simple jQuery plugin ‘table2excel’ can be ... | [
{
"code": null,
"e": 25078,
"s": 25050,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 25308,
"s": 25078,
"text": "Any HTML table that you have created can be converted into an Excel Spreadsheet by using jQuery and it is compatible with all browsers. There are two simple approa... |
Decimal to any base conversion | Practice | GeeksforGeeks | Given a decimal number N and the base B to which it should be converted. Convert the given number to the given base.
Example 1:
Input:
B = 2
N = 12
Output:
1100
Explanation:
If the number 12 is converted to a
number with base 2 we get the binary
representation of 12 = 1100.
Example 2:
Input:
B = 16
N = 282
Output... | [
{
"code": null,
"e": 355,
"s": 238,
"text": "Given a decimal number N and the base B to which it should be converted. Convert the given number to the given base."
},
{
"code": null,
"e": 366,
"s": 355,
"text": "Example 1:"
},
{
"code": null,
"e": 518,
"s": 366,
... |
Draw a circle using Arcade in Python3 - GeeksforGeeks | 22 Jul, 2021
The arcade library is a high-tech Python Package with advanced set of tools for making 2D games with gripping graphics and sound. It is Object-oriented and is especially built for Python 3.6 and above versions.
Arcade inbuilt functions to draw circle :-
1. arcade.draw_circle_outline( ) : This function is u... | [
{
"code": null,
"e": 24589,
"s": 24561,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 24800,
"s": 24589,
"text": "The arcade library is a high-tech Python Package with advanced set of tools for making 2D games with gripping graphics and sound. It is Object-oriented and is espe... |
SQLAlchemy Core - Using Textual SQL | SQLAlchemy lets you just use strings, for those cases when the SQL is already known and there isn’t a strong need for the statement to support dynamic features. The text() construct is used to compose a textual statement that is passed to the database mostly unchanged.
It constructs a new TextClause, representing a tex... | [
{
"code": null,
"e": 2610,
"s": 2340,
"text": "SQLAlchemy lets you just use strings, for those cases when the SQL is already known and there isn’t a strong need for the statement to support dynamic features. The text() construct is used to compose a textual statement that is passed to the database m... |
Calculate the area of an image using Matplotlib - GeeksforGeeks | 31 Jul, 2021
Let us see how to calculate the area of an image in Python using Matplotlib.
Algorithm:
Import the matplotlib.pyplot module.Import an image using the imread() method.Use the shape attribute of the image to get the height and width of the image. It fetches the number of channels in the image.Calculate the... | [
{
"code": null,
"e": 30302,
"s": 30274,
"text": "\n31 Jul, 2021"
},
{
"code": null,
"e": 30380,
"s": 30302,
"text": "Let us see how to calculate the area of an image in Python using Matplotlib. "
},
{
"code": null,
"e": 30392,
"s": 30380,
"text": "Algorithm: "... |
Implementing Gauss Seidel Method in Java - GeeksforGeeks | 28 Jul, 2021
Gauss-Seidel (also known as successive displacement method) is a mathematical computational method mainly used to find the solution of a System of Linear Algebra. Ever heard of the Jacobi Method? Well, the Gauss-Seidel is nothing but a better version of the Jacobi.
Example :
Input:
Enter the number of va... | [
{
"code": null,
"e": 25347,
"s": 25319,
"text": "\n28 Jul, 2021"
},
{
"code": null,
"e": 25615,
"s": 25347,
"text": "Gauss-Seidel (also known as successive displacement method) is a mathematical computational method mainly used to find the solution of a System of Linear Algebra. ... |
Character.hashCode() in Java with examples - GeeksforGeeks | 06 Dec, 2018
Java.lang.Character.hashCode() is a built-in method in Java which returns a hash code for this Character. The returned hash code is equal to the result of invoking charValue().
Syntax:
public int hashCode()
This function does not accepts any parameter.
Return Value: This method returns a hash code value ... | [
{
"code": null,
"e": 24312,
"s": 24284,
"text": "\n06 Dec, 2018"
},
{
"code": null,
"e": 24489,
"s": 24312,
"text": "Java.lang.Character.hashCode() is a built-in method in Java which returns a hash code for this Character. The returned hash code is equal to the result of invoking... |
Print Bracket Number - GeeksforGeeks | 21 May, 2021
Given an expression exp of length n consisting of some brackets. The task is to print the bracket numbers when the expression is being parsed.Examples :
Input : (a+(b*c))+(d/e)
Output : 1 2 2 1 3 3
The highlighted brackets in the given expression
(a+(b*c))+(d/e) has been assigned the numbers as:
1 2 2 1 ... | [
{
"code": null,
"e": 25064,
"s": 25036,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 25219,
"s": 25064,
"text": "Given an expression exp of length n consisting of some brackets. The task is to print the bracket numbers when the expression is being parsed.Examples : "
},
... |
MySQL Tryit Editor v1.0 | Edit the SQL Statement, and click "Run SQL" to see the result.
This SQL-Statement is not supported in the WebSQL Database.
The example still works, because it uses a modified version of SQL.
Your browser does not support WebSQL.
Your are now using a light-version of the Try-SQL Editor, with a read-only Database.
If you... | [
{
"code": null,
"e": 105,
"s": 42,
"text": "Edit the SQL Statement, and click \"Run SQL\" to see the result."
},
{
"code": null,
"e": 165,
"s": 105,
"text": "This SQL-Statement is not supported in the WebSQL Database."
},
{
"code": null,
"e": 233,
"s": 165,
"t... |
How to create a folder if it does not exist in C#? | For creating a directory, we must first import the System.IO namespace in C#. The namespace is a library that allows you to access static methods for creating, copying, moving, and deleting directories.
It is always recommended to check if the Directory exist before doing any file operation in C# because the complier w... | [
{
"code": null,
"e": 1265,
"s": 1062,
"text": "For creating a directory, we must first import the System.IO namespace in C#. The namespace is a library that allows you to access static methods for creating, copying, moving, and deleting directories."
},
{
"code": null,
"e": 1432,
"s"... |
Optimize Streamlit Deployment | Towards Data Science | What happens when you deploy a data app without coding for memory optimization? In my case, at least, the app crashed and I spent days painfully refactoring code. If you are luckier or smarter (or both), then you have nothing to worry about. Otherwise, consider lessons from my mistakes and some helpful resources to avo... | [
{
"code": null,
"e": 397,
"s": 46,
"text": "What happens when you deploy a data app without coding for memory optimization? In my case, at least, the app crashed and I spent days painfully refactoring code. If you are luckier or smarter (or both), then you have nothing to worry about. Otherwise, con... |
11 Dplyr Functions to Start Using Right Now in R | by Amanda West | Towards Data Science | As a freshman in college, when my life goal was still to become a hot-shot diplomat or United Nations ambassador, I took an Uber back to my university with a techie guy wearing our school colors that happened to live a few blocks from my dorm. Trying to make small talk the best I could, I asked him about his life and f... | [
{
"code": null,
"e": 574,
"s": 172,
"text": "As a freshman in college, when my life goal was still to become a hot-shot diplomat or United Nations ambassador, I took an Uber back to my university with a techie guy wearing our school colors that happened to live a few blocks from my dorm. Trying to m... |
The ElementTree XML API in Python | The Extensible Markup Language (XML) is a markup language much like HTML. It is a portable and it is useful for handling small to medium amounts of data without using any SQL database.
Python's standard library contains xml package. This package has ElementTree module. This is a simple and lightweight XML processor API... | [
{
"code": null,
"e": 1247,
"s": 1062,
"text": "The Extensible Markup Language (XML) is a markup language much like HTML. It is a portable and it is useful for handling small to medium amounts of data without using any SQL database."
},
{
"code": null,
"e": 1384,
"s": 1247,
"text"... |
Find the element that appears once in sorted array - JavaScript | Suppose, we have a sorted array of literals like this −
const arr = [2, 2, 3, 3, 3, 5, 5, 6, 7, 8, 9];
We are required to write a JavaScript function that takes in one such array and returns the first number that appears only once in the array. If there is no such number in the array, we should return false.
For this a... | [
{
"code": null,
"e": 1118,
"s": 1062,
"text": "Suppose, we have a sorted array of literals like this −"
},
{
"code": null,
"e": 1165,
"s": 1118,
"text": "const arr = [2, 2, 3, 3, 3, 5, 5, 6, 7, 8, 9];"
},
{
"code": null,
"e": 1372,
"s": 1165,
"text": "We are r... |
Kotlin - Extensions | Kotlin extensions provide the ability to extend a class with new functionality without implementing the inheritance concept by a class or using design pattern such as Decorator. These extensions basically add some functionality in an existing class without extending the class.
The Kotlin extension allows to write new f... | [
{
"code": null,
"e": 2703,
"s": 2425,
"text": "Kotlin extensions provide the ability to extend a class with new functionality without implementing the inheritance concept by a class or using design pattern such as Decorator. These extensions basically add some functionality in an existing class with... |
A Complete Exploratory Data Analysis and Visualization for Text Data | by Susan Li | Towards Data Science | Visually representing the content of a text document is one of the most important tasks in the field of text mining. As a data scientist or NLP specialist, not only we explore the content of documents from different aspects and at different levels of details, but also we summarize a single document, show the words and ... | [
{
"code": null,
"e": 538,
"s": 172,
"text": "Visually representing the content of a text document is one of the most important tasks in the field of text mining. As a data scientist or NLP specialist, not only we explore the content of documents from different aspects and at different levels of deta... |
Tryit Editor v3.7 | HTML Web Storage
Tryit: HTML count the clicks | [
{
"code": null,
"e": 27,
"s": 10,
"text": "HTML Web Storage"
}
] |
How to create a scroll pane using JavaFX? | A scroll pane holds a UI element and provides a scrollable view of it. In JavaFX, you can create a scroll pane by instantiating the javafx.scene.control.ScrollPane class. You can set content to the scroll pane using the setContent() method.
To add a scroll pane to a node −
To add a scroll pane to a node −
Instantiate t... | [
{
"code": null,
"e": 1303,
"s": 1062,
"text": "A scroll pane holds a UI element and provides a scrollable view of it. In JavaFX, you can create a scroll pane by instantiating the javafx.scene.control.ScrollPane class. You can set content to the scroll pane using the setContent() method."
},
{
... |
Convert Image to Data URI with JavaScript | To convert image from an Html page tag to a data URI using javascript, you first need to create a canvas element, set its width and height equal to that of the image, draw the image on it and finally call the toDataURL method on it.
This will return the base64 encoded data URI of the image. For example,
if you have an ... | [
{
"code": null,
"e": 1295,
"s": 1062,
"text": "To convert image from an Html page tag to a data URI using javascript, you first need to create a canvas element, set its width and height equal to that of the image, draw the image on it and finally call the toDataURL method on it."
},
{
"code"... |
PHPUnit assertSame() Function - GeeksforGeeks | 07 Aug, 2020
The assertSame() function is a builtin function in PHPUnit and is used to assert whether the actually obtained value is the same as the expected value or not. This assertion will return true in the case if the expected value is the same as the actual value else returns false. In case of true the asserted t... | [
{
"code": null,
"e": 24162,
"s": 24134,
"text": "\n07 Aug, 2020"
},
{
"code": null,
"e": 24516,
"s": 24162,
"text": "The assertSame() function is a builtin function in PHPUnit and is used to assert whether the actually obtained value is the same as the expected value or not. This... |
DC.js - Data Table | Data table is used to display the records in a tabular format. It lists out the crossfilter dataset records as explained in this chapter in detail.
Before moving on to draw a data table, we should understand the dc.dataTable class and its methods. It uses a mixin to get the basic functionality of drawing a data table c... | [
{
"code": null,
"e": 2207,
"s": 2059,
"text": "Data table is used to display the records in a tabular format. It lists out the crossfilter dataset records as explained in this chapter in detail."
},
{
"code": null,
"e": 2410,
"s": 2207,
"text": "Before moving on to draw a data ta... |
Angular Material - Autocomplete | The md-autocomplete, an Angular Directive, is used as a special input control with an inbuilt dropdown to show all possible matches to a custom query. This control acts as a real-time suggestion box as soon as the user types in the input area. <md-autocomplete> can be used to provide search results from local or remote... | [
{
"code": null,
"e": 2707,
"s": 2190,
"text": "The md-autocomplete, an Angular Directive, is used as a special input control with an inbuilt dropdown to show all possible matches to a custom query. This control acts as a real-time suggestion box as soon as the user types in the input area. <md-autoc... |
Convert object to an array in PHP. | In a PHP application, we are working with data in various formats such as string, array, objects or more...In a real-time application, we may need to read a php object result in the form of an associative array to get the desired output.
So we will discuss here how to transform a php object to an associative array in P... | [
{
"code": null,
"e": 1300,
"s": 1062,
"text": "In a PHP application, we are working with data in various formats such as string, array, objects or more...In a real-time application, we may need to read a php object result in the form of an associative array to get the desired output."
},
{
"... |
Machine Learning: Handling the missing values in Data: The Easy Way | by Akash Panchal | Towards Data Science | Most of the Machine Learning Algorithms cannot work with missing values in the features. See the below example of the Melbourne Housing Data.
Here, BuildingArea has 7130 rows with values while most of the features have 13580 rows with values.
Now, A few things you can do to deal with missing values
melbourne_data.dropn... | [
{
"code": null,
"e": 314,
"s": 172,
"text": "Most of the Machine Learning Algorithms cannot work with missing values in the features. See the below example of the Melbourne Housing Data."
},
{
"code": null,
"e": 415,
"s": 314,
"text": "Here, BuildingArea has 7130 rows with values... |
How to create a responsive navigation menu with a login form inside it? | Following is the code to create a responsive navigation menu with a login form inside of it −
Live Demo
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
margin: 0px;
margin-top: 10px;
padding:... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "Following is the code to create a responsive navigation menu with a login form inside of it −"
},
{
"code": null,
"e": 1167,
"s": 1156,
"text": " Live Demo"
},
{
"code": null,
"e": 2703,
"s": 1167,
"text": "<!DOCT... |
How can Keras be used for feature extraction using a sequential model using Python? | Tensorflow is a machine learning framework that is provided by Google. It is an open-source framework used in conjunction with Python to implement algorithms, deep learning applications and much more. It is used in research and for production purposes. It has optimization techniques that help in performing complicated ... | [
{
"code": null,
"e": 1415,
"s": 1062,
"text": "Tensorflow is a machine learning framework that is provided by Google. It is an open-source framework used in conjunction with Python to implement algorithms, deep learning applications and much more. It is used in research and for production purposes. ... |
A Brief Introduction to Proximal Policy Optimization - GeeksforGeeks | 14 Feb, 2022
Proximal Policy Optimisation (PPO) is a recent advancement in the field of Reinforcement Learning, which provides an improvement on Trust Region Policy Optimization (TRPO). This algorithm was proposed in 2017, and showed remarkable performance when it was implemented by OpenAI. To understand and appreciate... | [
{
"code": null,
"e": 24344,
"s": 24316,
"text": "\n14 Feb, 2022"
},
{
"code": null,
"e": 24713,
"s": 24344,
"text": "Proximal Policy Optimisation (PPO) is a recent advancement in the field of Reinforcement Learning, which provides an improvement on Trust Region Policy Optimizatio... |
SQL | INSERT IGNORE Statement - GeeksforGeeks | 21 Mar, 2018
We know that a primary key of a table cannot be duplicated. For instance, the roll number of a student in the student table must always be distinct. Similarly, the EmployeeID is expected to be unique in an employee table. When we try to insert a tuple into a table where the primary key is repeated, it resu... | [
{
"code": null,
"e": 24032,
"s": 24004,
"text": "\n21 Mar, 2018"
},
{
"code": null,
"e": 24576,
"s": 24032,
"text": "We know that a primary key of a table cannot be duplicated. For instance, the roll number of a student in the student table must always be distinct. Similarly, the... |
Create View - Function based Views Django - GeeksforGeeks | 13 Jan, 2020
Create View refers to a view (logic) to create an instance of a table in the database. It is just like taking an input from a user and storing it in a specified table. Django provides extra-ordinary support for Create Views but let’s check how it is done manually through a function-based view. This article... | [
{
"code": null,
"e": 25691,
"s": 25663,
"text": "\n13 Jan, 2020"
},
{
"code": null,
"e": 26203,
"s": 25691,
"text": "Create View refers to a view (logic) to create an instance of a table in the database. It is just like taking an input from a user and storing it in a specified ta... |
whereis command in Linux with Examples - GeeksforGeeks | 08 Apr, 2019
whereis command is used to find the location of source/binary file of a command and manuals sections for a specified file in Linux system. If we compare whereis command with find command they will appear similar to each other as both can be used for the same purposes but whereis command produces the result... | [
{
"code": null,
"e": 24326,
"s": 24298,
"text": "\n08 Apr, 2019"
},
{
"code": null,
"e": 24764,
"s": 24326,
"text": "whereis command is used to find the location of source/binary file of a command and manuals sections for a specified file in Linux system. If we compare whereis co... |
Container for embedded content (16:9 aspect ratio) in Bootstrap | Use the .embed-responsive class in Bootstrap to set a container for embedded content.
For 16:9 aspect ratio for the embedded content, use the embed-responsive-16by9 class
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<link href = "/bootstrap/css/bootstrap.min.css" rel = "styles... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "Use the .embed-responsive class in Bootstrap to set a container for embedded content."
},
{
"code": null,
"e": 1233,
"s": 1148,
"text": "For 16:9 aspect ratio for the embedded content, use the embed-responsive-16by9 class"
},
{
... |
Node.js – util.inspect() method | The util.inspect() method returns the string representation of the objects that are intended for the debugging process.
util.inspect(object, [showHidden], [depth], [colors])
The parameters are defined as below:
object − A JavaScript primitive type or an object is given as input.
optionsshowHidden − This is set as false... | [
{
"code": null,
"e": 1182,
"s": 1062,
"text": "The util.inspect() method returns the string representation of the objects that are intended for the debugging process."
},
{
"code": null,
"e": 1236,
"s": 1182,
"text": "util.inspect(object, [showHidden], [depth], [colors])"
},
... |
Search a string in Matrix Using Split function in Java - GeeksforGeeks | 21 Nov, 2018
Given a string str and a matrix mat[][] of lowercase English alphabets, the task is to find whether the string str appears in the matrix (either row-wise or column-wise).
Examples:
Input: str = "GFG"
mat[][] = {{'G', 'E', 'E', 'K', 'S'},
{'F', 'O', 'R', 'A', 'N'}, ... | [
{
"code": null,
"e": 24429,
"s": 24401,
"text": "\n21 Nov, 2018"
},
{
"code": null,
"e": 24600,
"s": 24429,
"text": "Given a string str and a matrix mat[][] of lowercase English alphabets, the task is to find whether the string str appears in the matrix (either row-wise or column... |
Explain Net operating income theory of capital structure. | Capital structure of a company depends on mix or ratio of debt and equity in their mode of their
financing. Depending on what company prefer, some may have more debt or more equity in financing
their asset, but final goal is to maximize their market value and their profits.
Net operating income (NOI) was developed by D... | [
{
"code": null,
"e": 1337,
"s": 1062,
"text": "Capital structure of a company depends on mix or ratio of debt and equity in their mode of their\nfinancing. Depending on what company prefer, some may have more debt or more equity in financing\ntheir asset, but final goal is to maximize their market v... |
String Property codeUnits | Returns a list of the UTF-16 code units of a given string.
String.codeUnits
void main() {
String str = "Hello";
print(str.codeUnits);
}
It will produce the following output −.
[72, 101, 108, 108, 111]
44 Lectures
4.5 hours
Sriyank Siddhartha
34 Lectures
4 hours
Sriyank Siddharth... | [
{
"code": null,
"e": 2584,
"s": 2525,
"text": "Returns a list of the UTF-16 code units of a given string."
},
{
"code": null,
"e": 2602,
"s": 2584,
"text": "String.codeUnits\n"
},
{
"code": null,
"e": 2672,
"s": 2602,
"text": "void main() { \n String str = \... |
Flattening JSON records using PySpark | by Shreyas M S | Towards Data Science | JavaScript Object Notation (JSON) is a text-based, flexible, lightweight data-interchange format for semi-structured data. It is heavily used in transferring data between servers, web applications, and web-connected devices.
More often than not, events that are generated by a service or a product are in JSON format. Th... | [
{
"code": null,
"e": 396,
"s": 171,
"text": "JavaScript Object Notation (JSON) is a text-based, flexible, lightweight data-interchange format for semi-structured data. It is heavily used in transferring data between servers, web applications, and web-connected devices."
},
{
"code": null,
... |
\leqslant - Tex Command | \leqslant - Used to draw less than or equal to symbol.
{ \leqslant }
\leqslant command is used to draw less than or equal to symbol.
\leqslant
⩽
\leqslant
⩽
\leqslant
14 Lectures
52 mins
Ashraf Said
11 Lectures
1 hours
Ashraf Said
9 Lectures
1 hours
Emenwa Global, Ejike ... | [
{
"code": null,
"e": 8041,
"s": 7986,
"text": "\\leqslant - Used to draw less than or equal to symbol."
},
{
"code": null,
"e": 8055,
"s": 8041,
"text": "{ \\leqslant }"
},
{
"code": null,
"e": 8119,
"s": 8055,
"text": "\\leqslant command is used to draw less ... |
Non Repeating Numbers | Practice | GeeksforGeeks | Given an array A containing 2*N+2 positive numbers, out of which 2*N numbers exist in pairs whereas the other two number occur exactly once and are distinct. Find the other two numbers.
Example 1:
Input:
N = 2
arr[] = {1, 2, 3, 2, 1, 4}
Output:
3 4
Explanation:
3 and 4 occur exactly once.
Example 2:
Input:
N = 1
ar... | [
{
"code": null,
"e": 424,
"s": 238,
"text": "Given an array A containing 2*N+2 positive numbers, out of which 2*N numbers exist in pairs whereas the other two number occur exactly once and are distinct. Find the other two numbers."
},
{
"code": null,
"e": 436,
"s": 424,
"text": "... |
How to create a temporary MySQL table in a SELECT statement without a separate CREATE TABLE? | To create a temporary table in a SELECT statement we use TEMPORARY keyword.
This temporary table will be visible for the current session and whenever a session is closed, it is automatically destroyed. Two sessions can use the same temporary table.
Creating a table.
mysql> create table MyTableDemo
-> (
-> id int,... | [
{
"code": null,
"e": 1138,
"s": 1062,
"text": "To create a temporary table in a SELECT statement we use TEMPORARY keyword."
},
{
"code": null,
"e": 1311,
"s": 1138,
"text": "This temporary table will be visible for the current session and whenever a session is closed, it is autom... |
\overbrace - Tex Command | \overbrace - Used to put a (stretchy) over-brace over the argument.
{ \overbrace #1}
\overbrace command puts a (stretchy) over-brace over the argument. Can use '^' to place an optional superscript over the overbrace; can use ‘_’ to place an optional subscript below the argument.
\overbrace{x + \cdots + x}^{n\rm\ times... | [
{
"code": null,
"e": 8054,
"s": 7986,
"text": "\\overbrace - Used to put a (stretchy) over-brace over the argument."
},
{
"code": null,
"e": 8071,
"s": 8054,
"text": "{ \\overbrace #1}"
},
{
"code": null,
"e": 8266,
"s": 8071,
"text": "\\overbrace command puts... |
Java - String trim() Method | This method returns a copy of the string, with leading and trailing whitespace omitted.
Here is the syntax of this method −
public String trim()
Here is the detail of parameters −
NA
NA
It returns a copy of this string with leading and trailing white space removed, or this string if it has no leading or trailing white... | [
{
"code": null,
"e": 2465,
"s": 2377,
"text": "This method returns a copy of the string, with leading and trailing whitespace omitted."
},
{
"code": null,
"e": 2501,
"s": 2465,
"text": "Here is the syntax of this method −"
},
{
"code": null,
"e": 2523,
"s": 2501,
... |
Singleton Class in C# | Singleton Class allow for single allocations and instances of data. It has normal methods and you can call it using an instance.
To prevent multiple instances of the class, the private constructor is used.
Let us see an example −
public class Singleton {
static Singleton b = null;
private Singleton() {
}
... | [
{
"code": null,
"e": 1191,
"s": 1062,
"text": "Singleton Class allow for single allocations and instances of data. It has normal methods and you can call it using an instance."
},
{
"code": null,
"e": 1268,
"s": 1191,
"text": "To prevent multiple instances of the class, the priva... |
Check whether a node is leaf node or not for multiple queries - GeeksforGeeks | 13 Aug, 2021
Given a tree with N vertices numbered from 0 to N – 1 where 0 is the root node. The task is to check if a node is leaf node or not for multiple queries.Examples:
Input:
0
/ \
1 2
/ \
3 4
/
5
q[] = {0, 3, 4, 5}
Output:
No
Yes
No
Yes
From the graph, 2, 3 and 5 are the only... | [
{
"code": null,
"e": 24405,
"s": 24377,
"text": "\n13 Aug, 2021"
},
{
"code": null,
"e": 24569,
"s": 24405,
"text": "Given a tree with N vertices numbered from 0 to N – 1 where 0 is the root node. The task is to check if a node is leaf node or not for multiple queries.Examples: ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.