title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Memset in C++ - GeeksforGeeks | 08 Dec, 2021
Memset() is a C++ function. It copies a single character for a specified number of times to an object. It is defined in <cstring> header file.
Syntax:
void* memset( void* str, int ch, size_t n);
Memset() converts the value ch to unsigned char and copies it into each of the first n characters of the object ... | [
{
"code": null,
"e": 24244,
"s": 24216,
"text": "\n08 Dec, 2021"
},
{
"code": null,
"e": 24387,
"s": 24244,
"text": "Memset() is a C++ function. It copies a single character for a specified number of times to an object. It is defined in <cstring> header file."
},
{
"code"... |
Analysis of time and space complexity of C++ STL containers - GeeksforGeeks | 04 Apr, 2022
In this article, we will discuss the time and space complexity of some C++ STL classes.
Characteristics of C++ STL:
C++ has a low execution time as compared to other programming languages.
This makes STL in C++ advantageous and powerful.
The thing that makes STL powerful is that it contains a vast variety ... | [
{
"code": null,
"e": 24622,
"s": 24594,
"text": "\n04 Apr, 2022"
},
{
"code": null,
"e": 24710,
"s": 24622,
"text": "In this article, we will discuss the time and space complexity of some C++ STL classes."
},
{
"code": null,
"e": 24738,
"s": 24710,
"text": "Ch... |
Mapping Java Beans to CSV Using OpenCSV | 09 Dec, 2021
The need to convert Java Beans(Objects) to CSV file arises very commonly and there are many ways to write Bean into CSV file but one of the best ways to map java bean to CSV is by using OpenCSV Library. In OpenCSV there is a class name StatefulBeanToCsvBuilder which helps to convert Java Beans to CSV.
The ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Dec, 2021"
},
{
"code": null,
"e": 355,
"s": 52,
"text": "The need to convert Java Beans(Objects) to CSV file arises very commonly and there are many ways to write Bean into CSV file but one of the best ways to map java bean to CSV ... |
Check missing dates in Pandas | 09 Nov, 2021
In this article, we will learn how to check missing dates in Pandas.
A data frame is created from a dictionary of lists using pd.DataFrame() which accepts the data as its parameter. Note that here, the dictionary consists of two lists named Date and Name. Both of them are of the same length and some dates ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Nov, 2021"
},
{
"code": null,
"e": 97,
"s": 28,
"text": "In this article, we will learn how to check missing dates in Pandas."
},
{
"code": null,
"e": 504,
"s": 97,
"text": "A data frame is created from a dictiona... |
Range-based for loop in C++ | The range based for loop is added in C++ 11 standard and is a more compact form of its traditional equivalent. The range based for loop is used to iterate over elements of a container from beginning to end. The syntax for range-based for loop is as follows −
for( range-declaration : range-expression ) loop statement
ra... | [
{
"code": null,
"e": 1446,
"s": 1187,
"text": "The range based for loop is added in C++ 11 standard and is a more compact form of its traditional equivalent. The range based for loop is used to iterate over elements of a container from beginning to end. The syntax for range-based for loop is as foll... |
Python Turtle – Graphics Keyboard Commands | 16 Dec, 2021
Python Turtle module is a graphical tool that can be used to draw simple graphics on the screen using a cursor. Python Turtle was a part of Logo programming language which had similar purpose of letting the users draw graphics on the screen with the help of simple commands. Turtle is a pre-installed module... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 595,
"s": 28,
"text": "Python Turtle module is a graphical tool that can be used to draw simple graphics on the screen using a cursor. Python Turtle was a part of Logo programming language which had... |
How to create horizontal scrollable sections using CSS ? | 27 Oct, 2021
In this article, we will see how we can create a horizontal scrollable section using CSS. HTML code is used to create the basic structure of the sections and CSS code is used to set the style,
HTML Code: In this section, we will create a structure of our sections.
Steps:
Create a div element with class co... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Oct, 2021"
},
{
"code": null,
"e": 221,
"s": 28,
"text": "In this article, we will see how we can create a horizontal scrollable section using CSS. HTML code is used to create the basic structure of the sections and CSS code is used ... |
Computer Graphics | Antialiasing | 03 Jul, 2022
Antialiasing is a technique used in computer graphics to remove the aliasing effect. The aliasing effect is the appearance of jagged edges or “jaggies” in a rasterized image (an image rendered using pixels). The problem of jagged edges technically occurs due to distortion of the image when scan conversion ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n03 Jul, 2022"
},
{
"code": null,
"e": 553,
"s": 53,
"text": "Antialiasing is a technique used in computer graphics to remove the aliasing effect. The aliasing effect is the appearance of jagged edges or “jaggies” in a rasterized image ... |
Python Program For Finding The Length Of Longest Palindrome List In A Linked List Using O(1) Extra Space | 18 Apr, 2022
Given a linked list, find the length of the longest palindrome list that exists in that linked list. Examples:
Input : List = 2->3->7->3->2->12->24
Output : 5
The longest palindrome list is 2->3->7->3->2
Input : List = 12->4->4->3->14
Output : 2
The longest palindrome list is 4->4
A simple solution ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Apr, 2022"
},
{
"code": null,
"e": 141,
"s": 28,
"text": "Given a linked list, find the length of the longest palindrome list that exists in that linked list. Examples: "
},
{
"code": null,
"e": 315,
"s": 141,
"t... |
Why FIRST and FOLLOW in Compiler Design? | 16 Nov, 2021
Why FIRST?We saw the need of backtrack in the previous article of on Introduction to Syntax Analysis, which is really a complex process to implement. There can be easier way to sort out this problem:
If the compiler would have come to know in advance, that what is the “first character of the string produce... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Nov, 2021"
},
{
"code": null,
"e": 252,
"s": 52,
"text": "Why FIRST?We saw the need of backtrack in the previous article of on Introduction to Syntax Analysis, which is really a complex process to implement. There can be easier way ... |
Zend Framework - Service Manager | The Zend Framework includes a powerful service locator pattern implementation called zend-servicemanager. Zend framework extensively uses the service manager for all its functionalities. The Service Manager provides a high-level abstraction for the Zend Framework. It also integrates nicely with all the other components... | [
{
"code": null,
"e": 2656,
"s": 2312,
"text": "The Zend Framework includes a powerful service locator pattern implementation called zend-servicemanager. Zend framework extensively uses the service manager for all its functionalities. The Service Manager provides a high-level abstraction for the Zend... |
ML from Scratch: Linear Regression Model with NumPy | by Aman Sharma | Towards Data Science | In this project, we will see how to create a machine learning model that uses the Multiple Linear Regression algorithm.
The main focus of this project is to explain how linear regression works, and how you can code a linear regression model from scratch using the awesome NumPy module.
Of course, you can create a linear... | [
{
"code": null,
"e": 292,
"s": 172,
"text": "In this project, we will see how to create a machine learning model that uses the Multiple Linear Regression algorithm."
},
{
"code": null,
"e": 458,
"s": 292,
"text": "The main focus of this project is to explain how linear regression... |
Minimum steps needed to cover a sequence of points on an infinite grid - GeeksforGeeks | 02 Mar, 2022
Given an infinite grid, initial cell position (x, y) and a sequence of other cell position which needs to be covered in the given order. The task is to find the minimum number of steps needed to travel to all those cells.Note: Movement can be done in any of the eight possible directions from a given cell i... | [
{
"code": null,
"e": 25112,
"s": 25084,
"text": "\n02 Mar, 2022"
},
{
"code": null,
"e": 25592,
"s": 25112,
"text": "Given an infinite grid, initial cell position (x, y) and a sequence of other cell position which needs to be covered in the given order. The task is to find the mi... |
time.Time.Unix() Function in Golang with Examples - GeeksforGeeks | 21 Apr, 2020
In Go language, time packages supplies functionality for determining as well as viewing time. The Time.Unix() function in Go language is used to yield “t” as a Unix time that is the number of seconds passed from January 1, 1970, in UTC and the output here doesn’t rely upon the location connected with t. Mo... | [
{
"code": null,
"e": 24161,
"s": 24133,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 24602,
"s": 24161,
"text": "In Go language, time packages supplies functionality for determining as well as viewing time. The Time.Unix() function in Go language is used to yield “t” as a Uni... |
GATE | GATE-CS-2015 (Set 1) | Question 65 - GeeksforGeeks | 17 Sep, 2021
A variable x is said to be live at a statement Si in a program if the following three conditions hold simultaneously:
1. There exists a statement Sj that uses x
2. There is a path from Si to Sj in the flow
graph corresponding to the program
3. The path has no intervening assignment to x
including at... | [
{
"code": null,
"e": 24492,
"s": 24464,
"text": "\n17 Sep, 2021"
},
{
"code": null,
"e": 24610,
"s": 24492,
"text": "A variable x is said to be live at a statement Si in a program if the following three conditions hold simultaneously:"
},
{
"code": null,
"e": 24810,
... |
Generate 3D meshes from point clouds with Python | Towards Data Science | In this article, I will give you my 3D surface reconstruction process for quickly creating a mesh from point clouds with python. You will be able to export, visualize and integrate results into your favorite 3D software, without any coding experience. Additionally, I will provide you with a simple way to generate multi... | [
{
"code": null,
"e": 608,
"s": 172,
"text": "In this article, I will give you my 3D surface reconstruction process for quickly creating a mesh from point clouds with python. You will be able to export, visualize and integrate results into your favorite 3D software, without any coding experience. Add... |
Difference between ‘function declaration’ and ‘function expression' in JavaScript - GeeksforGeeks | 21 Sep, 2021
Functions in JavaScript allow us to carry out some set of actions, important decisions, or calculations and even makes our website more interactive. Most of us coding enthusiasts know what a function is. But do we know what’s the difference between function declarations and function expressions? This artic... | [
{
"code": null,
"e": 24840,
"s": 24812,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 25404,
"s": 24840,
"text": "Functions in JavaScript allow us to carry out some set of actions, important decisions, or calculations and even makes our website more interactive. Most of us cod... |
Watir - Cookies | In this chapter, we will learn how to work with cookies using Watir.
A simple example that will fetch the cookies for a URL given is discussed here.
browser.cookies.to_a
require 'watir'
b = Watir::Browser.new :chrome
b.goto 'https://www.tutorialspoint.com'
puts b.cookies.to_a
{:name=>"_gat_gtag_UA_232293_6", :value=>... | [
{
"code": null,
"e": 2089,
"s": 2020,
"text": "In this chapter, we will learn how to work with cookies using Watir."
},
{
"code": null,
"e": 2169,
"s": 2089,
"text": "A simple example that will fetch the cookies for a URL given is discussed here."
},
{
"code": null,
"... |
Using Mixed-Effects Models For Linear Regression | by Guido Vivaldi | Towards Data Science | Mixed-effects regression models are a powerful tool for linear regression models when your data contains global and group-level trends. This article walks through an example using fictitious data relating exercise to mood to introduce this concept. R has had an undeserved rough time in the news lately, so this post wil... | [
{
"code": null,
"e": 590,
"s": 172,
"text": "Mixed-effects regression models are a powerful tool for linear regression models when your data contains global and group-level trends. This article walks through an example using fictitious data relating exercise to mood to introduce this concept. R has ... |
Object detection via color-based image segmentation using python | by Salma Ghoneim | Towards Data Science | If you already have jupyter notebook or an IDE with which you can run python & OpenCV installed, just skip to Execution.
Our hero today is Anaconda. a free open-source distribution that helps with installing different packages & sorts out their messes into isolated environments.
What Wikipedia’s telling us about Anacon... | [
{
"code": null,
"e": 293,
"s": 172,
"text": "If you already have jupyter notebook or an IDE with which you can run python & OpenCV installed, just skip to Execution."
},
{
"code": null,
"e": 452,
"s": 293,
"text": "Our hero today is Anaconda. a free open-source distribution that ... |
HTML DOM Button type Property | The HTML DOM Button type property is associated with the HTML <button> element. The button element by default has type=”submit” i.e clicking on any button on the form will submit the form. The button type property sets or returns the type of button.
Following is the syntax for −
Setting the button type property −
butto... | [
{
"code": null,
"e": 1312,
"s": 1062,
"text": "The HTML DOM Button type property is associated with the HTML <button> element. The button element by default has type=”submit” i.e clicking on any button on the form will submit the form. The button type property sets or returns the type of button."
... |
Spring MVC - Generate RSS Feed Example | The following example shows how to generate RSS Feed using the Spring Web MVC Framework. To start with, let us have a working Eclipse IDE in place and then consider the following steps to develop a Dynamic Form based Web Application using the Spring Web Framework.
package com.tutorialspoint;
import java.util.Date;
pu... | [
{
"code": null,
"e": 3056,
"s": 2791,
"text": "The following example shows how to generate RSS Feed using the Spring Web MVC Framework. To start with, let us have a working Eclipse IDE in place and then consider the following steps to develop a Dynamic Form based Web Application using the Spring Web... |
Armstrong number within a range in JavaScript | Armstrong Numbers: A positive integer is called an Armstrong number (of order n) if −
abcd... = a^n + b^n + c^n + d^n + ...
We are required to write a JavaScript function that takes in an array of exactly two numbers
specifying a range.
The function should return an array of all the Armstrong numbers that falls in that... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "Armstrong Numbers: A positive integer is called an Armstrong number (of order n) if −"
},
{
"code": null,
"e": 1186,
"s": 1148,
"text": "abcd... = a^n + b^n + c^n + d^n + ..."
},
{
"code": null,
"e": 1299,
"s": 1186,
... |
Python Tutorial: A Name Lookup Table for Fuzzy Name Data Sets | by Felix Kuestahler | Towards Data Science | This is the sixth article of our journey into the Python data exploration world. Click on the link above the Title to get a list of all articles.
Let’s recap what we have achieved in our last lesson. We established a person’s name “fuzzy” name matching algorithm by using a normalization step as well as the power of the... | [
{
"code": null,
"e": 318,
"s": 172,
"text": "This is the sixth article of our journey into the Python data exploration world. Click on the link above the Title to get a list of all articles."
},
{
"code": null,
"e": 521,
"s": 318,
"text": "Let’s recap what we have achieved in our... |
How to get all the services based on their status in PowerShell? | Below commands will filter out services based on their Status (Running, Stopped).
To get all the running services on the local computer.
Get-Service | where{$_.Status -eq "Running"}
Running TimeBrokerSvc Time Broker
Running TokenBroker Web Account Manager
Running TrkWks Distributed Link Track... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "Below commands will filter out services based on their Status (Running, Stopped)."
},
{
"code": null,
"e": 1199,
"s": 1144,
"text": "To get all the running services on the local computer."
},
{
"code": null,
"e": 1244,
... |
Java 8 - Overview | JAVA 8 is a major feature release of JAVA programming language development. Its initial version was released on 18 March 2014. With the Java 8 release, Java provided supports for functional programming, new JavaScript engine, new APIs for date time manipulation, new streaming API, etc.
Lambda expression − Adds function... | [
{
"code": null,
"e": 2161,
"s": 1874,
"text": "JAVA 8 is a major feature release of JAVA programming language development. Its initial version was released on 18 March 2014. With the Java 8 release, Java provided supports for functional programming, new JavaScript engine, new APIs for date time mani... |
Tryit Editor v3.7 | HTML Input types
Tryit: HTML input element | [
{
"code": null,
"e": 27,
"s": 10,
"text": "HTML Input types"
}
] |
Demystifying Quantum Gates — One Qubit At A Time | by Jason Roell | Towards Data Science | (I’ve written an introduction to quantum computing found here. If you are brand new to the field, it will be a better place to start.)
If you want to get into quantum computing, there’s no way around it: you will have to master the cloudy concept of the quantum gate. Like everything in quantum computing, not to mention... | [
{
"code": null,
"e": 307,
"s": 172,
"text": "(I’ve written an introduction to quantum computing found here. If you are brand new to the field, it will be a better place to start.)"
},
{
"code": null,
"e": 981,
"s": 307,
"text": "If you want to get into quantum computing, there’s ... |
Exploratory Data Analysis (EDA) techniques for Kaggle competition beginners | by Nikita sharma | Towards Data Science | Exploratory Data Analysis (EDA) is an approach to analysing data sets to summarize their main characteristics, often with visual methods. Following are the different steps involved in EDA :
Data CollectionData CleaningData PreprocessingData Visualisation
Data Collection
Data Cleaning
Data Preprocessing
Data Visualisati... | [
{
"code": null,
"e": 362,
"s": 172,
"text": "Exploratory Data Analysis (EDA) is an approach to analysing data sets to summarize their main characteristics, often with visual methods. Following are the different steps involved in EDA :"
},
{
"code": null,
"e": 427,
"s": 362,
"text... |
PyBrain - Training Datasets on Networks | So far, we have seen how to create a network and a dataset. To work with datasets and networks together, we have to do it with the help of trainers.
Below is a working example to see how to add a dataset to the network created, and later trained and tested using trainers.
from pybrain.tools.shortcuts import buildNetwor... | [
{
"code": null,
"e": 2257,
"s": 2108,
"text": "So far, we have seen how to create a network and a dataset. To work with datasets and networks together, we have to do it with the help of trainers."
},
{
"code": null,
"e": 2381,
"s": 2257,
"text": "Below is a working example to see... |
What are the rules for calling the superclass constructor C++? | In C++, we can derive some classes. Sometimes we need to call the super class (Base class) constructor when calling the constructor of the derived class. Unlike Java there is no reference variable for super class. If the constructor is non-parameterized, then it will be called automatically with the derived class, othe... | [
{
"code": null,
"e": 1477,
"s": 1062,
"text": "In C++, we can derive some classes. Sometimes we need to call the super class (Base class) constructor when calling the constructor of the derived class. Unlike Java there is no reference variable for super class. If the constructor is non-parameterized... |
list::begin() and list::end() in C++ STL - GeeksforGeeks | 07 Dec, 2021
Lists are containers used in C++ to store data in a non contiguous fashion, Normally, Arrays and Vectors are contiguous in nature, therefore the insertion and deletion operations are costlier as compared to the insertion and deletion option in Lists.
begin() function is used to return an iterator pointing ... | [
{
"code": null,
"e": 24102,
"s": 24074,
"text": "\n07 Dec, 2021"
},
{
"code": null,
"e": 24353,
"s": 24102,
"text": "Lists are containers used in C++ to store data in a non contiguous fashion, Normally, Arrays and Vectors are contiguous in nature, therefore the insertion and dele... |
Map numbers to characters in JavaScript | Suppose we have the number 12145. We are required to write a function that maps the digits of
the number to English alphabets according to the following norms. The alphabets are to be mapped according to the 1 based index, like 'a' for 1 and 'b' for 2 'c' for 3 and so on.
There can be several ways for mapping a number.... | [
{
"code": null,
"e": 1335,
"s": 1062,
"text": "Suppose we have the number 12145. We are required to write a function that maps the digits of\nthe number to English alphabets according to the following norms. The alphabets are to be mapped according to the 1 based index, like 'a' for 1 and 'b' for 2 ... |
Implementation of Contiguous Memory Management Techniques - GeeksforGeeks | 13 Apr, 2020
Memory Management Techniques are basic techniques that are used in managing the memory in operating system. Memory Management Techniques are basically classified into two categories:
(i) Contiguous
(ii) Non-contiguous
Contiguous Memory Management Techniques:In this technique, memory is allotted in a conti... | [
{
"code": null,
"e": 23904,
"s": 23876,
"text": "\n13 Apr, 2020"
},
{
"code": null,
"e": 24087,
"s": 23904,
"text": "Memory Management Techniques are basic techniques that are used in managing the memory in operating system. Memory Management Techniques are basically classified i... |
Python – Adjacent elements in List | When it is required to display adjacent elements in list, a method is defined that uses enumerate and a simple iteration to determine the result.
Below is a demonstration of the same −
def find_adjacent_elements(my_list):
my_result = []
for index, ele in enumerate(my_list):
if index == 0:
my_result... | [
{
"code": null,
"e": 1208,
"s": 1062,
"text": "When it is required to display adjacent elements in list, a method is defined that uses enumerate and a simple iteration to determine the result."
},
{
"code": null,
"e": 1247,
"s": 1208,
"text": "Below is a demonstration of the same... |
Find the percentage of a student on basis of marks and add percent sign (%) to the result in SQL | Let us first create a table −
mysql> create table DemoTable
(
Marks int
);
Query OK, 0 rows affected (0.62 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values(88);
Query OK, 1 row affected (0.17 sec)
mysql> insert into DemoTable values(65);
Query OK, 1 row affected (0.15 ... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1177,
"s": 1092,
"text": "mysql> create table DemoTable\n(\n Marks int\n);\nQuery OK, 0 rows affected (0.62 sec)"
},
{
"code": null,
"e": 1233,
"s": 1177,
"... |
How to count unique values in a Pandas Groupby object? - GeeksforGeeks | 15 Mar, 2021
Prerequisites: Pandas
Groupby as the name suggests groups attributes on the basis of similarity in some value. We can count the unique values in pandas Groupby object using groupby(), agg(), and reset_index() method. This article depicts how the count of unique values of some attribute in a data frame can ... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n15 Mar, 2021"
},
{
"code": null,
"e": 24314,
"s": 24292,
"text": "Prerequisites: Pandas"
},
{
"code": null,
"e": 24627,
"s": 24314,
"text": "Groupby as the name suggests groups attributes on the basis of simil... |
Python 3 - Tkinter Toplevel | Toplevel widgets work as windows that are directly managed by the window manager. They do not necessarily have a parent widget on top of them.
Your application can use any number of top-level windows.
Here is the simple syntax to create this widget −
w = Toplevel ( option, ... )
options − Here is the list of most comm... | [
{
"code": null,
"e": 2483,
"s": 2340,
"text": "Toplevel widgets work as windows that are directly managed by the window manager. They do not necessarily have a parent widget on top of them."
},
{
"code": null,
"e": 2541,
"s": 2483,
"text": "Your application can use any number of ... |
Find maximum and minimum element in binary tree without using recursion or stack or queue - GeeksforGeeks | 04 Aug, 2021
Given a binary tree. The task is to find out the maximum and minimum element in a binary tree without using recursion or stack or queue i.e, space complexity should be O(1).
Examples:
Input :
12
/ \
13 10
... | [
{
"code": null,
"e": 24700,
"s": 24672,
"text": "\n04 Aug, 2021"
},
{
"code": null,
"e": 24875,
"s": 24700,
"text": "Given a binary tree. The task is to find out the maximum and minimum element in a binary tree without using recursion or stack or queue i.e, space complexity shoul... |
How to fix the incorrect datetime value while inserting in a MySQL table? | To avoid the incorrect datetime value error, you can use the STR_TO_DATE() method.
As we know the datetime format is YYYY-MM-DD and if you won’t insert in the same format, the error would get generated.
Let us see what actually lead to this error. For this, let us create a new table. The query to create a table is as f... | [
{
"code": null,
"e": 1270,
"s": 1187,
"text": "To avoid the incorrect datetime value error, you can use the STR_TO_DATE() method."
},
{
"code": null,
"e": 1390,
"s": 1270,
"text": "As we know the datetime format is YYYY-MM-DD and if you won’t insert in the same format, the error ... |
Flutter – Customizable Ratings bar | 15 Feb, 2021
Rating Bar as the name suggests is used to rate content inside the application. More or less all applications use them either to gate user feedback on their application or to get a rating for content hosted by the application. Applications like IMDB use them to rate movies and Television series where apps ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Feb, 2021"
},
{
"code": null,
"e": 411,
"s": 28,
"text": "Rating Bar as the name suggests is used to rate content inside the application. More or less all applications use them either to gate user feedback on their application or to ... |
Difference between 1NF and 2NF in DBMS | 21 Aug, 2021
1. First Normal Form (1NF) : For any relation to be in the first normal form (1NF), the relation should not contain any composite or multi-valued attribute. So a relation will be in first normal form if it contains atomic values. The relation should contain only single valued attributes. Thus a relation th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Aug, 2021"
},
{
"code": null,
"e": 400,
"s": 28,
"text": "1. First Normal Form (1NF) : For any relation to be in the first normal form (1NF), the relation should not contain any composite or multi-valued attribute. So a relation will... |
related_name – Django Built-in Field Validation | 01 Nov, 2020
The related_name attribute specifies the name of the reverse relation from the User model back to your model. If you don’t specify a related_name, Django automatically creates one using the name of your model with the suffix _set.
Syntax:
field_name = models.Field(related_name="name")
Explanation:
Illustr... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Nov, 2020"
},
{
"code": null,
"e": 259,
"s": 28,
"text": "The related_name attribute specifies the name of the reverse relation from the User model back to your model. If you don’t specify a related_name, Django automatically creates... |
Ruby | Array concat() operation | 08 Jan, 2020
Array#concat() : concat() is a Array class method which returns the array after appending the two arrays together.
Syntax: Array.concat()
Parameter: Arrays to be combined
Return: Append the two arrays
Code #1 : Example for concat() method
# Ruby code for concat() method# adding elements at the end #... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jan, 2020"
},
{
"code": null,
"e": 143,
"s": 28,
"text": "Array#concat() : concat() is a Array class method which returns the array after appending the two arrays together."
},
{
"code": null,
"e": 235,
"s": 143,
... |
Swift – Difference Between Function and Method | 06 Dec, 2021
Some folks use function and method interchangeably and they think function and method are the same in swift. But, function and method both are different things and both have their advantages. In the code, Both function and method can be used again but methods are one of these: classes, structs, and enums p... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n06 Dec, 2021"
},
{
"code": null,
"e": 806,
"s": 53,
"text": "Some folks use function and method interchangeably and they think function and method are the same in swift. But, function and method both are different things and both have ... |
Delete the array elements in JavaScript | delete vs splice | 18 May, 2019
For deletion of elements in an array, two approaches can be used. They have their own merits regarding the way they perform the deletion.
Using delete array[index]:
This method deletes the element at the index specified, but does not modify the array. This means that at the place of the deleted index, the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 May, 2019"
},
{
"code": null,
"e": 166,
"s": 28,
"text": "For deletion of elements in an array, two approaches can be used. They have their own merits regarding the way they perform the deletion."
},
{
"code": null,
"e": ... |
Pandas Dataframe.to_numpy() – Convert dataframe to Numpy array | 27 Feb, 2020
Pandas DataFrame is two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). This data structure can be converted to NumPy ndarray with the help of Dataframe.to_numpy() method.
Syntax: Dataframe.to_numpy(dtype = None, copy = False)
Parameters:dtyp... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Feb, 2020"
},
{
"code": null,
"e": 265,
"s": 28,
"text": "Pandas DataFrame is two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). This data structure can be converted t... |
How to develop a Progressive Web App using ReactJS ? | 22 Sep, 2021
Progressive React Applications respond very fast to user actions. They load fast and are engaging just like a mobile app. They can access Mobile device features, leverage the Operating System and have a very high reach. It enables Installability, Backgroung Syncing, Caching and Offline Support and other fe... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Sep, 2021"
},
{
"code": null,
"e": 505,
"s": 54,
"text": "Progressive React Applications respond very fast to user actions. They load fast and are engaging just like a mobile app. They can access Mobile device features, leverage the... |
Android - Internal Storage | Android provides many kinds of storage for applications to store their data. These storage places are shared preferences, internal and external storage, SQLite storage, and storage via network connection.
In this chapter we are going to look at the internal storage. Internal storage is the storage of the private data o... | [
{
"code": null,
"e": 3946,
"s": 3741,
"text": "Android provides many kinds of storage for applications to store their data. These storage places are shared preferences, internal and external storage, SQLite storage, and storage via network connection."
},
{
"code": null,
"e": 4082,
"... |
How to create buttons in Jupyter? | 24 Feb, 2021
In this article, we will learn How to create an interactive button in Jupyter using Python Program. An Interactive Button is a button which when clicked by a user performs a specific function. For the following task, we need the ipywidgets library module. ipywidgets, also known as jupyter-widgets or simply... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Feb, 2021"
},
{
"code": null,
"e": 420,
"s": 28,
"text": "In this article, we will learn How to create an interactive button in Jupyter using Python Program. An Interactive Button is a button which when clicked by a user performs a s... |
Python | Grouping list values into dictionary | 26 Aug, 2019
Sometimes, while working with data, we can be encountered with a situation in which we have list of list and we need to group it’s 2nd index with the common initial element in lists. Let’s discuss way in which this problem can be solved.
Method : Using defaultdict() + loop + dict()
The defaultdict can be u... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Aug, 2019"
},
{
"code": null,
"e": 266,
"s": 28,
"text": "Sometimes, while working with data, we can be encountered with a situation in which we have list of list and we need to group it’s 2nd index with the common initial element in... |
ascii_letters in Python | 23 Oct, 2020
In Python3, ascii_letters is a pre-initialized string used as string constant.ascii_letters is basically concatenation of ascii_lowercase and ascii_uppercase string constants. Also, the value generated is not locale-dependent, hence, doesn’t change.
Syntax :
string.ascii_letters
Note : Make sure to import ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Oct, 2020"
},
{
"code": null,
"e": 304,
"s": 54,
"text": "In Python3, ascii_letters is a pre-initialized string used as string constant.ascii_letters is basically concatenation of ascii_lowercase and ascii_uppercase string constants... |
Simple Text editor using File System Access API | 20 Dec, 2020
In this article, we will create a simple text editor like application that we can use to open, edit, and save text files with the help of File System Access API.
File System Access API enables us to interact with files on our local devices like photo and video editors. When the user gives permission, this... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n20 Dec, 2020"
},
{
"code": null,
"e": 217,
"s": 54,
"text": "In this article, we will create a simple text editor like application that we can use to open, edit, and save text files with the help of File System Access API. "
},
{
... |
React Native Flexbox alignItems Property | 25 May, 2021
In this article, We are going to see the Flexbox alignItems Property in React Native. Flexbox has three main properties. One of them is alignItems. alignItems property is used to determine how should children’s components be aligned along the secondary axis of their container. The secondary axis is always ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n25 May, 2021"
},
{
"code": null,
"e": 448,
"s": 28,
"text": "In this article, We are going to see the Flexbox alignItems Property in React Native. Flexbox has three main properties. One of them is alignItems. alignItems property is used... |
Sort a Linked List of 0s and 1s | 03 Feb, 2022
Given the head of a Linked List of size N, consisting of binary integers 0s and 1s, the task is to sort the given linked list.
Examples:
Input: head = 1 -> 0 -> 1 -> 0 -> 1 -> 0 -> NULL Output: 0 -> 0 -> 0 -> 1 -> 1 -> 1 -> NULL
Input: head = 1 -> 1 -> 0 -> NULL Output: 0 -> 1 -> 1 -> NULL
Naive Approach: ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n03 Feb, 2022"
},
{
"code": null,
"e": 180,
"s": 53,
"text": "Given the head of a Linked List of size N, consisting of binary integers 0s and 1s, the task is to sort the given linked list."
},
{
"code": null,
"e": 190,
"... |
std::next in C++ | 02 Aug, 2017
std::next returns an iterator pointing to the element after being advanced by certain no. of positions. It is defined inside the header file .
It does not modify its arguments and returns a copy of the argument advanced by the specified amount. If it is a random-access iterator, the function uses just once... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Aug, 2017"
},
{
"code": null,
"e": 195,
"s": 52,
"text": "std::next returns an iterator pointing to the element after being advanced by certain no. of positions. It is defined inside the header file ."
},
{
"code": null,
... |
Ruby | Operators | 10 Feb, 2022
An operator is a symbol that represents an operation to be performed with one or more operand. Operators are the foundation of any programming language. Operators allow us to perform different kinds of operations on operands. There are different types of operators used in Ruby as follows:
Arithmetic Oper... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n10 Feb, 2022"
},
{
"code": null,
"e": 345,
"s": 53,
"text": "An operator is a symbol that represents an operation to be performed with one or more operand. Operators are the foundation of any programming language. Operators allow us to... |
Replace Character Value with NA in R | 29 Sep, 2021
In this article, we are going to see how to replace character value with NA in R Programming Language.
We can replace a character value with NA in a vector and in a dataframe.
In a vector, we can replace it by using the indexing operation.
Syntax:
vector[vector == “character”] <- NA
R
# create a vector wi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Sep, 2021"
},
{
"code": null,
"e": 131,
"s": 28,
"text": "In this article, we are going to see how to replace character value with NA in R Programming Language."
},
{
"code": null,
"e": 204,
"s": 131,
"text": "We ... |
MongoDB query with case insensitive search? | For case, insensitive search, use regex in find() method. Following is the syntax −
db.demo572.find({"yourFieldName" : { '$regex':/^yourValue$/i}});
To understand the above syntax, let us create a collection with documents −
> db.demo572.insertOne({"CountryName":"US"});{
"acknowledged" : true, "insertedId" : ObjectI... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "For case, insensitive search, use regex in find() method. Following is the syntax −"
},
{
"code": null,
"e": 1211,
"s": 1146,
"text": "db.demo572.find({\"yourFieldName\" : { '$regex':/^yourValue$/i}});"
},
{
"code": null,
... |
Group all documents with common fields in MongoDB? | For this, use the $addToSet operator. Let us first create a collection with documents −
> db.findDocumentWithCommonFieldsDemo.insertOne(
{
"UserId":1,
"UserName":"Carol"
}
);
{
"acknowledged" : true,
"insertedId" : ObjectId("5cdf8ebebf3115999ed51200")
}
> db.findDocumentWithCommonFieldsDemo.inse... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "For this, use the $addToSet operator. Let us first create a collection with documents −"
},
{
"code": null,
"e": 1720,
"s": 1150,
"text": "> db.findDocumentWithCommonFieldsDemo.insertOne(\n {\n \"UserId\":1,\n \"UserName\... |
How to get the top 3 salaries from a MySQL table with record of Employee Salaries? | For this, use LIMIT and OFFSET. Let us first create a table −
mysql> create table DemoTable867(EmployeeSalary int);
Query OK, 0 rows affected (0.64 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable867 values(63737);
Query OK, 1 row affected (0.12 sec)
mysql> insert into DemoTable... | [
{
"code": null,
"e": 1124,
"s": 1062,
"text": "For this, use LIMIT and OFFSET. Let us first create a table −"
},
{
"code": null,
"e": 1215,
"s": 1124,
"text": "mysql> create table DemoTable867(EmployeeSalary int);\nQuery OK, 0 rows affected (0.64 sec)"
},
{
"code": null,
... |
Integrating Python with MySQL. A data analyst or data scientist get... | by Sanjana Ramankandath | Towards Data Science | A data analyst or data scientist get lots of opportunity to work on Python and SQL. Python with its enormous library support provides data analyst with a magic wand to manipulate and visualize data. Likewise SQL helps us store millions of records and establish relationships with other tables for optimal data management... | [
{
"code": null,
"e": 849,
"s": 172,
"text": "A data analyst or data scientist get lots of opportunity to work on Python and SQL. Python with its enormous library support provides data analyst with a magic wand to manipulate and visualize data. Likewise SQL helps us store millions of records and esta... |
JavaScript - Array pop() Method | Javascript array pop() method removes the last element from an array and returns that element.
Its syntax is as follows −
array.pop();
Returns the removed element from the array.
Try the following example.
<html>
<head>
<title>JavaScript Array pop Method</title>
</head>
<body>
<script type... | [
{
"code": null,
"e": 2562,
"s": 2466,
"text": "Javascript array pop() method removes the last element from an array and returns that element."
},
{
"code": null,
"e": 2589,
"s": 2562,
"text": "Its syntax is as follows −"
},
{
"code": null,
"e": 2603,
"s": 2589,
... |
C# | Convert.ToDecimal(String, IFormatProvider) Method - GeeksforGeeks | 29 Aug, 2021
This method is used to convert the specified string representation of a number to an equivalent decimal number, using the specified culture-specific formatting information.
Syntax:
public static decimal ToDecimal (string value, IFormatProvider provider);
Parameters:
value: It is a string that contains a... | [
{
"code": null,
"e": 24692,
"s": 24664,
"text": "\n29 Aug, 2021"
},
{
"code": null,
"e": 24866,
"s": 24692,
"text": "This method is used to convert the specified string representation of a number to an equivalent decimal number, using the specified culture-specific formatting inf... |
Count of binary strings of length N with even set bit count and at most K consecutive 1s - GeeksforGeeks | 11 Jun, 2021
Given two integers N and K, the task is to find the number of binary strings of length N having an even number of 1’s out of which less than K are consecutive.Examples:
Input: N = 4, K = 2 Output: 4 Explanation: The possible binary strings are 0000, 0101, 1001, 1010. They all have even number of 1’s with... | [
{
"code": null,
"e": 25014,
"s": 24986,
"text": "\n11 Jun, 2021"
},
{
"code": null,
"e": 25185,
"s": 25014,
"text": "Given two integers N and K, the task is to find the number of binary strings of length N having an even number of 1’s out of which less than K are consecutive.Exam... |
Passing NULL to printf in C - GeeksforGeeks | 02 Jun, 2017
Consider the following C code snippet.
char* p = NULL;
printf("%s", p);
What should be the output of the above program?The print expects a ‘\0’ terminated array of characters (or string literal) whereas it receives a null pointer. Passing NULL to printf is undefined behavior.
According to Section 7.1.4(of... | [
{
"code": null,
"e": 24232,
"s": 24204,
"text": "\n02 Jun, 2017"
},
{
"code": null,
"e": 24271,
"s": 24232,
"text": "Consider the following C code snippet."
},
{
"code": null,
"e": 24305,
"s": 24271,
"text": "char* p = NULL;\nprintf(\"%s\", p);\n"
},
{
... |
Kruskal’s Minimum Spanning Tree Algorithm | There is a connected graph G(V, E) and the weight or cost for every edge is given. Kruskal’s algorithm will find the minimum spanning tree using the graph and the cost.
It is the merge-tree approach. Initially, there are different trees, this algorithm will merge them by taking those edges whose cost is minimum, and fo... | [
{
"code": null,
"e": 1231,
"s": 1062,
"text": "There is a connected graph G(V, E) and the weight or cost for every edge is given. Kruskal’s algorithm will find the minimum spanning tree using the graph and the cost."
},
{
"code": null,
"e": 1400,
"s": 1231,
"text": "It is the mer... |
Airbnb in Seattle — Data Analysis | by Jingles (Hong Jing) | Towards Data Science | For all prospective Airbnb hosts in Seattle, I will answer these questions in this article:
when to rent to maximise revenue?
when is the off-peak season for maintenance?
common group size of Seattle travellers, is it 2 or family or 4 or larger?
bedroom configurations to maximise booking rates?
how to achieve a good ra... | [
{
"code": null,
"e": 264,
"s": 172,
"text": "For all prospective Airbnb hosts in Seattle, I will answer these questions in this article:"
},
{
"code": null,
"e": 298,
"s": 264,
"text": "when to rent to maximise revenue?"
},
{
"code": null,
"e": 343,
"s": 298,
... |
Node Jimp | resize - GeeksforGeeks | 19 Feb, 2021
Introduction The resize() function is an inbuilt function in Nodejs | Jimp which resizes the image to a set width and height using a 2-pass bilinear algorithm. Syntax:
resize(w, h, mode, cb)
Parameter:
w – This parameter stores the width of the image.
h – This parameter stores the height of the image.
... | [
{
"code": null,
"e": 24426,
"s": 24398,
"text": "\n19 Feb, 2021"
},
{
"code": null,
"e": 24596,
"s": 24426,
"text": "Introduction The resize() function is an inbuilt function in Nodejs | Jimp which resizes the image to a set width and height using a 2-pass bilinear algorithm. Syn... |
Python Pandas - Create a DataFrame with the levels of the MultiIndex as columns | To create a DataFrame with the levels of the MultiIndex as columns, use the to_frame() method in Pandas.
At first, import the required libraries −
import pandas as pd
MultiIndex is a multi-level, or hierarchical, index object for pandas objects. Create arrays −
arrays = [[1, 2, 3, 4], ['John', 'Tim', 'Jacob', 'Chris']]... | [
{
"code": null,
"e": 1167,
"s": 1062,
"text": "To create a DataFrame with the levels of the MultiIndex as columns, use the to_frame() method in Pandas."
},
{
"code": null,
"e": 1209,
"s": 1167,
"text": "At first, import the required libraries −"
},
{
"code": null,
"e"... |
Count prime numbers that can be expressed as sum of consecutive prime numbers - GeeksforGeeks | 26 Apr, 2021
Given an integer N, the task is to find the number of prime numbers up to N that can be expressed as a sum of consecutive primes.
Examples:
Input: N = 45Output: 3Explanation:Below are the prime numbers up to 45 that can be expressed as sum of consecutive prime numbers:
5 = 2 + 3
17 = 2 + 3 + 5 + 7
41 = 2 +... | [
{
"code": null,
"e": 24269,
"s": 24241,
"text": "\n26 Apr, 2021"
},
{
"code": null,
"e": 24399,
"s": 24269,
"text": "Given an integer N, the task is to find the number of prime numbers up to N that can be expressed as a sum of consecutive primes."
},
{
"code": null,
"... |
How to filter data frame by categorical variable in R? | To filter data frame by categorical variable in R, we can follow the below steps −
Use inbuilt data sets or create a new data set and look at top few rows in the data set.
Use inbuilt data sets or create a new data set and look at top few rows in the data set.
Then, look at the bottom few rows in the data set.
Then, lo... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "To filter data frame by categorical variable in R, we can follow the below steps −"
},
{
"code": null,
"e": 1234,
"s": 1145,
"text": "Use inbuilt data sets or create a new data set and look at top few rows in the data set."
},
{
... |
ASP.NET - HTML Server | The HTML server controls are basically the standard HTML controls enhanced to enable server side processing. The HTML controls such as the header tags, anchor tags, and input elements are not processed by the server but are sent to the browser for display.
They are specifically converted to a server control by adding t... | [
{
"code": null,
"e": 2604,
"s": 2347,
"text": "The HTML server controls are basically the standard HTML controls enhanced to enable server side processing. The HTML controls such as the header tags, anchor tags, and input elements are not processed by the server but are sent to the browser for displ... |
Forward List and List of Tuples in C++ with Examples - GeeksforGeeks | 24 Dec, 2021
What is Forward List?
Forward list in STL is used to implement a singly linked list. It was introduced from C++11 onwards, forward lists are more useful than other containers in insertion, removal, and moving operations (like sort) and allow time constant insertion and removal of elements. It differs from ... | [
{
"code": null,
"e": 23707,
"s": 23679,
"text": "\n24 Dec, 2021"
},
{
"code": null,
"e": 23729,
"s": 23707,
"text": "What is Forward List?"
},
{
"code": null,
"e": 24632,
"s": 23729,
"text": "Forward list in STL is used to implement a singly linked list. It wa... |
Miscellaneous Classification Methods | Here we will discuss other classification methods such as Genetic Algorithms, Rough Set Approach, and Fuzzy Set Approach.
The idea of genetic algorithm is derived from natural evolution. In genetic algorithm, first of all, the initial population is created. This initial population consists of randomly generated rules. ... | [
{
"code": null,
"e": 2232,
"s": 2110,
"text": "Here we will discuss other classification methods such as Genetic Algorithms, Rough Set Approach, and Fuzzy Set Approach."
},
{
"code": null,
"e": 2478,
"s": 2232,
"text": "The idea of genetic algorithm is derived from natural evolut... |
Shortest path in a Binary Maze - GeeksforGeeks | 09 Jun, 2021
Given a MxN matrix where each element can either be 0 or 1. We need to find the shortest path between a given source cell to a destination cell. The path can only be created out of a cell if its value is 1.Expected time complexity is O(MN).For example –
Input:
mat[ROW][COL] = {{1, 0, 1, 1, 1, 1, 0, 1, 1,... | [
{
"code": null,
"e": 24493,
"s": 24465,
"text": "\n09 Jun, 2021"
},
{
"code": null,
"e": 24748,
"s": 24493,
"text": "Given a MxN matrix where each element can either be 0 or 1. We need to find the shortest path between a given source cell to a destination cell. The path can only ... |
How can we add/insert a JRadioButton to a JTable cell in Java?
| A JTable is a subclass of JComponent class and it can be used to create a table with information displayed in multiple rows and columns. When a value is selected from a JTable, a TableModelEvent is generated, which is handled by implementing a TableModelListener interface. We can add or insert a radio button to a JTabl... | [
{
"code": null,
"e": 1469,
"s": 1062,
"text": "A JTable is a subclass of JComponent class and it can be used to create a table with information displayed in multiple rows and columns. When a value is selected from a JTable, a TableModelEvent is generated, which is handled by implementing a TableMode... |
Generate Pencil Sketch from Photo in Python | by Abhijith Chandradas | Towards Data Science | OpenCV is the only library which is needed for the project. We will also be using matplotlib library for some visualizations which is discussed later.
import cv2import matplotlib.pyplot as plt
The following command can be used to read image using OpenCV.
img=cv2.imread("photo.jpg")
This command reads the file photo.jpg... | [
{
"code": null,
"e": 323,
"s": 172,
"text": "OpenCV is the only library which is needed for the project. We will also be using matplotlib library for some visualizations which is discussed later."
},
{
"code": null,
"e": 365,
"s": 323,
"text": "import cv2import matplotlib.pyplot ... |
Design and Analysis Binary Search | In this chapter, we will discuss another algorithm based on divide and conquer method.
Binary search can be performed on a sorted array. In this approach, the index of an element x is determined if the element belongs to the list of elements. If the array is unsorted, linear search is used to determine the position.
In... | [
{
"code": null,
"e": 2686,
"s": 2599,
"text": "In this chapter, we will discuss another algorithm based on divide and conquer method."
},
{
"code": null,
"e": 2917,
"s": 2686,
"text": "Binary search can be performed on a sorted array. In this approach, the index of an element x i... |
Find Numbers with Even Number of Digits in Python | Suppose we have a list of numbers. We have to count the numbers that has even number of digit count. So if the array is like [12,345,2,6,7896], the output will be 2, as 12 and 7896 has even number of digits
To solve this, we will follow these steps −
Take the list and convert each integer into string
if the length of s... | [
{
"code": null,
"e": 1269,
"s": 1062,
"text": "Suppose we have a list of numbers. We have to count the numbers that has even number of digit count. So if the array is like [12,345,2,6,7896], the output will be 2, as 12 and 7896 has even number of digits"
},
{
"code": null,
"e": 1313,
... |
Time Series - Auto Regression | For a stationary time series, an auto regression models sees the value of a variable at time ‘t’ as a linear function of values ‘p’ time steps preceding it. Mathematically it can be written as −
yt=C+φ1yt−1+φ2Yt−2+...+φpyt−p+εt
Where,‘p’ is the auto-regressive trend parameter
εt is white noise, and
yt−1,yt−2...yt−p d... | [
{
"code": null,
"e": 2336,
"s": 2141,
"text": "For a stationary time series, an auto regression models sees the value of a variable at time ‘t’ as a linear function of values ‘p’ time steps preceding it. Mathematically it can be written as −"
},
{
"code": null,
"e": 2369,
"s": 2336,
... |
GATE | GATE-CS-2016 (Set 1) | Question 11 - GeeksforGeeks | 11 Oct, 2021
Let p, q, r, s represent the following propositions.
p: {8, 9, 10, 11, 12}
q: x is a composite number
r: x is a perfect square
s: x is a prime number
Note : This question was asked as Numerical Answer Type.(A) 8(B) 9(C) 11(D) 12Answer: (C)Explanation: (p ⇒ q) will give {8, 9, 10, 12}¬r will give {8, 10, 1... | [
{
"code": null,
"e": 24610,
"s": 24582,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 24663,
"s": 24610,
"text": "Let p, q, r, s represent the following propositions."
},
{
"code": null,
"e": 24760,
"s": 24663,
"text": "p: {8, 9, 10, 11, 12}\nq: x is a comp... |
File Searching using Python | Python can search for file names in a specified path of the OS. This can be done using the module os with the walk() functions. This will take a specific path as input and generate a 3-tuple involving dirpath, dirnames, and filenames.
In the below example we are searching for a file named smpl.htm starting at the root ... | [
{
"code": null,
"e": 1297,
"s": 1062,
"text": "Python can search for file names in a specified path of the OS. This can be done using the module os with the walk() functions. This will take a specific path as input and generate a 3-tuple involving dirpath, dirnames, and filenames."
},
{
"cod... |
MongoDB query to remove a specific document | To remove a specific document, use remove() in MongoDB. Let us create a collection with documents −
> db.demo56.insertOne({"Name":"Chris"});
{
"acknowledged" : true,
"insertedId" : ObjectId("5e272e0bcfb11e5c34d89917")
}
> db.demo56.insertOne({"Name":"David"});
{
"acknowledged" : true,
"insertedId" : ObjectI... | [
{
"code": null,
"e": 1162,
"s": 1062,
"text": "To remove a specific document, use remove() in MongoDB. Let us create a collection with documents −"
},
{
"code": null,
"e": 1538,
"s": 1162,
"text": "> db.demo56.insertOne({\"Name\":\"Chris\"});\n{\n \"acknowledged\" : true,\n \... |
How to Resize an image in Android using Picasso on Kotlin? | This example demonstrates how to Resize an image in Android using Picasso on 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.
<LinearLayout xmlns:android="http://schema... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "This example demonstrates how to Resize an image in Android using Picasso on Kotlin."
},
{
"code": null,
"e": 1275,
"s": 1147,
"text": "Step 1 − Create a new project in Android Studio, go to File? New Project and fill all required de... |
POJO vs Java Beans | As we know that in Java POJO refers to the Plain old Java object.POJO and Bean class in Java shares some common features which are as follows −
Both classes must be public i.e accessible to all.
Both classes must be public i.e accessible to all.
Properties or variables defined in both classes must be private i.e. can't... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "As we know that in Java POJO refers to the Plain old Java object.POJO and Bean class in Java shares some common features which are as follows −"
},
{
"code": null,
"e": 1257,
"s": 1206,
"text": "Both classes must be public i.e access... |
C# | String.IndexOf( ) Method | Set - 1 - GeeksforGeeks | 31 Jan, 2019
In C#, IndexOf() method is a string method. This method is used to find the zero based index of the first occurrence of a specified character or string within current instance of the string. The method returns -1 if the character or string is not found. This method can be overloaded by passing different pa... | [
{
"code": null,
"e": 24519,
"s": 24491,
"text": "\n31 Jan, 2019"
},
{
"code": null,
"e": 24842,
"s": 24519,
"text": "In C#, IndexOf() method is a string method. This method is used to find the zero based index of the first occurrence of a specified character or string within curr... |
Unix / Linux Shell - The case...esac Statement | You can use multiple if...elif statements to perform a multiway branch. However, this is not always the best solution, especially when all of the branches depend on the value of a single variable.
Shell supports case...esac statement which handles exactly this situation, and it does so more efficiently than repeated if... | [
{
"code": null,
"e": 2944,
"s": 2747,
"text": "You can use multiple if...elif statements to perform a multiway branch. However, this is not always the best solution, especially when all of the branches depend on the value of a single variable."
},
{
"code": null,
"e": 3087,
"s": 2944... |
Apache Pig - Order By | The ORDER BY operator is used to display the contents of a relation in a sorted order based on one or more fields.
Given below is the syntax of the ORDER BY operator.
grunt> Relation_name2 = ORDER Relatin_name1 BY (ASC|DESC);
Assume that we have a file named student_details.txt in the HDFS directory /pig_data/ as show... | [
{
"code": null,
"e": 2799,
"s": 2684,
"text": "The ORDER BY operator is used to display the contents of a relation in a sorted order based on one or more fields."
},
{
"code": null,
"e": 2851,
"s": 2799,
"text": "Given below is the syntax of the ORDER BY operator."
},
{
"... |
Java Program to Implement Shunting Yard Algorithm - GeeksforGeeks | 26 Jan, 2022
The shunting yard algorithm is used to convert the infix notation to reverse polish notation. The postfix notation is also known as the reverse polish notation (RPN). The algorithm was named a “Shunting yard” because its activity is similar to a railroad shunting yard. It is a method for representing expre... | [
{
"code": null,
"e": 23581,
"s": 23553,
"text": "\n26 Jan, 2022"
},
{
"code": null,
"e": 24213,
"s": 23581,
"text": "The shunting yard algorithm is used to convert the infix notation to reverse polish notation. The postfix notation is also known as the reverse polish notation (RP... |
Draw ellipse in C graphics - GeeksforGeeks | 06 Dec, 2019
Program to draw ellipse in C using graphics.h header file.graphics.h library is used to include and facilitate graphical operations in program. C graphics using graphics.h functions can be used to draw different shapes, display text in different fonts, change colors and many more. Using functions of graphi... | [
{
"code": null,
"e": 24204,
"s": 24176,
"text": "\n06 Dec, 2019"
},
{
"code": null,
"e": 24744,
"s": 24204,
"text": "Program to draw ellipse in C using graphics.h header file.graphics.h library is used to include and facilitate graphical operations in program. C graphics using gr... |
Print system time in C++ (3 different ways) | There are different ways by which system day, date and time can be printed in Human Readable Form.
Using time() − It is used to find the current calendar time and have arithmetic data type that store timelocaltime() − It is used to fill the structure with date and timeasctime() − It converts Local time into Human Reada... | [
{
"code": null,
"e": 1161,
"s": 1062,
"text": "There are different ways by which system day, date and time can be printed in Human Readable Form."
},
{
"code": null,
"e": 1393,
"s": 1161,
"text": "Using time() − It is used to find the current calendar time and have arithmetic dat... |
Replace string in SQL Server - GeeksforGeeks | 27 Nov, 2020
Let us suppose we need to update or replace any string value in any table, we could use the below methods –
Replace String in SQL Server Example :In below example, we have a string variable, and then we are going to replace a part of a string with a new string using the Replace Function.
SQL Server Query t... | [
{
"code": null,
"e": 23877,
"s": 23849,
"text": "\n27 Nov, 2020"
},
{
"code": null,
"e": 23985,
"s": 23877,
"text": "Let us suppose we need to update or replace any string value in any table, we could use the below methods –"
},
{
"code": null,
"e": 24166,
"s": 23... |
What is a Domain Name System? | The acronym for Domain Name System is DNS. It is a naming system that works hierarchically and is decentralized for computers, servers (web servers), services, resources, network devices and components that are present on large networks such as the public Internet.
For example, in layman terms, it is a phonebook for co... | [
{
"code": null,
"e": 1328,
"s": 1062,
"text": "The acronym for Domain Name System is DNS. It is a naming system that works hierarchically and is decentralized for computers, servers (web servers), services, resources, network devices and components that are present on large networks such as the publ... |
Coin Change 2 in C++ | Suppose we have coins of different denominations and a total amount of money. we have to Write a module to compute the number of combinations that make up that amount. we can assume that we have infinite number of each kind of coin. So if the amount is 5 and coins are [1, 2, 5], then there are four combinations. (1+1+1... | [
{
"code": null,
"e": 1413,
"s": 1062,
"text": "Suppose we have coins of different denominations and a total amount of money. we have to Write a module to compute the number of combinations that make up that amount. we can assume that we have infinite number of each kind of coin. So if the amount is ... |
How to change the font color of a text using JavaScript? | To change the font color of a text, use the fontcolor() method. This method causes a string to be displayed in the specified color as if it were in a <font color="color"> tag.
You can try to run the following code to change the font color of a text using JavaScript −
Live Demo
<html>
<head>
<title>JavaScript ... | [
{
"code": null,
"e": 1239,
"s": 1062,
"text": "To change the font color of a text, use the fontcolor() method. This method causes a string to be displayed in the specified color as if it were in a <font color=\"color\"> tag. "
},
{
"code": null,
"e": 1331,
"s": 1239,
"text": "You... |
Build a Social Media Website with Django- Part 2 | Towards Data Science | So, in the first part of the tutorial, we learnt how to set up our project and setup various authentication backends and other details regarding various installs and app setups needed in the settings file.
If you have not read the first part yet, make sure to complete it first before moving forward as we would be build... | [
{
"code": null,
"e": 377,
"s": 171,
"text": "So, in the first part of the tutorial, we learnt how to set up our project and setup various authentication backends and other details regarding various installs and app setups needed in the settings file."
},
{
"code": null,
"e": 524,
"s"... |
Election Special: Detect Fake News using Transformers | by Priya Dwivedi | Towards Data Science | The 2020 elections in the US are around the corner. Fake News published on social media is a HUGE problem around the election time. While some of the Fake News is produced purposefully for skewing election results or to make a quick buck through advertisement, false information can also be shared by misinformed individ... | [
{
"code": null,
"e": 634,
"s": 172,
"text": "The 2020 elections in the US are around the corner. Fake News published on social media is a HUGE problem around the election time. While some of the Fake News is produced purposefully for skewing election results or to make a quick buck through advertise... |
C++ String Library - clear | It erases the contents of the string, which becomes an empty string.
Following is the declaration for std::string::clear.
void clear();
void clear() noexcept;
none
none
if an exception is thrown, there are no changes in the string.
In below example for std::string::clear.
#include <iostream>
#include <string>
int main... | [
{
"code": null,
"e": 2672,
"s": 2603,
"text": "It erases the contents of the string, which becomes an empty string."
},
{
"code": null,
"e": 2725,
"s": 2672,
"text": "Following is the declaration for std::string::clear."
},
{
"code": null,
"e": 2739,
"s": 2725,
... |
Aptitude - Tables | Tables are very commonly used to represent the set of related data. Tabulation is a very popular technique of data interpretation in which a set of questions are derived from a given table of data/ observations.
For example, using the above table, you want to check in percentage of sugar in April.
Quantity of suger use... | [
{
"code": null,
"e": 4104,
"s": 3892,
"text": "Tables are very commonly used to represent the set of related data. Tabulation is a very popular technique of data interpretation in which a set of questions are derived from a given table of data/ observations."
},
{
"code": null,
"e": 4191... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.