title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Different ways to instantiate an object in C++ with Examples - GeeksforGeeks | 27 Dec, 2021
prerequisite: C++ Classes and Objects
Different Ways to Instantiate an Object
In C++, there are different ways to instantiate an objects and one of the method is using Constructors. These are special class members which are called by the compiler every time an object of that class is instantiated. There ar... | [
{
"code": null,
"e": 24018,
"s": 23990,
"text": "\n27 Dec, 2021"
},
{
"code": null,
"e": 24056,
"s": 24018,
"text": "prerequisite: C++ Classes and Objects"
},
{
"code": null,
"e": 24096,
"s": 24056,
"text": "Different Ways to Instantiate an Object"
},
{
... |
Neo4j CQL - AGGREGATION | Like SQL, Neo4j CQL has provided some aggregation functions to use in RETURN clause. It is similar to GROUP BY clause in SQL
We can use this RETURN + Aggregation Functions in MATCH command to work on a group of nodes and return some aggregated value.
Now we will discuss each Neo4j CQL AGGREGATION Functions in detail wi... | [
{
"code": null,
"e": 2464,
"s": 2339,
"text": "Like SQL, Neo4j CQL has provided some aggregation functions to use in RETURN clause. It is similar to GROUP BY clause in SQL"
},
{
"code": null,
"e": 2590,
"s": 2464,
"text": "We can use this RETURN + Aggregation Functions in MATCH c... |
Merge two sorted arrays in Java | Two sorted arrays can be merged so that a single resultant sorted array is obtained. An example of this is given as follows.
Array 1 = 1 3 7 9 10
Array 2 = 2 5 8
Merged array = 1 2 3 5 7 8 9 10
A program that demonstrates this is given as follows.
Live Demo
public class Example {
public static void main (String[] a... | [
{
"code": null,
"e": 1187,
"s": 1062,
"text": "Two sorted arrays can be merged so that a single resultant sorted array is obtained. An example of this is given as follows."
},
{
"code": null,
"e": 1256,
"s": 1187,
"text": "Array 1 = 1 3 7 9 10\nArray 2 = 2 5 8\nMerged array = 1 2... |
Java Program For Swapping Nodes In A Linked List Without Swapping Data - GeeksforGeeks | 30 Mar, 2022
Given a linked list and two keys in it, swap nodes for two given keys. Nodes should be swapped by changing links. Swapping data of nodes may be expensive in many situations when data contains many fields.
It may be assumed that all keys in the linked list are distinct.
Examples:
Input : 10->15->12->13->2... | [
{
"code": null,
"e": 23946,
"s": 23918,
"text": "\n30 Mar, 2022"
},
{
"code": null,
"e": 24152,
"s": 23946,
"text": "Given a linked list and two keys in it, swap nodes for two given keys. Nodes should be swapped by changing links. Swapping data of nodes may be expensive in many s... |
crypto.createDecipheriv() Method in Node.js | The crypto.createCipheriv() is a programming interface from the 'crypto' module. It will create and return the Decipher object as per the given algorithm, key, iv and options passed in the function.
crypto.createDecipheriv(algorithm, key, iv, [options])
The above parameters are described as below −
algorithm – It takes... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "The crypto.createCipheriv() is a programming interface from the 'crypto' module. It will create and return the Decipher object as per the given algorithm, key, iv and options passed in the function."
},
{
"code": null,
"e": 1316,
"s": 12... |
POSIX shared-memory API | 22 Mar, 2022
Several IPC mechanisms are available for POSIX systems, including shared memory and message passing. Here, we explore the POSIX API for shared memory.
POSIX shared memory is organized using memory-mapped files, which associate the region of shared memory with a file. A process must first create a shared-me... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Mar, 2022"
},
{
"code": null,
"e": 205,
"s": 54,
"text": "Several IPC mechanisms are available for POSIX systems, including shared memory and message passing. Here, we explore the POSIX API for shared memory."
},
{
"code": n... |
Smallest prime divisor of a number | 13 Jun, 2022
Given a number N, find the smallest prime divisor of N.
Examples:
Input: 25 Output: 5
Input: 31 Output: 31
Approach:
Check if the number is divisible by 2 or not.
Iterate from i = 3 to sqrt(N) and making a jump of 2.
If any of the numbers divide N then it is the smallest prime divisor.
If none of them... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 111,
"s": 54,
"text": "Given a number N, find the smallest prime divisor of N. "
},
{
"code": null,
"e": 122,
"s": 111,
"text": "Examples: "
},
{
"code": null,
"e": ... |
How to get column and row names in DataFrame? | 22 Feb, 2022
While analyzing the real datasets which are often very huge in size, we might need to get the rows or index names and columns names in order to perform certain operations.
Note: For downloading the nba dataset used in the below examples Click Here
First, let’s create a simple dataframe with nba.csv
Pyth... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Feb, 2022"
},
{
"code": null,
"e": 225,
"s": 52,
"text": "While analyzing the real datasets which are often very huge in size, we might need to get the rows or index names and columns names in order to perform certain operations. "
... |
Python – Tensorflow math.add() method | 07 Jan, 2022
Tensorflow math.add() method returns the a + b of the passes inputs. The operation is done on the representation of a and b. This method belongs to math module.
Syntax: tf.math.add(a, b, name=None)
Arguments
a: This parameter should be a Tensor and also from the one of the following types: bfloat16, half, ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Jan, 2022"
},
{
"code": null,
"e": 189,
"s": 28,
"text": "Tensorflow math.add() method returns the a + b of the passes inputs. The operation is done on the representation of a and b. This method belongs to math module."
},
{
... |
Python Program for Pigeonhole Sort | 30 Dec, 2020
Pigeonhole sorting is a sorting algorithm that is suitable for sorting lists of elements where the number of elements and the number of possible key values are approximately the same.It requires O(n + Range) time where n is number of elements in input array and \’Range\’ is number of possible values in arr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Dec, 2020"
},
{
"code": null,
"e": 339,
"s": 28,
"text": "Pigeonhole sorting is a sorting algorithm that is suitable for sorting lists of elements where the number of elements and the number of possible key values are approximately t... |
Flutter – Setup for Web Development | 16 Oct, 2020
As we know, the Flutter is growing day by day and become more powerful in just a small-time span. Initially, the flutter SDK released for Mobile App Development. But, now it is not limited to Mobile Apps, It also is available for Web and Desktop Application.
Today, We learn how to make your first Web App u... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Oct, 2020"
},
{
"code": null,
"e": 287,
"s": 28,
"text": "As we know, the Flutter is growing day by day and become more powerful in just a small-time span. Initially, the flutter SDK released for Mobile App Development. But, now it i... |
Python - Matplotlib | Matplotlib is a python library used to create 2D graphs and plots by using python scripts. It has a module named pyplot which makes things easy for plotting by providing feature to control line styles, font properties, formatting axes etc. It supports a very wide variety of graphs and plots namely - histogram, bar char... | [
{
"code": null,
"e": 3198,
"s": 2663,
"text": "Matplotlib is a python library used to create 2D graphs and plots by using python scripts. It has a module named pyplot which makes things easy for plotting by providing feature to control line styles, font properties, formatting axes etc. It supports a... |
For Loop in Java | Important points | 17 Dec, 2021
Looping in programming languages is a feature that facilitates the execution of a set of instructions/functions repeatedly while some condition evaluates to true. In Java, just unlikely any programming language provides four ways for executing the loops namely while loop, for loop, for-each loop, do-while ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 513,
"s": 52,
"text": "Looping in programming languages is a feature that facilitates the execution of a set of instructions/functions repeatedly while some condition evaluates to true. In Java, ju... |
PHP | intval() Function | 12 Sep, 2019
The intval() function is an inbuilt function in PHP which returns the integer value of a variable.
Syntax:
int intval ( $var, $base )
Parameters: This function accepts two parameters out of which one is mandatory while the other one is optional. Parameters are described below:
$var: It is a mandatory para... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Sep, 2019"
},
{
"code": null,
"e": 127,
"s": 28,
"text": "The intval() function is an inbuilt function in PHP which returns the integer value of a variable."
},
{
"code": null,
"e": 135,
"s": 127,
"text": "Syntax:... |
Print with your own font using Python !! | 11 Aug, 2021
Given user input, this Python3 program will print the input in designed font.
In this article, we will do some cool Python trick. For the user input, given code will print the input in your own designed font. Example :
Input : ROOT
Output :
..######..
..#....#..
..#.##...
..#...#...... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 131,
"s": 53,
"text": "Given user input, this Python3 program will print the input in designed font."
},
{
"code": null,
"e": 274,
"s": 131,
"text": "In this article, we will do... |
Find duplicates under given constraints | 07 Jul, 2022
A sorted array contains 6 different numbers, only 1 number is repeated five times. So there are total 10 numbers in array. Find the duplicate numbers using two comparisons only.
Examples :
Input: arr[] = {1, 1, 1, 1, 1, 5, 7, 10, 20, 30}
Output: 1
Input: arr[] = {1, 2, 3, 3, 3, 3, 3, 5, 9, 10}
Output: 3... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n07 Jul, 2022"
},
{
"code": null,
"e": 232,
"s": 53,
"text": "A sorted array contains 6 different numbers, only 1 number is repeated five times. So there are total 10 numbers in array. Find the duplicate numbers using two comparisons on... |
Find k most frequent in linear time | 03 Feb, 2022
Given an array of integers, we need to print k most frequent elements. If there is a tie, we need to prefer the elements whose first appearance is first.
Examples:
Input : arr[] = {10, 5, 20, 5, 10, 10, 30}, k = 2 Output : 10 5
Input : arr[] = {7, 7, 6, 6, 6, 7, 5, 4, 4, 10, 5}, k = 3 Output : 7 6 5 Expla... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Feb, 2022"
},
{
"code": null,
"e": 208,
"s": 54,
"text": "Given an array of integers, we need to print k most frequent elements. If there is a tie, we need to prefer the elements whose first appearance is first."
},
{
"code"... |
Java NIO - Quick Guide | Java.nio package was introduced in java 1.4. In contrast of java I/O in java NIO the buffer and channel oriented data flow for I/O operations is introduced which in result provide faster execution and better performance.
Also NIO API offer selectors which introduces the functionality of listen to multiple channels for ... | [
{
"code": null,
"e": 2339,
"s": 2118,
"text": "Java.nio package was introduced in java 1.4. In contrast of java I/O in java NIO the buffer and channel oriented data flow for I/O operations is introduced which in result provide faster execution and better performance."
},
{
"code": null,
... |
Mongoose | findByIdAndUpdate() Function | 20 May, 2020
The findByIdAndUpdate() function is used to find a matching document, updates it according to the update arg, passing any options, and returns the found document (if any) to the callback.
Installation of mongoose module:
You can visit the link to Install mongoose module. You can install this package by usi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 May, 2020"
},
{
"code": null,
"e": 240,
"s": 52,
"text": "The findByIdAndUpdate() function is used to find a matching document, updates it according to the update arg, passing any options, and returns the found document (if any) to ... |
Python - GUI Programming (Tkinter) | Python provides various options for developing graphical user interfaces (GUIs). Most important are listed below.
Tkinter − Tkinter is the Python interface to the Tk GUI toolkit shipped with Python. We would look this option in this chapter.
Tkinter − Tkinter is the Python interface to the Tk GUI toolkit shipped with P... | [
{
"code": null,
"e": 2492,
"s": 2378,
"text": "Python provides various options for developing graphical user interfaces (GUIs). Most important are listed below."
},
{
"code": null,
"e": 2620,
"s": 2492,
"text": "Tkinter − Tkinter is the Python interface to the Tk GUI toolkit ship... |
Bash Scripting – Substring | 24 May, 2022
sIn this article, we will discuss how to write a bash script to extract substring from a string.
There are various ways to obtain substring based on the index of characters in the string:
Using cut command
Using Bash substring
Using expr substr command
Using awk command
Cut command is used to perform the s... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 May, 2022"
},
{
"code": null,
"e": 125,
"s": 28,
"text": "sIn this article, we will discuss how to write a bash script to extract substring from a string."
},
{
"code": null,
"e": 216,
"s": 125,
"text": "There are... |
NPDA for accepting the language L = {am b(2m) | m>=1} | 08 Jun, 2022
Prerequisite – Pushdown automata, Pushdown automata acceptance by final state
Problem – Design a non deterministic PDA for accepting the language L = {[Tex]b^{2m} [/Tex]: m>=1}, i.e.,
L = {abb, aabbbb, aaabbbbbb, aaaabbbbbbbb, ......}
In each of the string, the number of a’s are followed by double numb... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n08 Jun, 2022"
},
{
"code": null,
"e": 132,
"s": 53,
"text": "Prerequisite – Pushdown automata, Pushdown automata acceptance by final state "
},
{
"code": null,
"e": 240,
"s": 132,
"text": "Problem – Design a non det... |
Table Partitioning in Cassandra | 31 Aug, 2020
In this article, we are going to cover how we can our data access on the basis of partitioning and how we can store our data uniquely in a cluster. Let’s discuss one by one.
Pre-requisite — Data Distribution
Table Partitioning :In table partitioning, data can be distributed on the basis of the partition ke... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Aug, 2020"
},
{
"code": null,
"e": 202,
"s": 28,
"text": "In this article, we are going to cover how we can our data access on the basis of partitioning and how we can store our data uniquely in a cluster. Let’s discuss one by one."
... |
Data types in Java | 31 May, 2022
Data types are different sizes and values that can be stored in the variable that is made as per convenience and circumstances to cover up all test cases. Also, let us cover up other important ailments that there are majorly two types of languages that are as follows:
First, one is a Statically typed langu... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n31 May, 2022"
},
{
"code": null,
"e": 321,
"s": 52,
"text": "Data types are different sizes and values that can be stored in the variable that is made as per convenience and circumstances to cover up all test cases. Also, let us cover ... |
JSF - ui:param Tag | Using ui:param tag, we can pass parameters to template file or an included file.
In JSF - template tags chapter, we've learned how to create and use template tags. We defined various section such as header, footer, content, and a template combining all the sections.
Now we'll learn −
How to pass parameter(s) to various... | [
{
"code": null,
"e": 2033,
"s": 1952,
"text": "Using ui:param tag, we can pass parameters to template file or an included file."
},
{
"code": null,
"e": 2219,
"s": 2033,
"text": "In JSF - template tags chapter, we've learned how to create and use template tags. We defined various... |
PREVIOUSMONTH function | Returns a table that contains a column of all dates from the previous month, based on the first date in the dates column, in the current context.
PREVIOUSMONTH (<dates>)
dates
A column that contains dates.
A table containing a single column of date values.
The dates parameter can be any of the following −
A reference... | [
{
"code": null,
"e": 2147,
"s": 2001,
"text": "Returns a table that contains a column of all dates from the previous month, based on the first date in the dates column, in the current context."
},
{
"code": null,
"e": 2173,
"s": 2147,
"text": "PREVIOUSMONTH (<dates>) \n"
},
{... |
C++ Map Library - lower_bound() Function | The C++ function std::map::lower_bound() returns an iterator pointing to the first element which is not less than key k.
Following is the declaration for std::map::lower_bound() function form std::map header.
iterator lower_bound (const key_type& k);
const_iterator lower_bound (const key_type& k) const;
k − Key to be ... | [
{
"code": null,
"e": 2724,
"s": 2603,
"text": "The C++ function std::map::lower_bound() returns an iterator pointing to the first element which is not less than key k."
},
{
"code": null,
"e": 2812,
"s": 2724,
"text": "Following is the declaration for std::map::lower_bound() func... |
How to cover legend in a box using ggplot2 in R? | To cover legend in a box using ggplot2 in R, we can use theme function with
legend.box.background and legend.box.margin argument. The legend.box.background
will have a rectangular element with the help of element_rect and margin values will be
set in legend.box.margin.
Check out the Example given below to understand ho... | [
{
"code": null,
"e": 1332,
"s": 1062,
"text": "To cover legend in a box using ggplot2 in R, we can use theme function with\nlegend.box.background and legend.box.margin argument. The legend.box.background\nwill have a rectangular element with the help of element_rect and margin values will be\nset in... |
Facing the sun | Practice | GeeksforGeeks | Given an array H representing heights of buildings. You have to count the buildings which will see the sunrise (Assume : Sun rise on the side of array starting point).
Example 1:
Input:
N = 5
H[] = {7, 4, 8, 2, 9}
Output: 3
Explanation: As 7 is the first element, it
can see the sunrise. 4 can't see the
sunrise as 7 i... | [
{
"code": null,
"e": 407,
"s": 238,
"text": "Given an array H representing heights of buildings. You have to count the buildings which will see the sunrise (Assume : Sun rise on the side of array starting point).\n"
},
{
"code": null,
"e": 418,
"s": 407,
"text": "Example 1:"
},... |
Getting to know a black-box model: | by Adrian Botta | Towards Data Science | As the hype about AI has grown, so have discussions around Adversarial examples. An adversarial example, also referred to as an attack, is an input that has been crafted to be misclassified by a machine learning model. These inputs are usually a high dimensional input such as a photo, audio sample, string of text, or e... | [
{
"code": null,
"e": 511,
"s": 172,
"text": "As the hype about AI has grown, so have discussions around Adversarial examples. An adversarial example, also referred to as an attack, is an input that has been crafted to be misclassified by a machine learning model. These inputs are usually a high dime... |
How can I round down a number in JavaScript? | The Math.floor() method returns the value of a number rounded downwards to the nearest integer.
You can try to run the following code to round down numbers −
Live Demo
<html>
<head>
<title>JavaScript Math floor() Method</title>
</head>
<body>
<script>
var value = Math.floor( 2.7 );
... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "The Math.floor() method returns the value of a number rounded downwards to the nearest integer."
},
{
"code": null,
"e": 1220,
"s": 1158,
"text": "You can try to run the following code to round down numbers −"
},
{
"code": nu... |
numpy.isreal() in Python - GeeksforGeeks | 28 Mar, 2022
numpy.isreal(array) : Test element-wise whether it is a real number or not(not infinity or not Not a Number) and return the result as a boolean array. Parameters :
array : [array_like] Input array whose element we want to test
Return :
boolean array containing the result
Code 1 :
Python
# Python Progr... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 24378,
"s": 24212,
"text": "numpy.isreal(array) : Test element-wise whether it is a real number or not(not infinity or not Not a Number) and return the result as a boolean array. Parameters :... |
Rename column name in MySQL? | To rename column name in MySQL, you need to use the ALTER and CHANGE commands.
Let us first create a table −
mysql> create table DemoTable796 (
StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
Name varchar(100),
StudentAge int
);
Query OK, 0 rows affected (0.56 sec)
Let us check the description of table −
my... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "To rename column name in MySQL, you need to use the ALTER and CHANGE commands."
},
{
"code": null,
"e": 1171,
"s": 1141,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1340,
"s": 1171,
"text": "my... |
How to read data from user using the Console class in Java? | This class is used to write/read data from the console (keyboard/screen) devices. It provides a readLine() method which reads a line from the key-board. You can get an object of the Console class using the console() method.
Note − If you try to execute this program in a non-interactive environment like IDE it doesn’t w... | [
{
"code": null,
"e": 1286,
"s": 1062,
"text": "This class is used to write/read data from the console (keyboard/screen) devices. It provides a readLine() method which reads a line from the key-board. You can get an object of the Console class using the console() method."
},
{
"code": null,
... |
C Program to Reverse Array of Strings | In this problem, we are given an array of string. Our task is to create a c program to reverse array of strings.
We will reverse the array elements i.e. last element to the first value and so on.
Let’s take an example to understand the problem,
strarr[] = {"learn", "programming", "at", "tutorialspoint"}
strarr[] = {"tu... | [
{
"code": null,
"e": 1175,
"s": 1062,
"text": "In this problem, we are given an array of string. Our task is to create a c program to reverse array of strings."
},
{
"code": null,
"e": 1258,
"s": 1175,
"text": "We will reverse the array elements i.e. last element to the first val... |
How to make an existing field Unique in MySQL? | To make an existing field unique in MySQL, we can use the ALTER command and set UNIQUE constraint for the field. Let us see an example. First, we will create a table.
mysql> create table AddingUnique
-> (
-> Id int,
-> name varchar(100)
-> );
Query OK, 0 rows affected (0.44 sec)
Syntax to add UNIQUE to an e... | [
{
"code": null,
"e": 1229,
"s": 1062,
"text": "To make an existing field unique in MySQL, we can use the ALTER command and set UNIQUE constraint for the field. Let us see an example. First, we will create a table."
},
{
"code": null,
"e": 1354,
"s": 1229,
"text": "mysql> create t... |
Binary Tree to DLL | Practice | GeeksforGeeks | Given a Binary Tree (BT), convert it to a Doubly Linked List(DLL) In-Place. The left and right pointers in nodes are to be used as previous and next pointers respectively in converted DLL. The order of nodes in DLL must be same as Inorder of the given Binary Tree. The first node of Inorder traversal (leftmost node in B... | [
{
"code": null,
"e": 595,
"s": 238,
"text": "Given a Binary Tree (BT), convert it to a Doubly Linked List(DLL) In-Place. The left and right pointers in nodes are to be used as previous and next pointers respectively in converted DLL. The order of nodes in DLL must be same as Inorder of the given Bin... |
C++ Program to Implement Queue using Array | A queue is an abstract data structure that contains a collection of elements. Queue implements
the FIFO mechanism i.e. the element that is inserted first is also deleted first. In other words, the
least recently added element is removed first in a queue.
A program that implements the queue using an array is given as fo... | [
{
"code": null,
"e": 1317,
"s": 1062,
"text": "A queue is an abstract data structure that contains a collection of elements. Queue implements\nthe FIFO mechanism i.e. the element that is inserted first is also deleted first. In other words, the\nleast recently added element is removed first in a que... |
Modeling customer churn for an e-commerce company with Python | by Collin Ching | Towards Data Science | It’s more cost effective to retain existing customers than to acquire new ones, which is why it’s important to track customers at high risk of turnover (churn) and target them with retention strategies.
In this project, I’ll build a customer churn model based off of data from Olist, a Brazilian e-commerce site. I’ll us... | [
{
"code": null,
"e": 375,
"s": 172,
"text": "It’s more cost effective to retain existing customers than to acquire new ones, which is why it’s important to track customers at high risk of turnover (churn) and target them with retention strategies."
},
{
"code": null,
"e": 590,
"s": 3... |
What is the correct way to use printf to print a size_t in C/C++? | We should use “%zu” to print the variables of size_t length. We can use “%d” also to print size_t variables, it will not show any error. The correct way to print size_t variables is use of “%zu”.
In “%zu” format, z is a length modifier and u stand for unsigned type.
The following is an example to print size_t variable.... | [
{
"code": null,
"e": 1258,
"s": 1062,
"text": "We should use “%zu” to print the variables of size_t length. We can use “%d” also to print size_t variables, it will not show any error. The correct way to print size_t variables is use of “%zu”."
},
{
"code": null,
"e": 1329,
"s": 1258,... |
HTML5 MathML framespacing Attribute - GeeksforGeeks | 20 Nov, 2020
This attribute defines the space between the table and the frame. This attribute is accepted by <mtable> tag only.
Syntax:
<element framespacing="number">
Attributes Value:
number: This attribute defines the space between the table and the frame.
Below example illustrate the framespacing attribute in HTML... | [
{
"code": null,
"e": 24503,
"s": 24475,
"text": "\n20 Nov, 2020"
},
{
"code": null,
"e": 24618,
"s": 24503,
"text": "This attribute defines the space between the table and the frame. This attribute is accepted by <mtable> tag only."
},
{
"code": null,
"e": 24626,
... |
Defining Custom Suffix Rules in Makefile | Make can automatically create a.o file, using cc -c on the corresponding .c file. These rules are built-in the make, and you can take this advantage to shorten your Makefile. If you indicate just the .h files in the dependency line of the Makefile on which the current target is dependent on, make will know that the cor... | [
{
"code": null,
"e": 2200,
"s": 1784,
"text": "Make can automatically create a.o file, using cc -c on the corresponding .c file. These rules are built-in the make, and you can take this advantage to shorten your Makefile. If you indicate just the .h files in the dependency line of the Makefile on wh... |
Defining generic method inside Non-generic class in Java | You can write a single generic method declaration that can be called with arguments of different types. Based on the types of the arguments passed to the generic method, the compiler handles each method call appropriately. Following are the rules to define Generic Methods −
All generic method declarations have a type p... | [
{
"code": null,
"e": 1337,
"s": 1062,
"text": "You can write a single generic method declaration that can be called with arguments of different types. Based on the types of the arguments passed to the generic method, the compiler handles each method call appropriately. Following are the rules to def... |
Elasticsearch - Rollup Data | A rollup job is a periodic task that summarizes data from indices specified by an index pattern and rolls it into a new index. In the following example, we create an index named sensor with different date time stamps. Then we create a rollup job to rollup the data from these indices periodically using cron job.
PUT /se... | [
{
"code": null,
"e": 2894,
"s": 2581,
"text": "A rollup job is a periodic task that summarizes data from indices specified by an index pattern and rolls it into a new index. In the following example, we create an index named sensor with different date time stamps. Then we create a rollup job to roll... |
Count number of times value appears in particular column in MySQL? | You can use aggregate function count() with group by. The syntax is as follows.
select yourColumnName,count(*) as anyVariableName from yourtableName group by yourColumnName;
To understand the above syntax, let us create a table. The query to create a table is as follows.
mysql> create table CountSameValue
-> (
-> Id in... | [
{
"code": null,
"e": 1142,
"s": 1062,
"text": "You can use aggregate function count() with group by. The syntax is as follows."
},
{
"code": null,
"e": 1236,
"s": 1142,
"text": "select yourColumnName,count(*) as anyVariableName from yourtableName group by yourColumnName;"
},
... |
Ways of implementing Polymorphism in Python - GeeksforGeeks | 30 Jun, 2021
In programming, Polymorphism is a concept of Object-Oriented Programming. It enables using a single interface with the input of different data types, different classes or maybe for a different number of inputs.
Example: In this case, the function len() is polymorphic as it is taking a string as input in th... | [
{
"code": null,
"e": 25689,
"s": 25661,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 25900,
"s": 25689,
"text": "In programming, Polymorphism is a concept of Object-Oriented Programming. It enables using a single interface with the input of different data types, different cla... |
Convert an Object to a String in R Programming - toString() Function - GeeksforGeeks | 17 Jun, 2020
toString() function in R Language is used to convert an object into a single character string.
Syntax: toString(x, width)
Parameters:x: Objectwidth: maximum string width
Example 1:
# R program to convert an object to string # Creating a vectorx <- c("Geeks", "for", "geeks") # Calling toString() Function... | [
{
"code": null,
"e": 25074,
"s": 25046,
"text": "\n17 Jun, 2020"
},
{
"code": null,
"e": 25169,
"s": 25074,
"text": "toString() function in R Language is used to convert an object into a single character string."
},
{
"code": null,
"e": 25196,
"s": 25169,
"tex... |
Introduction of Stack based CPU Organization - GeeksforGeeks | 13 Jan, 2022
The computers which use Stack-based CPU Organization are based on a data structure called a stack. The stack is a list of data words. It uses the Last In First Out (LIFO) access method which is the most popular access method in most of the CPU. A register is used to store the address of the topmost element... | [
{
"code": null,
"e": 27638,
"s": 27610,
"text": "\n13 Jan, 2022"
},
{
"code": null,
"e": 28180,
"s": 27638,
"text": "The computers which use Stack-based CPU Organization are based on a data structure called a stack. The stack is a list of data words. It uses the Last In First Out... |
Adding Boundary to an Object in Pygame - GeeksforGeeks | 01 Aug, 2020
Boundaries to any game are very important. In snake games, space invaders, ping pong game, etc. the boundary condition is very important. The ball bounces at the boundaries of the screen in ping pong games.
So, the idea behind this boundaries is to change the position of the ball or object in reverse direc... | [
{
"code": null,
"e": 25647,
"s": 25619,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 25854,
"s": 25647,
"text": "Boundaries to any game are very important. In snake games, space invaders, ping pong game, etc. the boundary condition is very important. The ball bounces at the b... |
Python | Geographical plotting using plotly - GeeksforGeeks | 26 Jun, 2018
Geographical plotting is used for world map as well as states under a country. Mainly used by data analysts to check the agriculture exports or to visualize such data.
plotly is a Python library which is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histog... | [
{
"code": null,
"e": 25354,
"s": 25326,
"text": "\n26 Jun, 2018"
},
{
"code": null,
"e": 25522,
"s": 25354,
"text": "Geographical plotting is used for world map as well as states under a country. Mainly used by data analysts to check the agriculture exports or to visualize such d... |
Java program to print all duplicate characters in a string - GeeksforGeeks | 13 Jul, 2020
Given a string, the task is to write Java program to print all the duplicate characters with their frequency
Example:
Input: str = “geeksforgeeks”Output:s : 2e : 4g : 2k : 2
Input: str = “java”Output:a : 2
Approach: The idea is to do hashing using HashMap.
Create a hashMap of type {char, int}.
Traverse th... | [
{
"code": null,
"e": 25078,
"s": 25050,
"text": "\n13 Jul, 2020"
},
{
"code": null,
"e": 25187,
"s": 25078,
"text": "Given a string, the task is to write Java program to print all the duplicate characters with their frequency"
},
{
"code": null,
"e": 25197,
"s": 2... |
Find elements within range in numpy in Python | Sometime while processing data using the numpy library, we may need to filter out certain numbers in a specific range. This can be achieved by using some in-built methods available in numpy.
In this approach we take an numpy array then apply the logical_and function to it. The where clause in numpy is also used to appl... | [
{
"code": null,
"e": 1253,
"s": 1062,
"text": "Sometime while processing data using the numpy library, we may need to filter out certain numbers in a specific range. This can be achieved by using some in-built methods available in numpy."
},
{
"code": null,
"e": 1505,
"s": 1253,
... |
MFC - Radio Buttons | A radio button is a control that appears as a dot surrounded by a round box. In reality, a radio button is accompanied by one or more other radio buttons that appear and behave as a group.
Create
Creates the Windows button control and attaches it to the CButton object.
DrawItem
Override to draw an owner-drawn CButton o... | [
{
"code": null,
"e": 2256,
"s": 2067,
"text": "A radio button is a control that appears as a dot surrounded by a round box. In reality, a radio button is accompanied by one or more other radio buttons that appear and behave as a group."
},
{
"code": null,
"e": 2263,
"s": 2256,
"t... |
How to make a broken horizontal bar plot in Matplotlib? | We can take the following steps to make a broken bar plot,
Set the figure size and adjust the padding between and around the subplots.
Create a figure and a set of subplots.
Plot a horizontal sequence of rectangles.
Set x and y axes scale, X-axis label, Y ticks and Y tick labels.
Configure the grid lines.
Use annotate(... | [
{
"code": null,
"e": 1121,
"s": 1062,
"text": "We can take the following steps to make a broken bar plot,"
},
{
"code": null,
"e": 1197,
"s": 1121,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code": null,
"e": 1236,
... |
Tryit Editor v3.7 | Tryit: no end tag | [] |
JavaFX - Layout GridPane | If we use Grid Pane in our application, all the nodes that are added to it are arranged in a way that they form a grid of rows and columns. This layout comes handy while creating forms using JavaFX.
The class named GridPane of the package javafx.scene.layout represents the GridPane. This class provides eleven propertie... | [
{
"code": null,
"e": 2099,
"s": 1900,
"text": "If we use Grid Pane in our application, all the nodes that are added to it are arranged in a way that they form a grid of rows and columns. This layout comes handy while creating forms using JavaFX."
},
{
"code": null,
"e": 2235,
"s": 20... |
What exactly is Metaflow?. A high-level look Netflix’s Python... | by Rupert Thomas | Towards Data Science | Metaflow is a Python framework for data science developed by Netflix; it was released as an open source project in December 2019. It addresses some of the challenges data scientists face around scalability and version control. A processing pipeline is constructed as a sequence of steps in a graph. Metaflow makes it eas... | [
{
"code": null,
"e": 770,
"s": 171,
"text": "Metaflow is a Python framework for data science developed by Netflix; it was released as an open source project in December 2019. It addresses some of the challenges data scientists face around scalability and version control. A processing pipeline is con... |
Different Ways to Take Input and Print a Float Value in C# - GeeksforGeeks | 28 May, 2020
In C#, we know that Console.ReadLine() method is used to read string from the standard output device. Then this value is converted into the float type if it is not string type by default. There are different methods available to convert taken input to a float value. Following methods can be used for this ... | [
{
"code": null,
"e": 23986,
"s": 23958,
"text": "\n28 May, 2020"
},
{
"code": null,
"e": 24302,
"s": 23986,
"text": "In C#, we know that Console.ReadLine() method is used to read string from the standard output device. Then this value is converted into the float type if it is no... |
deque::at() and deque::swap() in C++ STL - GeeksforGeeks | 13 Jan, 2018
Deque or Double ended queues are sequence containers with the feature of expansion and contraction on both the ends. They are similar to vectors, but are more efficient in case of insertion and deletion of elements at the end, and also the beginning. Unlike vectors, contiguous storage allocation may not be... | [
{
"code": null,
"e": 25193,
"s": 25165,
"text": "\n13 Jan, 2018"
},
{
"code": null,
"e": 25513,
"s": 25193,
"text": "Deque or Double ended queues are sequence containers with the feature of expansion and contraction on both the ends. They are similar to vectors, but are more effi... |
How to get MySQL random integer range? | To get the random integer range, use the rand() function. The query to create a table −
mysql> create table RandomIntegerDemo
−> (
−> Number int
−> );
Query OK, 0 rows affected (0.61 sec)
Inserting records into table. The query is as follows −
mysql> insert into RandomIntegerDemo values(1),(2),(3),(4),(5),(6),(7),(8... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "To get the random integer range, use the rand() function. The query to create a table −"
},
{
"code": null,
"e": 1253,
"s": 1150,
"text": "mysql> create table RandomIntegerDemo\n−> (\n −> Number int\n−> );\nQuery OK, 0 rows affecte... |
Why FAISS Works | Towards Data Science | Accurate, fast, and memory-efficient similarity search is a hard thing to do — but something that, if done well, lends itself very well to our huge repositories of endless (and exponentially growing) data.
The reason that similarity search is so good is that it enables us to search for images, text, videos, or any othe... | [
{
"code": null,
"e": 377,
"s": 171,
"text": "Accurate, fast, and memory-efficient similarity search is a hard thing to do — but something that, if done well, lends itself very well to our huge repositories of endless (and exponentially growing) data."
},
{
"code": null,
"e": 616,
"s"... |
mtools - Unix, Linux Command | Mtools is sufficient to give access to MS-DOS filesystems. For
instance, commands such as mdir a: work on the a: floppy
without any preliminary mounting or initialization (assuming the default
oo/etc/mtools.confI works on your machine). With mtools, one can
change floppies too without unmounting and mounting.
Mto... | [
{
"code": null,
"e": 10901,
"s": 10586,
"text": "\nMtools is sufficient to give access to MS-DOS filesystems. For\ninstance, commands such as mdir a: work on the a: floppy\nwithout any preliminary mounting or initialization (assuming the default\noo/etc/mtools.confI works on your machine). With mt... |
How to create data-driven presentations with jupyter notebooks, reveal.js, host on github, and show it to the world: Part I — make a basic slide deck | by Arindam Basu | Towards Data Science | ... in which I discuss a workflow where you can start writing your contents on a jupyter notebook, create a reveal.js slide deck, and host it on github for presentations. This is for a very simple presentation that you can fully control yourself
Part I: Basic slide deckPart II: Basic slide deck using remarkjsPart III: ... | [
{
"code": null,
"e": 417,
"s": 171,
"text": "... in which I discuss a workflow where you can start writing your contents on a jupyter notebook, create a reveal.js slide deck, and host it on github for presentations. This is for a very simple presentation that you can fully control yourself"
},
{... |
Building a Data Lake on GCP with CDAP | by Deepesh Nair | Towards Data Science | It is no secret that traditional platforms for data analysis, like data warehouses, are difficult and expensive to scale, to meet the current data demands for storage and compute. And purpose-built platforms designed to process big data often require significant up-front and on-going investment if deployed on-premise. ... | [
{
"code": null,
"e": 1054,
"s": 171,
"text": "It is no secret that traditional platforms for data analysis, like data warehouses, are difficult and expensive to scale, to meet the current data demands for storage and compute. And purpose-built platforms designed to process big data often require sig... |
Wrapper Class in Python - GeeksforGeeks | 21 Apr, 2020
Decoration is a way to specify management code for functions and classes. Decorators themselves take the form of callable objects that process other callable objects. A Class Decorator is similar to function decorators, but they are run at the end of a class statement to rebind a class name to a callable (... | [
{
"code": null,
"e": 24418,
"s": 24390,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 25202,
"s": 24418,
"text": "Decoration is a way to specify management code for functions and classes. Decorators themselves take the form of callable objects that process other callable objec... |
Difference between the list() and listFiles() methods in Java | The class named File of the java.io package represents a file or directory (path names) in the system. To get the list of all the existing files in a directory this class provides the list() and ListFiles() methods.
The main difference between them is that
The list() method returns the names of all files in the given d... | [
{
"code": null,
"e": 1278,
"s": 1062,
"text": "The class named File of the java.io package represents a file or directory (path names) in the system. To get the list of all the existing files in a directory this class provides the list() and ListFiles() methods."
},
{
"code": null,
"e": ... |
How to get the smallest integer greater than or equal to a number in JavaScript? | To get the smallest integer greater than or equal to a number, use the JavaScript Math.ceil() method. This method returns the smallest integer greater than or equal to a number.
You can try to run the following code to get the smallest integer greater than or equal to a number −
<html>
<head>
<title>JavaScript... | [
{
"code": null,
"e": 1240,
"s": 1062,
"text": "To get the smallest integer greater than or equal to a number, use the JavaScript Math.ceil() method. This method returns the smallest integer greater than or equal to a number."
},
{
"code": null,
"e": 1342,
"s": 1240,
"text": "You ... |
Iterator Functions in Python | In this article, we will learn about the four iterator functions available in Python 3.x. Or earlier namely accumulate() , chain(), filter false() , dropwhile() methods.
Now let’s look on each of them in detail −
Accumulate() method takes two arguments, one being iterable to operate on and another the function/operatio... | [
{
"code": null,
"e": 1232,
"s": 1062,
"text": "In this article, we will learn about the four iterator functions available in Python 3.x. Or earlier namely accumulate() , chain(), filter false() , dropwhile() methods."
},
{
"code": null,
"e": 1275,
"s": 1232,
"text": "Now let’s lo... |
DataFrame.to_pickle() in function Pandas - GeeksforGeeks | 05 Jun, 2020
The to_pickle() method is used to pickle (serialize) the given object into the file. This method uses the syntax as given below :
Syntax:
DataFrame.to_pickle(self, path,
compression='infer',
protocol=4)
Example 1:
Python3
# importing packagesimport pandas as pd # d... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n05 Jun, 2020"
},
{
"code": null,
"e": 24031,
"s": 23901,
"text": "The to_pickle() method is used to pickle (serialize) the given object into the file. This method uses the syntax as given below :"
},
{
"code": null,
"... |
How to Delete files in Python using send2trash module? - GeeksforGeeks | 16 Jul, 2020
In this article, we will see how to safely delete files and folders using the send2trash module in Python. Using send2trash, we can send files to the Trash or Recycle Bin instead of permanently deleting them. The OS module’s unlink(), remove() and rmdir() functions can be used to delete files or folders. B... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n16 Jul, 2020"
},
{
"code": null,
"e": 24380,
"s": 23901,
"text": "In this article, we will see how to safely delete files and folders using the send2trash module in Python. Using send2trash, we can send files to the Trash or Recy... |
Java Examples - Searching last occurance ? | How to search the last position of a substring ?
This example shows how to determine the last position of a substring inside a string with the help of strOrig.lastIndexOf(Stringname) method.
public class SearchlastString {
public static void main(String[] args) {
String strOrig = "Hello world ,Hello Reader";
... | [
{
"code": null,
"e": 2117,
"s": 2068,
"text": "How to search the last position of a substring ?"
},
{
"code": null,
"e": 2259,
"s": 2117,
"text": "This example shows how to determine the last position of a substring inside a string with the help of strOrig.lastIndexOf(Stringname)... |
What is difference between raw_input() and input() functions in Python? | The function raw_input() presents a prompt to the user (the optional arg of raw_input([arg])), gets input from the user and returns the data input by the user in a string. For example,
name = raw_input("What isyour name? ")
print "Hello, %s." %name
This differs from input() in that the latter tries to interpret the inp... | [
{
"code": null,
"e": 1247,
"s": 1062,
"text": "The function raw_input() presents a prompt to the user (the optional arg of raw_input([arg])), gets input from the user and returns the data input by the user in a string. For example,"
},
{
"code": null,
"e": 1311,
"s": 1247,
"text"... |
Sphenic Number | Practice | GeeksforGeeks | A Sphenic Number is a positive integer N which is product of exactly three distinct primes. The first few sphenic numbers are 30, 42, 66, 70, 78, 102, 105, 110, 114, ...
Given a number N, your task is to find whether it is a Sphenic Number or not.
Example 1:
Input: N = 30
Output: 1
Explanation: 30 = 2 * 3 * 5 so N is... | [
{
"code": null,
"e": 488,
"s": 238,
"text": "A Sphenic Number is a positive integer N which is product of exactly three distinct primes. The first few sphenic numbers are 30, 42, 66, 70, 78, 102, 105, 110, 114, ...\nGiven a number N, your task is to find whether it is a Sphenic Number or not.\n "
... |
MySQL query to find duplicate tuples and display the count? | To find duplicate tuples, use GROUP BY HAVING clause. Let us first create a table −
mysql> create table DemoTable
-> (
-> Id int,
-> Name varchar(20)
-> );
Query OK, 0 rows affected (0.80 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values(100,'Chris');
Query OK,... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "To find duplicate tuples, use GROUP BY HAVING clause. Let us first create a table −"
},
{
"code": null,
"e": 1267,
"s": 1146,
"text": "mysql> create table DemoTable\n -> (\n -> Id int,\n -> Name varchar(20)\n -> );\nQuery OK,... |
QlikView - Match Function | The Match() function in QlikView is used to match the value of a string on expression with data value present in a column. It is similar to the in function that we see in SQL language. It is useful to fetch rows containing specific strings and it also has an extension in form of wildmatch() function.
Let us consider t... | [
{
"code": null,
"e": 3223,
"s": 2920,
"text": "The Match() function in QlikView is used to match the value of a string on expression with data value present in a column. It is similar to the in function that we see in SQL language. It is useful to fetch rows containing specific strings and it also ... |
MVVM â Hierarchies & Navigation | When building MVVM applications, you typically decompose complex screens of information into a set of parent and child views, where the child views are contained within the parent views in panels or container controls, and forms a hierarchy of use themselves.
After decomposing the complex Views it doesn’t mean that eac... | [
{
"code": null,
"e": 2202,
"s": 1942,
"text": "When building MVVM applications, you typically decompose complex screens of information into a set of parent and child views, where the child views are contained within the parent views in panels or container controls, and forms a hierarchy of use thems... |
React Custom Hooks | Hooks are reusable functions.
When you have component logic that needs to be used by multiple components, we can extract that logic to a custom Hook.
Custom Hooks start with "use". Example: useFetch.
In the following code, we are fetching data in our Home component and displaying it.
We will use the JSONPlaceholder ser... | [
{
"code": null,
"e": 30,
"s": 0,
"text": "Hooks are reusable functions."
},
{
"code": null,
"e": 150,
"s": 30,
"text": "When you have component logic that needs to be used by multiple components, we can extract that logic to a custom Hook."
},
{
"code": null,
"e": 200... |
Biopython - Cluster Analysis | In general, Cluster analysis is grouping a set of objects in the same group. This concept is mainly used in data mining, statistical data analysis, machine learning, pattern recognition, image analysis, bioinformatics, etc. It can be achieved by various algorithms to understand how the cluster is widely used in differe... | [
{
"code": null,
"e": 2439,
"s": 2106,
"text": "In general, Cluster analysis is grouping a set of objects in the same group. This concept is mainly used in data mining, statistical data analysis, machine learning, pattern recognition, image analysis, bioinformatics, etc. It can be achieved by various... |
A tutorial to explanatory modeling and statistical causal inference | Towards Data Science | Perhaps a positive side-effect of the recent pandemic and the associated lockdown is that we get to materialize projects that had been set aside. For a while I’ve wanted to write an article about statistical model interpretation and all I needed was time, motivation, and data. This Kaggle dataset consists of 1085 COVID... | [
{
"code": null,
"e": 919,
"s": 172,
"text": "Perhaps a positive side-effect of the recent pandemic and the associated lockdown is that we get to materialize projects that had been set aside. For a while I’ve wanted to write an article about statistical model interpretation and all I needed was time,... |
Getting more value from the Pandas count() | by B. Chen | Towards Data Science | The Pandas library is one of the most preferred tools for data manipulation and analysis. Data Scientists often spend most of their time exploring and preprocessing the data. When it comes to data profiling and understanding the dataset, Pandas count() is one of the most commonly used methods for knowing the number of ... | [
{
"code": null,
"e": 499,
"s": 171,
"text": "The Pandas library is one of the most preferred tools for data manipulation and analysis. Data Scientists often spend most of their time exploring and preprocessing the data. When it comes to data profiling and understanding the dataset, Pandas count() is... |
How to Merge DataFrames of different length in Pandas ? - GeeksforGeeks | 28 Apr, 2021
In this article, we will discuss how to merge the two dataframes with different lengths in Pandas. It can be done using the merge() method.
Syntax:
DataFrame.merge(parameters)
Below are some examples that depict how to merge data frames of different lengths using the above method:
Example 1:
Below is a pr... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 24041,
"s": 23901,
"text": "In this article, we will discuss how to merge the two dataframes with different lengths in Pandas. It can be done using the merge() method."
},
{
"code": n... |
Python | Check if dictionary is empty - GeeksforGeeks | 22 May, 2019
Sometimes, we need to check if a particular dictionary is empty or not. And this particular task has its application in web development domain in which we sometimes need to test for results of a particular query or check whether we have any key to add info into database. Let’s discuss certain ways in which... | [
{
"code": null,
"e": 24511,
"s": 24483,
"text": "\n22 May, 2019"
},
{
"code": null,
"e": 24847,
"s": 24511,
"text": "Sometimes, we need to check if a particular dictionary is empty or not. And this particular task has its application in web development domain in which we sometime... |
Getting started with Git and GitHub: the complete beginner’s guide | by Anne Bonner | Towards Data Science | Looking to get started with Git and GitHub? Do you need to collaborate with a team? Are you working on a project? Have you recently discovered that you pretty much need to be on GitHub if you want anyone to take you seriously in tech?
...do you really just want to contribute to your first open source project?
This one’... | [
{
"code": null,
"e": 406,
"s": 171,
"text": "Looking to get started with Git and GitHub? Do you need to collaborate with a team? Are you working on a project? Have you recently discovered that you pretty much need to be on GitHub if you want anyone to take you seriously in tech?"
},
{
"code"... |
Angular Highcharts - Heat Map Chart | Following is an example of a Heat Map Chart.
We have already seen the configuration used to draw a chart in Highcharts Configuration Syntax chapter.
An example of a Heat Map Chart is given below.
Let us now see the additional configurations/steps taken.
Configure the chart type to be 'heatmap' based. chart.type decides... | [
{
"code": null,
"e": 2080,
"s": 2035,
"text": "Following is an example of a Heat Map Chart."
},
{
"code": null,
"e": 2184,
"s": 2080,
"text": "We have already seen the configuration used to draw a chart in Highcharts Configuration Syntax chapter."
},
{
"code": null,
"... |
Insert in MongoDB without duplicates | To insert records in MongoDB and avoid duplicates, use “unique:true”. Let us first create a collection with documents.
Here, we are trying to add duplicate records −
> db.insertWithoutDuplicateDemo.createIndex({"StudentFirstName":1},{ unique: true } );
{
"createdCollectionAutomatically" : true,
"numIndexesBefore"... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "To insert records in MongoDB and avoid duplicates, use “unique:true”. Let us first create a collection with documents."
},
{
"code": null,
"e": 1228,
"s": 1181,
"text": "Here, we are trying to add duplicate records −"
},
{
"c... |
JSF - h:selectManyCheckbox | The h:selectManyCheckbox tag renders a set of HTML input element of type "checkbox", and format it with HTML table and label tags.
<h:selectManyCheckbox value = "#{userData.data}">
<f:selectItem itemValue = "1" itemLabel = "Item 1" />
<f:selectItem itemValue = "2" itemLabel = "Item 2" />
</h:selectManyCheckbox... | [
{
"code": null,
"e": 2083,
"s": 1952,
"text": "The h:selectManyCheckbox tag renders a set of HTML input element of type \"checkbox\", and format it with HTML table and label tags."
},
{
"code": null,
"e": 2274,
"s": 2083,
"text": "<h:selectManyCheckbox value = \"#{userData.data}\... |
Azure Synapse Analytics — Introduction | by Pankaj Jainani | Towards Data Science | Synapse Analytics is an integrated platform service from Microsoft Azure that combines the capabilities of data warehousing, data integrations, ETL pipelines, analytics tools & services, the scale for big-data capabilities, visualization & dashboards.
The platform enables enterprise-wide analytics requirements for deci... | [
{
"code": null,
"e": 424,
"s": 172,
"text": "Synapse Analytics is an integrated platform service from Microsoft Azure that combines the capabilities of data warehousing, data integrations, ETL pipelines, analytics tools & services, the scale for big-data capabilities, visualization & dashboards."
... |
set_window_position driver method – Selenium Python | 03 Dec, 2020
Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout – Navigating links using get method – Selenium Python. Just being able ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Dec, 2020"
},
{
"code": null,
"e": 768,
"s": 28,
"text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium ... |
Python | Updating value list in dictionary | 26 Jul, 2019
While working with dictionary with list as value is always vulnerable of getting it’s value updated. The ways or shorthands to perform this task can be handy in such situations. This can occur in web development domain. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using list ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Jul, 2019"
},
{
"code": null,
"e": 312,
"s": 28,
"text": "While working with dictionary with list as value is always vulnerable of getting it’s value updated. The ways or shorthands to perform this task can be handy in such situation... |
Spring @Repository Annotation with Example | 03 Dec, 2021
Spring is one of the most popular Java EE frameworks. It is an open-source lightweight framework that allows Java EE 7 developers to build simple, reliable, and scalable enterprise applications. This framework mainly focuses on providing various ways to help you manage your business objects. It made the de... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Dec, 2021"
},
{
"code": null,
"e": 768,
"s": 28,
"text": "Spring is one of the most popular Java EE frameworks. It is an open-source lightweight framework that allows Java EE 7 developers to build simple, reliable, and scalable enter... |
Program to Convert Octal to Hexadecimal | 25 May, 2022
Given an Octal number, the task is to convert it into a Hexadecimal number.
Examples:
Input: 47
Output: 27
Explanation:
Decimal value of 47 is = (7 * 1) + (4 * 8) = 39
Now, convert this number to hexadecimal
39/16 -> quotient = 2, remainder = 7
2/16 -> quotient = 0, remainder = 2
So, the equivalent h... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n25 May, 2022"
},
{
"code": null,
"e": 129,
"s": 53,
"text": "Given an Octal number, the task is to convert it into a Hexadecimal number."
},
{
"code": null,
"e": 140,
"s": 129,
"text": "Examples: "
},
{
"cod... |
2's Complement | Practice | GeeksforGeeks | For a given string of binary number bi. Find the two’s complement of it.
Example 1:
Input: bi = 00000101
Output: 11111011
Explaination: 2's complement is reversing all
the bits of the given number and then adding
1 to it.
Example 2:
Input: bi = 101
Output: 011
Explaination: Follow the process of figuring
out 2's com... | [
{
"code": null,
"e": 299,
"s": 226,
"text": "For a given string of binary number bi. Find the two’s complement of it."
},
{
"code": null,
"e": 310,
"s": 299,
"text": "Example 1:"
},
{
"code": null,
"e": 450,
"s": 310,
"text": "Input: bi = 00000101\nOutput: 111... |
How to delete a localStorage item when the browser window/tab is closed? | To clear a localStorage data on browser close, you can use the window.onunload event to check for tab close.
Let's say you have a local storage object called MyStorage as a global
for the sake of this example. Then you can write an event handler −
window.onunload = () => {
// Clear the local storage
window.MyStor... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "To clear a localStorage data on browser close, you can use the window.onunload event to check for tab close."
},
{
"code": null,
"e": 1310,
"s": 1171,
"text": "Let's say you have a local storage object called MyStorage as a global\nf... |
MVC Framework - Action Filters | In ASP.NET MVC, controllers define action methods and these action methods generally have a one-to-one relationship with UI controls, such as clicking a button or a link, etc. For example, in one of our previous examples, the UserController class contained methods UserAdd, UserDelete, etc.
However, many times we would ... | [
{
"code": null,
"e": 2316,
"s": 2025,
"text": "In ASP.NET MVC, controllers define action methods and these action methods generally have a one-to-one relationship with UI controls, such as clicking a button or a link, etc. For example, in one of our previous examples, the UserController class contai... |
Minimum time required to rot all oranges - GeeksforGeeks | 28 Feb, 2022
Given a matrix of dimension m*n where each cell in the matrix can have values 0, 1 or 2 which has the following meaning:
0: Empty cell
1: Cells have fresh oranges
2: Cells have rotten oranges
Determine what is the minimum time required so that all the oranges become rotten. A rotten orange at index [i,j]... | [
{
"code": null,
"e": 26908,
"s": 26880,
"text": "\n28 Feb, 2022"
},
{
"code": null,
"e": 27031,
"s": 26908,
"text": "Given a matrix of dimension m*n where each cell in the matrix can have values 0, 1 or 2 which has the following meaning: "
},
{
"code": null,
"e": 271... |
CSS - Borders | The border properties allow you to specify how the border of the box representing an element should look. There are three properties of a border you can change −
The border-color specifies the color of a border.
The border-color specifies the color of a border.
The border-style specifies whether a border should be soli... | [
{
"code": null,
"e": 2788,
"s": 2626,
"text": "The border properties allow you to specify how the border of the box representing an element should look. There are three properties of a border you can change −"
},
{
"code": null,
"e": 2838,
"s": 2788,
"text": "The border-color spe... |
Multiple axes in Matplotlib with different scales | In the following code, we will see how to create a shared Y-axis.
Create fig and ax variables using subplots method, where default nrows and ncols are 1.
Create fig and ax variables using subplots method, where default nrows and ncols are 1.
Plot line with lists passed in the argument of plot() method with color="red".... | [
{
"code": null,
"e": 1128,
"s": 1062,
"text": "In the following code, we will see how to create a shared Y-axis."
},
{
"code": null,
"e": 1216,
"s": 1128,
"text": "Create fig and ax variables using subplots method, where default nrows and ncols are 1."
},
{
"code": null,
... |
Python time mktime() Method | Pythom time method mktime() is the inverse function of localtime(). Its argument is the struct_time or full 9-tuple and it returns a floating point number, for compatibility with time().
If the input value cannot be represented as a valid time, either OverflowError or ValueError will be raised.
Following is the syntax ... | [
{
"code": null,
"e": 2431,
"s": 2244,
"text": "Pythom time method mktime() is the inverse function of localtime(). Its argument is the struct_time or full 9-tuple and it returns a floating point number, for compatibility with time()."
},
{
"code": null,
"e": 2540,
"s": 2431,
"tex... |
Ansible - Roles | Roles provide a framework for fully independent, or interdependent collections of variables, tasks, files, templates, and modules.
In Ansible, the role is the primary mechanism for breaking a playbook into multiple files. This simplifies writing complex playbooks, and it makes them easier to reuse. The breaking of play... | [
{
"code": null,
"e": 1922,
"s": 1791,
"text": "Roles provide a framework for fully independent, or interdependent collections of variables, tasks, files, templates, and modules."
},
{
"code": null,
"e": 2185,
"s": 1922,
"text": "In Ansible, the role is the primary mechanism for b... |
Program to Print Alphabets from A to Z Using Loop - GeeksforGeeks | 16 Jun, 2021
The task is to print the alphabets from A to Z using a loop.
In the below program, for loop is used to print the alphabets from A to Z. A loop variable is taken to do this of type ‘char’. The loop variable ‘i’ is initialized with the first alphabet ‘A’ and incremented by 1 on every iteration. In the loop, ... | [
{
"code": null,
"e": 24148,
"s": 24120,
"text": "\n16 Jun, 2021"
},
{
"code": null,
"e": 24209,
"s": 24148,
"text": "The task is to print the alphabets from A to Z using a loop."
},
{
"code": null,
"e": 24502,
"s": 24209,
"text": "In the below program, for loo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.