title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Multi Threading Models in Process Management - GeeksforGeeks | 31 May, 2021
Multi threading-It is a process of multiple threads executes at same time.
Many operating systems support kernel thread and user thread in a combined way. Example of such system is Solaris. Multi threading model are of three types.
Many to many model.
Many to one model.
one to one model.
Many to Many Mod... | [
{
"code": null,
"e": 24508,
"s": 24480,
"text": "\n31 May, 2021"
},
{
"code": null,
"e": 24583,
"s": 24508,
"text": "Multi threading-It is a process of multiple threads executes at same time."
},
{
"code": null,
"e": 24742,
"s": 24583,
"text": "Many operating ... |
How to Solve java.lang.ClassNotFoundException in Java? - GeeksforGeeks | 30 Sep, 2021
ClassNotFoundException is a checked exception and occurs when the Java Virtual Machine (JVM) tries to load a particular class and the specified class cannot be found in the classpath.
In older days, there are no editors like Eclipse are available. Even in Notepad, people have done java coding and by using ... | [
{
"code": null,
"e": 25347,
"s": 25319,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 25531,
"s": 25347,
"text": "ClassNotFoundException is a checked exception and occurs when the Java Virtual Machine (JVM) tries to load a particular class and the specified class cannot be fou... |
Scala Set intersect() method with example - GeeksforGeeks | 18 Oct, 2019
The intersect() method is utilized to compute the intersection between two sets.
Method Definition: def intersect(that: Set[A]): Set[A]
Return Type: It returns a set containing the elements present in both the sets.
Example #1:
// Scala program of intersect() // method // Creating object object GfG { ... | [
{
"code": null,
"e": 24047,
"s": 24019,
"text": "\n18 Oct, 2019"
},
{
"code": null,
"e": 24128,
"s": 24047,
"text": "The intersect() method is utilized to compute the intersection between two sets."
},
{
"code": null,
"e": 24183,
"s": 24128,
"text": "Method De... |
Program to find the kth character after decrypting a string - GeeksforGeeks | 08 Nov, 2021
Given a string str consisting of characters and numbers and an integer k, the task is to decrypt the string and the return the kth character in the decrypted string.In order to decrypt the string, traverse the string character by character and if the current character is an alphabet then append it to the r... | [
{
"code": null,
"e": 24552,
"s": 24524,
"text": "\n08 Nov, 2021"
},
{
"code": null,
"e": 25104,
"s": 24552,
"text": "Given a string str consisting of characters and numbers and an integer k, the task is to decrypt the string and the return the kth character in the decrypted strin... |
C# Program For Implementing IEnumerable Interface Using LINQ - GeeksforGeeks | 01 Nov, 2021
LINQ is known as Language Integrated Query and it is introduced in .NET 3.5. It gives the ability to .NET languages to generate queries to retrieve data from the data source. It removes the mismatch between programming languages and databases and the syntax used to create a query is the same no matter whic... | [
{
"code": null,
"e": 24222,
"s": 24194,
"text": "\n01 Nov, 2021"
},
{
"code": null,
"e": 24837,
"s": 24222,
"text": "LINQ is known as Language Integrated Query and it is introduced in .NET 3.5. It gives the ability to .NET languages to generate queries to retrieve data from the d... |
How to declare Block-Scoped Variables in JavaScript? | To declare block scoped variables, we use the keyword let and const introduced in ES2015.
Following is the code showing declaring black scoped variables in JavaScript −
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<t... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "To declare block scoped variables, we use the keyword let and const introduced in ES2015."
},
{
"code": null,
"e": 1231,
"s": 1152,
"text": "Following is the code showing declaring black scoped variables in JavaScript −"
},
{
... |
‘Simpsonize’ Yourself using CycleGAN and PyTorch | by Neel Iyer | Towards Data Science | Cyclegan is a framework that is capable of unpaired image to image translation. It’s been applied in some really interesting cases. Such as converting horses to zebras (and back again) and converting photos of the winter to photos of the summer.
I thought this could be potentially applied to The Simpsons. I was inspire... | [
{
"code": null,
"e": 293,
"s": 47,
"text": "Cyclegan is a framework that is capable of unpaired image to image translation. It’s been applied in some really interesting cases. Such as converting horses to zebras (and back again) and converting photos of the winter to photos of the summer."
},
{
... |
Matplotlib.figure.Figure.set_frameon() in Python - GeeksforGeeks | 03 May, 2020
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains all the plot elements. This module is used to control the default spacing of the subplots and top level container for all plot elemen... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n03 May, 2020"
},
{
"code": null,
"e": 24523,
"s": 24212,
"text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, whic... |
A Peek at Data Sampling Methods | by Kurtis Pykes | Towards Data Science | Sampling Bias is one of the most common types of biases observed in real-world scenarios. It occurs when the data used to train a model doesn’t reflect the distribution of the samples that the model will receive whilst in production.
towardsdatascience.com
Generally, whenever we work on Machine Learning projects, it’s ... | [
{
"code": null,
"e": 406,
"s": 172,
"text": "Sampling Bias is one of the most common types of biases observed in real-world scenarios. It occurs when the data used to train a model doesn’t reflect the distribution of the samples that the model will receive whilst in production."
},
{
"code":... |
PyQtGraph – Double Click Event for Bar Graph - GeeksforGeeks | 30 Nov, 2021
In this article we will see how we can create a double click event with the bar graph in the PyQtGraph module. PyQtGraph is a graphics and user interface library for Python that provides functionality commonly required in designing and science applications. Its primary goals are to provide fast, interactiv... | [
{
"code": null,
"e": 26323,
"s": 26295,
"text": "\n30 Nov, 2021"
},
{
"code": null,
"e": 27275,
"s": 26323,
"text": "In this article we will see how we can create a double click event with the bar graph in the PyQtGraph module. PyQtGraph is a graphics and user interface library f... |
Encode Number in C++ | Suppose we have a non-negative integer n, and we have to find the encoded form of it. The encoding strategy will be as follows −
So if the number is 23, then result will be 1000, if the number is 54, then it will be 10111
To solve this, we will follow these steps −
Create one method called bin, this will take n and k, ... | [
{
"code": null,
"e": 1191,
"s": 1062,
"text": "Suppose we have a non-negative integer n, and we have to find the encoded form of it. The encoding strategy will be as follows −"
},
{
"code": null,
"e": 1284,
"s": 1191,
"text": "So if the number is 23, then result will be 1000, if ... |
Predict the Column | Practice | GeeksforGeeks | Given a matrix(2D array) M of size N*N consisting of 0s and 1s only. The task is to find the column with maximum number of 0s.
Example:
Input:N = 3M[][] = {{1, 1, 0}, {1, 1, 0}, {1, 1, 0}}Output:2Explanation:2nd column (0-based indexing) is having 3 zeros which is maximum among all columns.
Your Task:Your... | [
{
"code": null,
"e": 353,
"s": 226,
"text": "Given a matrix(2D array) M of size N*N consisting of 0s and 1s only. The task is to find the column with maximum number of 0s."
},
{
"code": null,
"e": 362,
"s": 353,
"text": "Example:"
},
{
"code": null,
"e": 532,
"s":... |
Histogram for discrete values with Matplotlib | To plot a histogram for discrete values with matplotlib, we can use hist() method.
Set the figure size and adjust the padding between and around the subplots.
Set the figure size and adjust the padding between and around the subplots.
Make a list of discrete values.
Make a list of discrete values.
Use hist() method to ... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "To plot a histogram for discrete values with matplotlib, we can use hist() method."
},
{
"code": null,
"e": 1221,
"s": 1145,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code": n... |
Program to find area of a circle - GeeksforGeeks | 06 Nov, 2021
The area of a circle can simply be evaluated using the following formula.
Area = pi * r2
where r is radius of circle and it maybe in float because value of pie is 3.14
C++
C
Java
Python3
C#
PHP
Javascript
// C++ program to find area// of circle#include <iostream>const double pi = 3.1415926535897932... | [
{
"code": null,
"e": 24493,
"s": 24465,
"text": "\n06 Nov, 2021"
},
{
"code": null,
"e": 24568,
"s": 24493,
"text": "The area of a circle can simply be evaluated using the following formula. "
},
{
"code": null,
"e": 24665,
"s": 24570,
"text": "Area = pi * r2\... |
C++ Program to Implement The Edmonds-Karp Algorithm | This is a C++ Program to Implement the Edmonds-Karp algorithm to calculate maximum flow between source and sink vertex.
Begin
function edmondsKarp() :
initiate flow as 0.
If there is an augmenting path from source to sink, add the path to flow.
Return flow.
End
#include<cstdio>
#include<queue>
#inc... | [
{
"code": null,
"e": 1182,
"s": 1062,
"text": "This is a C++ Program to Implement the Edmonds-Karp algorithm to calculate maximum flow between source and sink vertex."
},
{
"code": null,
"e": 1345,
"s": 1182,
"text": "Begin\n function edmondsKarp() :\n initiate flow as 0.\... |
PyQt5 - How to get visible column in the model of combo box - GeeksforGeeks | 22 Apr, 2020
In this article we will see how we can get the visible column of combo box. Column model is used to set the column which will be visible to the user, model column property holds the column in the model that is visible. In order to set this we use setModelColumn method. In order to get the model column we u... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n22 Apr, 2020"
},
{
"code": null,
"e": 24231,
"s": 23901,
"text": "In this article we will see how we can get the visible column of combo box. Column model is used to set the column which will be visible to the user, model column ... |
Power Function in C/C++ | Power function is used to calculate the power of the given number.
The pow function find the value of a raised to the power b i.e. ab.
double pow(double a , double b)
It accepts a double integers as input and output a double integer as output. It pow() function is defined in math.h package.
If you pass an integer to th... | [
{
"code": null,
"e": 1129,
"s": 1062,
"text": "Power function is used to calculate the power of the given number."
},
{
"code": null,
"e": 1197,
"s": 1129,
"text": "The pow function find the value of a raised to the power b i.e. ab."
},
{
"code": null,
"e": 1229,
... |
C# Program for Largest Sum Contiguous Subarray - GeeksforGeeks | 29 Nov, 2021
Write an efficient program to find the sum of contiguous subarray within a one-dimensional array of numbers that has the largest sum.
Kadane’s Algorithm:
Initialize:
max_so_far = INT_MIN
max_ending_here = 0
Loop for each element of the array
(a) max_ending_here = max_ending_here + a[i]
(b) ... | [
{
"code": null,
"e": 25230,
"s": 25202,
"text": "\n29 Nov, 2021"
},
{
"code": null,
"e": 25365,
"s": 25230,
"text": "Write an efficient program to find the sum of contiguous subarray within a one-dimensional array of numbers that has the largest sum. "
},
{
"code": null,
... |
3 Top Python Packages to Learn Statistic for Data Scientist | by Cornellius Yudha Wijaya | Towards Data Science | If you enjoy my content and want to get more in-depth knowledge regarding data or just daily life as a Data Scientist, please consider subscribing to my newsletter here.
Data Scientists are known for having better programming skills than a statistician and better statistic knowledge than a programmer. While learning pr... | [
{
"code": null,
"e": 342,
"s": 172,
"text": "If you enjoy my content and want to get more in-depth knowledge regarding data or just daily life as a Data Scientist, please consider subscribing to my newsletter here."
},
{
"code": null,
"e": 589,
"s": 342,
"text": "Data Scientists ... |
Beginner’s Guide to Sentiment Analysis for Simplified Chinese using SnowNLP | by Ng Wai Foong | Towards Data Science | By reading this article, you will be exposed to a technique for analyzing the sentiments of any text in Simplified Chinese. This tutorial will be based on Simplified Chinese but it can be used on Traditional Chinese as well due to the fact that SnowNLP is capable of converting Traditional Chinese to Simplified Chinese.... | [
{
"code": null,
"e": 493,
"s": 172,
"text": "By reading this article, you will be exposed to a technique for analyzing the sentiments of any text in Simplified Chinese. This tutorial will be based on Simplified Chinese but it can be used on Traditional Chinese as well due to the fact that SnowNLP is... |
How to Find the List of Daemon Processes and Zombie Processes in Linux | This article will guide you to understand the Zombie process and Daemons, and also help us to find the process which is running in the background.
When a process ends the execution, then it will have an exit status to report to its master process. Because of that little bit of information, the process will remain in th... | [
{
"code": null,
"e": 1209,
"s": 1062,
"text": "This article will guide you to understand the Zombie process and Daemons, and also help us to find the process which is running in the background."
},
{
"code": null,
"e": 1619,
"s": 1209,
"text": "When a process ends the execution, ... |
Gradle - Build a Groovy Project | This chapter explains how to compile and execute a Groovy project using build.gradle file.
The Groovy plug-in for Gradle extends the Java plug-in and provides tasks for Groovy programs. You can use the following line for applying groovy plugin.
apply plugin: 'groovy'
Copy the following code into build.gradle file. The... | [
{
"code": null,
"e": 1973,
"s": 1882,
"text": "This chapter explains how to compile and execute a Groovy project using build.gradle file."
},
{
"code": null,
"e": 2127,
"s": 1973,
"text": "The Groovy plug-in for Gradle extends the Java plug-in and provides tasks for Groovy progra... |
Connecting Apache Hive To Microsoft Power BI | by Rahul Pathak | Towards Data Science | In this story of our blog post, we are mentioning the steps we took to perform the required connection. The Hive database was based on Cloudera & the Power BI Desktop was installed on Windows. The connection can also occur with other BI tools such as Tableau & etc. As Hive can be integrated with many BI tools but the p... | [
{
"code": null,
"e": 587,
"s": 172,
"text": "In this story of our blog post, we are mentioning the steps we took to perform the required connection. The Hive database was based on Cloudera & the Power BI Desktop was installed on Windows. The connection can also occur with other BI tools such as Tabl... |
PostgreSQL - Transactions - GeeksforGeeks | 01 Feb, 2021
The Transaction is not a new word we are hearing. We heard that word many times like “Cash Transaction”. Banks usually deal with cash i.e sending or receiving cash, hence we coin the term as a cash transaction. So simply transaction is a unit of work. In this article, we are going to learn about transactio... | [
{
"code": null,
"e": 27633,
"s": 27605,
"text": "\n01 Feb, 2021"
},
{
"code": null,
"e": 27981,
"s": 27633,
"text": "The Transaction is not a new word we are hearing. We heard that word many times like “Cash Transaction”. Banks usually deal with cash i.e sending or receiving cash... |
Operating Systems | Set 13 - GeeksforGeeks | 27 Mar, 2017
Following questions have been asked in GATE CS 2007 exam.
1) A virtual memory system uses First In First Out (FIFO) page replacement policy and allocates a fixed number of frames to a process. Consider the following statements:P: Increasing the number of page frames allocated to a process sometimes increas... | [
{
"code": null,
"e": 23938,
"s": 23910,
"text": "\n27 Mar, 2017"
},
{
"code": null,
"e": 23996,
"s": 23938,
"text": "Following questions have been asked in GATE CS 2007 exam."
},
{
"code": null,
"e": 24524,
"s": 23996,
"text": "1) A virtual memory system uses ... |
React Memo | Using memo will cause React to skip rendering a component if its props have not changed.
This can improve performance.
This section uses React Hooks. See the React Hooks section for more information on Hooks.
In this example, the Todos component re-renders even when the todos have not changed.
index.js:
import { useSta... | [
{
"code": null,
"e": 89,
"s": 0,
"text": "Using memo will cause React to skip rendering a component if its props have not changed."
},
{
"code": null,
"e": 119,
"s": 89,
"text": "This can improve performance."
},
{
"code": null,
"e": 209,
"s": 119,
"text": "Th... |
Solidity - Pure Functions | Pure functions ensure that they not read or modify the state. A function can be declared as pure. The following statements if present in the function are considered reading the state and compiler will throw warning in such cases.
Reading state variables.
Reading state variables.
Accessing address(this).balance or <add... | [
{
"code": null,
"e": 2786,
"s": 2555,
"text": "Pure functions ensure that they not read or modify the state. A function can be declared as pure. The following statements if present in the function are considered reading the state and compiler will throw warning in such cases. "
},
{
"code": ... |
Optimize Python Code in Jupyter Notebook | by Winson Waisakurnia | Towards Data Science | Want to make a slow Python code fast in Jupyter Notebook? By using sum aggregate as an example, we will measure the runtime with %%time and find the bottleneck using %lprun line profiler.
Assume that Pandas doesn’t have group-by and aggregate functions and we need to implement it ourselves. We want to aggregate the tab... | [
{
"code": null,
"e": 360,
"s": 172,
"text": "Want to make a slow Python code fast in Jupyter Notebook? By using sum aggregate as an example, we will measure the runtime with %%time and find the bottleneck using %lprun line profiler."
},
{
"code": null,
"e": 541,
"s": 360,
"text":... |
AI for good: Banknotes detection for blind people | by Bruno Sánchez-A Nuño | Towards Data Science | This service recognizes what currency a banknote is (euro or usd dollar) and what denomination (5,10,20, ...). The social impact purpose is to help blind people, so I took care to make “real-life” training images holding the banknotes in my hand, sometimes folded, sometimes covering part of it.
This post hopefully help... | [
{
"code": null,
"e": 468,
"s": 172,
"text": "This service recognizes what currency a banknote is (euro or usd dollar) and what denomination (5,10,20, ...). The social impact purpose is to help blind people, so I took care to make “real-life” training images holding the banknotes in my hand, sometime... |
C Standard Library - Quick Guide | The assert.h header file of the C Standard Library provides a macro called assert which can be used to verify assumptions made by the program and print a diagnostic message if this assumption is false.
The defined macro assert refers to another macro NDEBUG which is not a part of <assert.h>. If NDEBUG is defined as a ... | [
{
"code": null,
"e": 2209,
"s": 2007,
"text": "The assert.h header file of the C Standard Library provides a macro called assert which can be used to verify assumptions made by the program and print a diagnostic message if this assumption is false."
},
{
"code": null,
"e": 2442,
"s":... |
Time Series of Price Anomaly Detection with LSTM | by Susan Li | Towards Data Science | Autoencoders are an unsupervised learning technique, although they are trained using supervised learning methods. The goal is to minimize reconstruction error based on a loss function, such as the mean squared error.
In this post, we will try to detect anomalies in the Johnson & Johnson’s historical stock price time se... | [
{
"code": null,
"e": 388,
"s": 171,
"text": "Autoencoders are an unsupervised learning technique, although they are trained using supervised learning methods. The goal is to minimize reconstruction error based on a loss function, such as the mean squared error."
},
{
"code": null,
"e": 5... |
time.perf_counter() function in Python | 23 Mar, 2022
The time module provides various time-related functions. We must import the time module before using perf_counter() so we can access the function without throwing any errors.The perf_counter() function always returns the float value of time in seconds. Return the value (in fractional seconds) of a performa... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Mar, 2022"
},
{
"code": null,
"e": 766,
"s": 52,
"text": "The time module provides various time-related functions. We must import the time module before using perf_counter() so we can access the function without throwing any errors.... |
GATE | GATE-CS-2001 | Question 47 | 28 Jun, 2021
Consider Peterson’s algorithm for mutual exclusion between two concurrent processes i and j. The program executed by process is shown below.
repeat
flag [i] = true;
turn = j;
while ( P ) do no-op;
Enter critical section, perform actions, then exit critical
section
... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 193,
"s": 52,
"text": "Consider Peterson’s algorithm for mutual exclusion between two concurrent processes i and j. The program executed by process is shown below."
},
{
"code": null,
"... |
Python | Replace tuple according to Nth tuple element | 15 Oct, 2019
Sometimes, while working with data, we might have a problem in which we need to replace the entry in which a particular entry of data is matching. This can be a matching phone no, id etc. This has it’s application in web development domain. Let’s discuss certain ways in which this task can be performed.
Me... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Oct, 2019"
},
{
"code": null,
"e": 333,
"s": 28,
"text": "Sometimes, while working with data, we might have a problem in which we need to replace the entry in which a particular entry of data is matching. This can be a matching phone... |
Difference between <div> and <span> Tag in HTML | 16 May, 2022
Both the tags (<div> and <span>) are used to represent the part of the webpage, <div> tag is used a as block part of the webpage and <span> tag is used as a inline part of the webpage like below:
<div>A Computer Science Portal for Geeks <span>GeeksforGeeks</span></div>
HTML <div> tag: The div tag is kno... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n16 May, 2022"
},
{
"code": null,
"e": 251,
"s": 53,
"text": "Both the tags (<div> and <span>) are used to represent the part of the webpage, <div> tag is used a as block part of the webpage and <span> tag is used as a inline part of th... |
Preorder to Postorder | Practice | GeeksforGeeks | Given an array arr[] of N nodes representing preorder traversal of BST. The task is to print its postorder traversal.
In Pre-Order traversal, the root node is visited before the left child and right child nodes.
Post-order traversal is one of the multiple methods to traverse a tree.
Example 1:
Input:
N = 5
arr[] = {40... | [
{
"code": null,
"e": 510,
"s": 226,
"text": "Given an array arr[] of N nodes representing preorder traversal of BST. The task is to print its postorder traversal.\nIn Pre-Order traversal, the root node is visited before the left child and right child nodes.\nPost-order traversal is one of the multip... |
Lightweight Transactions in Cassandra | 20 Nov, 2019
In this article we will discuss Lightweight Transactions(LWT) in Cassandra which is also help to improve performance.
Sometimes insert or update operations must be unique which require a read-before-write. The read-before-write has performance implications – Use wisely! This type of problem solved by CQL L... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Nov, 2019"
},
{
"code": null,
"e": 146,
"s": 28,
"text": "In this article we will discuss Lightweight Transactions(LWT) in Cassandra which is also help to improve performance."
},
{
"code": null,
"e": 411,
"s": 146,
... |
How to make simple PUT request using fetch API by making custom HTTP library ? | 18 Jul, 2020
The fetch() method is used to send the requests to the server without refreshing the page. It is an alternative to the XMLHttpRequest object. It will be taking a fake API that will contain Array as an example and from that API we will show to PUT/Update data by fetch API method by making custom HTTP lib... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jul, 2020"
},
{
"code": null,
"e": 420,
"s": 28,
"text": "The fetch() method is used to send the requests to the server without refreshing the page. It is an alternative to the XMLHttpRequest object. It will be taking a fake API that... |
HTML | alt attribute | 05 Jan, 2022
The HTML alt attribute is used to provide an alternate tag that is used to show or display something if the primary attribute i.e., the <img> tag, fails to display the value assigned to it.Supported tags:
area
image
input
<applet>
Attribute Values: It contains single value text which is used to specify th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Jan, 2022"
},
{
"code": null,
"e": 234,
"s": 28,
"text": "The HTML alt attribute is used to provide an alternate tag that is used to show or display something if the primary attribute i.e., the <img> tag, fails to display the value a... |
Network Layer Services- Packetizing, Routing and Forwarding | 22 Mar, 2022
Network layer is the third layer in the OSI model of computer networks. It’s main function is to transfer network packets from the source to the destination. It is involved both at the source host and the destination host. At the source, it accepts a packet from the transport layer, encapsulates it in a da... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Mar, 2022"
},
{
"code": null,
"e": 594,
"s": 54,
"text": "Network layer is the third layer in the OSI model of computer networks. It’s main function is to transfer network packets from the source to the destination. It is involved b... |
Output of C Program | Set 20 | 10 Jul, 2018
Predict the outputs of following C programs.
Question 1
int main(){ int x = 10; static int y = x; if(x == y) printf("Equal"); else if(x > y) printf("Greater"); else printf("Less"); getchar(); return 0;}
Output: Compiler ErrorIn C, static variables can only be initialized using consta... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n10 Jul, 2018"
},
{
"code": null,
"e": 99,
"s": 54,
"text": "Predict the outputs of following C programs."
},
{
"code": null,
"e": 110,
"s": 99,
"text": "Question 1"
},
{
"code": "int main(){ int x = 10; st... |
How to Create Language Translator in Android using Firebase ML Kit? | 28 Nov, 2021
In the previous article, we have seen using Language detector in Android using Firebase ML kit. In this article, we will take a look at the implementation of Language translator in Android using Firebase ML Kit in Android.
We will be building a simple application in which we will be showing an EditText fi... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 278,
"s": 54,
"text": "In the previous article, we have seen using Language detector in Android using Firebase ML kit. In this article, we will take a look at the implementation of Language transla... |
Implementation of CI/CD in .NET application Using Shell Executor on GitLab | 01 Mar, 2021
Shell Executor is a very simple executor which helps to build the solution locally on the machine, where GitLab Runner is installed. However, it also helps to run Bash and Windows PowerShell scripts and Windows Batch is deprecated. There will be a few requirements and path configuration need to set up GitL... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Mar, 2021"
},
{
"code": null,
"e": 426,
"s": 54,
"text": "Shell Executor is a very simple executor which helps to build the solution locally on the machine, where GitLab Runner is installed. However, it also helps to run Bash and Wi... |
GATE | GATE CS 2012 | Question 17 | 28 Jun, 2021
Let G be a simple undirected planar graph on 10 vertices with 15 edges. If G is a connected graph, then the number of bounded faces in any embedding of G on the plane is equal to(A) 3(B) 4(C) 5(D) 6Answer: (D)Explanation: If the graph is planar, then it must follow below Euler’s Formula for planar graphs
v... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 360,
"s": 54,
"text": "Let G be a simple undirected planar graph on 10 vertices with 15 edges. If G is a connected graph, then the number of bounded faces in any embedding of G on the plane is equa... |
Python | Numpy matrix.diagonal() | 12 Apr, 2019
With the help of Numpy matrix.diagonal() method, we are able to find a diagonal element from a given matrix and gives output as one dimensional matrix.
Syntax : matrix.diagonal()
Return : Return diagonal element of a matrix
Example #1 :In this example we can see that with the help of matrix.diagonal() meth... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n12 Apr, 2019"
},
{
"code": null,
"e": 205,
"s": 53,
"text": "With the help of Numpy matrix.diagonal() method, we are able to find a diagonal element from a given matrix and gives output as one dimensional matrix."
},
{
"code": ... |
Difference between Abstraction and Encapsulation in C++ | 06 Oct, 2021
Abstraction: In OOPs, Abstraction is the method of getting information where the information needed will be taken in such a simplest way that solely the required components are extracted, and also the ones that are considered less significant are unnoticed. The concept of abstraction only shows necessary i... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 507,
"s": 54,
"text": "Abstraction: In OOPs, Abstraction is the method of getting information where the information needed will be taken in such a simplest way that solely the required components a... |
COUNT() Function in MySQL - GeeksforGeeks | 22 Jan, 2021
COUNT() function :
This function in MySQL is used to find the number of indexes as returned from the query selected.
Features :
This function is used to find the number of indexes as returned from the query selected.
This function comes under Numeric Functions.
This function accepts only one parameter name... | [
{
"code": null,
"e": 24268,
"s": 24240,
"text": "\n22 Jan, 2021"
},
{
"code": null,
"e": 24287,
"s": 24268,
"text": "COUNT() function :"
},
{
"code": null,
"e": 24385,
"s": 24287,
"text": "This function in MySQL is used to find the number of indexes as returne... |
Groovy - getTime() | Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object.
public long getTime()
None.
The number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this date.
Following is an example of the usage of this method −
class Example {
static void main(String[... | [
{
"code": null,
"e": 2342,
"s": 2238,
"text": "Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object."
},
{
"code": null,
"e": 2365,
"s": 2342,
"text": "public long getTime()\n"
},
{
"code": null,
"e": 2371,
"s": 23... |
How to set background color in jQuery? | To set the background color using jQuery, use the jQuery css() property. We will set background color on mouse hover with the jQuery on() method.
You can try to run the following color to set background color in jQuery.
Live Demo
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.... | [
{
"code": null,
"e": 1208,
"s": 1062,
"text": "To set the background color using jQuery, use the jQuery css() property. We will set background color on mouse hover with the jQuery on() method."
},
{
"code": null,
"e": 1282,
"s": 1208,
"text": "You can try to run the following col... |
Kruskal’s Minimum Spanning Tree Algorithm | Greedy Algo-2 - GeeksforGeeks | 18 Jan, 2022
What is Minimum Spanning Tree? Given a connected and undirected graph, a spanning tree of that graph is a subgraph that is a tree and connects all the vertices together. A single graph can have many different spanning trees. A minimum spanning tree (MST) or minimum weight spanning tree for a weighted, conn... | [
{
"code": null,
"e": 30545,
"s": 30517,
"text": "\n18 Jan, 2022"
},
{
"code": null,
"e": 31299,
"s": 30545,
"text": "What is Minimum Spanning Tree? Given a connected and undirected graph, a spanning tree of that graph is a subgraph that is a tree and connects all the vertices tog... |
col-lg-* Bootstrap class | The input-lg is used to set the width of forms in Bootstrap.
You can try to run the following code to implement col-lg Bootstrap class −
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
<script src = "/scrip... | [
{
"code": null,
"e": 1123,
"s": 1062,
"text": "The input-lg is used to set the width of forms in Bootstrap."
},
{
"code": null,
"e": 1199,
"s": 1123,
"text": "You can try to run the following code to implement col-lg Bootstrap class −"
},
{
"code": null,
"e": 1209,
... |
Retrieving Elements from Collection in C# | Let us see an example of a list collection.
We have set the elements −
List<int> list = new List<int>();
list.Add(20);
list.Add(40);
list.Add(60);
list.Add(80);
Now let’s say we need to retrieve the first element from the list. For that, set the index like this −
int a = list[0];
The following is an example showing how... | [
{
"code": null,
"e": 1106,
"s": 1062,
"text": "Let us see an example of a list collection."
},
{
"code": null,
"e": 1133,
"s": 1106,
"text": "We have set the elements −"
},
{
"code": null,
"e": 1223,
"s": 1133,
"text": "List<int> list = new List<int>();\nlist.... |
Adding unique constraint to ALTER TABLE in MySQL | Let us first create a table −
mysql> create table DemoTable1811
(
FirstName varchar(20),
LastName varchar(20)
);
Query OK, 0 rows affected (0.00 sec)
Here is the query to add index
mysql> alter table DemoTable1811 ADD UNIQUE unique_index_first_last_name(FirstName, LastName);
Query OK, 0 rows affecte... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1232,
"s": 1092,
"text": "mysql> create table DemoTable1811\n (\n FirstName varchar(20),\n LastName varchar(20)\n );\nQuery OK, 0 rows affected (0.00 sec)"
},
... |
How I taught my computer to play Spot it! using OpenCV and Deep Learning | by Hennie de Harder | Towards Data Science | A hobby of mine is playing board games and because I have some knowledge about CNNs, I decided to build an application that can beat humans in a card game. I wanted to build the model from scratch with my own dataset, to see how well a model from scratch with a small dataset would perform. I chose to start with a not-t... | [
{
"code": null,
"e": 532,
"s": 172,
"text": "A hobby of mine is playing board games and because I have some knowledge about CNNs, I decided to build an application that can beat humans in a card game. I wanted to build the model from scratch with my own dataset, to see how well a model from scratch ... |
PL/SQL - CONTINUE Statement | The CONTINUE statement causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating. In other words, it forces the next iteration of the loop to take place, skipping any code in between.
The syntax for a CONTINUE statement is as follows −
CONTINUE;
DECLARE
a number(2)... | [
{
"code": null,
"e": 2433,
"s": 2199,
"text": "The CONTINUE statement causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating. In other words, it forces the next iteration of the loop to take place, skipping any code in between."
},
{
"code... |
UUIDField – Django Models | 12 Feb, 2020
UUIDField is a special field to store universally unique identifiers. It uses Python’s UUID class. UUID, Universal Unique Identifier, is a python library that helps in generating random objects of 128 bits as ids. It provides the uniqueness as it generates ids on the basis of time, Computer hardware (MAC e... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n12 Feb, 2020"
},
{
"code": null,
"e": 536,
"s": 53,
"text": "UUIDField is a special field to store universally unique identifiers. It uses Python’s UUID class. UUID, Universal Unique Identifier, is a python library that helps in genera... |
How to Calculate Cronbach’s Alpha in R? | 10 Jan, 2022
In this article, we will learn how to calculate Cronbach’s Alpha in the R Programming Language.
Cronbach’s Alpha helps us to measure the internal consistency of a group of data. It is a coefficient of reliability. It helps us to validate the consistency of a questionnaire or survey. The Cronbach’s Alpha ra... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Jan, 2022"
},
{
"code": null,
"e": 124,
"s": 28,
"text": "In this article, we will learn how to calculate Cronbach’s Alpha in the R Programming Language."
},
{
"code": null,
"e": 534,
"s": 124,
"text": "Cronbach’s... |
How to Install SQLmap in Windows? | 09 Nov, 2021
Sqlmap is an open-source penetration testing tool. It comes with a powerful detection engine. It automates the process of detecting & taking over the database server. There is total of six SQL injection tool techniques are present. This is the highest amount of tool present than others. When we are going t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Nov, 2021"
},
{
"code": null,
"e": 490,
"s": 28,
"text": "Sqlmap is an open-source penetration testing tool. It comes with a powerful detection engine. It automates the process of detecting & taking over the database server. There is... |
JavaScript Promise finally() Method | 17 Mar, 2021
The finally() method of the Promise object is used to return a Promise when a Promise is settled, that is, it is either fulfilled or rejected. A Promise is a JavaScript object which generates a value after an asynchronous function executes successfully. When it does not execute successfully due to a timeou... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Mar, 2021"
},
{
"code": null,
"e": 390,
"s": 52,
"text": "The finally() method of the Promise object is used to return a Promise when a Promise is settled, that is, it is either fulfilled or rejected. A Promise is a JavaScript objec... |
How to get the child element of a parent using JavaScript ? | 22 Nov, 2021
In this article, we will learn to get the child element of the parent using Javascript. Given an HTML document and the task is to select a particular element and get all the child elements of the parent element with the help of JavaScript. For this, there are 2 ways to get the child element:
By using the c... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 345,
"s": 52,
"text": "In this article, we will learn to get the child element of the parent using Javascript. Given an HTML document and the task is to select a particular element and get all the ... |
Quantitative Aptitude – Time, Work and Distance | 03 Dec, 2021
Quantitative Aptitude or commonly called as the mathematical section of Aptitude is a crucial part in getting placement in many companies that prefer quantitative ability evaluation. Many big companies like Infosys, TCS and many others have their first round an Aptitude Test.
To correctly crack the test i... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n03 Dec, 2021"
},
{
"code": null,
"e": 331,
"s": 53,
"text": "Quantitative Aptitude or commonly called as the mathematical section of Aptitude is a crucial part in getting placement in many companies that prefer quantitative ability eva... |
How to Show All Columns of a Pandas DataFrame? | 19 Dec, 2021
In this article, we will discuss how to Show All Columns of a Pandas DataFrame.
We will use the pandas set_option() method. This method will set the specified option’s value.
Syntax :
pandas.set_option(pat, value)
Parameters :
pat : Regexp which should match a single option.
value : New value of option.
R... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 108,
"s": 28,
"text": "In this article, we will discuss how to Show All Columns of a Pandas DataFrame."
},
{
"code": null,
"e": 203,
"s": 108,
"text": "We will use the pandas set... |
VB.Net - Bit Shift Operators | Assume that the variable A holds 60 and variable B holds 13, then −
Try the following example to understand all the bitwise operators available in VB.Net −
Module BitwiseOp
Sub Main()
Dim a As Integer = 60 ' 60 = 0011 1100
Dim b As Integer = 13 ' 13 = 0000 1101
Dim c As Integer = 0
... | [
{
"code": null,
"e": 2502,
"s": 2434,
"text": "Assume that the variable A holds 60 and variable B holds 13, then −"
},
{
"code": null,
"e": 2590,
"s": 2502,
"text": "Try the following example to understand all the bitwise operators available in VB.Net −"
},
{
"code": null... |
Swift - For Loop | A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times.
The syntax of for loop in Swift programming language is as follows −
for init; condition; increment {
statement(s)
}
The flow of control in a for loop is as follows −
The init s... | [
{
"code": null,
"e": 2526,
"s": 2387,
"text": "A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times."
},
{
"code": null,
"e": 2595,
"s": 2526,
"text": "The syntax of for loop in Swift programming... |
K’th Non-repeating Character in Python using List Comprehension and OrderedDict | 23 Nov, 2020
Given a string and a number k, find the k-th non-repeating character in the string. Consider a large input string with lacs of characters and a small character set. How to find the character by only doing only one traversal of input string?
Examples:
Input : str = geeksforgeeks, k = 3
Output : r
First non-... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Nov, 2020"
},
{
"code": null,
"e": 293,
"s": 52,
"text": "Given a string and a number k, find the k-th non-repeating character in the string. Consider a large input string with lacs of characters and a small character set. How to fi... |
Oracle Certified Java Associate (OCA) Exam Preparation | 12 Nov, 2018
Friends! I recently appeared for OCA exam and scored 95%. Here i am sharing few techniques and exam question patterns which must be helping you while appearing for OCA test. This exam guarantee to ask question on the below topics or we can say statements.Exam code: 1Z0-808
1. Must practice the differences ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 Nov, 2018"
},
{
"code": null,
"e": 328,
"s": 54,
"text": "Friends! I recently appeared for OCA exam and scored 95%. Here i am sharing few techniques and exam question patterns which must be helping you while appearing for OCA test. ... |
How to use TypeScript on backend ? | 04 Jul, 2021
TypeScript was developed by Microsoft to simplify the JavaScript code, making it easier to read and debug. Its type checking prevents many horrendous bugs during runtime. In this article, we will see how to set up typescript in the backend with NodeJS and express.
Prerequisites
Basics of NodeJS
Basics of E... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Jul, 2021"
},
{
"code": null,
"e": 317,
"s": 52,
"text": "TypeScript was developed by Microsoft to simplify the JavaScript code, making it easier to read and debug. Its type checking prevents many horrendous bugs during runtime. In ... |
Monkey Patching in Python (Dynamic Behavior) | 04 Dec, 2020
In Python, the term monkey patch refers to dynamic (or run-time) modifications of a class or module. In Python, we can actually change the behavior of code at run-time.
# monk.pyclass A: def func(self): print ("func() is being called")
We use above module (monk) in below code and change behavi... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Dec, 2020"
},
{
"code": null,
"e": 221,
"s": 52,
"text": "In Python, the term monkey patch refers to dynamic (or run-time) modifications of a class or module. In Python, we can actually change the behavior of code at run-time."
},... |
Java - Serialization | Java provides a mechanism, called object serialization where an object can be represented as a sequence of bytes that includes the object's data as well as information about the object's type and the types of data stored in the object.
After a serialized object has been written into a file, it can be read from the file... | [
{
"code": null,
"e": 2747,
"s": 2511,
"text": "Java provides a mechanism, called object serialization where an object can be represented as a sequence of bytes that includes the object's data as well as information about the object's type and the types of data stored in the object."
},
{
"co... |
iscntrl() in C++ and its application to find control characters | 18 Apr, 2019
In C++, iscntrl() is a predefined function used for string and character handling. cstring is the header file required for string functions and cctype is the header file required for character functions. A control character is one which is not a printable character i.e, it does not occupy a printing positi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Apr, 2019"
},
{
"code": null,
"e": 352,
"s": 28,
"text": "In C++, iscntrl() is a predefined function used for string and character handling. cstring is the header file required for string functions and cctype is the header file requi... |
Python – Weibull Minimum Distribution in Statistics | 10 Jan, 2020
scipy.stats.weibull_min() is a Weibull minimum continuous random variable. It is inherited from the of generic methods as an instance of the rv_continuous class. It completes the methods with details specific for this particular distribution.
Parameters :
q : lower and upper tail probabilityx : quantileslo... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Jan, 2020"
},
{
"code": null,
"e": 271,
"s": 28,
"text": "scipy.stats.weibull_min() is a Weibull minimum continuous random variable. It is inherited from the of generic methods as an instance of the rv_continuous class. It completes ... |
Python – API.home_timeline() in Tweepy | 08 Jun, 2020
Twitter is a popular social network where users share messages called tweets. Twitter allows us to mine the data of any user using Twitter API or Tweepy. The data will be tweets extracted from the user. The first thing to do is get the consumer key, consumer secret, access key and access secret from twitte... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jun, 2020"
},
{
"code": null,
"e": 428,
"s": 28,
"text": "Twitter is a popular social network where users share messages called tweets. Twitter allows us to mine the data of any user using Twitter API or Tweepy. The data will be twee... |
Getting Familiar With BioJulia: BioInformatics for Julia | by Emmett Boudreau | Towards Data Science | Julia is a great programming language that is typically associated with its strong statistical analysis and machine-learning capabilities. However, many people might know that Julia actually has a fairly mature and established group of packages for other applied sciences. Some notable examples include Yao.jl for quantu... | [
{
"code": null,
"e": 826,
"s": 172,
"text": "Julia is a great programming language that is typically associated with its strong statistical analysis and machine-learning capabilities. However, many people might know that Julia actually has a fairly mature and established group of packages for other ... |
HTML - <menuitem> tag | The HTML <menuitem> tag is used for defining a menu item for a menu.
<!Doctype html>
<html>
<head>
<title>HTML menuitem Tag</title>
</head>
<body>
<div style = "border:1px solid #000; padding:20px;" contextmenu = "clickmenu">
<p>Right click inside here....</p>
<menu type = "c... | [
{
"code": null,
"e": 2443,
"s": 2374,
"text": "The HTML <menuitem> tag is used for defining a menu item for a menu."
},
{
"code": null,
"e": 2852,
"s": 2443,
"text": "<!Doctype html>\n<html>\n\n <head>\n <title>HTML menuitem Tag</title>\n </head>\n\n <body>\n\n <d... |
Add custom borders to matrix in Python - GeeksforGeeks | 05 Apr, 2021
Given a Matrix, the task is to write a python program to print each row having custom borders.
Input : test_list = [[4, 5, 6], [1, 4, 5], [6, 9, 1], [0, 3 ,1]], bord = "|"
Output : | 4 5 6 |
| 1 4 5 |
| 6 9 1 |
| 0 3 1 |
Explanation : Matrix is ended using | border as required.
... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 23996,
"s": 23901,
"text": "Given a Matrix, the task is to write a python program to print each row having custom borders."
},
{
"code": null,
"e": 24419,
"s": 23996,
"tex... |
Last index of One | Practice | GeeksforGeeks | Given a string S consisting only '0's and '1's, find the last index of the '1' present in it.
Example 1:
Input:
S = 00001
Output:
4
Explanation:
Last index of 1 in given string is 4.
Example 2:
Input:
0
Output:
-1
Explanation:
Since, 1 is not present, so output is -1.
Your Task:
You don't need to read inpu... | [
{
"code": null,
"e": 334,
"s": 238,
"text": "Given a string S consisting only '0's and '1's, find the last index of the '1' present in it. "
},
{
"code": null,
"e": 347,
"s": 336,
"text": "Example 1:"
},
{
"code": null,
"e": 427,
"s": 347,
"text": "Input:\nS ... |
How do you round up a float number in Python? | Python has an in-built function round() for this purpose. The function takes two arguments, the number to be rounded and the places upto which it is to be rounded. If the number is to be rounded to nearest integer, the second argument is not given.
>>> round(1.7456)
2
>>> round(1.4756)
1
If however, it is to be rounded... | [
{
"code": null,
"e": 1311,
"s": 1062,
"text": "Python has an in-built function round() for this purpose. The function takes two arguments, the number to be rounded and the places upto which it is to be rounded. If the number is to be rounded to nearest integer, the second argument is not given."
}... |
ES6 - for in loop | The for...in loop is used to loop through an object's properties.
Following is the syntax of ‘for...in’ loop.
for (variablename in object) {
statement or block to execute
}
In each iteration, one property from the object is assigned to the variable name and this loop continues till all the properties of the object ... | [
{
"code": null,
"e": 2343,
"s": 2277,
"text": "The for...in loop is used to loop through an object's properties."
},
{
"code": null,
"e": 2387,
"s": 2343,
"text": "Following is the syntax of ‘for...in’ loop."
},
{
"code": null,
"e": 2454,
"s": 2387,
"text": "f... |
What does double underscore prefix do in Python variables? | In Python, we use double underscore i.e., __ before the attribute's name and those attributes will not be directly accessible/visible outside. Double underscore mangles the attribute's name. However, that variable can still be accessed using some tricky syntax but it's generally not a good idea to do so. Double undersc... | [
{
"code": null,
"e": 1425,
"s": 1062,
"text": "In Python, we use double underscore i.e., __ before the attribute's name and those attributes will not be directly accessible/visible outside. Double underscore mangles the attribute's name. However, that variable can still be accessed using some tricky... |
Sort a String | Practice | GeeksforGeeks | Given a string consisting of lowercase letters, arrange all its letters in ascending order.
Example 1:
Input:
S = "edcab"
Output: "abcde"
Explanation: characters are in ascending
order in "abcde".
Example 2:
Input:
S = "xzy"
Output: "xyz"
Explanation: characters are in ascending
order in "xyz".
Your Task:
You do... | [
{
"code": null,
"e": 331,
"s": 238,
"text": "Given a string consisting of lowercase letters, arrange all its letters in ascending order. "
},
{
"code": null,
"e": 342,
"s": 331,
"text": "Example 1:"
},
{
"code": null,
"e": 437,
"s": 342,
"text": "Input:\nS = \... |
ReactJS Reactstrap Modal Component - GeeksforGeeks | 29 Jul, 2021
Reactstrap is a popular front-end library that is easy to use React Bootstrap 4 components. This library contains the stateless React components for Bootstrap 4. The Modal component provides a solid foundation for creating dialogs, lightboxes, popovers, etc. We can use the following approach in ReactJS to ... | [
{
"code": null,
"e": 27108,
"s": 27080,
"text": "\n29 Jul, 2021"
},
{
"code": null,
"e": 27459,
"s": 27108,
"text": "Reactstrap is a popular front-end library that is easy to use React Bootstrap 4 components. This library contains the stateless React components for Bootstrap 4. T... |
How to Round Numbers in Python? - GeeksforGeeks | 20 Aug, 2020
Rounding a number means making the number simpler by keeping its value intact but closer to the next number. Example: If we want to round off a number, say 3.5. It will be rounded to the nearest whole number which is 4. However, the number 3.74 will be rounded to one decimal place to give 3.7.
Method 1: U... | [
{
"code": null,
"e": 25415,
"s": 25387,
"text": "\n20 Aug, 2020"
},
{
"code": null,
"e": 25711,
"s": 25415,
"text": "Rounding a number means making the number simpler by keeping its value intact but closer to the next number. Example: If we want to round off a number, say 3.5. It... |
Check if a given string is a valid number in C++ | It should be validated if a given string is numeric.
Input − str = "12.5"
Output − true
Input − str = "def"
Output − false
Input − str = "2e5"
Output − true
Input − 10e4.4
Output − false
We have to handle the following cases in the code.
We have to ignore the leading and trailing white spaces.
We have to ignore the lea... | [
{
"code": null,
"e": 1115,
"s": 1062,
"text": "It should be validated if a given string is numeric."
},
{
"code": null,
"e": 1136,
"s": 1115,
"text": "Input − str = \"12.5\""
},
{
"code": null,
"e": 1150,
"s": 1136,
"text": "Output − true"
},
{
"code":... |
Angular PrimeNG Inplace Component - GeeksforGeeks | 24 Sep, 2021
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will know how to use the Inplace component in Angular PrimeNG. We will also learn about... | [
{
"code": null,
"e": 26354,
"s": 26326,
"text": "\n24 Sep, 2021"
},
{
"code": null,
"e": 26762,
"s": 26354,
"text": "Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make resp... |
How to write tidy SQL queries in R | by Keith McNulty | Towards Data Science | Most of us have to interact with databases nowadays, and SQL is by far the most common language used. However, working with SQL in R can be messy. If your queries are complex, you have to code them up as text strings which can be error prone, and suffer from formatting challenges. Also, when you want to build your SQL ... | [
{
"code": null,
"e": 610,
"s": 171,
"text": "Most of us have to interact with databases nowadays, and SQL is by far the most common language used. However, working with SQL in R can be messy. If your queries are complex, you have to code them up as text strings which can be error prone, and suffer f... |
Object detection with neural networks — a simple tutorial using keras | by Johannes Rieke | Towards Data Science | TLDR: A very lightweight tutorial to object detection in images. We will bootstrap simple images and apply increasingly complex neural networks to them. In the end, the algorithm will be able to detect multiple objects of varying shapes and colors (image below). You should have a basic understanding of neural networks ... | [
{
"code": null,
"e": 509,
"s": 172,
"text": "TLDR: A very lightweight tutorial to object detection in images. We will bootstrap simple images and apply increasingly complex neural networks to them. In the end, the algorithm will be able to detect multiple objects of varying shapes and colors (image ... |
Math.Floor() Method in C# | The Math.Floor() method in C# is used to return the largest integral value less than or equal to the specified number.
public static decimal Floor (decimal val);
public static double Floor (double val)
For the first syntax above, the value val is the decimal number, whereas Val in the second syntax is the double number... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "The Math.Floor() method in C# is used to return the largest integral value less than or equal to the specified number."
},
{
"code": null,
"e": 1264,
"s": 1181,
"text": "public static decimal Floor (decimal val);\npublic static doubl... |
Quick ML Concepts: Tensors. Tensorflow, Tensorlab, Deep Tensorized... | by Enoch Kan | Towards Data Science | Tensorflow, Tensorlab, Deep Tensorized Networks, Tensorized LSTMs... it’s no surprise that the word “tensor” is embedded in the names of many machine learning technologies. But what are tensors? And how do they relate to machine learning? In part one of Quick ML Concepts, I aim to provide a short yet concise summary of... | [
{
"code": null,
"e": 511,
"s": 172,
"text": "Tensorflow, Tensorlab, Deep Tensorized Networks, Tensorized LSTMs... it’s no surprise that the word “tensor” is embedded in the names of many machine learning technologies. But what are tensors? And how do they relate to machine learning? In part one of Q... |
How does default virtual behavior differ in C++ and Java ? - GeeksforGeeks | 22 Mar, 2017
Default virtual behavior of methods is opposite in C++ and Java:
In C++, class member methods are non-virtual by default. They can be made virtual by using virtual keyword. For example, Base::show() is non-virtual in following program and program prints “Base::show() called”.
#include<iostream> using name... | [
{
"code": null,
"e": 24306,
"s": 24278,
"text": "\n22 Mar, 2017"
},
{
"code": null,
"e": 24371,
"s": 24306,
"text": "Default virtual behavior of methods is opposite in C++ and Java:"
},
{
"code": null,
"e": 24583,
"s": 24371,
"text": "In C++, class member meth... |
Jacobi Iteration and Spectral Radius | by Ryan Reiff | Towards Data Science | One of the main pillars of Numerical Analysis is the solving of large linear systems of equations. There are a variety of methods that Numerical Analysts implement in order to solve such systems; however, the one we will look at today is Jacobi Iteration.
Problem Statement:
A large linear system can easily be represent... | [
{
"code": null,
"e": 427,
"s": 171,
"text": "One of the main pillars of Numerical Analysis is the solving of large linear systems of equations. There are a variety of methods that Numerical Analysts implement in order to solve such systems; however, the one we will look at today is Jacobi Iteration.... |
Output Iterators in C++ | Here we will see what are the Output iterators in C++. The Output iterators has some
properties. These are like below:
The output iterators are used to modify the value of the containers.
We cannot read data from container using this kind of iterators
This is One-Way and Write only iterator
It can be incremented, but c... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "Here we will see what are the Output iterators in C++. The Output iterators has some\nproperties. These are like below:"
},
{
"code": null,
"e": 1250,
"s": 1181,
"text": "The output iterators are used to modify the value of the conta... |
Dijkstra’s shortest path algorithm using set in STL - GeeksforGeeks | 08 Apr, 2022
Given a graph and a source vertex in graph, find shortest paths from source to all vertices in the given graph.
Input : Source = 0
Output :
Vertex Distance from Source
0 0
1 4
2 12
3 19
4 ... | [
{
"code": null,
"e": 25096,
"s": 25068,
"text": "\n08 Apr, 2022"
},
{
"code": null,
"e": 25208,
"s": 25096,
"text": "Given a graph and a source vertex in graph, find shortest paths from source to all vertices in the given graph."
},
{
"code": null,
"e": 25520,
"s"... |
Swing Examples - Adding vertical scrollbar | Following example showcase how to show a Scroll Pane with a vertical bar always on a Panel in a Java Swing application.
We are using the following APIs.
JScrollPane(Component view) − To create a scrollPane on a component.
JScrollPane(Component view) − To create a scrollPane on a component.
JScrollPane.setVerticalScroll... | [
{
"code": null,
"e": 2159,
"s": 2039,
"text": "Following example showcase how to show a Scroll Pane with a vertical bar always on a Panel in a Java Swing application."
},
{
"code": null,
"e": 2192,
"s": 2159,
"text": "We are using the following APIs."
},
{
"code": null,
... |
Servlets - Cookies Handling | Cookies are text files stored on the client computer and they are kept for various information tracking purpose. Java Servlets transparently supports HTTP cookies.
There are three steps involved in identifying returning users −
Server script sends a set of cookies to the browser. For example name, age, or identificatio... | [
{
"code": null,
"e": 2349,
"s": 2185,
"text": "Cookies are text files stored on the client computer and they are kept for various information tracking purpose. Java Servlets transparently supports HTTP cookies."
},
{
"code": null,
"e": 2413,
"s": 2349,
"text": "There are three st... |
What is a trend in time series? - GeeksforGeeks | 12 Dec, 2021
Time series data is a sequence of data points that measure some variable over ordered period of time. It is the fastest-growing category of databases as it is widely used in a variety of industries to understand and forecast data patterns. So while preparing this time series data for modeling it’s importan... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n12 Dec, 2021"
},
{
"code": null,
"e": 24686,
"s": 24292,
"text": "Time series data is a sequence of data points that measure some variable over ordered period of time. It is the fastest-growing category of databases as it is wide... |
Deploying Smart Contract on Test/Main Network Using Truffle - GeeksforGeeks | 14 Oct, 2020
A Smart Contract is a computer program that directly and automatically controls the transfer of digital assets between the parties under certain conditions. A smart contract works in the same way as a traditional contract while also automatically enforcing the contract. Smart contracts are programs that ex... | [
{
"code": null,
"e": 24456,
"s": 24428,
"text": "\n14 Oct, 2020"
},
{
"code": null,
"e": 24931,
"s": 24456,
"text": "A Smart Contract is a computer program that directly and automatically controls the transfer of digital assets between the parties under certain conditions. A smar... |
5 Explainable Machine Learning Models You Should Understand | Towards Data Science | As we know, Machine Learning is ubiquitous in our day to day lives. From product recommendations on Amazon, targeted advertising, and suggestions of what to watch, to funny Instagram filters.
If something goes wrong with these, it probably won’t ruin your life. Maybe you won’t get that perfect selfie, or maybe companie... | [
{
"code": null,
"e": 364,
"s": 172,
"text": "As we know, Machine Learning is ubiquitous in our day to day lives. From product recommendations on Amazon, targeted advertising, and suggestions of what to watch, to funny Instagram filters."
},
{
"code": null,
"e": 534,
"s": 364,
"te... |
Deploying Static Website to Cloudflare Pages - GeeksforGeeks | 21 Jun, 2021
Cloudflare Pages is a JAMStack hosting service provided by Cloudflare, a company that specializes in Web infrastructure and Security. Cloudflare Pages also referred to as “Pages” is newcomer in JAMStack hosting, but their Infrastructure makes almost as equivalent to their competitors. In this tutorial, we ... | [
{
"code": null,
"e": 26197,
"s": 26169,
"text": "\n21 Jun, 2021"
},
{
"code": null,
"e": 26747,
"s": 26197,
"text": "Cloudflare Pages is a JAMStack hosting service provided by Cloudflare, a company that specializes in Web infrastructure and Security. Cloudflare Pages also referre... |
SQLite - Syntax | SQLite is followed by unique set of rules and guidelines called Syntax. This chapter lists all the basic SQLite Syntax.
The important point to be noted is that SQLite is case insensitive, i.e. the clauses GLOB and glob have the same meaning in SQLite statements.
SQLite comments are extra notes, which you can add in you... | [
{
"code": null,
"e": 2758,
"s": 2638,
"text": "SQLite is followed by unique set of rules and guidelines called Syntax. This chapter lists all the basic SQLite Syntax."
},
{
"code": null,
"e": 2901,
"s": 2758,
"text": "The important point to be noted is that SQLite is case insensi... |
How to Install xlrd in Python on Linux? - GeeksforGeeks | 18 Oct, 2021
In this article, we will learn how to install xlrd in Python on Linux. The xlrd is a library for reading data and formatting information from Excel files in the historical .xls format.
Follow the below steps to install the xlrd package on Linux using pip:
Step 1: Install the latest Python3 in Linux
Step 2:... | [
{
"code": null,
"e": 26251,
"s": 26223,
"text": "\n18 Oct, 2021"
},
{
"code": null,
"e": 26436,
"s": 26251,
"text": "In this article, we will learn how to install xlrd in Python on Linux. The xlrd is a library for reading data and formatting information from Excel files in the hi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.