title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
SHA-384 Hash In Java - GeeksforGeeks | 27 Sep, 2018
The SHA-2 family of cryptographic hash functions consists of six hash functions. These are:
SHA-224, with 224 bit hash valuesSHA-256, with 256 bit hash valuesSHA-384, with 384 bit hash valuesSHA-512, with 512 bit hash valuesSHA-512/224, with 512 bit hash valuesSHA-512/256, with 512 bit hash valuesAmong the... | [
{
"code": null,
"e": 25779,
"s": 25751,
"text": "\n27 Sep, 2018"
},
{
"code": null,
"e": 25871,
"s": 25779,
"text": "The SHA-2 family of cryptographic hash functions consists of six hash functions. These are:"
},
{
"code": null,
"e": 29268,
"s": 25871,
"text":... |
GATE | GATE-CS-2001 | Question 34 - GeeksforGeeks | 28 Jun, 2021
Which is the most appropriate match for the items in the first column with the items in the second column
X. Indirect Addressing I. Array implementation
Y. Indexed Addressing II. Writing re-locatable code
Z. Base Register Addressing III. Passing array as parameter
(A) (X, III) (Y, I) (Z, I... | [
{
"code": null,
"e": 25695,
"s": 25667,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25801,
"s": 25695,
"text": "Which is the most appropriate match for the items in the first column with the items in the second column"
},
{
"code": null,
"e": 25977,
"s": 2580... |
OpenCV | Hands on Image Contrast - GeeksforGeeks | 13 Apr, 2021
Contrast means to change the value of each and every image pixel. This change can be done by either multiplying or dividing the pixel values of the image, by any constant. This article gives an in-depth knowledge about how can an image contrast be changed using OpenCV.
Input :
Original Image
Output :
... | [
{
"code": null,
"e": 25627,
"s": 25599,
"text": "\n13 Apr, 2021"
},
{
"code": null,
"e": 25899,
"s": 25627,
"text": "Contrast means to change the value of each and every image pixel. This change can be done by either multiplying or dividing the pixel values of the image, by any c... |
Count occurrences of a character in a repeated string - GeeksforGeeks | 23 Aug, 2021
Given an integer N and a lowercase string. The string is repeated infinitely. The task is to find the No. of occurrences of a given character x in first N letters.Examples:
Input : N = 10 str = "abcac"
Output : 4
Explanation: "abcacabcac" is the substring from the infinitely repeated string. In first 10 ... | [
{
"code": null,
"e": 26099,
"s": 26071,
"text": "\n23 Aug, 2021"
},
{
"code": null,
"e": 26274,
"s": 26099,
"text": "Given an integer N and a lowercase string. The string is repeated infinitely. The task is to find the No. of occurrences of a given character x in first N letters.... |
How to Build a Weather App in Android? - GeeksforGeeks | 14 Feb, 2022
In this project, we will be building a weather application. This application will show the temperature of a location. To fetch weather information we will need an API. An API(Application Programming Interface) is a function that allows applications to interact and share data using various components and mi... | [
{
"code": null,
"e": 26121,
"s": 26093,
"text": "\n14 Feb, 2022"
},
{
"code": null,
"e": 26665,
"s": 26121,
"text": "In this project, we will be building a weather application. This application will show the temperature of a location. To fetch weather information we will need an ... |
Node.js server.listen() Method | 15 Sep, 2020
The server.listen() is an inbuilt application programming interface of class Socket within tls module which is used to start the server to listen the encrypted connection.
Syntax:
const server.listen([port[, host[, backlog]]][, callback])
Parameters: This method takes the following argument as parameter:
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Sep, 2020"
},
{
"code": null,
"e": 200,
"s": 28,
"text": "The server.listen() is an inbuilt application programming interface of class Socket within tls module which is used to start the server to listen the encrypted connection."
... |
C# | Method Overriding | 23 Mar, 2022
Method Overriding in C# is similar to the virtual function in C++. Method Overriding is a technique that allows the invoking of functions from another class (base class) in the derived class. Creating a method in the derived class with the same signature as a method in the base class is called as method ov... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Mar, 2022"
},
{
"code": null,
"e": 370,
"s": 52,
"text": "Method Overriding in C# is similar to the virtual function in C++. Method Overriding is a technique that allows the invoking of functions from another class (base class) in t... |
Python | Pandas Series.last_valid_index() | 11 Feb, 2019
Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index.
Pandas Series.last_valid_index() function return i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Feb, 2019"
},
{
"code": null,
"e": 285,
"s": 28,
"text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based index... |
Python | Sort given list of dictionaries by date | 11 May, 2020
Given a list of dictionary, the task is to sort the dictionary by date. Let’s see a few methods to solve the task.
Method #1: Using naive approach
# Python code to demonstrate# sort a list of dictionary# where value date is in string # Initialising list of dictionaryini_list = [{'name':'akash', 'd.o.b':'1... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 May, 2020"
},
{
"code": null,
"e": 143,
"s": 28,
"text": "Given a list of dictionary, the task is to sort the dictionary by date. Let’s see a few methods to solve the task."
},
{
"code": null,
"e": 175,
"s": 143,
... |
TCS Placement Paper | MCQ 8 | 21 May, 2019
This is a TCS model placement paper for aptitude preparation. This placement paper will cover aptitude questions that are asked in TCS recruitment drives and also strictly follows the pattern of questions asked in TCS interviews. It is recommended to solve each one of the following questions to increase yo... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n21 May, 2019"
},
{
"code": null,
"e": 403,
"s": 54,
"text": "This is a TCS model placement paper for aptitude preparation. This placement paper will cover aptitude questions that are asked in TCS recruitment drives and also strictly fo... |
Python Program to Convert Matrix to String | 02 Feb, 2021
Given a matrix, our task is to write a Python program to convert to the matrix, with different delimiters for element and row separation.
Examples:
Input : test_list = test_list = [[1, 3, “gfg”], [2, “is”, 4], [“best”, 9, 5]], in_del, out_del = “,”, ” “
Output : 1,3,gfg 2,is,4 best,9,5
Explanation : Elemen... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Feb, 2021"
},
{
"code": null,
"e": 166,
"s": 28,
"text": "Given a matrix, our task is to write a Python program to convert to the matrix, with different delimiters for element and row separation."
},
{
"code": null,
"e": ... |
Nested try blocks in Exception Handling in Java | 23 Oct, 2018
In Java, we can use a try block within a try block. Each time a try statement is entered, the context of that exception is pushed on to a stack. Given below is an example of a nested try.In this example, inner try block (or try-block2) is used to handle ArithmeticException, i.e., division by zero. After th... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Oct, 2018"
},
{
"code": null,
"e": 442,
"s": 52,
"text": "In Java, we can use a try block within a try block. Each time a try statement is entered, the context of that exception is pushed on to a stack. Given below is an example of ... |
Java Program for Phone Mnemonics | 03 Oct, 2018
In our daily lives, we have to remember a lot of phone numbers. Most people find it quite difficult to remember such huge 10-digit phone numbers. A simple solution is to relate that phone number to some known word.For example, we can relate the phone number 32627287 with DAMASCUS based on the characters in... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n03 Oct, 2018"
},
{
"code": null,
"e": 627,
"s": 54,
"text": "In our daily lives, we have to remember a lot of phone numbers. Most people find it quite difficult to remember such huge 10-digit phone numbers. A simple solution is to rela... |
Rendering a Triangle using OpenGL(using Shaders) | 02 Jul, 2021
In this article we’ll see how to render a triangle using OpenGL. A triangle is probably the simplest shapes you can draw in OpenGL after points and lines and any complicated geometry that you make will me made up of number of triangles joined together.We’ll be using the programmable pipeline, so we’ll be w... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Jul, 2021"
},
{
"code": null,
"e": 875,
"s": 52,
"text": "In this article we’ll see how to render a triangle using OpenGL. A triangle is probably the simplest shapes you can draw in OpenGL after points and lines and any complicated ... |
Taking input from the user in Tkinter | There might be times when we need to take the user input in our Tkinter application. We can get the user Input in a Single Line text input through the Entry widget using get() method. To display the Captured input, we can either print the message on the screen or display the input with the help of the Label widget.
#Im... | [
{
"code": null,
"e": 1504,
"s": 1187,
"text": "There might be times when we need to take the user input in our Tkinter application. We can get the user Input in a Single Line text input through the Entry widget using get() method. To display the Captured input, we can either print the message on the... |
Vector vs ArrayList in Java | 21 Dec, 2021
ArrayList and Vectors both implement the List interface, and both use (dynamically resizable) arrays for their internal data structure, much like using an ordinary array.
Syntax:
ArrayList: ArrayList<T> al = new ArrayList<T>();
Vector: Vector<T> v = new Vector<T>();
Significant Differences between Array... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Dec, 2021"
},
{
"code": null,
"e": 224,
"s": 52,
"text": "ArrayList and Vectors both implement the List interface, and both use (dynamically resizable) arrays for their internal data structure, much like using an ordinary array. "
... |
Python calendar module : itermonthdays() method | 13 May, 2021
Calendar module allows to output calendars like program, and provides additional useful functions related to the calendar. Functions and classes defined in Calendar module use an idealized calendar, the current Gregorian calendar extended indefinitely in both directions.
itermonthdays() method returns an ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 May, 2021"
},
{
"code": null,
"e": 301,
"s": 28,
"text": "Calendar module allows to output calendars like program, and provides additional useful functions related to the calendar. Functions and classes defined in Calendar module use... |
GATE | GATE-CS-2004 | Question 8 | 23 Dec, 2019
Which of the following grammar rules violate the requirements of an operator grammar ? P, Q, R are nonterminals, and r, s, t are terminals.
1. P → Q R
2. P → Q s R
3. P → ε
4. P → Q t R r
(A) 1 only(B) 1 and 3 only(C) 2 and 3 only(D) 3 and 4 onlyAnswer: (B)Explanatio... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Dec, 2019"
},
{
"code": null,
"e": 168,
"s": 28,
"text": "Which of the following grammar rules violate the requirements of an operator grammar ? P, Q, R are nonterminals, and r, s, t are terminals."
},
{
"code": null,
"e"... |
What is the meaning of let-* in Angular 2 Templates ? | 18 May, 2021
The let keyword in Angular declares a template input variable that is referenced within the template. In Angular, the micro syntax is used to configure a directive in a compact and friendly string. It is a capability given in angular to embed the variables in the template directly by translating that strin... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 May, 2021"
},
{
"code": null,
"e": 380,
"s": 28,
"text": "The let keyword in Angular declares a template input variable that is referenced within the template. In Angular, the micro syntax is used to configure a directive in a compac... |
Python | Menu widget in Tkinter | 12 Apr, 2019
Tkinter is Python’s standard GUI (Graphical User Interface) package. It is one of the most commonly used package for GUI applications which comes with the Python itself.
Menus are the important part of any GUI. A common use of menus is to provide convenient access to various operations such as saving or op... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n12 Apr, 2019"
},
{
"code": null,
"e": 223,
"s": 53,
"text": "Tkinter is Python’s standard GUI (Graphical User Interface) package. It is one of the most commonly used package for GUI applications which comes with the Python itself."
}... |
How to send a variable from Activity to Fragment in Android using Kotlin? | This example demonstrates how to send a variable from Activity to Fragment in Android using 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" encodi... | [
{
"code": null,
"e": 1287,
"s": 1187,
"text": "This example demonstrates how to send a variable from Activity to Fragment in Android using Kotlin."
},
{
"code": null,
"e": 1416,
"s": 1287,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill... |
How to align image vertically in a division that spans vertically on the whole webpage using CSS ? | 22 Aug, 2021
In this article, we will discuss the vertical alignment of images in a single division that spans vertically on the whole webpage. Vertical alignment of images refers to placing the images in a column. We often need to align the image vertically in order to display it properly on the mobile version or some... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Aug, 2021"
},
{
"code": null,
"e": 469,
"s": 54,
"text": "In this article, we will discuss the vertical alignment of images in a single division that spans vertically on the whole webpage. Vertical alignment of images refers to plac... |
How to get the longest string in an array using JavaScript ? | 31 Dec, 2019
The task is to get the longest string from the array. Here a few of the most used techniques discussed with the help of JavaScript. In this article, we will use two JavaScript methods sort() method and the reduce() method to find out the longest string the array. Both the approach are described below with ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Dec, 2019"
},
{
"code": null,
"e": 348,
"s": 28,
"text": "The task is to get the longest string from the array. Here a few of the most used techniques discussed with the help of JavaScript. In this article, we will use two JavaScript... |
Android AsyncTask example and explanation | Android AsyncTask going to do background operation on background thread and update on main thread. In android we cant directly touch background thread to main thread in android development. asynctask help us to make communication between background thread to main thread.
onPreExecute() − Before doing background operati... | [
{
"code": null,
"e": 1459,
"s": 1187,
"text": "Android AsyncTask going to do background operation on background thread and update on main thread. In android we cant directly touch background thread to main thread in android development. asynctask help us to make communication between background thre... |
Ruby | Array push() function | 06 Dec, 2019
Array#push() : push() is a Array class method which appends the given object(s) on to the end of this array.
Syntax: Array.push()
Parameter: Array
Return: appends the given object(s) on to the end of this array.
Example #1 :
# Ruby code for push() method # declaring arraya = [18, 22, 33, nil, 5, 6] # dec... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Dec, 2019"
},
{
"code": null,
"e": 137,
"s": 28,
"text": "Array#push() : push() is a Array class method which appends the given object(s) on to the end of this array."
},
{
"code": null,
"e": 158,
"s": 137,
"text"... |
How to add a custom right-click menu to a webpage ? | 01 Oct, 2020
A right-click menu or context menu in a browser is a menu with multiple choices that appears on right-click mouse operation. It provides multiple functionalities relevant to that particular context. Sometimes, we want the context menu to have more options or features but we cannot modify the default contex... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 576,
"s": 52,
"text": "A right-click menu or context menu in a browser is a menu with multiple choices that appears on right-click mouse operation. It provides multiple functionalities relevant to ... |
How static variables in member functions work in C++? | The static variables in member functions are declared using the keyword static. The space for the static variables is allocated only one time and this is used for the entirety of the program. Also, there is only one copy of these static variables in the whole program.
A program that demonstrates static variables in mem... | [
{
"code": null,
"e": 1456,
"s": 1187,
"text": "The static variables in member functions are declared using the keyword static. The space for the static variables is allocated only one time and this is used for the entirety of the program. Also, there is only one copy of these static variables in the... |
C# Example for Hierarchical Inheritance | More than one class is inherited from the base class in Hierarchical Inheritance.
In the example, our base class is Father −
class Father {
public void display() {
Console.WriteLine("Display...");
}
}
It has Son and Daughter as the derived class. Let us how to add a derived class in Inheritance −
class Son ... | [
{
"code": null,
"e": 1269,
"s": 1187,
"text": "More than one class is inherited from the base class in Hierarchical Inheritance."
},
{
"code": null,
"e": 1312,
"s": 1269,
"text": "In the example, our base class is Father −"
},
{
"code": null,
"e": 1400,
"s": 1312,... |
Program for K Most Recently Used (MRU) Apps | 29 Aug, 2021
Given an integer K and an array arr[] of N integers which contains the ids of the opened apps in a system where
arr[0] is the app currently in usearr[1] is the app which was most recently used andarr[N – 1] is the app which was least recently used.
arr[0] is the app currently in use
arr[1] is the app whi... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n29 Aug, 2021"
},
{
"code": null,
"e": 167,
"s": 53,
"text": "Given an integer K and an array arr[] of N integers which contains the ids of the opened apps in a system where "
},
{
"code": null,
"e": 304,
"s": 167,
... |
Image Processing in Java – Colored image to Negative Image Conversion | 14 Nov, 2021
Prerequisites:
Image Processing in Java – Read and Write
Image Processing In Java – Get and Set Pixels
Image Processing in Java – Colored image to Grayscale Image Conversion
In this set, we will be converting a colored image to a negative image.
Colored Image (RGB Color Model) – The RGB color model is an ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Nov, 2021"
},
{
"code": null,
"e": 69,
"s": 54,
"text": "Prerequisites:"
},
{
"code": null,
"e": 111,
"s": 69,
"text": "Image Processing in Java – Read and Write"
},
{
"code": null,
"e": 157,
"s":... |
Python Pillow – Flip and Rotate Images | 16 Oct, 2021
Prerequisites: Pillow
Python Pillow or PIL is the Python library that provides image editing and manipulating features. The Image Module in it provides a number of functions to flip and rotate images. image.transpose() is the function used to rotate and flip images with necessary keywords as parameters.
Sy... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Oct, 2021"
},
{
"code": null,
"e": 50,
"s": 28,
"text": "Prerequisites: Pillow"
},
{
"code": null,
"e": 333,
"s": 50,
"text": "Python Pillow or PIL is the Python library that provides image editing and manipulatin... |
Self Organizing Maps – Kohonen Maps | 16 Feb, 2022
Self Organizing Map (or Kohonen Map or SOM) is a type of Artificial Neural Network which is also inspired by biological models of neural systems from the 1970s. It follows an unsupervised learning approach and trained its network through a competitive learning algorithm. SOM is used for clustering and mapp... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n16 Feb, 2022"
},
{
"code": null,
"e": 726,
"s": 54,
"text": "Self Organizing Map (or Kohonen Map or SOM) is a type of Artificial Neural Network which is also inspired by biological models of neural systems from the 1970s. It follows an... |
Python String format_map() Method | 05 Aug, 2021
Python String format_map() method is an inbuilt function in Python, which is used to return a dictionary key’s value.
Syntax:
string.format_map(z)
Parameters:
Here z is a variable in which the input dictionary is stored and string is the key of the input dictionary. input_dict: Takes a single parameter w... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 146,
"s": 28,
"text": "Python String format_map() method is an inbuilt function in Python, which is used to return a dictionary key’s value."
},
{
"code": null,
"e": 155,
"s": 146,
... |
Reading a Text File With SQL Server | 15 Oct, 2021
Here we will see, how to read a text file with SQL Server. We can read the text file using the OPENROWSET(BULK ) function.
It is a table-valued function that can read data from any file. This function returns a single column table having all the contents of the file. This single large value is known as a ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n15 Oct, 2021"
},
{
"code": null,
"e": 176,
"s": 53,
"text": "Here we will see, how to read a text file with SQL Server. We can read the text file using the OPENROWSET(BULK ) function."
},
{
"code": null,
"e": 405,
"s": ... |
Suffix Tree Application 5 – Longest Common Substring | 11 Oct, 2021
Given two strings X and Y, find the Longest Common Substring of X and Y.Naive [O(N*M2)] and Dynamic Programming [O(N*M)] approaches are already discussed here. In this article, we will discuss a linear time approach to find LCS using suffix tree (The 5th Suffix Tree Application). Here we will build general... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 592,
"s": 54,
"text": "Given two strings X and Y, find the Longest Common Substring of X and Y.Naive [O(N*M2)] and Dynamic Programming [O(N*M)] approaches are already discussed here. In this articl... |
Time Series Analysis with R | Towards Data Science | Time Series data is data that is observed at a fixed interval time and it could be measured daily, monthly, annually, etc. Time series has a lot of applications, especially on finance and also weather forecasting. In this article, I will introduce to you how to analyze and also forecast time series data using R. For th... | [
{
"code": null,
"e": 623,
"s": 172,
"text": "Time Series data is data that is observed at a fixed interval time and it could be measured daily, monthly, annually, etc. Time series has a lot of applications, especially on finance and also weather forecasting. In this article, I will introduce to you ... |
Can we serialize static variables in Java? | In Java, serialization is a concept using which we can write the state of an object into a byte stream so that we can transfer it over the network (using technologies like JPA and RMI).
But, static variables belong to class therefore, you cannot serialize static variables in Java. Still if you try to do so, the program... | [
{
"code": null,
"e": 1248,
"s": 1062,
"text": "In Java, serialization is a concept using which we can write the state of an object into a byte stream so that we can transfer it over the network (using technologies like JPA and RMI)."
},
{
"code": null,
"e": 1463,
"s": 1248,
"text... |
C/C++ Program for Finding the Number Occurring Odd Number of Times? | A C++ program to find a number which occurs odd number of times in a given array of positive integers. In this array, all numbers occur even number of times.
Input: arr[] = {5, 7, 8, 8, 5, 8, 8, 7, 7}
Output: 7
Use two loops in which the outer loop traversed all elements one by one and inner loop counts the number of o... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "A C++ program to find a number which occurs odd number of times in a given array of positive integers. In this array, all numbers occur even number of times."
},
{
"code": null,
"e": 1273,
"s": 1220,
"text": "Input: arr[] = {5, 7, 8,... |
Console.TreatControlCAsInput Property in C# with examples - GeeksforGeeks | 14 Mar, 2019
Console.TreatControlCAsInput Property is used to get or set a value indicating whether the combination of the Control modifier key and C console key (Ctrl+C) is treated as ordinary input or as an interruption that is handled by the operating system.
Syntax:
public static bool TreatControlCAsInput { get; se... | [
{
"code": null,
"e": 24222,
"s": 24194,
"text": "\n14 Mar, 2019"
},
{
"code": null,
"e": 24472,
"s": 24222,
"text": "Console.TreatControlCAsInput Property is used to get or set a value indicating whether the combination of the Control modifier key and C console key (Ctrl+C) is tr... |
Using Computer Vision and Machine Learning to Monitor Activity While Working From Home | by Raymond Lo, PhD | Towards Data Science | One of the biggest challenges staying home during this lockdown most of the world is facing is the sudden restriction of physical activities especially when confined in a small space. To help address this, I thought it would be interesting to see if I could use computer vision to help motivate myself to be more active.... | [
{
"code": null,
"e": 493,
"s": 172,
"text": "One of the biggest challenges staying home during this lockdown most of the world is facing is the sudden restriction of physical activities especially when confined in a small space. To help address this, I thought it would be interesting to see if I cou... |
Java Program For Converting Roman Numerals To Decimal Lying Between 1 to 3999 - GeeksforGeeks | 08 Feb, 2022
Given a Roman numeral, the task is to find its corresponding decimal value.
Example :
Input: IX
Output: 9
IX is a Roman symbol which represents 9
Input: XL
Output: 40
XL is a Roman symbol which represents 40
Input: MCMIV
Output: 1904
M is a thousand,
CM is nine hundred and
IV is four
Roman numerals a... | [
{
"code": null,
"e": 24586,
"s": 24558,
"text": "\n08 Feb, 2022"
},
{
"code": null,
"e": 24662,
"s": 24586,
"text": "Given a Roman numeral, the task is to find its corresponding decimal value."
},
{
"code": null,
"e": 24673,
"s": 24662,
"text": "Example : "
... |
Files createTempDirectory() Method in Java with Examples - GeeksforGeeks | 23 Jun, 2021
The createTempDirectory() method of java.nio.file.Files Class is used to create a new directory using the given prefix and attributes. The given prefix acts as the name of the formed directory, may be null. The directory is set with given attributes.
Based on the type of arguments passed, the Files class ... | [
{
"code": null,
"e": 24562,
"s": 24534,
"text": "\n23 Jun, 2021"
},
{
"code": null,
"e": 24814,
"s": 24562,
"text": "The createTempDirectory() method of java.nio.file.Files Class is used to create a new directory using the given prefix and attributes. The given prefix acts as the... |
EJB - Web Services | EJB 3.0 provides an option to expose session EJB as a webservice. @WebService annotation is used to mark a class as a web service end point and @WebMethod is used to expose a method as web method to client.
@Stateless
@WebService(serviceName="LibraryService")
public class LibraryPersistentBean implements LibraryPersist... | [
{
"code": null,
"e": 2254,
"s": 2047,
"text": "EJB 3.0 provides an option to expose session EJB as a webservice. @WebService annotation is used to mark a class as a web service end point and @WebMethod is used to expose a method as web method to client."
},
{
"code": null,
"e": 2555,
... |
What do you mean by glue in Cucumber? | The glue is a part of Cucumber options that describes the location and
path of the step definition file.
Test Runner file.
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import cucumber.api.testng.AbstractTestNGCucumberTests;
@CucumberOptions(
features = "sr... | [
{
"code": null,
"e": 1167,
"s": 1062,
"text": "The glue is a part of Cucumber options that describes the location and\npath of the step definition file."
},
{
"code": null,
"e": 1185,
"s": 1167,
"text": "Test Runner file."
},
{
"code": null,
"e": 1497,
"s": 1185,
... |
External Storage in Android with Example - GeeksforGeeks | 02 Nov, 2020
Android gives various options for storing apps data which uses a file system similar to the disk-based system on computer platforms
App-Specific storage: Store data files within internal volume directories or external. These data files are meant only for the app’s use. It uses internal storage directories ... | [
{
"code": null,
"e": 25879,
"s": 25851,
"text": "\n02 Nov, 2020"
},
{
"code": null,
"e": 26011,
"s": 25879,
"text": "Android gives various options for storing apps data which uses a file system similar to the disk-based system on computer platforms"
},
{
"code": null,
... |
Number of swaps to sort when only adjacent swapping allowed - GeeksforGeeks | 04 Apr, 2022
Given an array arr[] of non negative integers. We can perform a swap operation on any two adjacent elements in the array. Find the minimum number of swaps needed to sort the array in ascending order.
Examples :
Input : arr[] = {3, 2, 1}
Output : 3
We need to do following swaps
(3, 2), (3, 1) and (1, 2)
... | [
{
"code": null,
"e": 24936,
"s": 24908,
"text": "\n04 Apr, 2022"
},
{
"code": null,
"e": 25137,
"s": 24936,
"text": "Given an array arr[] of non negative integers. We can perform a swap operation on any two adjacent elements in the array. Find the minimum number of swaps needed t... |
How to set the Background Color of the GroupBox in C#? - GeeksforGeeks | 29 Jul, 2019
In Windows form, GroupBox is a container which contains multiple controls in it and the controls are related to each other. Or in other words, GroupBox is a frame display around a group of controls with a suitable optional title. Or a GroupBox is used to categorize the related controls in a group. In Group... | [
{
"code": null,
"e": 24222,
"s": 24194,
"text": "\n29 Jul, 2019"
},
{
"code": null,
"e": 24712,
"s": 24222,
"text": "In Windows form, GroupBox is a container which contains multiple controls in it and the controls are related to each other. Or in other words, GroupBox is a frame ... |
How to limit string length in PHP ? - GeeksforGeeks | 21 Oct, 2021
A string is a sequence of characters in PHP. The length of the string can be limited in PHP using various in-built functions, wherein the string character count can be restricted.
Approach 1 (Using for loop): The str_split() function can be used to convert the specified string into the array object. The a... | [
{
"code": null,
"e": 24892,
"s": 24864,
"text": "\n21 Oct, 2021"
},
{
"code": null,
"e": 25073,
"s": 24892,
"text": "A string is a sequence of characters in PHP. The length of the string can be limited in PHP using various in-built functions, wherein the string character count ca... |
How can we tackle MySQL error ‘ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement’ while importing or exporting the data? | MySQL throws this error because of the two reasons, either no directory is specified under --secure--file--priv variable or we are giving the wrong path in our query while importing or exporting the data. To tackle this error we must have to check the value of –secure—file—priv variable by following query −
mysql> Sele... | [
{
"code": null,
"e": 1371,
"s": 1062,
"text": "MySQL throws this error because of the two reasons, either no directory is specified under --secure--file--priv variable or we are giving the wrong path in our query while importing or exporting the data. To tackle this error we must have to check the v... |
SQL Tryit Editor v1.6 | SELECT 17 % 5;
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-SQL Editor, with a read-only... | [
{
"code": null,
"e": 15,
"s": 0,
"text": "SELECT 17 % 5;"
},
{
"code": null,
"e": 17,
"s": 15,
"text": ""
},
{
"code": null,
"e": 80,
"s": 17,
"text": "Edit the SQL Statement, and click \"Run SQL\" to see the result."
},
{
"code": null,
"e": 140,
... |
Visualizing Machine Learning Datasets with Google’s FACETS. | by Parul Pandey | Towards Data Science | More data beats clever algorithms, but better data beats more data : Peter Norvig
There has been a lot of uproar about how a large quantity of training data can have a tremendous impact on the results of a machine learning model. However, along with data quantity, it is also the quality that is critical to building a p... | [
{
"code": null,
"e": 254,
"s": 172,
"text": "More data beats clever algorithms, but better data beats more data : Peter Norvig"
},
{
"code": null,
"e": 642,
"s": 254,
"text": "There has been a lot of uproar about how a large quantity of training data can have a tremendous impact ... |
Differences between HTML <center> Tag and CSS “text-align: center;” Property | 18 May, 2021
If you are designing a simple web page, then not much difference is noticeable, but it is very necessary to understand the basic differences between these two. Since we are only concerned with the text, these elements do not have separate meanings.HTML <center> tag: The <center> tag in HTML is used to set ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 May, 2021"
},
{
"code": null,
"e": 707,
"s": 28,
"text": "If you are designing a simple web page, then not much difference is noticeable, but it is very necessary to understand the basic differences between these two. Since we are on... |
Function Arguments in R Programming | 01 Jun, 2020
Arguments are the parameters provided to a function to perform operations in a programming language. In R programming, we can use as many arguments as we want and are separated by a comma. There is no limit on the number of arguments in a function in R. In this article, we’ll discuss different ways of addi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Jun, 2020"
},
{
"code": null,
"e": 380,
"s": 28,
"text": "Arguments are the parameters provided to a function to perform operations in a programming language. In R programming, we can use as many arguments as we want and are separate... |
Python | Ways to convert hex into binary | 29 Jun, 2019
Conversion of hex to binary is a very common programming question. In this article, we will see a few methods to solve the above problem.
Method #1: Using bin and zfill
# Python code to demonstrate # conversion of a hex string# to the binary string # Initialising hex stringini_string = "1a"scale = 16 # P... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n29 Jun, 2019"
},
{
"code": null,
"e": 191,
"s": 53,
"text": "Conversion of hex to binary is a very common programming question. In this article, we will see a few methods to solve the above problem."
},
{
"code": null,
"e":... |
Formatted I/O in C++ | 24 Oct, 2019
C++ helps you to format the I/O operations like determining the number of digits to be displayed after the decimal point, specifying number base etc.
Example:
If we want to add + sign as the prefix of out output, we can use the formatting to do so:stream.setf(ios::showpos)
If input=100, output will be +1... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Oct, 2019"
},
{
"code": null,
"e": 202,
"s": 52,
"text": "C++ helps you to format the I/O operations like determining the number of digits to be displayed after the decimal point, specifying number base etc."
},
{
"code": nu... |
Python | Slicing list from Kth element to last element | 28 Jan, 2019
Python list slicing slices the list from start index till end – 1, specified as list elements. So its tricky when we require to also slice the last element of list. Trying to slice till list size + 1 gives an error. Let’s discuss ways in which last element can be included during a list slice.
Method #1 : U... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jan, 2019"
},
{
"code": null,
"e": 322,
"s": 28,
"text": "Python list slicing slices the list from start index till end – 1, specified as list elements. So its tricky when we require to also slice the last element of list. Trying to ... |
Difference between die() and exit() functions in PHP | 10 Apr, 2022
PHP exit() Function: In PHP, the exit() function prints a message and exits the application. It’s often used to print a different message in the event of a mistake. Use exit() when there is not an error and have to stop the execution.
Syntax:
exit("Message goes here");
or
exit();
Example:
exit("This reques... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Apr, 2022"
},
{
"code": null,
"e": 263,
"s": 28,
"text": "PHP exit() Function: In PHP, the exit() function prints a message and exits the application. It’s often used to print a different message in the event of a mistake. Use exit()... |
Remove NA Values from Vector in R | 31 Aug, 2021
In this article, we are going to discuss how to remove NA values from the vector.
We can remove those NA values from the vector by using is.na(). is.na() is used to get the na values based on the vector index. !is.na() will get the values except na.
Syntax:
vector[!is.na(vector)]
where the vector is the in... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 110,
"s": 28,
"text": "In this article, we are going to discuss how to remove NA values from the vector."
},
{
"code": null,
"e": 278,
"s": 110,
"text": "We can remove those NA v... |
Retrieve Image and File stored as a BLOB from MySQL Table using Python | 25 Feb, 2021
Prerequisites: MySQL server should be installed
In this post, we will be talking about how we can store files like images, text files, and other file formats into a MySQL table from a python script. Sometimes, just like other information, we need to store images and files into our database and provide it t... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Feb, 2021"
},
{
"code": null,
"e": 100,
"s": 52,
"text": "Prerequisites: MySQL server should be installed"
},
{
"code": null,
"e": 397,
"s": 100,
"text": "In this post, we will be talking about how we can store f... |
PostgreSQL – DROP TABLE | 28 Aug, 2020
PostgreSQL has a DROP TABLE statement that is used to remove an existing table or tables from the database.
Syntax: DROP TABLE [IF EXISTS] table_name [CASCADE | RESTRICT];
Let’s analyze the above syntax:
We specify the table name after the DROP TABLE keyword to remove the table permanently from the databas... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 136,
"s": 28,
"text": "PostgreSQL has a DROP TABLE statement that is used to remove an existing table or tables from the database."
},
{
"code": null,
"e": 200,
"s": 136,
"text":... |
Python | Fast Fourier Transformation | 26 Aug, 2019
It is an algorithm which plays a very important role in the computation of the Discrete Fourier Transform of a sequence. It converts a space or time signal to signal of the frequency domain.The DFT signal is generated by the distribution of value sequences to different frequency component. Working directly... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 Aug, 2019"
},
{
"code": null,
"e": 813,
"s": 54,
"text": "It is an algorithm which plays a very important role in the computation of the Discrete Fourier Transform of a sequence. It converts a space or time signal to signal of the f... |
How to undo a faulty merge with revert command in Git? | Let us say we performed a merge commit, shared this commit and later found out that the code is not compiling or our application is not working. This happens if we make mistakes while merging. In situations like these we need to undo the merge using the git revert command.
Consider the following diagram, where the repo... | [
{
"code": null,
"e": 1461,
"s": 1187,
"text": "Let us say we performed a merge commit, shared this commit and later found out that the code is not compiling or our application is not working. This happens if we make mistakes while merging. In situations like these we need to undo the merge using the... |
Factorial calculation using fork() in C for Linux | 02 Jun, 2017
Write a Unix C program using the fork() system call that generates the factorial and gives a sequence of series like 1, 2, 6, 24, 120... in the child process.The number of the sequence is provided in the command line.Examples:
Input :gfg@ubuntu:~/$ gcc -o fork fork.c
gfg@ubuntu:~/$ ./fork 6
Output ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Jun, 2017"
},
{
"code": null,
"e": 279,
"s": 52,
"text": "Write a Unix C program using the fork() system call that generates the factorial and gives a sequence of series like 1, 2, 6, 24, 120... in the child process.The number of th... |
RANDOM Shell Variable in Linux with Examples | 10 Nov, 2020
RANDOM is a shell variable that is used to generate random integers in Linux. It is an internal bash command that returns a pseudo-random 16-bit integer in the range 0 – 32767. It returns a different integer at each invocation. To enhance the randomization process, the random variable can be seeded with an... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n10 Nov, 2020"
},
{
"code": null,
"e": 449,
"s": 53,
"text": "RANDOM is a shell variable that is used to generate random integers in Linux. It is an internal bash command that returns a pseudo-random 16-bit integer in the range 0 – 3276... |
jQuery - hover( over, out ) Method | The hover( over, out ) method simulates hovering (moving the mouse on, and off, an object). This is a custom method which provides an 'in' to a frequent task.
Here is the simple syntax to use this method −
selector.hover( over, out )
Here is the description of all the parameters used by this method −
over − The callba... | [
{
"code": null,
"e": 2948,
"s": 2789,
"text": "The hover( over, out ) method simulates hovering (moving the mouse on, and off, an object). This is a custom method which provides an 'in' to a frequent task."
},
{
"code": null,
"e": 2995,
"s": 2948,
"text": "Here is the simple synt... |
Counting the frequencies in a list using dictionary in Python - GeeksforGeeks | 17 Jun, 2021
Given an unsorted list of some elements(may or may not be integers), Find the frequency of each distinct element in the list using a dictionary. Example:
Input : [1, 1, 1, 5, 5, 3, 1, 3, 3, 1,
4, 4, 4, 2, 2, 2, 2]
Output : 1 : 5
2 : 4
3 : 3
4 : 3
5 : ... | [
{
"code": null,
"e": 24654,
"s": 24626,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 24810,
"s": 24654,
"text": "Given an unsorted list of some elements(may or may not be integers), Find the frequency of each distinct element in the list using a dictionary. Example: "
},
... |
Add to Array-Form of Integer in Python | Suppose we have a number in array form. So if the number is say 534, then it is stored like [5, 3, 4]. We have to add another value k with the array form of the number. So the final number will be another array of digits.
To solve this, we will follow these steps −
Take each number and make them string, then concatenat... | [
{
"code": null,
"e": 1284,
"s": 1062,
"text": "Suppose we have a number in array form. So if the number is say 534, then it is stored like [5, 3, 4]. We have to add another value k with the array form of the number. So the final number will be another array of digits."
},
{
"code": null,
... |
Maximum number of 2x2 squares that can be fit inside a right isosceles triangle - GeeksforGeeks | 29 Nov, 2021
What is the maximum number of squares of size 2×2 units that can be fit in a right-angled isosceles triangle of a given base (in units). A side of the square must be parallel to the base of the triangle.
Examples:
Input : 8
Output : 6
Please refer below diagram for explanation.
Input : 7
Output : 3
Sinc... | [
{
"code": null,
"e": 25182,
"s": 25154,
"text": "\n29 Nov, 2021"
},
{
"code": null,
"e": 25387,
"s": 25182,
"text": "What is the maximum number of squares of size 2×2 units that can be fit in a right-angled isosceles triangle of a given base (in units). A side of the square must ... |
LinkedBlockingQueue poll() method in Java - GeeksforGeeks | 26 Nov, 2018
There is two types of poll() method in LinkedBlockingQueue.
The poll() method of LinkedBlockingQueue returns the head of LinkedBlockingQueue by removing that element from queue. It can be said that this method retrieves and removes element from head of this LinkedBlockingQueue. If queue is empty then poll ... | [
{
"code": null,
"e": 23626,
"s": 23598,
"text": "\n26 Nov, 2018"
},
{
"code": null,
"e": 23686,
"s": 23626,
"text": "There is two types of poll() method in LinkedBlockingQueue."
},
{
"code": null,
"e": 23954,
"s": 23686,
"text": "The poll() method of LinkedBlo... |
Groovy - Lists contains() | Returns true if this List contains the specified value.
boolean contains(Object value)
Value − The value to find in the list.
True or false depending on if the value is present in the list.
Following is an example of the usage of this method −
class Example {
static void main(String[] args) {
def lst = [11,... | [
{
"code": null,
"e": 2294,
"s": 2238,
"text": "Returns true if this List contains the specified value."
},
{
"code": null,
"e": 2326,
"s": 2294,
"text": "boolean contains(Object value)\n"
},
{
"code": null,
"e": 2365,
"s": 2326,
"text": "Value − The value to f... |
Converting Context Free Grammar to Greibach Normal Form - GeeksforGeeks | 07 Feb, 2019
Prerequisite – Context Free Grammars, Simplifying Context Free Grammars
A context free grammar (CGF) is in Greibach Normal Form (GNF) if all production rules satisfy one of the following conditions:
A non-terminal generating a terminal (e.g.; X->x)
A non-terminal generating a terminal followed by any numbe... | [
{
"code": null,
"e": 31189,
"s": 31161,
"text": "\n07 Feb, 2019"
},
{
"code": null,
"e": 31261,
"s": 31189,
"text": "Prerequisite – Context Free Grammars, Simplifying Context Free Grammars"
},
{
"code": null,
"e": 31388,
"s": 31261,
"text": "A context free gra... |
LocalDate plusWeeks() method in Java with Examples - GeeksforGeeks | 19 Jun, 2019
The plusWeeks() method of LocalDate class in Java is used to add the number of specified week in this LocalDate and return a copy of LocalDate.For example, 2018-12-24 plus one week would result in 2018-12-31. This instance is immutable and unaffected by this method call.
Syntax:
public LocalDate plusWeeks(... | [
{
"code": null,
"e": 24090,
"s": 24062,
"text": "\n19 Jun, 2019"
},
{
"code": null,
"e": 24362,
"s": 24090,
"text": "The plusWeeks() method of LocalDate class in Java is used to add the number of specified week in this LocalDate and return a copy of LocalDate.For example, 2018-12... |
TuriCreate library in Python - GeeksforGeeks | 16 Jul, 2020
TuriCreate(Machine Learning Python Library):Custom Machine Learning models can be made using Turi create very easily. You don’t have to be an expert in Machine Learning to use Turi create and it helps in building an add recommendations, object detection, image classification, image similarity or activity c... | [
{
"code": null,
"e": 24638,
"s": 24610,
"text": "\n16 Jul, 2020"
},
{
"code": null,
"e": 24975,
"s": 24638,
"text": "TuriCreate(Machine Learning Python Library):Custom Machine Learning models can be made using Turi create very easily. You don’t have to be an expert in Machine Lea... |
How to detect when the window size is resized using JavaScript ? - GeeksforGeeks | 02 Apr, 2020
The window resize event occurs whenever the size of the browser window gets changed. We can listen to the resize event in two ways:
Using onresize eventUsing Resize Observer API
Using onresize event
Using Resize Observer API
Method 1: Using resize event: We can add an event listener to the body element whi... | [
{
"code": null,
"e": 24822,
"s": 24794,
"text": "\n02 Apr, 2020"
},
{
"code": null,
"e": 24954,
"s": 24822,
"text": "The window resize event occurs whenever the size of the browser window gets changed. We can listen to the resize event in two ways:"
},
{
"code": null,
... |
How to refresh Activity when IntentService is finished in android? | Before getting into the example, we should know what Intent service is in android. Intent Service is going to do background operation asynchronously. When user call startService() from activity, it doesn’t create an instance for each request and it going to stop service after done some action in service class or else w... | [
{
"code": null,
"e": 1423,
"s": 1062,
"text": "Before getting into the example, we should know what Intent service is in android. Intent Service is going to do background operation asynchronously. When user call startService() from activity, it doesn’t create an instance for each request and it goin... |
Evaluating a string as a mathematical expression in JavaScript | We are required to write a JavaScript function that takes in a stringified mathematical equation. The function should return the result of the equation provided to the function.
For example: If the equation is −
const str = '1+23+4+5-30';
Then the output should be 3
The code for this will be −
const str = '1+23+4+5-30'... | [
{
"code": null,
"e": 1240,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in a stringified mathematical equation. The function should return the result of the equation provided to the function."
},
{
"code": null,
"e": 1274,
"s": 1240,
"text": "For ... |
DateTime.ToShortTimeString() Method in C# | The DateTime.ToShortTimeString() method in C# is used to convert the value of the current DateTime object to its equivalent short time string representation.
Following is the syntax −
public string ToShortTimeString ();
Let us now see an example to implement the DateTime.ToShortTimeString() method −
using System;
using... | [
{
"code": null,
"e": 1220,
"s": 1062,
"text": "The DateTime.ToShortTimeString() method in C# is used to convert the value of the current DateTime object to its equivalent short time string representation."
},
{
"code": null,
"e": 1246,
"s": 1220,
"text": "Following is the syntax ... |
Java program to merge two files into a third file | Following is the Java program to merge two files into a third file −
import java.io.*;
public class Demo {
public static void main(String[] args) throws IOException {
PrintWriter my_pw = new PrintWriter("path to third .txt file");
BufferedReader my_br = new BufferedReader(new FileReader("path to first .t... | [
{
"code": null,
"e": 1131,
"s": 1062,
"text": "Following is the Java program to merge two files into a third file −"
},
{
"code": null,
"e": 1936,
"s": 1131,
"text": "import java.io.*;\npublic class Demo {\n public static void main(String[] args) throws IOException {\n Pri... |
Check if the given RGB color code is valid or not - GeeksforGeeks | 06 Dec, 2021
Given three numbers R, G and B as the color code for Red, Green and Blue respectively as in the form of RGB color code. The task is to know whether the given color code is valid or not.
RGB Format: The RGB(Red, Green, Blue) format is used to define the color of an HTML element by specifying the R, G, B val... | [
{
"code": null,
"e": 24612,
"s": 24584,
"text": "\n06 Dec, 2021"
},
{
"code": null,
"e": 24798,
"s": 24612,
"text": "Given three numbers R, G and B as the color code for Red, Green and Blue respectively as in the form of RGB color code. The task is to know whether the given color... |
Tricks in R to Boost Your Productivity (Part 2) | by Wei Lin | Towards Data Science | I am always keen on tools and tricks that can help me get things done faster. While increasing productivity does not necessarily mean that it can give you good or right results, it can definitely reduce your working hours which means less time to make mistakes. Spending some time learning tricks and tools will pay itse... | [
{
"code": null,
"e": 696,
"s": 172,
"text": "I am always keen on tools and tricks that can help me get things done faster. While increasing productivity does not necessarily mean that it can give you good or right results, it can definitely reduce your working hours which means less time to make mis... |
An Introduction to Food Delivery Time Prediction | by Jye Sawtell-Rickson | Towards Data Science | Delivery time prediction has long been a part of city logistics, but refining accuracy has recently become very important for services such as Deliveroo, Foodpanda and Uber Eats which deliver food on-demand.
These services and similar ones must receive an order and have it delivered within ~30 minutes to appease their ... | [
{
"code": null,
"e": 380,
"s": 172,
"text": "Delivery time prediction has long been a part of city logistics, but refining accuracy has recently become very important for services such as Deliveroo, Foodpanda and Uber Eats which deliver food on-demand."
},
{
"code": null,
"e": 705,
"... |
A Feature Selection Tool for Machine Learning in Python | by Will Koehrsen | Towards Data Science | Feature selection, the process of finding and selecting the most useful features in a dataset, is a crucial step of the machine learning pipeline. Unnecessary features decrease training speed, decrease model interpretability, and, most importantly, decrease generalization performance on the test set.
Frustrated by the ... | [
{
"code": null,
"e": 474,
"s": 172,
"text": "Feature selection, the process of finding and selecting the most useful features in a dataset, is a crucial step of the machine learning pipeline. Unnecessary features decrease training speed, decrease model interpretability, and, most importantly, decrea... |
The mutable storage class in C++ | The mutable storage class specifier is used only on a class data member to make it modifiable even though the member is part of an object declared as const. You cannot use the mutable specifier with names declared as static or const, or reference members.
In the following example −
class A
{
public:
A() : x(4), y... | [
{
"code": null,
"e": 1318,
"s": 1062,
"text": "The mutable storage class specifier is used only on a class data member to make it modifiable even though the member is part of an object declared as const. You cannot use the mutable specifier with names declared as static or const, or reference member... |
How to perform topic modeling with Top2Vec. | Towards Data Science | Topic modeling is a problem in natural language processing that has many real-world applications. Being able to discover topics within large sections of text helps us understand text data in greater detail.
For many years, Latent Dirichlet Allocation (LDA) has been the most commonly used algorithm for topic modeling. T... | [
{
"code": null,
"e": 379,
"s": 172,
"text": "Topic modeling is a problem in natural language processing that has many real-world applications. Being able to discover topics within large sections of text helps us understand text data in greater detail."
},
{
"code": null,
"e": 767,
"s... |
XML DOM - Loading | In this chapter, we will study about XML Loading and Parsing.
In order to describe the interfaces provided by the API, the W3C uses an abstract language called the Interface Definition Language (IDL). The advantage of using IDL is that the developer learns how to use the DOM with his or her favorite language and can sw... | [
{
"code": null,
"e": 2350,
"s": 2288,
"text": "In this chapter, we will study about XML Loading and Parsing."
},
{
"code": null,
"e": 2645,
"s": 2350,
"text": "In order to describe the interfaces provided by the API, the W3C uses an abstract language called the Interface Definiti... |
Days of Our Lives | Practice | GeeksforGeeks | Given a month with arbitrary number of days, N, and an integer K representing the day with which it starts. ie- 1 for Monday, 2 for Tuesday and so on. Find the number of times each day (Monday, Tuesday, ..., Sunday) appears in the month.
Example 1:
Input:
N = 31 , K = 1
Output:
5 5 5 4 4 4 4
Explanation: The month... | [
{
"code": null,
"e": 466,
"s": 226,
"text": "Given a month with arbitrary number of days, N, and an integer K representing the day with which it starts. ie- 1 for Monday, 2 for Tuesday and so on. Find the number of times each day (Monday, Tuesday, ..., Sunday) appears in the month. "
},
{
"... |
Arduino - Trigonometric Functions | You need to use Trigonometry practically like calculating the distance for moving object or angular speed. Arduino provides traditional trigonometric functions (sin, cos, tan, asin, acos, atan) that can be summarized by writing their prototypes. Math.h contains the trigonometry function's prototype.
double sin(double x... | [
{
"code": null,
"e": 3171,
"s": 2870,
"text": "You need to use Trigonometry practically like calculating the distance for moving object or angular speed. Arduino provides traditional trigonometric functions (sin, cos, tan, asin, acos, atan) that can be summarized by writing their prototypes. Math.h ... |
Difference between two given times - GeeksforGeeks | 16 Dec, 2021
Given two times in string “HH:MM” format. Here ‘H’ shows hours and ‘M’ shows minutes. You have to find the difference in the same string format between these two strings. But both given strings should follow these cases. 1) Time 1 will be less than or equal to time2 2) Hours will be possible from 0 to 23. ... | [
{
"code": null,
"e": 24441,
"s": 24413,
"text": "\n16 Dec, 2021"
},
{
"code": null,
"e": 24800,
"s": 24441,
"text": "Given two times in string “HH:MM” format. Here ‘H’ shows hours and ‘M’ shows minutes. You have to find the difference in the same string format between these two s... |
Relational Operators in C | The following table shows all the relational operators supported by C language. Assume variable A holds 10 and variable B holds 20 then −
Try the following example to understand all the relational operators available in C −
#include <stdio.h>
main() {
int a = 21;
int b = 10;
int c ;
if( a == b ) {
... | [
{
"code": null,
"e": 2222,
"s": 2084,
"text": "The following table shows all the relational operators supported by C language. Assume variable A holds 10 and variable B holds 20 then −"
},
{
"code": null,
"e": 2308,
"s": 2222,
"text": "Try the following example to understand all ... |
Conditional Independence — The Backbone of Bayesian Networks | by Aerin Kim | Towards Data Science | Sometimes the explanation in Wikipedia is not the easiest to understand.
Let’s say A is the height of a child and B is the number of words that the child knows. It seems when A is high, B is high too.
There is a single piece of information that will make A and B completely independent. What would that be?
The child’s a... | [
{
"code": null,
"e": 244,
"s": 171,
"text": "Sometimes the explanation in Wikipedia is not the easiest to understand."
},
{
"code": null,
"e": 372,
"s": 244,
"text": "Let’s say A is the height of a child and B is the number of words that the child knows. It seems when A is high, ... |
C# - Interview Questions | Dear readers, these C# Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of C#. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questions start with... | [
{
"code": null,
"e": 2699,
"s": 2270,
"text": "Dear readers, these C# Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of C#. As per my experience good interviewers hardly plan to ask any parti... |
C++ Program to Implement Expression Tree Algorithm | An expression tree is basically a binary which is used to represent expressions. In expression tree, internal nodes correspond to operators and each leaf node corresponds to an operand. Here is a C++ Program to implement the Expression Tree Algorithm which takes the postfix expression as an input and generates the corr... | [
{
"code": null,
"e": 1430,
"s": 1062,
"text": "An expression tree is basically a binary which is used to represent expressions. In expression tree, internal nodes correspond to operators and each leaf node corresponds to an operand. Here is a C++ Program to implement the Expression Tree Algorithm wh... |
How to replace characters except last with the specified mask character in JavaScript ? - GeeksforGeeks | 17 Jun, 2021
In this article, we have given a number and the task is to replace the characters except for the last character with a specified mask character in JavaScript.
Example: Let’s take a number 12345678 and the masking character is * and the number of the last element that we have to skip is 2 In the below image... | [
{
"code": null,
"e": 26655,
"s": 26627,
"text": "\n17 Jun, 2021"
},
{
"code": null,
"e": 26814,
"s": 26655,
"text": "In this article, we have given a number and the task is to replace the characters except for the last character with a specified mask character in JavaScript."
}... |
Python MongoDB - create_index Query - GeeksforGeeks | 01 Jun, 2020
MongoDB is an open-source document-oriented database. MongoDB stores data in the form of key-value pairs and is a NoSQL database program. The term NoSQL means non-relational.
Indexing helps in querying the documents efficiently. It stores the value of a specific field or set of fields which are ordered by ... | [
{
"code": null,
"e": 41528,
"s": 41500,
"text": "\n01 Jun, 2020"
},
{
"code": null,
"e": 41703,
"s": 41528,
"text": "MongoDB is an open-source document-oriented database. MongoDB stores data in the form of key-value pairs and is a NoSQL database program. The term NoSQL means non-... |
Easy MLOps with PyCaret + MLflow. A beginner-friendly, step-by-step... | by Moez Ali | Towards Data Science | PyCaret is an open-source, low-code machine learning library and end-to-end model management tool built-in Python for automating machine learning workflows. It is known for its ease of use, simplicity, and ability to quickly and efficiently build and deploy end-to-end ML prototypes.
PyCaret is an alternate low-code lib... | [
{
"code": null,
"e": 456,
"s": 172,
"text": "PyCaret is an open-source, low-code machine learning library and end-to-end model management tool built-in Python for automating machine learning workflows. It is known for its ease of use, simplicity, and ability to quickly and efficiently build and depl... |
Create virtual environment using venv | Python - GeeksforGeeks | 29 Apr, 2022
A virtual environment is a tool that helps to keep dependencies required by different projects separate by creating isolated python virtual environments for them. This is one of the most important tools that most of the Python developers use.
Imagine a scenario where a web app is hosted on a cloud hosting ... | [
{
"code": null,
"e": 24594,
"s": 24566,
"text": "\n29 Apr, 2022"
},
{
"code": null,
"e": 24837,
"s": 24594,
"text": "A virtual environment is a tool that helps to keep dependencies required by different projects separate by creating isolated python virtual environments for them. ... |
How to generate large random numbers in Java? | For large random numbers, use BigInteger type in Java. At first, create a Random object −
Random randNum = new Random();
Now, declare a byte array and generate random bytes −
byte[] b = new byte[max];
randNum.nextBytes(b);
Now, generate a large random number with BigInteger type −
BigInteger bigInt = new BigInteger(b);... | [
{
"code": null,
"e": 1152,
"s": 1062,
"text": "For large random numbers, use BigInteger type in Java. At first, create a Random object −"
},
{
"code": null,
"e": 1183,
"s": 1152,
"text": "Random randNum = new Random();"
},
{
"code": null,
"e": 1237,
"s": 1183,
... |
Perl - Formats | Perl uses a writing template called a 'format' to output reports. To use the format feature of Perl, you have to define a format first and then you can use that format to write formatted data.
Following is the syntax to define a Perl format −
format FormatName =
fieldline
value_one, value_two, value_three
fieldline
val... | [
{
"code": null,
"e": 2413,
"s": 2220,
"text": "Perl uses a writing template called a 'format' to output reports. To use the format feature of Perl, you have to define a format first and then you can use that format to write formatted data."
},
{
"code": null,
"e": 2463,
"s": 2413,
... |
Remove all duplicates from a given string in Python | To remove all duplicates from a string in python, we need to first split the string by spaces so that we have each word in an array. Then there are multiple ways to remove duplicates.
We can remove duplicates by first converting all words to lowercase, then sorting them and finally picking only the unique ones. For exa... | [
{
"code": null,
"e": 1246,
"s": 1062,
"text": "To remove all duplicates from a string in python, we need to first split the string by spaces so that we have each word in an array. Then there are multiple ways to remove duplicates."
},
{
"code": null,
"e": 1388,
"s": 1246,
"text":... |
is_enabled() element method - Selenium Python - GeeksforGeeks | 27 Apr, 2020
Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout – Navigating links using get method – Selenium Python. Just being able ... | [
{
"code": null,
"e": 24540,
"s": 24512,
"text": "\n27 Apr, 2020"
},
{
"code": null,
"e": 25097,
"s": 24540,
"text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests usi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.