title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Confusion Matrix — Clearly Explained | by Indhumathy Chelliah | Towards Data Science
In machine learning, the confusion matrix helps to summarize the performance of classification models. From the confusion matrix, we can calculate many metrics like recall, precision,f1 score which is used to evaluate the performance of classification models. In this blog, we will learn about the confusion matrix and t...
[ { "code": null, "e": 432, "s": 172, "text": "In machine learning, the confusion matrix helps to summarize the performance of classification models. From the confusion matrix, we can calculate many metrics like recall, precision,f1 score which is used to evaluate the performance of classification mod...
Start Coding - Java | Practice | GeeksforGeeks
When learning a new language, we first learn to output some message. Here, we'll start with the famous Hello World message. Now, here you are given a function to complete. Don't worry about the ins and outs of functions, just add the command (System.out.print("Hello World")) to print Hello World. Example: Input: No inp...
[ { "code": null, "e": 524, "s": 226, "text": "When learning a new language, we first learn to output some message. Here, we'll start with the famous Hello World message. Now, here you are given a function to complete. Don't worry about the ins and outs of functions, just add the command (System.out.p...
PyTorch – FiveCrop Transformation
To crop a given image into four corners and the central crop, we apply FiveCrop() transformation. It's one of the transformations provided by the torchvision.transforms module. This module contains many important transformations that can be used to perform different types of manipulations on the image data. FiveCrop() ...
[ { "code": null, "e": 1371, "s": 1062, "text": "To crop a given image into four corners and the central crop, we apply FiveCrop() transformation. It's one of the transformations provided by the torchvision.transforms module. This module contains many important transformations that can be used to perf...
Path methods in C#
To handle File Paths in C#, use the Path methods. These methods come under System.IO Namespace. Some of them are − Retrieve the extension of the file using the GetExtension() method. For example, .txt, .dat, etc. Retrieve the name of the file using the GetFileName() method. For example, new.txt, details.dat, etc. Retri...
[ { "code": null, "e": 1158, "s": 1062, "text": "To handle File Paths in C#, use the Path methods. These methods come under System.IO Namespace." }, { "code": null, "e": 1177, "s": 1158, "text": "Some of them are −" }, { "code": null, "e": 1245, "s": 1177, "text...
Add two numbers represented by linked lists | Set 1 - GeeksforGeeks
12 Apr, 2022 Given two numbers represented by two lists, write a function that returns the sum list. The sum list is a list representation of the addition of two input numbers. Example: Input: List1: 5->6->3 // represents number 563 List2: 8->4->2 // represents number 842 Output: Resultant list: 1->4->0->5 // represent...
[ { "code": null, "e": 24231, "s": 24203, "text": "\n12 Apr, 2022" }, { "code": null, "e": 24395, "s": 24231, "text": "Given two numbers represented by two lists, write a function that returns the sum list. The sum list is a list representation of the addition of two input numbers....
C Program To Check For Balanced Brackets In An Expression (Well-Formedness) Using Stack - GeeksforGeeks
14 Dec, 2021 Given an expression string exp, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are correct in exp. Example: Input: exp = “[()]{}{[()()]()}” Output: Balanced Input: exp = “[(])” Output: Not Balanced Algorithm: Declare a character stack S. Now traverse the expr...
[ { "code": null, "e": 25008, "s": 24980, "text": "\n14 Dec, 2021" }, { "code": null, "e": 25152, "s": 25008, "text": "Given an expression string exp, write a program to examine whether the pairs and the orders of “{“, “}”, “(“, “)”, “[“, “]” are correct in exp." }, { "code...
Find numbers a and b that satisfy the given conditions - GeeksforGeeks
07 Mar, 2022 Given an integer n, the task is to find two integers a and b which satisfy the below conditions: a % b = 0a * b > na / b < n a % b = 0 a * b > n a / b < n If no pair satisfies the above conditions then print -1. Note: There can be multiple (a, b) pairs satisfying the above conditions for n.Examples: In...
[ { "code": null, "e": 24716, "s": 24688, "text": "\n07 Mar, 2022" }, { "code": null, "e": 24815, "s": 24716, "text": "Given an integer n, the task is to find two integers a and b which satisfy the below conditions: " }, { "code": null, "e": 24843, "s": 24815, ...
PHP | file_put_contents() Function - GeeksforGeeks
03 May, 2018 The file_put_contents() function in PHP is an inbuilt function which is used to write a string to a file. The file_put_contents() function checks for the file in which the user wants to write and if the file doesn’t exist, it creates a new file. The path of the file on which the user wants to write and the...
[ { "code": null, "e": 24255, "s": 24227, "text": "\n03 May, 2018" }, { "code": null, "e": 24501, "s": 24255, "text": "The file_put_contents() function in PHP is an inbuilt function which is used to write a string to a file. The file_put_contents() function checks for the file in w...
How to use MongoDB Aggregate to sort?
Use aggregate() and within that to sort, use $sort in MongoDB. Let us create a collection with documents − > db.demo164.insertOne({"StudentAge":24}); { "acknowledged" : true, "insertedId" : ObjectId("5e36883d9e4f06af551997c8") } > db.demo164.insertOne({"StudentAge":25}); { "acknowledged" : true, "insertedId...
[ { "code": null, "e": 1169, "s": 1062, "text": "Use aggregate() and within that to sort, use $sort in MongoDB. Let us create a collection with documents −" }, { "code": null, "e": 1681, "s": 1169, "text": "> db.demo164.insertOne({\"StudentAge\":24});\n{\n \"acknowledged\" : true...
Wavelet Transforms in Python with Google JAX | by Shailesh Kumar | Towards Data Science
Wavelet transforms are one of the key tools for signal analysis. They are extensively used in science and engineering. Some of the specific applications include data compression, gait analysis, signal/image de-noising, digital communications, etc. This article focuses on a simple lossy data compression application by u...
[ { "code": null, "e": 577, "s": 172, "text": "Wavelet transforms are one of the key tools for signal analysis. They are extensively used in science and engineering. Some of the specific applications include data compression, gait analysis, signal/image de-noising, digital communications, etc. This ar...
Java if-then-else statement
In Java, if-then-else is represented by the if-else statement. An if statement can be followed by an optional else statement, which executes when the Boolean expression is false. Following is the syntax of an if...else statement − if(Boolean_expression) { // Executes when the Boolean expression is true }else { //...
[ { "code": null, "e": 1125, "s": 1062, "text": "In Java, if-then-else is represented by the if-else statement." }, { "code": null, "e": 1241, "s": 1125, "text": "An if statement can be followed by an optional else statement, which executes when the Boolean expression is false." ...
Maximize GCD of all possible pairs from 1 to N - GeeksforGeeks
05 Apr, 2021 Given an integer N (? 2), the task is to find the maximum GCD among all pairs possible by the integers in the range [1, N]. Example: Input: N = 5 Output: 2 Explanation : GCD(1, 2) : 1 GCD(1, 3) : 1 GCD(1, 4) : 1 GCD(1, 5) : 1 GCD(2, 3) : 1 GCD(2, 4) : 2 GCD(2, 5) : 1 GCD(3, 4) : 1 GCD(3, 5) : 1 GCD(4, 5) ...
[ { "code": null, "e": 24511, "s": 24483, "text": "\n05 Apr, 2021" }, { "code": null, "e": 24635, "s": 24511, "text": "Given an integer N (? 2), the task is to find the maximum GCD among all pairs possible by the integers in the range [1, N]." }, { "code": null, "e": 24...
A Simple Way of Automating and Scheduling SQL Server Database Replication between Different Servers | by Christopher Tao | Towards Data Science
Microsoft SQL Server provides SQL Server Replication features that we can utilise to set a database as Publisher and another one is Subscriber, so we can replicate the database with customisations in the scripts. However, sometimes the requirements may not be that complex so that SQL Server Replication could be a littl...
[ { "code": null, "e": 378, "s": 46, "text": "Microsoft SQL Server provides SQL Server Replication features that we can utilise to set a database as Publisher and another one is Subscriber, so we can replicate the database with customisations in the scripts. However, sometimes the requirements may not...
Count of substrings of a binary string containing K ones - GeeksforGeeks
13 Sep, 2021 Given a binary string of length N and an integer K, we need to find out how many substrings of this string are exist which contains exactly K ones. Examples: Input : s = “10010” K = 1 Output : 9 The 9 substrings containing one 1 are, “1”, “10”, “100”, “001”, “01”, “1”, “10”, “0010” and “010” In t...
[ { "code": null, "e": 25306, "s": 25278, "text": "\n13 Sep, 2021" }, { "code": null, "e": 25454, "s": 25306, "text": "Given a binary string of length N and an integer K, we need to find out how many substrings of this string are exist which contains exactly K ones." }, { "...
Recursive program to insert a star between pair of identical characters - GeeksforGeeks
27 May, 2021 Given a string with repeated characters, we have to insert a star i.e.” * “ between pair of adjacent identical characters using recursion. Examples: Input : aabb Output : a*ab*b Input : xxxy Output : x*x*xy Approach: If there is an empty string then simply return. This forms our base condition. Check...
[ { "code": null, "e": 24241, "s": 24213, "text": "\n27 May, 2021" }, { "code": null, "e": 24381, "s": 24241, "text": "Given a string with repeated characters, we have to insert a star i.e.” * “ between pair of adjacent identical characters using recursion. " }, { "code": n...
Groovy - Maps get()
Look up the key in this Map and return the corresponding value. If there is no entry in this Map for the key, then return null. Object get(Object key) Key − Key to search for retrieval. The key-value pair or NULL if it does not exist. Following is an example of the usage of this method − class Example { static voi...
[ { "code": null, "e": 2366, "s": 2238, "text": "Look up the key in this Map and return the corresponding value. If there is no entry in this Map for the key, then return null." }, { "code": null, "e": 2390, "s": 2366, "text": "Object get(Object key)\n" }, { "code": null, ...
How to align objects vertically when working with grids in CSS ? - GeeksforGeeks
07 Jan, 2020 CSS grid layout is one of the strongest layout of CSS. The grid layout is 2-D which means it can handle both rows and columns, unlike flexbox which is 1-D. To align objects apply CSS to the parent element which becomes the grid container and the element’s child which becomes the items in the grid. Approach...
[ { "code": null, "e": 25376, "s": 25348, "text": "\n07 Jan, 2020" }, { "code": null, "e": 25675, "s": 25376, "text": "CSS grid layout is one of the strongest layout of CSS. The grid layout is 2-D which means it can handle both rows and columns, unlike flexbox which is 1-D. To alig...
How to do a batch insert in MySQL?
To do a batch insert, we need to use all column names with parenthesis, separated by ‘,’. Let us see an example. First, we will create a table. The following is the CREATE command to create a table. mysql> CREATE table MultipleRecordWithValues - > ( - > id int, - > name varchar(100) - > ); Query OK, 0 rows ...
[ { "code": null, "e": 1152, "s": 1062, "text": "To do a batch insert, we need to use all column names with parenthesis, separated by ‘,’." }, { "code": null, "e": 1261, "s": 1152, "text": "Let us see an example. First, we will create a table. The following is the CREATE command to...
How can I make a horizontal ListView in Android?
This example demonstrates about How can I make a horizontal ListView in Android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <Lin...
[ { "code": null, "e": 1143, "s": 1062, "text": "This example demonstrates about How can I make a horizontal ListView in Android." }, { "code": null, "e": 1273, "s": 1143, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required deta...
Huffman Coding Algorithm
Huffman coding is a lossless data compression algorithm. In this algorithm, a variable-length code is assigned to input different characters. The code length is related to how frequently characters are used. Most frequent characters have the smallest codes and longer codes for least frequent characters. There are mainl...
[ { "code": null, "e": 1367, "s": 1062, "text": "Huffman coding is a lossless data compression algorithm. In this algorithm, a variable-length code is assigned to input different characters. The code length is related to how frequently characters are used. Most frequent characters have the smallest co...
How to convert JSON to Ordereddict?
24 Jan, 2021 The full-form of JSON is JavaScript Object Notation. It means that a script (executable) file which is made of text in a programming language, is used to store and transfer the data. Python supports JSON through a built-in package called json. To use this feature, we import the json package in Python scrip...
[ { "code": null, "e": 53, "s": 25, "text": "\n24 Jan, 2021" }, { "code": null, "e": 509, "s": 53, "text": "The full-form of JSON is JavaScript Object Notation. It means that a script (executable) file which is made of text in a programming language, is used to store and transfer t...
Justify the given Text based on the given width of each line
27 Feb, 2020 Given a string str and width of each line as L, the task is to justify the string such that each line of justified text is of length L with help of space (‘ ‘) and the last line should be left-justified. Examples: Input: str = “GeeksforGeek is the best computer science portal for geeks.”, L = 16Output:Geek...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Feb, 2020" }, { "code": null, "e": 256, "s": 52, "text": "Given a string str and width of each line as L, the task is to justify the string such that each line of justified text is of length L with help of space (‘ ‘) and the last l...
RadioButton in Tkinter | Python
16 Feb, 2021 The Radiobutton is a standard Tkinter widget used to implement one-of-many selections. Radiobuttons can contain text or images, and you can associate a Python function or method with each button. When the button is pressed, Tkinter automatically calls that function or method.Syntax: button = Radiobutton(...
[ { "code": null, "e": 54, "s": 26, "text": "\n16 Feb, 2021" }, { "code": null, "e": 340, "s": 54, "text": "The Radiobutton is a standard Tkinter widget used to implement one-of-many selections. Radiobuttons can contain text or images, and you can associate a Python function or met...
JavaScript | Const
07 Dec, 2021 ES2015 (ES6) introduced const keyword to define a new variable. The difference in const variable declaration than others is that it cannot be reassigned. Properties: Cannot be reassigned. Block Scope It can be assign on the variable on declaration line. Primitive value. The property of a const object can b...
[ { "code": null, "e": 54, "s": 26, "text": "\n07 Dec, 2021" }, { "code": null, "e": 208, "s": 54, "text": "ES2015 (ES6) introduced const keyword to define a new variable. The difference in const variable declaration than others is that it cannot be reassigned." }, { "code"...
C++ Utility Library - make_pair Function
It constructs a pair object with its first element set to x and its second element set to y. Following is the declaration for std::make_pair function. template <class T1, class T2> pair<T1,T2> make_pair (T1 x, T2 y); template <class T1, class T2> pair<V1,V2> make_pair (T1&& x, T2&& y); x, y − These are two value...
[ { "code": null, "e": 2696, "s": 2603, "text": "It constructs a pair object with its first element set to x and its second element set to y." }, { "code": null, "e": 2754, "s": 2696, "text": "Following is the declaration for std::make_pair function." }, { "code": null, ...
Why is indentation important in Python?
Many a times it is required to treat more than one statements in a program as a block. Different programming languages use different techniques to define scope and extent of block of statements in constructs like class, function, conditional and loop. In C and C++ for example, statements inside curly brackets are treat...
[ { "code": null, "e": 1458, "s": 1062, "text": "Many a times it is required to treat more than one statements in a program as a block. Different programming languages use different techniques to define scope and extent of block of statements in constructs like class, function, conditional and loop. I...
ES6 - Variables
A variable, by definition, is “a named space in the memory” that stores values. In other words, it acts as a container for values in a program. Variable names are called identifiers. Following are the naming rules for an identifier − Identifiers cannot be keywords. Identifiers cannot be keywords. Identifiers can contai...
[ { "code": null, "e": 2511, "s": 2277, "text": "A variable, by definition, is “a named space in the memory” that stores values. In other words, it acts as a container for values in a program. Variable names are called identifiers. Following are the naming rules for an identifier −" }, { "code...
HBase - Scan
The scan command is used to view the data in HTable. Using the scan command, you can get the table data. Its syntax is as follows: scan ‘<table name>’ The following example shows how to read data from a table using the scan command. Here we are reading the emp table. hbase(main):010:0> scan 'emp' ROW ...
[ { "code": null, "e": 2168, "s": 2037, "text": "The scan command is used to view the data in HTable. Using the scan command, you can get the table data. Its syntax is as follows:" }, { "code": null, "e": 2190, "s": 2168, "text": "scan ‘<table name>’ \n" }, { "code": null, ...
Single level inheritance in Java
Single Level inheritance - A class inherits properties from a single class. For example, Class B inherits Class A. Live Demo class Shape { public void display() { System.out.println("Inside display"); } } class Rectangle extends Shape { public void area() { System.out.println("Inside area"); } ...
[ { "code": null, "e": 1177, "s": 1062, "text": "Single Level inheritance - A class inherits properties from a single class. For example, Class B inherits Class A." }, { "code": null, "e": 1188, "s": 1177, "text": " Live Demo" }, { "code": null, "e": 1543, "s": 1188...
PHP $_FILES
The global predefined variable $_FILES is an associative array containing items uploaded via HTTP POST method. Uploading a file requires HTTP POST method form with enctype attribute set to multipart/form-data. $HTTP_POST_FILES also contains the same information, but is not a superglobal, and now been deprecated The _FI...
[ { "code": null, "e": 1272, "s": 1062, "text": "The global predefined variable $_FILES is an associative array containing items uploaded via HTTP POST method. Uploading a file requires HTTP POST method form with enctype attribute set to multipart/form-data." }, { "code": null, "e": 1375, ...
How to detect integer overflow in C/C++?
The only safe way is to check for overflow before it occurs. There are some hacky ways of checking for integer overflow though. So if you're aiming for detecting overflow in unsigned int addition, you can check if the result is actually lesser than either values added. So for example, unsigned int x, y; unsigned int va...
[ { "code": null, "e": 1348, "s": 1062, "text": "The only safe way is to check for overflow before it occurs. There are some hacky ways of checking for integer overflow though. So if you're aiming for detecting overflow in unsigned int addition, you can check if the result is actually lesser than eith...
AsEnumerable() in C#
To cast a specific type to its IEnumerable equivalent, use the AsEnumerable() method. It is an extension method. The following is our array − int[] arr = new int[5]; arr[0] = 10; arr[1] = 20; arr[2] = 30; arr[3] = 40; arr[4] = 50; Now, get the IEnumerable equivalent. arr.AsEnumerable(); Live Demo using System; using S...
[ { "code": null, "e": 1175, "s": 1062, "text": "To cast a specific type to its IEnumerable equivalent, use the AsEnumerable() method. It is an extension method." }, { "code": null, "e": 1204, "s": 1175, "text": "The following is our array −" }, { "code": null, "e": 129...
Tutorial: Create a Python CLI Package via Traitlets | by Joél Collins | Towards Data Science
If you’re like me... You love writing scripts to speed up your workflow You’re fluent in Python and basically nothing else. Annoyingly, python can feel a little clunky in the terminal. If you want to run python scripts from command line, you either need to... Assign a different command (usually a bash alias) to every s...
[ { "code": null, "e": 192, "s": 171, "text": "If you’re like me..." }, { "code": null, "e": 243, "s": 192, "text": "You love writing scripts to speed up your workflow" }, { "code": null, "e": 295, "s": 243, "text": "You’re fluent in Python and basically nothing...
What is use of fluent Validation in C# and how to use in C#?
FluentValidation is a .NET library for building strongly-typed validation rules. It Uses a fluent interface and lambda expressions for building validation rules. It helps clean up your domain code and make it more cohesive, as well as giving you a single place to look for validation logic To make use of fluent validati...
[ { "code": null, "e": 1352, "s": 1062, "text": "FluentValidation is a .NET library for building strongly-typed validation rules. It Uses a fluent interface and lambda expressions for building validation rules. It helps clean up your domain code and make it more cohesive, as well as giving you a singl...
Julia Programming - Plotting
Julia has various packages for plotting and before starting making plots, we need to first download and install some of them as follows − (@v1.5) pkg> add Plots PyPlot GR UnicodePlots The package Plots is a high-level plotting package, also referred to as ‘back-ends’ interfaces with other plotting packages. To start us...
[ { "code": null, "e": 2216, "s": 2078, "text": "Julia has various packages for plotting and before starting making plots, we need to first download and install some of them as follows −" }, { "code": null, "e": 2262, "s": 2216, "text": "(@v1.5) pkg> add Plots PyPlot GR UnicodePlot...
Plotly - Polar Chart and Radar Chart
In this chapter, we will learn how Polar Chart and Radar Chart can be made with the help Plotly. First of all, let us study about polar chart. Polar Chart is a common variation of circular graphs. It is useful when relationships between data points can be visualized most easily in terms of radiuses and angles. In Polar...
[ { "code": null, "e": 2457, "s": 2360, "text": "In this chapter, we will learn how Polar Chart and Radar Chart can be made with the help Plotly." }, { "code": null, "e": 2503, "s": 2457, "text": "First of all, let us study about polar chart." }, { "code": null, "e": 26...
isupper() function in C Language
The function isupper() is used to check that the character is uppercase or not. It returns non-zero value if successful otherwise, return zero. It is declared in “ctype.h” header file. Here is the syntax of isupper() in C language, int isupper(int character); Here, character − The character which is to be checked. Here...
[ { "code": null, "e": 1247, "s": 1062, "text": "The function isupper() is used to check that the character is uppercase or not. It returns non-zero value if successful otherwise, return zero. It is declared in “ctype.h” header file." }, { "code": null, "e": 1294, "s": 1247, "text"...
Python - Convert Index Dictionary to List - GeeksforGeeks
03 Jul, 2020 Sometimes, while working with Python dictionaries, we can have a problem in which we have keys mapped with values, where keys represent list index where value has to be placed. This kind of problem can have application in all data domains such as web development. Let’s discuss certain ways in which this ta...
[ { "code": null, "e": 23933, "s": 23905, "text": "\n03 Jul, 2020" }, { "code": null, "e": 24261, "s": 23933, "text": "Sometimes, while working with Python dictionaries, we can have a problem in which we have keys mapped with values, where keys represent list index where value has ...
Risk
Risk can be defined as the probability of an event, hazard, accident, threat or situation occurring and its undesirable consequences. It is a factor that could result in negative consequences and usually expressed as the product of impact and likelihood. Risk = Probability of the event occurring x Impact if it did happ...
[ { "code": null, "e": 6000, "s": 5745, "text": "Risk can be defined as the probability of an event, hazard, accident, threat or situation occurring and its undesirable consequences. It is a factor that could result in negative consequences and usually expressed as the product of impact and likelihood...
Java - The LinkedHashMap Class
This class extends HashMap and maintains a linked list of the entries in the map, in the order in which they were inserted. This allows insertion-order iteration over the map. That is, when iterating a LinkedHashMap, the elements will be returned in the order in which they were inserted. You can also create a LinkedHas...
[ { "code": null, "e": 2666, "s": 2377, "text": "This class extends HashMap and maintains a linked list of the entries in the map, in the order in which they were inserted. This allows insertion-order iteration over the map. That is, when iterating a LinkedHashMap, the elements will be returned in the...
Program to convert given number of days in terms of Years, Weeks and Days in C
You are given with number of days, and the task is to convert the given number of days in terms of years, weeks and days. Let us assume the number of days in a year =365 Number of year = (number of days) / 365 Explanation-: number of years will be the quotient obtained by dividing the given number of days with 365 Numb...
[ { "code": null, "e": 1184, "s": 1062, "text": "You are given with number of days, and the task is to convert the given number of days in terms of years, weeks and days." }, { "code": null, "e": 1232, "s": 1184, "text": "Let us assume the number of days in a year =365" }, { ...
Basic Calculator II in Python
Suppose we have to implement a basic calculator to evaluate a simple expression string. The expression string will hold only non-negative integers, some operators like, +, -, *, / and empty spaces. The integer division should take the quotient part only. So if the input is like “3+2*2”, then the output will be 7. To so...
[ { "code": null, "e": 1317, "s": 1062, "text": "Suppose we have to implement a basic calculator to evaluate a simple expression string. The expression string will hold only non-negative integers, some operators like, +, -, *, / and empty spaces. The integer division should take the quotient part only...
AIML - <star> Tag
<star> Tag is used to match wild card * character(s) in <pattern> Tag. <star index = "n"/> n signifies the position of * within the user input in <pattern> Tag. Consider the following example − <category> <pattern> A * is a *. </pattern> <template> When a <star index = "1"/> is not a <star index = "2"...
[ { "code": null, "e": 1882, "s": 1811, "text": "<star> Tag is used to match wild card * character(s) in <pattern> Tag." }, { "code": null, "e": 1903, "s": 1882, "text": "<star index = \"n\"/>\n" }, { "code": null, "e": 1974, "s": 1903, "text": "n signifies the ...
Difference between Instance Variable and Class Variable - GeeksforGeeks
28 Apr, 2021 Instance Variable: It is basically a class variable without a static modifier and is usually shared by all class instances. Across different objects, these variables can have different values. They are tied to a particular object instance of the class, therefore, the contents of an instance variable are to...
[ { "code": null, "e": 24965, "s": 24937, "text": "\n28 Apr, 2021" }, { "code": null, "e": 25324, "s": 24965, "text": "Instance Variable: It is basically a class variable without a static modifier and is usually shared by all class instances. Across different objects, these variabl...
Non-Negative Matrix Factorization - GeeksforGeeks
18 Jul, 2021 Prerequisite : Low Rank Approximation</p> Non-Negative Matrix Factorization: For a matrix A of dimensions m x n, where each element is ≥ 0, NMF can factorize it into two matrices W and H having dimensions m x k and k x n respectively and these two matrices only contain non-negative elements. Here, matrix A...
[ { "code": null, "e": 24264, "s": 24236, "text": "\n18 Jul, 2021" }, { "code": null, "e": 24306, "s": 24264, "text": "Prerequisite : Low Rank Approximation</p>" }, { "code": null, "e": 24587, "s": 24306, "text": "Non-Negative Matrix Factorization: For a matrix ...
Angular 8 - Data Binding
Data binding deals with how to bind your data from component to HTML DOM elements (Templates). We can easily interact with application without worrying about how to insert your data. We can make connections in two different ways one way and two-way binding. Before moving to this topic, let’s create a component in Angul...
[ { "code": null, "e": 2646, "s": 2388, "text": "Data binding deals with how to bind your data from component to HTML DOM elements (Templates). We can easily interact with application without worrying about how to insert your data. We can make connections in two different ways one way and two-way bind...
Java Internalization - Formatting Patterns
Followings is the use of characters in formatting patterns. 0 To display 0 if less digits are present. # To display digit ommitting leading zeroes. . Decimal separator. , Grouping separator. E Mantissa and Exponent separator for exponential formats. ; Format separator. - Negative number prefix. % Shows number as percen...
[ { "code": null, "e": 2765, "s": 2705, "text": "Followings is the use of characters in formatting patterns." }, { "code": null, "e": 2767, "s": 2765, "text": "0" }, { "code": null, "e": 2808, "s": 2767, "text": "To display 0 if less digits are present." }, ...
How to Build a Content-Based Movie Recommender System | by Egemen Zeytinci | Towards Data Science
In this article, I will try to explain how we can create a recommender system without user data. I’ll also share an example that I’ve done with Python and tell you how it works step by step. I am not going to explain the types of recommender systems separately, since it is quite easy to find on the internet. So, let’s ...
[ { "code": null, "e": 363, "s": 172, "text": "In this article, I will try to explain how we can create a recommender system without user data. I’ll also share an example that I’ve done with Python and tell you how it works step by step." }, { "code": null, "e": 550, "s": 363, "tex...
C# - Program Structure
Before we study basic building blocks of the C# programming language, let us look at a bare minimum C# program structure so that we can take it as a reference in upcoming chapters. A C# program consists of the following parts − Namespace declaration A class Class methods Class attributes A Main method Statements and Ex...
[ { "code": null, "e": 2451, "s": 2270, "text": "Before we study basic building blocks of the C# programming language, let us look at a bare minimum C# program structure so that we can take it as a reference in upcoming chapters." }, { "code": null, "e": 2498, "s": 2451, "text": "A...
PostgreSQL - COMMIT - GeeksforGeeks
01 Feb, 2021 PostgreSQL COMMIT command is used to save changes and reflect it database whenever we display the required data. For suppose we updated data in the database but we didn’t give COMMIT then the changes are not reflected in the database. To save the changes done in a transaction, we should COMMIT that transac...
[ { "code": null, "e": 27609, "s": 27581, "text": "\n01 Feb, 2021" }, { "code": null, "e": 27931, "s": 27609, "text": "PostgreSQL COMMIT command is used to save changes and reflect it database whenever we display the required data. For suppose we updated data in the database but we...
How to change Pagefile settings using PowerShell?
To change the pagefile settings, we will divide this into multiple sections. First, when Pagefile is automatically managed, we can’t modify the settings so we need to remove that box. In GUI that box can be unchecked in Virtual memory settings. Code to uncheck the above box. $pagefile = Get-WmiObject Win32_ComputerSyst...
[ { "code": null, "e": 1432, "s": 1187, "text": "To change the pagefile settings, we will divide this into multiple sections. First, when Pagefile is\nautomatically managed, we can’t modify the settings so we need to remove that box. In GUI that box\ncan be unchecked in Virtual memory settings." }, ...
Time To Live (TTL) for a column in Cassandra
27 Nov, 2019 In this article we will discuss how to insert and update using Time To Live (TTL) command and how to determine the expire time limit of an existing column.In Cassandra Time to Live (TTL) is play an important role while if we want to set the time limit of a column and we want to automatically delete after a...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Nov, 2019" }, { "code": null, "e": 450, "s": 28, "text": "In this article we will discuss how to insert and update using Time To Live (TTL) command and how to determine the expire time limit of an existing column.In Cassandra Time to...
Python Program to Convert Celsius To Fahrenheit
24 Oct, 2021 Given the temperature in degree Celsius. the task is to convert the value in the Fahrenheit scale and display it. Examples : Input : 37 Output : 37.00 Celsius is: 98.60 Fahrenheit Input : 40 Output : 40.00 Celsius is equivalent to: 104.00 Fahrenheit Approach: Take Celsius temperature as input from the ...
[ { "code": null, "e": 53, "s": 25, "text": "\n24 Oct, 2021" }, { "code": null, "e": 180, "s": 53, "text": "Given the temperature in degree Celsius. the task is to convert the value in the Fahrenheit scale and display it. Examples : " }, { "code": null, "e": 307, "...
How to create a hyperlink for values from an array in Angular 8?
11 Sep, 2020 Introduction:In angular 8, we can create hyperlinks for all the values that are present in the array using *ngFor. Approach:1) First declare and initialize array in .ts file.2) Then use *ngFor directive for iterating through the array.3) Using this *ngFor directive in .html file, we can use it as per the r...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Sep, 2020" }, { "code": null, "e": 143, "s": 28, "text": "Introduction:In angular 8, we can create hyperlinks for all the values that are present in the array using *ngFor." }, { "code": null, "e": 409, "s": 143, ...
Advanced C++ with boost library
C++ boost libraries are widely useful library. This is used for different sections. It has large domain of applications. For example, using boost, we can use large number like 264 in C++. Here we will see some examples of boost library. We can use big integer datatype. We can use different datatypes like int128_t, int2...
[ { "code": null, "e": 1375, "s": 1187, "text": "C++ boost libraries are widely useful library. This is used for different sections. It has large domain of applications. For example, using boost, we can use large number like 264 in C++." }, { "code": null, "e": 1582, "s": 1375, "te...
Adding JSON field in Django models
In this article, we will see how to add JSON fields to our Django models. JSON is a simple format to store data in key and value format. It is written in curly braces. Many a time, on developer website, we need to add developer data and JSON fields are useful in such cases. First create a Django project and an app. Ple...
[ { "code": null, "e": 1462, "s": 1187, "text": "In this article, we will see how to add JSON fields to our Django models. JSON is a simple format to store data in key and value format. It is written in curly braces. Many a time, on developer website, we need to add developer data and JSON fields are ...
Print the pattern by using one loop | Set 2 (Using Continue Statement)
23 Apr, 2021 Given a number n, print triangular pattern. We are allowed to use only one loop.Example: Input: 7 Output: * * * * * * * * * * * * * * * * * * * * * * * * * * * * We use single for-loop and in the loop we maintain two variables for line count and current star count. If current star count is less than curr...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Apr, 2021" }, { "code": null, "e": 142, "s": 52, "text": "Given a number n, print triangular pattern. We are allowed to use only one loop.Example: " }, { "code": null, "e": 216, "s": 142, "text": "Input: 7\nOutpu...
Implement Like a Blog Post Functionality in Social Media Android App
17 Jun, 2021 This is the Part 10 of “Build a Social Media App on Android Studio” tutorial, and we are going to cover the following functionalities in this article: We are going to Like a Blog. We are implementing this feature using two images one like button with white background and another like button with blue backg...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Jun, 2021" }, { "code": null, "e": 179, "s": 28, "text": "This is the Part 10 of “Build a Social Media App on Android Studio” tutorial, and we are going to cover the following functionalities in this article:" }, { "code": nu...
Implementing Multidimensional Map in C++
30 Apr, 2020 Multidimensional maps are used when we want to map a value to a combination of keys. The key can be of any data type, including those that are user-defined. Multidimensional maps are nested maps; that is, they map a key to another map, which itself stores combinations of key values with corresponding mappe...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 Apr, 2020" }, { "code": null, "e": 371, "s": 54, "text": "Multidimensional maps are used when we want to map a value to a combination of keys. The key can be of any data type, including those that are user-defined. Multidimensional ...
Jobs, Waiting, Cancellation in Kotlin Coroutines
19 May, 2022 Prerequisite: Kotlin Coroutines On Android Dispatchers in Kotlin Coroutines Suspend Function In Kotlin Coroutines In this article, the following topics will be discussed like what are the jobs in a coroutine, how to wait for the coroutine, and how to cancel the coroutine. Whenever a new coroutine is launch...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 May, 2022" }, { "code": null, "e": 42, "s": 28, "text": "Prerequisite:" }, { "code": null, "e": 71, "s": 42, "text": "Kotlin Coroutines On Android" }, { "code": null, "e": 104, "s": 71, "text":...
How to detect the user browser ( Safari, Chrome, IE, Firefox and Opera ) using JavaScript ?
29 Jun, 2022 The browser on which the current page is opening can be checked using JavaScript. The userAgent property of the navigator object is used to return the user-agent header string sent by the browser. This user-agent string contains information about the browser by including certain keywords that may be tested...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Jun, 2022" }, { "code": null, "e": 110, "s": 28, "text": "The browser on which the current page is opening can be checked using JavaScript." }, { "code": null, "e": 356, "s": 110, "text": "The userAgent property o...
JavaScript Page Refresh
You can refresh a web page using JavaScript location.reload method. This code can be called automatically upon an event or simply when the user clicks on a link. If you want to refresh a web page using a mouse click, then you can use the following code − <a href="javascript:location.reload(true)">Refresh Page</a> To u...
[ { "code": null, "e": 2721, "s": 2466, "text": "You can refresh a web page using JavaScript location.reload method. This code can be called automatically upon an event or simply when the user clicks on a link. If you want to refresh a web page using a mouse click, then you can use the following code ...
Counting How Many Numbers Are Smaller Than the Current Number in JavaScript
We are required to write a JavaScript function that takes in an array of Numbers. The function should construct a new array based on the input array. Each corresponding element of the new array should be the number of elements that are smaller in the original array than that corresponding element. For example − If the ...
[ { "code": null, "e": 1144, "s": 1062, "text": "We are required to write a JavaScript function that takes in an array of Numbers." }, { "code": null, "e": 1212, "s": 1144, "text": "The function should construct a new array based on the input array." }, { "code": null, ...
How to persist Redux state in local Storage without any external library? - GeeksforGeeks
29 Jan, 2021 Redux as per the official documentation is a predictable state container for JavaScript apps. In simple words, it is a state management library, with the help of Redux managing the state of components becomes very easy. We can manage the state of the app by creating a global state known as a store. The ide...
[ { "code": null, "e": 24859, "s": 24831, "text": "\n29 Jan, 2021" }, { "code": null, "e": 25159, "s": 24859, "text": "Redux as per the official documentation is a predictable state container for JavaScript apps. In simple words, it is a state management library, with the help of R...
How to find and replace the word in a text file using PowerShell?
To search for the word in PowerShell and replace it in the file we will use the string operation. In fact, the Get-Content command in PowerShell is used to read almost any type of file content. In this article, we are considering one text file as shown below. Get-Content C:\Temp\TestFile.txt PS C:\> Get-Content C:\Temp...
[ { "code": null, "e": 1322, "s": 1062, "text": "To search for the word in PowerShell and replace it in the file we will use the string operation. In fact, the Get-Content command in PowerShell is used to read almost any type of file content. In this article, we are considering one text file as shown ...
Remainder with 7 | Practice | GeeksforGeeks
Given a number as string(n) , find the remainder of the number whe it is divided by 7 Example 1: Input: 5 Output: 5 Example 2: Input: 8 Output: 1 Your Task: You only need to complete the function remainderwith7() that takes string n as parameter and returns an integer which denotes the remainder of the number wh...
[ { "code": null, "e": 336, "s": 238, "text": "Given a number as string(n) , find the remainder of the number whe it is divided by 7\n\nExample 1:" }, { "code": null, "e": 355, "s": 336, "text": "Input:\n5\nOutput:\n5" }, { "code": null, "e": 368, "s": 357, "tex...
How can I delete all cookies with JavaScript?
To delete all cookies with JavaScript, you can try to run the following code. Here, we’re using an array and the split() method to get all the cookies and finally delete them Live Demo <!DOCTYPE html> <html> <head> <script> var num = 1; function addCookie(){ document.cookie = num+...
[ { "code": null, "e": 1237, "s": 1062, "text": "To delete all cookies with JavaScript, you can try to run the following code. Here, we’re using an array and the split() method to get all the cookies and finally delete them" }, { "code": null, "e": 1247, "s": 1237, "text": "Live De...
Queries to update a given index and find gcd in range - GeeksforGeeks
11 Nov, 2021 Given an array arr[] of N integers and queries Q. Queries are of two types: Update a given index ind by X.Find the gcd of the elements in the index range [L, R]. Update a given index ind by X. Find the gcd of the elements in the index range [L, R]. Examples: Input: arr[] = {1, 3, 6, 9, 9, 11} Type 2 qu...
[ { "code": null, "e": 26549, "s": 26521, "text": "\n11 Nov, 2021" }, { "code": null, "e": 26627, "s": 26549, "text": "Given an array arr[] of N integers and queries Q. Queries are of two types: " }, { "code": null, "e": 26713, "s": 26627, "text": "Update a giv...
Python - tensorflow.boolean_mask() method - GeeksforGeeks
25 Aug, 2021 TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks. boolean_mask() is method used to apply boolean mask to a Tensor. Syntax: tensorflow.boolean_mask(tensor, mask, axis, name) Parameters: tensor: It’s a N-dimensional input tensor...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n25 Aug, 2021" }, { "code": null, "e": 25733, "s": 25537, "text": "TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks. boolean_mask() is method used to...
Implement Interface in Kotlin - GeeksforGeeks
13 Jan, 2022 Interfaces in Kotlin can contain declarations of abstract methods, as well as method implementations. What makes them different from abstract classes is that interfaces cannot store a state. They can have properties, but these need to be abstract or provide accessor implementations. A Kotlin interface cont...
[ { "code": null, "e": 25763, "s": 25735, "text": "\n13 Jan, 2022" }, { "code": null, "e": 26047, "s": 25763, "text": "Interfaces in Kotlin can contain declarations of abstract methods, as well as method implementations. What makes them different from abstract classes is that inter...
Minimum cost to convert a string to another by replacing blanks - GeeksforGeeks
15 Feb, 2022 Given two strings s1 and s2 with lower-case alphabets having length N. The strings s1 and s2 initially may contain some blanks, the task is to find minimum operations to convert a string s1 to s2. Initially, if there are any blanks they should be replaced by any same character which cost 0 and Any vowel i...
[ { "code": null, "e": 27431, "s": 27403, "text": "\n15 Feb, 2022" }, { "code": null, "e": 27629, "s": 27431, "text": "Given two strings s1 and s2 with lower-case alphabets having length N. The strings s1 and s2 initially may contain some blanks, the task is to find minimum operati...
Analysis of Algorithm | Set 4 (Solving Recurrences) - GeeksforGeeks
14 Jun, 2021 In the previous post, we discussed analysis of loops. Many algorithms are recursive in nature. When we analyze them, we get a recurrence relation for time complexity. We get running time on an input of size n as a function of n and the running time on inputs of smaller sizes. For example in Merge Sort, to ...
[ { "code": null, "e": 35841, "s": 35813, "text": "\n14 Jun, 2021" }, { "code": null, "e": 36423, "s": 35841, "text": "In the previous post, we discussed analysis of loops. Many algorithms are recursive in nature. When we analyze them, we get a recurrence relation for time complexi...
Store duplicate keys-values pair and sort the key-value pair by key - GeeksforGeeks
03 Jun, 2021 Given N key-value pairs that contain duplicate keys and values, the task is to store these pairs and sort the pairs by key. Examples: Input : N : 10 Keys : 5 1 4 6 8 0 6 6 5 5 values: 0 1 2 3 4 5 6 7 8 9 Output : Keys : 0 1 4 5 5 5 6 6 6 8 values: 5 1 2 0 8 9 3 6 7 4 Explanation: We have given 10 key, val...
[ { "code": null, "e": 25942, "s": 25914, "text": "\n03 Jun, 2021" }, { "code": null, "e": 26066, "s": 25942, "text": "Given N key-value pairs that contain duplicate keys and values, the task is to store these pairs and sort the pairs by key." }, { "code": null, "e": 26...
Installation of Wpscan Tool in Kali Linux - GeeksforGeeks
24 Dec, 2020 Wpscan (WordPress vulnerability Scanner) is a black box WordPress vulnerability scanner. Wpscan is used to scan remote WordPress installations or websites to find security issues. WordPress can also be used to enumerate WordPress plugins and themes and brute-force logins. Approximately 35% of the internet ...
[ { "code": null, "e": 25651, "s": 25623, "text": "\n24 Dec, 2020" }, { "code": null, "e": 26652, "s": 25651, "text": "Wpscan (WordPress vulnerability Scanner) is a black box WordPress vulnerability scanner. Wpscan is used to scan remote WordPress installations or websites to find ...
Python | Pandas dataframe.reindex_axis() - GeeksforGeeks
22 Nov, 2018 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas dataframe.reindex_axis() function Conform input object to new index. The function popu...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n22 Nov, 2018" }, { "code": null, "e": 25751, "s": 25537, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages a...
How to Customize AppCompat EditText in Android? - GeeksforGeeks
18 Feb, 2021 The EditText is one of the important UI element which takes the data as input from the user. The usual EditText in Android which looks decent enough has only the hint text and line which makes the user click on that line and insert the data. Refer to the article EditText widget in Android using Java with E...
[ { "code": null, "e": 26381, "s": 26353, "text": "\n18 Feb, 2021" }, { "code": null, "e": 26977, "s": 26381, "text": "The EditText is one of the important UI element which takes the data as input from the user. The usual EditText in Android which looks decent enough has only the h...
Python DateTime weekday() Method with Example - GeeksforGeeks
23 Aug, 2021 In this article, we will discuss the weekday() function in the DateTime module. weekday() function is used to get the week number based on given DateTime. It will return the number in the range of 0-6 It will take input as DateTime in the format of “(YYYY, MM, DD, HH, MM, SS)”, where, YYYY stands for year ...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n23 Aug, 2021" }, { "code": null, "e": 25738, "s": 25537, "text": "In this article, we will discuss the weekday() function in the DateTime module. weekday() function is used to get the week number based on given DateTime. It will ...
Extracting Tweets containing a particular Hashtag using Python - GeeksforGeeks
29 Dec, 2021 Twitter is one of the most popular social media platforms. The Twitter API provides the tools you need to contribute to, engage with, and analyze the conversation happening on Twitter, which finds a lot of application in fields like Data Analytics and Artificial Intelligence. This article focuses on how to...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n29 Dec, 2021" }, { "code": null, "e": 25916, "s": 25537, "text": "Twitter is one of the most popular social media platforms. The Twitter API provides the tools you need to contribute to, engage with, and analyze the conversation ...
Scala | Auxiliary Constructor - GeeksforGeeks
17 Jun, 2021 Constructors are used to initializing the object’s state. Like methods, a constructor also contains a collection of statements (i.e. instructions). Statements are executed at the time of object creation. In Scala Program, the constructors other than the primary constructor are known as Auxiliary Constructo...
[ { "code": null, "e": 25113, "s": 25085, "text": "\n17 Jun, 2021" }, { "code": null, "e": 25749, "s": 25113, "text": "Constructors are used to initializing the object’s state. Like methods, a constructor also contains a collection of statements (i.e. instructions). Statements are ...
Logger setLevel() method in Java with Examples - GeeksforGeeks
26 Mar, 2019 setLevel() method of a Logger class used to set the log level to describe which message levels will be logged by this logger. The level we want to set is passed as a parameter. Message levels lower than passed log level value will be discarded by the logger. The level value Level.OFF can be used to turn of...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n26 Mar, 2019" }, { "code": null, "e": 25543, "s": 25225, "text": "setLevel() method of a Logger class used to set the log level to describe which message levels will be logged by this logger. The level we want to set is passed as...
C program to store Student records as Structures and Sort them by Age or ID
29 May, 2019 Given student’s records with each record containing id, name and age of a student. Write a C program to read these records and display them in sorted order by age or id. Examples: Input: Student Records = { {Id = 1, Name = bd, Age = 12 }, {Id = 2, Name = ba, Age = 10 }, {Id = 3, Name = bc, Age = 8 }, {Id =...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 May, 2019" }, { "code": null, "e": 198, "s": 28, "text": "Given student’s records with each record containing id, name and age of a student. Write a C program to read these records and display them in sorted order by age or id." },...
Python Program for nth Catalan Number
13 Jun, 2022 Catalan numbers are a sequence of natural numbers that occurs in many interesting counting problems like the following. 1) Count the number of expressions containing n pairs of parentheses which are correctly matched. For n = 3, possible expressions are ((())), ()(()), ()()(), (())(), (()()). 2) Count the ...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Jun, 2022" }, { "code": null, "e": 148, "s": 28, "text": "Catalan numbers are a sequence of natural numbers that occurs in many interesting counting problems like the following." }, { "code": null, "e": 322, "s": 148,...
Convert a sentence into its equivalent mobile numeric keypad sequence
23 Jun, 2022 Given a sentence in the form of a string, convert it into its equivalent mobile numeric keypad sequence. Examples : Input : GEEKSFORGEEKS Output : 4333355777733366677743333557777 For obtaining a number, we need to press a number corresponding to that character for number of times equal to position of ...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Jun, 2022" }, { "code": null, "e": 159, "s": 52, "text": "Given a sentence in the form of a string, convert it into its equivalent mobile numeric keypad sequence. " }, { "code": null, "e": 172, "s": 159, "text":...
Stack empty() Method in Java
02 Aug, 2018 The java.util.Stack.empty() method in Java is used to check whether a stack is empty or not. The method is of boolean type and returns true if the stack is empty else false. Syntax: STACK.empty() Parameters: The method does not take any parameters. Return Value: The method returns boolean true if the stack...
[ { "code": null, "e": 53, "s": 25, "text": "\n02 Aug, 2018" }, { "code": null, "e": 227, "s": 53, "text": "The java.util.Stack.empty() method in Java is used to check whether a stack is empty or not. The method is of boolean type and returns true if the stack is empty else false."...
Encapsulation in Python
17 Mar, 2022 Encapsulation is one of the fundamental concepts in object-oriented programming (OOP). It describes the idea of wrapping data and the methods that work on data within one unit. This puts restrictions on accessing variables and methods directly and can prevent the accidental modification of data. To prevent...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 Mar, 2022" }, { "code": null, "e": 500, "s": 52, "text": "Encapsulation is one of the fundamental concepts in object-oriented programming (OOP). It describes the idea of wrapping data and the methods that work on data within one uni...
Variable-length arguments in Python
You may need to process a function for more arguments than you specified while defining the function. These arguments are called variable-length arguments and are not named in the function definition, unlike required and default arguments. Syntax for a function with non-keyword variable arguments is this − def function...
[ { "code": null, "e": 1427, "s": 1187, "text": "You may need to process a function for more arguments than you specified while defining the function. These arguments are called variable-length arguments and are not named in the function definition, unlike required and default arguments." }, { ...
Construct all possible BSTs for keys 1 to N
27 Jun, 2022 In this article, first count of possible BST (Binary Search Trees)s is discussed, then the construction of all possible BSTs. How many structurally unique BSTs for keys from 1..N? For example, for N = 2, there are 2 unique BSTs 1 2 \ / 2 1 For N = 3, ...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Jun, 2022" }, { "code": null, "e": 178, "s": 52, "text": "In this article, first count of possible BST (Binary Search Trees)s is discussed, then the construction of all possible BSTs." }, { "code": null, "e": 233, "s...
Tailwind CSS Background Attachment
14 Jul, 2021 In this article, we will learn how to attach background images using Tailwind CSS. Approach: You can easily attach background images using the background-attachment property in Tailwind CSS. All the properties are covered in class form. It is the alternative to the CSS background-attachment property. It c...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Jul, 2021" }, { "code": null, "e": 111, "s": 28, "text": "In this article, we will learn how to attach background images using Tailwind CSS." }, { "code": null, "e": 121, "s": 111, "text": "Approach:" }, { ...
Send mail from your Gmail account using Python
17 May, 2020 Here, we are going to learn how to send a simple basic mail using Python code. Python, being a powerful language don’t need any external library to import and offers a native library to send emails- “SMTP lib”. “smtplib” creates a Simple Mail Transfer Protocol client session object which is used to send em...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 May, 2020" }, { "code": null, "e": 655, "s": 54, "text": "Here, we are going to learn how to send a simple basic mail using Python code. Python, being a powerful language don’t need any external library to import and offers a native...
groups command in Linux with examples
20 May, 2019 In linux, there can be multiple users(those who use/operate the system), and groups are nothing but the collection of users. Groups make it easy to manage users with the same security and access privileges. A user can be part of different groups. Important Points: Groups command prints the names of the pri...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 May, 2019" }, { "code": null, "e": 275, "s": 28, "text": "In linux, there can be multiple users(those who use/operate the system), and groups are nothing but the collection of users. Groups make it easy to manage users with the same ...
Java Program to Check Array Bounds while Inputing Elements into the Array
23 Jun, 2021 Concept: Arrays are static data structures and do not grow automatically with an increasing number of elements. With arrays, it is important to specify the array size at the time of the declaration. In Java, when we try to access an array index beyond the range of the array it throws an ArrayIndexOutOfBoun...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Jun, 2021" }, { "code": null, "e": 612, "s": 28, "text": "Concept: Arrays are static data structures and do not grow automatically with an increasing number of elements. With arrays, it is important to specify the array size at the t...
Node.js http.server.listen() Method
12 Jan, 2021 The http.server.listen() is an inbuilt application programming interface of class Server within the http module which is used to start the server from accepting new connections. Syntax: const server.listen(options[, callback]) Parameters: This method accepts the following two parameters: option: It can be ...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Jan, 2021" }, { "code": null, "e": 206, "s": 28, "text": "The http.server.listen() is an inbuilt application programming interface of class Server within the http module which is used to start the server from accepting new connection...
MongoDB – Less than Operator $lt
27 Mar, 2020 MongoDB provides different types of comparison operators and less than operator ( $lt ) is one of them. This operator is used to select those documents where the value of the field is less than (<) the given value. You can use this operator in methods like, find(), update(), etc. as per your requirements. ...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Mar, 2020" }, { "code": null, "e": 335, "s": 28, "text": "MongoDB provides different types of comparison operators and less than operator ( $lt ) is one of them. This operator is used to select those documents where the value of the ...
HTML - Backgrounds
By default, your webpage background is white in color. You may not like it, but no worries. HTML provides you following two good ways to decorate your webpage background. HTML Background with Colors HTML Background with Images Now let's see both the approaches one by one using appropriate examples. The bgcolor attribut...
[ { "code": null, "e": 2679, "s": 2508, "text": "By default, your webpage background is white in color. You may not like it, but no worries. HTML provides you following two good ways to decorate your webpage background." }, { "code": null, "e": 2707, "s": 2679, "text": "HTML Backgr...
Palindromic Primes
01 Nov, 2021 A palindromic prime (sometimes called a palprime) is a prime number that is also a palindromic number. Given a number n, print all palindromic primes smaller than or equal to n. For example, If n is 10, the output should be “2, 3, 5, 7′. And if n is 20, the output should be “2, 3, 5, 7, 11′.Idea is to gene...
[ { "code": null, "e": 52, "s": 24, "text": "\n01 Nov, 2021" }, { "code": null, "e": 500, "s": 52, "text": "A palindromic prime (sometimes called a palprime) is a prime number that is also a palindromic number. Given a number n, print all palindromic primes smaller than or equal to...
Redis - Sorted Set Zadd Command
Redis ZADD command adds all the specified members with the specified scores to the sorted set stored at the key. It is possible to specify multiple score/member pairs. If a specified member is already a member of the sorted set, the score is updated and the element is reinserted at the right position to ensure correct ...
[ { "code": null, "e": 2714, "s": 2179, "text": "Redis ZADD command adds all the specified members with the specified scores to the sorted set stored at the key. It is possible to specify multiple score/member pairs. If a specified member is already a member of the sorted set, the score is updated and...
Integer floatValue() Method in Java
03 May, 2022 floatValue() method of Integer class present inside java.lang package is used to convert the value of the given Integer to a float type after a widening primitive conversion which in general is mostly applicable when we want to truncate or rounding-off the integer value. The package view is as follows: -->...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 May, 2022" }, { "code": null, "e": 332, "s": 28, "text": "floatValue() method of Integer class present inside java.lang package is used to convert the value of the given Integer to a float type after a widening primitive conversion w...
Neo4j - Set Clause
Using Set clause, you can add new properties to an existing Node or Relationship, and also add or update existing Properties values. In this chapter, we are going to discuss how to − Set a property Remove a property Set multiple properties Set a label on a node Set multiple labels on a node Using the SET clause, you ca...
[ { "code": null, "e": 2472, "s": 2339, "text": "Using Set clause, you can add new properties to an existing Node or Relationship, and also add or update existing Properties values." }, { "code": null, "e": 2522, "s": 2472, "text": "In this chapter, we are going to discuss how to −...
Decrypt the encoded string with help of Matrix as per given encryption decryption technique - GeeksforGeeks
14 Mar, 2022 Given an encoded (or encrypted) string S of length N, an integer M. The task is to decrypt the encrypted string and print it. The encryption and decryption techniques are given as: Encryption: The original string is placed in a Matrix of M rows and N/M columns, such that the first character of the Original...
[ { "code": null, "e": 24896, "s": 24868, "text": "\n14 Mar, 2022" }, { "code": null, "e": 25077, "s": 24896, "text": "Given an encoded (or encrypted) string S of length N, an integer M. The task is to decrypt the encrypted string and print it. The encryption and decryption techniq...
Hashmap vs WeakHashMap in Java
Details about HashMap and WeakHashMap that help to differentiate them are given as follows − A HashMap has key-value pairs i.e. keys that are associated with the values and the keys are in arbitrary order. A HashMap object that is specified as a key is not eligible for garbage collection. This means that the HashMap ha...
[ { "code": null, "e": 1155, "s": 1062, "text": "Details about HashMap and WeakHashMap that help to differentiate them are given as follows −" }, { "code": null, "e": 1422, "s": 1155, "text": "A HashMap has key-value pairs i.e. keys that are associated with the values and the keys ...