title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
ddrescue - Unix, Linux Command | ddrescue - Data recovery tool, save data from a crashed partition.
ddrescue [options] infile outfile [logfile]
GNU ddrescue is a data recovery tool. It copies data from one file or block device (hard disc, cdrom, etc) to another, trying hard to rescue data in case of read errors. The basic operation of ddrescue is full... | [
{
"code": null,
"e": 10644,
"s": 10577,
"text": "ddrescue - Data recovery tool, save data from a crashed partition."
},
{
"code": null,
"e": 10688,
"s": 10644,
"text": "ddrescue [options] infile outfile [logfile]"
},
{
"code": null,
"e": 11218,
"s": 10688,
"te... |
Create multiple regression lines in a single plot using ggplot2 in R. | To create multiple regression lines in a single plot using ggplot2, we can use geom_jitter function along with geom_smooth function. The geom_smooth function will help us to different regression line with different colors and geom_jitter will differentiate the points.
Check out the below Example to understand how it ca... | [
{
"code": null,
"e": 1331,
"s": 1062,
"text": "To create multiple regression lines in a single plot using ggplot2, we can use geom_jitter function along with geom_smooth function. The geom_smooth function will help us to different regression line with different colors and geom_jitter will differenti... |
The Best Weapon Combinations for The Legend of Zelda BOTW | by Vijini Mallawaarachchi | Towards Data Science | Recently, I came across an article titled Which PUBG Weapon Combination Should You Pick? by Meredith Wan that I found very interesting. This article gave me the idea to write about selecting weapon combinations for one of my favourite games, The Legend of Zelda: Breath Of The Wild using Python and Pareto optimisation. ... | [
{
"code": null,
"e": 515,
"s": 172,
"text": "Recently, I came across an article titled Which PUBG Weapon Combination Should You Pick? by Meredith Wan that I found very interesting. This article gave me the idea to write about selecting weapon combinations for one of my favourite games, The Legend of... |
Binary Search In JavaScript - GeeksforGeeks | 09 Feb, 2022
Binary Search is a searching technique which works on the Divide and Conquer approach. It is used to search for any element in a sorted array. Compared with linear, binary search is much faster with a Time Complexity of O(logN), whereas linear search works in O(N) time complexity.In this article, the imple... | [
{
"code": null,
"e": 24690,
"s": 24662,
"text": "\n09 Feb, 2022"
},
{
"code": null,
"e": 25211,
"s": 24690,
"text": "Binary Search is a searching technique which works on the Divide and Conquer approach. It is used to search for any element in a sorted array. Compared with linear... |
Abundant Number in C ? | An abundant Number (also known as excessive number) is a number in the number theory which itself is smaller than the sum of all its proper divisors. For example,12 is an abundant Number : divisors 1,2,3,4,6 , sum =16 >12.
The difference between the sum of divisors and the number is called abundance. For above example ... | [
{
"code": null,
"e": 1285,
"s": 1062,
"text": "An abundant Number (also known as excessive number) is a number in the number theory which itself is smaller than the sum of all its proper divisors. For example,12 is an abundant Number : divisors 1,2,3,4,6 , sum =16 >12."
},
{
"code": null,
... |
V measure: an homogeneous and complete clustering | by Filippo Valle | Towards Data Science | Clustering is a Machine Learning technique that involves the grouping of data points. Given a set of data points, we can use a clustering algorithm to classify each data sample into a specific group (cluster).
Clustering is a method of unsupervised learning and is a common technique for statistical data analysis used i... | [
{
"code": null,
"e": 381,
"s": 171,
"text": "Clustering is a Machine Learning technique that involves the grouping of data points. Given a set of data points, we can use a clustering algorithm to classify each data sample into a specific group (cluster)."
},
{
"code": null,
"e": 767,
... |
get_screenshot_as_file driver method - Selenium Python - GeeksforGeeks | 02 Jul, 2020
Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provide a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout – Navigating links using get method – Selenium Python. Just being able t... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n02 Jul, 2020"
},
{
"code": null,
"e": 25030,
"s": 24292,
"text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provide a simple API to write functional/acceptance tests usin... |
Program to find length of longest consecutive sequence in Python | Suppose we have an unsorted array of numbers, we have to find the length of the longest
sequence of consecutive elements.
So, if the input is like nums = [70, 7, 50, 4, 6, 5], then the output will be 4, as the longest
sequence of consecutive elements is [4, 5, 6, 7]. so we return its length: 4.
To solve this, we will f... | [
{
"code": null,
"e": 1184,
"s": 1062,
"text": "Suppose we have an unsorted array of numbers, we have to find the length of the longest\nsequence of consecutive elements."
},
{
"code": null,
"e": 1358,
"s": 1184,
"text": "So, if the input is like nums = [70, 7, 50, 4, 6, 5], then ... |
Python SQLite - Insert Data | You can add new rows to an existing table of SQLite using the INSERT INTO statement. In this, you need to specify the name of the table, column names, and values (in the same order as column names).
Following is the recommended syntax of the INSERT statement −
INSERT INTO TABLE_NAME (column1, column2, column3,...column... | [
{
"code": null,
"e": 3404,
"s": 3205,
"text": "You can add new rows to an existing table of SQLite using the INSERT INTO statement. In this, you need to specify the name of the table, column names, and values (in the same order as column names)."
},
{
"code": null,
"e": 3466,
"s": 34... |
Automate Stacking In Python. How to Boost Your Performance While... | by Lukas Frei | Towards Data Science | Utilizing stacking (stacked generalizations) is a very hot topic when it comes to pushing your machine learning algorithm to new heights. For instance, most if not all winning Kaggle submissions nowadays make use of some form of stacking or a variation of it. First introduced in the 1992 paper Stacked Generalization by... | [
{
"code": null,
"e": 1179,
"s": 172,
"text": "Utilizing stacking (stacked generalizations) is a very hot topic when it comes to pushing your machine learning algorithm to new heights. For instance, most if not all winning Kaggle submissions nowadays make use of some form of stacking or a variation o... |
Struts 2 - Environment Setup | Our first task is to get a minimal Struts 2 application running. This chapter will guide you on how to prepare a development environment to start your work with Struts 2.
I assume that you already have JDK (5+), Tomcat and Eclipse installed on your machine. If you do not have these components installed, then follow the... | [
{
"code": null,
"e": 2417,
"s": 2246,
"text": "Our first task is to get a minimal Struts 2 application running. This chapter will guide you on how to prepare a development environment to start your work with Struts 2."
},
{
"code": null,
"e": 2595,
"s": 2417,
"text": "I assume th... |
Simple Ways to Read TSV Files in Python - GeeksforGeeks | 23 Nov, 2021
In this article, we will discuss how to read TSV files in Python.
We will be using the same input file in all various implementation methods to see the output. Below is the input file from which we will read data.
We will read data from TSV file using pandas read_csv(). Along with the TSV file, we also pa... | [
{
"code": null,
"e": 25672,
"s": 25644,
"text": "\n23 Nov, 2021"
},
{
"code": null,
"e": 25738,
"s": 25672,
"text": "In this article, we will discuss how to read TSV files in Python."
},
{
"code": null,
"e": 25886,
"s": 25738,
"text": "We will be using the sam... |
Local File Inclusion (LFI) - GeeksforGeeks | 23 Oct, 2019
A File Inclusion Vulnerability is a type of Vulnerability commonly found in PHP based websites and it is used to affect the web applications. This issue generally occurs when an application is trying to get some information from a particular server where the inputs for getting a particular file location ar... | [
{
"code": null,
"e": 24906,
"s": 24878,
"text": "\n23 Oct, 2019"
},
{
"code": null,
"e": 25248,
"s": 24906,
"text": "A File Inclusion Vulnerability is a type of Vulnerability commonly found in PHP based websites and it is used to affect the web applications. This issue generally ... |
Polynomial Regression in R Programming - GeeksforGeeks | 21 Jul, 2021
Polynomial Regression is a form of linear regression in which the relationship between the independent variable x and dependent variable y is modeled as an nth degree polynomial. Polynomial regression fits a nonlinear relationship between the value of x and the corresponding conditional mean of y, denoted ... | [
{
"code": null,
"e": 26273,
"s": 26245,
"text": "\n21 Jul, 2021"
},
{
"code": null,
"e": 26748,
"s": 26273,
"text": "Polynomial Regression is a form of linear regression in which the relationship between the independent variable x and dependent variable y is modeled as an nth deg... |
How to sort a slice of ints in Golang? - GeeksforGeeks | 26 Aug, 2019
In Go language slice is more powerful, flexible, convenient than an array, and is a lightweight data structure. The slice is a variable-length sequence which stores elements of a similar type, you are not allowed to store different type of elements in the same slice.Go language allows you to sort the eleme... | [
{
"code": null,
"e": 26151,
"s": 26123,
"text": "\n26 Aug, 2019"
},
{
"code": null,
"e": 26698,
"s": 26151,
"text": "In Go language slice is more powerful, flexible, convenient than an array, and is a lightweight data structure. The slice is a variable-length sequence which store... |
Underscore.js _.groupBy Function - GeeksforGeeks | 24 Nov, 2021
The Underscore.js is a JavaScript library that provides a lot of useful functions that helps in the programming in a big way like the map, filter, invoke etc even without using any built-in objects.The _.groupBy() function is used to make collection of the elements in the array passed. It works by matching... | [
{
"code": null,
"e": 25738,
"s": 25710,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 26324,
"s": 25738,
"text": "The Underscore.js is a JavaScript library that provides a lot of useful functions that helps in the programming in a big way like the map, filter, invoke etc even ... |
Largest triplet product in a stream - GeeksforGeeks | 05 Nov, 2021
Given a stream of integers represented as arr[]. For each index i from 0 to n-1, print the multiplication of largest, second largest, third largest element of the subarray arr[0...i]. If i < 2 print -1.
Examples:
Input : arr[] = {1, 2, 3, 4, 5}
Output :-1
-1
6
24
60
Exp... | [
{
"code": null,
"e": 25456,
"s": 25428,
"text": "\n05 Nov, 2021"
},
{
"code": null,
"e": 25660,
"s": 25456,
"text": "Given a stream of integers represented as arr[]. For each index i from 0 to n-1, print the multiplication of largest, second largest, third largest element of the ... |
Convert string to DateTime and vice-versa in Python | Python has extensive date and time manipulation capabilities.In this article we'll see in how is string with proper format can we converted to a datetime and the vice versa.
This strptime function from datetime module can do the conversion from string to datetime by taking appropriate format specifiers.
Live Demo
impo... | [
{
"code": null,
"e": 1236,
"s": 1062,
"text": "Python has extensive date and time manipulation capabilities.In this article we'll see in how is string with proper format can we converted to a datetime and the vice versa."
},
{
"code": null,
"e": 1367,
"s": 1236,
"text": "This str... |
Powershell - Copy File | Copy-Item cmdlet is used to copy a file by passing the path of the file to be copied and destination path where the file is to be copied.
In this example, we'll copy a folder D:\Temp\Test Folder\Test File.txt to D:\Temp\Test Folder1
Type the following command in PowerShell ISE Console
Copy-Item 'D:\temp\Test Folder\Tes... | [
{
"code": null,
"e": 2172,
"s": 2034,
"text": "Copy-Item cmdlet is used to copy a file by passing the path of the file to be copied and destination path where the file is to be copied."
},
{
"code": null,
"e": 2267,
"s": 2172,
"text": "In this example, we'll copy a folder D:\\Tem... |
How to convert PHP array to JavaScript or JSON ? - GeeksforGeeks | 30 Sep, 2019
PHP provides a json_encode() function that converts PHP arrays into JavaScript. Technically, it is in JSON format. JSON stands for JavaScript Object Notation.
Statement: If you have a PHP array and you need to convert it into the JavaScript array so there is a function provided by PHP that will easily conv... | [
{
"code": null,
"e": 31015,
"s": 30987,
"text": "\n30 Sep, 2019"
},
{
"code": null,
"e": 31174,
"s": 31015,
"text": "PHP provides a json_encode() function that converts PHP arrays into JavaScript. Technically, it is in JSON format. JSON stands for JavaScript Object Notation."
}... |
How to use simple API using AJAX ? - GeeksforGeeks | 03 Jun, 2020
AJAX (Asynchronous JavaScript and XML) is a set of tools used to make calls to the server to fetch some data. In this article, we will see how to implement a simple API call using AJAX.
Prerequisites: Basic knowledge of AJAX and its function. You can learn all the basics from here.
What are basic building?... | [
{
"code": null,
"e": 25108,
"s": 25080,
"text": "\n03 Jun, 2020"
},
{
"code": null,
"e": 25294,
"s": 25108,
"text": "AJAX (Asynchronous JavaScript and XML) is a set of tools used to make calls to the server to fetch some data. In this article, we will see how to implement a simpl... |
console in JavaScript - GeeksforGeeks | 11 Feb, 2022
Web console
A Web console is a tool which is mainly used to log information associated with a web page like: network requests, JavaScript, security errors, warnings, CSS etc. It enables us to interact with a web page by executing JavaScript expression in the contents of the page.
Console object
In JavaSc... | [
{
"code": null,
"e": 24330,
"s": 24302,
"text": "\n11 Feb, 2022"
},
{
"code": null,
"e": 24342,
"s": 24330,
"text": "Web console"
},
{
"code": null,
"e": 24613,
"s": 24342,
"text": "A Web console is a tool which is mainly used to log information associated wit... |
Python 3 - Tkinter Relief styles | The relief style of a widget refers to certain simulated 3-D effects around the outside of the widget. Here is a screenshot of a row of buttons exhibiting all the possible relief styles −
Here is list of possible constants which can be used for relief attribute −
FLAT
RAISED
SUNKEN
GROOVE
RIDGE
# !/usr/bin/python3
from... | [
{
"code": null,
"e": 2528,
"s": 2340,
"text": "The relief style of a widget refers to certain simulated 3-D effects around the outside of the widget. Here is a screenshot of a row of buttons exhibiting all the possible relief styles −"
},
{
"code": null,
"e": 2604,
"s": 2528,
"te... |
HTML | <input> autofocus Attribute - GeeksforGeeks | 29 Apr, 2019
The HTML <input> autofocus Attribute is used to specify that the input field must get automatically get focus when the page loads. It is a Boolean attribute.
Syntax:
<input autofocus>
Example: This Example that illustrates the use of autofocus attribute in <input> element.
<!DOCTYPE html><html> <head> ... | [
{
"code": null,
"e": 30376,
"s": 30348,
"text": "\n29 Apr, 2019"
},
{
"code": null,
"e": 30534,
"s": 30376,
"text": "The HTML <input> autofocus Attribute is used to specify that the input field must get automatically get focus when the page loads. It is a Boolean attribute."
},... |
Java - toString() Method | The method is used to get a String object representing the value of the Number Object.
If the method takes a primitive data type as an argument, then the String object representing the primitive data type value is returned.
If the method takes two arguments, then a String representation of the first argument in the rad... | [
{
"code": null,
"e": 2464,
"s": 2377,
"text": "The method is used to get a String object representing the value of the Number Object."
},
{
"code": null,
"e": 2601,
"s": 2464,
"text": "If the method takes a primitive data type as an argument, then the String object representing t... |
BFS of graph | Practice | GeeksforGeeks | Given a directed graph. The task is to do Breadth First Traversal of this graph starting from 0.
Note: One can move from node u to node v only if there's an edge from u to v and find the BFS traversal of the graph starting from the 0th vertex, from left to right according to the graph. Also, you should only take nodes ... | [
{
"code": null,
"e": 621,
"s": 238,
"text": "Given a directed graph. The task is to do Breadth First Traversal of this graph starting from 0.\nNote: One can move from node u to node v only if there's an edge from u to v and find the BFS traversal of the graph starting from the 0th vertex, from left ... |
Contained Interval in C++ | Suppose we have a two-dimensional list of intervals where each interval has two values [start, end]. We have to find whether there's an interval which contains another interval.
So, if the input is like [[2,4],[5,11],[5,9],[10,10]], then the output will be true as [5,11] is containing [5,9].
To solve this, we will foll... | [
{
"code": null,
"e": 1240,
"s": 1062,
"text": "Suppose we have a two-dimensional list of intervals where each interval has two values [start, end]. We have to find whether there's an interval which contains another interval."
},
{
"code": null,
"e": 1355,
"s": 1240,
"text": "So, ... |
How to check whether a particular key exist in javascript object or array? | There are different ways to check for existence of an object/key in an array and an object. Let us look at the Object case first.
To look if a key exists in a object, we need to use the in operator.
let obj = {
name: "John",
age: 22
}
console.log('name' in obj);
console.log('address' in obj);
true
false
Note −The... | [
{
"code": null,
"e": 1192,
"s": 1062,
"text": "There are different ways to check for existence of an object/key in an array and an object. Let us look at the Object case first."
},
{
"code": null,
"e": 1261,
"s": 1192,
"text": "To look if a key exists in a object, we need to use ... |
ES6 | Import and Export - GeeksforGeeks | 28 Feb, 2020
The ES6 is a JavaScript standard. With the help of ES6, we can create modules in JavaScript. In a module, there can be classes, functions, variables, and objects as well. To make all these available in another file, we can use export and import. The export and import are the keywords used for exporting and... | [
{
"code": null,
"e": 24361,
"s": 24333,
"text": "\n28 Feb, 2020"
},
{
"code": null,
"e": 24712,
"s": 24361,
"text": "The ES6 is a JavaScript standard. With the help of ES6, we can create modules in JavaScript. In a module, there can be classes, functions, variables, and objects a... |
Packing and Unpacking Arguments in Python | 25 Jan, 2022
We use two operators * (for tuples) and ** (for dictionaries).
Background Consider a situation where we have a function that receives four arguments. We want to make a call to this function and we have a list of size 4 with us that has all arguments for the function. If we simply pass a list to the functi... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n25 Jan, 2022"
},
{
"code": null,
"e": 118,
"s": 54,
"text": "We use two operators * (for tuples) and ** (for dictionaries). "
},
{
"code": null,
"e": 390,
"s": 118,
"text": "Background Consider a situation where we ... |
Mongoose find() Function | 10 Feb, 2021
The find() function is used to find particular data from the MongoDB database. It takes 3 arguments and they are query (also known as a condition), query projection (used for mentioning which fields to include or exclude from the query), and the last argument is the general query options (like limit, skip,... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n10 Feb, 2021"
},
{
"code": null,
"e": 367,
"s": 53,
"text": "The find() function is used to find particular data from the MongoDB database. It takes 3 arguments and they are query (also known as a condition), query projection (used for... |
Java System.nanoTime() vs System.currentTimeMillis | 12 Apr, 2018
Java provides two methods to time operations, System.nanoTime() and System.currentTimeMillis(). But which one should be used in which condition? And which is more efficient?
From the first look it might seem that nanoTime() should be used because it gives more precise value of time (in nano seconds, compar... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n12 Apr, 2018"
},
{
"code": null,
"e": 227,
"s": 53,
"text": "Java provides two methods to time operations, System.nanoTime() and System.currentTimeMillis(). But which one should be used in which condition? And which is more efficient?"... |
Implement Inter Thread Communication with Event( ) Method in Python | 02 Feb, 2021
Here we will start from the basics of what inter-thread communication is? Inter Thread Communication is the process of communicating requirements between one to another thread. In simple words sometimes one thread may be required to communicate to another thread depending on the requirements. This is consi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Feb, 2021"
},
{
"code": null,
"e": 373,
"s": 28,
"text": "Here we will start from the basics of what inter-thread communication is? Inter Thread Communication is the process of communicating requirements between one to another thread... |
Ruby Hook Methods - GeeksforGeeks | 13 Aug, 2021
Ruby Hook Methods are called in reaction to something you do. They are usually used to extend the working of methods at run time. These methods are not defined by default, but a programmer can define them according to imply them on any object or class or module and they will come into picture when certain ... | [
{
"code": null,
"e": 23692,
"s": 23664,
"text": "\n13 Aug, 2021"
},
{
"code": null,
"e": 24014,
"s": 23692,
"text": "Ruby Hook Methods are called in reaction to something you do. They are usually used to extend the working of methods at run time. These methods are not defined by ... |
Augmented Assignment Operators in Python - GeeksforGeeks | 07 Sep, 2021
An assignment operator is an operator that is used to assign some value to a variable. Like normally in Python, we write “a = 5“ to assign value 5 to variable ‘a’. Augmented assignment operators have a special role to play in Python programming. It basically combines the functioning of the arithmetic or bi... | [
{
"code": null,
"e": 24224,
"s": 24196,
"text": "\n07 Sep, 2021"
},
{
"code": null,
"e": 24869,
"s": 24224,
"text": "An assignment operator is an operator that is used to assign some value to a variable. Like normally in Python, we write “a = 5“ to assign value 5 to variable ‘a’.... |
How to find MongoDB documents with a specific string? | To find documents with a specific string, use find() and in that search for a string with regex. Let us create a collection with documents −
> db.demo409.insertOne({"Name":"John Doe"});
{
"acknowledged" : true,
"insertedId" : ObjectId("5e70e4e515dc524f7022767c")
}
> db.demo409.insertOne({"Name":"Chris Brown"});
{... | [
{
"code": null,
"e": 1203,
"s": 1062,
"text": "To find documents with a specific string, use find() and in that search for a string with regex. Let us create a collection with documents −"
},
{
"code": null,
"e": 1731,
"s": 1203,
"text": "> db.demo409.insertOne({\"Name\":\"John D... |
Windows 10 Development - First App | In this chapter, we will be creating our first simple application "Hello world" in Universal Windows Platform (UWP) using XAML and C# on Windows 10. We will demonstrate how a single UWP application created in Visual Studio can be run and executed on any Windows 10 device.
Let us start creating the App by following the ... | [
{
"code": null,
"e": 2557,
"s": 2284,
"text": "In this chapter, we will be creating our first simple application \"Hello world\" in Universal Windows Platform (UWP) using XAML and C# on Windows 10. We will demonstrate how a single UWP application created in Visual Studio can be run and executed on a... |
Express as sum of power of natural numbers | Practice | GeeksforGeeks | Given two numbers n and x, find out the total number of ways n can be expressed as sum of xth power of unique natural numbers.As total number of ways can be very large ,so return the number of ways modulo 109 + 7.
Example 1:
Input: n = 10, x = 2
Output: 1
Explanation: 10 = 12 + 32, Hence total 1 possibility.
Exam... | [
{
"code": null,
"e": 465,
"s": 238,
"text": "Given two numbers n and x, find out the total number of ways n can be expressed as sum of xth power of unique natural numbers.As total number of ways can be very large ,so return the number of ways modulo 109 + 7. \n\nExample 1:"
},
{
"code": null... |
5-Minute Guide to Calling Functions from R Scripts | by Emily A. Halford | Towards Data Science | You’ve likely heard the popular guideline that if you find yourself copying and pasting code more than 3 times, you should write it as a function. While you can write and store these functions at the top of your R Markdown files, this approach can get messy and is counterproductive if you end up copying and pasting the... | [
{
"code": null,
"e": 666,
"s": 172,
"text": "You’ve likely heard the popular guideline that if you find yourself copying and pasting code more than 3 times, you should write it as a function. While you can write and store these functions at the top of your R Markdown files, this approach can get mes... |
Applications of Pointers in C/C++ | We can access array elements by using pointers.
Live Demo
#include <stdio.h>
int main() {
int a[] = { 60, 70, 20, 40 };
printf("%d\n", *(a + 1));
return 0;
}
70
Live Demo
#include <iostream>
using namespace std;
int main() {
int a[] = { 60, 70, 20, 40 };
cout<<*(a + 1);
return 0;
}
70
To dynamically... | [
{
"code": null,
"e": 1110,
"s": 1062,
"text": "We can access array elements by using pointers."
},
{
"code": null,
"e": 1121,
"s": 1110,
"text": " Live Demo"
},
{
"code": null,
"e": 1230,
"s": 1121,
"text": "#include <stdio.h>\nint main() {\n int a[] = { 60,... |
Convert an Iterator to Stream in Java | 11 Dec, 2018
Given an Iterator, the task is to convert it into Stream in Java.
Examples:
Input: Iterator = {1, 2, 3, 4, 5}
Output: {1, 2, 3, 4, 5}
Input: Iterator = {'G', 'e', 'e', 'k', 's'}
Output: {'G', 'e', 'e', 'k', 's'}
Approach:
Get the Iterator.Convert the iterator to Spliterator using Spliterators.spliterator... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 94,
"s": 28,
"text": "Given an Iterator, the task is to convert it into Stream in Java."
},
{
"code": null,
"e": 104,
"s": 94,
"text": "Examples:"
},
{
"code": null,
... |
Haml | HTML Pre-processor | 09 Sep, 2021
As its name suggests the pre-processor is the first stage of the whole compiling process it includes removing the comments, expanding the macros, the inclusion of the headers, etc.
In HTML and CSS when it comes to writing it, It is a bit crucial as we have to do the same job again and again like closing ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Sep, 2021"
},
{
"code": null,
"e": 211,
"s": 28,
"text": "As its name suggests the pre-processor is the first stage of the whole compiling process it includes removing the comments, expanding the macros, the inclusion of the headers,... |
UDP Client Server using connect | C implementation | 17 Apr, 2018
UDP is a connection less protocol. There is no connection is established between client and server. Creating Standard UDP Client/Server is discussed here
Prerequisite : Socket Programming in C/CPP | UDP server-client implementation
In UDP, the client does not form a connection with the server like in TCP a... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Apr, 2018"
},
{
"code": null,
"e": 206,
"s": 52,
"text": "UDP is a connection less protocol. There is no connection is established between client and server. Creating Standard UDP Client/Server is discussed here"
},
{
"code"... |
Python | Add image on a Tkinter button | 25 Apr, 2019
Tkinter is a Python module which is used to create GUI (Graphical User Interface) applications with the help of varieties of widgets and functions. Like any other GUI module it also supports images i.e you can use images in the application to make it more attractive.
Image can be added with the help of Pho... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Apr, 2019"
},
{
"code": null,
"e": 320,
"s": 52,
"text": "Tkinter is a Python module which is used to create GUI (Graphical User Interface) applications with the help of varieties of widgets and functions. Like any other GUI module ... |
Fractal using Spirograph in Python | 17 Nov, 2020
Introduction
Spirograph toy that is used to produce complex patterns using plastic cogs and colored pens. A fractal is a curve, that is developed using a recurring pattern that repeats itself infinitely on a low scale. Fractals are used for modeling structures (such as snowflakes) or for describing partly ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Nov, 2020"
},
{
"code": null,
"e": 41,
"s": 28,
"text": "Introduction"
},
{
"code": null,
"e": 431,
"s": 41,
"text": "Spirograph toy that is used to produce complex patterns using plastic cogs and colored pens. A ... |
Flutter – Stepper Widget | 18 Nov, 2021
In this article, we will learn about the Stepper widget in Flutter. A stepper widget displays progress through a sequence of steps. Stepper is generally used in filling forms online.
For example, remember filling an online form for applying to any university or passport or driving license. We filled the fo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Nov, 2021"
},
{
"code": null,
"e": 211,
"s": 28,
"text": "In this article, we will learn about the Stepper widget in Flutter. A stepper widget displays progress through a sequence of steps. Stepper is generally used in filling forms ... |
Run Length Decoding in Linked List | 21 Jun, 2021
Given an encoded Linked List which is encoded using the Run Length Encoding algorithm. The task is to decode the given linked list and generate the input string.Run Length Encoding: In run length encoding, the input string is encoded by replacing a substring of repeated character in the string by the chara... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jun, 2021"
},
{
"code": null,
"e": 550,
"s": 28,
"text": "Given an encoded Linked List which is encoded using the Run Length Encoding algorithm. The task is to decode the given linked list and generate the input string.Run Length Enc... |
logical_or in C++ | 05 Sep, 2018
logical_or in C++ is a binary function object class which returns the result of the logical “or” operation between its two arguments (as returned by operator ||).
Syntax:
template struct logical_or : binary_function
{
T operator() (const T& a, const T& b) const {return a||b;}
};
Parameters: (T)Type o... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Sep, 2018"
},
{
"code": null,
"e": 191,
"s": 28,
"text": "logical_or in C++ is a binary function object class which returns the result of the logical “or” operation between its two arguments (as returned by operator ||)."
},
{
... |
Python program to solve quadratic equation
| 29 Aug, 2020
Given a quadratic equation the task is solve the equation or find out the roots of the equation. Standard form of quadratic equation is –
ax2 + bx + c
where,
a, b, and c are coefficient and real numbers and also a ≠ 0.
If a is equal to 0 that equation is not valid quadratic equation.
Examples:
Input :a ... | [
{
"code": null,
"e": 58,
"s": 27,
"text": " \n29 Aug, 2020\n"
},
{
"code": null,
"e": 196,
"s": 58,
"text": "Given a quadratic equation the task is solve the equation or find out the roots of the equation. Standard form of quadratic equation is –"
},
{
"code": null,
"... |
Java Program to Check Whether the Character is Vowel or Consonant
| 17 Mar, 2021
For any given character, we need to check if it is a vowel or a consonant. As we know, vowels are ‘a’, ‘e’, ‘i’, ‘o’, ‘u’ and all the other characters (i.e. ‘b’, ‘c’, ‘d’, ‘f’ .....) are consonants.
Examples:
Input : char = 'r'
Output : Consonant
Input : char = 'e'
Output : Vowel
Here, in the below imp... | [
{
"code": null,
"e": 58,
"s": 27,
"text": " \n17 Mar, 2021\n"
},
{
"code": null,
"e": 257,
"s": 58,
"text": "For any given character, we need to check if it is a vowel or a consonant. As we know, vowels are ‘a’, ‘e’, ‘i’, ‘o’, ‘u’ and all the other characters (i.e. ‘b’, ‘c’, ‘d’,... |
Data Visualization using Seaborn. I am back with the seaborn tutorial... | by Mohit Sharma | Towards Data Science | I am back with the seaborn tutorial. Last time we learn about Data Visualization using Matplotlib.
Seaborn is a Python data visualization library based on matplotlib. It provides a high-level interface for drawing attractive and informative statistical graphics.
Seaborn is a statistical plotting library
It has beautifu... | [
{
"code": null,
"e": 270,
"s": 171,
"text": "I am back with the seaborn tutorial. Last time we learn about Data Visualization using Matplotlib."
},
{
"code": null,
"e": 434,
"s": 270,
"text": "Seaborn is a Python data visualization library based on matplotlib. It provides a high-... |
Getting Started with Data Collection Using Twitter API v2 in Less than an Hour | by Laura O’Mahony | Towards Data Science | IntroductionWhat is an API?Twitter APIGetting Access to the Twitter APIMaking a Basic Request with the Twitter APIAltering a Request with the Twitter APIConclusion
Introduction
What is an API?
Twitter API
Getting Access to the Twitter API
Making a Basic Request with the Twitter API
Altering a Request with the Twitter A... | [
{
"code": null,
"e": 336,
"s": 172,
"text": "IntroductionWhat is an API?Twitter APIGetting Access to the Twitter APIMaking a Basic Request with the Twitter APIAltering a Request with the Twitter APIConclusion"
},
{
"code": null,
"e": 349,
"s": 336,
"text": "Introduction"
},
{... |
Collaborative Filtering in Pyspark | by Kieran Tan Kah Wang | Towards Data Science | Have you ever wonder how Spotify is able to put up a list of songs every week in “Discover Weekly” and you ended up adding some of these songs to your playlists because you like them? What about the those shows recommended for you by Netflix because you watched a particular show yesterday? How are these tech giants so ... | [
{
"code": null,
"e": 532,
"s": 171,
"text": "Have you ever wonder how Spotify is able to put up a list of songs every week in “Discover Weekly” and you ended up adding some of these songs to your playlists because you like them? What about the those shows recommended for you by Netflix because you w... |
How to add a list item in HTML? | The HTML <li> tag is used to add a list item is ordered, unordered, directory, and menu lists. The tag also supports the following additional attributes −
You can try to run the following code to add a list item in HTML −
<!DOCTYPE html>
<html>
<head>
<title>HTML li Tag</title>
</head>
<body>
<p>Ra... | [
{
"code": null,
"e": 1217,
"s": 1062,
"text": "The HTML <li> tag is used to add a list item is ordered, unordered, directory, and menu lists. The tag also supports the following additional attributes −"
},
{
"code": null,
"e": 1284,
"s": 1217,
"text": "You can try to run the foll... |
Lodash _.toString() Method - GeeksforGeeks | 06 Sep, 2020
Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc.
The _.toString() method is used to convert the given value to a string. An empty string is returned for null and undefined values. The sign of the value -0 is preserve... | [
{
"code": null,
"e": 24205,
"s": 24177,
"text": "\n06 Sep, 2020"
},
{
"code": null,
"e": 24345,
"s": 24205,
"text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc."
},
{
"code": n... |
Customer Reviews Analysis using NLP — The Netflix Use Case | by Salih Boutadghart | Towards Data Science | In the era of digitalization, most companies have various sources of customer feedback, social media, call logs, mobile apps, to name a few. Therefore, analyzing such feedback to come up with actionable insights, is becoming essential for any business with an online presence.
Some of the challenges businesses face whil... | [
{
"code": null,
"e": 448,
"s": 171,
"text": "In the era of digitalization, most companies have various sources of customer feedback, social media, call logs, mobile apps, to name a few. Therefore, analyzing such feedback to come up with actionable insights, is becoming essential for any business wit... |
Program to find HCF iteratively - GeeksforGeeks | 26 Nov, 2021
HCF (Highest Common Factor) or GCD (Greatest Common Divisor) of two numbers is the largest number that divides both of them.
For example, GCD of 20 and 28 is 4, and GCD of 98 and 56 is 14.
We have discussed the recursive solution in the below post. Recursive program to find GCD or HCF of two numbersBelo... | [
{
"code": null,
"e": 24244,
"s": 24216,
"text": "\n26 Nov, 2021"
},
{
"code": null,
"e": 24371,
"s": 24244,
"text": "HCF (Highest Common Factor) or GCD (Greatest Common Divisor) of two numbers is the largest number that divides both of them. "
},
{
"code": null,
"e":... |
How to detect click event outside Angular component ? - GeeksforGeeks | 05 Nov, 2020
In angular, clicks are detected by different ways. As click is an event, thus inside a component it is detected by simple event binding. A simple click via event binding for detection within the component is given as follows:
@Component({ selector: "geeks", template: `<h1 (click)="clicked()">{{ some_text... | [
{
"code": null,
"e": 24610,
"s": 24582,
"text": "\n05 Nov, 2020"
},
{
"code": null,
"e": 24836,
"s": 24610,
"text": "In angular, clicks are detected by different ways. As click is an event, thus inside a component it is detected by simple event binding. A simple click via event b... |
ASP.NET MVC - Caching | In this chapter, we will be focusing on one of the most common ASP.NET techniques like Caching to improve the performance of the application. Caching means to store something in memory that is being used frequently to provide better performance. We will see how you can dramatically improve the performance of an ASP.NET... | [
{
"code": null,
"e": 2647,
"s": 2269,
"text": "In this chapter, we will be focusing on one of the most common ASP.NET techniques like Caching to improve the performance of the application. Caching means to store something in memory that is being used frequently to provide better performance. We will... |
Python | numpy.array_split() method - GeeksforGeeks | 17 Sep, 2019
With the help of numpy.array_split() method, we can get the splitted array of having different dimensions by using numpy.array_split() method.
Syntax : numpy.array_split()
Return : Return the splitted array of one dimension.
Example #1 :In this example we can see that by using numpy.array_split() method, w... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n17 Sep, 2019"
},
{
"code": null,
"e": 24355,
"s": 24212,
"text": "With the help of numpy.array_split() method, we can get the splitted array of having different dimensions by using numpy.array_split() method."
},
{
"code"... |
Android - Phone Calls | Android provides Built-in applications for phone calls, in some occasions we may need to make a phone call through our application. This could easily be done by using implicit Intent with appropriate actions. Also, we can use PhoneStateListener and TelephonyManager classes, in order to monitor the changes in some telep... | [
{
"code": null,
"e": 3954,
"s": 3607,
"text": "Android provides Built-in applications for phone calls, in some occasions we may need to make a phone call through our application. This could easily be done by using implicit Intent with appropriate actions. Also, we can use PhoneStateListener and Tele... |
A Simple Way to Optimize “Something” in Python | by George Wong | Towards Data Science | Why is optimizing a budget important? It allows us to control ads spending, determine how much to spend and maximize desired outcome (visits, clicks etc). As an example, given a budget of $10,000 and its constraints, we are able to determine what is the optimal budget allocation for each marketing channel such that we ... | [
{
"code": null,
"e": 664,
"s": 171,
"text": "Why is optimizing a budget important? It allows us to control ads spending, determine how much to spend and maximize desired outcome (visits, clicks etc). As an example, given a budget of $10,000 and its constraints, we are able to determine what is the o... |
How to convert array to arraylist in android? | This example demonstrates How to convert array to arraylist 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"?>
<LinearLayo... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "This example demonstrates How to convert array to arraylist in android."
},
{
"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... |
How to highlight a row in a table with Java Swing? | To highlight a row in a table, you can use the addRowSelectionInterval() method. At first create a table −
DefaultTableModel tableModel = new DefaultTableModel();
JTable table = new JTable(tableModel);
Add some columns −
tableModel.addColumn("Language/ Technology");
tableModel.addColumn("Text Tutorial");
tableModel.add... | [
{
"code": null,
"e": 1169,
"s": 1062,
"text": "To highlight a row in a table, you can use the addRowSelectionInterval() method. At first create a table −"
},
{
"code": null,
"e": 1264,
"s": 1169,
"text": "DefaultTableModel tableModel = new DefaultTableModel();\nJTable table = new... |
How to remove the label on the left side in matplotlib.pyplot pie charts? | To remove the label on the left side in a matplotlib pie chart, we can take the following steps −
Create lists of hours, activities, and colors.
Create lists of hours, activities, and colors.
Plot a pie chart using pie() method.
Plot a pie chart using pie() method.
To hide the label on the left side in matplotlib, we c... | [
{
"code": null,
"e": 1160,
"s": 1062,
"text": "To remove the label on the left side in a matplotlib pie chart, we can take the following steps −"
},
{
"code": null,
"e": 1207,
"s": 1160,
"text": "Create lists of hours, activities, and colors."
},
{
"code": null,
"e": ... |
Unix / Linux Shell - The while Loop | The while loop enables you to execute a set of commands repeatedly until some condition occurs. It is usually used when you need to manipulate the value of a variable repeatedly.
while command
do
Statement(s) to be executed if command is true
done
Here the Shell command is evaluated. If the resulting value is true,... | [
{
"code": null,
"e": 2926,
"s": 2747,
"text": "The while loop enables you to execute a set of commands repeatedly until some condition occurs. It is usually used when you need to manipulate the value of a variable repeatedly."
},
{
"code": null,
"e": 2999,
"s": 2926,
"text": "whi... |
Construct Binary Tree from Parent Array | Practice | GeeksforGeeks | Given an array of size N that can be used to represents a tree. The array indexes are values in tree nodes and array values give the parent node of that particular index (or node). The value of the root node index would always be -1 as there is no parent for root. Construct the standard linked representation of Binary ... | [
{
"code": null,
"e": 595,
"s": 238,
"text": "Given an array of size N that can be used to represents a tree. The array indexes are values in tree nodes and array values give the parent node of that particular index (or node). The value of the root node index would always be -1 as there is no parent ... |
Tryit Editor v3.6 - Show Python | #the required first parameter of the 'get' method is the 'url':
x = requests.get('https://w3schools.com/python/demopage.htm')
#print the response text (the content of the requested file): | [
{
"code": null,
"e": 82,
"s": 18,
"text": "#the required first parameter of the 'get' method is the 'url':"
},
{
"code": null,
"e": 144,
"s": 82,
"text": "x = requests.get('https://w3schools.com/python/demopage.htm')"
},
{
"code": null,
"e": 146,
"s": 144,
"te... |
Python - Extract Symmetric Tuples - GeeksforGeeks | 10 Jul, 2020
Sometimes while working with Python tuples, we can have a problem in which we need to extract all the pairs which are symmetric, i.e for any (x, y), we have (y, x) pair present. This kind of problem can have application in domains such as day-day programming and web development. Let’s discuss certain ways ... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 25881,
"s": 25537,
"text": "Sometimes while working with Python tuples, we can have a problem in which we need to extract all the pairs which are symmetric, i.e for any (x, y), we have (y, x)... |
How to Remove the First Entry or Last Entry from the Java TreeMap? - GeeksforGeeks | 15 Nov, 2021
TreeMap is the implementation class of the Map interface. It allows the objects to be sorted according to the keys and sorting can be natural sorting or you can use a comparator. Insertion order is also not preserved in Tree Map.
Syntax:
TreeMap<String,Integer> map = new TreeMap<>();
In the below example w... | [
{
"code": null,
"e": 25225,
"s": 25197,
"text": "\n15 Nov, 2021"
},
{
"code": null,
"e": 25455,
"s": 25225,
"text": "TreeMap is the implementation class of the Map interface. It allows the objects to be sorted according to the keys and sorting can be natural sorting or you can us... |
Process Control Commands in Unix/Linux - GeeksforGeeks | 18 Mar, 2021
Process control commands in Unix are:
bg - put suspended process into background
fg - bring process into foreground
jobs - list processes
bg Command : bg is a process control command that resumes suspended process while keeping them running in the background. User can run a job in the background by adding... | [
{
"code": null,
"e": 25651,
"s": 25623,
"text": "\n18 Mar, 2021"
},
{
"code": null,
"e": 25689,
"s": 25651,
"text": "Process control commands in Unix are:"
},
{
"code": null,
"e": 25790,
"s": 25689,
"text": "bg - put suspended process into background\nfg - bri... |
How to scale Pandas DataFrame columns ? - GeeksforGeeks | 02 Jul, 2021
When a dataset has values of different columns at drastically different scales, it gets tough to analyze the trends and patterns and comparison of the features or columns. So, in cases where all the columns have a significant difference in their scales, are needed to be modified in such a way that all thos... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n02 Jul, 2021"
},
{
"code": null,
"e": 25911,
"s": 25537,
"text": "When a dataset has values of different columns at drastically different scales, it gets tough to analyze the trends and patterns and comparison of the features or ... |
How to create an image slider works with radio button ? - GeeksforGeeks | 18 Jan, 2021
A slider is a series of images that appear in sequence. Now, we will see an image slider working with radio buttons using HTML & CSS in which the image slides up, on clicking the radio button.
Approach:
The property of the radio buttons is only one radio button in a group that can be selected at the same t... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n18 Jan, 2021"
},
{
"code": null,
"e": 26814,
"s": 26621,
"text": "A slider is a series of images that appear in sequence. Now, we will see an image slider working with radio buttons using HTML & CSS in which the image slides up, ... |
Print Lines Starting with String in Linux - GeeksforGeeks | 17 Jun, 2021
Printing lines that contain a particular string at the beginning is quite annoying to manually deal with, so we can make use of bash to design a shell script. The most versatile and powerful tool for searching patterns or lines is by using grep, awk, or sed to find the most efficient solution to the proble... | [
{
"code": null,
"e": 25677,
"s": 25649,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 25987,
"s": 25677,
"text": "Printing lines that contain a particular string at the beginning is quite annoying to manually deal with, so we can make use of bash to design a shell script. The ... |
Introduction to PySpark | Distributed Computing with Apache Spark - GeeksforGeeks | 29 Apr, 2022
Datasets are becoming huge. Infact, data is growing faster than processing speeds. Therefore, algorithms involving large data and high amount of computation are often run on a distributed computing system. A distributed computing system involves nodes (networked computers) that run processes in parallel an... | [
{
"code": null,
"e": 26169,
"s": 26141,
"text": "\n29 Apr, 2022"
},
{
"code": null,
"e": 26507,
"s": 26169,
"text": "Datasets are becoming huge. Infact, data is growing faster than processing speeds. Therefore, algorithms involving large data and high amount of computation are of... |
Background local notifications in Flutter - GeeksforGeeks | 15 Aug, 2021
Sometimes user wants some very important features like the latest news updates, latest articles updates, weather condition alert, complete his/her profile update, future events update and much more in his/ her Android or iOS device without opening App and if you would like to develop this kind of Android a... | [
{
"code": null,
"e": 27183,
"s": 27155,
"text": "\n15 Aug, 2021"
},
{
"code": null,
"e": 27659,
"s": 27183,
"text": "Sometimes user wants some very important features like the latest news updates, latest articles updates, weather condition alert, complete his/her profile update, ... |
Lodash _.minBy() Method - GeeksforGeeks | 02 Sep, 2020
Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc.
The _.minBy() method is used to compute the minimum value from the original array by iterating over each element in the array using the Iteratee function. It is almost... | [
{
"code": null,
"e": 38681,
"s": 38653,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 38821,
"s": 38681,
"text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc."
},
{
"code": n... |
Rearrange array to maximize sum of GCD of array elements with their respective indices - GeeksforGeeks | 25 Jun, 2021
Given an array arr[] consisting of a permutation of first N natural numbers, the task is to find the maximum possible value of ΣGCD(arr[i], i) (1-based indexing) by rearranging the given array elements.
Examples:
Input: arr[] = { 2, 1} Output: 6 Explanation: Rearranging the given array to { 2, 1}. ΣGCD(arr... | [
{
"code": null,
"e": 26619,
"s": 26591,
"text": "\n25 Jun, 2021"
},
{
"code": null,
"e": 26822,
"s": 26619,
"text": "Given an array arr[] consisting of a permutation of first N natural numbers, the task is to find the maximum possible value of ΣGCD(arr[i], i) (1-based indexing) b... |
How to find maximum string length by column in R DataFrame ? - GeeksforGeeks | 30 May, 2021
In this article, we are going to see how to find maximum string length by column in R Programming Language.
To find the maximum string length by column in the given dataframe, first, nchar() function is called to get the length of all the string present in the particular column of the dataframe, and then ... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 26596,
"s": 26487,
"text": "In this article, we are going to see how to find maximum string length by column in R Programming Language. "
},
{
"code": null,
"e": 27044,
"s": 2... |
Matplotlib - Button Widget - GeeksforGeeks | 30 Aug, 2021
In Matplotlib a button is one of the important widgets by which we can perform various operations. They are mostly used for making a good functional graph having different properties. There are three types of buttons
Button
Radio Buttons
Check Buttons
In this article, we will learn how to use different but... | [
{
"code": null,
"e": 25561,
"s": 25533,
"text": "\n30 Aug, 2021"
},
{
"code": null,
"e": 25778,
"s": 25561,
"text": "In Matplotlib a button is one of the important widgets by which we can perform various operations. They are mostly used for making a good functional graph having d... |
GATE | GATE-CS-2017 (Set 2) | Question 30 - GeeksforGeeks | 27 Sep, 2017
A Circular queue has been implemented using singly linked list where each node consists of a value and a pointer to next node. We maintain exactly two pointers FRONT and REAR pointing to the front node and rear node of queue. Which of the following statements is/are correct for circular queue so that inser... | [
{
"code": null,
"e": 25785,
"s": 25757,
"text": "\n27 Sep, 2017"
},
{
"code": null,
"e": 26166,
"s": 25785,
"text": "A Circular queue has been implemented using singly linked list where each node consists of a value and a pointer to next node. We maintain exactly two pointers FRO... |
strings.FieldsFunc() Function in Golang With Examples - GeeksforGeeks | 19 Apr, 2020
strings.FieldsFunc() Function in Golang is used to splits the given string str at each run of Unicode code points c satisfying f(c) and returns an array of slices of str.
Syntax:
func FieldsFunc(str string, f func(rune) bool) []string
Here, str is the given string, the rune is a built-in type meant to cont... | [
{
"code": null,
"e": 25717,
"s": 25689,
"text": "\n19 Apr, 2020"
},
{
"code": null,
"e": 25888,
"s": 25717,
"text": "strings.FieldsFunc() Function in Golang is used to splits the given string str at each run of Unicode code points c satisfying f(c) and returns an array of slices ... |
Reversing the vowels | Practice | GeeksforGeeks | Given a string consisting of lowercase english alphabets, reverse only the vowels present in it and print the resulting string.
Example 1:
Input:
S = "geeksforgeeks"
Output: geeksforgeeks
Explanation: The vowels are: e, e, o, e, e
Reverse of these is also e, e, o, e, e.
Example 2:
Input:
S = "practice"
Output: prect... | [
{
"code": null,
"e": 366,
"s": 238,
"text": "Given a string consisting of lowercase english alphabets, reverse only the vowels present in it and print the resulting string."
},
{
"code": null,
"e": 377,
"s": 366,
"text": "Example 1:"
},
{
"code": null,
"e": 510,
"... |
SAP HANA Admin - Key Commands | hdbsql -n localhost -i 1 -u username -p Password \s
This command will display the details of HANA database such as the host name, database, user, Kernel version, SQLDBC version, etc.
hdbsql -n localhost -i 1 -u username -p Password
"SELECT CNO,TITLE,FIRSTNAME,NAME,ZIP FROM Database_Name"
The above command displays... | [
{
"code": null,
"e": 2378,
"s": 2324,
"text": "hdbsql -n localhost -i 1 -u username -p Password \\s \n"
},
{
"code": null,
"e": 2509,
"s": 2378,
"text": "This command will display the details of HANA database such as the host name, database, user, Kernel version, SQLDBC version, ... |
Machine Learning — Text Classification, Language Modelling using fast.ai | by Javaid Nabi | Towards Data Science | Transfer learning is a technique where instead of training a model from scratch, we reuse a pre-trained model and then fine-tune it for another related task. It has been very successful in computer vision applications. In natural language processing (NLP) transfer learning was mostly limited to the use of pre-trained w... | [
{
"code": null,
"e": 835,
"s": 171,
"text": "Transfer learning is a technique where instead of training a model from scratch, we reuse a pre-trained model and then fine-tune it for another related task. It has been very successful in computer vision applications. In natural language processing (NLP)... |
Python Data Persistence - SQLAlchemy | Any relational database holds data in tables. The table structure defines data type of attributes which are basically of primary data types only which are mapped to corresponding built-in data types of Python. However, Python's user-defined objects can't be persistently stored and retrieved to/from SQL tables.
This is ... | [
{
"code": null,
"e": 2667,
"s": 2355,
"text": "Any relational database holds data in tables. The table structure defines data type of attributes which are basically of primary data types only which are mapped to corresponding built-in data types of Python. However, Python's user-defined objects can'... |
Probably the Best Practice of Object-Oriented Python — Attr | by Christopher Tao | Towards Data Science | It is known that Python is very flexible that can be written in functional, procedural and object-oriented. Honestly, I rarely write classes in Python unless I have to, just because most of the time I don’t want to over-engineered the problems. For example, it probably does not make too much sense to use object-oriente... | [
{
"code": null,
"e": 438,
"s": 47,
"text": "It is known that Python is very flexible that can be written in functional, procedural and object-oriented. Honestly, I rarely write classes in Python unless I have to, just because most of the time I don’t want to over-engineered the problems. For example... |
What is the significant difference between MySQL TRUNCATE and DROP command? | The most significant difference between MySQL TRUNCATE and DROP command is that TRUNCATE command will not destroy table’s structure but in contrast DROP command will destroy table’s structure too.
mysql> Create table testing(id int PRIMARY KEY NOT NULL AUTO_INCREMENT,Name Varchar(20));
Query OK, 0 rows affected (0.24 s... | [
{
"code": null,
"e": 1259,
"s": 1062,
"text": "The most significant difference between MySQL TRUNCATE and DROP command is that TRUNCATE command will not destroy table’s structure but in contrast DROP command will destroy table’s structure too."
},
{
"code": null,
"e": 1689,
"s": 1259... |
Autorun a Python script on windows startup? | Appending a Python script to windows start-up basically indicates the python script will run as the windows boots up. This can be accomplished by two step processes -
Step #1: Appending or Adding script to windows Startup folder
After booting up of the windows, it executes (equivalent to double-clicking) all the applic... | [
{
"code": null,
"e": 1229,
"s": 1062,
"text": "Appending a Python script to windows start-up basically indicates the python script will run as the windows boots up. This can be accomplished by two step processes -"
},
{
"code": null,
"e": 1291,
"s": 1229,
"text": "Step #1: Append... |
Kotlin Data Types | In Kotlin, the type of a variable is decided by its value:
val myNum = 5 // Int
val myDoubleNum = 5.99 // Double
val myLetter = 'D' // Char
val myBoolean = true // Boolean
val myText = "Hello" // String
However, you learned from the previous chapter that it is possible to specify the typ... | [
{
"code": null,
"e": 59,
"s": 0,
"text": "In Kotlin, the type of a variable is decided by its value:"
},
{
"code": null,
"e": 235,
"s": 59,
"text": "val myNum = 5 // Int\nval myDoubleNum = 5.99 // Double\nval myLetter = 'D' // Char\nval myBoolean = true ... |
Add Count and Percentage Labels on Top of Histogram Bars in R - GeeksforGeeks | 30 Jun, 2021
A histogram denotes the frequencies or contingency of values of the specified variable segregated into ranges. It groups the values into continuous ranges. Each bar of the histogram is used to denote the height, that is the number of values present in that specific range.
The hist() method in base R is use... | [
{
"code": null,
"e": 24851,
"s": 24823,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 25124,
"s": 24851,
"text": "A histogram denotes the frequencies or contingency of values of the specified variable segregated into ranges. It groups the values into continuous ranges. Each ba... |
Python - Tkinter place() Method | This geometry manager organizes widgets by placing them in a specific position in the parent widget.
widget.place( place_options )
Here is the list of possible options −
anchor − The exact spot of widget other options refer to: may be N, E, S, W, NE, NW, SE, or SW, compass directions indicating the corners and sides o... | [
{
"code": null,
"e": 2345,
"s": 2244,
"text": "This geometry manager organizes widgets by placing them in a specific position in the parent widget."
},
{
"code": null,
"e": 2376,
"s": 2345,
"text": "widget.place( place_options )\n"
},
{
"code": null,
"e": 2415,
"s... |
Predicting the Maliciousness of URLs | by Ruth Eneyi Ikwu | Towards Data Science | In this article, we walk through developing a simple feature set representation for identifying malicious URLs. We will create feature vectors for URLs and use these to develop a classification model for identifying malicious URLs. To evaluate how good the features are in separating malicious URLs from benign URLs, we ... | [
{
"code": null,
"e": 587,
"s": 171,
"text": "In this article, we walk through developing a simple feature set representation for identifying malicious URLs. We will create feature vectors for URLs and use these to develop a classification model for identifying malicious URLs. To evaluate how good th... |
Text Data Augmentation. A brief introduction to TextAttack and... | by Chetan Ambi | Towards Data Science | Data Augmentation is the process that enables us to increase the size of the training data without actually collecting the data. But why do we need more data? The answer is simple — the more data we have, the better the performance of the model.
Image data augmentation steps such as flipping, cropping, rotation, blurri... | [
{
"code": null,
"e": 418,
"s": 172,
"text": "Data Augmentation is the process that enables us to increase the size of the training data without actually collecting the data. But why do we need more data? The answer is simple — the more data we have, the better the performance of the model."
},
{... |
Tryit Editor v3.7 | HTML Form elements
Tryit: HTML datalist element | [
{
"code": null,
"e": 29,
"s": 10,
"text": "HTML Form elements"
}
] |
HAS-A relationship in Java | These relationships are mainly based on the usage. This determines whether a certain class HAS-A certain thing. This relationship helps to reduce duplication of code as well as bugs.
Let's look into an example −
public class Vehicle{}
public class Speed{}
public class Van extends Vehicle {
private Speed sp;
}
This s... | [
{
"code": null,
"e": 1245,
"s": 1062,
"text": "These relationships are mainly based on the usage. This determines whether a certain class HAS-A certain thing. This relationship helps to reduce duplication of code as well as bugs."
},
{
"code": null,
"e": 1274,
"s": 1245,
"text": ... |
Python - Convert TSV to CSV file - GeeksforGeeks | 05 Nov, 2021
In this article, we will see how to Convert TSV Files to CSV using Python.
TSV file can be converted into CSV file by reading one line of data at a time from TSV and replacing tab with comma using re library and writing into CSV file. We first open the TSV file from which we read data and then open the C... | [
{
"code": null,
"e": 23973,
"s": 23942,
"text": " \n05 Nov, 2021\n"
},
{
"code": null,
"e": 24049,
"s": 23973,
"text": "In this article, we will see how to Convert TSV Files to CSV using Python. "
},
{
"code": null,
"e": 24434,
"s": 24049,
"text": "TSV file ca... |
Check if a large number is divisible by 2, 3 and 5 or not - GeeksforGeeks | 21 May, 2021
Given a number, the task is to check if a number is divisible by 2, 3, and 5 or not. The input number may be large and it may not be possible to store even if we use long long int, so the number is taken as a string.Examples:
Input : str = "725"
Output : NO
Input : str = "263730746028908374890"
Output ... | [
{
"code": null,
"e": 26709,
"s": 26681,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 26937,
"s": 26709,
"text": "Given a number, the task is to check if a number is divisible by 2, 3, and 5 or not. The input number may be large and it may not be possible to store even if we u... |
Introduction to Keyloggers - GeeksforGeeks | 20 May, 2020
Key loggers also known as keystroke loggers, may be defined as the recording of the key pressed on a system and saved it to a file, and the that file is accessed by the person using this malware. Key logger can be software or can be hardware.
Working:Mainly key-loggers are used to steal password or confide... | [
{
"code": null,
"e": 25780,
"s": 25752,
"text": "\n20 May, 2020"
},
{
"code": null,
"e": 26023,
"s": 25780,
"text": "Key loggers also known as keystroke loggers, may be defined as the recording of the key pressed on a system and saved it to a file, and the that file is accessed b... |
Python | Mean Squared Error - GeeksforGeeks | 30 Jun, 2019
The Mean Squared Error (MSE) or Mean Squared Deviation (MSD) of an estimator measures the average of error squares i.e. the average squared difference between the estimated values and true value. It is a risk function, corresponding to the expected value of the squared error loss. It is always non – negati... | [
{
"code": null,
"e": 25815,
"s": 25787,
"text": "\n30 Jun, 2019"
},
{
"code": null,
"e": 26294,
"s": 25815,
"text": "The Mean Squared Error (MSE) or Mean Squared Deviation (MSD) of an estimator measures the average of error squares i.e. the average squared difference between the ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.