title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Convert a Set to Stream in Java | 11 Dec, 2018
Set interface extends Collection interface and Collection has stream() method that returns a sequential stream of the collection.
Below given are some examples to understand the implementation in a better way.
Example 1 : Converting Integer HashSet to Stream of Integers.
// Java code for converting // Set ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 158,
"s": 28,
"text": "Set interface extends Collection interface and Collection has stream() method that returns a sequential stream of the collection."
},
{
"code": null,
"e": 238,
... |
Node.js querystring.stringify() Method | 08 Oct, 2021
The querystring.stringify() method is used to produce an URL query string from the given object that contains the key-value pairs. The method iterates through the object’s own properties to generate the query string.
It can serialize a single or an array of strings, numbers, and booleans. Any other types o... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 245,
"s": 28,
"text": "The querystring.stringify() method is used to produce an URL query string from the given object that contains the key-value pairs. The method iterates through the object’s own... |
LR Parser | 31 Mar, 2021
In this article, we will discuss LR parser, and it’s overview and then will discuss the algorithm. Also, we will discuss the parsing table and LR parser working diagram. Let’s discuss it one by one.
LR parser :LR parser is a bottom-up parser for context-free grammar that is very generally used by computer ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n31 Mar, 2021"
},
{
"code": null,
"e": 251,
"s": 52,
"text": "In this article, we will discuss LR parser, and it’s overview and then will discuss the algorithm. Also, we will discuss the parsing table and LR parser working diagram. Let’... |
Full screen OpenCV / GtK application in C++ running on Raspberry PI | 15 Dec, 2021
C++, OpenCV and Gtk are a nice triplet to build applications that run on a Raspberry PI, taking images from the camera, process them, display them and have an unlimited user interface. In this article, I will show you a naive path to display camera captures to a full-screen window. In a second article, I w... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 532,
"s": 28,
"text": "C++, OpenCV and Gtk are a nice triplet to build applications that run on a Raspberry PI, taking images from the camera, process them, display them and have an unlimited user i... |
Python | Pandas series.str.get() | 20 Nov, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas str.get() method is used to get element at the passed position. This method works for ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Nov, 2019"
},
{
"code": null,
"e": 266,
"s": 52,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes im... |
Word Wrap | Practice | GeeksforGeeks | Given an array nums[] of size n, where nums[i] denotes the number of characters in one word. Let K be the limit on the number of characters that can be put in one line (line width). Put line breaks in the given sequence such that the lines are printed neatly.
Assume that the length of each word is smaller than the line... | [
{
"code": null,
"e": 746,
"s": 238,
"text": "Given an array nums[] of size n, where nums[i] denotes the number of characters in one word. Let K be the limit on the number of characters that can be put in one line (line width). Put line breaks in the given sequence such that the lines are printed nea... |
HTML DOM createObjectURL() method | 14 Jul, 2020
The createObjectURL() method creates a DOMString containing a URL representing the object given in the parameter of the method. The new object URL represents the specified File object or Blob object.
Note: The URL lifetime is tied to the document in which it was created.
Syntax:
const url = URL.createObjec... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Jul, 2020"
},
{
"code": null,
"e": 254,
"s": 54,
"text": "The createObjectURL() method creates a DOMString containing a URL representing the object given in the parameter of the method. The new object URL represents the specified Fi... |
How to convert a float number to the whole number in JavaScript? | 15 Apr, 2019
There are various methods to convert float number to the whole number in JavaScript.
Math.floor (floating argument): Round off the number passed as parameter to its nearest integer in Downward direction.Syntax:Math.floor(value)<script> //float value is 4.59; var x = 4.59; var z = Math.floor(x); docu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Apr, 2019"
},
{
"code": null,
"e": 113,
"s": 28,
"text": "There are various methods to convert float number to the whole number in JavaScript."
},
{
"code": null,
"e": 3215,
"s": 113,
"text": "Math.floor (floating... |
Maximum GCD of all subarrays of length at least 2 - GeeksforGeeks | 21 Nov, 2021
Given an array arr[] of N numbers. The task is to find the maximum GCD of all subarrays of size greater than 1. Examples:
Input: arr[] = { 3, 18, 9, 9, 5, 15, 8, 7, 6, 9 } Output: 9 Explanation: GCD of the subarray {18, 9, 9} is maximum which is 9.Input: arr[] = { 4, 8, 12, 16, 20, 24 } Output: 4 Explana... | [
{
"code": null,
"e": 24830,
"s": 24802,
"text": "\n21 Nov, 2021"
},
{
"code": null,
"e": 24954,
"s": 24830,
"text": "Given an array arr[] of N numbers. The task is to find the maximum GCD of all subarrays of size greater than 1. Examples: "
},
{
"code": null,
"e": 25... |
Checking if a key exists in HTML5 Local Storage | The getitem(key) takes value for one parameter and returns the value associated with the key. The given key is present in the list associated with the object.
if(localStorage.getItem("user")===null) {
//...
}
But if the key is not present in the list then it passes null value by using the below-given code
You can al... | [
{
"code": null,
"e": 1221,
"s": 1062,
"text": "The getitem(key) takes value for one parameter and returns the value associated with the key. The given key is present in the list associated with the object."
},
{
"code": null,
"e": 1274,
"s": 1221,
"text": "if(localStorage.getItem... |
How to Map Ports in Docker? - GeeksforGeeks | 22 Jun, 2021
In docker, all the application in the container runs on particular ports when you run a container. If you want to access the particular application with the help of port number you need to map the port number of the container with the port number of the docker host.
In the implementation, we are going to d... | [
{
"code": null,
"e": 25753,
"s": 25725,
"text": "\n22 Jun, 2021"
},
{
"code": null,
"e": 26020,
"s": 25753,
"text": "In docker, all the application in the container runs on particular ports when you run a container. If you want to access the particular application with the help o... |
C program to print a string without any quote (single or double) in the program - GeeksforGeeks | 31 Jan, 2022
Print a string without using quotes anywhere in the program using C or C++. Note : should not read input from the console.
The idea is to use macro processor in C (Refer point 6 of this article). A token passed to macro can be converted to a string literal by using # before it.
C
// C program to print ... | [
{
"code": null,
"e": 24496,
"s": 24468,
"text": "\n31 Jan, 2022"
},
{
"code": null,
"e": 24619,
"s": 24496,
"text": "Print a string without using quotes anywhere in the program using C or C++. Note : should not read input from the console."
},
{
"code": null,
"e": 247... |
How to view array of a structure in JavaScript ? - GeeksforGeeks | 10 Oct, 2021
The Javascript arrays are heterogeneous. The structure of the array is the same which is enclosed between two square brackets [ ], and string should be enclosed between either “double quotes” or ‘single quotes’. You can get the structure of by using JSON.stringify() or not, here you will see the use of JSO... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n10 Oct, 2021"
},
{
"code": null,
"e": 26921,
"s": 26545,
"text": "The Javascript arrays are heterogeneous. The structure of the array is the same which is enclosed between two square brackets [ ], and string should be enclosed be... |
Probability of Knight | Practice | GeeksforGeeks | Given an NxN chessboard and a Knight at position (x, y). The Knight has to take exactly K steps, where at each step it chooses any of the 8 directions uniformly at random. Find the probability that the Knight remains in the chessboard after taking K steps, with the condition that it cant enter the board again once it l... | [
{
"code": null,
"e": 570,
"s": 238,
"text": "Given an NxN chessboard and a Knight at position (x, y). The Knight has to take exactly K steps, where at each step it chooses any of the 8 directions uniformly at random. Find the probability that the Knight remains in the chessboard after taking K steps... |
Android - Application Components | Application components are the essential building blocks of an Android application. These components are loosely coupled by the application manifest file AndroidManifest.xml that describes each component of the application and how they interact.
There are following four main components that can be used within an Andro... | [
{
"code": null,
"e": 3853,
"s": 3607,
"text": "Application components are the essential building blocks of an Android application. These components are loosely coupled by the application manifest file AndroidManifest.xml that describes each component of the application and how they interact."
},
... |
Count words in a given string in C++ | We are given with a sentence or string containing words that can contain spaces, new line characters and tab characters in between. The task is to calculate the total number of words in a string and print the result.
Input − string str = “welcome to\n tutorials point\t”
Output − Count of words in a string are − 4
Expla... | [
{
"code": null,
"e": 1279,
"s": 1062,
"text": "We are given with a sentence or string containing words that can contain spaces, new line characters and tab characters in between. The task is to calculate the total number of words in a string and print the result."
},
{
"code": null,
"e":... |
StringWriter vs StringReader in C#? | StringReader and StringWriter derive from TextReader and TextWriter
StringWriter is used for writing into a string buffer. It implements a TextWriter for writing information to a string.
For StringWriter −
StringWriter sWriter = new StringWriter();
while(true) {
myChar = strReader.Read();
if(myChar == -1) break;
... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "StringReader and StringWriter derive from TextReader and TextWriter"
},
{
"code": null,
"e": 1249,
"s": 1130,
"text": "StringWriter is used for writing into a string buffer. It implements a TextWriter for writing information to a str... |
Hands-on Web Scraping: Building your Twitter dataset with python and scrapy | by Amit Upreti | Towards Data Science | I get it — You are tired of searching for datasets online for your machine learning project or maybe for analyzing a popular Twitter trend.
Today we will learn how to generate your own custom dataset from Twitter by using hashtag search. According to internetlivestats.com, every second, on average, around 6,000 tweets ... | [
{
"code": null,
"e": 312,
"s": 172,
"text": "I get it — You are tired of searching for datasets online for your machine learning project or maybe for analyzing a popular Twitter trend."
},
{
"code": null,
"e": 747,
"s": 312,
"text": "Today we will learn how to generate your own c... |
How to insert image in database using PHP | Theory of Computation
In this article, you will learn how to insert an image in the database using PHP. In some applications, there may be a requirement to develop for image upload. Database is preferred best to store data and the file system is the best place to store files. For storing an image in a database, we can ... | [
{
"code": null,
"e": 112,
"s": 90,
"text": "Theory of Computation"
},
{
"code": null,
"e": 592,
"s": 112,
"text": "In this article, you will learn how to insert an image in the database using PHP. In some applications, there may be a requirement to develop for image upload. Datab... |
Program to print the diamond shape - GeeksforGeeks | 08 Apr, 2021
Given a number n, write a program to print a diamond shape with 2n rows.Examples :
C++
C
Java
Python3
C#
PHP
Javascript
// C++ program to print diamond shape// with 2n rows#include <bits/stdc++.h>using namespace std; // Prints diamond pattern with 2n rowsvoid printDiamond(int n){ int space = n - 1... | [
{
"code": null,
"e": 24171,
"s": 24143,
"text": "\n08 Apr, 2021"
},
{
"code": null,
"e": 24256,
"s": 24171,
"text": "Given a number n, write a program to print a diamond shape with 2n rows.Examples : "
},
{
"code": null,
"e": 24264,
"s": 24260,
"text": "C++"
... |
Python Program for Linear Search | In this article, we will learn about the Linear Search and its implementation in Python 3.x. Or earlier.
Start from the leftmost element of given arr[] and one by one compare element x with each element of arr[]
If x matches with any of the element, return the index value.
If x doesn’t match with any of elements in arr... | [
{
"code": null,
"e": 1167,
"s": 1062,
"text": "In this article, we will learn about the Linear Search and its implementation in Python 3.x. Or earlier."
},
{
"code": null,
"e": 1419,
"s": 1167,
"text": "Start from the leftmost element of given arr[] and one by one compare element... |
Check if a String is empty ("") or null in Java | To check if a string is null or empty in Java, use the == operator.
Let’s say we have the following strings.
String myStr1 = "Jack Sparrow";
String myStr2 = "";
Let us check both the strings now whether they are null or empty. Result will be a boolean.
res = (myStr1 == null || myStr1.length() == 0);
res = (myStr2 == nu... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "To check if a string is null or empty in Java, use the == operator."
},
{
"code": null,
"e": 1171,
"s": 1130,
"text": "Let’s say we have the following strings."
},
{
"code": null,
"e": 1223,
"s": 1171,
"text": "St... |
How to add multiple font files for the same font ? - GeeksforGeeks | 10 Sep, 2020
@font-faceIn CSS, it is a rule that specifies a custom font. This allows us to expand our scope beyond the web-safe fonts.In this rule, @font-face must be first defined and then webpage elements can be made to refer to it as required.
Objective:To define multiple font files under the same font name.Framing... | [
{
"code": null,
"e": 25296,
"s": 25268,
"text": "\n10 Sep, 2020"
},
{
"code": null,
"e": 25531,
"s": 25296,
"text": "@font-faceIn CSS, it is a rule that specifies a custom font. This allows us to expand our scope beyond the web-safe fonts.In this rule, @font-face must be first de... |
Boss Fight in Python | Suppose we have a binary list called fighters and another list of binary lists called bosses. In fighters list the 1 is representing a fighter. Similarly, in bosses list 1 representing a boss. That fighters can beat a boss’s row if it contains more fighters than bosses. We have to return a new bosses matrix with defeat... | [
{
"code": null,
"e": 1404,
"s": 1062,
"text": "Suppose we have a binary list called fighters and another list of binary lists called bosses. In fighters list the 1 is representing a fighter. Similarly, in bosses list 1 representing a boss. That fighters can beat a boss’s row if it contains more figh... |
Beginner’s guide to deploying H2o models as APIs using FLASK | by Dr. Varshita Sher | Towards Data Science | As a data scientist, most of our time is spent on data preprocessing (or data wrangling), model training, hyperparameter tuning, model validation, etc. However, the number of hats donned by data scientists is ever-increasing, and thus, many industries have now started looking for people who can turn their ML models int... | [
{
"code": null,
"e": 502,
"s": 172,
"text": "As a data scientist, most of our time is spent on data preprocessing (or data wrangling), model training, hyperparameter tuning, model validation, etc. However, the number of hats donned by data scientists is ever-increasing, and thus, many industries hav... |
How to Add a Column to a MySQL Table in Python? - GeeksforGeeks | 02 Dec, 2020
Prerequisite: Python: MySQL Create Table
Python allows the integration of a wide range of database servers with applications. A database interface is required to access a database from Python. MySQL Connector-Python module is an API in python for communicating with a MySQL database.
With the ALTER statem... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n02 Dec, 2020"
},
{
"code": null,
"e": 24333,
"s": 24292,
"text": "Prerequisite: Python: MySQL Create Table"
},
{
"code": null,
"e": 24578,
"s": 24333,
"text": "Python allows the integration of a wide range of ... |
Immutable annotation in Dart Programming | We know that const keyword provides immutability in objects. But what about the cases, where we want the entire class to be immutable in nature.
In such cases, we make use of the immutable annotation that is present inside the meta package of dart library.
import 'pacakge:meta/meta.dart';
@immutable
class User {
St... | [
{
"code": null,
"e": 1207,
"s": 1062,
"text": "We know that const keyword provides immutability in objects. But what about the cases, where we want the entire class to be immutable in nature."
},
{
"code": null,
"e": 1319,
"s": 1207,
"text": "In such cases, we make use of the imm... |
How to Create a Beautify Venn Diagrams in Python | by Di(Candice) Han | Towards Data Science | Venn diagram is the most common diagram in scientific research articles and can be used to represent the relationship between multiple data sets. From Venn diagram, you can easily detect the commonalities and differences among those datasets. This tutorial will show you three different ways to create Venn diagrams in P... | [
{
"code": null,
"e": 408,
"s": 46,
"text": "Venn diagram is the most common diagram in scientific research articles and can be used to represent the relationship between multiple data sets. From Venn diagram, you can easily detect the commonalities and differences among those datasets. This tutorial... |
How to define alternate names to a field using Jackson in Java? | The @JsonAlias annotation can define one or more alternate names for the attributes accepted during the deserialization, setting the JSON data to a Java object. But when serializing, i.e. getting JSON from a Java object, only the actual logical property name is used instead of the alias.
@Target(value={ANNOTATION_TYPE,... | [
{
"code": null,
"e": 1351,
"s": 1062,
"text": "The @JsonAlias annotation can define one or more alternate names for the attributes accepted during the deserialization, setting the JSON data to a Java object. But when serializing, i.e. getting JSON from a Java object, only the actual logical property... |
Android - ImageButton Control | An ImageButton is an AbsoluteLayout which enables you to specify the exact location of its children. This shows a button with an image (instead of text) that can be pressed or clicked by the user.
Following are the important attributes related to ImageButton control. You can check Android official documentation for com... | [
{
"code": null,
"e": 3804,
"s": 3607,
"text": "An ImageButton is an AbsoluteLayout which enables you to specify the exact location of its children. This shows a button with an image (instead of text) that can be pressed or clicked by the user."
},
{
"code": null,
"e": 4031,
"s": 3804... |
Get all text of the page using Selenium in Python - GeeksforGeeks | 25 Feb, 2021
As we know Selenium is an automation tool through which we can automate the browsers by writing some lines of code. It is compatible with all browsers, Operating systems and also its program can be written in any programming language such as Python, Java, and many more.
Selenium provides a convenient API t... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n25 Feb, 2021"
},
{
"code": null,
"e": 24172,
"s": 23901,
"text": "As we know Selenium is an automation tool through which we can automate the browsers by writing some lines of code. It is compatible with all browsers, Operating s... |
Cordova - Dialogs | The Cordova Dialogs plugin will call the platform native dialog UI element.
Type the following command in the command prompt window to install this plugin.
C:\Users\username\Desktop\CordovaProject>cordova plugin add cordova-plugin-dialogs
Let us now open index.html and add four buttons, one for every type of dialog.
<... | [
{
"code": null,
"e": 2256,
"s": 2180,
"text": "The Cordova Dialogs plugin will call the platform native dialog UI element."
},
{
"code": null,
"e": 2336,
"s": 2256,
"text": "Type the following command in the command prompt window to install this plugin."
},
{
"code": null... |
ptrace() - Unix, Linux System Call | Unix - Home
Unix - Getting Started
Unix - File Management
Unix - Directories
Unix - File Permission
Unix - Environment
Unix - Basic Utilities
Unix - Pipes & Filters
Unix - Processes
Unix - Communication
Unix - The vi Editor
Unix - What is Shell?
Unix - Using Variables
Unix - Special Variables
Unix - Using Arrays
Unix -... | [
{
"code": null,
"e": 1466,
"s": 1454,
"text": "Unix - Home"
},
{
"code": null,
"e": 1489,
"s": 1466,
"text": "Unix - Getting Started"
},
{
"code": null,
"e": 1512,
"s": 1489,
"text": "Unix - File Management"
},
{
"code": null,
"e": 1531,
"s": 1... |
Java program to find if the given number is a leap year? | Finding a year is a leap or not is a bit tricky. We generally assume that if a year number is evenly divisible by 4 is a leap year. But it is not the only case. A year is a leap year if −
1. It is evenly divisible by 100
2. If it is divisible by 100, then it should also be divisible by 400
3. Except this, all other yea... | [
{
"code": null,
"e": 1250,
"s": 1062,
"text": "Finding a year is a leap or not is a bit tricky. We generally assume that if a year number is evenly divisible by 4 is a leap year. But it is not the only case. A year is a leap year if −"
},
{
"code": null,
"e": 1283,
"s": 1250,
"te... |
wxPython - Slider Class | A slider presents the user with a groove over which a handle can be moved. It is a classic widget to control a bounded value. Position of the handle on the groove is equivalent to an integer between the lower and upper bounds of the control.
wxPython API contains wx.Slider class. It offers same functionality as that of... | [
{
"code": null,
"e": 2124,
"s": 1882,
"text": "A slider presents the user with a groove over which a handle can be moved. It is a classic widget to control a bounded value. Position of the handle on the groove is equivalent to an integer between the lower and upper bounds of the control."
},
{
... |
MariaDB - Table Cloning | Some situations require producing an exact copy of an existing table. The CREATE...SELECT statement cannot produce this output because it neglects things like indexes and default values.
The procedure for a duplicating a table is as follows −
Utilize SHOW CREATE TABLE to produce a CREATE TABLE statement that details th... | [
{
"code": null,
"e": 2549,
"s": 2362,
"text": "Some situations require producing an exact copy of an existing table. The CREATE...SELECT statement cannot produce this output because it neglects things like indexes and default values."
},
{
"code": null,
"e": 2605,
"s": 2549,
"tex... |
JCL - Base Library | Base Library is the Partitioned Dataset (PDS), which holds the load modules of the program to be executed in the JCL or the catalogued procedure, which is called in the program. Base libraries can be specified for the whole JCL in a JOBLIB library or for a particular job step in a STEPLIB statement.
A JOBLIB statement ... | [
{
"code": null,
"e": 2165,
"s": 1864,
"text": "Base Library is the Partitioned Dataset (PDS), which holds the load modules of the program to be executed in the JCL or the catalogued procedure, which is called in the program. Base libraries can be specified for the whole JCL in a JOBLIB library or fo... |
Batch Script - XCOPY | This batch command copies files and directories in a more advanced way.
Xcopy [source][destination]
Xcopy c:\lists.txt c:\tp\
The above command will copy the file lists.txt to the tp folder.
Print
Add Notes
Bookmark this page | [
{
"code": null,
"e": 2241,
"s": 2169,
"text": "This batch command copies files and directories in a more advanced way."
},
{
"code": null,
"e": 2270,
"s": 2241,
"text": "Xcopy [source][destination]\n"
},
{
"code": null,
"e": 2296,
"s": 2270,
"text": "Xcopy c:\... |
Convolutional Neural Network for Breast Cancer Classification | by Abhinav Sagar | Towards Data Science | Stuck behind the paywall? Click here to read the full story with my Friend Link!
Breast cancer is the second most common cancer in women and men worldwide. In 2012, it represented about 12 percent of all new cancer cases and 25 percent of all cancers in women.
Breast cancer starts when cells in the breast begin to grow... | [
{
"code": null,
"e": 252,
"s": 171,
"text": "Stuck behind the paywall? Click here to read the full story with my Friend Link!"
},
{
"code": null,
"e": 432,
"s": 252,
"text": "Breast cancer is the second most common cancer in women and men worldwide. In 2012, it represented about ... |
\textbf - Tex Command | \textbf - Used to produce text-mode material in boldface within a mathematical expression.
{ \textbf #1}
\textbf command is used to produce text-mode material in boldface within a mathematical expression.
\textbf{\alpha in textbf mode }\alpha
\alpha in textbf mode α
\textbf{\alpha in textbf mode }\alpha
\alpha in... | [
{
"code": null,
"e": 8077,
"s": 7986,
"text": "\\textbf - Used to produce text-mode material in boldface within a mathematical expression."
},
{
"code": null,
"e": 8091,
"s": 8077,
"text": "{ \\textbf #1}"
},
{
"code": null,
"e": 8191,
"s": 8091,
"text": "\\te... |
Art module in Python - GeeksforGeeks | 12 Nov, 2020
Art package is used to print decorative art’s on the terminal as well as to save in file and a word can be represented by ” | “and can be saved in a file
This module doesn’t come built-in with Python. To install this type the below command in the terminal.
pip install art
Function:
Printing Normal and ... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n12 Nov, 2020"
},
{
"code": null,
"e": 24055,
"s": 23901,
"text": "Art package is used to print decorative art’s on the terminal as well as to save in file and a word can be represented by ” | “and can be saved in a file"
},
{... |
Types of Java comments. | Java supports single-line, multi-line comments, and documentation comments. Documentation comments are understood by Javadoc tool and can be used to create HTML based documentation.
/** is known as documentation comments. It is used by Javadoc tool while creating the documentation for the program code.
/* is used for m... | [
{
"code": null,
"e": 1244,
"s": 1062,
"text": "Java supports single-line, multi-line comments, and documentation comments. Documentation comments are understood by Javadoc tool and can be used to create HTML based documentation."
},
{
"code": null,
"e": 1366,
"s": 1244,
"text": "... |
How to change the color of X-axis label using ggplot2 in R? | The default color of labels is black but we might want to change that color to something else so that we can get attention of the viewer to the labels if it is needed. To change the color of X-axis label using ggplot2, we can use theme function that has axis.title.x argument which can be used for changing the color of ... | [
{
"code": null,
"e": 1400,
"s": 1062,
"text": "The default color of labels is black but we might want to change that color to something else so that we can get attention of the viewer to the labels if it is needed. To change the color of X-axis label using ggplot2, we can use theme function that has... |
How to Concatenate two 2-dimensional NumPy Arrays? - GeeksforGeeks | 09 Aug, 2021
Sometimes it might be useful or required to concatenate or merge two or more of these NumPy arrays. In this article, we will discuss various methods of concatenating two 2D arrays. But first, we have to import the NumPy package to use it:
# import numpy package
import numpy as np
Then two 2D arrays have to... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n09 Aug, 2021"
},
{
"code": null,
"e": 24140,
"s": 23901,
"text": "Sometimes it might be useful or required to concatenate or merge two or more of these NumPy arrays. In this article, we will discuss various methods of concatenati... |
Multistage Graph (Shortest Path) - GeeksforGeeks | CoursesFor Working ProfessionalsLIVEDSA Live ClassesSystem DesignJava Backend DevelopmentFull Stack LIVEExplore MoreSelf-PacedDSA- Self PacedSDE TheoryMust-Do Coding QuestionsExplore MoreFor StudentsLIVECompetitive ProgrammingData Structures with C++Data ScienceExplore MoreSelf-PacedDSA- Self PacedCIPJAVA / Python / C+... | [
{
"code": null,
"e": 419,
"s": 0,
"text": "CoursesFor Working ProfessionalsLIVEDSA Live ClassesSystem DesignJava Backend DevelopmentFull Stack LIVEExplore MoreSelf-PacedDSA- Self PacedSDE TheoryMust-Do Coding QuestionsExplore MoreFor StudentsLIVECompetitive ProgrammingData Structures with C++Data Sc... |
How to get the number of dimensions of a matrix using NumPy in Python? - GeeksforGeeks | 03 Mar, 2021
In this article, we will discuss how to get the number of dimensions of a matrix using NumPy. It can be found using the ndim parameter of the ndarray() method.
Syntax: no_of_dimensions = numpy.ndarray.ndim
Approach:
Create an n-dimensional matrix using numpy package.
Use ndim attribute available with numpy... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 25697,
"s": 25537,
"text": "In this article, we will discuss how to get the number of dimensions of a matrix using NumPy. It can be found using the ndim parameter of the ndarray() method."
... |
Microsoft Interview Experience for Internship - GeeksforGeeks | 14 Sep, 2020
Recently Microsoft visited our campus for internships. They had a coding round which was followed by 3 interviews ( 2 technical and 1 HR).
Online Test: It was conducted on mettl and we had 90 minutes to solve 3 questions. Questions were shuffled for everyone but were fairly easy.
Given a string we need to ... | [
{
"code": null,
"e": 26605,
"s": 26577,
"text": "\n14 Sep, 2020"
},
{
"code": null,
"e": 26744,
"s": 26605,
"text": "Recently Microsoft visited our campus for internships. They had a coding round which was followed by 3 interviews ( 2 technical and 1 HR)."
},
{
"code": nu... |
FileSystem isOpen() method in Java with Examples - GeeksforGeeks | 03 Dec, 2019
The isOpen() method of a FileSystem class is used to return true if file system is open. This method is very helpful to know filesystem is open or not. File systems created by the default provider are always open.
Syntax:
public abstract boolean isOpen()
Parameters: This method accepts nothing.
Return val... | [
{
"code": null,
"e": 25851,
"s": 25823,
"text": "\n03 Dec, 2019"
},
{
"code": null,
"e": 26065,
"s": 25851,
"text": "The isOpen() method of a FileSystem class is used to return true if file system is open. This method is very helpful to know filesystem is open or not. File system... |
CSS Animation and @Keyframes Property - GeeksforGeeks | 03 Jun, 2020
CSS allows the animation of HTML elements without using JavaScript. An animation lets an element systematically and with proper timing, change from one style to another. You can change whatever CSS properties you want, end number of times, as you want it. To use CSS animation, you must first specify some @... | [
{
"code": null,
"e": 26621,
"s": 26593,
"text": "\n03 Jun, 2020"
},
{
"code": null,
"e": 27039,
"s": 26621,
"text": "CSS allows the animation of HTML elements without using JavaScript. An animation lets an element systematically and with proper timing, change from one style to an... |
Data Structures | Binary Trees | Question 15 - GeeksforGeeks | 28 Jun, 2021
In a complete k-ary tree, every internal node has exactly k children or no child. The number of leaves in such a tree with n internal nodes is:(A) nk(B) (n – 1) k+ 1(C) n( k – 1) + 1(D) n(k – 1)Answer: (C)Explanation: For an k-ary tree where each node has k children or no children, following relation holds... | [
{
"code": null,
"e": 26251,
"s": 26223,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 26574,
"s": 26251,
"text": "In a complete k-ary tree, every internal node has exactly k children or no child. The number of leaves in such a tree with n internal nodes is:(A) nk(B) (n – 1) k+... |
HCF of array of fractions (or rational numbers) - GeeksforGeeks | 14 Jul, 2021
Given a fraction series. Find the H.C.F of a given fraction series. Examples:
Input : [{2, 5}, {8, 9}, {16, 81}, {10, 27}]
Output : 2, 405
Explanation : 2/405 is the largest number that
divides all 2/5, 8/9, 16/81 and 10/27.
Input : [{9, 10}, {12, 25}, {18, 35}, {21, 40}]
Output : 3, 1400
Approach: ... | [
{
"code": null,
"e": 26055,
"s": 26027,
"text": "\n14 Jul, 2021"
},
{
"code": null,
"e": 26135,
"s": 26055,
"text": "Given a fraction series. Find the H.C.F of a given fraction series. Examples: "
},
{
"code": null,
"e": 26350,
"s": 26135,
"text": "Input : [{... |
fill_n() function in C++ STL with examples - GeeksforGeeks | 11 Oct, 2019
The fill_n() function in C++ STL is used to fill some default values in a container. The fill_n() function is used to fill values upto first n positions from a starting position. It accepts an iterator begin and the number of positions n as arguments and fills the first n position starting from the positio... | [
{
"code": null,
"e": 25343,
"s": 25315,
"text": "\n11 Oct, 2019"
},
{
"code": null,
"e": 25691,
"s": 25343,
"text": "The fill_n() function in C++ STL is used to fill some default values in a container. The fill_n() function is used to fill values upto first n positions from a sta... |
Python | Ways to convert Boolean values to integer - GeeksforGeeks | 10 Sep, 2021
Given a boolean value(s), write a Python program to convert them into an integer value or list respectively. Given below are a few methods to solve the above task.Method #1: Using int() method
Python3
# Python code to demonstrate# to convert boolean value to integer # Initialising Valuesbool_val = True ... | [
{
"code": null,
"e": 25411,
"s": 25383,
"text": "\n10 Sep, 2021"
},
{
"code": null,
"e": 25606,
"s": 25411,
"text": "Given a boolean value(s), write a Python program to convert them into an integer value or list respectively. Given below are a few methods to solve the above task.... |
Find closest smaller value for every element in array - GeeksforGeeks | 04 Feb, 2022
Given an array of integers, find the closest smaller element for every element. If there is no smaller element then print -1
Examples:
Input : arr[] = {10, 5, 11, 6, 20, 12} Output : 6, -1, 10, 5, 12, 11
Input : arr[] = {10, 5, 11, 10, 20, 12} Output : 5 -1 10 5 12 11
A simple solution is to run two n... | [
{
"code": null,
"e": 26041,
"s": 26013,
"text": "\n04 Feb, 2022"
},
{
"code": null,
"e": 26166,
"s": 26041,
"text": "Given an array of integers, find the closest smaller element for every element. If there is no smaller element then print -1"
},
{
"code": null,
"e": 2... |
K-ary Heap - GeeksforGeeks | 17 Dec, 2021
Prerequisite – Binary Heap
K-ary heaps are a generalization of binary heap(K=2) in which each node have K children instead of 2. Just like binary heap, it follows two properties:1) Nearly complete binary tree, with all levels having maximum number of nodes except the last, which is filled in left to righ... | [
{
"code": null,
"e": 39003,
"s": 38975,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 39032,
"s": 39003,
"text": "Prerequisite – Binary Heap "
},
{
"code": null,
"e": 39596,
"s": 39032,
"text": "K-ary heaps are a generalization of binary heap(K=2) in which... |
PGP - Authentication and Confidentiality - GeeksforGeeks | 07 Mar, 2022
In 2013, when the NSA (United States National Security Agency) scandal was leaked to the public, people started to opt for the services which can provide them a strong privacy for their data. Among the services people opted for, most particularly for Emails, were different plug-ins and extensions for their... | [
{
"code": null,
"e": 25773,
"s": 25745,
"text": "\n07 Mar, 2022"
},
{
"code": null,
"e": 26353,
"s": 25773,
"text": "In 2013, when the NSA (United States National Security Agency) scandal was leaked to the public, people started to opt for the services which can provide them a st... |
Reverse a string in Julia - reverse() Method - GeeksforGeeks | 26 Mar, 2020
The reverse() is an inbuilt function in julia which is used to return the reverse of the specified string.
Syntax:reverse(s::AbstractString)
Parameters:
a::AbstractString: Specified string
Returns: It returns the reverse of the specified string.
Example 1:
# Julia program to illustrate # the use of String ... | [
{
"code": null,
"e": 25787,
"s": 25759,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 25894,
"s": 25787,
"text": "The reverse() is an inbuilt function in julia which is used to return the reverse of the specified string."
},
{
"code": null,
"e": 25928,
"s": 258... |
Minimize number of cuts required to break N length stick into N unit length sticks - GeeksforGeeks | 31 Mar, 2021
Given an integer N denoting the length of a given stick, the task is to minimize the time required to split the stick into pieces of unit length, given that, a single cut is possible for any portion of stick at any instance of time.
Examples:
Input: N = 100 Output: 7 Explanation: (100 units) —> (2 portio... | [
{
"code": null,
"e": 26475,
"s": 26447,
"text": "\n31 Mar, 2021"
},
{
"code": null,
"e": 26708,
"s": 26475,
"text": "Given an integer N denoting the length of a given stick, the task is to minimize the time required to split the stick into pieces of unit length, given that, a sin... |
\hfil - Tex Command | \hfil - Used to set horizontal alignment in matrices and arrays.
{ \hfil }
\hfil command is used to set horizontal alignment in matrices and arrays.
\begin{matrix}
xxxxxx & xxxxxx & xxxxxx \cr
ab & \hfil ab & ab\hfil\cr
\end{matrix}
xxxxxxxxxxxxxxxxxxababab
\begin{matrix}
xxxxxx & xxxxxx & xxxxxx \cr
ab & \hfil ab... | [
{
"code": null,
"e": 8051,
"s": 7986,
"text": "\\hfil - Used to set horizontal alignment in matrices and arrays."
},
{
"code": null,
"e": 8061,
"s": 8051,
"text": "{ \\hfil }"
},
{
"code": null,
"e": 8135,
"s": 8061,
"text": "\\hfil command is used to set hori... |
Create new functionality with __getattribute__ | by Alexander Bailey | Towards Data Science | As a child of a class, it’s hard to take back control from your parent. You might think that once your parent has given you some functionality, that’s it and there’s nothing you can do to change it but that’s not that case!
We’re going to consider an example where we want to use the functionality given to us by a paren... | [
{
"code": null,
"e": 396,
"s": 172,
"text": "As a child of a class, it’s hard to take back control from your parent. You might think that once your parent has given you some functionality, that’s it and there’s nothing you can do to change it but that’s not that case!"
},
{
"code": null,
... |
How to redirect website after certain amount of time without JavaScript? | To redirect from an HTML page, use the META Tag. With this, use the http-equiv attribute to provide an HTTP header for the value of the content attribute. The value of the content is the number of seconds; you want the page to redirect after.
Through this, you can automatically redirect your visitors to a new homepage.... | [
{
"code": null,
"e": 1305,
"s": 1062,
"text": "To redirect from an HTML page, use the META Tag. With this, use the http-equiv attribute to provide an HTTP header for the value of the content attribute. The value of the content is the number of seconds; you want the page to redirect after."
},
{
... |
wxPython - BoxSizer | This sizer allows the controls to be arranged in row-wise or column-wise manner. BoxSizer’s layout is determined by its orientation argument (either wxVERTICAL or wxHORIZONTAL).
Box = wx.BoxSizer(wxHORIZONTAL)
Box = wx.BoxSizer(wxVERTICAL)
Add() method (inherited from wxSizer) appends it to the next row/column of the ... | [
{
"code": null,
"e": 2060,
"s": 1882,
"text": "This sizer allows the controls to be arranged in row-wise or column-wise manner. BoxSizer’s layout is determined by its orientation argument (either wxVERTICAL or wxHORIZONTAL)."
},
{
"code": null,
"e": 2123,
"s": 2060,
"text": "Box ... |
numpy.linalg.solve() | The numpy.linalg.solve() function gives the solution of linear equations in the matrix form.
Considering the following linear equations −
x + y + z = 6
2y + 5z = -4
2x + 5y - z = 27
They can be represented in the matrix form as −
If these three matrices are called A, X and B, the equation becomes −
A*X = B
Or
X = A... | [
{
"code": null,
"e": 2336,
"s": 2243,
"text": "The numpy.linalg.solve() function gives the solution of linear equations in the matrix form."
},
{
"code": null,
"e": 2381,
"s": 2336,
"text": "Considering the following linear equations −"
},
{
"code": null,
"e": 2395,
... |
Compile our own Android Kernel in 5 Simple Steps - GeeksforGeeks | 23 Feb, 2021
The Android kernel helps the applications to communicate with the hardware components of the device.
For example:
Most of us are familiar with game mode. What it does is instructs the processor and the graphics processing unit to run at their maximum frequencies.Another example is power saver mode. It inst... | [
{
"code": null,
"e": 25140,
"s": 25112,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 25241,
"s": 25140,
"text": "The Android kernel helps the applications to communicate with the hardware components of the device."
},
{
"code": null,
"e": 25254,
"s": 25241,
... |
Python - Create a Time Series Plot using Line Plot with Seaborn | To create a Time Series Plot, use the lineplot(). At first, import the required libraries −
import seaborn as sb
import pandas as pd
import matplotlib.pyplot as plt
Create a DataFrame with one of the columns as date i.e. “Date_of_Purchase” −
dataFrame = pd.DataFrame({'Date_of_Purchase': ['2018-07-25', '2018-10-25', '20... | [
{
"code": null,
"e": 1154,
"s": 1062,
"text": "To create a Time Series Plot, use the lineplot(). At first, import the required libraries −"
},
{
"code": null,
"e": 1227,
"s": 1154,
"text": "import seaborn as sb\nimport pandas as pd\nimport matplotlib.pyplot as plt"
},
{
"... |
Dart - main() Function - GeeksforGeeks | 17 Feb, 2021
The main() function is a predefined method in Dart. It is the most important and mandatory part of any Dart Program. Any Dart script requires the main() method for its execution. This method acts as the entry point for any Dart application. It is responsible for executing all library functions, user-define... | [
{
"code": null,
"e": 24010,
"s": 23982,
"text": "\n17 Feb, 2021"
},
{
"code": null,
"e": 24360,
"s": 24010,
"text": "The main() function is a predefined method in Dart. It is the most important and mandatory part of any Dart Program. Any Dart script requires the main() method for... |
XStream - First Application | Before going into the details of the XStream library, let us see an application in action. In this example, we've created Student and Address classes. We will create a student object and then serialize it to an XML String. Then de-serialize the same XML string to obtain the student object back.
Create a java class file... | [
{
"code": null,
"e": 2054,
"s": 1758,
"text": "Before going into the details of the XStream library, let us see an application in action. In this example, we've created Student and Address classes. We will create a student object and then serialize it to an XML String. Then de-serialize the same XML... |
Bootstrap .tooltip("toggle") method | Use the tooltip(“toggle”) method in Bootstrap to togle the tooltip.
The tooltip generates on clicking the button shown below −
<button type="button" class="btn btn-info">
Toggle Tooltip
</button>
Toggle the tooltip on button click like the following code snippet −
$(".btn-info").click(function(){
$("[data-toggle='t... | [
{
"code": null,
"e": 1130,
"s": 1062,
"text": "Use the tooltip(“toggle”) method in Bootstrap to togle the tooltip."
},
{
"code": null,
"e": 1189,
"s": 1130,
"text": "The tooltip generates on clicking the button shown below −"
},
{
"code": null,
"e": 1260,
"s": 118... |
Data Science over the Movies Dataset with Spark, Scala and some SQL. And some Python.(Part 1). | by Borja González | Towards Data Science | One day, a friend of mine who works as a SQL developer told me that she was interested on big data processing engines but she has not any experience on other programming languages apart from SQL. I wanted to demonstrate her that knowing SQL is a good starting point to learn big data because thanks to Spark it is possib... | [
{
"code": null,
"e": 607,
"s": 172,
"text": "One day, a friend of mine who works as a SQL developer told me that she was interested on big data processing engines but she has not any experience on other programming languages apart from SQL. I wanted to demonstrate her that knowing SQL is a good star... |
Imbalanced-Learn module in Python - GeeksforGeeks | 11 Dec, 2020
Imbalanced-Learn is a Python module that helps in balancing the datasets which are highly skewed or biased towards some classes. Thus, it helps in resampling the classes which are otherwise oversampled or undesampled. If there is a greater imbalance ratio, the output is biased to the class which has a high... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n11 Dec, 2020"
},
{
"code": null,
"e": 24304,
"s": 23901,
"text": "Imbalanced-Learn is a Python module that helps in balancing the datasets which are highly skewed or biased towards some classes. Thus, it helps in resampling the c... |
Java program to calculate the power of a number | Read the base and exponent values from the user. Multiply the base number by itself and multiply the resultant with base (again) repeat this n times where n is the exponent value.
2 ^ 5 = 2 X 2 X 2 X 2 X 2 (5 times)
import java.util.Scanner;
public class PowerOfNumber {
public static void main(String args[]){
... | [
{
"code": null,
"e": 1242,
"s": 1062,
"text": "Read the base and exponent values from the user. Multiply the base number by itself and multiply the resultant with base (again) repeat this n times where n is the exponent value."
},
{
"code": null,
"e": 1278,
"s": 1242,
"text": "2 ... |
Can we assign a reference to a variable in Python? | Concept of variable in Python is different from C/C++. In C/C++, variable is a named location in memory. Even if value of one is assigned to another, it creates a copy in another location.
int x=5;
int y=x;
For example in C++, the & operator returns address of the declared variable.
cout<x<<&x<<y<<&y;
This will print d... | [
{
"code": null,
"e": 1251,
"s": 1062,
"text": "Concept of variable in Python is different from C/C++. In C/C++, variable is a named location in memory. Even if value of one is assigned to another, it creates a copy in another location."
},
{
"code": null,
"e": 1269,
"s": 1251,
"t... |
CoffeeScript Tutorial | CoffeeScript is a light weight language which transcompiles into JavaScript. It provides better syntax avoiding the quirky parts of JavaScript, still retaining the flexibility and beauty of the language.
This tutorial has been prepared for beginners to help them understand the basic functionality of CoffeeScript to bui... | [
{
"code": null,
"e": 2513,
"s": 2309,
"text": "CoffeeScript is a light weight language which transcompiles into JavaScript. It provides better syntax avoiding the quirky parts of JavaScript, still retaining the flexibility and beauty of the language."
},
{
"code": null,
"e": 2671,
"s... |
What’s the difference between useContext and Redux ? | 21 May, 2021
useContext: useContext is a hook that provides a way to pass data through the component tree without manually passing props down through each nested component.
Syntax:
const Context = useContext(initialValue);
Project Structure: It will look like this.
Example: In this example, App.js is sending data to co... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 212,
"s": 52,
"text": "useContext: useContext is a hook that provides a way to pass data through the component tree without manually passing props down through each nested component."
},
{
... |
isdigit() function in C/C++ with Examples | 19 Jan, 2021
The isdigit(c) is a function in C which can be used to check if the passed character is a digit or not. It returns a non-zero value if it’s a digit else it returns 0. For example, it returns a non-zero value for ‘0’ to ‘9’ and zero for others.
The isdigit() is declared inside ctype.h header file.
It is use... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n19 Jan, 2021"
},
{
"code": null,
"e": 297,
"s": 53,
"text": "The isdigit(c) is a function in C which can be used to check if the passed character is a digit or not. It returns a non-zero value if it’s a digit else it returns 0. For exa... |
Simplified International Data Encryption Algorithm (IDEA) | 22 Oct, 2021
In cryptography, block ciphers are very important in the designing of many cryptographic algorithms and are widely used to encrypt the bulk of data in chunks. By chunks, it means that the cipher takes a fixed size of the plaintext in the encryption process and generates a fixed size ciphertext using a fixe... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Oct, 2021"
},
{
"code": null,
"e": 431,
"s": 52,
"text": "In cryptography, block ciphers are very important in the designing of many cryptographic algorithms and are widely used to encrypt the bulk of data in chunks. By chunks, it m... |
Find the Largest Top 10 Files and Directories On a Linux | Sometimes, it becomes important to find which files or directories are ingesting up, all of your disk area on a Linux. Similarly, we should be able to discover a particular directory location on file system such as /tmp/ or /var/ or /domestic/. This article will help you to use Unix and Linux commands for finding the m... | [
{
"code": null,
"e": 1574,
"s": 1187,
"text": "Sometimes, it becomes important to find which files or directories are ingesting up, all of your disk area on a Linux. Similarly, we should be able to discover a particular directory location on file system such as /tmp/ or /var/ or /domestic/. This art... |
Groovy - padRight() | Pad the String with the spaces appended to the right. This method has 2 different variants.
String padRight(Number numberOfCharacters) − Pad the String with the spaces appended to the right.
String padRight(Number numberOfCharacters) − Pad the String with the spaces appended to the right.
Syntax
String padRight(Number ... | [
{
"code": null,
"e": 2464,
"s": 2372,
"text": "Pad the String with the spaces appended to the right. This method has 2 different variants."
},
{
"code": null,
"e": 2563,
"s": 2464,
"text": "String padRight(Number numberOfCharacters) − Pad the String with the spaces appended to th... |
Count characters in a string whose ASCII values are prime | 08 Mar, 2022
Given a string S. The task is to count and print the number of characters in the string whose ASCII values are prime.
Examples:
Input: S = “geeksforgeeks” Output : 3 ‘g’, ‘e’ and ‘k’ are the only characters whose ASCII values are prime i.e. 103, 101 and 107 respectively.
Input: S = “abcdefghijklmnopqrstuv... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Mar, 2022"
},
{
"code": null,
"e": 146,
"s": 28,
"text": "Given a string S. The task is to count and print the number of characters in the string whose ASCII values are prime."
},
{
"code": null,
"e": 157,
"s": 146,
... |
PostgreSQL – Export PostgreSQL Table to CSV file | 28 Feb, 2021
In this article will discuss we will discuss the process of exporting a PostgreSQL Table to a CSV file. Here we will see how to export on the server and also on the client machine.
Use the below syntax to copy a PostgreSQL table from the server itself:
Syntax: COPY Table_Name TO 'Path/filename.csv' CSV HEA... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Feb, 2021"
},
{
"code": null,
"e": 209,
"s": 28,
"text": "In this article will discuss we will discuss the process of exporting a PostgreSQL Table to a CSV file. Here we will see how to export on the server and also on the client mac... |
Most similar string | 17 Jul, 2021
Given a string str and an array of strings arr[] of size N, the task is to print a string from arr[], which has maximum count of matching characters with str.
Examples:
Input: str = “vikas”, N = 3, arr[] = [“preeti”, “khusbu”, “katherina”] Output: “katherina” Explanation: Number of similar characters betwe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Jul, 2021"
},
{
"code": null,
"e": 187,
"s": 28,
"text": "Given a string str and an array of strings arr[] of size N, the task is to print a string from arr[], which has maximum count of matching characters with str."
},
{
"c... |
How to convert String to Float in PHP ? | 30 Apr, 2021
Strings in PHP can be converted to float very easily. In most use cases, it won’t be required since PHP does implicit type conversion. There are many methods to convert a string into a number in PHP, some of them are discussed below:
Methods:
Using floatval() function.
Using Typecasting.
Using number_forma... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Apr, 2021"
},
{
"code": null,
"e": 262,
"s": 28,
"text": "Strings in PHP can be converted to float very easily. In most use cases, it won’t be required since PHP does implicit type conversion. There are many methods to convert a stri... |
How to validate input field in the HTML Form ? | 13 Jan, 2022
In this article, we will see how to validate form input fields using HTML. To validate the form using HTML, we will use HTML <input> required attribute. The <input> required attribute is a Boolean attribute that is used to specify the input element must be filled out before submitting the Form.
Syntax:
<in... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 324,
"s": 28,
"text": "In this article, we will see how to validate form input fields using HTML. To validate the form using HTML, we will use HTML <input> required attribute. The <input> required a... |
Sum of array elements using recursion | 27 Jan, 2022
Given an array of integers, find sum of array elements using recursion. Examples:
Input : A[] = {1, 2, 3}
Output : 6
1 + 2 + 3 = 6
Input : A[] = {15, 12, 13, 10}
Output : 50
We have discussed iterative solution in below post. Sum of elements in a given arrayIn this post, recursive solution is discusse... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 Jan, 2022"
},
{
"code": null,
"e": 136,
"s": 52,
"text": "Given an array of integers, find sum of array elements using recursion. Examples: "
},
{
"code": null,
"e": 229,
"s": 136,
"text": "Input : A[] = {1, 2, ... |
Queue.CopyTo() Method in C# | 04 Feb, 2019
This method is used to copy the Queue elements to an existing one-dimensional Array, starting at the specified array index. The elements are copied to the Array in the same order in which the enumerator iterates through the Queue and this method is an O(n) operation, where n is Count. This method comes und... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Feb, 2019"
},
{
"code": null,
"e": 368,
"s": 28,
"text": "This method is used to copy the Queue elements to an existing one-dimensional Array, starting at the specified array index. The elements are copied to the Array in the same or... |
Maximum value of int in C++ | 09 Dec, 2020
In this article, we will discuss the int data type in C++. It is used to store a 32-bit integer.
Some properties of the int data type are:
Being a signed data type, it can store positive values as well as negative values.
Takes a size of 32 bits where 1 bit is used to store the sign of the integer.
A maxi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Dec, 2020"
},
{
"code": null,
"e": 126,
"s": 28,
"text": "In this article, we will discuss the int data type in C++. It is used to store a 32-bit integer. "
},
{
"code": null,
"e": 168,
"s": 126,
"text": "Some pro... |
How to Enable or Disable SELinux in Different Modes? | 12 Mar, 2021
SELinux stands for Security-Enhanced Linux. SELinux is just like the Windows firewall, but it is more secure and private. It manages all the access control policies. We can control the status of SELinux security by using some direct commands or by actually going to the SELinux configuration file and editin... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Mar, 2021"
},
{
"code": null,
"e": 599,
"s": 28,
"text": "SELinux stands for Security-Enhanced Linux. SELinux is just like the Windows firewall, but it is more secure and private. It manages all the access control policies. We can co... |
Python | PIL Attributes | 29 Jul, 2019
Attribute defines the various property of an object, element or file. In the image, attribute refers to the size, filename, format or mode, etc. of the image.
Image used is:
Instances of the Image class have the following attributes:
PIL.Image.filename: The filename or path of the source file. Only images ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jul, 2019"
},
{
"code": null,
"e": 187,
"s": 28,
"text": "Attribute defines the various property of an object, element or file. In the image, attribute refers to the size, filename, format or mode, etc. of the image."
},
{
"c... |
MapStruct - Throwing Exception | Mapstruct mapper allows throwing specific exception. Consider a case of custom mapping method where we want to throw our custom exception in case of invalid data.
@Mapper(uses=DateMapper.class)
public interface UtilityMapper {
CarEntity getCarEntity(Car car) throws ParseException;
}
Following example demonstrates t... | [
{
"code": null,
"e": 2557,
"s": 2394,
"text": "Mapstruct mapper allows throwing specific exception. Consider a case of custom mapping method where we want to throw our custom exception in case of invalid data."
},
{
"code": null,
"e": 2682,
"s": 2557,
"text": "@Mapper(uses=DateMa... |
Python | Pandas dataframe.nunique() | 22 Nov, 2018
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas dataframe.nunique() function return Series with number of distinct observations over r... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Nov, 2018"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
Remove all occurrences of a character in a string | 22 Apr, 2022
Given a string. Write a program to remove all the occurrences of a character in the string.
Examples:
Input : s = "geeksforgeeks"
c = 'e'
Output : s = "gksforgks"
Input : s = "geeksforgeeks"
c = 'g'
Output : s = "eeksforeeks"
First Approach: The idea is to maintain an index of the result... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Apr, 2022"
},
{
"code": null,
"e": 144,
"s": 52,
"text": "Given a string. Write a program to remove all the occurrences of a character in the string."
},
{
"code": null,
"e": 155,
"s": 144,
"text": "Examples: "
... |
C++ Program to implement Gift Wrapping Algorithm in Two Dimensions | We shall develop a C++ program to implement Gift Wrapping Algorithm in two dimensions. The Gift Wrapping Algorithm is an algorithm for computing the convex hull of a given set of points.
Begin
function convexHull() to find convex hull of a set of n points:
There must be at least three points.
Initialize the re... | [
{
"code": null,
"e": 1249,
"s": 1062,
"text": "We shall develop a C++ program to implement Gift Wrapping Algorithm in two dimensions. The Gift Wrapping Algorithm is an algorithm for computing the convex hull of a given set of points."
},
{
"code": null,
"e": 1541,
"s": 1249,
"tex... |
Program to print pyramid pattern - GeeksforGeeks | 20 Jan, 2022
Write to program to print the pyramid pattern formed of stars
Example :
Input: n = 6
Output:
*
* *
* * *
* * * *
* * * * *
* * * * * *
* * * * *
* * * *
* * *
* *
*
We strongly recommend you to minimize your browser and try t... | [
{
"code": null,
"e": 23806,
"s": 23778,
"text": "\n20 Jan, 2022"
},
{
"code": null,
"e": 23869,
"s": 23806,
"text": "Write to program to print the pyramid pattern formed of stars "
},
{
"code": null,
"e": 23880,
"s": 23869,
"text": "Example : "
},
{
"c... |
Deep Learning in Java. Java, one of the most popular... | by Keerthan Vasist | Towards Data Science | Java has been one of the most popular programming languages in enterprise for a long time and has a massive ecosystem of libraries, and frameworks, and a large community of developers. However, there are very limited options offered in Java for deep learning applications. Currently, most deep learning models are writte... | [
{
"code": null,
"e": 1583,
"s": 172,
"text": "Java has been one of the most popular programming languages in enterprise for a long time and has a massive ecosystem of libraries, and frameworks, and a large community of developers. However, there are very limited options offered in Java for deep lear... |
How to Generate Word Clouds in R. Simple Steps on How and When to Use... | by Céline Van den Rul | Towards Data Science | In the following section, I show you 4 simple steps to follow if you want to generate a word cloud with R.
To generate word clouds, you need to download the wordcloud package in R as well as the RcolorBrewer package for the colours. Note that there is also a wordcloud2 package, with a slightly different design and fun ... | [
{
"code": null,
"e": 279,
"s": 172,
"text": "In the following section, I show you 4 simple steps to follow if you want to generate a word cloud with R."
},
{
"code": null,
"e": 548,
"s": 279,
"text": "To generate word clouds, you need to download the wordcloud package in R as wel... |
Row wise sorting in 2D array - GeeksforGeeks | 06 Jul, 2021
Given a 2D array, sort each row of this array and print the result.Examples:
Input :
77 11 22 3
11 89 1 12
32 11 56 7
11 22 44 33
Output :
3 11 22 77
1 11 12 89
7 11 32 56
11 22 33 44
Input :
8 6 4 5
3 5 2 1
9 7 4 2
7 8 9 5
Output :
4 5 6 8
1 2 3 5
2 4 7 9
5 7 8 9
Method 1 (Using Bubble Sort) Start itera... | [
{
"code": null,
"e": 24676,
"s": 24648,
"text": "\n06 Jul, 2021"
},
{
"code": null,
"e": 24754,
"s": 24676,
"text": "Given a 2D array, sort each row of this array and print the result.Examples: "
},
{
"code": null,
"e": 24943,
"s": 24754,
"text": "Input :\n77 ... |
Babylonian method for square root - GeeksforGeeks | 26 Oct, 2021
Algorithm: This method can be derived from (but predates) Newton–Raphson method.
1 Start with an arbitrary positive start value x (the closer to the
root, the better).
2 Initialize y = 1.
3. Do following until desired approximation is achieved.
a) Get the next approximation for root using average o... | [
{
"code": null,
"e": 34205,
"s": 34177,
"text": "\n26 Oct, 2021"
},
{
"code": null,
"e": 34288,
"s": 34205,
"text": "Algorithm: This method can be derived from (but predates) Newton–Raphson method. "
},
{
"code": null,
"e": 34539,
"s": 34288,
"text": "1 Start... |
Kubernetes - Namespace | Namespace provides an additional qualification to a resource name. This is helpful when multiple teams are using the same cluster and there is a potential of name collision. It can be as a virtual wall between multiple clusters.
Following are some of the important functionalities of a Namespace in Kubernetes −
Namespac... | [
{
"code": null,
"e": 2424,
"s": 2195,
"text": "Namespace provides an additional qualification to a resource name. This is helpful when multiple teams are using the same cluster and there is a potential of name collision. It can be as a virtual wall between multiple clusters."
},
{
"code": nu... |
HTML5 - IndexedDB | The indexeddb is a new HTML5 concept to store the data inside user's browser. indexeddb is more power than local storage and useful for applications that requires to store large amount of the data. These applications can run more efficiency and load faster.
The W3C has announced that the Web SQL database is a deprecate... | [
{
"code": null,
"e": 2866,
"s": 2608,
"text": "The indexeddb is a new HTML5 concept to store the data inside user's browser. indexeddb is more power than local storage and useful for applications that requires to store large amount of the data. These applications can run more efficiency and load fas... |
What is difference between a pointer and reference parameter in C++? | Pointer variables are used to store the address of variable.
Type *pointer;
Type *pointer;
Pointer=variable name;
When a parameter is declared as reference, it becomes an alternative name for an existing parameter.
Type &newname=existing name;
Type &pointer;
Pointer=variable name;
The main differences between pointers ... | [
{
"code": null,
"e": 1123,
"s": 1062,
"text": "Pointer variables are used to store the address of variable."
},
{
"code": null,
"e": 1138,
"s": 1123,
"text": "Type *pointer;"
},
{
"code": null,
"e": 1176,
"s": 1138,
"text": "Type *pointer;\nPointer=variable na... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.