title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to toggle between a like/dislike button with CSS and JavaScript? | To toggle between like/dislike button with CSS and JavaScript, the code is as follows −
Live Demo
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sa... | [
{
"code": null,
"e": 1150,
"s": 1062,
"text": "To toggle between like/dislike button with CSS and JavaScript, the code is as follows −"
},
{
"code": null,
"e": 1161,
"s": 1150,
"text": " Live Demo"
},
{
"code": null,
"e": 1964,
"s": 1161,
"text": "<!DOCTYPE ht... |
\iint - Tex Command | \iint - Used to draw two occurrences of integration symbol.
{ \iint }
\iint command is used to draw two occurrences of integration symbol.
\iint
∫∫
\iint
∫∫
\iint
14 Lectures
52 mins
Ashraf Said
11 Lectures
1 hours
Ashraf Said
9 Lectures
1 hours
Emenwa Global, Ejike Ifea... | [
{
"code": null,
"e": 8046,
"s": 7986,
"text": "\\iint - Used to draw two occurrences of integration symbol."
},
{
"code": null,
"e": 8056,
"s": 8046,
"text": "{ \\iint }"
},
{
"code": null,
"e": 8125,
"s": 8056,
"text": "\\iint command is used to draw two occu... |
jMeter - Listeners | Listeners provide access to the information JMeter gathers about the test cases while JMeter runs. The results or information gathered by listeners can be shown in the form of −
tree
tables
graphs
log file
All listeners write the same raw data to the output file when one is specified.
The default items to be saved can ... | [
{
"code": null,
"e": 2083,
"s": 1905,
"text": "Listeners provide access to the information JMeter gathers about the test cases while JMeter runs. The results or information gathered by listeners can be shown in the form of −"
},
{
"code": null,
"e": 2088,
"s": 2083,
"text": "tree... |
How to force garbage collection in C#? | Yes it is possible to force garbage collector in C# to run by calling Collect() method
This is not considered a good practice because this might create a performance over
head. Collect() Forces an immediate garbage collection of all generations.
Collect(Int32)Forces an immediate garbage collection from generation 0 thr... | [
{
"code": null,
"e": 1149,
"s": 1062,
"text": "Yes it is possible to force garbage collector in C# to run by calling Collect() method"
},
{
"code": null,
"e": 1308,
"s": 1149,
"text": "This is not considered a good practice because this might create a performance over\nhead. Coll... |
Different ways to initialize a variable in C/C++ - GeeksforGeeks | 15 Oct, 2019
Variables are arbitrary names given to a memory location in the system. These memory locations addresses in the memory. Suppose we want to save our marks in memory. Now, these marks will get saved at a particular address in the memory. Now, whenever these marks will be updated, they will be stored at a dif... | [
{
"code": null,
"e": 24515,
"s": 24487,
"text": "\n15 Oct, 2019"
},
{
"code": null,
"e": 25202,
"s": 24515,
"text": "Variables are arbitrary names given to a memory location in the system. These memory locations addresses in the memory. Suppose we want to save our marks in memory... |
Batch Script - Syntax | Normally, the first line in a batch file often consists of the following command.
@echo off
By default, a batch file will display its command as it runs. The purpose of this first command is to turn off this display. The command "echo off" turns off the display for the whole script, except for the "echo off" command i... | [
{
"code": null,
"e": 2251,
"s": 2169,
"text": "Normally, the first line in a batch file often consists of the following command."
},
{
"code": null,
"e": 2262,
"s": 2251,
"text": "@echo off\n"
},
{
"code": null,
"e": 2566,
"s": 2262,
"text": "By default, a bat... |
Tryit Editor v3.7 | HTML file paths
Tryit: relative url | [
{
"code": null,
"e": 26,
"s": 10,
"text": "HTML file paths"
}
] |
XMLRPC server and client modules in Python | We can create our own cross-platform, language-independent server using the XML-RPC protocol.We use the SimpleXMLRPCServer to create the SimpleXMLRPCServer instance and tell it to listen for incoming requests. Next we define some functions to be part of the service and register those functions so that the server knows ... | [
{
"code": null,
"e": 1398,
"s": 1062,
"text": "We can create our own cross-platform, language-independent server using the XML-RPC protocol.We use the SimpleXMLRPCServer to create the SimpleXMLRPCServer instance and tell it to listen for incoming requests. Next we define some functions to be part of... |
Difference Between find( ) and index( ) in Python - GeeksforGeeks | 24 Jan, 2021
In Python, to find the index of a substring in a string can be located by python’s in-built function using find() or index(). Both of them return the starting index of the substring in a string if it exists. This article discusses which one to use when and why.
The index() method returns the index of a sub... | [
{
"code": null,
"e": 24317,
"s": 24289,
"text": "\n24 Jan, 2021"
},
{
"code": null,
"e": 24579,
"s": 24317,
"text": "In Python, to find the index of a substring in a string can be located by python’s in-built function using find() or index(). Both of them return the starting inde... |
Find mismatch item on same index in two list in Python | Sometimes we may need to compare elements in two python lists in terms of both their value and position or index. In this article we will see how to find out the elements in two lists at the same position which do not match in their value.
we can design for loop to compare the values at similar indexes. Id the values d... | [
{
"code": null,
"e": 1302,
"s": 1062,
"text": "Sometimes we may need to compare elements in two python lists in terms of both their value and position or index. In this article we will see how to find out the elements in two lists at the same position which do not match in their value."
},
{
... |
Scala Int abs() method with example - GeeksforGeeks | 03 Nov, 2019
The abs() method is utilized to return the absolute value of the given integer value. The absolute value of any number is the magnitude of that number i.e, without any sign.
Method Definition: (Signed_Integer_Value).absReturn Type: It return the absolute value of the given signed integer value.
Example #1:... | [
{
"code": null,
"e": 25413,
"s": 25385,
"text": "\n03 Nov, 2019"
},
{
"code": null,
"e": 25587,
"s": 25413,
"text": "The abs() method is utilized to return the absolute value of the given integer value. The absolute value of any number is the magnitude of that number i.e, without... |
Building a Fake News Classifier Using Natural Language Processing | by Nathan Gunawan | Towards Data Science | Look, I’m not here to pick sides. Donald Trump is merely my scape-goat for my using of the term “fake news”, but whether or not you’re a Republican or Democrat, social-media junkie or forested hermit, you have to admit that our rapidly digitalizing, polarized world is running into a certain problem: fake news. Whether ... | [
{
"code": null,
"e": 1199,
"s": 172,
"text": "Look, I’m not here to pick sides. Donald Trump is merely my scape-goat for my using of the term “fake news”, but whether or not you’re a Republican or Democrat, social-media junkie or forested hermit, you have to admit that our rapidly digitalizing, pola... |
K-Means Clustering for Unsupervised Machine Learning | by Nick Minaie, PhD | Towards Data Science | Artificial Intelligence (AI) and Machine Learning (ML) have revolutionized every aspect of our life and disrupted how we do business, unlike any other technology in the the history of mankind. Such disruption brings many challenges for professionals and businesses. In this article, I will provide an introduction to one... | [
{
"code": null,
"e": 553,
"s": 171,
"text": "Artificial Intelligence (AI) and Machine Learning (ML) have revolutionized every aspect of our life and disrupted how we do business, unlike any other technology in the the history of mankind. Such disruption brings many challenges for professionals and b... |
How powerful can an ensemble of linear models be? | by Sarthak Vajpayee | Towards Data Science | With the rapid growth of deep learning algorithms in recent years, today they have become a state of the art in AI. And this makes me wonder if the traditional and old school machine learning techniques like Linear Regression, Support Vector Machines, etc are still decent enough that they can go head to head with deep ... | [
{
"code": null,
"e": 716,
"s": 172,
"text": "With the rapid growth of deep learning algorithms in recent years, today they have become a state of the art in AI. And this makes me wonder if the traditional and old school machine learning techniques like Linear Regression, Support Vector Machines, etc... |
Data Science Skills: Web scraping using python | by Kerry Parker | Towards Data Science | One of the first tasks that I was given in my job as a Data Scientist involved Web Scraping. This was a completely alien concept to me at the time, gathering data from websites using code, but is one of the most logical and easily accessible sources of data. After a few attempts, web scraping has become second nature t... | [
{
"code": null,
"e": 548,
"s": 171,
"text": "One of the first tasks that I was given in my job as a Data Scientist involved Web Scraping. This was a completely alien concept to me at the time, gathering data from websites using code, but is one of the most logical and easily accessible sources of da... |
Implement mean shift algorithm in Python | There are many types of clustering algorithms in Machine Learning. These algorithms can be implemented in Python. In this article, let us discuss and implement the ‘Mean−Shift’ algorithm using Python. It is a clustering algorithm that is used as an unsupervised learning method.
In this algorithm, no assumptions are mad... | [
{
"code": null,
"e": 1341,
"s": 1062,
"text": "There are many types of clustering algorithms in Machine Learning. These algorithms can be implemented in Python. In this article, let us discuss and implement the ‘Mean−Shift’ algorithm using Python. It is a clustering algorithm that is used as an unsu... |
Bitwise AND of all the odd numbers from 1 to N - GeeksforGeeks | 05 May, 2021
Given an integer N, the task is to find the bitwise AND (&) of all the odd integers from the range [1, N].
Examples:
Input: N = 7 Output: 1 (1 & 3 & 5 & 7) = 1
Input: N = 1 Output: 1
Naive approach: Starting from 1, bitwise AND all the odd numbers ≤ N.
Below is the implementation of the above approach:
... | [
{
"code": null,
"e": 25012,
"s": 24984,
"text": "\n05 May, 2021"
},
{
"code": null,
"e": 25119,
"s": 25012,
"text": "Given an integer N, the task is to find the bitwise AND (&) of all the odd integers from the range [1, N]."
},
{
"code": null,
"e": 25130,
"s": 251... |
Check if two given key sequences construct same BSTs - GeeksforGeeks | 17 Aug, 2021
Given two arrays which represent two sequences of keys that are used to create BSTs. Imagine we make a Binary Search Tree (BST) from each array. We need to tell whether two BSTs will be identical or not without actually constructing the tree.
Examples:
Let the input arrays be a[] and b[]
Example 1:
a[] ... | [
{
"code": null,
"e": 24429,
"s": 24401,
"text": "\n17 Aug, 2021"
},
{
"code": null,
"e": 24673,
"s": 24429,
"text": "Given two arrays which represent two sequences of keys that are used to create BSTs. Imagine we make a Binary Search Tree (BST) from each array. We need to tell wh... |
Create a Tree of numbers [1, N] following K triplets (A, B, C) such that any path from A to C cannot contain B - GeeksforGeeks | 06 Dec, 2021
Given an integer N representing numbers [1, N] and K restrictions in the form of triplets {A, B, C}, such that any simple path from A to C cannot contain B. The task is to create a Tree of numbers [1, N] following these K restrictions and print the edges of that tree. Assume that the tree always exists for... | [
{
"code": null,
"e": 25292,
"s": 25264,
"text": "\n06 Dec, 2021"
},
{
"code": null,
"e": 25632,
"s": 25292,
"text": "Given an integer N representing numbers [1, N] and K restrictions in the form of triplets {A, B, C}, such that any simple path from A to C cannot contain B. The ta... |
What is runtime polymorphism or dynamic method overloading? | Polymorphism is the ability of an object to take on many forms. The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object. Method overriding by a subclass is termed as runtime polymorphism. JVM determines the method to be executed at runtime instead of comp... | [
{
"code": null,
"e": 1393,
"s": 1062,
"text": "Polymorphism is the ability of an object to take on many forms. The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object. Method overriding by a subclass is termed as runtime polymorphism. ... |
Program to check if an Array is Palindrome or not using STL in C++ | 19 Mar, 2019
Given an array, the task is to determine whether an array is a palindrome or not, using STL in C++.
Examples:
Input: arr[] = {3, 6, 0, 6, 3}
Output: Palindrome
Input: arr[] = {1, 2, 3, 4, 5}
Output: Not Palindrome
Approach:
Get the reverse of the Array using reverse() method, provided in STL.
Initialise ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Mar, 2019"
},
{
"code": null,
"e": 128,
"s": 28,
"text": "Given an array, the task is to determine whether an array is a palindrome or not, using STL in C++."
},
{
"code": null,
"e": 138,
"s": 128,
"text": "Exampl... |
Recursive Insertion Sort | 11 Jul, 2022
Insertion sort is a simple sorting algorithm that works the way we sort playing cards in our hands.Below is an iterative algorithm for insertion sortAlgorithm
// Sort an arr[] of size n
insertionSort(arr, n)
Loop from i = 1 to n-1.
a) Pick element arr[i] and insert
it into sorted seq... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Jul, 2022"
},
{
"code": null,
"e": 212,
"s": 52,
"text": "Insertion sort is a simple sorting algorithm that works the way we sort playing cards in our hands.Below is an iterative algorithm for insertion sortAlgorithm "
},
{
... |
How to find the maximum value of an array in JavaScript? | we can find the Maximum value of an array using Math.max() and sort() functions.
Math.max() function usually takes all the elements in an array and scrutinize each and every value to get the maximum value.It's methodology is discussed in the below example.
Live Demo
<html>
<body>
<script>
function maximum(value) {
... | [
{
"code": null,
"e": 1268,
"s": 1187,
"text": "we can find the Maximum value of an array using Math.max() and sort() functions."
},
{
"code": null,
"e": 1445,
"s": 1268,
"text": "Math.max() function usually takes all the elements in an array and scrutinize each and every value to... |
Explain about Modigliani – miller theory of capital structure. | Company finances its assets by capital structure. It can finance its assets by either only equity or combination of debt and equity.
Modigliani and miller proposed a theory in 1950s, which says, valuation of a company is irrelevant to its capital structure. It is also irrelevant, to whether company is highly leveraged ... | [
{
"code": null,
"e": 1320,
"s": 1187,
"text": "Company finances its assets by capital structure. It can finance its assets by either only equity or combination of debt and equity."
},
{
"code": null,
"e": 1668,
"s": 1320,
"text": "Modigliani and miller proposed a theory in 1950s,... |
std::string::data() in C++ | 06 Jul, 2017
The data() function writes the characters of the string into an array. It returns a pointer to the array, obtained from conversion of string to the array. Its Return type is not a valid C-string as no ‘\0’ character gets appended at the end of array.Syntax:
const char* data() const;
char* is the pointer to... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jul, 2017"
},
{
"code": null,
"e": 286,
"s": 28,
"text": "The data() function writes the characters of the string into an array. It returns a pointer to the array, obtained from conversion of string to the array. Its Return type is n... |
Send SMS updates to mobile phone using python | 03 Jul, 2022
If you are running any python script and want to send regular updates from your script to your mobile phone through SMS, you can use SinchSMS API to send SMS.Approach : Create an app on Sinch and get the key and secret of the app and use these credentials in the following script to send SMS to your mobile.... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Jul, 2022"
},
{
"code": null,
"e": 706,
"s": 54,
"text": "If you are running any python script and want to send regular updates from your script to your mobile phone through SMS, you can use SinchSMS API to send SMS.Approach : Creat... |
System.identityHashCode() Method in Java With Examples | 15 Oct, 2019
The java.lang.System.identityHashCode() is the method which is used to return the same hash code for any given object that is returned by the default method hashCode(). Also, for every hash code with a null reference zero is returned.
Points to be Remembered:
By default, every class either implicitly or ex... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Oct, 2019"
},
{
"code": null,
"e": 263,
"s": 28,
"text": "The java.lang.System.identityHashCode() is the method which is used to return the same hash code for any given object that is returned by the default method hashCode(). Also, ... |
IPv4 Classless Subnet equation | 09 Aug, 2019
Prerequisite – Classless Addressing, SupernettingProblem – How to calculate IP address subnet information (Network, Broadcast, First IP, Last IP)?It’s too simple equation to calculate IPv4 Subnet Network ID.
*Used and Tested with Class C Subnets.
First Of All, Keep this Subnet Hosts Map in mind (Number of ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Aug, 2019"
},
{
"code": null,
"e": 236,
"s": 28,
"text": "Prerequisite – Classless Addressing, SupernettingProblem – How to calculate IP address subnet information (Network, Broadcast, First IP, Last IP)?It’s too simple equation to c... |
Digital Band Reject Butterworth Filter in Python | 03 Jan, 2021
In this article, we are going to discuss how to design a Digital Band Reject Butterworth Filter using Python. The Butterworth filter is a type of signal processing filter designed to have a frequency response as flat as possible in the pass band. Let us take the below specifications to design the filter an... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Jan, 2021"
},
{
"code": null,
"e": 420,
"s": 28,
"text": "In this article, we are going to discuss how to design a Digital Band Reject Butterworth Filter using Python. The Butterworth filter is a type of signal processing filter desi... |
OpenCV Python Program to blur an image | 22 Jul, 2021
Note: This post contains codes that cannot be run using an online compiler. Please make sure that you have Python 2.7 and cv2 module installed before trying to run the program on your system.
Hi everyone! I read a brilliant work by Aditya Prakash – OpenCV C++ Program to blur an image, so I decided to come ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 244,
"s": 52,
"text": "Note: This post contains codes that cannot be run using an online compiler. Please make sure that you have Python 2.7 and cv2 module installed before trying to run the progra... |
HTML - <layer> Tag | The HTML <layer> tag is used to position and animate (through scripting) elements in a page. A layer can be thought of as a separate document that resides on top of the main one, all existing within one window.
This tag has support in Netscape 4 and higher versions of it.
This example creates three overlapping layers. ... | [
{
"code": null,
"e": 2719,
"s": 2508,
"text": "The HTML <layer> tag is used to position and animate (through scripting) elements in a page. A layer can be thought of as a separate document that resides on top of the main one, all existing within one window."
},
{
"code": null,
"e": 2781,... |
Priority CPU Scheduling with different arrival time – Set 2 | 08 Dec, 2021
Prerequisite – Program for Priority Scheduling – Set 1Priority scheduling is a non-preemptive algorithm and one of the most common scheduling algorithms in batch systems. Each process is assigned first arrival time (less arrival time process first) if two processes have same arrival time, then compare to p... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n08 Dec, 2021"
},
{
"code": null,
"e": 555,
"s": 54,
"text": "Prerequisite – Program for Priority Scheduling – Set 1Priority scheduling is a non-preemptive algorithm and one of the most common scheduling algorithms in batch systems. Eac... |
Find the duration of difference between two dates in Java | 02 Jul, 2020
Given two dates start_date and end_date with time in the form of strings, the task is to find the difference between two dates in Java.
Examples:
Input: start_date = “10-01-2018 01:10:20”, end_date = “10-06-2020 06:30:50”Output: 2 years, 152 days, 5 hours, 20 minutes, 30 seconds
Input: start_date = “10-01-... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Jul, 2020"
},
{
"code": null,
"e": 164,
"s": 28,
"text": "Given two dates start_date and end_date with time in the form of strings, the task is to find the difference between two dates in Java."
},
{
"code": null,
"e": 17... |
Length of the smallest sub-string consisting of maximum distinct characters | 25 Jun, 2022
Given a string of length N, find the length of the smallest sub-string consisting of maximum distinct characters. Note : Our output can have same character.
Examples:
Input : "AABBBCBB"
Output : 5
Input : "AABBBCBBAC"
Output : 3
Explanation : Sub-string -> "BAC"
Input : "GEEKSGEEKSFOR"
Output : 8
Expla... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Jun, 2022"
},
{
"code": null,
"e": 210,
"s": 52,
"text": "Given a string of length N, find the length of the smallest sub-string consisting of maximum distinct characters. Note : Our output can have same character. "
},
{
"c... |
Python – Sort Dictionary by Values and Keys | 01 Aug, 2020
Given a dictionary, sort according to descended values, if similar values, then by keys lexicographically.
Input : test_dict = {“gfg” : 1, “is” : 1, “best” : 1, “for” : 1, “geeks” : 1}Output : {“best” : 1, “is” : 1, “for” : 1, “geeks” : 1, “gfg” : 1}Explanation : All values are equal, hence lexicographica... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 136,
"s": 28,
"text": "Given a dictionary, sort according to descended values, if similar values, then by keys lexicographically. "
},
{
"code": null,
"e": 352,
"s": 136,
"text":... |
Comparison between MongoDB vs. Cassandra | 29 Jun, 2021
In this article we will discuss about similarities and differences between MongoDB and Cassandra.1. MongoDB :MongoDB is a cross-platform document-oriented database program. It is an open-source document database, which stores the data in the form of key-value pairs.
Supported Languages : C++, Go, JavaScrip... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jun, 2021"
},
{
"code": null,
"e": 295,
"s": 28,
"text": "In this article we will discuss about similarities and differences between MongoDB and Cassandra.1. MongoDB :MongoDB is a cross-platform document-oriented database program. It... |
File getAbsoluteFile() method in Java with Examples | 30 Jan, 2019
The getAbsoluteFile() method is a part of File class. This function returns the absolute File object of the given abstract pathname. The absolute file or directory points to the same file or directory as the given File object.
For Example: If we create a file object using the path as “program.txt”, it poin... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jan, 2019"
},
{
"code": null,
"e": 255,
"s": 28,
"text": "The getAbsoluteFile() method is a part of File class. This function returns the absolute File object of the given abstract pathname. The absolute file or directory points to t... |
dstat Command in Linux With Examples | 02 Jun, 2021
dstat is a tool that is used to retrieve information or statistics form components of the system such as network connections, IO devices, or CPU, etc. It is generally used by system administrators to retrieve a handful of information about the above-mentioned components of the system. It itself performs li... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Jun, 2021"
},
{
"code": null,
"e": 490,
"s": 28,
"text": "dstat is a tool that is used to retrieve information or statistics form components of the system such as network connections, IO devices, or CPU, etc. It is generally used by ... |
Collect.js toArray() Method | 03 Dec, 2020
The toArray() method is used to convert the given collection into a normal array. An array containing the values will be returned if the collection is an object.
Syntax:
collect(array).toArray()
Parameters: The collect() method takes one argument that is converted into the collection and the toArray() meth... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Dec, 2020"
},
{
"code": null,
"e": 190,
"s": 28,
"text": "The toArray() method is used to convert the given collection into a normal array. An array containing the values will be returned if the collection is an object."
},
{
... |
DateTimeOffset.ToLocalTime() Method in C# | 27 Feb, 2019
DateTimeOffset.ToLocalTime Method is used to convert the current DateTimeOffset object to a DateTimeOffset object which represents the local time.
Syntax: public DateTimeOffset ToLocalTime ();
Return Value: This method returns an object that represents the date and time of the current DateTimeOffset object... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Feb, 2019"
},
{
"code": null,
"e": 175,
"s": 28,
"text": "DateTimeOffset.ToLocalTime Method is used to convert the current DateTimeOffset object to a DateTimeOffset object which represents the local time."
},
{
"code": null,
... |
Regex Boundary Matchers in Java | 24 May, 2019
Prerequisite- Regular Expressions in Java
Boundary matches can help us find where in the string match is taking place. You can make your pattern matches more precise by specifying such information with boundary matchers. For example, maybe you’re interested in finding a particular word, but only if it appe... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 May, 2019"
},
{
"code": null,
"e": 96,
"s": 54,
"text": "Prerequisite- Regular Expressions in Java"
},
{
"code": null,
"e": 512,
"s": 96,
"text": "Boundary matches can help us find where in the string match is ta... |
How to pass form variables from one page to other page in PHP ? | 31 Jul, 2021
Form is an HTML element used to collect information from the user in a sequential and organized manner. This information can be sent to the back-end services if required by them, or it can also be stored in a database using DBMS like MySQL. Splitting a form into multiple steps or pages allow better data ha... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n31 Jul, 2021"
},
{
"code": null,
"e": 708,
"s": 52,
"text": "Form is an HTML element used to collect information from the user in a sequential and organized manner. This information can be sent to the back-end services if required by t... |
Java floor() method with Examples | 08 Apr, 2018
The java.lang.Math.floor() returns the double value that is less than or equal to the argument and is equal to the nearest mathematical integer.Note:
If the argument is Integer, then the result is Integer.
If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n08 Apr, 2018"
},
{
"code": null,
"e": 203,
"s": 53,
"text": "The java.lang.Math.floor() returns the double value that is less than or equal to the argument and is equal to the nearest mathematical integer.Note:"
},
{
"code": nu... |
iptables command in Linux with Examples | 22 May, 2019
iptables is a command line interface used to set up and maintain tables for the Netfilter firewall for IPv4, included in the Linux kernel. The firewall matches packets with rules defined in these tables and then takes the specified action on a possible match.
Tables is the name for a set of chains.
Chain i... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 May, 2019"
},
{
"code": null,
"e": 312,
"s": 52,
"text": "iptables is a command line interface used to set up and maintain tables for the Netfilter firewall for IPv4, included in the Linux kernel. The firewall matches packets with r... |
Divide the Data into Groups in R Programming – split() function | 30 Jun, 2020
split() function in R Language is used to divide a data vector into groups as defined by the factor provided.
Syntax: split(x, f, drop = FALSE)
Parameters:x: represents data vector or data framef: represents factor to divide the datadrop: represents logical value which indicates if levels that do not occur... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jun, 2020"
},
{
"code": null,
"e": 138,
"s": 28,
"text": "split() function in R Language is used to divide a data vector into groups as defined by the factor provided."
},
{
"code": null,
"e": 172,
"s": 138,
"text... |
How to use the ValidateRange attribute in PowerShell function? | Validation parameters are a set of rules that you define on the PowerShell variable and restrict users from entering some values and binding users to enter values in the specific domain. If there are not validation parameters the script would be lengthy. The ValidateRange attribute is one of them.
This parameter is to ... | [
{
"code": null,
"e": 1486,
"s": 1187,
"text": "Validation parameters are a set of rules that you define on the PowerShell variable and restrict users from entering some values and binding users to enter values in the specific domain. If there are not validation parameters the script would be lengthy... |
How to use Glob() function to find files recursively in Python? | 25 Apr, 2020
Glob is a general term used to define techniques to match specified patterns according to rules related to Unix shell. Linux and Unix systems and shells also support glob and also provide function glob() in system libraries.
In Python, the glob module is used to retrieve files/pathnames matching a specifie... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n25 Apr, 2020"
},
{
"code": null,
"e": 279,
"s": 54,
"text": "Glob is a general term used to define techniques to match specified patterns according to rules related to Unix shell. Linux and Unix systems and shells also support glob and... |
Decision Tree Introduction with example | 18 May, 2022
Decision tree algorithm falls under the category of supervised learning. They can be used to solve both regression and classification problems.
Decision tree uses the tree representation to solve the problem in which each leaf node corresponds to a class label and attributes are represented on the internal... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 May, 2022"
},
{
"code": null,
"e": 198,
"s": 54,
"text": "Decision tree algorithm falls under the category of supervised learning. They can be used to solve both regression and classification problems."
},
{
"code": null,
... |
Count pairs whose product modulo 10^9 + 7 is equal to 1 | 21 Jan, 2021
Given an array arr[], the task is to count the number of unordered pairs (arr[i], arr[j]) from the given array such that (arr[i] * arr[j]) % 109 + 7 is equal to 1.
Example:
Input: arr[] = {2, 236426, 280311812, 500000004}Output: 2Explanation: Two such pairs from the given array are:
(2 * 500000004) % 1000... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Jan, 2021"
},
{
"code": null,
"e": 192,
"s": 28,
"text": "Given an array arr[], the task is to count the number of unordered pairs (arr[i], arr[j]) from the given array such that (arr[i] * arr[j]) % 109 + 7 is equal to 1."
},
{
... |
Python | Accessing index and value in list | 27 Nov, 2018
There are various methods to access the elements of a list, but sometimes we may require to access element along with the index on which it is found.
Let’s see all the different way of accessing both index and value in a list.
Method #1 : Naive method
This is the most generic method that can be possibly em... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n27 Nov, 2018"
},
{
"code": null,
"e": 203,
"s": 53,
"text": "There are various methods to access the elements of a list, but sometimes we may require to access element along with the index on which it is found."
},
{
"code": nu... |
Encrypt and decrypt text file using C++ | 19 Oct, 2021
Encryption in cryptography is a process by which a plain text or a piece of information is converted into ciphertext or a text which can only be decoded by the receiver for whom the information was intended. The algorithm that is used for the process of encryption is known as a cipher. It helps protect con... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Oct, 2021"
},
{
"code": null,
"e": 593,
"s": 54,
"text": "Encryption in cryptography is a process by which a plain text or a piece of information is converted into ciphertext or a text which can only be decoded by the receiver for w... |
How to find the index of an element in an array using PHP ? | 13 Oct, 2021
In this article, we will discuss how to find the index of an element in an array in PHP. Array indexing starts from 0 to n-1. We can get the array index by using the array_search() function. This function is used to search for the given element. It will accept two parameters.
Syntax:
array_search('element'... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Oct, 2021"
},
{
"code": null,
"e": 305,
"s": 28,
"text": "In this article, we will discuss how to find the index of an element in an array in PHP. Array indexing starts from 0 to n-1. We can get the array index by using the array_sea... |
R – Create empty vector and append values | 29 Jul, 2021
In this article, we will discuss how to create an empty vector and add elements into a vector in R Programming Language. An empty vector can be created by simply not passing any value while creating a regular vector using the c() function.
Syntax:
c()
This will return NULL as an output.
Example:
R
# create... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n29 Jul, 2021"
},
{
"code": null,
"e": 293,
"s": 53,
"text": "In this article, we will discuss how to create an empty vector and add elements into a vector in R Programming Language. An empty vector can be created by simply not passing ... |
Python – Extract date in String | 09 May, 2021
Given a string, the task is to write a Python program to extract date from it.
Input : test_str = "gfg at 2021-01-04"
Output : 2021-01-04
Explanation : Date format string found.
Input : test_str = "2021-01-04 for gfg"
Output : 2021-01-04
Explanation : Date format string found.
Method #1 : Using re.search(... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 May, 2021"
},
{
"code": null,
"e": 107,
"s": 28,
"text": "Given a string, the task is to write a Python program to extract date from it."
},
{
"code": null,
"e": 307,
"s": 107,
"text": "Input : test_str = \"gfg at... |
Reinforcement Learning — TD(λ) Introduction(1) | by Jeremy Zhang | Towards Data Science | In this article, we will be talking about TD(λ), which is a generic reinforcement learning method that unifies both Monte Carlo simulation and 1-step TD method. We have been talking about TD method exhaustively, and if you remember, in TD(n) method, I have said it is also a unification of MC simulation and 1-step TD, b... | [
{
"code": null,
"e": 676,
"s": 172,
"text": "In this article, we will be talking about TD(λ), which is a generic reinforcement learning method that unifies both Monte Carlo simulation and 1-step TD method. We have been talking about TD method exhaustively, and if you remember, in TD(n) method, I hav... |
What In The World Are QQ Plots?. Understanding What QQ Plots Do And How... | by Tony Yiu | Towards Data Science | If you’ve ever used a linear regression or worked with statistical tools that require the data (or the errors) to be normally distributed, then you’ve probably run into QQ plots before. You probably don’t remember much about them besides that a straight QQ plot (45 degree line) is good.
But QQ plots are actually a real... | [
{
"code": null,
"e": 459,
"s": 171,
"text": "If you’ve ever used a linear regression or worked with statistical tools that require the data (or the errors) to be normally distributed, then you’ve probably run into QQ plots before. You probably don’t remember much about them besides that a straight Q... |
Yii - Overview | The Yii[ji:] framework is an open-source PHP framework for rapidly-developing, modern Web applications. It is built around the Model-View-Controller composite pattern.
Yii provides secure and professional features to create robust projects rapidly. The Yii framework has a component-based architecture and a full solid c... | [
{
"code": null,
"e": 3001,
"s": 2833,
"text": "The Yii[ji:] framework is an open-source PHP framework for rapidly-developing, modern Web applications. It is built around the Model-View-Controller composite pattern."
},
{
"code": null,
"e": 3456,
"s": 3001,
"text": "Yii provides s... |
MathF.Truncate() Method in C# with Examples | The MathF.Truncate() method in C# is used to calculate an integral part of a specified single number or single-precision floating-point number.
Following is the syntax −
public static float Truncate (float val);
Above, Val is the specified number to be truncated
Let us now see an example to implement the MathF.Truncate... | [
{
"code": null,
"e": 1206,
"s": 1062,
"text": "The MathF.Truncate() method in C# is used to calculate an integral part of a specified single number or single-precision floating-point number."
},
{
"code": null,
"e": 1232,
"s": 1206,
"text": "Following is the syntax −"
},
{
... |
One-dimensional CNN for human behavior classification | by Ryan Burke | Towards Data Science | My first-ever publication on Medium was a deep dive into convolutional neural networks (CNN). In that post, I went through a step-by-step example on how to use this technique for medical image classification. It’s a powerful tool in the arsenal of any dataphile, and it’s important to recognize the CNN is not limited to... | [
{
"code": null,
"e": 608,
"s": 172,
"text": "My first-ever publication on Medium was a deep dive into convolutional neural networks (CNN). In that post, I went through a step-by-step example on how to use this technique for medical image classification. It’s a powerful tool in the arsenal of any dat... |
GATE | GATE CS 2019 | Question 37 - GeeksforGeeks | 26 Feb, 2019
Consider three machines M, N and P with IP addresses 100.10.5.2, 100.10.5.5 and 100.10.5.6 respectively. The subnet mask is set to 255.255.255.252 for all the three machines. Which one of the following is true?
(A) M, N and P all belong to the same subnet(B) Only N and P belong to the same subnet(C) M, N, ... | [
{
"code": null,
"e": 23987,
"s": 23959,
"text": "\n26 Feb, 2019"
},
{
"code": null,
"e": 24198,
"s": 23987,
"text": "Consider three machines M, N and P with IP addresses 100.10.5.2, 100.10.5.5 and 100.10.5.6 respectively. The subnet mask is set to 255.255.255.252 for all the thre... |
Perl chown Function | This function changes the owner (and group) of a list of files. The first two elements of the list must be the numeric uid and gid, in that order. This funcation call works in similar way as unix command chown. Thus you should have sufficient privilege to change the permission of the file.
Following is the simple synta... | [
{
"code": null,
"e": 2511,
"s": 2220,
"text": "This function changes the owner (and group) of a list of files. The first two elements of the list must be the numeric uid and gid, in that order. This funcation call works in similar way as unix command chown. Thus you should have sufficient privilege ... |
Objects, Types and Values. The de-facto of Python language | by Farhad Naeem | Towards Data Science | “One of the best qualities of Python is its consistency. After working with Python for a while, you are able to start making informed, correct guesses about features that are new to you.”
“Python data model, which describes the API that you can use to make your own objects play well with the most idiomatic language fea... | [
{
"code": null,
"e": 360,
"s": 172,
"text": "“One of the best qualities of Python is its consistency. After working with Python for a while, you are able to start making informed, correct guesses about features that are new to you.”"
},
{
"code": null,
"e": 533,
"s": 360,
"text":... |
Example program on Dynamic memory allocation in C language | Find out the maximum and minimum from an array using dynamic memory allocation in C.
The Dynamic memory allocation enables the C programmers to allocate memory at runtime.
The different functions that we used to allocate memory dynamically at run time are −
The malloc () − allocates a block of memory in bytes at runtim... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "Find out the maximum and minimum from an array using dynamic memory allocation in C."
},
{
"code": null,
"e": 1234,
"s": 1147,
"text": "The Dynamic memory allocation enables the C programmers to allocate memory at runtime."
},
{
... |
Different ways to clear a list in Python | Clearing up all the elements in a python list can be done in many ways. Below are the some of the methods which are implemented to achieve this.
This function is a part of standard library and empties the python list completely.
Syntax: list_name.clear()
list_name is the name of the list supplied by
In the below exampl... | [
{
"code": null,
"e": 1207,
"s": 1062,
"text": "Clearing up all the elements in a python list can be done in many ways. Below are the some of the methods which are implemented to achieve this."
},
{
"code": null,
"e": 1291,
"s": 1207,
"text": "This function is a part of standard l... |
jsoup - Extract Text | Following example will showcase use of methods to get text after parsing an HTML String into a Document object.
Document document = Jsoup.parse(html);
Element link = document.select("a").first();
System.out.println("Text: " + link.text());
Where
document − document object represents the HTML DOM.
document − docum... | [
{
"code": null,
"e": 2142,
"s": 2030,
"text": "Following example will showcase use of methods to get text after parsing an HTML String into a Document object."
},
{
"code": null,
"e": 2276,
"s": 2142,
"text": "Document document = Jsoup.parse(html);\nElement link = document.select... |
data.table vs data.frame in R Programming - GeeksforGeeks | 20 Jan, 2021
data.table in R is an enhanced version of the data.frame. Due to its speed of execution and the less code to type it became popular in R. The purpose of data.table is to create tabular data same as a data frame but the syntax varies. In the below example let we can see the syntax for the data table:
R
Data... | [
{
"code": null,
"e": 24858,
"s": 24830,
"text": "\n20 Jan, 2021"
},
{
"code": null,
"e": 25159,
"s": 24858,
"text": "data.table in R is an enhanced version of the data.frame. Due to its speed of execution and the less code to type it became popular in R. The purpose of data.table... |
Supply Planning using Linear Programming with Python | by Samir Saci | Towards Data Science | Supply planning is the process of managing the inventory produced by manufacturing to fulfil the requirements created from the demand plan.
Your target is to balance supply and demand in a manner to ensure the best service level at the lowest cost.
In this article, we will present a simple methodology to use Integer Li... | [
{
"code": null,
"e": 312,
"s": 172,
"text": "Supply planning is the process of managing the inventory produced by manufacturing to fulfil the requirements created from the demand plan."
},
{
"code": null,
"e": 421,
"s": 312,
"text": "Your target is to balance supply and demand in... |
MapReduce - Partitioner | A partitioner works like a condition in processing an input dataset. The partition phase takes place after the Map phase and before the Reduce phase.
The number of partitioners is equal to the number of reducers. That means a partitioner will divide the data according to the number of reducers. Therefore, the data pass... | [
{
"code": null,
"e": 1940,
"s": 1790,
"text": "A partitioner works like a condition in processing an input dataset. The partition phase takes place after the Map phase and before the Reduce phase."
},
{
"code": null,
"e": 2173,
"s": 1940,
"text": "The number of partitioners is eq... |
LISP - Symbols | In LISP, a symbol is a name that represents data objects and interestingly it is also a data object.
What makes symbols special is that they have a component called the property list, or plist.
LISP allows you to assign properties to symbols. For example, let us have a 'person' object. We would like this 'person' objec... | [
{
"code": null,
"e": 2161,
"s": 2060,
"text": "In LISP, a symbol is a name that represents data objects and interestingly it is also a data object."
},
{
"code": null,
"e": 2254,
"s": 2161,
"text": "What makes symbols special is that they have a component called the property list... |
Decryption of files | In this chapter, let us discuss decryption of files in cryptography using Python. Note that for decryption process, we will follow the same procedure, but instead of specifying the output path, we will focus on input path or the necessary file which is encrypted.
The following is a sample code for decrypting files in c... | [
{
"code": null,
"e": 2556,
"s": 2292,
"text": "In this chapter, let us discuss decryption of files in cryptography using Python. Note that for decryption process, we will follow the same procedure, but instead of specifying the output path, we will focus on input path or the necessary file which is ... |
How to open an Excel Spreadsheet in Treeview widget in Tkinter? | An Excel Spreadsheet contains a set of information stored in the form of rows and columns. We can display and use the spreadsheet data in the Tkinter application using Treeview widget. The Treeview widget in Tkinter helps users to add and manipulate the data in the form of a table. However, to analyze and manipulate a ... | [
{
"code": null,
"e": 1515,
"s": 1062,
"text": "An Excel Spreadsheet contains a set of information stored in the form of rows and columns. We can display and use the spreadsheet data in the Tkinter application using Treeview widget. The Treeview widget in Tkinter helps users to add and manipulate the... |
One of the most common mistakes when running an ANOVA in R | by Matthieu Renard | Towards Data Science | Imagine this scenario: You are running an ANOVA in R while controlling for other variables (technically, an ANCOVA). However, the results seem weird: The order of the independent variables matter and influence the results — how can that be? And if you try to enter the same model as a linear regression, the results are ... | [
{
"code": null,
"e": 539,
"s": 171,
"text": "Imagine this scenario: You are running an ANOVA in R while controlling for other variables (technically, an ANCOVA). However, the results seem weird: The order of the independent variables matter and influence the results — how can that be? And if you try... |
Aspect Oriented Programming and AOP in Spring Framework - GeeksforGeeks | 09 Feb, 2022
Aspect oriented programming(AOP) as the name suggests uses aspects in programming. It can be defined as the breaking of code into different modules, also known as modularisation, where the aspect is the key unit of modularity. Aspects enable the implementation of crosscutting concerns such as- transaction,... | [
{
"code": null,
"e": 25237,
"s": 25209,
"text": "\n09 Feb, 2022"
},
{
"code": null,
"e": 25995,
"s": 25237,
"text": "Aspect oriented programming(AOP) as the name suggests uses aspects in programming. It can be defined as the breaking of code into different modules, also known as ... |
Jackson - First Application | Before going into the details of the jackson library, let's see an application in action. In this example, we've created Student class. We'll create a JSON string with student details and deserialize it to student object and then serialize it to an JSON String.
Create a java class file named JacksonTester in C:\>Jackso... | [
{
"code": null,
"e": 2015,
"s": 1753,
"text": "Before going into the details of the jackson library, let's see an application in action. In this example, we've created Student class. We'll create a JSON string with student details and deserialize it to student object and then serialize it to an JSON... |
POP3 protocol client in Python | The poolib module from Python's standard library defines POP3 and POP3_SSL classes. POP3 class encapsulates a connection to a POP3 server and implements the protocol as defined in RFC 1939. POP3_SSL classsupports POP3 servers that use SSL as an underlying protocol layer.
POP3 protocolis obsolescent as its implementatio... | [
{
"code": null,
"e": 1334,
"s": 1062,
"text": "The poolib module from Python's standard library defines POP3 and POP3_SSL classes. POP3 class encapsulates a connection to a POP3 server and implements the protocol as defined in RFC 1939. POP3_SSL classsupports POP3 servers that use SSL as an underlyi... |
ReactJS - Architecture | React library is built on a solid foundation. It is simple, flexible and extensible. As we learned earlier, React is a library to create user interface in a web application. React’s primary purpose is to enable the developer to create user interface using pure JavaScript. Normally, every user interface library introduc... | [
{
"code": null,
"e": 2515,
"s": 2033,
"text": "React library is built on a solid foundation. It is simple, flexible and extensible. As we learned earlier, React is a library to create user interface in a web application. React’s primary purpose is to enable the developer to create user interface usi... |
How to combine two rows in R matrix by addition? | To combine two rows in R matrix by addition, we can follow the below steps −
First of all, create a matrix.
First of all, create a matrix.
Then, using plus sign (+) to add two rows and store the addition in one of the rows.
Then, using plus sign (+) to add two rows and store the addition in one of the rows.
After that,... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "To combine two rows in R matrix by addition, we can follow the below steps −"
},
{
"code": null,
"e": 1170,
"s": 1139,
"text": "First of all, create a matrix."
},
{
"code": null,
"e": 1201,
"s": 1170,
"text": "Fir... |
aptitude command in Linux with examples - GeeksforGeeks | 04 Apr, 2019
aptitude command in Linux package system opens up a highly built-in interface to interact with the package manager of the machine. It is the control panel of programs and packages in Windows. You can install, upgrade and remove your packages using this well-built interface. Also, the actions can be perform... | [
{
"code": null,
"e": 24430,
"s": 24402,
"text": "\n04 Apr, 2019"
},
{
"code": null,
"e": 24816,
"s": 24430,
"text": "aptitude command in Linux package system opens up a highly built-in interface to interact with the package manager of the machine. It is the control panel of progr... |
Design Patterns - Memento Pattern | Memento pattern is used to restore state of an object to a previous state. Memento pattern falls under behavioral pattern category.
Memento pattern uses three actor classes. Memento contains state of an object to be restored. Originator creates and stores states in Memento objects and Caretaker object is responsible to... | [
{
"code": null,
"e": 2883,
"s": 2751,
"text": "Memento pattern is used to restore state of an object to a previous state. Memento pattern falls under behavioral pattern category."
},
{
"code": null,
"e": 3168,
"s": 2883,
"text": "Memento pattern uses three actor classes. Memento ... |
pinfo - Unix, Linux Command | When the search for info pages fails, man is called with the infopage
argument, and it’s output is parsed by pinfo. This means that when you don’t
have the appropriate info page, but have a man page instead; the man page
will be viewed.
When no infopage is specified, the default ‘dir’ page is shown.
Supported optio... | [
{
"code": null,
"e": 10816,
"s": 10577,
"text": "\nWhen the search for info pages fails, man is called with the infopage\nargument, and it’s output is parsed by pinfo. This means that when you don’t\nhave the appropriate info page, but have a man page instead; the man page\nwill be viewed.\n"
},
... |
Numbers With Repeated Digits in C++ | Suppose we have a positive integer N, we have to find the number of positive integers less than or equal to N that have at least 1 repeated digit .
So, if the input is like 99, then the output will be 9, as we have numbers like 11, 22, 33, 44, 55, 66, 77, 88, 99.
To solve this, we will follow these steps −
Define a fun... | [
{
"code": null,
"e": 1210,
"s": 1062,
"text": "Suppose we have a positive integer N, we have to find the number of positive integers less than or equal to N that have at least 1 repeated digit ."
},
{
"code": null,
"e": 1326,
"s": 1210,
"text": "So, if the input is like 99, then ... |
Python Trading Toolbox: introducing OHLC charts with Matplotlib | by Stefano Basurto | Towards Data Science | In other posts, we started exploring how to compute some basic indicators based on price (simple moving averages and other moving averages) and how to plot them on a chart together with the price. In those examples, we considered daily price data and used the closing price to represent each day of trading. Quite obviou... | [
{
"code": null,
"e": 709,
"s": 171,
"text": "In other posts, we started exploring how to compute some basic indicators based on price (simple moving averages and other moving averages) and how to plot them on a chart together with the price. In those examples, we considered daily price data and used... |
Program to find sum of series 1 + 1/2 + 1/3 + 1/4 + .. + 1/n - GeeksforGeeks | 04 Nov, 2021
If inverse of a sequence follows rule of an A.P i.e, Arithmetic progression, then it is said to be in Harmonic Progression.In general, the terms in a harmonic progression can be denoted as : 1/a, 1/(a + d), 1/(a + 2d), 1/(a + 3d) .... 1/(a + nd). As Nth term of AP is given as ( a + (n – 1)d) .Hence, Nth te... | [
{
"code": null,
"e": 25339,
"s": 25311,
"text": "\n04 Nov, 2021"
},
{
"code": null,
"e": 25836,
"s": 25339,
"text": "If inverse of a sequence follows rule of an A.P i.e, Arithmetic progression, then it is said to be in Harmonic Progression.In general, the terms in a harmonic prog... |
TypeScript - String Constructor Property | Returns a reference to the String function that created the object.
var str = new String( "This is string" );
console.log("str.constructor is:" + str.constructor)
On compiling, it will generate the same code in JavaScript.
Its output is as follows −
str.constructor is:function String() { [native code] }
45 Lect... | [
{
"code": null,
"e": 2116,
"s": 2048,
"text": "Returns a reference to the String function that created the object."
},
{
"code": null,
"e": 2213,
"s": 2116,
"text": "var str = new String( \"This is string\" ); \nconsole.log(\"str.constructor is:\" + str.constructor)\n"
},
{
... |
Logo - Color | Computer screens work with red, green and blue components of light, so they are sometimes called RGB screens.
On Logo's Set menu, we can set the color of three screen elements −
The turtle's pen
The turtle's fill (like a paint bucket for enclosures)
The screen background
We set a color by moving these three sliders lef... | [
{
"code": null,
"e": 1944,
"s": 1834,
"text": "Computer screens work with red, green and blue components of light, so they are sometimes called RGB screens."
},
{
"code": null,
"e": 2012,
"s": 1944,
"text": "On Logo's Set menu, we can set the color of three screen elements −"
}... |
What is the best way to remove an item from a Python dictionary? | You can use the del function to delete a specific key or loop through all keys and delete them. For example,
my_dict = {'name': 'foo', 'age': 28}
keys = list(my_dict.keys())
for key in keys:
del my_dict[key]
print(my_dict)
This will give the output:
{}
You can also use the pop function to delete a specific key or lo... | [
{
"code": null,
"e": 1171,
"s": 1062,
"text": "You can use the del function to delete a specific key or loop through all keys and delete them. For example,"
},
{
"code": null,
"e": 1288,
"s": 1171,
"text": "my_dict = {'name': 'foo', 'age': 28}\nkeys = list(my_dict.keys())\nfor ke... |
Bootstrap 5 Introduction - GeeksforGeeks | 05 May, 2022
Bootstrap is a free and open-source collection of CSS and JavaScript/jQuery code used for creating dynamic websites layout and web applications. Bootstrap is one of the most popular front-end frameworks which has really a nice set of predefined CSS codes. Bootstrap uses different types of classes to make r... | [
{
"code": null,
"e": 28563,
"s": 28535,
"text": "\n05 May, 2022"
},
{
"code": null,
"e": 28991,
"s": 28563,
"text": "Bootstrap is a free and open-source collection of CSS and JavaScript/jQuery code used for creating dynamic websites layout and web applications. Bootstrap is one o... |
Chocolate Distribution Problem - GeeksforGeeks | 07 Nov, 2021
Given an array of n integers where each value represents the number of chocolates in a packet. Each packet can have a variable number of chocolates. There are m students, the task is to distribute chocolate packets such that:
Each student gets one packet.The difference between the number of chocolates in ... | [
{
"code": null,
"e": 26153,
"s": 26125,
"text": "\n07 Nov, 2021"
},
{
"code": null,
"e": 26380,
"s": 26153,
"text": "Given an array of n integers where each value represents the number of chocolates in a packet. Each packet can have a variable number of chocolates. There are m st... |
SQL Tryit Editor v1.6 | SELECT * FROM Products
WHERE Price <> 18;
Edit the SQL Statement, and click "Run SQL" to see the result.
This SQL-Statement is not supported in the WebSQL Database.
The example still works, because it uses a modified version of SQL.
Your browser does not support WebSQL.
Your are now using a light-version of the Try-S... | [
{
"code": null,
"e": 23,
"s": 0,
"text": "SELECT * FROM Products"
},
{
"code": null,
"e": 42,
"s": 23,
"text": "WHERE Price <> 18;"
},
{
"code": null,
"e": 44,
"s": 42,
"text": ""
},
{
"code": null,
"e": 107,
"s": 44,
"text": "Edit the SQL... |
SQL | ALL and ANY | 09 Feb, 2018
ALL & ANY are logical operators in SQL. They return boolean value as a result.
ALL
ALL operator is used to select all tuples of SELECT STATEMENT. It is also used to compare a value to every value in another value set or result from a subquery.
The ALL operator returns TRUE iff all of the subqueries values ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Feb, 2018"
},
{
"code": null,
"e": 131,
"s": 52,
"text": "ALL & ANY are logical operators in SQL. They return boolean value as a result."
},
{
"code": null,
"e": 135,
"s": 131,
"text": "ALL"
},
{
"code": ... |
Crontab – Running a Python script with parameters | 18 Jul, 2021
Scheduling python scripts with crontab is fundamental when it comes to automating tasks using python. We will see how to schedule python scripts and pass the necessary parameters as well.
The Cron job utility is a time-based job scheduler in Unix. It allows the user to run the file at a given time and date... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Jul, 2021"
},
{
"code": null,
"e": 216,
"s": 28,
"text": "Scheduling python scripts with crontab is fundamental when it comes to automating tasks using python. We will see how to schedule python scripts and pass the necessary paramet... |
How to Increase the capacity (size) of ArrayList? - GeeksforGeeks | 02 Dec, 2020
ArrayList class is a resizable array, present in java.util package. The difference between an array and an ArrayList in Java, is that the size of an array cannot be modified (i.e. if you want to append/add or remove element(s) to/from an array, you have to create a new array. However, elements can be added... | [
{
"code": null,
"e": 23948,
"s": 23920,
"text": "\n02 Dec, 2020"
},
{
"code": null,
"e": 24334,
"s": 23948,
"text": "ArrayList class is a resizable array, present in java.util package. The difference between an array and an ArrayList in Java, is that the size of an array cannot b... |
Introduction to Python. The who, what and why of Python | by Aaron S | Towards Data Science | So you’ve decided to start programming and may have heard Python is a popular language to start with. It’s important to know what the language is about before diving in. In this article, we will be taking you through what Python is, what it can be used for and you will understand a bit about how Python works under the ... | [
{
"code": null,
"e": 372,
"s": 46,
"text": "So you’ve decided to start programming and may have heard Python is a popular language to start with. It’s important to know what the language is about before diving in. In this article, we will be taking you through what Python is, what it can be used for... |
ES6 - Validations | Form validation normally used to occur at the server, after the client had entered all the necessary data and then pressed the Submit button. If the data entered by the client was incorrect or was simply missing, the server would have to send all the data back to the client and request that the form be resubmitted with... | [
{
"code": null,
"e": 2706,
"s": 2277,
"text": "Form validation normally used to occur at the server, after the client had entered all the necessary data and then pressed the Submit button. If the data entered by the client was incorrect or was simply missing, the server would have to send all the da... |
Create a graph database in Neo4j using Python | by CJ Sullivan | Towards Data Science | One of the most common questions I am asked by data scientists taking their first foray into graphs with Neo4j is how to get data into the database. In a previous post I showed how to do this in one of a few different ways using the Neo4j browser UI set up through Docker. In this post I will show how you can use your o... | [
{
"code": null,
"e": 637,
"s": 171,
"text": "One of the most common questions I am asked by data scientists taking their first foray into graphs with Neo4j is how to get data into the database. In a previous post I showed how to do this in one of a few different ways using the Neo4j browser UI set u... |
Program to check if a number is divisible by sum of its digits - GeeksforGeeks | 13 Aug, 2021
Given an integer N, the task is to check whether the number is divisible by the sum of its digits or not. If divisible, then print “YES” else print “NO”.
Examples:
Input: N = 12
Output: YES
Explanation:
As sum of digits of 12 = 1 + 2 = 3
and 12 is divisible by 3
So the output is YES
Input:... | [
{
"code": null,
"e": 25050,
"s": 25022,
"text": "\n13 Aug, 2021"
},
{
"code": null,
"e": 25204,
"s": 25050,
"text": "Given an integer N, the task is to check whether the number is divisible by the sum of its digits or not. If divisible, then print “YES” else print “NO”."
},
{... |
PHP - Static Variables | Scope can be defined as the range of availability a variable has to the program in which it is declared. PHP variables can be one of four scope types −
Local variables
Function parameters
Global variables
Static variables.
The final type of variable scoping that I discuss is known as static. In contrast to the variable... | [
{
"code": null,
"e": 2909,
"s": 2757,
"text": "Scope can be defined as the range of availability a variable has to the program in which it is declared. PHP variables can be one of four scope types −"
},
{
"code": null,
"e": 2925,
"s": 2909,
"text": "Local variables"
},
{
... |
Working With External Database libraries | We have seen how we can work with Selenium Library. The detailed installation/importing of Selenium Library is discussed in chapter “Working with Browsers using Selenium Library”.
In this chapter, we will discuss database library and how to connect and test database using Robot Framework.
Go to Robot framework site htt... | [
{
"code": null,
"e": 2349,
"s": 2169,
"text": "We have seen how we can work with Selenium Library. The detailed installation/importing of Selenium Library is discussed in chapter “Working with Browsers using Selenium Library”."
},
{
"code": null,
"e": 2459,
"s": 2349,
"text": "In... |
Length of the longest alternating subarray - GeeksforGeeks | 11 Aug, 2021
Given an array of N including positive and negative numbers only. The task is to find the length of the longest alternating (means negative-positive-negative or positive-negative-positive) subarray present in the array. Examples:
Input: a[] = {-5, -1, -1, 2, -2, -3}
Output: 3
The subarray {-1, 2, -2}
... | [
{
"code": null,
"e": 25336,
"s": 25308,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 25568,
"s": 25336,
"text": "Given an array of N including positive and negative numbers only. The task is to find the length of the longest alternating (means negative-positive-negative or po... |
Tryit Editor v3.7 | HTML Input types
Tryit: input type = tel | [
{
"code": null,
"e": 27,
"s": 10,
"text": "HTML Input types"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.