title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Cron Jobs in Arduino | The CronAlarms library in Arduino helps you set cron jobs in Arduino. If you aren't aware of cron jobs, they are scheduled tasks to be carried out at a fixed time interval. An example can be sending a health packet to a server every day at midnight.
In order to install this library, search for CronAlarms in the Library... | [
{
"code": null,
"e": 1312,
"s": 1062,
"text": "The CronAlarms library in Arduino helps you set cron jobs in Arduino. If you aren't aware of cron jobs, they are scheduled tasks to be carried out at a fixed time interval. An example can be sending a health packet to a server every day at midnight."
... |
An Easy Tool to Correctly Transform Non-Linear Data For Linear Regression | by Kevin Babitz | Towards Data Science | Two important assumptions for linear regression are that the residuals are independent from each other and that there is constant variance in these errors (also known as homoscedasticity). This basically means that when we draw our regression line, we want a relatively equal number of errors on the top and bottom of ou... | [
{
"code": null,
"e": 522,
"s": 171,
"text": "Two important assumptions for linear regression are that the residuals are independent from each other and that there is constant variance in these errors (also known as homoscedasticity). This basically means that when we draw our regression line, we wan... |
Python | Pandas Timestamp.fromtimestamp - GeeksforGeeks | 14 Jan, 2019
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas Timestamp.fromtimestamp() function return a Timestamp object when passed an integer wh... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n14 Jan, 2019"
},
{
"code": null,
"e": 25751,
"s": 25537,
"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... |
jQuery | serializeArray() with Examples - GeeksforGeeks | 13 Feb, 2019
The serializeArray() is an inbuilt method in jQuery which is used to create a JavaScript array of objects that is ready to be encoded as a JSON string. It operates on a jQuery collection of forms and/or form controls. The controls can be of several types. JSON string is a text and can convert any JavaScrip... | [
{
"code": null,
"e": 25394,
"s": 25366,
"text": "\n13 Feb, 2019"
},
{
"code": null,
"e": 25757,
"s": 25394,
"text": "The serializeArray() is an inbuilt method in jQuery which is used to create a JavaScript array of objects that is ready to be encoded as a JSON string. It operates... |
TCS CodeVita 9 ( Zone 1) 2020 | Constellation - GeeksforGeeks | 06 Apr, 2022
Three characters {#, *, . } represents a constellation of stars and galaxies in space. Each galaxy is demarcated by # characters. There can be one or many stars in a given galaxy. Stars can only be in the shape of vowels {A, E, I, O, U}. A collection of * in the shape of the vowels is a star. A star is con... | [
{
"code": null,
"e": 26435,
"s": 26407,
"text": "\n06 Apr, 2022"
},
{
"code": null,
"e": 26837,
"s": 26435,
"text": "Three characters {#, *, . } represents a constellation of stars and galaxies in space. Each galaxy is demarcated by # characters. There can be one or many stars in... |
Best way to make a d3.js visualization layout responsive - GeeksforGeeks | 29 Jul, 2021
D3 stands for Data-Driven Documents. It is an open-source JavaScript library that is used to create interactive data visualizations in the browser using HTML, SVG, and CSS. The huge amount of data is being generated in today’s world, which is very difficult to store and analyze. Visual representations of d... | [
{
"code": null,
"e": 26545,
"s": 26517,
"text": "\n29 Jul, 2021"
},
{
"code": null,
"e": 26995,
"s": 26545,
"text": "D3 stands for Data-Driven Documents. It is an open-source JavaScript library that is used to create interactive data visualizations in the browser using HTML, SVG,... |
C | Data Types | Question 2 - GeeksforGeeks | 28 Jun, 2021
Which of the following is not a valid declaration in C?
1. short int x;
2. signed short x;
3. short x;
4. unsigned short x;
(A) 3 and 4(B) 2(C) 1(D) All are validAnswer: (D)Explanation: All are valid. First 3 mean the same thing. 4th means unsigned.Quiz of this Question
C-Data Types
Data Types
C Language
C... | [
{
"code": null,
"e": 25577,
"s": 25549,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25633,
"s": 25577,
"text": "Which of the following is not a valid declaration in C?"
},
{
"code": "1. short int x;",
"e": 25649,
"s": 25633,
"text": null
},
{
"cod... |
HTML | DOM scrollIntoView() Method - GeeksforGeeks | 18 Nov, 2019
The scrollIntoView() method scrolls the specified element into the visible area of the browser window.
Syntax:
document.getElementById("id").scrollIntoView(alignTo);
Parameters:
alignTo: It is a Boolean type parameter containing true or false value. The default value is set to true.true: Scroll the element... | [
{
"code": null,
"e": 26331,
"s": 26303,
"text": "\n18 Nov, 2019"
},
{
"code": null,
"e": 26434,
"s": 26331,
"text": "The scrollIntoView() method scrolls the specified element into the visible area of the browser window."
},
{
"code": null,
"e": 26442,
"s": 26434,
... |
How to Convert Float to Datetime in Pandas DataFrame? - GeeksforGeeks | 29 Aug, 2020
Pandas Dataframe provides the freedom to change the data type of column values. We can change them from Integers to Float type, Integer to Datetime, String to Integer, Float to Datetime, etc. For converting float to DateTime we use pandas.to_datetime() function and following syntax is used :
Syntax: pandas... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 25830,
"s": 25537,
"text": "Pandas Dataframe provides the freedom to change the data type of column values. We can change them from Integers to Float type, Integer to Datetime, String to Inte... |
Multiple Inheritance in PHP - GeeksforGeeks | 01 Aug, 2021
Multiple Inheritance is the property of the Object Oriented Programming languages in which child class or sub class can inherit the properties of the multiple parent classes or super classes.PHP doesn’t support multiple inheritance but by using Interfaces in PHP or using Traits in PHP instead of classes, w... | [
{
"code": null,
"e": 26119,
"s": 26091,
"text": "\n01 Aug, 2021"
},
{
"code": null,
"e": 26446,
"s": 26119,
"text": "Multiple Inheritance is the property of the Object Oriented Programming languages in which child class or sub class can inherit the properties of the multiple pare... |
PyQt5 QCalendarWidget - Setting Enter Event - GeeksforGeeks | 25 Nov, 2021
In this article we will see how we can implement the enter event for the QCalendarWidget. A enter event is sent to the calendar when the mouse cursor enters the calendar. This event handler can be reimplemented in a subclass to receive calendar enter events which are passed in the event parameter.Below is ... | [
{
"code": null,
"e": 25729,
"s": 25701,
"text": "\n25 Nov, 2021"
},
{
"code": null,
"e": 26062,
"s": 25729,
"text": "In this article we will see how we can implement the enter event for the QCalendarWidget. A enter event is sent to the calendar when the mouse cursor enters the ca... |
MAN Full Form - GeeksforGeeks | 19 Aug, 2021
MAN stands for metropolitan area network and it is basically a computer network that is made by connecting multiple LAN’S. MAN covers a geographical area which is known as the metropolitan area. It serves as a connection which is larger than LAN(Local Area Network) but smaller than WAN(Wide Area Network). ... | [
{
"code": null,
"e": 25780,
"s": 25752,
"text": "\n19 Aug, 2021"
},
{
"code": null,
"e": 26320,
"s": 25780,
"text": "MAN stands for metropolitan area network and it is basically a computer network that is made by connecting multiple LAN’S. MAN covers a geographical area which is ... |
Find two numbers B and C such that their product is A and their GCD is maximum - GeeksforGeeks | 19 Jan, 2022
Given a positive integer, A. The task is to find two numbers B and C such that their product is A and their GCD should be maximum.
Examples:
Input: A = 72Output: 12 6Explanation: The product of 12 and 6 is 72 and GCD(12, 6) is 6 which is maximum possible.
Input: A = 54Output: 6 9Explanation: The product... | [
{
"code": null,
"e": 26537,
"s": 26509,
"text": "\n19 Jan, 2022"
},
{
"code": null,
"e": 26668,
"s": 26537,
"text": "Given a positive integer, A. The task is to find two numbers B and C such that their product is A and their GCD should be maximum."
},
{
"code": null,
... |
Python - Group Elements in Matrix - GeeksforGeeks | 30 Dec, 2020
Given a Matrix with two columns, group 2nd column elements on basis of 1st column.
Input : test_list = [[5, 8], [2, 0], [5, 4], [2, 3], [2, 9]]Output : {5: [8, 4], 2: [0, 3, 9]}Explanation : 8 and 4 are mapped to 5 in Matrix, all others to 2.
Input : test_list = [[2, 8], [2, 0], [2, 4], [2, 3], [2, 9]]Outp... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n30 Dec, 2020"
},
{
"code": null,
"e": 25620,
"s": 25537,
"text": "Given a Matrix with two columns, group 2nd column elements on basis of 1st column."
},
{
"code": null,
"e": 25780,
"s": 25620,
"text": "Input :... |
Python | Find closest number to k in given list - GeeksforGeeks | 17 Oct, 2019
Given a list of numbers and a variable K, where K is also a number, write a Python program to find the number in a list which is closest to the given number K.
Examples:
Input : lst = [3.64, 5.2, 9.42, 9.35, 8.5, 8], K = 9.1
Output : 9.35
Input : lst = [9, 11, 5, 3, 25, 18], K = 6
Output : 5
Method #1 :... | [
{
"code": null,
"e": 26147,
"s": 26119,
"text": "\n17 Oct, 2019"
},
{
"code": null,
"e": 26307,
"s": 26147,
"text": "Given a list of numbers and a variable K, where K is also a number, write a Python program to find the number in a list which is closest to the given number K."
... |
Python Program to Find the Number Occurring Odd Number of Times - GeeksforGeeks | 28 Oct, 2019
Given an array of positive integers. All numbers occur even number of times except one number which occurs odd number of times. Find the number in O(n) time & constant space.
Examples :
Input : arr = {1, 2, 3, 2, 3, 1, 3}
Output : 3
Input : arr = {5, 7, 2, 7, 5, 2, 5}
Output : 5
Python3
# Python program ... | [
{
"code": null,
"e": 26443,
"s": 26415,
"text": "\n28 Oct, 2019"
},
{
"code": null,
"e": 26618,
"s": 26443,
"text": "Given an array of positive integers. All numbers occur even number of times except one number which occurs odd number of times. Find the number in O(n) time & cons... |
Arrays.sort() in Java with examples - GeeksforGeeks | 19 Apr, 2022
An array class is a class containing static methods that are used with arrays in order to search, sort, compare, inserting elements, or returning a string representation of an array. in an array. So let us specify the functions first and later onwards we will be discussing the same. They are as follows bee... | [
{
"code": null,
"e": 25509,
"s": 25481,
"text": "\n19 Apr, 2022"
},
{
"code": null,
"e": 25945,
"s": 25509,
"text": "An array class is a class containing static methods that are used with arrays in order to search, sort, compare, inserting elements, or returning a string represen... |
Program to Find the Incenter of a Triangle - GeeksforGeeks | 10 Mar, 2022
Given the vertices of a triangle and length of its sides. A circle is inscribed in a triangle. The task is to find the incenter of a triangle.Examples:
Input: A(2, 2), B(1, 1), C(3, 1)
and AB = 2, BC = 1, AC = 1
Output: (2, 1.5)
Input: A(3, 3), B(1, 2), C(2, 2)
and AB = 3, BC = 2, AC =... | [
{
"code": null,
"e": 26305,
"s": 26277,
"text": "\n10 Mar, 2022"
},
{
"code": null,
"e": 26459,
"s": 26305,
"text": "Given the vertices of a triangle and length of its sides. A circle is inscribed in a triangle. The task is to find the incenter of a triangle.Examples: "
},
{... |
C Program For Deleting A Node In A Linked List - GeeksforGeeks | 26 Dec, 2021
We have discussed Linked List Introduction and Linked List Insertion in previous posts on a singly linked list.Let us formulate the problem statement to understand the deletion process. Given a ‘key’, delete the first occurrence of this key in the linked list.
Iterative Method:To delete a node from the li... | [
{
"code": null,
"e": 25531,
"s": 25503,
"text": "\n26 Dec, 2021"
},
{
"code": null,
"e": 25793,
"s": 25531,
"text": "We have discussed Linked List Introduction and Linked List Insertion in previous posts on a singly linked list.Let us formulate the problem statement to understand... |
Flutter - Splitting App into Widgets - GeeksforGeeks | 15 Jan, 2021
Splitting an app into widgets refers to the breaking up of large widgets into smaller, more manageable widgets which can be inferred as smaller chunks of codes. The principal thing here is to understand when to split a widget into smaller ones. We are going to discuss when to split a widget and methods of ... | [
{
"code": null,
"e": 25489,
"s": 25461,
"text": "\n15 Jan, 2021"
},
{
"code": null,
"e": 25817,
"s": 25489,
"text": "Splitting an app into widgets refers to the breaking up of large widgets into smaller, more manageable widgets which can be inferred as smaller chunks of codes. Th... |
Arduino - String Object | The second type of string used in Arduino programming is the String Object.
An object is a construct that contains both data and functions. A String object can be created just like a variable and assigned a value or string. The String object contains functions (which are called "methods" in object oriented programming ... | [
{
"code": null,
"e": 2946,
"s": 2870,
"text": "The second type of string used in Arduino programming is the String Object."
},
{
"code": null,
"e": 3262,
"s": 2946,
"text": "An object is a construct that contains both data and functions. A String object can be created just like a... |
C program to traverse an Array - GeeksforGeeks | 30 Mar, 2021
Given an integer array of size N, the task is to traverse and print the elements in the array.Examples:
Input: arr[] = {2, -1, 5, 6, 0, -3} Output: 2 -1 5 6 0 -3
Input: arr[] = {4, 0, -2, -9, -7, 1} Output: 4 0 -2 -9 -7 1
Approach:-
1. Start a loop from 0 to N-1, where N is the size of array.
for(i =... | [
{
"code": null,
"e": 25721,
"s": 25693,
"text": "\n30 Mar, 2021"
},
{
"code": null,
"e": 25826,
"s": 25721,
"text": "Given an integer array of size N, the task is to traverse and print the elements in the array.Examples: "
},
{
"code": null,
"e": 25884,
"s": 25826... |
Python - Remove elements at Indices in List - GeeksforGeeks | 01 Dec, 2021
Given List, remove all the elements present in indices list.
Input : test_list = [5, 6, 3, 7, 8, 1, 2, 10], idx_list = [2, 4, 5] Output : [5, 6, 7, 2, 10] Explanation : 3, 6, and 1 has been removed.Input : test_list = [5, 6, 3, 7, 8, 1, 2, 10], idx_list = [2] Output : [5, 6, 7, 8, 1, 2, 10] Explanation : 3... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n01 Dec, 2021"
},
{
"code": null,
"e": 25598,
"s": 25537,
"text": "Given List, remove all the elements present in indices list."
},
{
"code": null,
"e": 25865,
"s": 25598,
"text": "Input : test_list = [5, 6, 3,... |
How to Check if LinkedHashMap Contains a value in Java? - GeeksforGeeks | 15 Dec, 2020
LinkedHashMap is a predefined class in Java which is similar to HashMap, contains key and its respective value unlike HashMap, In LinkedHashMap insertion order is preserved. The task is to check if LinkedHashMap contains any value in java. to check we have to iterate through our LinkedHashMap and if we ge... | [
{
"code": null,
"e": 25251,
"s": 25223,
"text": "\n15 Dec, 2020"
},
{
"code": null,
"e": 25586,
"s": 25251,
"text": "LinkedHashMap is a predefined class in Java which is similar to HashMap, contains key and its respective value unlike HashMap, In LinkedHashMap insertion order is ... |
MongoDB updateMany() Method - db.Collection.updateMany() - GeeksforGeeks | 28 Jan, 2021
The updateMany() method updates all the documents in MongoDB collections that match the given query. When you update your document, the value of the _id field remains unchanged. This method can also add new fields in the document. Specify an empty document({}) in the selection criteria to update all collec... | [
{
"code": null,
"e": 25517,
"s": 25489,
"text": "\n28 Jan, 2021"
},
{
"code": null,
"e": 25840,
"s": 25517,
"text": "The updateMany() method updates all the documents in MongoDB collections that match the given query. When you update your document, the value of the _id field rema... |
Eulerian Number - GeeksforGeeks | 07 Aug, 2021
In combinatorics, the Eulerian Number A(n, m), is the number of permutations of the numbers 1 to n in which exactly m elements are greater than previous element.
For example, there are 4 permutations of the number 1 to 3 in which exactly 1 element is greater than the previous elements.
Examples :
Input ... | [
{
"code": null,
"e": 26079,
"s": 26051,
"text": "\n07 Aug, 2021"
},
{
"code": null,
"e": 26241,
"s": 26079,
"text": "In combinatorics, the Eulerian Number A(n, m), is the number of permutations of the numbers 1 to n in which exactly m elements are greater than previous element."
... |
Python | Merging two list of dictionaries - GeeksforGeeks | 12 Oct, 2021
Given two list of dictionaries, the task is to merge these two lists of dictionaries based on some value.
Method #1: Using defaultdict and extend to merge two list of dictionaries based on school_id.
# Python code to merge two list of dictionaries # based on some value. from collections import defaultdic... | [
{
"code": null,
"e": 26173,
"s": 26145,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 26279,
"s": 26173,
"text": "Given two list of dictionaries, the task is to merge these two lists of dictionaries based on some value."
},
{
"code": null,
"e": 26373,
"s": 2627... |
Difference between Storage Area Network (SAN) and Network Attached Storage (NAS) - GeeksforGeeks | 22 Apr, 2022
Storage Area Network (SAN): Storage Area Network (SAN) is used for transferring the data between the servers and the storage devices fiber channel and switches. In SAN (Storage Area Network), Data is identified by disk block. Protocols that are used in SAN are: SCSI, SATA etc. Components of Storage Area Ne... | [
{
"code": null,
"e": 24436,
"s": 24408,
"text": "\n22 Apr, 2022"
},
{
"code": null,
"e": 24756,
"s": 24436,
"text": "Storage Area Network (SAN): Storage Area Network (SAN) is used for transferring the data between the servers and the storage devices fiber channel and switches. In... |
How to check privileges in MySQL? | To check privileges, use SHOW command with GRANTS. Following is the syntax −
SHOW GRANTS;
The above syntax will show privileges for root. If you want to check privileges for a specific user,
then use the below syntax −
SHOW GRANTS FOR 'yourUserName'@'yourHostName';
The above syntax will check privileges for a specific ... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "To check privileges, use SHOW command with GRANTS. Following is the syntax −"
},
{
"code": null,
"e": 1152,
"s": 1139,
"text": "SHOW GRANTS;"
},
{
"code": null,
"e": 1281,
"s": 1152,
"text": "The above syntax will... |
Preprocessing text in Python. A step towards building a sentiment... | by Zolzaya Luvsandorj | Towards Data Science | This post is the second of three sequential posts on steps to build a sentiment classifier. Following our exploratory text analysis in the first post, it’s time to preprocess our text data. Simply put, preprocessing text data is to do a series of operations to convert the text into a tabular numeric data. In this post,... | [
{
"code": null,
"e": 679,
"s": 171,
"text": "This post is the second of three sequential posts on steps to build a sentiment classifier. Following our exploratory text analysis in the first post, it’s time to preprocess our text data. Simply put, preprocessing text data is to do a series of operatio... |
C++ Ostream Library - write | It is used to inserts the first n characters of the array pointed by s into the stream. This function simply copies a block of data, without checking its contents: The array may contain null characters, which are also copied without stopping the copying process.
Following is the declaration for std::ostream::write.
ost... | [
{
"code": null,
"e": 2866,
"s": 2603,
"text": "It is used to inserts the first n characters of the array pointed by s into the stream. This function simply copies a block of data, without checking its contents: The array may contain null characters, which are also copied without stopping the copying... |
Select DataFrame rows between two index values in Python Pandas | We can slice a Pandas DataFrame to select rows between two index values. Let's take an example and see how it's done.
Create a two-dimensional, size-mutable, potentially heterogeneous tabular data, df.
Print the input DataFrame, df.
Initialize a variable for lower limit of the index.
Initialize another variable for upp... | [
{
"code": null,
"e": 1180,
"s": 1062,
"text": "We can slice a Pandas DataFrame to select rows between two index values. Let's take an example and see how it's done."
},
{
"code": null,
"e": 1264,
"s": 1180,
"text": "Create a two-dimensional, size-mutable, potentially heterogeneou... |
How To Create Unique Pokémon Using GANs | by Tyler Folkman | Towards Data Science | My son is really into Pokemon. I don’t get it, but I guess that’s besides the point. I did start to wonder, though, if I could create new Pokemon cards for him automatically using deep learning.
I ended up having a bit of success generating Pokemon-like images using Generative Adversarial Networks (GANs) and I thought ... | [
{
"code": null,
"e": 367,
"s": 172,
"text": "My son is really into Pokemon. I don’t get it, but I guess that’s besides the point. I did start to wonder, though, if I could create new Pokemon cards for him automatically using deep learning."
},
{
"code": null,
"e": 531,
"s": 367,
... |
How to run two PHP versions for two projects on same apache server ? - GeeksforGeeks | 15 Nov, 2021
In this article, we will learn about running two versions of PHP on the same Apache server. To manage many domains, the Apache webserver uses virtual hosts on a single instance.
Prerequisite: We will be using the XAMPP server to use the Apache server and some knowledge to use it.
First, download the older ... | [
{
"code": null,
"e": 25246,
"s": 25218,
"text": "\n15 Nov, 2021"
},
{
"code": null,
"e": 25424,
"s": 25246,
"text": "In this article, we will learn about running two versions of PHP on the same Apache server. To manage many domains, the Apache webserver uses virtual hosts on a si... |
C# | Type.GetMember() Method - GeeksforGeeks | 05 Dec, 2019
Type.GetMember() Method is used to get the specified members of the current Type. There are 3 methods in the overload list of this method as follows:
GetMember(String) Method
GetMember(String, BindingFlags) Method
GetMember(String, MemberTypes, BindingFlags) Method
This method searches for the public membe... | [
{
"code": null,
"e": 24904,
"s": 24876,
"text": "\n05 Dec, 2019"
},
{
"code": null,
"e": 25054,
"s": 24904,
"text": "Type.GetMember() Method is used to get the specified members of the current Type. There are 3 methods in the overload list of this method as follows:"
},
{
... |
Rename Files Using R - GeeksforGeeks | 14 Sep, 2021
In this article, we are going to see how to rename files using R Programming Language.
To rename a file in R we use file.rename(). This function renames all the files mentioned as parameters. It returns normally TRUE for success, FALSE for failure.
Note: File naming conventions depend on the platform.
Syn... | [
{
"code": null,
"e": 26597,
"s": 26569,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 26684,
"s": 26597,
"text": "In this article, we are going to see how to rename files using R Programming Language."
},
{
"code": null,
"e": 26847,
"s": 26684,
"text": "To ... |
Maximum number of segments of lengths a, b and c - GeeksforGeeks | 07 Apr, 2021
Given a positive integer N, find the maximum number of segments of lengths a, b and c that can be formed from N . Examples :
Input : N = 7, a = 5, b, = 2, c = 5
Output : 2
N can be divided into 2 segments of lengths
2 and 5. For the second example,
Input : N = 17, a = 2, b = 1, c = 3
Output : 17
N c... | [
{
"code": null,
"e": 24698,
"s": 24670,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 24825,
"s": 24698,
"text": "Given a positive integer N, find the maximum number of segments of lengths a, b and c that can be formed from N . Examples : "
},
{
"code": null,
"e":... |
Tryit Editor v3.7 | Tryit: HTML table - colgroup | [] |
ReactJS UI Ant Design Layout Component - GeeksforGeeks | 01 Jun, 2021
Ant Design Library has this component pre-built, and it is very easy to integrate as well. The Layout component is used for handling the overall layout of a page. We can use the following approach in ReactJS to use the Ant Design Layout Component.
Layout Props:
className: It is used to pass the container c... | [
{
"code": null,
"e": 34238,
"s": 34210,
"text": "\n01 Jun, 2021"
},
{
"code": null,
"e": 34486,
"s": 34238,
"text": "Ant Design Library has this component pre-built, and it is very easy to integrate as well. The Layout component is used for handling the overall layout of a page. ... |
Blob conversion function in Cassandra - GeeksforGeeks | 03 Dec, 2019
In Cassandra, Blob data type represents constant hexadecimal data type and the number is defined as 0[xX](hex)+ where hex means hexadecimal. It is useful to store a short string or small images.
In this article we will discuss Blob conversion function which converts the native types into binary data (blob)... | [
{
"code": null,
"e": 24038,
"s": 24010,
"text": "\n03 Dec, 2019"
},
{
"code": null,
"e": 24233,
"s": 24038,
"text": "In Cassandra, Blob data type represents constant hexadecimal data type and the number is defined as 0[xX](hex)+ where hex means hexadecimal. It is useful to store ... |
What's the best way to trim std::string in C++? | Here we will see how to trim the strings in C++. The trimming string means removing whitespaces from left and right part of the string.
To trim the C++ string, we will use the boost string library. In that library, there are two different methods called trim_left() and trim_right(). To trim string completely, we can us... | [
{
"code": null,
"e": 1198,
"s": 1062,
"text": "Here we will see how to trim the strings in C++. The trimming string means removing whitespaces from left and right part of the string."
},
{
"code": null,
"e": 1398,
"s": 1198,
"text": "To trim the C++ string, we will use the boost ... |
Batch statement in Cassandra - GeeksforGeeks | 09 Dec, 2019
In this article, we will discuss the BATCH statement, good and misuse of BATCH statement and how we can use the BATCH statement in single and multiple partitions in Cassandra which is supported by Cassandra Query Language (CQL). let’s discuss one by one.
We can use the BATCH statement in single and multipl... | [
{
"code": null,
"e": 24418,
"s": 24390,
"text": "\n09 Dec, 2019"
},
{
"code": null,
"e": 24673,
"s": 24418,
"text": "In this article, we will discuss the BATCH statement, good and misuse of BATCH statement and how we can use the BATCH statement in single and multiple partitions i... |
Count of all unique paths from given source to destination in a Matrix - GeeksforGeeks | 16 Dec, 2021
Given a 2D matrix of size n*m, a source ‘s’ and a destination ‘d’, print the count of all unique paths from given ‘s’ to ‘d’. From each cell, you can either move only to the right or down.
Examples:
Input: arr[][] = { {1, 2, 3}, {4, 5, 6} }, s = {0, 0}, d = {1, 2}Output: 3Explanation: All possible paths f... | [
{
"code": null,
"e": 24958,
"s": 24930,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 25148,
"s": 24958,
"text": "Given a 2D matrix of size n*m, a source ‘s’ and a destination ‘d’, print the count of all unique paths from given ‘s’ to ‘d’. From each cell, you can either move ... |
strtoul() function in C/C++ | 30 Jun, 2021
The strtoul() function in C/C++ which converts the initial part of the string in str to an unsigned long int value according to the given base, which must be between 2 and 36 inclusive, or be the special value 0. This function discard any white space characters until the first non-whitespace character is f... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jun, 2021"
},
{
"code": null,
"e": 484,
"s": 28,
"text": "The strtoul() function in C/C++ which converts the initial part of the string in str to an unsigned long int value according to the given base, which must be between 2 and 36 ... |
std::string::rfind in C++ with Examples | 26 May, 2022
The std::string::rfind is a string class member function that is used to search the last occurrence of any character in the string. If the character is present in the string then it returns the index of the last occurrence of that character in the string else it will return string::npos which denotes the p... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 May, 2022"
},
{
"code": null,
"e": 408,
"s": 52,
"text": "The std::string::rfind is a string class member function that is used to search the last occurrence of any character in the string. If the character is present in the string ... |
Python Number round() Method | Python number method round() returns x rounded to n digits from the decimal point.
Following is the syntax for round() method −
round( x [, n] )
x − This is a numeric expression.
x − This is a numeric expression.
n − This is also a numeric expression.
n − This is also a numeric expression.
This method returns x round... | [
{
"code": null,
"e": 2461,
"s": 2378,
"text": "Python number method round() returns x rounded to n digits from the decimal point."
},
{
"code": null,
"e": 2506,
"s": 2461,
"text": "Following is the syntax for round() method −"
},
{
"code": null,
"e": 2525,
"s": 25... |
Node.js http.ClientRequest.setTimeout() Method | 06 May, 2021
The http.ClientRequest.setTimeout() is an inbuilt application programming interface of class ClientRequest within the HTTP module which is used to set the request time out for the client request.
Syntax:
request.setTimeout(timeout[, callback])
Parameters: This method takes the time out value as a parameter... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 May, 2021"
},
{
"code": null,
"e": 224,
"s": 28,
"text": "The http.ClientRequest.setTimeout() is an inbuilt application programming interface of class ClientRequest within the HTTP module which is used to set the request time out for... |
re.MatchObject.groupdict() function in Python – Regex | 29 Aug, 2020
This method returns a dictionary with the groupname as keys and the matched string as the value for that key.
Syntax: re.MatchObject.groupdict()
Return: A dictionary with groupnames as the keys and matched string as the value for the key.
AttributeError: If a matching pattern is not found then it raise Att... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Aug, 2020"
},
{
"code": null,
"e": 138,
"s": 28,
"text": "This method returns a dictionary with the groupname as keys and the matched string as the value for that key."
},
{
"code": null,
"e": 173,
"s": 138,
"text... |
Swiggy Interview Experience for SDE-II | 07 Jul, 2021
I applied on LinkedIn for Swiggy SDE-II (R&G). Got the first round link – Hackerrank after 9-10 days.
Round 1(Online Coding): HackerRank
3 Questions were asked in this round and time limit was 75 minutes. All the 3 questions were hard.
Flexible StringsGiven a string abccc, Given are below operationsb can b... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n07 Jul, 2021"
},
{
"code": null,
"e": 156,
"s": 54,
"text": "I applied on LinkedIn for Swiggy SDE-II (R&G). Got the first round link – Hackerrank after 9-10 days."
},
{
"code": null,
"e": 191,
"s": 156,
"text": "Rou... |
C# | Get or set the number of elements that the ArrayList can contain | 01 Feb, 2019
ArrayList represents an ordered collection of an object that can be indexed individually. It is basically an alternative to an array. It also allows dynamic memory allocation, adding, searching and sorting items in the list. ArrayList.Capacity property is used to get or set the number of elements that the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 358,
"s": 28,
"text": "ArrayList represents an ordered collection of an object that can be indexed individually. It is basically an alternative to an array. It also allows dynamic memory allocation,... |
How to convert CSV File to PDF File using Python? | 16 Mar, 2021
In this article, we will learn how to do Conversion of CSV to PDF file format. This simple task can be easily done using two Steps :
Firstly, We convert our CSV file to HTML using the PandasIn the Second Step, we use PDFkit Python API to convert our HTML file to the PDF file format.
Firstly, We convert our... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Mar, 2021"
},
{
"code": null,
"e": 161,
"s": 28,
"text": "In this article, we will learn how to do Conversion of CSV to PDF file format. This simple task can be easily done using two Steps :"
},
{
"code": null,
"e": 312,
... |
Non linear Regression examples – ML | 07 Oct, 2021
Non-Linear regression is a type of polynomial regression. It is a method to model a non-linear relationship between the dependent and independent variables. It is used in place when the data shows a curvy trend, and linear regression would not produce very accurate results when compared to non-linear regre... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 423,
"s": 28,
"text": "Non-Linear regression is a type of polynomial regression. It is a method to model a non-linear relationship between the dependent and independent variables. It is used in plac... |
Scala | Nested Functions | 06 Jun, 2021
A function definition inside an another function is known as Nested Function. It is not supported by C++, Java, etc. In other languages, we can call a function inside a function, but it’s not a nested function. In Scala, we can define functions inside a function and functions defined inside other functions... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jun, 2021"
},
{
"code": null,
"e": 408,
"s": 52,
"text": "A function definition inside an another function is known as Nested Function. It is not supported by C++, Java, etc. In other languages, we can call a function inside a funct... |
Difference Between DART and C++ - GeeksforGeeks | 20 Aug, 2021
Competitive Programming teaches one to find the easiest solution in the quickest way possible. And C++ has always been loved by almost all the competitive programmers. C++ language is capable of boosting the speed of debugging and problem-solving which are the necessities for this brain sport.
Why is C++ a... | [
{
"code": null,
"e": 24187,
"s": 24159,
"text": "\n20 Aug, 2021"
},
{
"code": null,
"e": 24482,
"s": 24187,
"text": "Competitive Programming teaches one to find the easiest solution in the quickest way possible. And C++ has always been loved by almost all the competitive programm... |
Append to StringBuilder in C# with a new line on the end | The AppendLine() method appends the content and add a new line on the end.
Firstly, set the StringBuilder −
StringBuilder str = new StringBuilder();
Use AppendLine() −
str.AppendLine("Accessories");
str.AppendLine();
str.AppendLine("Electronics");
The following is the complete code −
Live Demo
using System;
using Syst... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "The AppendLine() method appends the content and add a new line on the end."
},
{
"code": null,
"e": 1170,
"s": 1137,
"text": "Firstly, set the StringBuilder −"
},
{
"code": null,
"e": 1211,
"s": 1170,
"text": "Str... |
Convert datetime to get month name in MySQL? | To get only month name, the syntax is as follows −
select date_format(yourColumnName,'%M %Y') from yourTableName;
Let us first create a table −
mysql> create table DemoTable1619
-> (
-> ArrivalTime datetime
-> );
Query OK, 0 rows affected (0.45 sec)
Insert some records in the table using insert command −
my... | [
{
"code": null,
"e": 1113,
"s": 1062,
"text": "To get only month name, the syntax is as follows −"
},
{
"code": null,
"e": 1176,
"s": 1113,
"text": "select date_format(yourColumnName,'%M %Y') from yourTableName;"
},
{
"code": null,
"e": 1206,
"s": 1176,
"text"... |
How to set up a cookie that never expires in JavaScript ? | 29 Oct, 2021
We can set up a cookie that never expires in JavaScript using the following approach:
Prerequisites :
Intermediate level knowledge of JavaScript
Basic HTML
Disclaimer: All the cookies expire as per the cookie specification. So, there is no block of code you can write in JavaScript to set up a cookie that... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Oct, 2021"
},
{
"code": null,
"e": 114,
"s": 28,
"text": "We can set up a cookie that never expires in JavaScript using the following approach:"
},
{
"code": null,
"e": 130,
"s": 114,
"text": "Prerequisites :"
}... |
Sorting rows of matrix in ascending order followed by columns in descending order | 06 Jul, 2022
Given a matrix, sort the rows of matrix in ascending order followed by sorting the columns in descending order. Examples :
Input : a[3][3] = {{1, 2, 3},
{4, 5, 6},
{7, 8, 9}};
Output : 7 8 9
4 5 6
1 2 3
Input : a[3][3] = {{3, 2, 1},
... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 178,
"s": 54,
"text": "Given a matrix, sort the rows of matrix in ascending order followed by sorting the columns in descending order. Examples : "
},
{
"code": null,
"e": 449,
"s":... |
Moving a file from one directory to another using Java | 21 Oct, 2021
Java provides functions to move files between directories. Two ways to achieve this are described here. The first method utilizes Files package for moving while the other method first copies the file to destination and then deletes the original copy from the source.
Using Files.Path move() method: Renami... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 323,
"s": 54,
"text": "Java provides functions to move files between directories. Two ways to achieve this are described here. The first method utilizes Files package for moving while the other met... |
Redux and The Flux Architecture | 31 Oct, 2019
Flux Architecture:Flux is AN architecture that Facebook uses internally when operating with React.It is not a framework or a library.It is merely a replacement quite an architecture that enhances React and also the idea of unidirectional data flow.
Redux is a predictable state container for JavaScript apps... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Oct, 2019"
},
{
"code": null,
"e": 277,
"s": 28,
"text": "Flux Architecture:Flux is AN architecture that Facebook uses internally when operating with React.It is not a framework or a library.It is merely a replacement quite an archit... |
How to use Pandas filter with IQR? | 02 Dec, 2021
The IQR or Inter Quartile Range is a statistical measure used to measure the variability in a given data. In naive terms, it tells us inside what range the bulk of our data lies. It can be calculated by taking the difference between the third quartile and the first quartile within a dataset.
IQR = Q3 - Q1
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Dec, 2021"
},
{
"code": null,
"e": 321,
"s": 28,
"text": "The IQR or Inter Quartile Range is a statistical measure used to measure the variability in a given data. In naive terms, it tells us inside what range the bulk of our data li... |
How to read multiple text files from folder in Python? | 02 Feb, 2021
Prerequisite:
File Handling
os
Python is a strong language which is extremely capable even when it comes to file handling. In this article, we will learn how to read multiple text files from a folder using python.
Approach:
Import modules
Add path of the folder
Change directory
Get the list of a file from ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n02 Feb, 2021"
},
{
"code": null,
"e": 68,
"s": 54,
"text": "Prerequisite:"
},
{
"code": null,
"e": 82,
"s": 68,
"text": "File Handling"
},
{
"code": null,
"e": 85,
"s": 82,
"text": "os"
},
{
... |
Program to sort an array of strings using Selection Sort | 08 Jun, 2022
Given an array of strings, sort the array using Selection Sort.
Examples:
Input : paper true soap floppy flower
Output : floppy, flower, paper, soap, true
Prerequisite : Selection Sort.
C++
C
Java
Python3
C#
Javascript
// C++ program to implement selection sort for// array of strings.#include <bits/stdc... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jun, 2022"
},
{
"code": null,
"e": 116,
"s": 52,
"text": "Given an array of strings, sort the array using Selection Sort."
},
{
"code": null,
"e": 127,
"s": 116,
"text": "Examples: "
},
{
"code": null,
... |
OAuth2 Authentication with Spring and Github | 29 Dec, 2020
Open Authorization or OAuth is an industry level protocol used for authorization. It allows third-party services to exchange your information without the user having to give his password. This is possible as it uses authorization tokens to prove an identity between consumers and service providers. OAuth2 i... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 515,
"s": 54,
"text": "Open Authorization or OAuth is an industry level protocol used for authorization. It allows third-party services to exchange your information without the user having to give ... |
Swap the elements between any two given quadrants of a Matrix | 22 Jun, 2021
Given a matrix, mat[][] of size N * M, where N and M is always even, and two integers X and Y, the task is to swap all the elements of the quadrant X quadrant with all the corresponding elements of quadrant Y of the given matrix.
Note: The top-left, top-right, bottom-left, and bottom-right quadrants are nu... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Jun, 2021"
},
{
"code": null,
"e": 284,
"s": 54,
"text": "Given a matrix, mat[][] of size N * M, where N and M is always even, and two integers X and Y, the task is to swap all the elements of the quadrant X quadrant with all the co... |
NuxtJS Directory Structure | 13 Dec, 2021
In this article, we are going to learn about the directory structure of NuxtJs. Nuxt.js is a free and open-source web application framework based on Vue.js, Node.js, Webpack, and Babel.js. Nuxt is inspired by Next.js, which is a framework of similar purpose, based on React.js.
Create NuxtJS Application:
St... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Dec, 2021"
},
{
"code": null,
"e": 306,
"s": 28,
"text": "In this article, we are going to learn about the directory structure of NuxtJs. Nuxt.js is a free and open-source web application framework based on Vue.js, Node.js, Webpack, ... |
PHP | Namespace | 04 Oct, 2021
Like C++, PHP Namespaces are the way of encapsulating items so that same names can be reused without name conflicts.
It can be seen as an abstract concept in many places. It allows redeclaring the same functions/classes/interfaces/constant functions in the separate namespace without getting the fatal error... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Oct, 2021"
},
{
"code": null,
"e": 169,
"s": 52,
"text": "Like C++, PHP Namespaces are the way of encapsulating items so that same names can be reused without name conflicts."
},
{
"code": null,
"e": 361,
"s": 169,
... |
Executing Shell Commands with Python | 01 Oct, 2020
Prerequisite: Some basic shell commands
In programming, the shell is a software interface for accessing the functionality of the operating system. Shells in the operating system use either a CLI (Command Line Interface) or a GUI (Graphical User Interface) based on the functionality and basic operation of t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 68,
"s": 28,
"text": "Prerequisite: Some basic shell commands"
},
{
"code": null,
"e": 346,
"s": 68,
"text": "In programming, the shell is a software interface for accessing the ... |
numpy.expand_dims | This function expands the array by inserting a new axis at the specified position. Two parameters are required by this function.
numpy.expand_dims(arr, axis)
Where,
arr
Input array
axis
Position where new axis to be inserted
import numpy as np
x = np.array(([1,2],[3,4]))
print 'Array x:'
print x
print '\n'
y = ... | [
{
"code": null,
"e": 2506,
"s": 2377,
"text": "This function expands the array by inserting a new axis at the specified position. Two parameters are required by this function."
},
{
"code": null,
"e": 2536,
"s": 2506,
"text": "numpy.expand_dims(arr, axis)\n"
},
{
"code": ... |
Python | Pandas Series.dt.quarter | 20 Mar, 2019
Series.dt can be used to access the values of the series as datetimelike and return several properties. Pandas Series.dt.quarter attribute return the quarter of the date in the underlying datetime based data in the given series object.
Syntax: Series.dt.quarter
Parameter : None
Returns : numpy array
Exampl... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Mar, 2019"
},
{
"code": null,
"e": 264,
"s": 28,
"text": "Series.dt can be used to access the values of the series as datetimelike and return several properties. Pandas Series.dt.quarter attribute return the quarter of the date in th... |
Node.js Promise Chaining | 08 Oct, 2021
Promise chaining: Promise chaining is a syntax that allows you to chain together multiple asynchronous tasks in a specific order. This is great for complex code where one asynchronous task needs to be performed after the completion of a different asynchronous task.
To demonstrate promise chaining, the foll... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 294,
"s": 28,
"text": "Promise chaining: Promise chaining is a syntax that allows you to chain together multiple asynchronous tasks in a specific order. This is great for complex code where one asyn... |
Java Script | setTimeout() & setInterval() Method | 10 Jun, 2022
SetTimeout and SetInterval are the only native function in javaScript that is used to run code asynchronously , it means allow the function to executed immediately , there is no need to wait for current execution completion , it will for further to execute.
setTimeout() method The setTimeout() method execu... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n10 Jun, 2022"
},
{
"code": null,
"e": 311,
"s": 53,
"text": "SetTimeout and SetInterval are the only native function in javaScript that is used to run code asynchronously , it means allow the function to executed immediately , there is... |
Python – sys.stdout.flush() | 21 Apr, 2020
A data buffer is a region of physical memory storage used to temporarily store data while it is being moved from one place to another. The data is stored in a buffer as it is retrieved from an input device or just before it is sent to an output device or when moving data between processes within a computer... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 567,
"s": 52,
"text": "A data buffer is a region of physical memory storage used to temporarily store data while it is being moved from one place to another. The data is stored in a buffer as it is... |
Find Nth term (A matrix exponentiation example) | 27 May, 2021
We are given a recursive function that describes Nth terms in the form of other terms. In this article, we have taken specific examples. Now you are given n, and you have to find out nth term using the above formula.
Examples:
Input : n = 2
Output : 5
Input : n = 3
Output :13
Prerequisite : Basic Approa... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 May, 2021"
},
{
"code": null,
"e": 269,
"s": 52,
"text": "We are given a recursive function that describes Nth terms in the form of other terms. In this article, we have taken specific examples. Now you are given n, and you have to ... |
What is export default in JavaScript ? | 20 Jun, 2022
The export statement is used when creating JavaScript modules to export objects, functions, variables from the module so they can be used by other programs with the help of the import statements. There are two types of exports. One is Named Exports and other is Default Exports. Named Exports: Named exports... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 483,
"s": 52,
"text": "The export statement is used when creating JavaScript modules to export objects, functions, variables from the module so they can be used by other programs with the help of t... |
PostgreSQL – Difference between CHAR, VARCHAR and TEXT | 30 Sep, 2021
Now that we are familiar with the concept of character data types CHAR, VARCHAR, and TEXT respectively in PostgreSQL, this article will focus on highlighting the key difference between them.
What is CHAR data type? This data type is used to store characters of limited length. It is represented as char(n) ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 220,
"s": 28,
"text": "Now that we are familiar with the concept of character data types CHAR, VARCHAR, and TEXT respectively in PostgreSQL, this article will focus on highlighting the key differenc... |
C Programming Mock Test | This section presents you various set of Mock Tests related to C Programming Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
Q 1 - What is the output of... | [
{
"code": null,
"e": 2511,
"s": 2218,
"text": "This section presents you various set of Mock Tests related to C Programming Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you ver... |
How to find the subsequence in an input sequence that matches the pattern required in Java Regular Expressions? | The find() method finds the subsequence in an input sequence that matches the pattern required. This method is available in the Matcher class that is available in the java.util.regex package.
A program that demonstrates the method Matcher.find() in Java regular expressions is given as follows:
Live Demo
import java.ut... | [
{
"code": null,
"e": 1379,
"s": 1187,
"text": "The find() method finds the subsequence in an input sequence that matches the pattern required. This method is available in the Matcher class that is available in the java.util.regex package."
},
{
"code": null,
"e": 1482,
"s": 1379,
... |
GATE | GATE-CS-2005 | Question 82 | 28 Jun, 2021
Consider the following C-function:
double foo (int n){ int i; double sum; if (n = = 0) return 1.0; else { sum = 0.0; for (i = 0; i < n; i++) sum += foo (i); return sum; }}
Suppose we modify the above function foo() and store the values of foo (i), 0 < = i <... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 63,
"s": 28,
"text": "Consider the following C-function:"
},
{
"code": "double foo (int n){ int i; double sum; if (n = = 0) return 1.0; else { sum = 0.0; for (i ... |
Web Scraping 1: Scraping Table Data | by Kiprono Elijah Koech | Towards Data Science | Web Scraping is the most important concept of data collection. In Python, BeautifulSoup, Selenium and XPath are the most important tools that can be used to accomplish the task of web scraping.
In this article, we will focus on BeautifulSoup and how to use it to scrape GDP data from Wikipedia page. The data we need on ... | [
{
"code": null,
"e": 366,
"s": 172,
"text": "Web Scraping is the most important concept of data collection. In Python, BeautifulSoup, Selenium and XPath are the most important tools that can be used to accomplish the task of web scraping."
},
{
"code": null,
"e": 525,
"s": 366,
"... |
Paste command in Linux with examples - GeeksforGeeks | 19 Feb, 2021
Paste command is one of the useful commands in Unix or Linux operating system. It is used to join files horizontally (parallel merging) by outputting lines consisting of lines from each file specified, separated by tab as delimiter, to the standard output. When no file is specified, or put dash (“-“) inste... | [
{
"code": null,
"e": 23950,
"s": 23922,
"text": "\n19 Feb, 2021"
},
{
"code": null,
"e": 24377,
"s": 23950,
"text": "Paste command is one of the useful commands in Unix or Linux operating system. It is used to join files horizontally (parallel merging) by outputting lines consist... |
C# - Stack Class | It represents a last-in, first out collection of object. It is used when you need a last-in, first-out access of items. When you add an item in the list, it is called pushing the item and when you remove it, it is called popping the item.
The following table lists some commonly used properties of the Stack class −
Coun... | [
{
"code": null,
"e": 2509,
"s": 2270,
"text": "It represents a last-in, first out collection of object.\tIt is used when you need a last-in, first-out access of items. When you add an item in the list, it is called pushing the item and when you remove it, it is called popping the item."
},
{
... |
How does Constraint Layout works in android? | In simple words, constraint layout is an advanced version of a Relative layout. It is used to reduce the child view hierarchies and improve the performance.
Properties of constraint layout as shown below -
Wrap Content –It wrap the view size according to data.
Any Size – This is very similar to match parent.
Fixed Si... | [
{
"code": null,
"e": 1219,
"s": 1062,
"text": "In simple words, constraint layout is an advanced version of a Relative layout. It is used to reduce the child view hierarchies and improve the performance."
},
{
"code": null,
"e": 1268,
"s": 1219,
"text": "Properties of constraint ... |
Difference between const char* p, char * const p, and const char * const p in C | In C programming language, *p represents the value stored in a pointer and p represents the address of the value, is referred as a pointer.
const char* and char const* says that the pointer can point to a constant char and value of char pointed by this pointer cannot be changed. But we can change the value of pointer a... | [
{
"code": null,
"e": 1202,
"s": 1062,
"text": "In C programming language, *p represents the value stored in a pointer and p represents the address of the value, is referred as a pointer."
},
{
"code": null,
"e": 1446,
"s": 1202,
"text": "const char* and char const* says that the ... |
MongoDB aggregation to combine or merge fields and then count? | To combine or merge fields and then perform count, use $group along with $sum and $sort. Let us create a collection with documents −
> db.demo647.insertOne({"Subject":"MySQL"});
{
"acknowledged" : true,
"insertedId" : ObjectId("5e9c86316c954c74be91e6ee")
}
> db.demo647.insertOne({"Subject":"MongoDB"});
{
"ackn... | [
{
"code": null,
"e": 1195,
"s": 1062,
"text": "To combine or merge fields and then perform count, use $group along with $sum and $sort. Let us create a collection with documents −"
},
{
"code": null,
"e": 2117,
"s": 1195,
"text": "> db.demo647.insertOne({\"Subject\":\"MySQL\"});\... |
Nagios - Hosts and Services | Nagios is the most popular tool which is used to monitor hosts and services running in your IT infrastructure. Hosts and service configurations are the building blocks of Nagios Core.
Host is just like a computer; it can be a physical device or virtual.
Host is just like a computer; it can be a physical device or virtu... | [
{
"code": null,
"e": 2080,
"s": 1896,
"text": "Nagios is the most popular tool which is used to monitor hosts and services running in your IT infrastructure. Hosts and service configurations are the building blocks of Nagios Core."
},
{
"code": null,
"e": 2150,
"s": 2080,
"text":... |
Multi-Sample Dropout in Keras. Accelerated Training and Better... | by Marco Cerliani | Towards Data Science | Dropout is an efficient regularization instrument for avoiding overfitting of deep neural networks. It works very simply randomly discarding a portion of neurons during training; as a result, a generalization occurs because in this way neurons depend no more on each other. Dropout is easily applicable in every neural n... | [
{
"code": null,
"e": 536,
"s": 46,
"text": "Dropout is an efficient regularization instrument for avoiding overfitting of deep neural networks. It works very simply randomly discarding a portion of neurons during training; as a result, a generalization occurs because in this way neurons depend no mo... |
How to compare date strings in Python? | Python date implementations support all the comparision operators. So, if you are using the datetime module to create and handle date objects, you can simply use the <, >, <=, >=, etc. operators on the dates. This makes it very easy to compare and check dates for validations, etc.
from datetime import datetime
from dat... | [
{
"code": null,
"e": 1344,
"s": 1062,
"text": "Python date implementations support all the comparision operators. So, if you are using the datetime module to create and handle date objects, you can simply use the <, >, <=, >=, etc. operators on the dates. This makes it very easy to compare and check... |
Comparator in Kotlin - GeeksforGeeks | 02 Aug, 2019
In programming contexts, as there arises a need for a new type, there is also a major task of ordering the instances of a type. To compare two instances of a type we implement Comparable interface. However, since in ordering instances they must be compared automatically and also since the order can vary ac... | [
{
"code": null,
"e": 24112,
"s": 24084,
"text": "\n02 Aug, 2019"
},
{
"code": null,
"e": 24574,
"s": 24112,
"text": "In programming contexts, as there arises a need for a new type, there is also a major task of ordering the instances of a type. To compare two instances of a type ... |
Adding labels to histogram bars in Matplotlib - GeeksforGeeks | 24 Feb, 2021
In this article, we are going to discuss how to add labels to histogram bars in matplotlib. Histograms are used to display continuous data using bars. It looks similar to the bar graph. It shows the count or frequency of element that falls under the category mentioned in that range it means, taller the gra... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n24 Feb, 2021"
},
{
"code": null,
"e": 24320,
"s": 23901,
"text": "In this article, we are going to discuss how to add labels to histogram bars in matplotlib. Histograms are used to display continuous data using bars. It looks sim... |
Index Replication using Portfolio Optimization Methods | by Jason Yip | Towards Data Science | It’s been a whole year since I last posted and I thought to write about a project I’ve done recently during the stay-home period. It was difficult finding practical resources online. There were many math-heavy and theoretical academic papers, but I wanted to support others out there who were looking out for code and a ... | [
{
"code": null,
"e": 472,
"s": 47,
"text": "It’s been a whole year since I last posted and I thought to write about a project I’ve done recently during the stay-home period. It was difficult finding practical resources online. There were many math-heavy and theoretical academic papers, but I wanted ... |
Generate random characters and numbers in JavaScript? | At first, set the characters and numbers −
var storedCharacters =
'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
To generate randomly, use Math.random(). Following is the code −
function generateRandom3Characters(size) {
var generatedOutput= '';
var storedCharacters =
'0123456789abcdefghijkl... | [
{
"code": null,
"e": 1105,
"s": 1062,
"text": "At first, set the characters and numbers −"
},
{
"code": null,
"e": 1194,
"s": 1105,
"text": "var storedCharacters =\n'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';"
},
{
"code": null,
"e": 1259,
"s... |
PyQt5 QListWidget | Python - GeeksforGeeks | 17 Dec, 2019
In PyQt, QListWidget is a convenience class that provides a list view with a classic item-based interface for adding and removing items. QListWidget uses an internal model to manage each QListWidgetItem in the list.
Syntax:
listWidget = QListWidget()
There are two ways to add items to the list.
They can b... | [
{
"code": null,
"e": 24629,
"s": 24601,
"text": "\n17 Dec, 2019"
},
{
"code": null,
"e": 24845,
"s": 24629,
"text": "In PyQt, QListWidget is a convenience class that provides a list view with a classic item-based interface for adding and removing items. QListWidget uses an intern... |
Migrating PHP 5.x to PHP 7 on CentOS 7 | In this article, we will learn about how to upgrade and update PHP 5.x to PHP 7, PHP 7 which was released in 2015 with speed improvements comparable to the older versions of the PHP.
Assuming that we have already installed PHP 5.x on CentOS7, and mod_php module should be enabled by Apache, and we need Sudo privileges o... | [
{
"code": null,
"e": 1245,
"s": 1062,
"text": "In this article, we will learn about how to upgrade and update PHP 5.x to PHP 7, PHP 7 which was released in 2015 with speed improvements comparable to the older versions of the PHP."
},
{
"code": null,
"e": 1395,
"s": 1245,
"text": ... |
TypeScript - String Length Property | Returns the length of the string.
var uname = new String("Hello World")
console.log(uname)
console.log("Length "+uname.length) // returns the total number of characters
// including whitespace
On compiling, it will generate the same code in JavaScript.
Its output is as follows ... | [
{
"code": null,
"e": 2082,
"s": 2048,
"text": "Returns the length of the string."
},
{
"code": null,
"e": 2283,
"s": 2082,
"text": "var uname = new String(\"Hello World\") \nconsole.log(uname) \nconsole.log(\"Length \"+uname.length) // returns the total number of characters \n ... |
Number of Unique Paths | Practice | GeeksforGeeks | Given a A X B matrix with your initial position at the top-left cell, find the number of possible unique paths to reach the bottom-right cell of the matrix from the initial position.
Note: Possible moves can be either down or right at any point in time, i.e., we can move to matrix[i+1][j] or matrix[i][j+1] from matrix[... | [
{
"code": null,
"e": 421,
"s": 238,
"text": "Given a A X B matrix with your initial position at the top-left cell, find the number of possible unique paths to reach the bottom-right cell of the matrix from the initial position."
},
{
"code": null,
"e": 565,
"s": 421,
"text": "Not... |
SWING - FocusListener Interface | The interface FocusListener is used for receiving keyboard focus events. The class that processes focus events needs to implements this interface.
Following is the declaration for java.awt.event.FocusListener interface −
public interface FocusListener
extends EventListener
void focusGained(FocusEvent e)
Invoked when ... | [
{
"code": null,
"e": 1911,
"s": 1763,
"text": "The interface FocusListener is used for receiving keyboard focus events. The class that processes focus events needs to implements this interface."
},
{
"code": null,
"e": 1985,
"s": 1911,
"text": "Following is the declaration for j... |
How to create Horizontal ListView in Android using Kotlin? | This example demonstrates how to create Horizontal ListView in Android using Kotlin.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<L... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "This example demonstrates how to create Horizontal ListView in Android using Kotlin."
},
{
"code": null,
"e": 1276,
"s": 1147,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required d... |
Introduction to SQL with real life examples: analyze your grocery shopping habits | by Carolina Bento | Towards Data Science | SQL is a fundamental part of a Data Scientist’s toolbox. It’s a great tool to explore and prepare your data, either for analysis or to create a machine learning model.
An effective approach to learn SQL is to focus on the questions you want to answer, rather than on specific methods or functions. Once you know what you... | [
{
"code": null,
"e": 340,
"s": 172,
"text": "SQL is a fundamental part of a Data Scientist’s toolbox. It’s a great tool to explore and prepare your data, either for analysis or to create a machine learning model."
},
{
"code": null,
"e": 624,
"s": 340,
"text": "An effective appro... |
Building Neural Network Using PyTorch | by Tasnuva Zaman | Towards Data Science | “The question of whether a computer can think is no more interesting than the question of whether a submarine can swim.” ― Edsger W. Dijkstra
In this tutorial we will implement a simple neural network from scratch using PyTorch. I am sharing what I have learnt from my recent facebook-udacity scholarship challenge progr... | [
{
"code": null,
"e": 314,
"s": 172,
"text": "“The question of whether a computer can think is no more interesting than the question of whether a submarine can swim.” ― Edsger W. Dijkstra"
},
{
"code": null,
"e": 574,
"s": 314,
"text": "In this tutorial we will implement a simple ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.