title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Check if element exists in list in Python - GeeksforGeeks | 08 Aug, 2021
List is an important container in python as if stores elements of all the datatypes as a collection. Knowledge of certain list operations is necessary for day-day programming. This article discusses one of the basic list operations of ways to check the existence of elements in the list.
In Naive method, ... | [
{
"code": null,
"e": 24846,
"s": 24818,
"text": "\n08 Aug, 2021"
},
{
"code": null,
"e": 25136,
"s": 24846,
"text": "List is an important container in python as if stores elements of all the datatypes as a collection. Knowledge of certain list operations is necessary for day-day ... |
How to find the significant correlation in an R data frame? | To find the significant correlation in an R data frame, we would need to find the matrix of p-values for the correlation test. This can be done by using the function rcorr of Hmisc package and read the output as matrix. For example, if we have a data frame called df then the correlation matrix with p-values can be foun... | [
{
"code": null,
"e": 1415,
"s": 1062,
"text": "To find the significant correlation in an R data frame, we would need to find the matrix of p-values for the correlation test. This can be done by using the function rcorr of Hmisc package and read the output as matrix. For example, if we have a data fr... |
Google Guice - Constructor Injection | Injection is a process of injecting dependeny into an object. Constructor injection is quite common. In this process, dependency is injected as argument to the constructor. See the example below.
Create a java class named GuiceTester.
GuiceTester.java
import com.google.inject.AbstractModule;
import com.google.inject.Gu... | [
{
"code": null,
"e": 2298,
"s": 2102,
"text": "Injection is a process of injecting dependeny into an object. Constructor injection is quite common. In this process, dependency is injected as argument to the constructor. See the example below."
},
{
"code": null,
"e": 2337,
"s": 2298,... |
Python List insert() Method | Python list method insert() inserts object obj into list at offset index.
Following is the syntax for insert() method −
list.insert(index, obj)
index − This is the Index where the object obj need to be inserted.
index − This is the Index where the object obj need to be inserted.
obj − This is the Object to be inserted... | [
{
"code": null,
"e": 2318,
"s": 2244,
"text": "Python list method insert() inserts object obj into list at offset index."
},
{
"code": null,
"e": 2364,
"s": 2318,
"text": "Following is the syntax for insert() method −"
},
{
"code": null,
"e": 2389,
"s": 2364,
... |
How To Display All Running Threads In Java ? | 18 Apr, 2022
A thread is basically a stream of instruction executed sequentially. It is used to implement multitasking in a program. A program can have multiple threads. Threads are used to do multiple things at the same time. Threads are basically used to perform complicated tasks in the background without affecting t... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 Apr, 2022"
},
{
"code": null,
"e": 378,
"s": 54,
"text": "A thread is basically a stream of instruction executed sequentially. It is used to implement multitasking in a program. A program can have multiple threads. Threads are used ... |
How to make empty an array using AngularJS ? | 14 Oct, 2020
The task is to make empty an array or delete all elements from the array in AngularJS.
Approach: First example uses the [] notation to reinitialize the array which eventually removes all the elements from the array. Second example sets the length of the array to 0 by using length property, which also empty... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Oct, 2020"
},
{
"code": null,
"e": 115,
"s": 28,
"text": "The task is to make empty an array or delete all elements from the array in AngularJS."
},
{
"code": null,
"e": 347,
"s": 115,
"text": "Approach: First exa... |
Yacc Program to evaluate a given arithmetic expression | 22 Mar, 2021
Prerequisite – Introduction to YACC Problem: Write a YACC program to evaluate a given arithmetic expression consisting of ‘+’, ‘-‘, ‘*’, ‘/’ including brackets.Examples:
Input: 7*(5-3)/2
Output: 7
Input: 6/((3-2)*(-5+2))
Output: -2
Lexical Analyzer Source Code:
C
%{ /* Definition section*/ #incl... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Mar, 2021"
},
{
"code": null,
"e": 224,
"s": 52,
"text": "Prerequisite – Introduction to YACC Problem: Write a YACC program to evaluate a given arithmetic expression consisting of ‘+’, ‘-‘, ‘*’, ‘/’ including brackets.Examples: "
... |
Vector Operations in Pytorch | 22 Apr, 2022
In this article, we are going to discuss vector operations in PyTorch. Vectors are a one-dimensional tensor, which is used to manipulate the data. Vector operations are of different types such as mathematical operation, dot product, and linspace.
PyTorch is an optimized tensor library majorly used for Deep... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Apr, 2022"
},
{
"code": null,
"e": 275,
"s": 28,
"text": "In this article, we are going to discuss vector operations in PyTorch. Vectors are a one-dimensional tensor, which is used to manipulate the data. Vector operations are of dif... |
JQuery | Detect a textbox content is changed or not | 20 May, 2019
In order to detect the text content of input is changed or not, We are using the .on() method of JQuery..on()This is a built-in method provided by jQuery and is used to attach event handlers for the selected elements and their child elements.
Syntax:
$(selector).on(event, childSel, data, fun, map)
paramet... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n20 May, 2019"
},
{
"code": null,
"e": 297,
"s": 54,
"text": "In order to detect the text content of input is changed or not, We are using the .on() method of JQuery..on()This is a built-in method provided by jQuery and is used to attac... |
How to import an excel file into Python using Pandas? | 17 Aug, 2020
It is not always possible to get the dataset in CSV format. So, Pandas provides us the functions to convert datasets in other formats to the Data frame. An excel file has a ‘.xlsx’ format.
Before we get started, we need to install a few libraries.
pip install pandas
pip install xlrd
For importing an E... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Aug, 2020"
},
{
"code": null,
"e": 218,
"s": 28,
"text": "It is not always possible to get the dataset in CSV format. So, Pandas provides us the functions to convert datasets in other formats to the Data frame. An excel file has a ‘.... |
Difference between List and Array in Python | 17 Jul, 2020
List: A list in Python is a collection of items which can contain elements of multiple data types, which may be either numeric, character logical values, etc. It is an ordered collection supporting negative indexing. A list can be created using [] containing data values.Contents of lists can be easily merg... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Jul, 2020"
},
{
"code": null,
"e": 407,
"s": 52,
"text": "List: A list in Python is a collection of items which can contain elements of multiple data types, which may be either numeric, character logical values, etc. It is an ordere... |
Java program to check occurrence of each character in String | In order to find occurence of each character in a string we can use Map utility of Java.In Map a key could not be duplicate so make each character of string as key of Map and provide initial value corresponding to each key as 1 if this character does not inserted in map before.Now when a character repeats during insert... | [
{
"code": null,
"e": 1630,
"s": 1187,
"text": "In order to find occurence of each character in a string we can use Map utility of Java.In Map a key could not be duplicate so make each character of string as key of Map and provide initial value corresponding to each key as 1 if this character does no... |
Setting Up Sublime Text For Competitive Coding in C++14 on Ubuntu | 24 Feb, 2022
Started with coding learned the c++ language and basic ds&algo and want to more dive into it. Well, competitive coding is exactly what you need to give a boost to your coding skills. In this tutorial, we are starting with setting up cp environment so that you can start with your competitive programming jou... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Feb, 2022"
},
{
"code": null,
"e": 365,
"s": 52,
"text": "Started with coding learned the c++ language and basic ds&algo and want to more dive into it. Well, competitive coding is exactly what you need to give a boost to your coding... |
fetchmail - Unix, Linux Command | The
fetchmail program can gather mail from servers supporting any of the common
mail-retrieval protocols: POP2 (legacy, to be removed from future
release), POP3, IMAP2bis, IMAP4, and IMAP4rev1.
It can also use the ESMTP ETRN extension and ODMR. (The RFCs describing all
these protocols are listed at the end of this man... | [
{
"code": null,
"e": 11048,
"s": 10715,
"text": "\nThe\nfetchmail program can gather mail from servers supporting any of the common\nmail-retrieval protocols: POP2 (legacy, to be removed from future\nrelease), POP3, IMAP2bis, IMAP4, and IMAP4rev1.\nIt can also use the ESMTP ETRN extension and ODMR. ... |
The Skyline Problem using Divide and Conquer algorithm | 20 Feb, 2020
Given n rectangular buildings in a 2-dimensional city, computes the skyline of these buildings, eliminating hidden lines. The main task is to view buildings from a side and remove all sections that are not visible.
All buildings share common bottom and every building is represented by triplet (left, ht, ri... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Feb, 2020"
},
{
"code": null,
"e": 267,
"s": 52,
"text": "Given n rectangular buildings in a 2-dimensional city, computes the skyline of these buildings, eliminating hidden lines. The main task is to view buildings from a side and r... |
Modal Bottom Sheet in Android with Examples | 06 Jul, 2020
In this article, we will learn about how to add Modal Bottom Sheet in our app. We have seen this UI component in daily applications like Google Drive, Maps, or Music Player App. The modal Bottom sheet always appears from the bottom of the screen and if the user clicks on the outside content then it is dism... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jul, 2020"
},
{
"code": null,
"e": 412,
"s": 28,
"text": "In this article, we will learn about how to add Modal Bottom Sheet in our app. We have seen this UI component in daily applications like Google Drive, Maps, or Music Player Ap... |
Python – tensorflow.fingerprint() | 10 Jul, 2020
TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks.
fingerprint() is used to generate fingerprint value.
Syntax: tensorflow.fingerprint( data, method, name)
Parameters:
data: It is a Tensor having rank 1 or higher.
method: It d... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 160,
"s": 28,
"text": "TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks. "
},
{
"code": null,
"e": 213,
... |
How to compute cross-correlation of two given NumPy arrays? | 08 Dec, 2020
In the Numpy program, we can compute cross-correlation of two given arrays with the help of correlate(). In this first parameter and second parameter pass the given arrays it will return the cross-correlation of two given arrays.
Syntax : numpy.correlate(a, v, mode = ‘valid’)
Parameters :a, v : [array_like... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Dec, 2020"
},
{
"code": null,
"e": 258,
"s": 28,
"text": "In the Numpy program, we can compute cross-correlation of two given arrays with the help of correlate(). In this first parameter and second parameter pass the given arrays it ... |
PyQt5 – Changing background color of Label when hover | 30 May, 2022
In this article we will see how to change the background color of the label when cursor will hover over it. When cursor will come upon the label it will change color to it and when cursor is not over the label, it goes back to it default color. In order to do this we have to change the style sheet code whi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 May, 2022"
},
{
"code": null,
"e": 459,
"s": 28,
"text": "In this article we will see how to change the background color of the label when cursor will hover over it. When cursor will come upon the label it will change color to it and... |
Can we update MySQL with if condition? | You can update MySQL with IF condition as well as CASE statement. For this purpose, let us first create a table. The query to create a table −
mysql> create table UpdateWithIfCondition
−> (
−> BookId int,
−> BookName varchar(200)
−> );
Query OK, 0 rows affected (0.60 sec)
Now you can insert records in the t... | [
{
"code": null,
"e": 1205,
"s": 1062,
"text": "You can update MySQL with IF condition as well as CASE statement. For this purpose, let us first create a table. The query to create a table −"
},
{
"code": null,
"e": 1347,
"s": 1205,
"text": "mysql> create table UpdateWithIfConditi... |
How to get items from an object array in MongoDB? | To get items from an object array, use aggregate(). Let us create a collection with documents −
> db.demo459.insertOne(
... { "_id" : 1,
... "Information" : [
... {
... "Name" : "Chris",
... "_id" : new ObjectId(),
... "details" : [
... "HR"
... ]
... },
... {
...
... "Name" : ... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "To get items from an object array, use aggregate(). Let us create a collection with documents −"
},
{
"code": null,
"e": 1663,
"s": 1158,
"text": "> db.demo459.insertOne(\n... { \"_id\" : 1,\n... \"Information\" : [\n... {\n... ... |
Get Day from date in Pandas - Python - GeeksforGeeks | 10 Jul, 2020
Let’s discuss how to get the day from the date in Pandas. There can be various ways for doing the same. Let’s go through them with the help of examples for better understanding.
Example 1 : Pandas.dt_range takes input as a range of dates and returns a fixed frequency DatetimeIndex. Series.dt.dayofweek retu... | [
{
"code": null,
"e": 24516,
"s": 24488,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 24694,
"s": 24516,
"text": "Let’s discuss how to get the day from the date in Pandas. There can be various ways for doing the same. Let’s go through them with the help of examples for better ... |
PyQt5 QCalendarWidget - Setting Focus Policy - GeeksforGeeks | 09 Feb, 2022
In this article we will see how we can set the focus policy to the QCalendarWidget. This property holds the way the widget accepts keyboard focus, there are many focus policy available for calendar like no focus, strong focus, wheel focus etc.
In order to do this we will use setFocusPolicy method with the ... | [
{
"code": null,
"e": 23877,
"s": 23849,
"text": "\n09 Feb, 2022"
},
{
"code": null,
"e": 24121,
"s": 23877,
"text": "In this article we will see how we can set the focus policy to the QCalendarWidget. This property holds the way the widget accepts keyboard focus, there are many f... |
The 8 Most Popular Coding Languages of 2021 | by Zulie Rane | Towards Data Science | How can you decide what the most popular coding language is? It’s like trying to pick the most popular ice cream flavor — everyone has a favorite. The truth is that different coders prefer different coding languages for different reasons, and just when you think you can say a single coding language reigns supreme, a ne... | [
{
"code": null,
"e": 563,
"s": 171,
"text": "How can you decide what the most popular coding language is? It’s like trying to pick the most popular ice cream flavor — everyone has a favorite. The truth is that different coders prefer different coding languages for different reasons, and just when yo... |
Java Examples - Create a Socket | How to create a socket at a specific port ?
Following example shows how to sing Socket constructor of Socket class.And also get Socket details using getLocalPort() getLocalAddress , getInetAddress() & getPort() methods.
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.Soc... | [
{
"code": null,
"e": 2112,
"s": 2068,
"text": "How to create a socket at a specific port ?"
},
{
"code": null,
"e": 2288,
"s": 2112,
"text": "Following example shows how to sing Socket constructor of Socket class.And also get Socket details using getLocalPort() getLocalAddress , ... |
Setting up a JDBC connection to remote SAP HANA system | You are using the correct Port number for instance number “00”. Port number 300315, here 00 represents instance number of your HANA system.
Try using HANA client jar file ngdbc.jar instead of SAP Jar file.
try {
Class.forName("com.sap.db.jdbc.Driver");
String url ="jdbc:sap://xx.x.x.xxx:30015/DBNAME"; //IP Addres... | [
{
"code": null,
"e": 1202,
"s": 1062,
"text": "You are using the correct Port number for instance number “00”. Port number 300315, here 00 represents instance number of your HANA system."
},
{
"code": null,
"e": 1268,
"s": 1202,
"text": "Try using HANA client jar file ngdbc.jar i... |
Custom ArrayList in Java - GeeksforGeeks | 20 Sep, 2021
Before proceeding further let us quickly revise the concept of the arrays and ArrayList quickly. So in java, we have seen arrays are linear data structures providing functionality to add elements in a continuous manner in memory address space whereas ArrayList is a class belonging to the Collection framewo... | [
{
"code": null,
"e": 25113,
"s": 25085,
"text": "\n20 Sep, 2021"
},
{
"code": null,
"e": 25760,
"s": 25113,
"text": "Before proceeding further let us quickly revise the concept of the arrays and ArrayList quickly. So in java, we have seen arrays are linear data structures providi... |
Longest increasing subarray | Practice | GeeksforGeeks | Given an array containing n numbers. The problem is to find the length of the longest contiguous subarray such that every element in the subarray is strictly greater than its previous element in the same subarray.
Example 1:
Input:
n = 9
a[] = {5, 6, 3, 5, 7, 8, 9, 1, 2}
Output:
5
Example 2:
Input:
n = 10
a[] = {12... | [
{
"code": null,
"e": 452,
"s": 238,
"text": "Given an array containing n numbers. The problem is to find the length of the longest contiguous subarray such that every element in the subarray is strictly greater than its previous element in the same subarray."
},
{
"code": null,
"e": 465,... |
Check if the two given stacks are same - GeeksforGeeks | 03 Jun, 2021
Given two Stacks, the task is to check if the given stacks are same or not.Two stacks are said to be same if they contains the same elements in the same order.Example:
Approach:
Take a flag variable and set it to true initially, flag = true. This variable will indicate whether the stacks are same or ... | [
{
"code": null,
"e": 24418,
"s": 24390,
"text": "\n03 Jun, 2021"
},
{
"code": null,
"e": 24588,
"s": 24418,
"text": "Given two Stacks, the task is to check if the given stacks are same or not.Two stacks are said to be same if they contains the same elements in the same order.Exam... |
Python program to convert any base to decimal by using int() method - GeeksforGeeks | 13 Jul, 2020
Given a number and its base, the task is to convert the given number into its corresponding decimal number. The base of number can be anything like digits between 0 to 9 and A to Z. Where the value of A is 10, value of B is 11, value of C is 12 and so on.
Examples:
Input : '1011'
base = 2
Output : 11 ... | [
{
"code": null,
"e": 26111,
"s": 26083,
"text": "\n13 Jul, 2020"
},
{
"code": null,
"e": 26368,
"s": 26111,
"text": "Given a number and its base, the task is to convert the given number into its corresponding decimal number. The base of number can be anything like digits between ... |
Converting JSON text to JavaScript Object - GeeksforGeeks | 19 Feb, 2019
Pre-requisite: JavaScript JSONJSON (JavaScript Object Notation) is a lightweight data-interchange format. As its name suggests, JSON is derived from the JavaScript programming language, but it’s available for use by many languages including Python, Ruby, PHP, and Java and hence, it can be said as language-... | [
{
"code": null,
"e": 39347,
"s": 39319,
"text": "\n19 Feb, 2019"
},
{
"code": null,
"e": 39811,
"s": 39347,
"text": "Pre-requisite: JavaScript JSONJSON (JavaScript Object Notation) is a lightweight data-interchange format. As its name suggests, JSON is derived from the JavaScript... |
Amazon Interview | Set 33 - GeeksforGeeks | 17 Jun, 2019
I recently attended a walk-in for Software development Engineer (SDE- 1) at Amazon, Bangalore.
Here is my experience of Amazon interview.
As I was from the same city, there was no phone interview. I have listed down all questions that I remember.
Round 1: Data Structures, Algorithms and coding (1 hour)
Int... | [
{
"code": null,
"e": 25785,
"s": 25757,
"text": "\n17 Jun, 2019"
},
{
"code": null,
"e": 25880,
"s": 25785,
"text": "I recently attended a walk-in for Software development Engineer (SDE- 1) at Amazon, Bangalore."
},
{
"code": null,
"e": 25923,
"s": 25880,
"tex... |
C Program for efficiently print all prime factors of a given number - GeeksforGeeks | 07 Oct, 2021
Given a number n, write an efficient function to print all prime factors of n. For example, if the input number is 12, then output should be “2 2 3”. And if the input number is 315, then output should be “3 3 5 7”. Following are the steps to find all prime factors. 1) While n is divisible by 2, print 2 and... | [
{
"code": null,
"e": 25008,
"s": 24980,
"text": "\n07 Oct, 2021"
},
{
"code": null,
"e": 25620,
"s": 25008,
"text": "Given a number n, write an efficient function to print all prime factors of n. For example, if the input number is 12, then output should be “2 2 3”. And if the in... |
How to represent 3D Data?. A visual guide to help choose data... | by Florent Poux, Ph.D. | Towards Data Science | A visual guide to help choose data representations among 3D point clouds, meshes, parametric models, depth-maps, RGB-D, multi-view images, voxels...
The 3D datasets in our computerized ecosystem — of which an increasing number comes directly from reality capture devices — are found in different forms that vary in both ... | [
{
"code": null,
"e": 321,
"s": 172,
"text": "A visual guide to help choose data representations among 3D point clouds, meshes, parametric models, depth-maps, RGB-D, multi-view images, voxels..."
},
{
"code": null,
"e": 754,
"s": 321,
"text": "The 3D datasets in our computerized e... |
Count Elements x and x+1 Present in List in Python | Suppose we have a list of numbers called nums, we have to find the number of elements x
there are such that x + 1 exists as well.
So, if the input is like [2, 3, 3, 4, 8], then the output will be 3
To solve this, we will follow these steps −
s := make a set by inserting elements present in nums
count := 0
for each i in... | [
{
"code": null,
"e": 1192,
"s": 1062,
"text": "Suppose we have a list of numbers called nums, we have to find the number of elements x\nthere are such that x + 1 exists as well."
},
{
"code": null,
"e": 1260,
"s": 1192,
"text": "So, if the input is like [2, 3, 3, 4, 8], then the ... |
JavaScript | Type Conversion - GeeksforGeeks | 13 Jul, 2018
JavaScript is loosely typed language and most of the time operators automatically convert a value to the right type but there are also cases when we need to explicitly do type conversions.While JavaScript provides numerous ways to convert data from one type to another but there are two most common data con... | [
{
"code": null,
"e": 29692,
"s": 29664,
"text": "\n13 Jul, 2018"
},
{
"code": null,
"e": 30010,
"s": 29692,
"text": "JavaScript is loosely typed language and most of the time operators automatically convert a value to the right type but there are also cases when we need to explic... |
HTML <optgroup> Tag - GeeksforGeeks | 17 Mar, 2022
This tag is used to create a group of the same category options in a drop-down list. The <optgroup> tag is required when there is a long list of the item exists.Syntax:
<optgroup>
<option>..</option>
.
.
</optgroup>
Attributes:
label: It is used to specify the label for an optgroup.
d... | [
{
"code": null,
"e": 23149,
"s": 23121,
"text": "\n17 Mar, 2022"
},
{
"code": null,
"e": 23318,
"s": 23149,
"text": "This tag is used to create a group of the same category options in a drop-down list. The <optgroup> tag is required when there is a long list of the item exists.Sy... |
How to reset or clear a form using JavaScript? | Reset or clear a form using JavaScript, with the reset() method. The reset method sets the values of all elements in a form like clicking the reset button.
You can try to run the following code to reset a form using JavaScript −
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Reset HTML form</title>
</head>... | [
{
"code": null,
"e": 1219,
"s": 1062,
"text": "Reset or clear a form using JavaScript, with the reset() method. The reset method sets the values of all elements in a form like clicking the reset button. "
},
{
"code": null,
"e": 1292,
"s": 1219,
"text": "You can try to run the fo... |
Kafka, for your data pipeline? Why not? | by Tuan Nguyen | Towards Data Science | Kafka was developed and open-sourced by LinkedIn in 2011, and it has since quickly evolved from messaging queue to a full-fledged streaming platform with an exuberant ecosystem. Many tech companies, besides LinkedIn such as Airbnb, Spotify, or Twitter, use Kafka for their mission-critical applications.
Kafka can be use... | [
{
"code": null,
"e": 476,
"s": 172,
"text": "Kafka was developed and open-sourced by LinkedIn in 2011, and it has since quickly evolved from messaging queue to a full-fledged streaming platform with an exuberant ecosystem. Many tech companies, besides LinkedIn such as Airbnb, Spotify, or Twitter, us... |
YAML - Syntax Primitives | In this chapter you will learn about the following aspects of syntax primitives in YAML −
Production parameters
Indentation Spaces
Separation Spaces
Ignored Line Prefix
Line folding
Let us understand each aspect in detail.
Production parameters include a set of parameters and the range of allowed values which are used ... | [
{
"code": null,
"e": 2138,
"s": 2048,
"text": "In this chapter you will learn about the following aspects of syntax primitives in YAML −"
},
{
"code": null,
"e": 2160,
"s": 2138,
"text": "Production parameters"
},
{
"code": null,
"e": 2179,
"s": 2160,
"text": ... |
Angular 4 - Quick Guide | There are three major releases of Angular. The first version that was released is Angular1, which is also called AngularJS. Angular1 was followed by Angular2, which came in with a lot of changes when compared to Angular1.
The structure of Angular is based on the components/services architecture. AngularJS was based on ... | [
{
"code": null,
"e": 2214,
"s": 1992,
"text": "There are three major releases of Angular. The first version that was released is Angular1, which is also called AngularJS. Angular1 was followed by Angular2, which came in with a lot of changes when compared to Angular1."
},
{
"code": null,
... |
What is Obfuscation? - GeeksforGeeks | 30 Jun, 2020
Obfuscation is a well-known term in software engineering. It is the concealment of written code purposefully by the programmer. It is mainly done for the purposes of security by making it obscure to avoid tampering, hide implicit values or conceal the logic used. One can obfuscate code with the help of lan... | [
{
"code": null,
"e": 24557,
"s": 24529,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 24928,
"s": 24557,
"text": "Obfuscation is a well-known term in software engineering. It is the concealment of written code purposefully by the programmer. It is mainly done for the purposes ... |
Word Embedding using Universal Sentence Encoder in Python - GeeksforGeeks | 26 Mar, 2021
Unlike the word embedding techniques in which you represent word into vectors, in Sentence Embeddings entire sentence or text along with its semantics information is mapped into vectors of real numbers. This technique makes it possible to understand and process useful information of an entire text, which c... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n26 Mar, 2021"
},
{
"code": null,
"e": 24297,
"s": 23901,
"text": "Unlike the word embedding techniques in which you represent word into vectors, in Sentence Embeddings entire sentence or text along with its semantics information ... |
OpenMP | Hello World program - GeeksforGeeks | 29 Jun, 2021
Prerequisite: OpenMP | Introduction with Installation GuideIn C/C++/Fortran, parallel programming can be achieved using OpenMP. In this article, we will learn how to create a parallel Hello World Program using OpenMP.STEPS TO CREATE A PARALLEL PROGRAM
Include the header file: We have to include the OpenM... | [
{
"code": null,
"e": 24554,
"s": 24526,
"text": "\n29 Jun, 2021"
},
{
"code": null,
"e": 24808,
"s": 24554,
"text": "Prerequisite: OpenMP | Introduction with Installation GuideIn C/C++/Fortran, parallel programming can be achieved using OpenMP. In this article, we will learn how ... |
CSS | cubic-bezier() Function - GeeksforGeeks | 04 Jan, 2022
The cubic-bezier() function is an inbuilt function in CSS which is used to defines a Cubic Bezier curve. A Bezier curve is a mathematically defined curve used in two-dimensional graphic applications like adobe illustrator, inkscape etc. The curve is defined by four points: the initial position and the term... | [
{
"code": null,
"e": 22519,
"s": 22491,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 23078,
"s": 22519,
"text": "The cubic-bezier() function is an inbuilt function in CSS which is used to defines a Cubic Bezier curve. A Bezier curve is a mathematically defined curve used in t... |
Java labelled for loop | Following program is using labeled for loops.
Live Demo
public class Tester {
public static void main(String args[]) {
first:
for (int i = 0; i < 3; i++) {
for (int j = 0; j< 3; j++){
if(i == 1){
continue first;
}
S... | [
{
"code": null,
"e": 1108,
"s": 1062,
"text": "Following program is using labeled for loops."
},
{
"code": null,
"e": 1118,
"s": 1108,
"text": "Live Demo"
},
{
"code": null,
"e": 1770,
"s": 1118,
"text": "public class Tester {\n public static void main(Strin... |
Git Help | If you are having trouble remembering commands or options for commands, you
can use Git help.
There are a couple of different ways you can use the
help command in command line:
git command -help - See
all the available options for the specific command
git help --all - See all possible
commands
Let's go over t... | [
{
"code": null,
"e": 95,
"s": 0,
"text": "If you are having trouble remembering commands or options for commands, you \ncan use Git help."
},
{
"code": null,
"e": 178,
"s": 95,
"text": "There are a couple of different ways you can use the\nhelp command in command line:"
},
{
... |
Mid-Point Line Generation Algorithm in C++ | A line connects two points. It is a basic element in graphics. To draw a line, you need two points between which you can draw a line on a screen and in terms of graphics we refer to the points as pixels and every pixel is associated with integer coordinates. We are given integer coordinates in the form of (x1, y1) and ... | [
{
"code": null,
"e": 1565,
"s": 1062,
"text": "A line connects two points. It is a basic element in graphics. To draw a line, you need two points between which you can draw a line on a screen and in terms of graphics we refer to the points as pixels and every pixel is associated with integer coordin... |
Python & Pandas in Node.js Application | by Joe T. Santhanavanich | Towards Data Science | In Data Sciences, we all know that Python is one of the best tools to handle data management, analytics, visualization, ML, and many more. In the same way, Node.js is the JavaScript runtime environment for server-side which is one of the most popular tools for web architecture according to its economically beneficial, ... | [
{
"code": null,
"e": 637,
"s": 172,
"text": "In Data Sciences, we all know that Python is one of the best tools to handle data management, analytics, visualization, ML, and many more. In the same way, Node.js is the JavaScript runtime environment for server-side which is one of the most popular tool... |
Return multiple columns using Pandas apply() method - GeeksforGeeks | 05 Sep, 2020
Objects passed to the pandas.apply() are Series objects whose index is either the DataFrame’s index (axis=0) or the DataFrame’s columns (axis=1). By default (result_type=None), the final return type is inferred from the return type of the applied function. Otherwise, it depends on the result_type argument.... | [
{
"code": null,
"e": 25114,
"s": 25086,
"text": "\n05 Sep, 2020"
},
{
"code": null,
"e": 25422,
"s": 25114,
"text": "Objects passed to the pandas.apply() are Series objects whose index is either the DataFrame’s index (axis=0) or the DataFrame’s columns (axis=1). By default (resul... |
GATE | GATE CS 2011 | Question 32 - GeeksforGeeks | 28 Jun, 2021
Consider a database table T containing two columns X and Y each of type integer. After the creation of the table, one record (X=1, Y=1) is inserted in the table.
Let MX and My denote the respective maximum values of X and Y among all records in the table at any point in time. Using MX and MY, new records a... | [
{
"code": null,
"e": 24490,
"s": 24462,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24652,
"s": 24490,
"text": "Consider a database table T containing two columns X and Y each of type integer. After the creation of the table, one record (X=1, Y=1) is inserted in the table."
... |
How to Implement a Linked List in Python | Towards Data Science | Linked Lists are among the most fundamental data structure that represents a sequence of nodes. The first element of the sequence is called the head of the Linked List while the last element corresponds to the tail.
Every node in the sequence has a pointer to the next element and optionally a pointer to the previous el... | [
{
"code": null,
"e": 388,
"s": 172,
"text": "Linked Lists are among the most fundamental data structure that represents a sequence of nodes. The first element of the sequence is called the head of the Linked List while the last element corresponds to the tail."
},
{
"code": null,
"e": 56... |
How to Sort a String in Java alphabetically in Java? | The toCharArray() method of this class converts the String to a character array and returns it. To sort a string value alphabetically −
Get the required string.
Get the required string.
Convert the given string to a character array using the toCharArray() method.
Convert the given string to a character array using the ... | [
{
"code": null,
"e": 1198,
"s": 1062,
"text": "The toCharArray() method of this class converts the String to a character array and returns it. To sort a string value alphabetically −"
},
{
"code": null,
"e": 1223,
"s": 1198,
"text": "Get the required string."
},
{
"code":... |
Queue Operations | Practice | GeeksforGeeks | Here, we will learn operations on queues.
Given N integers, the task is to insert those elements in the queue. Also, given M integers, task is to find the frequency of each number in the Queue.
Example:
Input:
8
1 2 3 4 5 2 3 1
5
1 3 2 9 10
Output:
2
2
2
-1
-1
Explanation:
After inserting 1, 2, 3, 4, 5, 2, 3, 1 into ... | [
{
"code": null,
"e": 268,
"s": 226,
"text": "Here, we will learn operations on queues."
},
{
"code": null,
"e": 420,
"s": 268,
"text": "Given N integers, the task is to insert those elements in the queue. Also, given M integers, task is to find the frequency of each number in the... |
Pythagorean Triplet | Practice | GeeksforGeeks | Given an array arr of N integers, write a function that returns true if there is a triplet (a, b, c) that satisfies a2 + b2 = c2, otherwise false.
Example 1:
Input:
N = 5
Arr[] = {3, 2, 4, 6, 5}
Output: Yes
Explanation: a=3, b=4, and c=5 forms a
pythagorean triplet.
Example 2:
Input:
N = 3
Arr[] = {3, 8, 5}
Output: No... | [
{
"code": null,
"e": 385,
"s": 238,
"text": "Given an array arr of N integers, write a function that returns true if there is a triplet (a, b, c) that satisfies a2 + b2 = c2, otherwise false."
},
{
"code": null,
"e": 396,
"s": 385,
"text": "Example 1:"
},
{
"code": null,
... |
MySQL IF() to display custom YES or NO messages | Let us first create a table −
mysql> create table DemoTable1850
(
OrderStatus varchar(20)
);
Query OK, 0 rows affected (0.00 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1850 values('Yes');
Query OK, 1 row affected (0.00 sec)
mysql> insert into DemoTable1850 va... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1207,
"s": 1092,
"text": "mysql> create table DemoTable1850\n (\n OrderStatus varchar(20)\n );\nQuery OK, 0 rows affected (0.00 sec)"
},
{
"code": null,
"... |
Removing item from array in MongoDB? | To remove item from array, use $pull in MongoDB. Let us create a collection with documents −
> db.demo224.insertOne({"ListOfTechnology":["Spring","Hibernate","Java"]});
{
"acknowledged" : true,
"insertedId" : ObjectId("5e3ee6d103d395bdc2134733")
}
> db.demo224.insertOne({"ListOfTechnology":["Groovy"]});
{
"ack... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "To remove item from array, use $pull in MongoDB. Let us create a collection with documents −"
},
{
"code": null,
"e": 1458,
"s": 1155,
"text": "> db.demo224.insertOne({\"ListOfTechnology\":[\"Spring\",\"Hibernate\",\"Java\"]});\n{\n ... |
Get an element from a Stack in Java without removing it | The method java.util.Stack.peek() can be used to get an element from a Stack in Java without removing it. This method requires no parameters and it returns the element at the top of the stack. If the stack is empty, then the EmptyStackException is thrown.
A program that demonstrates this is given as follows −
Live Dem... | [
{
"code": null,
"e": 1318,
"s": 1062,
"text": "The method java.util.Stack.peek() can be used to get an element from a Stack in Java without removing it. This method requires no parameters and it returns the element at the top of the stack. If the stack is empty, then the EmptyStackException is throw... |
Check if two trees are Mirror - GeeksforGeeks | 30 Aug, 2021
Given two Binary Trees, write a function that returns true if two trees are mirror of each other, else false. For example, the function should return true for following input trees.
This problem is different from the problem discussed here.For two trees ‘a’ and ‘b’ to be mirror images, the following thr... | [
{
"code": null,
"e": 24974,
"s": 24946,
"text": "\n30 Aug, 2021"
},
{
"code": null,
"e": 25157,
"s": 24974,
"text": "Given two Binary Trees, write a function that returns true if two trees are mirror of each other, else false. For example, the function should return true for foll... |
MapReduce - Installation | MapReduce works only on Linux flavored operating systems and it comes inbuilt with a Hadoop Framework. We need to perform the following steps in order to install Hadoop framework.
Java must be installed on your system before installing Hadoop. Use the following command to check whether you have Java installed on your s... | [
{
"code": null,
"e": 1970,
"s": 1790,
"text": "MapReduce works only on Linux flavored operating systems and it comes inbuilt with a Hadoop Framework. We need to perform the following steps in order to install Hadoop framework."
},
{
"code": null,
"e": 2117,
"s": 1970,
"text": "Ja... |
How to convert LowerCase values to UpperCase in Input Field using ReactJS ? - GeeksforGeeks | 19 Sep, 2021
Sometimes we see that even we type in lowercase in form fields but they automatically become uppercase. Today we will achieve that functionality in this article.
Given an input textarea and the task is to transform the lowercase characters into uppercase characters while taking input from user. It can be d... | [
{
"code": null,
"e": 24435,
"s": 24407,
"text": "\n19 Sep, 2021"
},
{
"code": null,
"e": 24597,
"s": 24435,
"text": "Sometimes we see that even we type in lowercase in form fields but they automatically become uppercase. Today we will achieve that functionality in this article."
... |
MFC - Property Sheets | A property sheet, also known as a tab dialog box, is a dialog box that contains property pages. Each property page is based on a dialog template resource and contains controls. It is enclosed on a page with a tab on top. The tab names the page and indicates its purpose. Users click a tab in the property sheet to select... | [
{
"code": null,
"e": 2407,
"s": 2067,
"text": "A property sheet, also known as a tab dialog box, is a dialog box that contains property pages. Each property page is based on a dialog template resource and contains controls. It is enclosed on a page with a tab on top. The tab names the page and indic... |
Program to validate a user using JSP - GeeksforGeeks | 12 Jun, 2018
Introduction to JSP : JSP(Java Server Page) is a server-side technology, used for developing webpages that support dynamic content. It enables the separation of dynamic and static content, thereby reducing development complexity. Developers are thus, armed with the power to insert java code in HTML pages b... | [
{
"code": null,
"e": 24089,
"s": 24061,
"text": "\n12 Jun, 2018"
},
{
"code": null,
"e": 24584,
"s": 24089,
"text": "Introduction to JSP : JSP(Java Server Page) is a server-side technology, used for developing webpages that support dynamic content. It enables the separation of dy... |
Pointer Arithmetic in C/C++ | Pointer arithmetic is used to implement arithmetic operations like addition subtraction, increment etc. in C language. There are four pointer arithmetic such as addition, subtraction, increment and decrement. In 32-bit machine, it increments or decrement the value by 2 and it will add or subtract 2* number. In 64-bit m... | [
{
"code": null,
"e": 1471,
"s": 1062,
"text": "Pointer arithmetic is used to implement arithmetic operations like addition subtraction, increment etc. in C language. There are four pointer arithmetic such as addition, subtraction, increment and decrement. In 32-bit machine, it increments or decremen... |
Preprocessing Large Datasets: Online Retail Data with 500k+ Instances | by Dina Jankovic | Towards Data Science | Few months ago I had the opportunity to work on a project with a huge data set with over 500 000 rows! To be honest, it was the very first time I had to handle an insane amount of data, but I thought it would be fun to play with it and explore new data mining techniques. In this post, I am going to explain how I handle... | [
{
"code": null,
"e": 602,
"s": 172,
"text": "Few months ago I had the opportunity to work on a project with a huge data set with over 500 000 rows! To be honest, it was the very first time I had to handle an insane amount of data, but I thought it would be fun to play with it and explore new data mi... |
Count of palindromic strings of size upto N consisting of first K alphabets occurring at most twice - GeeksforGeeks | 26 Aug, 2021
Given two integers N and K, the task is to find the number of palindromic strings of size at most N consisting of the first K lowercase alphabets such that each character in a string doesn’t appear more than twice.
Examples:
Input: N = 3, K = 2Output: 6Explanation:The possible strings are:“a”, “b”, “aa”, “... | [
{
"code": null,
"e": 25452,
"s": 25424,
"text": "\n26 Aug, 2021"
},
{
"code": null,
"e": 25667,
"s": 25452,
"text": "Given two integers N and K, the task is to find the number of palindromic strings of size at most N consisting of the first K lowercase alphabets such that each ch... |
Kali Linux - Maintaining Access | In this chapter, we will see the tools that Kali uses to maintain connection and for access to a hacked machine even when it connects and disconnects again.
This is a tool that is for Windows machines. It has PowerShell installed in victims machine. This tool helps the hacker to connect with the victim’s machine via Po... | [
{
"code": null,
"e": 2186,
"s": 2029,
"text": "In this chapter, we will see the tools that Kali uses to maintain connection and for access to a hacked machine even when it connects and disconnects again."
},
{
"code": null,
"e": 2359,
"s": 2186,
"text": "This is a tool that is fo... |
What are undeclared and undefined variables in JavaScript? - GeeksforGeeks | 26 Nov, 2019
Undefined: It occurs when a variable has been declared but has not been assigned with any value. Undefined is not a keyword.
Undeclared: It occurs when we try to access any variable that is not initialized or declared earlier using var or const keyword. If we use ‘typeof’ operator to get the value of an un... | [
{
"code": null,
"e": 25180,
"s": 25152,
"text": "\n26 Nov, 2019"
},
{
"code": null,
"e": 25305,
"s": 25180,
"text": "Undefined: It occurs when a variable has been declared but has not been assigned with any value. Undefined is not a keyword."
},
{
"code": null,
"e": 2... |
C# Program to Find the Index of Even Numbers using LINQ - GeeksforGeeks | 28 Nov, 2021
Given an array, now our task is to find the index value of the even numbers present in the given array using LINQ. LINQ is known as Language Integrated Query and was introduced in .NET 3.5. It gives the power to .NET languages to generate queries to retrieve data from the data source. So to do this task we... | [
{
"code": null,
"e": 24302,
"s": 24274,
"text": "\n28 Nov, 2021"
},
{
"code": null,
"e": 24656,
"s": 24302,
"text": "Given an array, now our task is to find the index value of the even numbers present in the given array using LINQ. LINQ is known as Language Integrated Query and w... |
Find all distinct subsets of a given set in C++ | Here we will see how to display all distinct subsets of a given set. So if the set is {1, 2, 3}, then the subsets will be {}, {1}, {2}, {3}, {1, 2}, {2, 3}, {1, 3}, {1, 2, 3}. The set of all subsets is called power set. The power set has 2n elements.
We will loop through 0 to 2n (excluding), in each iteration we will c... | [
{
"code": null,
"e": 1313,
"s": 1062,
"text": "Here we will see how to display all distinct subsets of a given set. So if the set is {1, 2, 3}, then the subsets will be {}, {1}, {2}, {3}, {1, 2}, {2, 3}, {1, 3}, {1, 2, 3}. The set of all subsets is called power set. The power set has 2n elements."
... |
Java Program to check if the String contains only certain characters | The following is our string.
String str = "pqrst";
In the above string, we want to search for the following set of characters.
// set of characters to be searched
char[] chSearch = {'p', 'q', r'};
For this, loop through the length of the string and check every character in the string “str”. If the matching character fr... | [
{
"code": null,
"e": 1091,
"s": 1062,
"text": "The following is our string."
},
{
"code": null,
"e": 1113,
"s": 1091,
"text": "String str = \"pqrst\";"
},
{
"code": null,
"e": 1189,
"s": 1113,
"text": "In the above string, we want to search for the following s... |
Symfony - Installation | This chapter explains how to install Symfony framework on your machine. Symfony framework installation is very simple and easy. You have two methods to create applications in Symfony framework. First method is using Symfony Installer, an application to create a project in Symfony framework. Second method is composer-ba... | [
{
"code": null,
"e": 2626,
"s": 2203,
"text": "This chapter explains how to install Symfony framework on your machine. Symfony framework installation is very simple and easy. You have two methods to create applications in Symfony framework. First method is using Symfony Installer, an application to ... |
Delete array elements which are smaller than next or become smaller - GeeksforGeeks | CoursesFor Working ProfessionalsLIVEDSA Live ClassesSystem DesignJava Backend DevelopmentFull Stack LIVEExplore MoreSelf-PacedDSA- Self PacedSDE TheoryMust-Do Coding QuestionsExplore MoreFor StudentsLIVECompetitive ProgrammingData Structures with C++Data ScienceExplore MoreSelf-PacedDSA- Self PacedCIPJAVA / Python / C+... | [
{
"code": null,
"e": 419,
"s": 0,
"text": "CoursesFor Working ProfessionalsLIVEDSA Live ClassesSystem DesignJava Backend DevelopmentFull Stack LIVEExplore MoreSelf-PacedDSA- Self PacedSDE TheoryMust-Do Coding QuestionsExplore MoreFor StudentsLIVECompetitive ProgrammingData Structures with C++Data Sc... |
Custom Attributes in C# - GeeksforGeeks | 24 Jun, 2019
Attributes are metadata extensions that give additional information to the compiler about the elements in the program code at runtime. Attributes are used to impose conditions or to increase the efficiency of a piece of code. There are built-in attributes present in C# but programmers may create their own ... | [
{
"code": null,
"e": 24222,
"s": 24194,
"text": "\n24 Jun, 2019"
},
{
"code": null,
"e": 24686,
"s": 24222,
"text": "Attributes are metadata extensions that give additional information to the compiler about the elements in the program code at runtime. Attributes are used to impos... |
What are bind variables? How to execute a query with bind variables using JDBC? | A bind variable is an SQL statement with a temporary variable as place holders which are later replaced with appropriate values. For example, if you have a table named employee in the database created as shown below:
+---------+--------+----------------+
| Name | Salary | Location |
+---------+--------+-------... | [
{
"code": null,
"e": 1279,
"s": 1062,
"text": "A bind variable is an SQL statement with a temporary variable as place holders which are later replaced with appropriate values. For example, if you have a table named employee in the database created as shown below:"
},
{
"code": null,
"e":... |
HTML | <body> vlink Attribute - GeeksforGeeks | 23 Mar, 2022
The HTML <body> vlink Attribute is used to specify a color of a visited link in a Document.
Note : The HTML <body> vlink attribute is not supported by HTML5. Instead of using this attribute we can use CSS :visited pseudo-class selector.
Syntax:
<body vlink="color_name | hex_number | rgb_number">
Attribute ... | [
{
"code": null,
"e": 24263,
"s": 24235,
"text": "\n23 Mar, 2022"
},
{
"code": null,
"e": 24355,
"s": 24263,
"text": "The HTML <body> vlink Attribute is used to specify a color of a visited link in a Document."
},
{
"code": null,
"e": 24500,
"s": 24355,
"text":... |
Number of times a string appears in another JavaScript | We are required to write a JavaScript function that takes in two strings and returns the count of the number of times the str1 appears in the str2.
The code for this will be −
const main = 'This is the is main is string';
const sub = 'is';
const countAppearances = (main, sub) => {
const regex = new RegExp(sub, "g");... | [
{
"code": null,
"e": 1210,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in two strings and returns the count of the number of times the str1 appears in the str2."
},
{
"code": null,
"e": 1238,
"s": 1210,
"text": "The code for this will be −"
},
... |
Find the largest three distinct elements in an array - GeeksforGeeks | 06 Sep, 2021
Given an array with all distinct elements, find the largest three elements. Expected time complexity is O(n) and extra space is O(1). Examples :
Input: arr[] = {10, 4, 3, 50, 23, 90}
Output: 90, 50, 23
Method 1 – Below is algorithm:
1) Initialize the largest three elements as minus infinite.
first = se... | [
{
"code": null,
"e": 24864,
"s": 24836,
"text": "\n06 Sep, 2021"
},
{
"code": null,
"e": 25009,
"s": 24864,
"text": "Given an array with all distinct elements, find the largest three elements. Expected time complexity is O(n) and extra space is O(1). Examples :"
},
{
"cod... |
How to Setup Julia Path to Environment Variable? | 27 Feb, 2020
Environment variables basically define the behavior of the environment. They can affect the processes ongoing or the programs that are executed in the environment. The region from which this variable can be accessed or over which it is defined is termed as the scope of the variable.
In Julia, setting up th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Feb, 2020"
},
{
"code": null,
"e": 312,
"s": 28,
"text": "Environment variables basically define the behavior of the environment. They can affect the processes ongoing or the programs that are executed in the environment. The region ... |
Tips to reduce Python object size | 24 Apr, 2020
We all know a very common drawback of Python when compared to programming languages such as C or C++. It is significantly slower and isn’t quite suitable to perform memory-intensive tasks as Python objects consume a lot of memory. This can result in memory problems when dealing with certain tasks. When the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Apr, 2020"
},
{
"code": null,
"e": 469,
"s": 28,
"text": "We all know a very common drawback of Python when compared to programming languages such as C or C++. It is significantly slower and isn’t quite suitable to perform memory-int... |
How to sort inner array in MongoDB? | You can achieve this with the help of aggregate framework in MongoDB. To understand it, let us create a collection with document. The query to create a collection with document is as follows:
> db.sortInnerArrayDemo.insertOne(
...
... {
... "EmployeeDetails":
... {
... "EmployeeAddress":
... ... | [
{
"code": null,
"e": 1379,
"s": 1187,
"text": "You can achieve this with the help of aggregate framework in MongoDB. To understand it, let us create a collection with document. The query to create a collection with document is as follows:"
},
{
"code": null,
"e": 2174,
"s": 1379,
... |
PHP end() Function | 30 Nov, 2021
In this article, we will see how to get the last element in an array using the end() function in PHP, along with understanding their implementation through the examples.
The end() function is an inbuilt function in PHP and is used to find the last element of the given array. The end() function changes the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Nov, 2021"
},
{
"code": null,
"e": 198,
"s": 28,
"text": "In this article, we will see how to get the last element in an array using the end() function in PHP, along with understanding their implementation through the examples."
},... |
Express.js router.route() Function | 09 Jul, 2020
The router.route() function returns an instance of a single route that you can then use to handle HTTP verbs with optional middleware. You can also use the router.route() function to avoid duplicate route naming as well as typing errors.
Syntax:
router.route( path )
Parameter: The path parameter holds the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Jul, 2020"
},
{
"code": null,
"e": 266,
"s": 28,
"text": "The router.route() function returns an instance of a single route that you can then use to handle HTTP verbs with optional middleware. You can also use the router.route() func... |
How to remove space in a string in MATLAB? | 05 Aug, 2021
In this article, we are going to discuss how to remove space from a string in MATLAB with the help of isspace(), find(), strrep(), and regexprep() functions.
The isspace() function is used to identify elements that are ASCII white spaces. isspace(‘string’) is used to find the white spaces present in the sp... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 186,
"s": 28,
"text": "In this article, we are going to discuss how to remove space from a string in MATLAB with the help of isspace(), find(), strrep(), and regexprep() functions."
},
{
"co... |
How to count number of instances of a class in Python? | 29 Dec, 2020
Instances of a class mean the objects created for a particular class. A single class can have multiple objects of it. Here, we will find the count of the number of instances of a class in Python.
Approach:
Whenever an object is created, the constructor of that particular class is called.
Constructor is a f... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 224,
"s": 28,
"text": "Instances of a class mean the objects created for a particular class. A single class can have multiple objects of it. Here, we will find the count of the number of instances o... |
BigDecimal intValue() Method in Java | 04 Dec, 2018
The java.math.BigDecimal.intValue() is an in-built function which converts this BigDecimal to an integer value. This function discards any fractional part of this BigDecimal. If the result of the conversion is too big to be represented as an integer value, the function returns only the lower-order 32 bits.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Dec, 2018"
},
{
"code": null,
"e": 336,
"s": 28,
"text": "The java.math.BigDecimal.intValue() is an in-built function which converts this BigDecimal to an integer value. This function discards any fractional part of this BigDecimal. ... |
Function to copy string (Iterative and Recursive) | 20 Jun, 2022
Given two strings, copy one string to other using recursion. We basically need to write our own recursive version of strcpy in C/C++
Examples:
Input : s1 = "hello"
s2 = "geeksforgeeks"
Output : s2 = "hello"
Input : s1 = "geeksforgeeks"
s2 = ""
Output : s2 = "geeksforgeeks"
Iterative : C... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 186,
"s": 53,
"text": "Given two strings, copy one string to other using recursion. We basically need to write our own recursive version of strcpy in C/C++"
},
{
"code": null,
"e": 197,... |
NO Quality Assurance (noqa) in Python | 17 Dec, 2020
Well if you are someone who has just started with Python then you would most likely be not aware of this feature. Even if you are an experienced programmer then you might not be aware of this nifty little feature. This is going to be a short and simple but very useful article. So, what exactly is noqa. NOQ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Dec, 2020"
},
{
"code": null,
"e": 371,
"s": 28,
"text": "Well if you are someone who has just started with Python then you would most likely be not aware of this feature. Even if you are an experienced programmer then you might not ... |
How to run a method every 10 seconds in Android? | This example demonstrates how do I run a method every 10 seconds in android.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<LinearLay... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "This example demonstrates how do I run a method every 10 seconds in android."
},
{
"code": null,
"e": 1268,
"s": 1139,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details t... |
Machine Learning Web App with Python | Towards Data Science | Deep Learning is a great model for handling unstructured data, especially on images. The progress of this field is really fast, and one of the progress is something called Transfer Learning.
Transfer Learning is a method to train the neural network that has already trained on a different dataset, so we don’t have to tr... | [
{
"code": null,
"e": 363,
"s": 172,
"text": "Deep Learning is a great model for handling unstructured data, especially on images. The progress of this field is really fast, and one of the progress is something called Transfer Learning."
},
{
"code": null,
"e": 571,
"s": 363,
"tex... |
What is the difference between System.out.println() and System.out.print() in Java? | The println() terminates the current line by writing the line separator string. The print() method just prints the given content.
Live Demo
public class Sample {
public static void main(String args[]) {
System.out.println("Hello");
System.out.println("how are you");
System.out.print("Hello");
... | [
{
"code": null,
"e": 1192,
"s": 1062,
"text": "The println() terminates the current line by writing the line separator string. The print() method just prints the given content."
},
{
"code": null,
"e": 1202,
"s": 1192,
"text": "Live Demo"
},
{
"code": null,
"e": 1423,... |
How to add integer values to a C# list? | To add integer values to a list in C#, use the Add() method.
Firstly, declare an integer list in C# −
List<int> list1 = new List<int>();
Now add integer values −
list1.Add(900);
list1.Add(400);
list1.Add(300);
Let us see the complete code −
using System;
using System.Collections.Generic;
using System.Linq;
using System... | [
{
"code": null,
"e": 1123,
"s": 1062,
"text": "To add integer values to a list in C#, use the Add() method."
},
{
"code": null,
"e": 1164,
"s": 1123,
"text": "Firstly, declare an integer list in C# −"
},
{
"code": null,
"e": 1199,
"s": 1164,
"text": "List<int>... |
The Simplest Neural Network: Understanding the non-linearity | by Tushar Seth | Towards Data Science | The first neural network you want to build using squaring of numbers. Yes it’s not XOR or MNIST
Every time you want to learn about NNs or data science or AI, you search through google, you go through Reddit, get some GitHub codes. There is MNIST dataset, GANs, convolution layers, everywhere. Everybody is talking about ... | [
{
"code": null,
"e": 268,
"s": 172,
"text": "The first neural network you want to build using squaring of numbers. Yes it’s not XOR or MNIST"
},
{
"code": null,
"e": 642,
"s": 268,
"text": "Every time you want to learn about NNs or data science or AI, you search through google, y... |
memmove() function in C/C++ | The function memmove() is used to move the whole memory block from one position to another. One is source and another is destination pointed by the pointer. This is declared in “string.h” header file in C language.
Here is the syntax of memmove() in C language,
void *memmove(void *dest_str, const void *src_str, size_t ... | [
{
"code": null,
"e": 1277,
"s": 1062,
"text": "The function memmove() is used to move the whole memory block from one position to another. One is source and another is destination pointed by the pointer. This is declared in “string.h” header file in C language."
},
{
"code": null,
"e": 1... |
How to authenticate with google using firebase in React ? - GeeksforGeeks | 01 Apr, 2021
The following approach covers how to authenticate with Google using firebase in react. We have used firebase module to achieve so.
Creating React Application And Installing Module:
Step 1: Create a React myapp using the following command:
npx create-react-app myapp
Step 2: After creating your project folde... | [
{
"code": null,
"e": 24423,
"s": 24395,
"text": "\n01 Apr, 2021"
},
{
"code": null,
"e": 24554,
"s": 24423,
"text": "The following approach covers how to authenticate with Google using firebase in react. We have used firebase module to achieve so."
},
{
"code": null,
... |
COBOL - Database Interface | As of now, we have learnt the use of files in COBOL. Now, we will discuss how a COBOL program interacts with DB2. It involves the following terms −
Embedded SQL
DB2 Application Programming
Host Variables
SQLCA
SQL Queries
Cursors
Embedded SQL statements are used in COBOL programs to perform standard SQL operations. Emb... | [
{
"code": null,
"e": 2170,
"s": 2022,
"text": "As of now, we have learnt the use of files in COBOL. Now, we will discuss how a COBOL program interacts with DB2. It involves the following terms −"
},
{
"code": null,
"e": 2183,
"s": 2170,
"text": "Embedded SQL"
},
{
"code":... |
Find the sum and product of a NumPy array elements - GeeksforGeeks | 14 Dec, 2021
In this article, let’s discuss how to find the sum and product of NumPy arrays.
Sum of NumPy array elements can be achieved in the following ways
Method #1: Using numpy.sum()
Syntax: numpy.sum(array_name, axis=None, dtype=None, out=None, keepdims=<no value>, initial=<no value>, where=<no value>)
Example:... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n14 Dec, 2021"
},
{
"code": null,
"e": 24293,
"s": 24212,
"text": "In this article, let’s discuss how to find the sum and product of NumPy arrays. "
},
{
"code": null,
"e": 24359,
"s": 24293,
"text": "Sum of Nu... |
How to Create Your Own Image Dataset for Deep Learning | by Matt Oehler | Towards Data Science | There are a plethora of MOOCs out there that claim to make you a deep learning/computer vision expert by walking you through the classic MNIST problem. That’s essentially saying that I’d be an expert programmer for knowing how to type: print(“Hello World”). Real expertise is demonstrated by using deep learning to solve... | [
{
"code": null,
"e": 652,
"s": 171,
"text": "There are a plethora of MOOCs out there that claim to make you a deep learning/computer vision expert by walking you through the classic MNIST problem. That’s essentially saying that I’d be an expert programmer for knowing how to type: print(“Hello World”... |
How to delete multiple documents in MongoDB using deleteMany()? | Let us first create a collection with documents −
> db.deleteMultipleDocumentsDemo.insertOne({"StudentFirstName":"Larry"});
{
"acknowledged" : true,
"insertedId" : ObjectId("5ce00b07bf3115999ed51214")
}
> db.deleteMultipleDocumentsDemo.insertOne({"StudentFirstName":"Chris"});
{
"acknowledged" : true,
"inser... | [
{
"code": null,
"e": 1112,
"s": 1062,
"text": "Let us first create a collection with documents −"
},
{
"code": null,
"e": 1905,
"s": 1112,
"text": "> db.deleteMultipleDocumentsDemo.insertOne({\"StudentFirstName\":\"Larry\"});\n{\n \"acknowledged\" : true,\n \"insertedId\" : O... |
R Tutorial | R is a programming language.
R is often used for statistical computing and graphical presentation to analyze
and visualize data.
With our "Try it Yourself" editor, you can edit R code and view the result.
How to output some text, and how to do a simple calculation in R:
Result:
How you can use R to easily create a g... | [
{
"code": null,
"e": 29,
"s": 0,
"text": "R is a programming language."
},
{
"code": null,
"e": 132,
"s": 29,
"text": "R is often used for statistical computing and graphical presentation to analyze \n and visualize data."
},
{
"code": null,
"e": 208,
"s": 132,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.