title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Sending and Receiving Data with Sockets in android | This example demonstrate about Sending and Receiving Data with Sockets in android
Need Server and Client Project
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... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "This example demonstrate about Sending and Receiving Data with Sockets in android"
},
{
"code": null,
"e": 1175,
"s": 1144,
"text": "Need Server and Client Project"
},
{
"code": null,
"e": 1304,
"s": 1175,
"text":... |
Random Forest Explained. Random Forest explained simply: An easy... | by z_ai | Towards Data Science | In this post, we will explain what a Random Forest model is, see its strengths, how it is built, and what it can be used for.
We will go through the theory and intuition of Random Forest, seeing the minimum amount of maths necessary to understand how everything works, without diving into the most complex details.
Lastl... | [
{
"code": null,
"e": 298,
"s": 172,
"text": "In this post, we will explain what a Random Forest model is, see its strengths, how it is built, and what it can be used for."
},
{
"code": null,
"e": 487,
"s": 298,
"text": "We will go through the theory and intuition of Random Forest... |
C++ program to find the Parity of a number efficiently | In this article, we will be discussing a program to find the parity of a given number N.
Parity is defined as the number of set bits (number of ‘1’s) in the binary representation of a number.
If the number of ‘1’s in the binary representation are even, the parity is called even parity and if the number of ‘1’s in the b... | [
{
"code": null,
"e": 1151,
"s": 1062,
"text": "In this article, we will be discussing a program to find the parity of a given number N."
},
{
"code": null,
"e": 1254,
"s": 1151,
"text": "Parity is defined as the number of set bits (number of ‘1’s) in the binary representation of ... |
Python | Convert list of strings to space separated string - GeeksforGeeks | 16 May, 2020
Given a list of strings, write a Python program to convert the given list of strings into a space-separated string.
Examples:
Input : ['geeks', 'for', 'geeks']
Output : geeks for geeks
Input : ['Python', 'Language']
Output : Python Language
Approach #1 : Python string translate()
The string translate() m... | [
{
"code": null,
"e": 24139,
"s": 24111,
"text": "\n16 May, 2020"
},
{
"code": null,
"e": 24255,
"s": 24139,
"text": "Given a list of strings, write a Python program to convert the given list of strings into a space-separated string."
},
{
"code": null,
"e": 24265,
... |
How to create a StackPane using JavaFX? | Once you create all the required nodes for your application you can arrange them using a layout. Where a layout is a process of calculating the position of objects in the given space. JavaFX provides various layouts in the javafx.scene.layout package.
In this layout, the nodes are arranged as a stack from bottom to top... | [
{
"code": null,
"e": 1314,
"s": 1062,
"text": "Once you create all the required nodes for your application you can arrange them using a layout. Where a layout is a process of calculating the position of objects in the given space. JavaFX provides various layouts in the javafx.scene.layout package."
... |
Python Get a list as input from user | In this article we will see you how to ask the user to enter elements of a list and finally create the list with those entered values.
The format function can be used to fill in the values in the place holders and the input function will capture the value entered by the user. Finally, we will append the elements into t... | [
{
"code": null,
"e": 1197,
"s": 1062,
"text": "In this article we will see you how to ask the user to enter elements of a list and finally create the list with those entered values."
},
{
"code": null,
"e": 1402,
"s": 1197,
"text": "The format function can be used to fill in the ... |
How to list all databases in the Mongo shell? | To list all databases in the Mongo shell, you need to use show command. The syntax is as follows −
show dbs;
Let us implement the above syntax for MongoDB. The query is as follows −
> show dbs;
The following is the output −
admin 0.000GB
config 0.000GB
local 0.000GB
sample 0.000GB
sampleDemo 0.000GB
test 0.003GB
If you... | [
{
"code": null,
"e": 1161,
"s": 1062,
"text": "To list all databases in the Mongo shell, you need to use show command. The syntax is as follows −"
},
{
"code": null,
"e": 1171,
"s": 1161,
"text": "show dbs;"
},
{
"code": null,
"e": 1244,
"s": 1171,
"text": "Le... |
How to draw a Bezier Curve with HTML5 Canvas? | The HTML5 <canvas> tag is used to draw graphics, animations, etc. using scripting. It is a new tag introduced in HTML5. The canvas element has a DOM method called getContext, which obtains rendering context and its drawing functions. This function takes one parameter, the type of context 2d.
To draw a Bezier curve with... | [
{
"code": null,
"e": 1355,
"s": 1062,
"text": "The HTML5 <canvas> tag is used to draw graphics, animations, etc. using scripting. It is a new tag introduced in HTML5. The canvas element has a DOM method called getContext, which obtains rendering context and its drawing functions. This function takes... |
Type of Java constructors | There are two types of constructor java supports −
Default constructor: A constructor with no arguments
Parameterized constructor: A constructor with parameters.
public class Puppy {
//Default constructor
public Puppy() {
}
//Parameterized constructor
public Puppy(String name) {
// This constructor... | [
{
"code": null,
"e": 1113,
"s": 1062,
"text": "There are two types of constructor java supports −"
},
{
"code": null,
"e": 1166,
"s": 1113,
"text": "Default constructor: A constructor with no arguments"
},
{
"code": null,
"e": 1224,
"s": 1166,
"text": "Paramet... |
JavaScript Break and Continue | The break statement "jumps out" of a loop.
The continue statement "jumps over" one iteration in
the loop.
You have already seen the break statement used in an earlier
chapter of this tutorial. It was used to "jump out" of a switch() statement.
The break statement can also be used to jump out of a loop:
In the example... | [
{
"code": null,
"e": 43,
"s": 0,
"text": "The break statement \"jumps out\" of a loop."
},
{
"code": null,
"e": 107,
"s": 43,
"text": "The continue statement \"jumps over\" one iteration in \nthe loop."
},
{
"code": null,
"e": 246,
"s": 107,
"text": "You have ... |
Unity - Coroutines | Coroutines are the most helpful tools when making games in Unity. Let us consider the line of code shown below to understand what coroutines is all about.
IEnumerator MyCoroutineMethod() {
// Your code here...
yield return null;
}
Generally, if you call a function in Unity (or C#, really), the function will ... | [
{
"code": null,
"e": 2370,
"s": 2215,
"text": "Coroutines are the most helpful tools when making games in Unity. Let us consider the line of code shown below to understand what coroutines is all about."
},
{
"code": null,
"e": 2457,
"s": 2370,
"text": "IEnumerator MyCoroutineMeth... |
Binary Tree with Array implementation in C++ | A binary tree is a special type of tree in which each node of the tree can have at most two child nodes. These child nodes are known as right child and left child.
A simple binary tree is −
For representing trees, there are two ways,
dynamic node representation which uses linked list
Sequential representation which use... | [
{
"code": null,
"e": 1226,
"s": 1062,
"text": "A binary tree is a special type of tree in which each node of the tree can have at most two child nodes. These child nodes are known as right child and left child."
},
{
"code": null,
"e": 1252,
"s": 1226,
"text": "A simple binary tr... |
What is a Decision Tree?. For a bank to consider whether or not... | by Thomas Plapinger | Towards Data Science | For a bank to consider whether or not to offer someone a loan they often go through a sequential list of questions to figure out if it is safe to give said loan to an individual. Those questions can start as simple as what kind of income does the person have? If it is between $30–70k they move on to the next question. ... | [
{
"code": null,
"e": 735,
"s": 172,
"text": "For a bank to consider whether or not to offer someone a loan they often go through a sequential list of questions to figure out if it is safe to give said loan to an individual. Those questions can start as simple as what kind of income does the person h... |
Cookiecutter — Creating custom reusable project templates | by Matias Calderini | Towards Data Science | Your past and future projects are probably all unique in some way. That being said, if you are (and you should be) moderately organized, the underlying structure of it all is not going to change much across projects: a folder for the raw data, another one for the processed data; a folder for source code, a folder for r... | [
{
"code": null,
"e": 734,
"s": 172,
"text": "Your past and future projects are probably all unique in some way. That being said, if you are (and you should be) moderately organized, the underlying structure of it all is not going to change much across projects: a folder for the raw data, another one... |
Find the elements of a vector that are not in another vector in R - GeeksforGeeks | 26 Mar, 2021
Two vectors can hold some values common. This article discusses how can we find set difference of these vectors i.e. display elements which are present in one vector but not in the other.
If we want all the elements of a vector that are not in another vector then we can use setdiff() method in R. It takes ... | [
{
"code": null,
"e": 25242,
"s": 25214,
"text": "\n26 Mar, 2021"
},
{
"code": null,
"e": 25430,
"s": 25242,
"text": "Two vectors can hold some values common. This article discusses how can we find set difference of these vectors i.e. display elements which are present in one vect... |
GitLab - Create Project | In this chapter, we will discuss about how to create a new project in the GitLab.
Step 1 − To create new project, login to your GitLab account and click on the New project button in the dashboard −
Step 2 − It will open the New project screen as shown below in the image −
Enter the project name, description for the pr... | [
{
"code": null,
"e": 2407,
"s": 2324,
"text": "In this chapter, we will discuss about how to create a new project in the GitLab. "
},
{
"code": null,
"e": 2523,
"s": 2407,
"text": "Step 1 − To create new project, login to your GitLab account and click on the New project button in... |
C# | Array.Find() Method - GeeksforGeeks | 05 Jan, 2022
This method is used to search for an element that matches the conditions defined by the specified predicate and returns the first occurrence within the entire Array.
Syntax:
public static T Find (T[] array, Predicate<T> match);
Here, T is the type of element of the array.
Parameters:
array: It is the one-d... | [
{
"code": null,
"e": 25739,
"s": 25711,
"text": "\n05 Jan, 2022"
},
{
"code": null,
"e": 25905,
"s": 25739,
"text": "This method is used to search for an element that matches the conditions defined by the specified predicate and returns the first occurrence within the entire Arra... |
Introduction to Trend Filtering with Applications in Python | by Ian Ho | Towards Data Science | Introduction to Trend FilteringThe Minimisation Problem behind Trend Filtering Distinctions between H-P & L1 Trend FilteringApplied Trend Filtering for Singapore COE Premiums in Python
Introduction to Trend Filtering
The Minimisation Problem behind Trend Filtering Distinctions between H-P & L1 Trend Filtering
Applied T... | [
{
"code": null,
"e": 357,
"s": 172,
"text": "Introduction to Trend FilteringThe Minimisation Problem behind Trend Filtering Distinctions between H-P & L1 Trend FilteringApplied Trend Filtering for Singapore COE Premiums in Python"
},
{
"code": null,
"e": 389,
"s": 357,
"text": "I... |
How to Create a Custom Image Magnifier using jQuery ? - GeeksforGeeks | 29 Jan, 2020
Glimpse of Image magnifier:
An image magnifier is the zooming capability of your cursor point. Where you placed your cursor in the define div the image will be popped out in zoom mode. Like in the shopping sites, when you want to purchase any kind of cloth and want to check the material or print on that pr... | [
{
"code": null,
"e": 26954,
"s": 26926,
"text": "\n29 Jan, 2020"
},
{
"code": null,
"e": 26982,
"s": 26954,
"text": "Glimpse of Image magnifier:"
},
{
"code": null,
"e": 27482,
"s": 26982,
"text": "An image magnifier is the zooming capability of your cursor po... |
Implementation of DFS using adjacency matrix - GeeksforGeeks | 11 May, 2022
Depth First Search (DFS) has been discussed in this article which uses adjacency list for the graph representation. In this article, adjacency matrix will be used to represent the graph.Adjacency matrix representation: In adjacency matrix representation of a graph, the matrix mat[][] of size n*n (where n i... | [
{
"code": null,
"e": 26828,
"s": 26800,
"text": "\n11 May, 2022"
},
{
"code": null,
"e": 27365,
"s": 26828,
"text": "Depth First Search (DFS) has been discussed in this article which uses adjacency list for the graph representation. In this article, adjacency matrix will be used ... |
How to change legend title in ggplot2 in R? - GeeksforGeeks | 30 May, 2021
In this article, we will see how to change the legend title using ggplot2 in R Programming.
We will use ScatterPlot. For the Data of Scatter Plot, we will pick some 20 random values for the X and Y axis both using rnorm() function which can generate random normal values, and here we have one more paramete... | [
{
"code": null,
"e": 26597,
"s": 26569,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 26690,
"s": 26597,
"text": "In this article, we will see how to change the legend title using ggplot2 in R Programming. "
},
{
"code": null,
"e": 27160,
"s": 26690,
"text"... |
Binary Tree K level sum | Practice | GeeksforGeeks | Given a binary tree and a number K, the task is to find sum of tree nodes at level K. The Binary Tree is given in string form S: (node-value(left-subtree)(right-subtree)).
Example 1:
Input:
K = 2
S = "(0(5(6()())(4()(9()())))(7(1()())(3()())))"
Output:
14
Explanation:
The Tree from the above String will be formed as:... | [
{
"code": null,
"e": 410,
"s": 238,
"text": "Given a binary tree and a number K, the task is to find sum of tree nodes at level K. The Binary Tree is given in string form S: (node-value(left-subtree)(right-subtree))."
},
{
"code": null,
"e": 423,
"s": 412,
"text": "Example 1:"
... |
Read Text file into PySpark Dataframe - GeeksforGeeks | 18 Jul, 2021
In this article, we are going to see how to read text files in PySpark Dataframe.
There are three ways to read text files into PySpark DataFrame.
Using spark.read.text()
Using spark.read.csv()
Using spark.read.format().load()
Using these we can read a single text file, multiple files, and all files from a ... | [
{
"code": null,
"e": 24510,
"s": 24482,
"text": "\n18 Jul, 2021"
},
{
"code": null,
"e": 24592,
"s": 24510,
"text": "In this article, we are going to see how to read text files in PySpark Dataframe."
},
{
"code": null,
"e": 24656,
"s": 24592,
"text": "There ar... |
Get ASCII table in Arduino | In this article, we will walkthrough the example code in Arduino, which helps generate the ASCII table in the Serial Monitor output. For your reference, this is what the ASCII table looks like − http://www.asciitable.com/
It contains the character, followed by its ASCII code in decimal, hexadecimal, and sometimes, even... | [
{
"code": null,
"e": 1284,
"s": 1062,
"text": "In this article, we will walkthrough the example code in Arduino, which helps generate the ASCII table in the Serial Monitor output. For your reference, this is what the ASCII table looks like − http://www.asciitable.com/"
},
{
"code": null,
... |
HTML5 - Syntax | The HTML 5 language has a "custom" HTML syntax that is compatible with HTML 4 and XHTML1 documents published on the Web, but is not compatible with the more esoteric SGML features of HTML 4.
HTML 5 does not have the same syntax rules as XHTML where we needed lower case tag names, quoting our attributes, an attribute ha... | [
{
"code": null,
"e": 2799,
"s": 2608,
"text": "The HTML 5 language has a \"custom\" HTML syntax that is compatible with HTML 4 and XHTML1 documents published on the Web, but is not compatible with the more esoteric SGML features of HTML 4."
},
{
"code": null,
"e": 2979,
"s": 2799,
... |
C library function - atoi() | The C library function int atoi(const char *str) converts the string argument str to an integer (type int).
Following is the declaration for atoi() function.
int atoi(const char *str)
str − This is the string representation of an integral number.
str − This is the string representation of an integral number.
This funct... | [
{
"code": null,
"e": 2115,
"s": 2007,
"text": "The C library function int atoi(const char *str) converts the string argument str to an integer (type int)."
},
{
"code": null,
"e": 2165,
"s": 2115,
"text": "Following is the declaration for atoi() function."
},
{
"code": nu... |
Optimal Strategy for a Game | Set 3 - GeeksforGeeks | 13 Jan, 2022
Consider a row of n coins of values v1 . . . vn, where n is even. We play a game against an opponent by alternating turns. In each turn, a player selects either the first or last coin from the row, removes it from the row permanently, and receives the value of the coin. Determine the maximum possible amoun... | [
{
"code": null,
"e": 24822,
"s": 24794,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 25328,
"s": 24822,
"text": "Consider a row of n coins of values v1 . . . vn, where n is even. We play a game against an opponent by alternating turns. In each turn, a player selects either th... |
Difference between %d and %i format specifier in C | The format specifier %d takes integer value as a signed decimal integer value which means values should be decimal whether it is negative or positive.
Here is an example of format specifier %d in C language,
Live Demo
#include <stdio.h>
int main() {
int v1 = 7456;
int v2 = -17346;
printf("The value in decimal... | [
{
"code": null,
"e": 1213,
"s": 1062,
"text": "The format specifier %d takes integer value as a signed decimal integer value which means values should be decimal whether it is negative or positive."
},
{
"code": null,
"e": 1270,
"s": 1213,
"text": "Here is an example of format sp... |
How to change the point size in geom_point conditionally in R? | To change the point size in geom_point conditionally, we can define the condition in geom_point with aes and the size using scale_size_manual function of ggplot2 package. For example, if we have a data frame called df that contains two columns say x and y then the scatterplot with different size of points for x values ... | [
{
"code": null,
"e": 1464,
"s": 1062,
"text": "To change the point size in geom_point conditionally, we can define the condition in geom_point with aes and the size using scale_size_manual function of ggplot2 package. For example, if we have a data frame called df that contains two columns say x and... |
Converting seconds in years days hours and minutes in JavaScript | We are required to write a JavaScript function that takes in a number, num, that represents the
number of seconds as the first and the only argument.
Our function should then construct and return a string that contains information of years, days,
hours and minutes contained in those seconds, obviously if contained at a... | [
{
"code": null,
"e": 1212,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in a number, num, that represents the\nnumber of seconds as the first and the only argument."
},
{
"code": null,
"e": 1386,
"s": 1212,
"text": "Our function should then constr... |
C library function - longjmp() | The C library function void longjmp(jmp_buf environment, int value) restores the environment saved by the most recent call to setjmp() macro in the same invocation of the program with the corresponding jmp_buf argument.
Following is the declaration for longjmp() function.
void longjmp(jmp_buf environment, int value)
en... | [
{
"code": null,
"e": 2227,
"s": 2007,
"text": "The C library function void longjmp(jmp_buf environment, int value) restores the environment saved by the most recent call to setjmp() macro in the same invocation of the program with the corresponding jmp_buf argument."
},
{
"code": null,
"... |
How to sum rows of VARCHAR datatype or TIME datatype in MySQL? | Let us first create a −
mysql> create table DemoTable1442
-> (
-> DueTime time
-> );
Query OK, 0 rows affected (0.56 sec)
Insert some records in the table using insert −
mysql> insert into DemoTable1442 values('00:08:00');
Query OK, 1 row affected (0.13 sec)
mysql> insert into DemoTable1442 values('00:04:00');... | [
{
"code": null,
"e": 1086,
"s": 1062,
"text": "Let us first create a −"
},
{
"code": null,
"e": 1193,
"s": 1086,
"text": "mysql> create table DemoTable1442\n -> (\n -> DueTime time\n -> );\nQuery OK, 0 rows affected (0.56 sec)"
},
{
"code": null,
"e": 1241,
... |
Can Enum extend any class in java? | Enumeration (enum) in Java is a datatype which stores a set of constant values. You can use enumerations to store fixed values such as days in a week, months in a year etc.
You can define an enumeration using the keyword enum followed by the name of the enumeration as −
enum Days {
SUNDAY, MONDAY, TUESDAY, WEDNESDAY... | [
{
"code": null,
"e": 1235,
"s": 1062,
"text": "Enumeration (enum) in Java is a datatype which stores a set of constant values. You can use enumerations to store fixed values such as days in a week, months in a year etc."
},
{
"code": null,
"e": 1333,
"s": 1235,
"text": "You can d... |
JavaFX - Path Transition | Following is the program which demonstrates Path Transition in JavaFX. Save this code in a file with the name PathTransitionExample.java.
import javafx.animation.PathTransition;
import javafx.application.Application;
import static javafx.application.Application.launch;
import javafx.scene.Group;
import javafx.scen... | [
{
"code": null,
"e": 2038,
"s": 1900,
"text": "Following is the program which demonstrates Path Transition in JavaFX. Save this code in a file with the name PathTransitionExample.java."
},
{
"code": null,
"e": 4804,
"s": 2038,
"text": "import javafx.animation.PathTransition; \nim... |
Check for duplicates in an array in MongoDB? | To check for duplicates in an array, use aggregate() in MongoDB. Let us create a collection with documents −
> db.demo756.insertOne({"SubjectName":["MySQL","MongoDB","Java"]});
{
"acknowledged" : true,
"insertedId" : ObjectId("5eb01e0d5637cd592b2a4add")
}
> db.demo756.insertOne({"SubjectName":["MongoDB","MySQL","... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "To check for duplicates in an array, use aggregate() in MongoDB. Let us create a collection with documents −"
},
{
"code": null,
"e": 1497,
"s": 1171,
"text": "> db.demo756.insertOne({\"SubjectName\":[\"MySQL\",\"MongoDB\",\"Java\"]}... |
Find Index Position of First Non-NA Value in vector in R - GeeksforGeeks | 16 May, 2021
An atomic vector contains elements belonging to the same data type. It may also contain missing or NA values, at any index within the range of this vector. These NA values can be accessed in R using standard indexing methods. In this article, we are going to see how to find the Index Position of First Non-... | [
{
"code": null,
"e": 25242,
"s": 25214,
"text": "\n16 May, 2021"
},
{
"code": null,
"e": 25595,
"s": 25242,
"text": "An atomic vector contains elements belonging to the same data type. It may also contain missing or NA values, at any index within the range of this vector. These N... |
Find the number on the card that remains in the end after performing the given operations - GeeksforGeeks | 15 Apr, 2021
Given an integer N which represents the number of cards in a deck. The deck is ordered from 1 to N where 1 is the topmost card and N is at the bottom. You take out the topmost card from the deck and insert it at the bottom and throw the next card that appears at the top of the deck. Again you do the same t... | [
{
"code": null,
"e": 24732,
"s": 24704,
"text": "\n15 Apr, 2021"
},
{
"code": null,
"e": 25152,
"s": 24732,
"text": "Given an integer N which represents the number of cards in a deck. The deck is ordered from 1 to N where 1 is the topmost card and N is at the bottom. You take out... |
C# Program for Maximum size square sub-matrix with all 1s - GeeksforGeeks | 12 Dec, 2018
Given a binary matrix, find out the maximum size square sub-matrix with all 1s.
For example, consider the below binary matrix.
C#
// C# Code for Maximum size square// sub-matrix with all 1s using System; public class GFG { // method for Maximum size square sub-matrix with all 1s static void printMa... | [
{
"code": null,
"e": 25362,
"s": 25334,
"text": "\n12 Dec, 2018"
},
{
"code": null,
"e": 25442,
"s": 25362,
"text": "Given a binary matrix, find out the maximum size square sub-matrix with all 1s."
},
{
"code": null,
"e": 25489,
"s": 25442,
"text": "For exampl... |
Mahotas - Image Overlay - GeeksforGeeks | 12 Dec, 2021
In this article we will see how we can apply image overlay in mahotas. Image overlay in mahotas create an image which is grayscale, but with possible boolean overlays.
In this tutorial we will use “lena” image, below is the command to load it.
mahotas.demos.load('lena')
Below is the lena image
In order t... | [
{
"code": null,
"e": 25116,
"s": 25088,
"text": "\n12 Dec, 2021"
},
{
"code": null,
"e": 25284,
"s": 25116,
"text": "In this article we will see how we can apply image overlay in mahotas. Image overlay in mahotas create an image which is grayscale, but with possible boolean overl... |
Signal Chain Analysis in Python. A Case Study for Hardware Engineers | by Gael Close | Towards Data Science | Signal chains are common in hardware electronics. Typically a physical signal (temperature, position, pressure ...) is transformed through the chain via a series of operations. Given the practical hardware limitations, the transformation introduces some errors. Predicting the overall performance in the presence of erro... | [
{
"code": null,
"e": 1048,
"s": 172,
"text": "Signal chains are common in hardware electronics. Typically a physical signal (temperature, position, pressure ...) is transformed through the chain via a series of operations. Given the practical hardware limitations, the transformation introduces some ... |
Python - Log Normal Distribution in Statistics - GeeksforGeeks | 31 Dec, 2019
scipy.stats.lognorm() is a log-Normal continuous random variable. It is inherited from the of generic methods as an instance of the rv_continuous class. It completes the methods with details specific for this particular distribution.
Parameters :
q : lower and upper tail probabilityx : quantilesloc : [opti... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n31 Dec, 2019"
},
{
"code": null,
"e": 24446,
"s": 24212,
"text": "scipy.stats.lognorm() is a log-Normal continuous random variable. It is inherited from the of generic methods as an instance of the rv_continuous class. It complet... |
Count all unique outcomes possible by performing S flips on N coins - GeeksforGeeks | 11 Jun, 2021
Given two positive integers N and S, the task is to count the number of unique outcomes possible when S flip operations are performed on N coins.
Examples:
Input: N = 3, S = 4Output: 3Explanation: Considering the initial configuration of coins to be “HHH”, then the possible combinations of 4 flips are:
Fli... | [
{
"code": null,
"e": 24592,
"s": 24564,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 24738,
"s": 24592,
"text": "Given two positive integers N and S, the task is to count the number of unique outcomes possible when S flip operations are performed on N coins."
},
{
"co... |
QlikView - Cross Tables | While analyzing data, we come across situations where we desire columns to become rows and vice-versa. It is not just about transposing, it also involves rolling up many columns together or repeating many values in a row many times to achieve the desired column and row layout in the table.
Consider the following input ... | [
{
"code": null,
"e": 3211,
"s": 2920,
"text": "While analyzing data, we come across situations where we desire columns to become rows and vice-versa. It is not just about transposing, it also involves rolling up many columns together or repeating many values in a row many times to achieve the desire... |
Concatenate Two Maps in Scala - GeeksforGeeks | 13 Aug, 2019
The concatenation of Scala map is obtained by utilizing ++ operator.Syntax :
def ++(xs: Map[(A, B)]): Map[A, B]
Return Type:It returns a single map by concatenating two maps but it separates the identical keys.Example #1:
// Scala program of concatenating// two maps // Creating objectobject GfG{ //... | [
{
"code": null,
"e": 23904,
"s": 23876,
"text": "\n13 Aug, 2019"
},
{
"code": null,
"e": 23981,
"s": 23904,
"text": "The concatenation of Scala map is obtained by utilizing ++ operator.Syntax :"
},
{
"code": null,
"e": 24017,
"s": 23981,
"text": "def ++(xs: Ma... |
Python | Pandas dataframe.pct_change() - GeeksforGeeks | 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.pct_change() function calculates the percentage change between the current a... | [
{
"code": null,
"e": 26229,
"s": 26201,
"text": "\n22 Nov, 2018"
},
{
"code": null,
"e": 26443,
"s": 26229,
"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 a... |
C++ Programming and STL Facts - GeeksforGeeks | C++ Programming and STL Facts
sqrt, sqrtl and sqrtf in C++
Power Function in C/C++
tolower() function in C
Measure execution time with high precision in C/C++
Measure execution time of a function in C++
How to measure time taken by a function in C?
time() function in C
Program to reverse a string (Iterative and Recursi... | [
{
"code": null,
"e": 22192,
"s": 22162,
"text": "C++ Programming and STL Facts"
},
{
"code": null,
"e": 22221,
"s": 22192,
"text": "sqrt, sqrtl and sqrtf in C++"
},
{
"code": null,
"e": 22245,
"s": 22221,
"text": "Power Function in C/C++"
},
{
"code": ... |
getent - Unix, Linux Command | $ getent services 22
ssh 22/tcp
$ getent services 21
ftp 21/tcp
$ getent services 25
smtp 25/tcp mail
$ getent passwd `whoami`
root:x:0:0:root:/root:/bin/bash
$ getent hosts myhost.mydomain.com
15.77.3.40 myhost.mydomain.com myhost
129 Lectures
23... | [
{
"code": null,
"e": 10733,
"s": 10577,
"text": "$ getent services 22\nssh 22/tcp\n$ getent services 21\nftp 21/tcp\n$ getent services 25\nsmtp 25/tcp mail\n"
},
{
"code": null,
"e": 10791,
"s": 10733,
"text": "$ getent passwd ... |
How to Calculate Point-Biserial Correlation in R? - GeeksforGeeks | 24 Dec, 2021
In this article, we will discuss how to calculate Point Biserial correlation in R Programming Language.
Correlation measures the relationship between two variables. we can say the correlation is positive if the value is 1, the correlation is negative if the value is -1, else 0. Point biserial correlation r... | [
{
"code": null,
"e": 26487,
"s": 26459,
"text": "\n24 Dec, 2021"
},
{
"code": null,
"e": 26591,
"s": 26487,
"text": "In this article, we will discuss how to calculate Point Biserial correlation in R Programming Language."
},
{
"code": null,
"e": 26966,
"s": 26591,... |
Admin-Scanner – Find Admin Panel Of Any Website By Using Custom Wordlist - GeeksforGeeks | 12 Jan, 2022
Admin or Administrators is the role with the highest privilege or highest level of access to your website or domain. Administrators can add content on all pages and access all items in the specified Admin Toolbar or page, which means that admins can control-wide settings like the design of tour websites or... | [
{
"code": null,
"e": 24504,
"s": 24476,
"text": "\n12 Jan, 2022"
},
{
"code": null,
"e": 24940,
"s": 24504,
"text": "Admin or Administrators is the role with the highest privilege or highest level of access to your website or domain. Administrators can add content on all pages an... |
Introduction to JSP - GeeksforGeeks | 02 Jul, 2018
It stands for Java Server Pages.
It is a server side technology.
It is used for creating web application.
It is used to create dynamic web content.
In this JSP tags are used to insert JAVA code into HTML pages.
It is an advanced version of Servlet Technology.
It is a Web based technology helps us to create... | [
{
"code": null,
"e": 25754,
"s": 25726,
"text": "\n02 Jul, 2018"
},
{
"code": null,
"e": 25787,
"s": 25754,
"text": "It stands for Java Server Pages."
},
{
"code": null,
"e": 25819,
"s": 25787,
"text": "It is a server side technology."
},
{
"code": nul... |
String in Switch Case in Java | A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each case.
Live Demo
public class Test {
public static void main(String args[]) {
// char grade = args[0].charAt(0);
char grade = 'C';
... | [
{
"code": null,
"e": 1241,
"s": 1062,
"text": "A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each case."
},
{
"code": null,
"e": 1252,
"s": 1241,
"text": " Li... |
How to assign multiple values to same variable in C#?
| To set multiple values to same variable, use arrays in C#. Let’s say instead of taking 5 variables, set these 5 variables using arrays in a single variable.
The following is an example to set three values to a single variable with a string array −
string[] arr = new string[3];
Let us now initialize it −
string[] arr = ... | [
{
"code": null,
"e": 1219,
"s": 1062,
"text": "To set multiple values to same variable, use arrays in C#. Let’s say instead of taking 5 variables, set these 5 variables using arrays in a single variable."
},
{
"code": null,
"e": 1310,
"s": 1219,
"text": "The following is an examp... |
Adding borders to the images using Python - OpenCV - GeeksforGeeks | 07 Oct, 2021
Image processing is an interesting field in today’s era of Artificial Intelligence and Machine Learning. We can see the applications of image processing in our day-to-day life, like whenever we apply filter over any image (selfie) or when we want to apply some effect like blurring the image, etc.
In this ... | [
{
"code": null,
"e": 24316,
"s": 24288,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 24615,
"s": 24316,
"text": "Image processing is an interesting field in today’s era of Artificial Intelligence and Machine Learning. We can see the applications of image processing in our day... |
Binary representation of a given number - GeeksforGeeks | 27 Dec, 2021
Write a program to print Binary representation of a given number.
Source: Microsoft Interview Set-3
Method 1: Iterative For any number, we can check whether its ‘i’th bit is 0(OFF) or 1(ON) by bitwise ANDing it with “2^i” (2 raise to i).
1) Let us take number 'NUM' and we want to check whether it's 0th ... | [
{
"code": null,
"e": 25050,
"s": 25022,
"text": "\n27 Dec, 2021"
},
{
"code": null,
"e": 25117,
"s": 25050,
"text": "Write a program to print Binary representation of a given number. "
},
{
"code": null,
"e": 25152,
"s": 25117,
"text": "Source: Microsoft Inter... |
Find the number closest to n and divisible by m - GeeksforGeeks | 16 Apr, 2021
Given two integers n and m. The problem is to find the number closest to n and divisible by m. If there are more than one such number, then output the one having maximum absolute value. If n is completely divisible by m, then output n only. Time complexity of O(1) is required.Constraints: m != 0Examples: ... | [
{
"code": null,
"e": 24716,
"s": 24688,
"text": "\n16 Apr, 2021"
},
{
"code": null,
"e": 25024,
"s": 24716,
"text": "Given two integers n and m. The problem is to find the number closest to n and divisible by m. If there are more than one such number, then output the one having m... |
How node.js prevents blocking code ? - GeeksforGeeks | 25 Jun, 2021
Node.js is a cross-platform JavaScript runtime environment that helps to execute and implement server-side programs. Node is assumed to prevent blocking code by using a single-threaded event loop. In this article, we will discuss this event loop and how it asynchronously implements functions by using callb... | [
{
"code": null,
"e": 25002,
"s": 24974,
"text": "\n25 Jun, 2021"
},
{
"code": null,
"e": 25315,
"s": 25002,
"text": "Node.js is a cross-platform JavaScript runtime environment that helps to execute and implement server-side programs. Node is assumed to prevent blocking code by us... |
How to store drawable resources ID in the form of R.drawable.* inside an array using an XML values file? | This example demonstrates about How to store drawable resources ID in the form of R.drawable.* inside an array using an XML values file
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/values/ arrays.x... | [
{
"code": null,
"e": 1198,
"s": 1062,
"text": "This example demonstrates about How to store drawable resources ID in the form of R.drawable.* inside an array using an XML values file"
},
{
"code": null,
"e": 1327,
"s": 1198,
"text": "Step 1 − Create a new project in Android Studi... |
Bulma - Column layout and Sizes | Bulma allows building column layout very easily by adding column class in the container.
Add the column class within columns container, to create each column with equal width in the webpage as shown in the below example.
Note − Resize the coding-ground output window to see the changes occurring according to window size... | [
{
"code": null,
"e": 1787,
"s": 1698,
"text": "Bulma allows building column layout very easily by adding column class in the container."
},
{
"code": null,
"e": 1919,
"s": 1787,
"text": "Add the column class within columns container, to create each column with equal width in the ... |
Tryit Editor v3.7 | Tryit: HTML class attribute | [] |
The Ultimate Beginner’s Guide to TensorFlow | by Siddharth Sharma | Towards Data Science | In this tutorial, we will cover TensorFlow in enough depth so that you can train machine learning models from scratch!
TensorFlow is Google’s flagship library for machine learning development. It is used both commercially and by developers for building and deploying machine learning modules. There are two broad version... | [
{
"code": null,
"e": 291,
"s": 172,
"text": "In this tutorial, we will cover TensorFlow in enough depth so that you can train machine learning models from scratch!"
},
{
"code": null,
"e": 1022,
"s": 291,
"text": "TensorFlow is Google’s flagship library for machine learning devel... |
Ensembles of Deep Networks. This article discusses the Hydra... | by Connor Shorten | Towards Data Science | Ensembles of models refers to the practice of combining predictions from multiple statistical models to form one final prediction. This opens up opportunity for diversity in the representational capacity of the model. This concept is analogous to anecdotes such as seeking the opinion of multiple doctors. Ensembles of m... | [
{
"code": null,
"e": 1032,
"s": 172,
"text": "Ensembles of models refers to the practice of combining predictions from multiple statistical models to form one final prediction. This opens up opportunity for diversity in the representational capacity of the model. This concept is analogous to anecdot... |
How to Extract the Text from PDFs Using Python and the Google Cloud Vision API | by Silvia Zeamer | Towards Data Science | This winter, I discovered that Wellesley College, where I am currently a senior studying Media Arts and Sciences, has an archive of over a hundred year’s worth of course catalogues, admissions guidelines, and yearly bulletins. I was immediately electrified by the potential for fascinating data which could be drawn from... | [
{
"code": null,
"e": 660,
"s": 172,
"text": "This winter, I discovered that Wellesley College, where I am currently a senior studying Media Arts and Sciences, has an archive of over a hundred year’s worth of course catalogues, admissions guidelines, and yearly bulletins. I was immediately electrifie... |
How to create a URL object using JavaScript? | Following is the code to create a URL object using JavaScript −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-seri... | [
{
"code": null,
"e": 1126,
"s": 1062,
"text": "Following is the code to create a URL object using JavaScript −"
},
{
"code": null,
"e": 1137,
"s": 1126,
"text": " Live Demo"
},
{
"code": null,
"e": 2102,
"s": 1137,
"text": "<!DOCTYPE html>\n<html lang=\"en\">\... |
Static keyword in C# - GeeksforGeeks | 21 May, 2021
static is a modifier in C# which is applicable for the following:
Classes
Variables
Methods
Constructor
It is also applicable to properties, event, and operators. To create a static member(class, variable, methods, constructor), precede its declaration with the keyword static. When a member is declared st... | [
{
"code": null,
"e": 23888,
"s": 23860,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 23955,
"s": 23888,
"text": "static is a modifier in C# which is applicable for the following: "
},
{
"code": null,
"e": 23963,
"s": 23955,
"text": "Classes"
},
{
"... |
8085 program to find nth power of a number - GeeksforGeeks | 07 Sep, 2018
Problem – Write an assembly language code for calculating the nth power of a number using 8085 microprocessor.
Example –
Input : Base=>02H
Exponent=>03H
Output :08H
In 8085 microprocessor, no direct instruction exists to multiply two numbers, so multiplication is done by repeated addition as 4*... | [
{
"code": null,
"e": 25136,
"s": 25108,
"text": "\n07 Sep, 2018"
},
{
"code": null,
"e": 25247,
"s": 25136,
"text": "Problem – Write an assembly language code for calculating the nth power of a number using 8085 microprocessor."
},
{
"code": null,
"e": 25257,
"s":... |
C# Interface Types | Interfaces define properties, methods, and events, which are the members of the interface.Interfaces contain only the declaration of the members.
Some of the interface types in C# include.
IEnumerable − Base interface for all generic collections.
IEnumerable − Base interface for all generic collections.
IList − A gener... | [
{
"code": null,
"e": 1208,
"s": 1062,
"text": "Interfaces define properties, methods, and events, which are the members of the interface.Interfaces contain only the declaration of the members."
},
{
"code": null,
"e": 1251,
"s": 1208,
"text": "Some of the interface types in C# in... |
PHP Boolean Data Type | This is one of the scalar data types in PHP. A boolean data can be either TRUE or FALSE. These are predefined constants in PHP. The variable becomes a boolean variable when either TRUE or FALSE is assigned.
<?php
//Literal assignment of boolean value to variable
$var=TRUE;
?>
Result of echoing TRUE value displays 1 whi... | [
{
"code": null,
"e": 1269,
"s": 1062,
"text": "This is one of the scalar data types in PHP. A boolean data can be either TRUE or FALSE. These are predefined constants in PHP. The variable becomes a boolean variable when either TRUE or FALSE is assigned."
},
{
"code": null,
"e": 1339,
... |
Apex - Data Types | The Apex language is strongly typed so every variable in Apex will be declared with the specific data type. All apex variables are initialized to null initially. It is always recommended for a developer to make sure that proper values are assigned to the variables. Otherwise such variables when used, will throw null po... | [
{
"code": null,
"e": 2418,
"s": 2052,
"text": "The Apex language is strongly typed so every variable in Apex will be declared with the specific data type. All apex variables are initialized to null initially. It is always recommended for a developer to make sure that proper values are assigned to th... |
Recommender System. A Recommender System refers to a system... | by Rishabh Mall | Towards Data Science | A Recommender System refers to a system that is capable of predicting the future preference of a set of items for a user, and recommend the top items. One key reason why we need a recommender system in modern society is that people have too much options to use from due to the prevalence of Internet. In the past, people... | [
{
"code": null,
"e": 1184,
"s": 171,
"text": "A Recommender System refers to a system that is capable of predicting the future preference of a set of items for a user, and recommend the top items. One key reason why we need a recommender system in modern society is that people have too much options ... |
The fork() Function in Perl | Perl provides a fork() function that corresponds to the Unix system call of the same name. On most Unix-like platforms where the fork() system call is available, Perl's fork() simply calls it. On some platforms such as Windows where the fork() system call is not available, Perl can be built to emulate fork() at the int... | [
{
"code": null,
"e": 1398,
"s": 1062,
"text": "Perl provides a fork() function that corresponds to the Unix system call of the same name. On most Unix-like platforms where the fork() system call is available, Perl's fork() simply calls it. On some platforms such as Windows where the fork() system ca... |
Python | Every Kth element removal in List - GeeksforGeeks | 19 Feb, 2020
We generally wish to employ a particular function to all the elements in a list. But sometimes, according to requirement we would wish to remove certain elements of the list, basically to every Kth element in list. Let’s discuss certain ways in which this can be performed.
Method #1 : Using list comprehens... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n19 Feb, 2020"
},
{
"code": null,
"e": 24175,
"s": 23901,
"text": "We generally wish to employ a particular function to all the elements in a list. But sometimes, according to requirement we would wish to remove certain elements o... |
Perl Bitwise Operators Example | There are following Bitwise operators supported by Perl language, assume if $a = 60; and $b = 13 −
&
Binary AND Operator copies a bit to the result if it exists in both operands.
Example − ($a & $b) will give 12 which is 0000 1100
|
Binary OR Operator copies a bit if it exists in eather operand.
Example − ($a | $b) wil... | [
{
"code": null,
"e": 2319,
"s": 2220,
"text": "There are following Bitwise operators supported by Perl language, assume if $a = 60; and $b = 13 −"
},
{
"code": null,
"e": 2321,
"s": 2319,
"text": "&"
},
{
"code": null,
"e": 2399,
"s": 2321,
"text": "Binary AND... |
Introduction to Machine Learning Algorithms: Linear Regression | by Rohith Gandhi | Towards Data Science | Artificial Intelligence has become prevalent recently. People across different disciplines are trying to apply AI to make their tasks a lot easier. For example, economists are using AI to predict future market prices to make a profit, doctors use AI to classify whether a tumor is malignant or benign, meteorologists use... | [
{
"code": null,
"e": 1053,
"s": 172,
"text": "Artificial Intelligence has become prevalent recently. People across different disciplines are trying to apply AI to make their tasks a lot easier. For example, economists are using AI to predict future market prices to make a profit, doctors use AI to c... |
Write a C program to compare two strings using strncmp library function | Strncmp is a predefined library function present in string.h file, it used to compare two strings and display which string is greater.
This function compares 2 strings. It returns the ASCII difference of the first two non– matching characters in both the strings.
int strcmp (string1, string2);
If the difference is equa... | [
{
"code": null,
"e": 1197,
"s": 1062,
"text": "Strncmp is a predefined library function present in string.h file, it used to compare two strings and display which string is greater."
},
{
"code": null,
"e": 1326,
"s": 1197,
"text": "This function compares 2 strings. It returns th... |
Find common elements in three sorted arrays by dictionary intersection in Python | While manipulating data using python we may come across situation where we need to find the elements which are common among the multiple arrays. This can be achieved by converting the arrayd into dictionaries as shown below.
In the below example we take the arrays and apply the Counter container from collections module... | [
{
"code": null,
"e": 1287,
"s": 1062,
"text": "While manipulating data using python we may come across situation where we need to find the elements which are common among the multiple arrays. This can be achieved by converting the arrayd into dictionaries as shown below."
},
{
"code": null,
... |
EJB - Persistence | EJB 3.0, entity bean used in EJB 2.0 is largely replaced by persistence mechanism. Now entity bean is a simple POJO having mapping with table.
Following are the key actors in persistence API −
Entity − A persistent object representing the data-store record. It is good to be serializable.
Entity − A persistent object re... | [
{
"code": null,
"e": 2190,
"s": 2047,
"text": "EJB 3.0, entity bean used in EJB 2.0 is largely replaced by persistence mechanism. Now entity bean is a simple POJO having mapping with table."
},
{
"code": null,
"e": 2240,
"s": 2190,
"text": "Following are the key actors in persist... |
Count nodes in Circular linked list - GeeksforGeeks | 27 Oct, 2021
Given a circular linked list, count the number of nodes in it. For example, the output is 5 for the below list.
We use the concept used in Circular Linked List | Set 2 (Traversal). While traversing, we keep track of the count of nodes.
C++
Java
Python3
C#
Javascript
// c++ program to count number of n... | [
{
"code": null,
"e": 31011,
"s": 30983,
"text": "\n27 Oct, 2021"
},
{
"code": null,
"e": 31124,
"s": 31011,
"text": "Given a circular linked list, count the number of nodes in it. For example, the output is 5 for the below list. "
},
{
"code": null,
"e": 31250,
"s... |
MySQL queries to update date records with NULL values | You can use IFNULL() for this. Let us first create a table −
mysql> create table DemoTable
-> (
-> added_date date,
-> updated_date date
-> );
Query OK, 0 rows affected (0.95 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values('2019-01-10','2019-06-01');
Query OK... | [
{
"code": null,
"e": 1123,
"s": 1062,
"text": "You can use IFNULL() for this. Let us first create a table −"
},
{
"code": null,
"e": 1254,
"s": 1123,
"text": "mysql> create table DemoTable\n -> (\n -> added_date date,\n -> updated_date date\n -> );\nQuery OK, 0 rows affec... |
How to print unique elements from two unsorted arrays using JavaScript ? - GeeksforGeeks | 14 Sep, 2020
Given two unsorted arrays, the task is to write a JavaScript program to print the unique (uncommon) elements in the two arrays.
Approach:
Create an empty array that would store the unique elements from the two arrays.
Iterate over all elements of array1 using a loop.
Set the initial flag value as 0 for eac... | [
{
"code": null,
"e": 25300,
"s": 25272,
"text": "\n14 Sep, 2020"
},
{
"code": null,
"e": 25428,
"s": 25300,
"text": "Given two unsorted arrays, the task is to write a JavaScript program to print the unique (uncommon) elements in the two arrays."
},
{
"code": null,
"e"... |
What is dynamic binding in C#? | In Dynamic binding, the compiler will not do type checking at compile time. At runtime, the checking is done.
Use it to avoid the restriction of anonymous types to one method. This is only because the type name is visible only to the compiler; therefore, you cannot declare it as the return value of a method.
Let us see... | [
{
"code": null,
"e": 1172,
"s": 1062,
"text": "In Dynamic binding, the compiler will not do type checking at compile time. At runtime, the checking is done."
},
{
"code": null,
"e": 1372,
"s": 1172,
"text": "Use it to avoid the restriction of anonymous types to one method. This i... |
Bitcoin - How do they work? | The process of creating or minting bitcoins is difficult to hack and this gives security to bitcoins. Another layer of security is the provision that every transaction has to be verified before being validated. This verification is effected through "mining". Mining is a process where some high-level computing like SHA2... | [
{
"code": null,
"e": 2243,
"s": 1870,
"text": "The process of creating or minting bitcoins is difficult to hack and this gives security to bitcoins. Another layer of security is the provision that every transaction has to be verified before being validated. This verification is effected through \"mi... |
Android - RadioButton Control | A RadioButton has two states: either checked or unchecked.This allows the user to select one option from a set.
This example will take you through simple steps to show how to create your own Android application using Linear Layout and RadioButton.
Following is the content of the modified main activity file src/MainActi... | [
{
"code": null,
"e": 3719,
"s": 3607,
"text": "A RadioButton has two states: either checked or unchecked.This allows the user to select one option from a set."
},
{
"code": null,
"e": 3855,
"s": 3719,
"text": "This example will take you through simple steps to show how to create ... |
Node.js process.uptime() Method - GeeksforGeeks | 11 Oct, 2021
The process.uptime() method is an inbuilt application programming interface of the process module which is used to get the number of seconds the Node.js process is running.
Syntax:
process.uptime();
Parameters: This method does not accept any parameter.
Return Value: It returns a floating-point number spec... | [
{
"code": null,
"e": 24043,
"s": 24015,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 24216,
"s": 24043,
"text": "The process.uptime() method is an inbuilt application programming interface of the process module which is used to get the number of seconds the Node.js process is... |
Arduino - Ifâ¦else if â¦else statement | The if statement can be followed by an optional else if...else statement, which is very useful to test various conditions using single if...else if statement.
When using if...else if...else statements, keep in mind −
An if can have zero or one else statement and it must come after any else if's.
An if can have zero or ... | [
{
"code": null,
"e": 3029,
"s": 2870,
"text": "The if statement can be followed by an optional else if...else statement, which is very useful to test various conditions using single if...else if statement."
},
{
"code": null,
"e": 3087,
"s": 3029,
"text": "When using if...else if... |
C# | Uri.CheckHostName(String) Method - GeeksforGeeks | 01 May, 2019
Uri.CheckHostName(String) Method is used to determine whether the specified host name is a valid DNS name or not.
Syntax: public static UriHostNameType CheckHostName (string name);Here, it takes the host name to validate. This can be an IPv4 or IPv6 address or an Internet host name.
Return Value: This meth... | [
{
"code": null,
"e": 23911,
"s": 23883,
"text": "\n01 May, 2019"
},
{
"code": null,
"e": 24025,
"s": 23911,
"text": "Uri.CheckHostName(String) Method is used to determine whether the specified host name is a valid DNS name or not."
},
{
"code": null,
"e": 24195,
"... |
How to check the given string is palindrome using JavaScript ? - GeeksforGeeks | 07 Oct, 2021
A palindrome is a word, sentence, or even number that reads the same from the back and from the front. Therefore if we take the input, reverse the string and check if the reversed string and the original string are equal, it means the string is a palindrome, otherwise, it is not.
Approach:
When the user cl... | [
{
"code": null,
"e": 26731,
"s": 26703,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 27012,
"s": 26731,
"text": "A palindrome is a word, sentence, or even number that reads the same from the back and from the front. Therefore if we take the input, reverse the string and check... |
What does the interface ICloneable do in C#? | The ICloneable interface creates a copy of the exisiting object i.e a clone.
It only has a single method −
Clone() − The clone() method creates a new object that is a copy of the current instance.
Clone() − The clone() method creates a new object that is a copy of the current instance.
The following is an example showi... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "The ICloneable interface creates a copy of the exisiting object i.e a clone."
},
{
"code": null,
"e": 1169,
"s": 1139,
"text": "It only has a single method −"
},
{
"code": null,
"e": 1259,
"s": 1169,
"text": "Clon... |
Ruby Static Members - GeeksforGeeks | 06 Dec, 2019
In Programming, static keywords are primarily used for memory management. The static keyword is used to share the same method or variable of a class across the objects of that class.
There are various members of a class in Ruby. Once an object is created in Ruby, the methods and variables for that object a... | [
{
"code": null,
"e": 25370,
"s": 25342,
"text": "\n06 Dec, 2019"
},
{
"code": null,
"e": 25553,
"s": 25370,
"text": "In Programming, static keywords are primarily used for memory management. The static keyword is used to share the same method or variable of a class across the obj... |
Construction of the machines to produce residue modulo ‘2’ of binary numbers - GeeksforGeeks | 20 Nov, 2019
Prerequisite: Mealy and Moore Machines, Difference between Mealy machine and Moore machineIn this article, we will see some designing of Finite Automata with Output i.e, Moore and Mealy machines.
Problem: Construction of the machines that take the binary number {0, 1} as input and produce residue modulo ‘2... | [
{
"code": null,
"e": 24352,
"s": 24324,
"text": "\n20 Nov, 2019"
},
{
"code": null,
"e": 24548,
"s": 24352,
"text": "Prerequisite: Mealy and Moore Machines, Difference between Mealy machine and Moore machineIn this article, we will see some designing of Finite Automata with Outpu... |
Control Size of ggplot2 Legend Items in R - GeeksforGeeks | 30 May, 2021
In this article, we will see how to control the size of ggplot2 Legend Items in R Programming Language. To create an R plot, we use ggplot() function and for making a scatter plot geom_point() function is added to ggplot() function.
Let us first create a regular plot without any modifications so that the d... | [
{
"code": null,
"e": 25340,
"s": 25312,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 25573,
"s": 25340,
"text": "In this article, we will see how to control the size of ggplot2 Legend Items in R Programming Language. To create an R plot, we use ggplot() function and for makin... |
Accessing protected members in a C++ derived class | A class in C++ has public, private and protected sections which contain the corresponding class members. Protected members in a class are similar to private members as they cannot be accessed from outside the class. But they can be accessed by derived classes or child classes while private members cannot.
A program tha... | [
{
"code": null,
"e": 1369,
"s": 1062,
"text": "A class in C++ has public, private and protected sections which contain the corresponding class members. Protected members in a class are similar to private members as they cannot be accessed from outside the class. But they can be accessed by derived c... |
Build REST API for Machine Learning Models using Python and Flask-RESTful | by Zhou (Joe) Xu | Towards Data Science | · 1. Introduction· 2. Environment Setup ∘ 2.1 Using conda ∘ 2.2 Using pip ∘ 2.3 Create a conda environment for it· 3. Train a minimal ML model· 4. Build the REST API ∘ 4.1 Understand the code ∘ 4.2 Spin up the REST API· 5. Test the API· Conclusion· About Me· References
Note: All the code and results mentioned in this p... | [
{
"code": null,
"e": 441,
"s": 171,
"text": "· 1. Introduction· 2. Environment Setup ∘ 2.1 Using conda ∘ 2.2 Using pip ∘ 2.3 Create a conda environment for it· 3. Train a minimal ML model· 4. Build the REST API ∘ 4.1 Understand the code ∘ 4.2 Spin up the REST API· 5. Test the API· Conclusion· About ... |
What is Bitwise NOT Operator (~) in JavaScript? | It is a unary operator and operates by reversing all the bits in the operand.
You can try to run the following code to learn how to work with Bitwise NOT Operator(~) −
<html>
<body>
<script>
var b = 3; // Bit presentation 11
document.write("(~b) => ");
result = (~b);
docu... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "It is a unary operator and operates by reversing all the bits in the operand."
},
{
"code": null,
"e": 1230,
"s": 1140,
"text": "You can try to run the following code to learn how to work with Bitwise NOT Operator(~) −"
},
{
... |
Which one is better to insert NULL or empty string in MySQL? | In innoDB, NULL occupies less space as compared to empty string. Also, the NULL length is
null while length of the empty string is 0.
To understand this, a table is created with the help of create command which is given as
follows −
mysql> CREATE table DemoEmptyAndNULL
-> (
-> Message varchar(100)
-> );
Query OK, 0 row... | [
{
"code": null,
"e": 1196,
"s": 1062,
"text": "In innoDB, NULL occupies less space as compared to empty string. Also, the NULL length is\nnull while length of the empty string is 0."
},
{
"code": null,
"e": 1295,
"s": 1196,
"text": "To understand this, a table is created with the... |
Python program to print even numbers in a list | In this article, we will learn about the solution and approach to solve the given problem statement.
Given a list iterable, we need to print all the even numbers in the list.
Here we will be discussing three approaches for the given problem statement.
list1 = [11,23,45,23,64,22,11,24]
# iteration
for num in list1:
#... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "In this article, we will learn about the solution and approach to solve the given problem statement."
},
{
"code": null,
"e": 1237,
"s": 1163,
"text": "Given a list iterable, we need to print all the even numbers in the list."
},
... |
Preorder from Inorder and Postorder traversals in C++ | In this problem, we are given the inorder and postorder traversal of a binary tree. Our task is to print the postorder traversal of the tree.
Let’s take an example to understand the problem
Input:inorder: 16 7 21 12 1 5 9
postorder: 16 21 7 1 9 5 12
Output: preorder: 12 7 16 21 5 1 9
Explanation: the binary tree is :
T... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "In this problem, we are given the inorder and postorder traversal of a binary tree. Our task is to print the postorder traversal of the tree."
},
{
"code": null,
"e": 1252,
"s": 1204,
"text": "Let’s take an example to understand the ... |
CHAR() Function in SQL - GeeksforGeeks | 31 Aug, 2020
CHAR() :This function could be used to find the character based on the ASCII (American Standard Code for Information Interchange) code. CHAR() function do not support multiple integers as arguments.
Syntax :
SELECT CHAR(code);
Note –Parameter code is mandatory, code evaluates to an integer value from 0 to... | [
{
"code": null,
"e": 23877,
"s": 23849,
"text": "\n31 Aug, 2020"
},
{
"code": null,
"e": 24076,
"s": 23877,
"text": "CHAR() :This function could be used to find the character based on the ASCII (American Standard Code for Information Interchange) code. CHAR() function do not supp... |
How to display date and time picker in ReactNative? | To display date and time picker in your app you have to install a package as shown
below −
npm install @react-native-community/datetimepicker --save
Once you are done installing, let us now proceed on how to display a Datepicker first.
Import the datetimepicker component first as shown below −
import DateTimePicker fro... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "To display date and time picker in your app you have to install a package as shown\nbelow −"
},
{
"code": null,
"e": 1211,
"s": 1153,
"text": "npm install @react-native-community/datetimepicker --save"
},
{
"code": null,
... |
Perl uc Function | This function returns an uppercased version of EXPR, or $_ if not specified. Check ucfirst() function which will return only first character in uppercase.
Following is the simple syntax for this function −
uc EXPR
uc
This function returns String in uppercase.
Following is the example code showing its basic usage −
#!... | [
{
"code": null,
"e": 2375,
"s": 2220,
"text": "This function returns an uppercased version of EXPR, or $_ if not specified. Check ucfirst() function which will return only first character in uppercase."
},
{
"code": null,
"e": 2426,
"s": 2375,
"text": "Following is the simple syn... |
How to change a color bar in Plotly in Python - GeeksforGeeks | 28 Nov, 2021
In this article, we will learn how to change a color bar in Plotly Python.
Syntax:
We can change the color by using the color scale.
fig = go.Figure(data=go.Scatter(
y=np.random.randn(500),
mode='markers',
marker=dict(
size=8,
# set color equal to a variable
co... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 24368,
"s": 24292,
"text": "In this article, we will learn how to change a color bar in Plotly Python. "
},
{
"code": null,
"e": 24376,
"s": 24368,
"text": "Syntax:"
},
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.