title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Some useful Linux Hacks | 26 Sep, 2017
Linux is the best-known and most-used open source operating system. As an operating system, Linux is software that sits underneath all of the other software on a computer, receiving requests from those programs and relaying these requests to the computer’s hardware.
For the purposes of this page, we use th... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 Sep, 2017"
},
{
"code": null,
"e": 321,
"s": 54,
"text": "Linux is the best-known and most-used open source operating system. As an operating system, Linux is software that sits underneath all of the other software on a computer, re... |
Main Method in C# | 11 Nov, 2021
C# applications have an entry point called Main Method. It is the first method which gets invoked whenever an application started and it is present in every C# executable file. The application may be Console Application or Windows Application. The most common entry point of a C# program is static void Main... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Nov, 2021"
},
{
"code": null,
"e": 398,
"s": 52,
"text": "C# applications have an entry point called Main Method. It is the first method which gets invoked whenever an application started and it is present in every C# executable fil... |
Van Emde Boas Tree | Set 1 | Basics and Construction | 12 Aug, 2019
It is highly recommended to fully understand Proto Van Emde Boas Tree.
Van Emde Boas Tree supports search, successor, predecessor, insert and delete operations in O(lglgN) time which is faster than any of related data structures like priority queue, binary search tree, etc. Van Emde Boas Tree works with O(... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n12 Aug, 2019"
},
{
"code": null,
"e": 123,
"s": 52,
"text": "It is highly recommended to fully understand Proto Van Emde Boas Tree."
},
{
"code": null,
"e": 493,
"s": 123,
"text": "Van Emde Boas Tree supports search... |
Calculator Using RMI(Remote Method Invocation) in Java | 10 Sep, 2021
RMI (Remote Method Invocation) is an API used to access objects running on another JVM(Server-side). It is mainly used for the creation of distributed systems and is provided in Java Rome. Stub and Skeleton are the two objects used for handling communication between client and server. The following figure ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n10 Sep, 2021"
},
{
"code": null,
"e": 385,
"s": 52,
"text": "RMI (Remote Method Invocation) is an API used to access objects running on another JVM(Server-side). It is mainly used for the creation of distributed systems and is provided... |
Working with Array and Vectors using STL in C++ | 19 Mar, 2019
Using STL library it is very easy to perform certain basic operations on array like Sorting, searching, sum of elements, finding minimum and maximum element of the array.
Sorting
Sorting can be done with the help of sort() function.
sort(starting_index, last_index) – To sort the given array/vector. The sor... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n19 Mar, 2019"
},
{
"code": null,
"e": 224,
"s": 53,
"text": "Using STL library it is very easy to perform certain basic operations on array like Sorting, searching, sum of elements, finding minimum and maximum element of the array."
... |
TypeScript | String valueOf() Method | 17 Feb, 2021
The valueOf() is an inbuilt function in TypeScript that is used to return the primitive value of a String object.
Syntax:
string.valueOf( )
Parameter: This method does not accept any parameter. Return Value: This method returns the primitive value of a String object. Below examples illustrate the String ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Feb, 2021"
},
{
"code": null,
"e": 142,
"s": 28,
"text": "The valueOf() is an inbuilt function in TypeScript that is used to return the primitive value of a String object."
},
{
"code": null,
"e": 151,
"s": 142,
"... |
Draw Spiraling Triangle using Turtle in Python - GeeksforGeeks | 20 Aug, 2020
Prerequisite: Python Turtle Basic
Turtle is an inbuilt module of python. It enables us to draw any drawing by a turtle, methods defined in the turtle module, and by using some logical loops. To draw something on the screen(cardboard) just move the turtle(pen). To move turtle(pen) there are some functions i... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n20 Aug, 2020"
},
{
"code": null,
"e": 23935,
"s": 23901,
"text": "Prerequisite: Python Turtle Basic"
},
{
"code": null,
"e": 24239,
"s": 23935,
"text": "Turtle is an inbuilt module of python. It enables us to ... |
How to generate a sorted list in Python? | The sort method on lists in python uses the given class's gt and lt operators to compare. Most built in classes already has these operators implemented so it automatically gives you sorted list. You can use it as follows:
words = ["Hello", "World", "Foo", "Bar", "Nope"]
numbers = [100, 12, 52, 354, 25]
words.sort()
num... | [
{
"code": null,
"e": 1284,
"s": 1062,
"text": "The sort method on lists in python uses the given class's gt and lt operators to compare. Most built in classes already has these operators implemented so it automatically gives you sorted list. You can use it as follows:"
},
{
"code": null,
... |
Integer to English Words in Python Programming | Suppose we have a number. The number can be anything in between 0 to 231 – 1. We have to convert the number into words. So if the number is like 512, then the result will be Five hundred twelve.
To solve this, we will follow these steps −
Define some lists like less_than_20, this will hold all words from one to ninetee... | [
{
"code": null,
"e": 1257,
"s": 1062,
"text": "Suppose we have a number. The number can be anything in between 0 to 231 – 1. We have to convert the number into words. So if the number is like 512, then the result will be Five hundred twelve."
},
{
"code": null,
"e": 1301,
"s": 1257,
... |
Barcode Scanning in Android using Kotlin? | This example demonstrates how to implement bar code scanning in Kotlin.
Step 1 − Create a new project in Android Studio, go to File? New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout ... | [
{
"code": null,
"e": 1134,
"s": 1062,
"text": "This example demonstrates how to implement bar code scanning in Kotlin."
},
{
"code": null,
"e": 1262,
"s": 1134,
"text": "Step 1 − Create a new project in Android Studio, go to File? New Project and fill all required details to crea... |
Computer Programming - Characters | If it was easy to work with numbers in computer programming, it would be even easier to work with characters. Characters are simple alphabets like a, b, c, d...., A, B, C, D,....., but with an exception. In computer programming, any single digit number like 0, 1, 2,....and special characters like $, %, +, -.... etc., a... | [
{
"code": null,
"e": 2697,
"s": 2140,
"text": "If it was easy to work with numbers in computer programming, it would be even easier to work with characters. Characters are simple alphabets like a, b, c, d...., A, B, C, D,....., but with an exception. In computer programming, any single digit number ... |
numpy.zeros() in Python - GeeksforGeeks | 28 Mar, 2022
The numpy.zeros() function returns a new array of given shape and type, with zeros. Syntax:
numpy.zeros(shape, dtype = None, order = 'C')
Parameters :
shape : integer or sequence of integers
order : C_contiguous or F_contiguous
C-contiguous order in memory(last index varies the fastest)
... | [
{
"code": null,
"e": 23677,
"s": 23649,
"text": "\n28 Mar, 2022"
},
{
"code": null,
"e": 23769,
"s": 23677,
"text": "The numpy.zeros() function returns a new array of given shape and type, with zeros. Syntax:"
},
{
"code": null,
"e": 23815,
"s": 23769,
"text":... |
Linux Admin - wc Command | wc is useful for counting occurrences in a file. It helps print newline, word, ad byte count from each file. Most useful is when combined with grep to show matches for a certain pattern.
We can see our system has 5 users with a group id of 0. Then upon further inspection only the root user has shell access.
[root@cento... | [
{
"code": null,
"e": 2444,
"s": 2257,
"text": "wc is useful for counting occurrences in a file. It helps print newline, word, ad byte count from each file. Most useful is when combined with grep to show matches for a certain pattern."
},
{
"code": null,
"e": 2566,
"s": 2444,
"tex... |
Runtime Polymorphism in Java | Method overriding is an example of runtime polymorphism. In method overriding, a subclass overrides a method with the same signature as that of in its superclass. During compile time, the check is made on the reference type. However, in the runtime, JVM figures out the object type and would run the method that belongs ... | [
{
"code": null,
"e": 1409,
"s": 1062,
"text": "Method overriding is an example of runtime polymorphism. In method overriding, a subclass overrides a method with the same signature as that of in its superclass. During compile time, the check is made on the reference type. However, in the runtime, JVM... |
Transfer Learning in NLP for Tweet Stance Classification | by Prashanth Rao | Towards Data Science | 2018 has been a hugely exciting year in the field of Natural Language Processing (NLP), in particular, for transfer learning — a technique where instead of training a model from scratch, we use models pre-trained on a large dataset and then fine-tune them for specific natural language tasks. Sebastian Ruder provides an... | [
{
"code": null,
"e": 695,
"s": 172,
"text": "2018 has been a hugely exciting year in the field of Natural Language Processing (NLP), in particular, for transfer learning — a technique where instead of training a model from scratch, we use models pre-trained on a large dataset and then fine-tune them... |
string.punctuation in Python | In this tutorial, we are going to learn about the string.punctuation string.
The string punctuation is pre-defined in the string module of Python3. It contains all the
characters as a string. We can use it anywhere in the program.
Live Demo
# importing the string module
import string
# printing the punctuation
print(... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "In this tutorial, we are going to learn about the string.punctuation string."
},
{
"code": null,
"e": 1294,
"s": 1139,
"text": "The string punctuation is pre-defined in the string module of Python3. It contains all the\ncharacters a... |
Abstract class in Java | A class which contains the abstract keyword in its declaration is known as abstract class.
Abstract classes may or may not contain abstract methods, i.e., methods without body ( public void get(); )
But, if a class has at least one abstract method, then the class must be declared abstract.
If a class is declared abstra... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "A class which contains the abstract keyword in its declaration is known as abstract class."
},
{
"code": null,
"e": 1261,
"s": 1153,
"text": "Abstract classes may or may not contain abstract methods, i.e., methods without body ( publ... |
Python - Merge Pandas DataFrame with Left Outer Join | To merge Pandas DataFrame, use the merge() function. The left outer join is implemented on both the DataFrames by setting under the “how” parameter of the merge() function i.e. −
how = “left”
At first, let us import the pandas library with an alias −
import pandas as pd
Let’s create two DataFrames to be merged −
# Cre... | [
{
"code": null,
"e": 1241,
"s": 1062,
"text": "To merge Pandas DataFrame, use the merge() function. The left outer join is implemented on both the DataFrames by setting under the “how” parameter of the merge() function i.e. −"
},
{
"code": null,
"e": 1254,
"s": 1241,
"text": "how... |
Thread Class in C# - GeeksforGeeks | 01 Feb, 2019
In C#, a multi-threading system is built upon the Thread class, which encapsulates the execution of threads. This class contains several methods and properties which helps in managing and creating threads and this class is defined under System.Threading namespace.
Characteristics of Thread class:
Thread cl... | [
{
"code": null,
"e": 24359,
"s": 24331,
"text": "\n01 Feb, 2019"
},
{
"code": null,
"e": 24624,
"s": 24359,
"text": "In C#, a multi-threading system is built upon the Thread class, which encapsulates the execution of threads. This class contains several methods and properties whi... |
Don’t Sleep: Building your first Drowsiness Detection System | by Vincent Tatan | Towards Data Science | It was a very important day, the test and project deadline were due next week but you hadn’t prepared much because of the new Halo release. Out of anxiety, you rushed to library and opened your laptop. However, as you lost your sleep leveling up your character, your mind quickly took you to dreamland. Coffee did no ava... | [
{
"code": null,
"e": 601,
"s": 171,
"text": "It was a very important day, the test and project deadline were due next week but you hadn’t prepared much because of the new Halo release. Out of anxiety, you rushed to library and opened your laptop. However, as you lost your sleep leveling up your char... |
Design Patterns - Strategy Pattern | In Strategy pattern, a class behavior or its algorithm can be changed at run time. This type of design pattern comes under behavior pattern.
In Strategy pattern, we create objects which represent various strategies and a context object whose behavior varies as per its strategy object. The strategy object changes the ex... | [
{
"code": null,
"e": 2892,
"s": 2751,
"text": "In Strategy pattern, a class behavior or its algorithm can be changed at run time. This type of design pattern comes under behavior pattern."
},
{
"code": null,
"e": 3112,
"s": 2892,
"text": "In Strategy pattern, we create objects wh... |
What does the volatile keyword mean in C++? | volatile means two things −
- The value of the variable may change without any code of yours changing it. Therefore whenever the compiler reads the value of the variable, it may not assume that it is the same as the last time it was read, or that it is the same as the last value stored, but it must be read again.- The ... | [
{
"code": null,
"e": 1090,
"s": 1062,
"text": "volatile means two things −"
},
{
"code": null,
"e": 1674,
"s": 1090,
"text": "- The value of the variable may change without any code of yours changing it. Therefore whenever the compiler reads the value of the variable, it may not ... |
C++ iomanip Library - setiosflags Function | The C++ function std::setiosflags behaves as if member setf were called with mask as argument on the stream on which it is inserted/extracted as a manipulator (it can be inserted/extracted on input streams or output streams).
It is used to sets the format flags specified by parameter mask.
Following is the declaration ... | [
{
"code": null,
"e": 2829,
"s": 2603,
"text": "The C++ function std::setiosflags behaves as if member setf were called with mask as argument on the stream on which it is inserted/extracted as a manipulator (it can be inserted/extracted on input streams or output streams)."
},
{
"code": null,... |
C++ iomanip Library - setprecision Function | The C++ function std::setprecision behaves as if member precision were called with n as argument on the stream on which it is inserted/extracted as a manipulator (it can be inserted/extracted on input streams or output streams).
It is used to sets the decimal precision to be used to format floating-point values on out... | [
{
"code": null,
"e": 2833,
"s": 2603,
"text": "The C++ function std::setprecision behaves as if member precision were called with n as argument on the stream on which it is inserted/extracted as a manipulator (it can be inserted/extracted on input streams or output streams)."
},
{
"code": n... |
How to run a PySpark job in Kubernetes (AWS EKS) | by Bogdan Cojocar | Towards Data Science | In this tutorial, we will focus on deploying a Spark application on AWS EKS end to end. We will do the following steps:
deploy an EKS cluster inside a custom VPC in AWS
install the Spark Operator
run a simple PySpark application
TL;DR: Github code repo
To deploy Kubernetes on AWS we will need at a minimum to deploy :
V... | [
{
"code": null,
"e": 292,
"s": 172,
"text": "In this tutorial, we will focus on deploying a Spark application on AWS EKS end to end. We will do the following steps:"
},
{
"code": null,
"e": 341,
"s": 292,
"text": "deploy an EKS cluster inside a custom VPC in AWS"
},
{
"co... |
HTML - Quick Guide | HTML stands for Hypertext Markup Language, and it is the most widely used language to write Web Pages.
Hypertext refers to the way in which Web pages (HTML documents) are linked together. Thus, the link available on a webpage is called Hypertext.
Hypertext refers to the way in which Web pages (HTML documents) are linke... | [
{
"code": null,
"e": 2477,
"s": 2374,
"text": "HTML stands for Hypertext Markup Language, and it is the most widely used language to write Web Pages."
},
{
"code": null,
"e": 2621,
"s": 2477,
"text": "Hypertext refers to the way in which Web pages (HTML documents) are linked toge... |
Queue.Dequeue Method in C# | The Queue.Dequeue() method in C# is used to remove and return the object at the beginning of the Queue.
The syntax is as follows −
public virtual object Dequeue ();
Let us now see an example −
Live Demo
using System;
using System.Collections.Generic;
public class Demo {
public static void Main() {
Queue<strin... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "The Queue.Dequeue() method in C# is used to remove and return the object at the beginning of the Queue."
},
{
"code": null,
"e": 1193,
"s": 1166,
"text": "The syntax is as follows −"
},
{
"code": null,
"e": 1227,
"s":... |
List methods of a class using Java Reflection | The methods of a class can be listed using the java.lang.Class.getDeclaredMethods() method. This method returns an array that contains all the Method objects with public, private, protected and default access. However, the inherited methods are not included.
Also, the getDeclaredMethods() method returns a zero length a... | [
{
"code": null,
"e": 1321,
"s": 1062,
"text": "The methods of a class can be listed using the java.lang.Class.getDeclaredMethods() method. This method returns an array that contains all the Method objects with public, private, protected and default access. However, the inherited methods are not incl... |
reference_wrapper in C++ | 03 Dec, 2019
std::reference_wrapper is a class template that wraps a reference in a copy constructible and copy assignable object or reference to function of type T.Instances of std::reference_wrapper are objects (they can be copied or stored in containers) but they are implicitly convertible to ‘T&’ so that they can b... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Dec, 2019"
},
{
"code": null,
"e": 418,
"s": 28,
"text": "std::reference_wrapper is a class template that wraps a reference in a copy constructible and copy assignable object or reference to function of type T.Instances of std::refer... |
How to integrate Mysql database with Django? | 16 Mar, 2021
Django is a Python-based web framework that allows you to quickly create efficient web applications. It is also called batteries included framework because Django provides built-in features for everything including Django Admin Interface, default database – SQLlite3, etc.
How to integrate Mysql database w... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Mar, 2021"
},
{
"code": null,
"e": 302,
"s": 28,
"text": "Django is a Python-based web framework that allows you to quickly create efficient web applications. It is also called batteries included framework because Django provides bui... |
Pipelines – Python and scikit-learn | 13 Jul, 2021
The workflow of any machine learning project includes all the steps required to build it. A proper ML project consists of basically four main parts are given as follows:
Gathering data: The process of gathering data depends on the project it can be real-time data or the data collected from various source... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 200,
"s": 28,
"text": "The workflow of any machine learning project includes all the steps required to build it. A proper ML project consists of basically four main parts are given as follows: "
... |
Add One in Python | Suppose we have a list of integers called n, this is representing a decimal number and n[i] is between [0, 9]. So, if the n is [2, 4, 9] represents the number 249. We have to find the same list in the same representation except modified so that 1 is added to the number.
So, if the input is like n = [9,9], then the outp... | [
{
"code": null,
"e": 1458,
"s": 1187,
"text": "Suppose we have a list of integers called n, this is representing a decimal number and n[i] is between [0, 9]. So, if the n is [2, 4, 9] represents the number 249. We have to find the same list in the same representation except modified so that 1 is add... |
String Template Class in Python | 20 Jan, 2022
In the String module, Template Class allows us to create simplified syntax for output specification. The format uses placeholder names formed by $ with valid Python identifiers (alphanumeric characters and underscores). Surrounding the placeholder with braces allows it to be followed by more alphanumeric l... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n20 Jan, 2022"
},
{
"code": null,
"e": 436,
"s": 54,
"text": "In the String module, Template Class allows us to create simplified syntax for output specification. The format uses placeholder names formed by $ with valid Python identifie... |
Quine in Python | 23 Apr, 2020
Quine is a program which takes no input but outputs a copy of its own code. We have discussed quine in C.
The shortest possible quine in python is just a single line of code!
_='_=%r;print _%%_';print _%_
In case of Python3.x
_='_=%r;print (_%%_)';print (_%_)
Explanation:The above code is a classic use of ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Apr, 2020"
},
{
"code": null,
"e": 160,
"s": 54,
"text": "Quine is a program which takes no input but outputs a copy of its own code. We have discussed quine in C."
},
{
"code": null,
"e": 229,
"s": 160,
"text": ... |
Bank account system in C using File handling | 04 Mar, 2022
This article focuses on how to create a bank account system using C language and File handling in C.
Approach:Let’s discuss the approach in detail, covering all the functions and their explanation in detail-
Create a Menu in the main function and create different functions for the Menu, which will be calle... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Mar, 2022"
},
{
"code": null,
"e": 155,
"s": 54,
"text": "This article focuses on how to create a bank account system using C language and File handling in C."
},
{
"code": null,
"e": 262,
"s": 155,
"text": "Appr... |
Create a GUI to search bank information with IFSC Code using Python | 13 Dec, 2021
Prerequisite: Python GUI – tkinter
The following program depicts how a GUI application can be formulated using python script to get bank details by using IFSC code. Here, we are using Razorpay IFSC Toolkit to fetch IFSC code. Razorpay IFSC Toolkit processes IFSC codes via their toolkit and return data set.... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Dec, 2021"
},
{
"code": null,
"e": 63,
"s": 28,
"text": "Prerequisite: Python GUI – tkinter"
},
{
"code": null,
"e": 337,
"s": 63,
"text": "The following program depicts how a GUI application can be formulated usi... |
Check if a table is empty or not in MySQL using EXISTS | The following is the syntax to check whether a table is empty or not using MySQL EXISTS −
SELECT EXISTS(SELECT 1 FROM yourTableName);
First, let us create a table. The query to create a table is as follows −
mysql> create table ReturnDemo
-> (
-> Id int,
-> Name varchar(10)
-> );
Query OK, 0 rows affected (... | [
{
"code": null,
"e": 1277,
"s": 1187,
"text": "The following is the syntax to check whether a table is empty or not using MySQL EXISTS −"
},
{
"code": null,
"e": 1321,
"s": 1277,
"text": "SELECT EXISTS(SELECT 1 FROM yourTableName);"
},
{
"code": null,
"e": 1395,
"... |
How to link back out of a folder using the a-href tag? | 10 Sep, 2020
Introduction:
Whenever we make a project it is generally distributed among various folders. That is generally done to improve the connectivity and readability for the various web developers working on the same project. For example:
The above classification is just an example but the classification can be b... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n10 Sep, 2020"
},
{
"code": null,
"e": 67,
"s": 53,
"text": "Introduction:"
},
{
"code": null,
"e": 285,
"s": 67,
"text": "Whenever we make a project it is generally distributed among various folders. That is general... |
Python – Count Strings with substring String List | 05 Jul, 2022
The classical problem that can be handled quite easily by python and has been also dealt with many times is finding if a string is substring of other. But sometimes, one wishes to extend this on list of strings and find how many strings satisfy condition, and hence then requires to traverse the entire cont... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Jul, 2022"
},
{
"code": null,
"e": 425,
"s": 28,
"text": "The classical problem that can be handled quite easily by python and has been also dealt with many times is finding if a string is substring of other. But sometimes, one wishe... |
Find a triplet that sum to a given value | 01 Jul, 2022
Given an array and a value, find if there is a triplet in array whose sum is equal to the given value. If there is such a triplet present in array, then print the triplet and return true. Else return false.
Examples:
Input: array = {12, 3, 4, 1, 6, 9}, sum = 24; Output: 12, 3, 9 Explanation: There is a t... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Jul, 2022"
},
{
"code": null,
"e": 261,
"s": 54,
"text": "Given an array and a value, find if there is a triplet in array whose sum is equal to the given value. If there is such a triplet present in array, then print the triplet and... |
Java String contains() method with example | 31 Oct, 2021
java.lang.String.contains() method searches the sequence of characters in the given string. It returns true if sequence of char values are found in this string otherwise returns false. Implementation of this method :
public boolean contains(CharSequence sequence)
{
return indexOf(sequence.toString()) ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n31 Oct, 2021"
},
{
"code": null,
"e": 272,
"s": 53,
"text": "java.lang.String.contains() method searches the sequence of characters in the given string. It returns true if sequence of char values are found in this string otherwise retu... |
Delete Node in a Linked List in Python | Suppose we have a linked list with few elements. Our task is to write a function that will delete the given node from the list. So if the list is like 1 → 3 → 5 → 7 → 9, and after deleting 3, it will be 1 → 5 → 7 → 9.
Consider we have the pointer ‘node’ to point that node to be deleted, we have to perform these operati... | [
{
"code": null,
"e": 1405,
"s": 1187,
"text": "Suppose we have a linked list with few elements. Our task is to write a function that will delete the given node from the list. So if the list is like 1 → 3 → 5 → 7 → 9, and after deleting 3, it will be 1 → 5 → 7 → 9."
},
{
"code": null,
"e"... |
OSRFramework – Open Source Research Framework on Linux | 08 Nov, 2021
OSINT is the most common method or technique for collecting information about the target domain or employee of the organization from open-source or publicly available data. Mostly malicious hackers use this technique in the attacks of Social Engineering, Phishing, etc. But on the good side, We can use this... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Nov, 2021"
},
{
"code": null,
"e": 691,
"s": 28,
"text": "OSINT is the most common method or technique for collecting information about the target domain or employee of the organization from open-source or publicly available data. Mo... |
SQL | DEFAULT Constraint | 28 Aug, 2020
The DEFAULT Constraint is used to fill a column with a default and fixed value. The value will be added to all new records when no other value is provided.
1. Using DEFAULT on CREATE TABLE :
Syntax :
CREATE TABLE tablename (
Columnname DEFAULT 'defaultvalue' );
Example –To set a DEFAULT value for the “Loca... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 208,
"s": 52,
"text": "The DEFAULT Constraint is used to fill a column with a default and fixed value. The value will be added to all new records when no other value is provided."
},
{
"cod... |
How to Sort ArrayList using Comparator? | 15 Dec, 2020
Comparator is an interface that is used for rearranging the Arraylist in a sorted manner. Comparator is used to sort an ArrayList of User-defined objects. In java, Comparator is provided in java.util package. Using Comparator we can sort ArrayList on the basis of multiple variables. We can simply implement... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Dec, 2020"
},
{
"code": null,
"e": 602,
"s": 28,
"text": "Comparator is an interface that is used for rearranging the Arraylist in a sorted manner. Comparator is used to sort an ArrayList of User-defined objects. In java, Comparator ... |
Locking and Unlocking of Resources arranged in the form of n-ary Tree | 02 Mar, 2022
Given an n-ary tree of resources arranged hierarchically such that height of tree is O(Log N) where N is total number of nodes (or resources). A process needs to lock a resource node in order to use it. But a node cannot be locked if any of its descendant or ancestor is locked. Following operations are req... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n02 Mar, 2022"
},
{
"code": null,
"e": 396,
"s": 54,
"text": "Given an n-ary tree of resources arranged hierarchically such that height of tree is O(Log N) where N is total number of nodes (or resources). A process needs to lock a resou... |
Implement two stacks in an array | 04 Jul, 2022
Create a data structure twoStacks that represents two stacks. Implementation of twoStacks should use only one array, i.e., both stacks should use the same array for storing elements.
Following functions must be supported by twoStacks.
push1(int x) –> pushes x to first stack
push2(int x) –> pushes x to se... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n04 Jul, 2022"
},
{
"code": null,
"e": 236,
"s": 52,
"text": "Create a data structure twoStacks that represents two stacks. Implementation of twoStacks should use only one array, i.e., both stacks should use the same array for storing e... |
JavaScript Array entries() Method | 16 Jun, 2022
This article will cover all the facts in detail which are related to the method, namely Array.entries() under Arrays in JavaScript.
Let us have a look in the below illustrated example which shows the utilization of the Array entries() method.
Example:
html
<!DOCTYPE html><html> <body style="text-align:... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 184,
"s": 52,
"text": "This article will cover all the facts in detail which are related to the method, namely Array.entries() under Arrays in JavaScript."
},
{
"code": null,
"e": 295,
... |
GATE | GATE-CS-2015 (Set 3) | Question 65 | 01 Apr, 2019
Consider a CSMA/CD network that transmits data at a rate of 100 Mbps (108 bits per second) over a 1 km (kilometre) cable with no repeaters. If the minimum frame size required for this network is 1250 bytes, what is the signal speed (km/sec) in the cable?(A) 8000(B) 10000(C) 16000(D) 20000Answer: (D)Explana... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Apr, 2019"
},
{
"code": null,
"e": 365,
"s": 52,
"text": "Consider a CSMA/CD network that transmits data at a rate of 100 Mbps (108 bits per second) over a 1 km (kilometre) cable with no repeaters. If the minimum frame size required... |
Kotlin extension function | 03 Jan, 2022
Kotlin gives the programmer the ability to add more functionality to the existing classes, without inheriting them. This is achieved through a feature known as extensions. When a function is added to an existing class it is known as Extension Function. To add an extension function to a class, define a new ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Jan, 2022"
},
{
"code": null,
"e": 432,
"s": 54,
"text": "Kotlin gives the programmer the ability to add more functionality to the existing classes, without inheriting them. This is achieved through a feature known as extensions. Wh... |
How to style icon color, size, and shadow by using CSS ? | 11 Feb, 2019
The <i> tag and <span> tag are used widely to add icons on the webpages. To add any icons on the webpages, it need the fontawesome link inside the head tag. The fontawesome icon can be placed by using the fa prefix before the icon’s name.
fontawesome link:
https://cdnjs.cloudflare.com/ajax/libs/font-awesom... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Feb, 2019"
},
{
"code": null,
"e": 291,
"s": 52,
"text": "The <i> tag and <span> tag are used widely to add icons on the webpages. To add any icons on the webpages, it need the fontawesome link inside the head tag. The fontawesome i... |
Python | Absolute value of list elements | 28 Aug, 2019
Sometimes, while working with Python list, we need to find the absolute number i.e all the elements with a positive magnitude in list. This problem has an application in various domains of Data Science. Let’s discuss certain ways in which this task can be done.
Method #1 : Using list comprehension + abs()T... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Aug, 2019"
},
{
"code": null,
"e": 290,
"s": 28,
"text": "Sometimes, while working with Python list, we need to find the absolute number i.e all the elements with a positive magnitude in list. This problem has an application in vario... |
What is the maximum possible value of an integer in Python ? | 24 May, 2022
Consider below Python program.
Python3
# A Python program to demonstrate that we can store# large numbers in Python x = 10000000000000000000000000000000000000000000x = x + 1print (x)
Output :
10000000000000000000000000000000000000000001
In Python, value of an integer is not restricted by the number of b... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n24 May, 2022"
},
{
"code": null,
"e": 85,
"s": 53,
"text": "Consider below Python program. "
},
{
"code": null,
"e": 93,
"s": 85,
"text": "Python3"
},
{
"code": "# A Python program to demonstrate that we can... |
Introduction of Theory of Computation | 27 May, 2022
Automata theory (also known as Theory Of Computation) is a theoretical branch of Computer Science and Mathematics, which mainly deals with the logic of computation with respect to simple machines, referred to as automata.
Automata* enables scientists to understand how machines compute the functions and so... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n27 May, 2022"
},
{
"code": null,
"e": 275,
"s": 52,
"text": "Automata theory (also known as Theory Of Computation) is a theoretical branch of Computer Science and Mathematics, which mainly deals with the logic of computation with respe... |
PyQt5 QtSql – Python | 11 May, 2020
PyQt provides us UI features which can be useful in number of ways to build our applications using all the features and widgets of PyQt. Moreover PyQt provides us the facility to integrate our database in our application. We can integrate any database through it some of them are- MySQL, SQLITE etc.
To link... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 May, 2020"
},
{
"code": null,
"e": 328,
"s": 28,
"text": "PyQt provides us UI features which can be useful in number of ways to build our applications using all the features and widgets of PyQt. Moreover PyQt provides us the facility... |
Find next sibling element in Selenium, Python? | We can find a next sibling element from the same parent in Selenium webdriver. This is achieved with the help of xpath locator. It is important to note that it is only possible to traverse from current sibling to the next sibling with the help of xpath.
To traverse to the next sibling, we have to use the following-sibl... | [
{
"code": null,
"e": 1316,
"s": 1062,
"text": "We can find a next sibling element from the same parent in Selenium webdriver. This is achieved with the help of xpath locator. It is important to note that it is only possible to traverse from current sibling to the next sibling with the help of xpath.... |
Returning Pointer from a Function in Go | 17 Jul, 2020
Prerequisite: Pointers in Go and Passing Pointers to Function
Pointers in Go programming language or Golang is a variable which is used to store the memory address of another variable. We can pass pointers to the function as well as return pointer from a function in Golang. In C/C++, it is not recommended ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Jul, 2020"
},
{
"code": null,
"e": 114,
"s": 52,
"text": "Prerequisite: Pointers in Go and Passing Pointers to Function"
},
{
"code": null,
"e": 599,
"s": 114,
"text": "Pointers in Go programming language or Gola... |
Two Phase Locking Protocol | 02 Jun, 2021
We have discussed briefly the first type of Concurrency Control Protocol, i.e., Lock-based Protocol.
Now, recalling where we last left off, there are two types of Locks available Shared S(a) and Exclusive X(a). Implementing this lock system without any restrictions gives us the Simple Lock-based protocol ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Jun, 2021"
},
{
"code": null,
"e": 154,
"s": 52,
"text": "We have discussed briefly the first type of Concurrency Control Protocol, i.e., Lock-based Protocol. "
},
{
"code": null,
"e": 539,
"s": 154,
"text": "Now... |
Find k closest numbers in an unsorted array | 11 Feb, 2021
Given an unsorted array and two numbers x and k, find k closest values to x.Examples:
Input : arr[] = {10, 2, 14, 4, 7, 6}, x = 5, k = 3
Output : 4 6 7
Three closest values of x are 4, 6 and 7.
Input : arr[] = {-10, -50, 20, 17, 80}, x = 20, k = 2
Output : 17, 20
A simple solution is to sort the arra... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Feb, 2021"
},
{
"code": null,
"e": 142,
"s": 54,
"text": "Given an unsorted array and two numbers x and k, find k closest values to x.Examples: "
},
{
"code": null,
"e": 322,
"s": 142,
"text": "Input : arr[] = {... |
View DICOM images using Pydicom and Matplotlib | 17 Feb, 2021
Prerequisite: Matplotlib
DICOM stands for Digital Imaging and Communications in Medicine. DICOM files were introduced to maintain uniformity among varied types of medical image modalities. It is a standard format to view, store, share and retrieve medical images.
Python offers a powerful module, pydicom t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Feb, 2021"
},
{
"code": null,
"e": 54,
"s": 28,
"text": "Prerequisite: Matplotlib "
},
{
"code": null,
"e": 293,
"s": 54,
"text": "DICOM stands for Digital Imaging and Communications in Medicine. DICOM files were ... |
Secant Method of Numerical analysis | 18 Oct, 2021
Secant method is also a recursive method for finding the root for the polynomials by successive approximation. It’s similar to the Regular-falsi method but here we don’t need to check f(x1)f(x2)<0 again and again after every approximation. In this method, the neighbourhoods roots are approximated by secant... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 Oct, 2021"
},
{
"code": null,
"e": 533,
"s": 54,
"text": "Secant method is also a recursive method for finding the root for the polynomials by successive approximation. It’s similar to the Regular-falsi method but here we don’t need... |
Hash Map in Python | 09 May, 2022
Hash maps are indexed data structures. A hash map makes use of a hash function to compute an index with a key into an array of buckets or slots. Its value is mapped to the bucket with the corresponding index. The key is unique and immutable. Think of a hash map as a cabinet having drawers with labels for t... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 May, 2022"
},
{
"code": null,
"e": 553,
"s": 52,
"text": "Hash maps are indexed data structures. A hash map makes use of a hash function to compute an index with a key into an array of buckets or slots. Its value is mapped to the bu... |
Number of ways to arrange K different objects taking N objects at a time | 31 May, 2022
Given two integers K and N, the task is to count the number of ways to arrange K different objects taking N objects at a time. Each arrangement contains one object at most once. The answer can be very large so return the answer modulo 109 + 7.Note: 1 <= N <= K <= 105. Prerequisites: Factorial of a number, ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 May, 2022"
},
{
"code": null,
"e": 361,
"s": 28,
"text": "Given two integers K and N, the task is to count the number of ways to arrange K different objects taking N objects at a time. Each arrangement contains one object at most onc... |
How to add timestamp to excel file in Python | 22 Nov, 2021
In this article, we will discuss how to add a timestamp to an excel file using Python.
datetime: This module helps us to work with dates and times in Python.
pip install datetime
openpyxl: It is a Python library used for reading and writing Excel files.
pip install openpyxl
time: This module provides vario... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 115,
"s": 28,
"text": "In this article, we will discuss how to add a timestamp to an excel file using Python."
},
{
"code": null,
"e": 186,
"s": 115,
"text": "datetime: This modu... |
Separating Hyperplanes in SVM | 15 Sep, 2021
Support Vector Machine is the supervised machine learning algorithm, that is used in both classification and regression of models. The idea behind it is simple to just find a plane or a boundary that separates the data between two classes.
Support Vectors:
Support vectors are the data points that are clos... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n15 Sep, 2021"
},
{
"code": null,
"e": 295,
"s": 54,
"text": " Support Vector Machine is the supervised machine learning algorithm, that is used in both classification and regression of models. The idea behind it is simple to just find ... |
Substring in C++ | 11 Jul, 2022
In C++, std::substr() is a predefined function used for string handling. string.h is the header file required for string functions. This function takes two values pos and len as an argument and returns a newly constructed string object with its value initialized to a copy of a sub-string of this object. Co... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 457,
"s": 52,
"text": "In C++, std::substr() is a predefined function used for string handling. string.h is the header file required for string functions. This function takes two values pos and len... |
Perl | Date and Time | 21 Nov, 2019
Perl is one of the most feature-rich programming languages. Perl is portable and cross-platform. Perl can run on over 100 platforms with highly integrated text processing ability. Perl contains the features of different languages like C, sed, awk, and sh etc. which makes the Perl more useful and productive... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Nov, 2019"
},
{
"code": null,
"e": 337,
"s": 28,
"text": "Perl is one of the most feature-rich programming languages. Perl is portable and cross-platform. Perl can run on over 100 platforms with highly integrated text processing abil... |
How to validate MasterCard number using Regular Expression | 15 Feb, 2021
Given string str, the task is to check whether the given string is a valid Master Card number or not by using Regular Expression. The valid Master Card number must satisfy the following conditions.
It should be 16 digits long.It should start with either two digits number may range from 51 to 55 or four di... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Feb, 2021"
},
{
"code": null,
"e": 227,
"s": 28,
"text": "Given string str, the task is to check whether the given string is a valid Master Card number or not by using Regular Expression. The valid Master Card number must satisfy the... |
Remove NA Values from ggplot2 Plot in R | 23 Aug, 2021
In this article, we are going to see how to remove the NA values from the ggplot2 plot in the R programming language.
complete.cases() function: This function will be returning a logical vector indicating which cases are complete, i.e., have no missing values.
Syntax: complete.cases(...)
Arguments:
...: a ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 146,
"s": 28,
"text": "In this article, we are going to see how to remove the NA values from the ggplot2 plot in the R programming language."
},
{
"code": null,
"e": 289,
"s": 146,
... |
Maximum size rectangle binary sub-matrix with all 1s | 30 Jun, 2022
Given a binary matrix, find the maximum size rectangle binary-sub-matrix with all 1’s.
Example:
Input:
0 1 1 0
1 1 1 1
1 1 1 1
1 1 0 0
Output :
8
Explanation :
The largest rectangle with only 1's is from
(1, 0) to (2, 3) which is
1 1 1 1
1 1 1 1
Input:
0 1 1
1 1 1
0 1 1
Output:
6
Explanation : ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Jun, 2022"
},
{
"code": null,
"e": 140,
"s": 52,
"text": "Given a binary matrix, find the maximum size rectangle binary-sub-matrix with all 1’s. "
},
{
"code": null,
"e": 150,
"s": 140,
"text": "Example: "
},
... |
How to display child row information using jQuery DataTables plugin ? | 27 Jan, 2021
DataTables are modern jQuery plugin for adding interactive and advanced controls to HTML tables for our webpage. DataTable is a simple-to-use jQuery plug-in with many options for developer’s custom changes. Some features of DataTables are pagination, searching, sorting and multiple column ordering.
In this... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Jan, 2021"
},
{
"code": null,
"e": 328,
"s": 28,
"text": "DataTables are modern jQuery plugin for adding interactive and advanced controls to HTML tables for our webpage. DataTable is a simple-to-use jQuery plug-in with many options ... |
How to set up a production-grade flask application using Application Factory Pattern and Celery | by Ange Uwase | Towards Data Science | Disclaimer
This is not a beginner tutorial. It is assumed that the reader is experienced with the flask web application framework, its commonly used libraries and celery.
Create a github repository for your project, and initialize it with a README and a python .gitignore file.Clone the git repo onto your local machine
... | [
{
"code": null,
"e": 183,
"s": 172,
"text": "Disclaimer"
},
{
"code": null,
"e": 343,
"s": 183,
"text": "This is not a beginner tutorial. It is assumed that the reader is experienced with the flask web application framework, its commonly used libraries and celery."
},
{
"... |
C# and Multiple Inheritance | Multiple Inheritance isn’t supported in C#. To implement multiple inheritances, use Interfaces.
Here is our interface PaintCost in class Shape −
public interface PaintCost {
int getCost(int area);
}
The shape is our base class whereas Rectangle is the derived class −
class Rectangle : Shape, PaintCost {
public in... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "Multiple Inheritance isn’t supported in C#. To implement multiple inheritances, use Interfaces."
},
{
"code": null,
"e": 1207,
"s": 1158,
"text": "Here is our interface PaintCost in class Shape −"
},
{
"code": null,
"e": ... |
RxJS - Operators | Operators are an important part of RxJS. An operator is a pure function that takes in observable as input and the output is also an observable.
An operator is a pure function which takes in observable as input and the output is also an observable.
To work with operators we need a pipe() method.
let obs = of(1,2,3); // ... | [
{
"code": null,
"e": 1968,
"s": 1824,
"text": "Operators are an important part of RxJS. An operator is a pure function that takes in observable as input and the output is also an observable."
},
{
"code": null,
"e": 2072,
"s": 1968,
"text": "An operator is a pure function which t... |
Find if k bookings possible with given arrival and departure times - GeeksforGeeks | 19 Mar, 2022
A hotel manager has to process N advance bookings of rooms for the next season. His hotel has K rooms. Bookings contain an arrival date and a departure date. He wants to find out whether there are enough rooms in the hotel to satisfy the demand.
The idea is to sort the arrays and keep track of overlaps.
E... | [
{
"code": null,
"e": 26505,
"s": 26477,
"text": "\n19 Mar, 2022"
},
{
"code": null,
"e": 26752,
"s": 26505,
"text": "A hotel manager has to process N advance bookings of rooms for the next season. His hotel has K rooms. Bookings contain an arrival date and a departure date. He wa... |
Check if an array has a majority element - GeeksforGeeks | 21 Jun, 2021
Given an array, the task is to find if the input array contains a majority element or not. An element is Examples:
Input : arr[] = {2, 3, 9, 2, 2}
Output : Yes
A majority element 2 is present in arr[]
Input : arr[] = {1, 8, 9, 2, 5}
Output : No
A simple solution is to traverse through the array. For eve... | [
{
"code": null,
"e": 42519,
"s": 42491,
"text": "\n21 Jun, 2021"
},
{
"code": null,
"e": 42635,
"s": 42519,
"text": "Given an array, the task is to find if the input array contains a majority element or not. An element is Examples: "
},
{
"code": null,
"e": 42767,
... |
GATE | GATE-CS-2014-(Set-3) | Question 65 - GeeksforGeeks | 28 Jun, 2021
Consider the following statements:
P: Good mobile phones are not cheap
Q: Cheap mobile phones are not good
L: P implies Q
M: Q implies P
N: P is equivalent to Q
Which one of the following about L, M, and N is CORRECT?
(A) Only L is TRUE.(B) Only M is TRUE.(C) Only N is TRUE.(D) L, M and N are T... | [
{
"code": null,
"e": 25749,
"s": 25721,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25784,
"s": 25749,
"text": "Consider the following statements:"
},
{
"code": null,
"e": 25922,
"s": 25784,
"text": " P: Good mobile phones are not cheap\n Q: Cheap mobil... |
How to copy a file from one directory to another using PHP ? - GeeksforGeeks | 25 Sep, 2019
The copy() function in PHP is used to copy a file from source to target or destination directory. It makes a copy of the source file to the destination file and if the destination file already exists, it gets overwritten. The copy() function returns true on success and false on failure.
Syntax:
bool copy( ... | [
{
"code": null,
"e": 25687,
"s": 25659,
"text": "\n25 Sep, 2019"
},
{
"code": null,
"e": 25975,
"s": 25687,
"text": "The copy() function in PHP is used to copy a file from source to target or destination directory. It makes a copy of the source file to the destination file and if... |
Maximum distinct nodes in a Root to leaf path - GeeksforGeeks | 10 Mar, 2022
Given a Binary Tree, find count of distinct nodes in all the root to leaf paths and print the maximum. Examples:
Input : 1
/ \
2 3
/ \ / \
4 5 6 3
\ \
8 9
Output : 4
The root to leaf path with maximum distinct
nodes is 1-3-6-8.
... | [
{
"code": null,
"e": 26537,
"s": 26509,
"text": "\n10 Mar, 2022"
},
{
"code": null,
"e": 26652,
"s": 26537,
"text": "Given a Binary Tree, find count of distinct nodes in all the root to leaf paths and print the maximum. Examples: "
},
{
"code": null,
"e": 26844,
... |
Kotlin | Plus and minus Operators - GeeksforGeeks | 05 Sep, 2019
In Kotlin, plus and minus operators are used to work with the list of objects which is usually referred to as Collections (List, Set, Maps).
As the name suggests, plus operator adds up or concatenates the elements or objects of the given collections. The elements of the first collection remains as it is an... | [
{
"code": null,
"e": 25763,
"s": 25735,
"text": "\n05 Sep, 2019"
},
{
"code": null,
"e": 25904,
"s": 25763,
"text": "In Kotlin, plus and minus operators are used to work with the list of objects which is usually referred to as Collections (List, Set, Maps)."
},
{
"code": ... |
Number of Triangles that can be formed given a set of lines in Euclidean Plane - GeeksforGeeks | 09 Jun, 2021
Given a set L = {l1, l2, ........., ln} of ‘n’ distinct lines on the Euclidean Plane. The ith line is given by an equation in the form aix + biy = ci. Find the number of triangles that can be formed using the lines in the set L. Note that no two pairs of lines intersect at the same point. Note: This proble... | [
{
"code": null,
"e": 26509,
"s": 26481,
"text": "\n09 Jun, 2021"
},
{
"code": null,
"e": 26911,
"s": 26509,
"text": "Given a set L = {l1, l2, ........., ln} of ‘n’ distinct lines on the Euclidean Plane. The ith line is given by an equation in the form aix + biy = ci. Find the num... |
Python | Check if all values are 0 in dictionary - GeeksforGeeks | 02 Aug, 2019
While working with dictionary, we might come to a problem in which we require to ensure that all the values are 0 in dictionary. This kind of problem can occur while checking status of start or checking for a bug/action that could have occurred. Let’s discuss certain ways in which this task can be performe... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n02 Aug, 2019"
},
{
"code": null,
"e": 25847,
"s": 25537,
"text": "While working with dictionary, we might come to a problem in which we require to ensure that all the values are 0 in dictionary. This kind of problem can occur whi... |
Different Ways of Installing Python's Numpy on Linux - GeeksforGeeks | 08 Oct, 2021
Numpy is a python library that is very popular in the field of data science because it makes the task of data processing very efficient, unlike conventional arrays. If you want to learn more about Numpy, please refer to this article.
Before we start with the installation steps, we have to make sure that yo... | [
{
"code": null,
"e": 26223,
"s": 26195,
"text": "\n08 Oct, 2021"
},
{
"code": null,
"e": 26457,
"s": 26223,
"text": "Numpy is a python library that is very popular in the field of data science because it makes the task of data processing very efficient, unlike conventional arrays... |
PHPunit | assertEquals() Function - GeeksforGeeks | 31 Jul, 2019
The assertEquals() function is a builtin function in PHPUnit and is used to assert whether the actual obtained value is equals to expected value or not. This assertion will return true in the case if the expected value is the same as the actual value else returns false. In case of true the asserted test ca... | [
{
"code": null,
"e": 26067,
"s": 26039,
"text": "\n31 Jul, 2019"
},
{
"code": null,
"e": 26415,
"s": 26067,
"text": "The assertEquals() function is a builtin function in PHPUnit and is used to assert whether the actual obtained value is equals to expected value or not. This asser... |
bucket_count and bucket_size in unordered_map in C++ | 03 Jan, 2022
Unordered_map is an associated container that stores elements formed by the combination of key-value and a mapped value. The key value is used to uniquely identify the element and the mapped value is the content associated with the key. Both key and value can be of any type predefined or user-defined.
Buc... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n03 Jan, 2022"
},
{
"code": null,
"e": 356,
"s": 52,
"text": "Unordered_map is an associated container that stores elements formed by the combination of key-value and a mapped value. The key value is used to uniquely identify the elemen... |
Indexed Priority Queue with Implementation | 12 Jul, 2022
Priority queue is a data structure in which data is stored on basis of its priority. In an Indexed Priority Queue, data is stored just like standard priority queue and along with this, the value of a data can be updated using its key. It is called “indexed” because a hash map can be used to store the inde... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 Jul, 2022"
},
{
"code": null,
"e": 695,
"s": 54,
"text": "Priority queue is a data structure in which data is stored on basis of its priority. In an Indexed Priority Queue, data is stored just like standard priority queue and along ... |
Chain of Responsibility Pattern | As the name suggests, the chain of responsibility pattern creates a chain of receiver objects for a request. This pattern decouples sender and receiver of a request based on type of request. This pattern comes under behavioral patterns.
In this pattern, normally each receiver contains reference to another receiver. I... | [
{
"code": null,
"e": 3122,
"s": 2885,
"text": "As the name suggests, the chain of responsibility pattern creates a chain of receiver objects for a request. This pattern decouples sender and receiver of a request based on type of request. This pattern comes under behavioral patterns."
},
{
"c... |
QuickSort on Doubly Linked List | 03 Jul, 2022
Following is a typical recursive implementation of QuickSort for arrays. The implementation uses last element as pivot.
C++
Java
Python3
C#
Javascript
/* A typical recursive implementation of Quicksort for array*/ /* This function takes last element as pivot, places the pivot element at its correct pos... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Jul, 2022"
},
{
"code": null,
"e": 175,
"s": 54,
"text": "Following is a typical recursive implementation of QuickSort for arrays. The implementation uses last element as pivot. "
},
{
"code": null,
"e": 179,
"s": 17... |
How to Read and Write a Text File in C#? | 01 Apr, 2020
Termination of a program leads to the deletion of all data related to it. Therefore, we need to store the data somewhere. Files are used for permanently storing and sharing data. C# can be used to retrieve and manipulate data stored in text files.
Reading a Text file: The file class in C# defines two stati... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Apr, 2020"
},
{
"code": null,
"e": 276,
"s": 28,
"text": "Termination of a program leads to the deletion of all data related to it. Therefore, we need to store the data somewhere. Files are used for permanently storing and sharing da... |
Visibility of elements in bootstrap with Examples | 22 Sep, 2021
There are some situations where it is needed to hide some content on a webpage without affecting the layout of the page. Bootstrap uses the CSS visibility property and provide two classes visible and invisible to control the visibility of an element on a web page.These classes do not affect the layout i.e.... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Sep, 2021"
},
{
"code": null,
"e": 839,
"s": 54,
"text": "There are some situations where it is needed to hide some content on a webpage without affecting the layout of the page. Bootstrap uses the CSS visibility property and provid... |
Python – Swapping Hierarchy in Nested Dictionaries | 16 Jun, 2021
Sometimes, while working with Python dictionaries, we can have a problem in which we need to perform hierarchy swapping of nested dictionaries. This problem can have application in domains which require dictionary restructuring. Let’s discuss certain ways in which this task can be performed.
Input : test_... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Jun, 2021"
},
{
"code": null,
"e": 322,
"s": 28,
"text": "Sometimes, while working with Python dictionaries, we can have a problem in which we need to perform hierarchy swapping of nested dictionaries. This problem can have applicati... |
turtle.seth() function in Python | 21 Jul, 2020
The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support.
This method is used to set the orientation of the turtle to to_angle. This method requires... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jul, 2020"
},
{
"code": null,
"e": 245,
"s": 28,
"text": "The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a ver... |
tracepath command in Linux with Examples | 03 Apr, 2019
tracepath command in Linux is used to traces path to destination discovering MTU along this path. It uses UDP port or some random port. It is similar to traceroute, but it does not require superuser privileges and has no fancy options. tracepath6 is a good replacement for traceroute6 and classic example of... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Apr, 2019"
},
{
"code": null,
"e": 644,
"s": 28,
"text": "tracepath command in Linux is used to traces path to destination discovering MTU along this path. It uses UDP port or some random port. It is similar to traceroute, but it doe... |
Longest Ordered Subsequence of Vowels | 21 Jun, 2022
Given a string consisting of only vowels, find the longest subsequence in the given string such that it consists of all five vowels and is a sequence of one or more a’s, followed by one or more e’s, followed by one or more i’s, followed by one or more o’s and followed by one or more u’s.
If there is more ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 342,
"s": 52,
"text": "Given a string consisting of only vowels, find the longest subsequence in the given string such that it consists of all five vowels and is a sequence of one or more a’s, foll... |
Exceptions in Java | 23 Jun, 2022
Exception Handling in Java is one of the effective means to handle the runtime errors so that the regular flow of the application can be preserved. Java Exception Handling is a mechanism to handle runtime errors such as ClassNotFoundException, IOException, SQLException, RemoteException, etc.
Exception is a... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 345,
"s": 52,
"text": "Exception Handling in Java is one of the effective means to handle the runtime errors so that the regular flow of the application can be preserved. Java Exception Handling is... |
Python Pandas - How to select multiple rows from a DataFrame | To select multiple rows from a DataFrame, set the range using the : operator. At first, import the require pandas library with alias −
import pandas as pd
Now, create a new Pandas DataFrame −
dataFrame = pd.DataFrame([[10, 15], [20, 25], [30, 35], [40, 45]],index=['w', 'x', 'y', 'z'],columns=['a', 'b'])
Select multiple... | [
{
"code": null,
"e": 1322,
"s": 1187,
"text": "To select multiple rows from a DataFrame, set the range using the : operator. At first, import the require pandas library with alias −"
},
{
"code": null,
"e": 1342,
"s": 1322,
"text": "import pandas as pd"
},
{
"code": null,... |
Top 50 C# Interview Questions & Answers | 13 Jul, 2021
C# is a modern, object-oriented, and general-purpose programming language. It was developed by Microsoft with the .NET initiative. Here, we have covered the top 50 C# interview questions with their answers. These are frequently asked interview questions in C# interviews and designed for freshers. So let’s ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 373,
"s": 53,
"text": "C# is a modern, object-oriented, and general-purpose programming language. It was developed by Microsoft with the .NET initiative. Here, we have covered the top 50 C# intervi... |
Python Program to create a sub-dictionary containing all keys from dictionary list | 04 Oct, 2021
Given the dictionary list, our task is to create a new dictionary list that contains all the keys, if not, then assign None to the key and persist of each dictionary.
Example:
Input : test_list = [{‘gfg’ : 3, ‘is’ : 7}, {‘gfg’ : 3, ‘is’ : 1, ‘best’ : 5}, {‘gfg’ : 8}]
Output : [{‘is’: 7, ‘best’: None, ‘gfg’... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Oct, 2021"
},
{
"code": null,
"e": 195,
"s": 28,
"text": "Given the dictionary list, our task is to create a new dictionary list that contains all the keys, if not, then assign None to the key and persist of each dictionary."
},
... |
Python Program to Reverse a linked list | 06 Jul, 2022
Given pointer to the head node of a linked list, the task is to reverse the linked list. We need to reverse the list by changing links between nodes.
Examples:
Input : Head of following linked list
1->2->3->4->NULL
Output : Linked list should be changed to,
4->3->2->1->NULL
Input : Head o... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 202,
"s": 52,
"text": "Given pointer to the head node of a linked list, the task is to reverse the linked list. We need to reverse the list by changing links between nodes."
},
{
"code": nu... |
Java Program to Extract a Single Quote Enclosed String From a Larger String using Regex | 05 Oct, 2021
Problem Statement: Given a String extract the substring enclosed in single quotes (‘) using Java Regex.
Java regex is an API for pattern matching with regular expression. ‘java.util.regex’ is a class used for CharSequence< interface in order to support matching against characters from a wide variety of in... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Oct, 2021"
},
{
"code": null,
"e": 157,
"s": 52,
"text": "Problem Statement: Given a String extract the substring enclosed in single quotes (‘) using Java Regex. "
},
{
"code": null,
"e": 580,
"s": 157,
"text": "... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.