title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Rive animations in Flutter | 15 Jul, 2020
Rive is a very useful animation tool that can create beautiful animations and we can add these in our Application. In flutter, we can add animations by writing so many lines of code but this is not a good practice for a developer. Instead of writing lines of code to create animation, we can create one usin... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Jul, 2020"
},
{
"code": null,
"e": 475,
"s": 52,
"text": "Rive is a very useful animation tool that can create beautiful animations and we can add these in our Application. In flutter, we can add animations by writing so many lines ... |
Java Program to Implement Type Casting and Type Conversion | 28 Oct, 2021
There are many situations that come when we have to change the functionality of the output as well as the type of output according to the need of the requirements. For e.g. Entered PI value in decimal format should be converted in the decimal format so that value can be used efficiently without any kind of... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Oct, 2021"
},
{
"code": null,
"e": 361,
"s": 28,
"text": "There are many situations that come when we have to change the functionality of the output as well as the type of output according to the need of the requirements. For e.g. En... |
mindepth and maxdepth in Linux find() command for limiting search to a specific directory. | 08 May, 2019
How to limit search a specified directory in Linux?There is a command in Linux to search for files in a directory hierarchy known as ‘find’. It searches the directory tree rooted at each given starting-point by evaluating the given expression from left to right, according to the rules of precedence, until ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 May, 2019"
},
{
"code": null,
"e": 755,
"s": 52,
"text": "How to limit search a specified directory in Linux?There is a command in Linux to search for files in a directory hierarchy known as ‘find’. It searches the directory tree ro... |
Score of Parentheses in C++ | Suppose we have a balanced parentheses string S, we have to compute the score of the string based on the following rule −
The () has score 1
AB has score A + B, where A and B are two balanced parentheses strings.
(A) has score 2 * A, where A is a balanced parentheses string.
So if the input is like “(()(()))”, then the... | [
{
"code": null,
"e": 1184,
"s": 1062,
"text": "Suppose we have a balanced parentheses string S, we have to compute the score of the string based on the following rule −"
},
{
"code": null,
"e": 1203,
"s": 1184,
"text": "The () has score 1"
},
{
"code": null,
"e": 1275... |
AJAX - Action | This chapter gives you a clear picture of the exact steps of AJAX operation.
A client event occurs.
An XMLHttpRequest object is created.
The XMLHttpRequest object is configured.
The XMLHttpRequest object makes an asynchronous request to the Webserver.
The Webserver returns the result containing XML document.
The XMLHtt... | [
{
"code": null,
"e": 1813,
"s": 1736,
"text": "This chapter gives you a clear picture of the exact steps of AJAX operation."
},
{
"code": null,
"e": 1836,
"s": 1813,
"text": "A client event occurs."
},
{
"code": null,
"e": 1873,
"s": 1836,
"text": "An XMLHttpR... |
Tryit Editor v3.7 | Tryit: HTML image link | [] |
Find the node with maximum value in a Binary Search Tree - GeeksforGeeks | 12 Sep, 2021
Given a Binary Search Tree, the task is to find the node with the maximum value in a BST.
For the above tree, we start with 20, then we move right to 22. We keep on moving to the right until we see NULL. Since the right of 22 is NULL, 22 is the node with the maximum value.
Approach: This is quite simple.... | [
{
"code": null,
"e": 24833,
"s": 24805,
"text": "\n12 Sep, 2021"
},
{
"code": null,
"e": 24924,
"s": 24833,
"text": "Given a Binary Search Tree, the task is to find the node with the maximum value in a BST. "
},
{
"code": null,
"e": 25109,
"s": 24924,
"text": ... |
Calculate Stirling numbers which represents the number of ways to arrange r objects around n different circles - GeeksforGeeks | 21 May, 2021
S(r, n), represents the number of ways that we can arrange r objects around indistinguishable circles of length n, and every circle n must have at least one object around it.
Examples:
Input: r = 9, n = 2
Output: 109584
Input: r = 6, n = 3
Output: 225
The special cases are:
S(r, 0) = 0, trivial.
S(r, ... | [
{
"code": null,
"e": 25146,
"s": 25118,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 25321,
"s": 25146,
"text": "S(r, n), represents the number of ways that we can arrange r objects around indistinguishable circles of length n, and every circle n must have at least one object... |
How to save password in android webview? | This example demonstrate about How to save password in android webview.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version = "1.0" encoding = "utf-8"?>
<LinearLayo... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "This example demonstrate about How to save password in android webview."
},
{
"code": null,
"e": 1263,
"s": 1134,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to cre... |
Xamarin - Building the App GUI | TextView is a very important component of the Android widgets. It is primarily used for displaying texts on an Android screen.
To create a textview, simply open main.axml and add the following code between the linear layout tags.
<TextView
android:text = "Hello I am a text View"
android:layout_width = "match_pa... | [
{
"code": null,
"e": 2091,
"s": 1964,
"text": "TextView is a very important component of the Android widgets. It is primarily used for displaying texts on an Android screen."
},
{
"code": null,
"e": 2194,
"s": 2091,
"text": "To create a textview, simply open main.axml and add the... |
Foundation - Label Positioning | You can place your labels to the left or right of your inputs.
You can place your labels to the left or right of your inputs.
To place label on right, use .text-right or .float-right class.
To place label on right, use .text-right or .float-right class.
To place label on left, use .text-left or .float-left class.
To pl... | [
{
"code": null,
"e": 2301,
"s": 2238,
"text": "You can place your labels to the left or right of your inputs."
},
{
"code": null,
"e": 2364,
"s": 2301,
"text": "You can place your labels to the left or right of your inputs."
},
{
"code": null,
"e": 2428,
"s": 2364... |
How can we implement different borders using the BorderFactory in Java?
| The BorderFactory is a Factory class which provides different types of borders in Java.
BevelBorder: This border draws raised or lowered beveled edges.
EmptyBorder: It doesn’t do any drawing, but does take up space.
EtchedBorder: A Lowered etched border gives an appearance of a rectangle and a Raised etched border loo... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "The BorderFactory is a Factory class which provides different types of borders in Java."
},
{
"code": null,
"e": 1214,
"s": 1150,
"text": "BevelBorder: This border draws raised or lowered beveled edges."
},
{
"code": null,
... |
Difference Between Abstract Class and Abstract Method in Java - GeeksforGeeks | 17 Jun, 2021
Abstract is the modifier applicable only for methods and classes but not for variables. Even though we don’t have implementation still we can declare a method with an abstract modifier. That is abstract methods have only declaration but not implementation. Hence, abstract method declaration should compulso... | [
{
"code": null,
"e": 26213,
"s": 26185,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 26546,
"s": 26213,
"text": "Abstract is the modifier applicable only for methods and classes but not for variables. Even though we don’t have implementation still we can declare a method with... |
Deep Learning with Tensorflow: Part 3 — Music and text generation | by Matteo Kofler | Towards Data Science | Hi everybody, welcome back to my Tenserflow series, this is part 3. I already described the logic and functionality of neural networks and Tenserflow in the first part as well as I showed you how to perform a image classification in the second part. In this part, I’ll give you a overview on Tensorflow applications as w... | [
{
"code": null,
"e": 544,
"s": 171,
"text": "Hi everybody, welcome back to my Tenserflow series, this is part 3. I already described the logic and functionality of neural networks and Tenserflow in the first part as well as I showed you how to perform a image classification in the second part. In th... |
How To Train Keras Models Using the Genetic Algorithm with PyGAD | by Ahmed Gad | Towards Data Science | PyGAD is an open-source Python library for building the genetic algorithm and training machine learning algorithms. It offers a wide range of parameters to customize the genetic algorithm to work with different types of problems.
PyGAD has its own modules that support building and training neural networks (NNs) and con... | [
{
"code": null,
"e": 402,
"s": 172,
"text": "PyGAD is an open-source Python library for building the genetic algorithm and training machine learning algorithms. It offers a wide range of parameters to customize the genetic algorithm to work with different types of problems."
},
{
"code": nul... |
\omega - Tex Command | \omega - Used to create lowercase omega symbol.
{ \omega}
\omega command draws lowercase omega symbol.
\omega
ω
\omega
ω
\omega
14 Lectures
52 mins
Ashraf Said
11 Lectures
1 hours
Ashraf Said
9 Lectures
1 hours
Emenwa Global, Ejike IfeanyiChukwu
29 Lectures
2.... | [
{
"code": null,
"e": 8034,
"s": 7986,
"text": "\\omega - Used to create lowercase omega symbol."
},
{
"code": null,
"e": 8044,
"s": 8034,
"text": "{ \\omega}"
},
{
"code": null,
"e": 8089,
"s": 8044,
"text": "\\omega command draws lowercase omega symbol."
},... |
Engineering - HEX2BIN Function | The HEX2BIN function converts a hexadecimal number to binary.
HEX2BIN (number, [places])
The hexadecimal number you want to convert.
Number cannot contain more than 10 characters (40 bits). The most significant bit of number is the sign bit (40th bit from the right). The remaining 39 bits are magnitude bits.
Negative ... | [
{
"code": null,
"e": 1916,
"s": 1854,
"text": "The HEX2BIN function converts a hexadecimal number to binary."
},
{
"code": null,
"e": 1944,
"s": 1916,
"text": "HEX2BIN (number, [places])\n"
},
{
"code": null,
"e": 1988,
"s": 1944,
"text": "The hexadecimal numb... |
HTML - Main Tag | The HTML <main> tag specifies main or important content in the document. It can be used only once per page and can't be used as a descendent of <article>, <aside>, <footer>, <header>, <nav> element.
<!DOCTYPE html>
<html>
<body>
<main>
<h1>Learning</h1>
<p>Learn to gain experience and try to... | [
{
"code": null,
"e": 2573,
"s": 2374,
"text": "The HTML <main> tag specifies main or important content in the document. It can be used only once per page and can't be used as a descendent of <article>, <aside>, <footer>, <header>, <nav> element."
},
{
"code": null,
"e": 3153,
"s": 25... |
How To Fetch The Exact Values From A Boxplot (Python) | by Elena Kosourova | Towards Data Science | A boxplot is a type of visualization used for displaying the five-number set of descriptive statistics for a dataset: the minimum and maximum (excluding the outliers), the median, the first (Q1) and third (Q3) quartiles. In Python, boxplots can be created in various data visualization libraries including the most basic... | [
{
"code": null,
"e": 511,
"s": 172,
"text": "A boxplot is a type of visualization used for displaying the five-number set of descriptive statistics for a dataset: the minimum and maximum (excluding the outliers), the median, the first (Q1) and third (Q3) quartiles. In Python, boxplots can be created... |
Fine-Tuning “LaBSE” for a Sentiment Classification Task | by Vinura Dhananjaya | Towards Data Science | Some background
Multilingual language models (let’s call “MLM”s) have been the trend in the world of NLP in recent times due to their ability to provide multilingual word embeddings (or sentence, document etc.) within a single model. “Pre-trained” is another term comes up along with MLMs, which tells that the models ha... | [
{
"code": null,
"e": 188,
"s": 172,
"text": "Some background"
},
{
"code": null,
"e": 1044,
"s": 188,
"text": "Multilingual language models (let’s call “MLM”s) have been the trend in the world of NLP in recent times due to their ability to provide multilingual word embeddings (or... |
Where to use #region directive in C#? | It lets you specify a block of code that you can expand or collapse when using the outlining feature of the Visual Studio Code Editor. It should be terminated with #endregion.
Let us see how to define a region using #region.
#region NewClass definition
public class NewClass {
static void Main() { }
}
#endregion
The ... | [
{
"code": null,
"e": 1238,
"s": 1062,
"text": "It lets you specify a block of code that you can expand or collapse when using the outlining feature of the Visual Studio Code Editor. It should be terminated with #endregion."
},
{
"code": null,
"e": 1287,
"s": 1238,
"text": "Let us... |
Java Examples - Display text in a rectangle | How to display string in a rectangle?
Following example demonstrates how to display each character in a rectangle by drawing a rectangle around each character using drawRect() method.
import java.awt.*;
import javax.swing.*;
public class Main extends JPanel {
public void paint(Graphics g) {
g.setFont(new Font... | [
{
"code": null,
"e": 2106,
"s": 2068,
"text": "How to display string in a rectangle?"
},
{
"code": null,
"e": 2252,
"s": 2106,
"text": "Following example demonstrates how to display each character in a rectangle by drawing a rectangle around each character using drawRect() method... |
groupmod - Unix, Linux Command | groupmod modify a group definition on the system
groupmod [options] GROUP
groupmodThe groupmod command modifies the definition of the specified GROUP by modifying the appropriate entry in the group database.
The value of GID must be a non-negative decimal integer. This value must be unique, unless the -o option is used... | [
{
"code": null,
"e": 10626,
"s": 10577,
"text": "groupmod modify a group definition on the system"
},
{
"code": null,
"e": 10651,
"s": 10626,
"text": "groupmod [options] GROUP"
},
{
"code": null,
"e": 10785,
"s": 10651,
"text": "groupmodThe groupmod command mo... |
Count numbers having 0 as a digit in C++ | We are provided a number N. The goal is to find the numbers that have 0 as digit and are in the range [1,N].
We will do this by traversing numbers from 10 to N ( no need to check from 1 to 9 ) and for each number we will check each digit using a while loop. If any digit is found as zero increment count and move to next... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "We are provided a number N. The goal is to find the numbers that have 0 as digit and are in the range [1,N]."
},
{
"code": null,
"e": 1460,
"s": 1171,
"text": "We will do this by traversing numbers from 10 to N ( no need to check fro... |
How to set background image in HTML ? - GeeksforGeeks | 07 Apr, 2021
Background image which we see on some websites not only makes it look good but also enhances the user experience. The background image has the potential to tell the users about the theme of the website which makes the user stick to the website. Example: If you add a background image related to traveling to... | [
{
"code": null,
"e": 31392,
"s": 31364,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 31902,
"s": 31392,
"text": "Background image which we see on some websites not only makes it look good but also enhances the user experience. The background image has the potential to tell th... |
ChainMap in Python - GeeksforGeeks | 28 Jun, 2021
Python contains a container called “ChainMap” which encapsulates many dictionaries into one unit. ChainMap is member of module “collections“.
Example:
# Python program to demonstrate # ChainMap from collections import ChainMap d1 = {'a': 1, 'b': 2} d2 = {'c': 3, 'd': 4} d3 = ... | [
{
"code": null,
"e": 42677,
"s": 42649,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 42819,
"s": 42677,
"text": "Python contains a container called “ChainMap” which encapsulates many dictionaries into one unit. ChainMap is member of module “collections“."
},
{
"code":... |
Java.util.LinkedList.get(), getFirst(), getLast() in Java - GeeksforGeeks | 10 Jun, 2020
The conventional method allowing to get the element at particular index is get(). Though in LinkedList its never possible to achieve this without complete traversal, but this method allows the same. Three variants present, all of which are discussed in this article with Exceptions as well.1. get(int index)... | [
{
"code": null,
"e": 25771,
"s": 25743,
"text": "\n10 Jun, 2020"
},
{
"code": null,
"e": 26153,
"s": 25771,
"text": "The conventional method allowing to get the element at particular index is get(). Though in LinkedList its never possible to achieve this without complete traversa... |
tmpfile() function in C - GeeksforGeeks | 04 Sep, 2017
In C Programming Language, the tmpfile() function is used to produce/create a temporary file.
tmpfile() function is defined in the “stdio.h” header file.
The created temporary file will automatically be deleted after the termination of program.
It opens file in binary update mode i.e., wb+ mode.
The syntax... | [
{
"code": null,
"e": 25689,
"s": 25661,
"text": "\n04 Sep, 2017"
},
{
"code": null,
"e": 25783,
"s": 25689,
"text": "In C Programming Language, the tmpfile() function is used to produce/create a temporary file."
},
{
"code": null,
"e": 25843,
"s": 25783,
"text... |
who command in Linux - GeeksforGeeks | 18 Feb, 2021
who command is used to find out the following information :1. Time of last system boot2. Current run level of the system3. List of logged in users and more.
Description : The who command is used to get information about currently logged in user on to system.
Syntax : $who [options] [filename]
Examples :1.... | [
{
"code": null,
"e": 25881,
"s": 25853,
"text": "\n18 Feb, 2021"
},
{
"code": null,
"e": 26038,
"s": 25881,
"text": "who command is used to find out the following information :1. Time of last system boot2. Current run level of the system3. List of logged in users and more."
},
... |
Laravel | Blade Templates Inheritance - GeeksforGeeks | 22 Nov, 2019
A templating engine makes writing frontend code easier and helps in reusing the code. All the blade files have a extension of *.blade.php. In Laravel, most of the times frontend files are stored in resources/views directory. Blade files support PHP and are compiled into plain PHP and cached in the server s... | [
{
"code": null,
"e": 26093,
"s": 26065,
"text": "\n22 Nov, 2019"
},
{
"code": null,
"e": 26584,
"s": 26093,
"text": "A templating engine makes writing frontend code easier and helps in reusing the code. All the blade files have a extension of *.blade.php. In Laravel, most of the ... |
Flutter - Custom Widgets - GeeksforGeeks | 12 Mar, 2021
We create Custom Widgets when we want a custom look and feel to our app, and we know that there will be a repetition of a particular widget. We can create the custom widget in a new dart file with all the codes and defining the parameters that we need in the constructor.
For more on how to split widgets, y... | [
{
"code": null,
"e": 25261,
"s": 25233,
"text": "\n12 Mar, 2021"
},
{
"code": null,
"e": 25533,
"s": 25261,
"text": "We create Custom Widgets when we want a custom look and feel to our app, and we know that there will be a repetition of a particular widget. We can create the cust... |
How to close current tab in a browser window using JavaScript? - GeeksforGeeks | 18 Oct, 2019
We are going to be looking at the method to close the current tab in a browser window using JavaScript. Earlier it used to happen that with a simple JavaScript function, the current tab used to get closed. The following syntax was used for this purpose.
Syntax:
window.close()
But accounting for a security ... | [
{
"code": null,
"e": 26187,
"s": 26159,
"text": "\n18 Oct, 2019"
},
{
"code": null,
"e": 26441,
"s": 26187,
"text": "We are going to be looking at the method to close the current tab in a browser window using JavaScript. Earlier it used to happen that with a simple JavaScript fun... |
Python | Ways to remove a key from dictionary - GeeksforGeeks | 10 Nov, 2018
Dictionary is used in manifold practical applications such as day-day programming, web development and AI/ML programming as well, making it a useful container overall. Hence, knowing shorthands for achieving different tasks related to dictionary usage always is a plus. This article deals with one such task... | [
{
"code": null,
"e": 25661,
"s": 25633,
"text": "\n10 Nov, 2018"
},
{
"code": null,
"e": 26028,
"s": 25661,
"text": "Dictionary is used in manifold practical applications such as day-day programming, web development and AI/ML programming as well, making it a useful container over... |
Java Program for factorial of a number - GeeksforGeeks | 20 Mar, 2018
Factorial of a non-negative integer, is multiplication of all integers smaller than or equal to n. For example factorial of 6 is 6*5*4*3*2*1 which is 720.
Recursive :
// Java program to find factorial of given numberclass Test{ // method to find factorial of given number static int factorial(int n) ... | [
{
"code": null,
"e": 25849,
"s": 25821,
"text": "\n20 Mar, 2018"
},
{
"code": null,
"e": 26004,
"s": 25849,
"text": "Factorial of a non-negative integer, is multiplication of all integers smaller than or equal to n. For example factorial of 6 is 6*5*4*3*2*1 which is 720."
},
... |
Get the first letter of each word in a string using regex in Java - GeeksforGeeks | 11 Dec, 2018
Given a string, extract the first letter of each word in it. “Words” are defined as contiguous strings of alphabetic characters i.e. any upper or lower case characters a-z or A-Z.
Examples:
Input : Geeks for geeks
Output :Gfg
Input : United Kingdom
Output : UK
Below is the Regular expression to e... | [
{
"code": null,
"e": 25861,
"s": 25833,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 26041,
"s": 25861,
"text": "Given a string, extract the first letter of each word in it. “Words” are defined as contiguous strings of alphabetic characters i.e. any upper or lower case charac... |
Extension Method in C# - GeeksforGeeks | 01 May, 2019
In C#, the extension method concept allows you to add new methods in the existing class or in the structure without modifying the source code of the original type and you do not require any kind of special permission from the original type and there is no need to re-compile the original type. It is introdu... | [
{
"code": null,
"e": 25189,
"s": 25161,
"text": "\n01 May, 2019"
},
{
"code": null,
"e": 25511,
"s": 25189,
"text": "In C#, the extension method concept allows you to add new methods in the existing class or in the structure without modifying the source code of the original type ... |
PyQt5 QCalendarWidget - Getting Date Text Format - GeeksforGeeks | 04 Jul, 2021
In this article, we will see how we can get the date text format to the specific date in the QCalendarWidget. Setting the date text format makes the specified date looks more special such as increasing the size and other features. Below is how a date with date text format looks like.
In order to do this... | [
{
"code": null,
"e": 26437,
"s": 26409,
"text": "\n04 Jul, 2021"
},
{
"code": null,
"e": 26723,
"s": 26437,
"text": "In this article, we will see how we can get the date text format to the specific date in the QCalendarWidget. Setting the date text format makes the specified date... |
ReactJS className Attribute - GeeksforGeeks | 25 May, 2021
React.js library is all about splitting the app into several components. Each Component has its own lifecycle. React provides us some in-built methods that we can override at particular stages in the life-cycle of the component.
In class-based components, the className attribute is used to set or return th... | [
{
"code": null,
"e": 26071,
"s": 26043,
"text": "\n25 May, 2021"
},
{
"code": null,
"e": 26300,
"s": 26071,
"text": "React.js library is all about splitting the app into several components. Each Component has its own lifecycle. React provides us some in-built methods that we can ... |
Node.js fs.fstat() Method - GeeksforGeeks | 11 Oct, 2021
The fs.fstat() method is used to return information about the given file descriptor. The fs.Stat object returned has several fields and methods to get more details about the file.
Syntax:
fs.fstat( fd, options, callback )
Parameters: This method accepts three parameters as mentioned above and described bel... | [
{
"code": null,
"e": 26267,
"s": 26239,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 26447,
"s": 26267,
"text": "The fs.fstat() method is used to return information about the given file descriptor. The fs.Stat object returned has several fields and methods to get more details... |
Number of ways of distributing N identical objects in R distinct groups - GeeksforGeeks | 07 May, 2021
Given two integers N and R, the task is to calculate the number of ways to distribute N identical objects into R distinct groups.
Examples:
Input: N = 4, R = 2 Output: 5 No of objects in 1st group = 0, in second group = 4 No of objects in 1st group = 1, in second group = 3 No of objects in 1st group = 2, ... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n07 May, 2021"
},
{
"code": null,
"e": 26617,
"s": 26487,
"text": "Given two integers N and R, the task is to calculate the number of ways to distribute N identical objects into R distinct groups."
},
{
"code": null,
"... |
Generate all possible permutations of words in a Sentence - GeeksforGeeks | 08 Jun, 2021
Given a string S, the task is to print permutations of all words in a sentence.
Examples:
Input: S = “sky is blue”Output: sky is bluesky blue isis sky blueis blue skyblue sky isblue is sky
Input: S =” Do what you love”Output:Do what you loveDo what love youDo you what loveDo you love whatDo love what youD... | [
{
"code": null,
"e": 26169,
"s": 26141,
"text": "\n08 Jun, 2021"
},
{
"code": null,
"e": 26249,
"s": 26169,
"text": "Given a string S, the task is to print permutations of all words in a sentence."
},
{
"code": null,
"e": 26259,
"s": 26249,
"text": "Examples:"... |
Exports & Imports in JavaScript | Note − To run this example you will need to run a localhost server.
Following is the code for exports and imports in JavaScript −
INDEX.html
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "Note − To run this example you will need to run a localhost server."
},
{
"code": null,
"e": 1192,
"s": 1130,
"text": "Following is the code for exports and imports in JavaScript −"
},
{
"code": null,
"e": 1203,
"s": ... |
Arithmetic Number | Practice | GeeksforGeeks | Given three integers 'A' denoting the first term of an arithmetic sequence , 'C' denoting the common difference of an arithmetic sequence and an integer 'B'. you need to tell whether 'B' exists in the arithmetic sequence or not.
Example 1:
Input: A = 1, B = 3, C = 2
Output: 1
Explaination: 3 is the second term of the ... | [
{
"code": null,
"e": 456,
"s": 226,
"text": "Given three integers 'A' denoting the first term of an arithmetic sequence , 'C' denoting the common difference of an arithmetic sequence and an integer 'B'. you need to tell whether 'B' exists in the arithmetic sequence or not."
},
{
"code": nul... |
How to resize an image in Android using Picasso? | This example demonstrates how to do I 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 − Open build.gradle (Module: app) and add the following dependency −
implementation 'com.squareup.picasso:picasso:2.5.2'
Step 3 − Add ... | [
{
"code": null,
"e": 1112,
"s": 1062,
"text": "This example demonstrates how to do I in android."
},
{
"code": null,
"e": 1241,
"s": 1112,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project."
... |
Metasploit - Brute-Force Attacks | In a brute-force attack, the hacker uses all possible combinations of letters, numbers, special characters, and small and capital letters in an automated way to gain access over a host or a service. This type of attack has a high probability of success, but it requires an enormous amount of time to process all the comb... | [
{
"code": null,
"e": 2501,
"s": 2171,
"text": "In a brute-force attack, the hacker uses all possible combinations of letters, numbers, special characters, and small and capital letters in an automated way to gain access over a host or a service. This type of attack has a high probability of success,... |
3 Python Modules You Should Know to Extract Text Data | by Pranjal Saxena | Towards Data Science | Extracting text data is the initial step to do further analysis of the data. We have a considerable amount of data present over social media. However, we need a system that can help us extract useful information from the bundle of text data. Some famous applications that use text extraction are Resume Parsing and Invoi... | [
{
"code": null,
"e": 616,
"s": 172,
"text": "Extracting text data is the initial step to do further analysis of the data. We have a considerable amount of data present over social media. However, we need a system that can help us extract useful information from the bundle of text data. Some famous a... |
4 Pandas Plotting Function You Should Know | by Cornellius Yudha Wijaya | Towards Data Science | Pandas is a powerful package for data scientists. There are many reasons we use Pandas, e.g. Data wrangling, Data cleaning, and Data manipulation. Although, there is a method that rarely talks about regarding Pandas package and that is the Data plotting.
Data plotting, just like the name implies, is a process to plot t... | [
{
"code": null,
"e": 426,
"s": 171,
"text": "Pandas is a powerful package for data scientists. There are many reasons we use Pandas, e.g. Data wrangling, Data cleaning, and Data manipulation. Although, there is a method that rarely talks about regarding Pandas package and that is the Data plotting."... |
How to pass a jQuery event as a parameter in a method? | To pass a jQuery event as a parameter in a method, use the bind() method.
You can try to run the following code to learn how to apss a jQuery event as a parameter:
Live Demo
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(... | [
{
"code": null,
"e": 1136,
"s": 1062,
"text": "To pass a jQuery event as a parameter in a method, use the bind() method."
},
{
"code": null,
"e": 1226,
"s": 1136,
"text": "You can try to run the following code to learn how to apss a jQuery event as a parameter:"
},
{
"cod... |
Execute VBScript Online | HTML File with VBScript | [] |
MySQL query to select rows except first row in descending order? | Let us first create a table −
mysql> create table DemoTable
-> (
-> Amount int
-> );
Query OK, 0 rows affected (0.50 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values(10);
Query OK, 1 row affected (0.17 sec)
mysql> insert into DemoTable values(20);
Query OK, 1 ro... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1193,
"s": 1092,
"text": "mysql> create table DemoTable\n -> (\n -> Amount int\n -> );\nQuery OK, 0 rows affected (0.50 sec)"
},
{
"code": null,
"e": 1249,
... |
MySQL SELECT products WHERE 'average price per product' < value? | Let us first create a table −
mysql> create table DemoTable848(
ProductId int,
ProductPrice int
);
Query OK, 0 rows affected (1.20 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable848 values(100,30);
Query OK, 1 row affected (0.57 sec)
mysql> insert into DemoTable848 values... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1204,
"s": 1092,
"text": "mysql> create table DemoTable848(\n ProductId int,\n ProductPrice int\n);\nQuery OK, 0 rows affected (1.20 sec)"
},
{
"code": null,
"e":... |
Difference between DataClass vs NamedTuple vs Object in Python - GeeksforGeeks | 01 Aug, 2020
Data Class: Data Class is a type of class that is used to store data without any functionality. These data classes are just regular classes having the main purpose to store state and data without knowing the constraints and logic behind it. Whenever you create a class that mostly contains attributes and ce... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 24582,
"s": 24212,
"text": "Data Class: Data Class is a type of class that is used to store data without any functionality. These data classes are just regular classes having the main purpose... |
How to use finally on promise with then and catch in Javascript? | When a promise is settled, i.e either fulfilled or rejected, the specified callback function in finally method is invoked. The finally() method also returns a Promise.
This provides a way for code to be run whether the promise was fulfilled successfully or rejected once the Promise has been dealt with. Let us look at a... | [
{
"code": null,
"e": 1230,
"s": 1062,
"text": "When a promise is settled, i.e either fulfilled or rejected, the specified callback function in finally method is invoked. The finally() method also returns a Promise."
},
{
"code": null,
"e": 1393,
"s": 1230,
"text": "This provides ... |
How can MySQL IF ELSEIF ELSE statement be used in a stored procedure? | MySQL IF ELSEIF ELSE execute the statements based on multiple expressions Its syntax is as follows −
IF expression THEN
statements;
ELSEIF elseif-expression THEN
elseif-statements;
... ... ... ...
ELSE
else-statements;
END IF;
The statements must end with a semicolon.
To demonstrate the use of IF ELSEIF ELSE st... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "MySQL IF ELSEIF ELSE execute the statements based on multiple expressions Its syntax is as follows −"
},
{
"code": null,
"e": 1297,
"s": 1163,
"text": "IF expression THEN\n statements;\nELSEIF elseif-expression THEN\n elseif-stat... |
Angular Google Charts - Basic Bar Chart | Following is an example of a basic Bar Chart.
We have already seen the configurations used to draw a chart in Google Charts Configuration Syntax chapter. Now, let us see an example of a basic Bar Chart.
We've used BarChart class to show bar based chart.
type = 'BarChart';
app.component.ts
import { Component } from '@a... | [
{
"code": null,
"e": 1842,
"s": 1796,
"text": "Following is an example of a basic Bar Chart."
},
{
"code": null,
"e": 1999,
"s": 1842,
"text": "We have already seen the configurations used to draw a chart in Google Charts Configuration Syntax chapter. Now, let us see an example o... |
C# | Getting an enumerator that iterates through LinkedList<T> - GeeksforGeeks | 01 Feb, 2019
LinkedList<T>.GetEnumerator Method is used to get an enumerator that iterates through the LinkedList<T>.
Syntax:
public System.Collections.Generic.LinkedList<T>.Enumerator GetEnumerator ();
Return Value: It returns an LinkedList<T>.Enumerator for the LinkedList<T>.
Below programs illustrate the use of abov... | [
{
"code": null,
"e": 23911,
"s": 23883,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 24016,
"s": 23911,
"text": "LinkedList<T>.GetEnumerator Method is used to get an enumerator that iterates through the LinkedList<T>."
},
{
"code": null,
"e": 24024,
"s": 24016... |
Difference between “INNER JOIN” and “OUTER JOIN” - GeeksforGeeks | 10 Jun, 2021
JOINS :Joins in SQL are used to combine rows from multiple tables on a specific condition, which is a relation between the columns of two tables. And there are different types of joins and in this article let us cover INNER JOIN and OUTER JOIN and their differences.
Let us consider the two tables student ... | [
{
"code": null,
"e": 24250,
"s": 24222,
"text": "\n10 Jun, 2021"
},
{
"code": null,
"e": 24518,
"s": 24250,
"text": "JOINS :Joins in SQL are used to combine rows from multiple tables on a specific condition, which is a relation between the columns of two tables. And there are dif... |
HTML 5 video or audio playlist | Use HTML with JavaScript to add playlist. The onended event fires when the audio/video has reached the end. You can add messages like “Thank you for watching”, “Stay tuned!”, etc
You can try to run the following code to implement the onended attribute −
<!DOCTYPE HTML>
<html>
<body>
<video width = "300" height... | [
{
"code": null,
"e": 1241,
"s": 1062,
"text": "Use HTML with JavaScript to add playlist. The onended event fires when the audio/video has reached the end. You can add messages like “Thank you for watching”, “Stay tuned!”, etc"
},
{
"code": null,
"e": 1316,
"s": 1241,
"text": "You... |
How to use Dataset in TensorFlow. The built-in Input Pipeline. Never use... | by Francesco Zuppichini | Towards Data Science | The built-in Input Pipeline. Never use ‘feed-dict’ anymore
16/02/2020: I have switched to PyTorch 😍
29/05/2019: I will update the tutorial to tf 2.0 😎 (I am finishing my Master Thesis)
Update 2/06/2018: Added second full example to read csv directly into the dataset
Update 25/05/2018: Added second full example with a... | [
{
"code": null,
"e": 230,
"s": 171,
"text": "The built-in Input Pipeline. Never use ‘feed-dict’ anymore"
},
{
"code": null,
"e": 271,
"s": 230,
"text": "16/02/2020: I have switched to PyTorch 😍"
},
{
"code": null,
"e": 356,
"s": 271,
"text": "29/05/2019: I wi... |
Java - The SortedSet Interface | The SortedSet interface extends Set and declares the behavior of a set sorted in an ascending order. In addition to those methods defined by Set, the SortedSet interface declares the methods summarized in the following table −
Several methods throw a NoSuchElementException when no items are contained in the invoking se... | [
{
"code": null,
"e": 2604,
"s": 2377,
"text": "The SortedSet interface extends Set and declares the behavior of a set sorted in an ascending order. In addition to those methods defined by Set, the SortedSet interface declares the methods summarized in the following table −"
},
{
"code": null... |
Gotcha! global variable with recursion | by Han Qi | Towards Data Science | I was working on this leetcode question https://leetcode.com/contest/weekly-contest-212/problems/path-with-minimum-effort/ using backtracking and spent some time debugging strange output. This article discusses some pitfalls when using recursion with global variables, how to handle them, and how to change the code from... | [
{
"code": null,
"e": 510,
"s": 172,
"text": "I was working on this leetcode question https://leetcode.com/contest/weekly-contest-212/problems/path-with-minimum-effort/ using backtracking and spent some time debugging strange output. This article discusses some pitfalls when using recursion with glob... |
How to Install Multiple R Packages? - GeeksforGeeks | 25 Mar, 2022
In this article, we will see how to install multiple packages in R Programming Language. Installation can be done in two ways.
Step 1: Open R Studio
Step 2: Navigate to Tools and select the Install packages option
Step 3: In the Text box packages, enter the package names.
Step 4: Clic... | [
{
"code": null,
"e": 25024,
"s": 24993,
"text": " \n25 Mar, 2022\n"
},
{
"code": null,
"e": 25151,
"s": 25024,
"text": "In this article, we will see how to install multiple packages in R Programming Language. Installation can be done in two ways."
},
{
"code": null,
"... |
How to draw a line in OpenCV using C++? | To draw a line we need two points-the starting point and ending point. We also require a canvas to draw the line.
Using OpenCV, the matrix in our canvas, we need to define the line's starting and ending points. We require to assign a color to the line as well. The thickness of the line has to be explained too. If we wa... | [
{
"code": null,
"e": 1176,
"s": 1062,
"text": "To draw a line we need two points-the starting point and ending point. We also require a canvas to draw the line."
},
{
"code": null,
"e": 1485,
"s": 1176,
"text": "Using OpenCV, the matrix in our canvas, we need to define the line's... |
Algorithms From Scratch: K-Nearest Neighbors | by Kurtis Pykes | Towards Data Science | A non-parametric algorithm capable of performing Classification and Regression; Thomas Cover, a professor at Stanford University, first proposed the idea of K-Nearest Neighbors algorithm in 1967.
Many often refer to the K-NN as a lazy learner or a type of instance based learner since all computation is deferred until f... | [
{
"code": null,
"e": 368,
"s": 172,
"text": "A non-parametric algorithm capable of performing Classification and Regression; Thomas Cover, a professor at Stanford University, first proposed the idea of K-Nearest Neighbors algorithm in 1967."
},
{
"code": null,
"e": 659,
"s": 368,
... |
Data Integration with Pandas. How to easily import Data | by Christianlauer | Towards Data Science | For adhoc data analysis via Jupyter Notebook you often need external data via CSV, Excel or database to process them with Python. Reading the data is relatively easy thanks to the handy Pandas library. I have summarized the standard procedures for you in this article. Of course, you can also use the same errors for lat... | [
{
"code": null,
"e": 591,
"s": 172,
"text": "For adhoc data analysis via Jupyter Notebook you often need external data via CSV, Excel or database to process them with Python. Reading the data is relatively easy thanks to the handy Pandas library. I have summarized the standard procedures for you in ... |
jQuery - Widget Spinner | The Widget Spinner function can be used with widgets in JqueryUI.Spinner provide a quick way to select one value from a set.
Here is the simple syntax to use Spinner −
$( "#menu" ).selectmenu();
Following is a simple example showing the usage of Spinner −
<!doctype html>
<html lang = "en">
<head>
<meta charse... | [
{
"code": null,
"e": 2447,
"s": 2322,
"text": "The Widget Spinner function can be used with widgets in JqueryUI.Spinner provide a quick way to select one value from a set."
},
{
"code": null,
"e": 2490,
"s": 2447,
"text": "Here is the simple syntax to use Spinner −"
},
{
... |
Scala - Recursion Functions | Recursion plays a big role in pure functional programming and Scala supports recursion functions very well. Recursion means a function can call itself repeatedly.
Try the following program, it is a good example of recursion where factorials of the passed number are calculated.
object Demo {
def main(args: Array[Stri... | [
{
"code": null,
"e": 2161,
"s": 1998,
"text": "Recursion plays a big role in pure functional programming and Scala supports recursion functions very well. Recursion means a function can call itself repeatedly."
},
{
"code": null,
"e": 2276,
"s": 2161,
"text": "Try the following p... |
Difference between Parcelable and Serializable in android | This example demonstrates about Difference between Parcel able and Serializable in android
Serializable is a markable interface or we can call as an empty interface. It doesn’t have any pre-implemented methods. Serializable is going to convert an object to byte stream. So the user can pass the data between one activity... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "This example demonstrates about Difference between Parcel able and Serializable in android"
},
{
"code": null,
"e": 1533,
"s": 1153,
"text": "Serializable is a markable interface or we can call as an empty interface. It doesn’t have ... |
LocalDate getYear() method in Java | The year for a particular LocalDate can be obtained using the getYear() method in the LocalDate class in Java. This method requires no parameters and it returns the year which can range from MIN_YEAR to MAX_YEAR.
A program that demonstrates this is given as follows
Live Demo
import java.time.*;
public class Demo {
... | [
{
"code": null,
"e": 1275,
"s": 1062,
"text": "The year for a particular LocalDate can be obtained using the getYear() method in the LocalDate class in Java. This method requires no parameters and it returns the year which can range from MIN_YEAR to MAX_YEAR."
},
{
"code": null,
"e": 132... |
Hive - Data Types | This chapter takes you through the different data types in Hive, which are involved in the table creation. All the data types in Hive are classified into four types, given as follows:
Column Types
Literals
Null Values
Complex Types
Column type are used as column data types of Hive. They are as follows:
Integer type dat... | [
{
"code": null,
"e": 2134,
"s": 1950,
"text": "This chapter takes you through the different data types in Hive, which are involved in the table creation. All the data types in Hive are classified into four types, given as follows:"
},
{
"code": null,
"e": 2147,
"s": 2134,
"text":... |
A Guide to Everything String Formatting in Python | by Sara A. Metwalli | Towards Data Science | Strings are one of the most essential and used datatypes in programming. It allows the computer to interact and communicate with the world, such as printing instructions or reading input from the user. The ability to manipulate and formate strings give the programmer the power to process and handle text, for example, e... | [
{
"code": null,
"e": 799,
"s": 171,
"text": "Strings are one of the most essential and used datatypes in programming. It allows the computer to interact and communicate with the world, such as printing instructions or reading input from the user. The ability to manipulate and formate strings give th... |
How to create directory programmatically in Android? | This example demonstrates how to create directory programmatically in Android
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<androidx... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "This example demonstrates how to create directory programmatically in Android"
},
{
"code": null,
"e": 1269,
"s": 1140,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details ... |
Bubble Sort algorithm using JavaScript - GeeksforGeeks | 22 Jan, 2021
Bubble sort algorithm is an algorithm that sorts the array by comparing two adjacent elements and swaps them if they are not in the intended order. Here order can be anything like increasing order or decreasing order.
We have an unsorted array arr = [ 1, 4, 2, 5, -2, 3 ] the task is to sort the array using... | [
{
"code": null,
"e": 24673,
"s": 24645,
"text": "\n22 Jan, 2021"
},
{
"code": null,
"e": 24891,
"s": 24673,
"text": "Bubble sort algorithm is an algorithm that sorts the array by comparing two adjacent elements and swaps them if they are not in the intended order. Here order can ... |
What is unsafe/unmanaged code in C#? | Applications that are not under the control of the CLR are unmanaged. The unsafe code or the unmanaged code is a code block that uses a pointer variable and allows pointer usage in unmanaged code.
The following is the code −
static unsafe void Main(string[] args) {
int x = 100;
int* a = &x;
Console.WriteLine(... | [
{
"code": null,
"e": 1259,
"s": 1062,
"text": "Applications that are not under the control of the CLR are unmanaged. The unsafe code or the unmanaged code is a code block that uses a pointer variable and allows pointer usage in unmanaged code."
},
{
"code": null,
"e": 1287,
"s": 1259... |
Tryit Editor v3.7 | Tryit: The class selector only for specific element | [] |
How to save figures to pdf as raster images in Matplotlib? | To save figures to pdf as raster images in Matplotlib, we can take the following steps −
Set the figure size and adjust the padding between and around the subplots.
Create a new figure or activate an existing figure.
Add an axes to the figure as part of a subplot arrangement.
Create random data using numpy.
Display the... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "To save figures to pdf as raster images in Matplotlib, we can take the following steps −"
},
{
"code": null,
"e": 1227,
"s": 1151,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"co... |
How to resize an image using Tkinter? | To process images with Tkinter and other Python packages, we generally use the Pillow Package (or PIL) in Python. It provides a way to load, process, manipulate, convert, and helps to resize the images. The package can be installed by using the command pip install Pillow. Once the package is installed, we can import it... | [
{
"code": null,
"e": 1435,
"s": 1062,
"text": "To process images with Tkinter and other Python packages, we generally use the Pillow Package (or PIL) in Python. It provides a way to load, process, manipulate, convert, and helps to resize the images. The package can be installed by using the command ... |
Searching in an array where adjacent differ by at most k | Practice | GeeksforGeeks | A step array is an array of integer where each element has a difference of at most k with its neighbor. Given a key x, we need to find the index value of x if multiple elements exist, return the first occurrence of the key.
Example 1:
​Input : arr[ ] = {4, 5, 6, 7, 6}, K = 1
and X = 6
Output : 2
Explanati... | [
{
"code": null,
"e": 463,
"s": 238,
"text": "A step array is an array of integer where each element has a difference of at most k with its neighbor. Given a key x, we need to find the index value of x if multiple elements exist, return the first occurrence of the key. "
},
{
"code": null,
... |
Python Lambda | A lambda function is a small anonymous function.
A lambda function can take any number of arguments, but can only have one expression.
The expression is executed and the result is returned:
Add 10 to argument a, and
return the result:
Lambda functions can take any number of arguments:
Multiply argument a with argume... | [
{
"code": null,
"e": 49,
"s": 0,
"text": "A lambda function is a small anonymous function."
},
{
"code": null,
"e": 135,
"s": 49,
"text": "A lambda function can take any number of arguments, but can only have one expression."
},
{
"code": null,
"e": 190,
"s": 135,... |
Running Timeseries Anomaly Detection at Scale on SQL Data | by Sachin Bansal | Towards Data Science | Time is probably the most important dimension for metrics.
In the business world, business executives, analysts, and product managers track metrics over time.
In the startup world, VCs want metrics to grow 5% week-on-week.
In public stock markets, long-term investors evaluate metrics on a quarter-on-quarter basis to ma... | [
{
"code": null,
"e": 231,
"s": 172,
"text": "Time is probably the most important dimension for metrics."
},
{
"code": null,
"e": 331,
"s": 231,
"text": "In the business world, business executives, analysts, and product managers track metrics over time."
},
{
"code": null,... |
Ruby | Array class insert() function - GeeksforGeeks | 07 Jan, 2020
insert() is a Array class method which returns the array by inserting a given element at the specified index value.
Syntax: Array.insert()
Parameter: Arrayindexelement
Return: insert elements the specific index value
Example #1 :
# Ruby code for insert() method # declaring arraya = [18, 22, 33, nil, 5, 6]... | [
{
"code": null,
"e": 23273,
"s": 23245,
"text": "\n07 Jan, 2020"
},
{
"code": null,
"e": 23389,
"s": 23273,
"text": "insert() is a Array class method which returns the array by inserting a given element at the specified index value."
},
{
"code": null,
"e": 23412,
... |
Espresso Testing Framework - AdapterView | AdapterView is a special kind of view specifically designed to render a collection of similar information like product list and user contacts fetched from an underlying data source using Adapter. The data source may be simple list to complex database entries. Some of the view derived from AdapterView are ListView, Grid... | [
{
"code": null,
"e": 2314,
"s": 1976,
"text": "AdapterView is a special kind of view specifically designed to render a collection of similar information like product list and user contacts fetched from an underlying data source using Adapter. The data source may be simple list to complex database en... |
Fantastic Pandas Data Frame Report with Pandas Profiling | by Cornellius Yudha Wijaya | Towards Data Science | As a Data Scientist, we would explore data for our everyday work. For Pythonist, using the Pandas module is a must. While compelling, sometimes we find the report is just too basic. Let me show it by an example below.
import pandas as pdimport seaborn as sns#Loading dataset mpg = sns.load_dataset('mpg')mpg.describe()
W... | [
{
"code": null,
"e": 389,
"s": 171,
"text": "As a Data Scientist, we would explore data for our everyday work. For Pythonist, using the Pandas module is a must. While compelling, sometimes we find the report is just too basic. Let me show it by an example below."
},
{
"code": null,
"e": ... |
AWT TextArea Class | The TextArea control in AWT provide us multiline editor area. The user can type here as much as he wants. When the text in the text area become larger than the viewable area the scroll bar is automatically appears which help us to scroll the text up & down and right & left.
Following is the declaration for java.awt.Tex... | [
{
"code": null,
"e": 2022,
"s": 1747,
"text": "The TextArea control in AWT provide us multiline editor area. The user can type here as much as he wants. When the text in the text area become larger than the viewable area the scroll bar is automatically appears which help us to scroll the text up & d... |
How to predict your best footballers’ FIFA 20 ratings. | by Mubarak Ganiyu | Towards Data Science | I passed the ball from Milner to Salah. Salah did a quick dribble, gave the ball to Firmino. Firmino stylishly did a 360 pass to Mane. Mane hits the ball with his left foot into the top right corner of the post. It’s a goal. Another powerful effort by a highly rated Liverpool FC team.
This feeling of being able to cont... | [
{
"code": null,
"e": 333,
"s": 47,
"text": "I passed the ball from Milner to Salah. Salah did a quick dribble, gave the ball to Firmino. Firmino stylishly did a 360 pass to Mane. Mane hits the ball with his left foot into the top right corner of the post. It’s a goal. Another powerful effort by a hi... |
C++ | References | Question 4 - GeeksforGeeks | 28 Jun, 2021
Predict the output of following C++ program.
#include<iostream>using namespace std; int &fun(){ static int x = 10; return x;}int main(){ fun() = 30; cout << fun(); return 0;}
(A) Compiler Error: Function cannot be used as lvalue(B) 10(C) 30Answer: (C)Explanation: When a function returns by ... | [
{
"code": null,
"e": 24326,
"s": 24298,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24371,
"s": 24326,
"text": "Predict the output of following C++ program."
},
{
"code": "#include<iostream>using namespace std; int &fun(){ static int x = 10; return x;}int main... |
Converting a Simple Deep Learning Model from PyTorch to TensorFlow | by Yu Xuan Lee | Towards Data Science | Introduction
TensorFlow and PyTorch are two of the more popular frameworks out there for deep learning. There are people who prefer TensorFlow for support in terms of deployment, and there are those who prefer PyTorch because of the flexibility in model building and training without the difficulties faced in using Tens... | [
{
"code": null,
"e": 185,
"s": 172,
"text": "Introduction"
},
{
"code": null,
"e": 901,
"s": 185,
"text": "TensorFlow and PyTorch are two of the more popular frameworks out there for deep learning. There are people who prefer TensorFlow for support in terms of deployment, and the... |
T-SQL - SELECT Statement | SQL Server SELECT statement is used to fetch the data from a database table which returns data in the form of result table. These result tables are called result-sets.
Following is the basic syntax of SELECT statement −
SELECT column1, column2, columnN FROM table_name;
Where, column1, column2...are the fields of a tab... | [
{
"code": null,
"e": 2228,
"s": 2060,
"text": "SQL Server SELECT statement is used to fetch the data from a database table which returns data in the form of result table. These result tables are called result-sets."
},
{
"code": null,
"e": 2280,
"s": 2228,
"text": "Following is t... |
Powershell - Check Folder Existence | Test-Path cmdlet is used to check existence of a folder.
In this example, we're having a folder test in D:\temp directory
Type the following command in PowerShell ISE Console
Test-Path D:\temp\test
You can see following output in PowerShell console.
Test-Path D:\temp\test
True
In this example, we're not having a folde... | [
{
"code": null,
"e": 2091,
"s": 2034,
"text": "Test-Path cmdlet is used to check existence of a folder."
},
{
"code": null,
"e": 2156,
"s": 2091,
"text": "In this example, we're having a folder test in D:\\temp directory"
},
{
"code": null,
"e": 2209,
"s": 2156,
... |
Java Inner Class (Nested Class) | In Java, it is also possible to nest classes (a class within a class). The purpose
of nested classes is to group classes that belong together, which makes your code more readable and maintainable.
To access the inner class, create an object of the outer class, and then create an object of the inner class:
class OuterC... | [
{
"code": null,
"e": 198,
"s": 0,
"text": "In Java, it is also possible to nest classes (a class within a class). The purpose \nof nested classes is to group classes that belong together, which makes your code more readable and maintainable."
},
{
"code": null,
"e": 308,
"s": 198,
... |
How to Create the most Awesome Development Setup for Data Science using Atom? | by Rahul Agarwal | Towards Data Science | Before I even begin this article, let me just say that I love iPython Notebooks, and Atom is not an alternative to Jupyter in any way. Notebooks provide me an interface where I have to think of “Coding one code block at a time,” as I like to call it, and it helps me to think more clearly while helping me make my code m... | [
{
"code": null,
"e": 380,
"s": 47,
"text": "Before I even begin this article, let me just say that I love iPython Notebooks, and Atom is not an alternative to Jupyter in any way. Notebooks provide me an interface where I have to think of “Coding one code block at a time,” as I like to call it, and i... |
Comprehending the ‘Comprehensions’ in Python | by Parul Pandey | Towards Data Science | “Good code is its own best documentation” — Steve McConnell
In my last article, I explained the concept of Lambda, Map, Filter, and Reduce functions in Python, which are based on the Functional Programming Paradigm. I also touched upon the idea of List Comprehensions, which are considered as a substitute for the lambda... | [
{
"code": null,
"e": 232,
"s": 172,
"text": "“Good code is its own best documentation” — Steve McConnell"
},
{
"code": null,
"e": 599,
"s": 232,
"text": "In my last article, I explained the concept of Lambda, Map, Filter, and Reduce functions in Python, which are based on the Fun... |
Articulation Points (or Cut Vertices) in a Graph - GeeksforGeeks | 19 Jan, 2022
A vertex in an undirected connected graph is an articulation point (or cut vertex) if removing it (and edges through it) disconnects the graph. Articulation points represent vulnerabilities in a connected network – single points whose failure would split the network into 2 or more components. They are usef... | [
{
"code": null,
"e": 26581,
"s": 26553,
"text": "\n19 Jan, 2022"
},
{
"code": null,
"e": 26925,
"s": 26581,
"text": "A vertex in an undirected connected graph is an articulation point (or cut vertex) if removing it (and edges through it) disconnects the graph. Articulation points... |
Count of sub-strings that contain character X at least once - GeeksforGeeks | 07 Jun, 2021
Given a string str and a character X. The task is to find the total number of sub-strings that contain the character X at least once.Examples:
Input: str = “abcd”, X = ‘b’ Output: 6 “ab”, “abc”, “abcd”, “b”, “bc” and “bcd” are the required sub-strings.Input: str = “geeksforgeeks”, X = ‘e’ Output: 66
... | [
{
"code": null,
"e": 26561,
"s": 26533,
"text": "\n07 Jun, 2021"
},
{
"code": null,
"e": 26706,
"s": 26561,
"text": "Given a string str and a character X. The task is to find the total number of sub-strings that contain the character X at least once.Examples: "
},
{
"cod... |
How to Create a Virus that Deletes the Registry File of Windows OS? - GeeksforGeeks | 13 Apr, 2021
The virus that we are going to create in this article can be used to wipe out the Windows registry or simply registry from the database of the Windows system.
The registry or Windows registry is a database that holds information regarding the settings, options, and critical values that software and hardwar... | [
{
"code": null,
"e": 24872,
"s": 24844,
"text": "\n13 Apr, 2021"
},
{
"code": null,
"e": 25031,
"s": 24872,
"text": "The virus that we are going to create in this article can be used to wipe out the Windows registry or simply registry from the database of the Windows system."
}... |
Longest subsequence whose average is less than K - GeeksforGeeks | 31 Jan, 2022
Given an array of N positive integers and Q queries consisting of an integer K, the task is to print the length of the longest subsequence whose average is less than K. Examples:
Input: a[] = {1, 3, 2, 5, 4} Query1: K = 3 Query2: K = 5Output: 4 5 Query1: The subsequence is: {1, 3, 2, 4} or {1, 3, 2, 5} Q... | [
{
"code": null,
"e": 24820,
"s": 24792,
"text": "\n31 Jan, 2022"
},
{
"code": null,
"e": 25001,
"s": 24820,
"text": "Given an array of N positive integers and Q queries consisting of an integer K, the task is to print the length of the longest subsequence whose average is less th... |
How to count the number of lines in a text file using Java? | To count the number of lines in a file
Instantiate the FileInputStream class by passing an object of the required file as parameter to its constructor.
Read the contents of the file to a bytearray using the read() method of FileInputStream class.
Instantiate a String class by passing the byte array obtained, as a param... | [
{
"code": null,
"e": 1101,
"s": 1062,
"text": "To count the number of lines in a file"
},
{
"code": null,
"e": 1214,
"s": 1101,
"text": "Instantiate the FileInputStream class by passing an object of the required file as parameter to its constructor."
},
{
"code": null,
... |
Check whether triangle is valid or not if sides are given in Python | Suppose we have three sides. We have to check whether these three sides are forming a triangle or not.
So, if the input is like sides = [14,20,10], then the output will be True as 20 < (10+14).
To solve this, we will follow these steps −
sort the list sides
if sum of first two sides <= third side, thenreturn False
retu... | [
{
"code": null,
"e": 1165,
"s": 1062,
"text": "Suppose we have three sides. We have to check whether these three sides are forming a triangle or not."
},
{
"code": null,
"e": 1256,
"s": 1165,
"text": "So, if the input is like sides = [14,20,10], then the output will be True as 20... |
What is HTTP ETag? - GeeksforGeeks | 29 Jun, 2020
An entity tag (ETag) is an HTTP header used for Web cache validation and conditional request from browsers to resources. The value of an ETag is an identifier that represents a specific version of the resource. Additionally, ETags help prevents simultaneous updates of a resource from overwriting each other... | [
{
"code": null,
"e": 24306,
"s": 24278,
"text": "\n29 Jun, 2020"
},
{
"code": null,
"e": 24641,
"s": 24306,
"text": "An entity tag (ETag) is an HTTP header used for Web cache validation and conditional request from browsers to resources. The value of an ETag is an identifier that... |
CodeIgniter - Security | XSS means cross-site scripting. CodeIgniter comes with XSS filtering security. This filter will prevent any malicious JavaScript code or any other code that attempts to hijack cookie and do malicious activities. To filter data through the XSS filter, use the xss_clean() method as shown below.
$data = $this->security->x... | [
{
"code": null,
"e": 2613,
"s": 2319,
"text": "XSS means cross-site scripting. CodeIgniter comes with XSS filtering security. This filter will prevent any malicious JavaScript code or any other code that attempts to hijack cookie and do malicious activities. To filter data through the XSS filter, us... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.