title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
How to Build a REST API with Python | Towards Data Science
How can we set up a way to communicate from one software instance to another? It sounds simple, and — to be completely honest — it is. All we need is an API. An API (Application Programming Interface) is a simple interface that defines the types of requests (demands/questions, etc.) that can be made, how they are made,...
[ { "code": null, "e": 307, "s": 172, "text": "How can we set up a way to communicate from one software instance to another? It sounds simple, and — to be completely honest — it is." }, { "code": null, "e": 330, "s": 307, "text": "All we need is an API." }, { "code": null, ...
Bitwise NOT operator in Golang
05 May, 2020 Bitwise NOT operator in the programming world usually takes one number and returns the inverted bits of that number as shown below: Bitwise NOT of 1 = 0 Bitwise NOT of 0 = 1 Example: Input : X = 010101 Output : Bitwise NOT of X = 101010 But Golang doesn’t have any specified unary Bitwise NOT(~) or you ca...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 May, 2020" }, { "code": null, "e": 160, "s": 28, "text": "Bitwise NOT operator in the programming world usually takes one number and returns the inverted bits of that number as shown below:" }, { "code": null, "e": 203, ...
How to handle errors in node.js ?
11 Jun, 2020 Node.js is a JavaScript extension used for server-side scripting. Error handling is a mandatory step in application development. A Node.js developer may work with both synchronous and asynchronous functions simultaneously. Handling errors in asynchronous functions is important because their behavior may va...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Jun, 2020" }, { "code": null, "e": 719, "s": 28, "text": "Node.js is a JavaScript extension used for server-side scripting. Error handling is a mandatory step in application development. A Node.js developer may work with both synchro...
Ways to express a number as product of two different factors
23 Jun, 2022 Given a number n, write a program to calculate the number of ways in which numbers can be expressed as the product of two different factors. Examples: Input : 12 Output : 3 12 can be expressed as 1 * 12, 2 * 6 and 3*4. Input : 36 Output : 4 36 can be expressed as 1 * 36, 2 * 18, 3 * 12 and 4 * 9. All f...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Jun, 2022" }, { "code": null, "e": 194, "s": 52, "text": "Given a number n, write a program to calculate the number of ways in which numbers can be expressed as the product of two different factors. " }, { "code": null, ...
SAS - Functions
SAS has a wide variety of in built functions which help in analysing and processing the data. These functions are used as part of the DATA statements. They take the data variables as arguments and return the result which is stored into another variable. Depending on the type of function, the number of arguments it take...
[ { "code": null, "e": 3189, "s": 2717, "text": "SAS has a wide variety of in built functions which help in analysing and processing the data. These functions are used as part of the DATA statements. They take the data variables as arguments and return the result which is stored into another variable....
How to Build a Simple Auto-Login Bot with Python
19 Oct, 2021 In this article, we are going to see how to built a simple auto-login bot using python. In this present scenario, every website uses authentication and we have to log in by entering proper credentials. But sometimes it becomes very hectic to login again and again to a particular website. So, to come out of...
[ { "code": null, "e": 54, "s": 26, "text": "\n19 Oct, 2021" }, { "code": null, "e": 142, "s": 54, "text": "In this article, we are going to see how to built a simple auto-login bot using python." }, { "code": null, "e": 424, "s": 142, "text": "In this present s...
Implementing Edit Profile Data Functionality in Social Media Android App
17 May, 2022 This is the Part 3 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 edit our profile data like changing name, changing the password of the user, and changing profile pic. Changing password is a very important ...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 May, 2022" }, { "code": null, "e": 202, "s": 52, "text": "This is the Part 3 of “Build a Social Media App on Android Studio” tutorial, and we are going to cover the following functionalities in this article:" }, { "code": nu...
SVG scale Attribute
31 Mar, 2022 The scale attribute decides the displacement scale factor that must be used on a <feDisplacementMap> filter primitive. Only <feDisplacementMap> element is using this attribute. Syntax: scale = "number" Attribute Values: The scale attribute accepts the values mentioned above and described below number: It i...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Mar, 2022" }, { "code": null, "e": 205, "s": 28, "text": "The scale attribute decides the displacement scale factor that must be used on a <feDisplacementMap> filter primitive. Only <feDisplacementMap> element is using this attribute...
ulong keyword in C#
22 Jun, 2020 Keywords are the words in a language that are used for some internal process or represent some predefined actions. ulong is a keyword that is used to declare a variable which can store an unsigned integer value from the range 0 to 18,446,744,073,709,551,615. It is an alias of System.UInt64. ulong keyword o...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Jun, 2020" }, { "code": null, "e": 320, "s": 28, "text": "Keywords are the words in a language that are used for some internal process or represent some predefined actions. ulong is a keyword that is used to declare a variable which ...
C Program for Rabin-Karp Algorithm for Pattern Searching
11 Dec, 2018 Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may assume that n > m. Examples: Input: txt[] = "THIS IS A TEST TEXT" pat[] = "TEST" Output: Pattern found at index 10 Input: txt[] = "AABAACAAD...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Dec, 2018" }, { "code": null, "e": 202, "s": 28, "text": "Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may assume that n > m." ...
numpy.unravel_index() function | Python
22 Apr, 2020 numpy.unravel_index() function converts a flat index or array of flat indices into a tuple of coordinate arrays. Syntax : numpy.unravel_index(indices, shape, order = ‘C’)Parameters :indices : [array_like] An integer array whose elements are indices into the flattened version of an array of dimensions shape...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Apr, 2020" }, { "code": null, "e": 141, "s": 28, "text": "numpy.unravel_index() function converts a flat index or array of flat indices into a tuple of coordinate arrays." }, { "code": null, "e": 570, "s": 141, "t...
\varnothing - Tex Command
\varnothing - Used to create varnothing symbol. { \varnothing} \varnothing command draws varnothing symbol. \varnothing ∅ \varnothing ∅ \varnothing 14 Lectures 52 mins Ashraf Said 11 Lectures 1 hours Ashraf Said 9 Lectures 1 hours Emenwa Global, Ejike IfeanyiChukwu ...
[ { "code": null, "e": 8034, "s": 7986, "text": "\\varnothing - Used to create varnothing symbol." }, { "code": null, "e": 8049, "s": 8034, "text": "{ \\varnothing}" }, { "code": null, "e": 8094, "s": 8049, "text": "\\varnothing command draws varnothing symbol."...
Preview of the Neo4j Graph Data Science plugin with examples from the “Graph Algorithms: Practical Examples in Apache Spark and Neo4j” book | by Tomaz Bratanic | Towards Data Science
In the past couple of years, the field of data science has gained much traction. It has become an essential part of business and academic research. Combined with the increasing popularity of graphs and graph databases, folks at Neo4j decided to release the Graph Data Science (GDS) plugin. It is the successor of the Gra...
[ { "code": null, "e": 649, "s": 172, "text": "In the past couple of years, the field of data science has gained much traction. It has become an essential part of business and academic research. Combined with the increasing popularity of graphs and graph databases, folks at Neo4j decided to release th...
Classify strings from an array using Custom Hash Function - GeeksforGeeks
14 May, 2021 Given an array of strings arr[] consisting of N strings, the task is to categorize the strings according to the hash value obtained by adding ASCII values % 26 of the characters in the string. Examples: Input: arr[][] = {“geeks”, “for”, “geeks”}Output:geeks geeksforExplanation:The hash value of string “for...
[ { "code": null, "e": 24868, "s": 24840, "text": "\n14 May, 2021" }, { "code": null, "e": 25061, "s": 24868, "text": "Given an array of strings arr[] consisting of N strings, the task is to categorize the strings according to the hash value obtained by adding ASCII values % 26 of ...
Tryit Editor v3.7
Background Image Repeat Tryit: Position a background image
[ { "code": null, "e": 49, "s": 25, "text": "Background Image Repeat" } ]
Create an Animated GIF Using Python Matplotlib - GeeksforGeeks
14 Sep, 2021 In this article, we will discuss how to create an animated GIF using Matplotlib in Python. Matplotlib can be used to create mathematics-based animations only. These can include a point moving on the circumference of the circle or a sine or cosine wave which are just like sound waves. In Matplotlib we have ...
[ { "code": null, "e": 23927, "s": 23899, "text": "\n14 Sep, 2021" }, { "code": null, "e": 24018, "s": 23927, "text": "In this article, we will discuss how to create an animated GIF using Matplotlib in Python." }, { "code": null, "e": 24591, "s": 24018, "text": ...
Making the Mueller Report Searchable with OCR and Elasticsearch | by Kyle Gallatin | Towards Data Science
April 18th marked the full release of the Mueller Report — a document outlining the investigation of potential Russian interference in the 2016 presidential election. Like most government documents it is long (448 pages), and would be painfully tedious to read. To make matters worse, the actual PDF download is basicall...
[ { "code": null, "e": 434, "s": 172, "text": "April 18th marked the full release of the Mueller Report — a document outlining the investigation of potential Russian interference in the 2016 presidential election. Like most government documents it is long (448 pages), and would be painfully tedious to...
Metrics and Python II. In the previous article, we take a... | by Gabriel Naya | Towards Data Science
We make a dataset with three arrays: real values, predicted values, and likelihood values.real_values: A data set with 1000 elements between 0 and 1.pred_values: A variation of the real dataset, emulates a prediction, changing only the first 150 values.prob_values: Is the pred_values array but contains the percent of p...
[ { "code": null, "e": 493, "s": 46, "text": "We make a dataset with three arrays: real values, predicted values, and likelihood values.real_values: A data set with 1000 elements between 0 and 1.pred_values: A variation of the real dataset, emulates a prediction, changing only the first 150 values.pro...
Data preprocessing with Python Pandas | by Angelica Lo Duca | Towards Data Science
This tutorial explains how to preprocess data using the pandas library. Preprocessing is the process of doing a pre-analysis of data, in order to transform them into a standard and normalized format. Preprocessing involves the following aspects: missing values data standardization data normalization data binning In thi...
[ { "code": null, "e": 372, "s": 172, "text": "This tutorial explains how to preprocess data using the pandas library. Preprocessing is the process of doing a pre-analysis of data, in order to transform them into a standard and normalized format." }, { "code": null, "e": 418, "s": 372,...
How to input letters in capital letters in an edit box in Selenium with python?
We can input letters in capital letters in an edit box in Selenium with the help of Action Chains class. These classes are generally used for automating interactions like context menu click, mouse button actions, key press and mouse movements. These types of actions are mainly common in complex scenarios like drag and ...
[ { "code": null, "e": 1306, "s": 1062, "text": "We can input letters in capital letters in an edit box in Selenium with the\nhelp of Action Chains class. These classes are generally used for automating\ninteractions like context menu click, mouse button actions, key press and mouse\nmovements." }, ...
Imputer Class in Python from Scratch | by Lewi Uberg | Towards Data Science
1 2 3 4 5 6 7 8 9 10 Powered by Play.ht Create audio with Play.ht Create Audio Narrations with Play.ht The main focus of this report on laboratory work is demonstrating the understanding of object-oriented programming principles and how to apply them. Every step of the implementation is explained; it is therefore assum...
[ { "code": null, "e": 48, "s": 46, "text": "1" }, { "code": null, "e": 50, "s": 48, "text": "2" }, { "code": null, "e": 52, "s": 50, "text": "3" }, { "code": null, "e": 54, "s": 52, "text": "4" }, { "code": null, "e": 56, "s"...
Find the minimum value from an array associated with another array - GeeksforGeeks
29 May, 2021 Given an integer array A[] and a character array B[] of equal lengths where every character of the array is from the set {‘a’, ‘b’, ‘c’}. Elements of both the arrays are associated with each other i.e. the value of B[i] is linked to A[i] for all valid values of i. The task is to find the value min(a + b, c...
[ { "code": null, "e": 24796, "s": 24768, "text": "\n29 May, 2021" }, { "code": null, "e": 25107, "s": 24796, "text": "Given an integer array A[] and a character array B[] of equal lengths where every character of the array is from the set {‘a’, ‘b’, ‘c’}. Elements of both the arra...
Assigning multiple variables in one line in Python - GeeksforGeeks
02 Dec, 2021 A variable is a named memory space that is used to store some data which will in-turn be used in some processing. All programming languages have some mechanism for variable declaration but one thing that stays common in all is the name and the data to be assigned to it. They are capable of storing values o...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n02 Dec, 2021" }, { "code": null, "e": 24222, "s": 23901, "text": "A variable is a named memory space that is used to store some data which will in-turn be used in some processing. All programming languages have some mechanism for...
C# program to convert time from 12 hour to 24 hour format
Firstly, set the 12 hr format date. DateTime d = DateTime.Parse("05:00 PM"); Now let us convert it into 24-hr format. d.ToString("HH:mm")); The following is the code to covert time from 12 hour to 24 hour format − Live Demo using System; namespace Demo { public class Program { public static void Main(string[]...
[ { "code": null, "e": 1098, "s": 1062, "text": "Firstly, set the 12 hr format date." }, { "code": null, "e": 1139, "s": 1098, "text": "DateTime d = DateTime.Parse(\"05:00 PM\");" }, { "code": null, "e": 1180, "s": 1139, "text": "Now let us convert it into 24-hr...
How to write the plot title in multiple lines using plot function in R?
Mostly, the main title of a plot is short but we might have a long line to write for the main title of the plot. For example, a short version might be “Scatterplot” and a longer version might be “Scatterplot between X and Y”. Therefore, in plot function of R we can use line breaks for the main title as "Scatterplot \n ...
[ { "code": null, "e": 1403, "s": 1062, "text": "Mostly, the main title of a plot is short but we might have a long line to write for the main title of the plot. For example, a short version might be “Scatterplot” and a longer version might be “Scatterplot between X and Y”. Therefore, in plot function...
Iterate over a dictionary in Python
01 Jul, 2022 In this article, we will cover How to Iterate Through a Dictionary in Python. Dictionary in Python is an unordered collection of data values, used to store data values like a map, unlike other Data Types that hold only a single value as an element, Dictionary holds the key: value pair. There are multiple...
[ { "code": null, "e": 52, "s": 24, "text": "\n01 Jul, 2022" }, { "code": null, "e": 131, "s": 52, "text": "In this article, we will cover How to Iterate Through a Dictionary in Python. " }, { "code": null, "e": 341, "s": 131, "text": "Dictionary in Python is an...
Result of comma operator as l-value in C and C++
28 May, 2017 Using result of comma operator as l-value is not valid in C. But in C++, result of comma operator can be used as l-value if the right operand of the comma operator is l-value. For example, if we compile the following program as a C++ program, then it works and prints b = 30. And if we compile the same prog...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 May, 2017" }, { "code": null, "e": 230, "s": 54, "text": "Using result of comma operator as l-value is not valid in C. But in C++, result of comma operator can be used as l-value if the right operand of the comma operator is l-value...
How to loop through each row of dataFrame in PySpark ?
30 Sep, 2021 In this article, we are going to see how to loop through each row of Dataframe in PySpark. Looping through each row helps us to perform complex operations on the RDD or Dataframe. Creating Dataframe for demonstration: Python3 # importing necessary librariesimport pysparkfrom pyspark.sql import SparkSession...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Sep, 2021" }, { "code": null, "e": 208, "s": 28, "text": "In this article, we are going to see how to loop through each row of Dataframe in PySpark. Looping through each row helps us to perform complex operations on the RDD or Datafr...
PostgreSQL - NULL Values
The PostgreSQL NULL is the term used to represent a missing value. A NULL value in a table is a value in a field that appears to be blank. A field with a NULL value is a field with no value. It is very important to understand that a NULL value is different from a zero value or a field that contains spaces. The basic sy...
[ { "code": null, "e": 3098, "s": 2959, "text": "The PostgreSQL NULL is the term used to represent a missing value. A NULL value in a table is a value in a field that appears to be blank." }, { "code": null, "e": 3267, "s": 3098, "text": "A field with a NULL value is a field with n...
Python | fsum() function
18 Sep, 2018 fsum() is inbuilt function in Python, used to find sum between some range or an iterable. To use this function we need to import the math library. Syntax : maths.fsum( iterable ) Parameter : iterable : Here we pass some value which is iterable like arrays, list. Use : fsum() is used to find the sum of som...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Sep, 2018" }, { "code": null, "e": 175, "s": 28, "text": "fsum() is inbuilt function in Python, used to find sum between some range or an iterable. To use this function we need to import the math library." }, { "code": null, ...
SQLite - Perl
In this chapter, you will learn how to use SQLite in Perl programs. SQLite3 can be integrated with Perl using Perl DBI module, which is a database access module for the Perl programming language. It defines a set of methods, variables, and conventions that provide a standard database interface. Following are simple ste...
[ { "code": null, "e": 2840, "s": 2772, "text": "In this chapter, you will learn how to use SQLite in Perl programs." }, { "code": null, "e": 3068, "s": 2840, "text": "SQLite3 can be integrated with Perl using Perl DBI module, which is a database access module for the Perl programm...
Graph Coloring | Set 2 (Greedy Algorithm)
24 Nov, 2021 We introduced graph coloring and applications in previous post. As discussed in the previous post, graph coloring is widely used. Unfortunately, there is no efficient algorithm available for coloring a graph with minimum number of colors as the problem is a known NP Complete problem. There are approximate ...
[ { "code": null, "e": 54, "s": 26, "text": "\n24 Nov, 2021" }, { "code": null, "e": 675, "s": 54, "text": "We introduced graph coloring and applications in previous post. As discussed in the previous post, graph coloring is widely used. Unfortunately, there is no efficient algorit...
Find Shortest distance from a guard in a Bank
04 Jul, 2022 Given a matrix that is filled with ‘O’, ‘G’, and ‘W’ where ‘O’ represents open space, ‘G’ represents guards and ‘W’ represents walls in a Bank. Replace all of the O’s in the matrix with their shortest distance from a guard, without being able to go through any walls. Also, replace the guards with 0 and wal...
[ { "code": null, "e": 54, "s": 26, "text": "\n04 Jul, 2022" }, { "code": null, "e": 390, "s": 54, "text": "Given a matrix that is filled with ‘O’, ‘G’, and ‘W’ where ‘O’ represents open space, ‘G’ represents guards and ‘W’ represents walls in a Bank. Replace all of the O’s in the ...
How to insert elements in C++ STL List?
Suppose we have one STL list in C++. There are few elements. We have to insert a new element into the list. We can insert at the end, or beginning or at any position. Let us see one code to get better understanding. To insert at beginning we will use push_front(), To insert at end, we will use push_end() and to insert ...
[ { "code": null, "e": 1563, "s": 1062, "text": "Suppose we have one STL list in C++. There are few elements. We have to insert a new element into the list. We can insert at the end, or beginning or at any position. Let us see one code to get better understanding. To insert at beginning we will use pu...
Single-Source Shortest Paths, Arbitrary Weights
The single source shortest path algorithm (for arbitrary weight positive or negative) is also known Bellman-Ford algorithm is used to find minimum distance from source vertex to any other vertex. The main difference between this algorithm with Dijkstra’s algorithm is, in Dijkstra’s algorithm we cannot handle the negati...
[ { "code": null, "e": 1427, "s": 1062, "text": "The single source shortest path algorithm (for arbitrary weight positive or negative) is also known Bellman-Ford algorithm is used to find minimum distance from source vertex to any other vertex. The main difference between this algorithm with Dijkstra’...
Sum of series 1^2 + 3^2 + 5^2 + . . . + (2*n – 1)^2
15 Jun, 2022 Given a series 12 + 32 + 52 + 72 + . . . + (2*n – 1)2, find sum of the series.Examples: Input : n = 4 Output : 84 Explanation : sum = 12 + 32 + 52 + 72 = 1 + 9 + 25 + 49 = 84 Input : n = 10 Output : 1330 Explanation : sum = 12 + 32 + 52 + 72 + 92 + 112 + 132 + 152 + 172 + 192 = 1 + 9 + 24 +...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Jun, 2022" }, { "code": null, "e": 117, "s": 28, "text": "Given a series 12 + 32 + 52 + 72 + . . . + (2*n – 1)2, find sum of the series.Examples: " }, { "code": null, "e": 364, "s": 117, "text": "Input : n = 4\nOu...
How to generate Json File in PHP ?
21 May, 2021 In this article, we are going to generate a JSON file in PHP by using an array. JSON stands for JavaScript object notation, which is used for storing and exchanging data. JSON is text, written with JavaScript object notation. Structure: {"data":[ { "sub_data1":"value1", "sub_data2":"value2","sub_data_n":"...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 May, 2021" }, { "code": null, "e": 254, "s": 28, "text": "In this article, we are going to generate a JSON file in PHP by using an array. JSON stands for JavaScript object notation, which is used for storing and exchanging data. JSON...
Difference between array.size() and array.length in JavaScript
10 Apr, 2022 The array.size() method is functionally equivalent to the array.length property and it can be only used in jQuery. Here in JavaScript array.size() is invalid method so array.length property should be used. Below examples implement the above concept: Example 1: This example demonstrates array.size() method...
[ { "code": null, "e": 54, "s": 26, "text": "\n10 Apr, 2022" }, { "code": null, "e": 305, "s": 54, "text": "The array.size() method is functionally equivalent to the array.length property and it can be only used in jQuery. Here in JavaScript array.size() is invalid method so array....
Ruby | DateTime strptime() function
09 Jan, 2020 DateTime#strptime() : strptime() is a DateTime class method which parses the given representation of date and time with the given template Syntax: DateTime.strptime() Parameter: DateTime values Return: parses the given representation of date and time with the given template Example #1 : # Ruby code for Dat...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Jan, 2020" }, { "code": null, "e": 167, "s": 28, "text": "DateTime#strptime() : strptime() is a DateTime class method which parses the given representation of date and time with the given template" }, { "code": null, "e":...
Left() and Right() Function in MS Access
02 Sep, 2020 1. Left() Function :In MS Access the Left() function extract the string from the left of the string. In Left() function The string and the no of the string will be passed. And it will return the string of size the pass number from the left of the string. Syntax : Left(string, number_of_chars) Example-1 : S...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Sep, 2020" }, { "code": null, "e": 283, "s": 28, "text": "1. Left() Function :In MS Access the Left() function extract the string from the left of the string. In Left() function The string and the no of the string will be passed. And...
Loops in C and C++
01 Jun, 2022 In programming, sometimes there is a need to perform some operation more than once or (say) n number of times. Loops come into use when we need to repeatedly execute a block of statements. For example: Suppose we want to print “Hello World” 10 times. This can be done in two ways as shown below: Manually...
[ { "code": null, "e": 57, "s": 26, "text": " \n01 Jun, 2022\n" }, { "code": null, "e": 247, "s": 57, "text": "In programming, sometimes there is a need to perform some operation more than once or (say) n number of times. Loops come into use when we need to repeatedly execute a blo...
HTML | <th> valign Attribute
22 Feb, 2022 The HTML <th> valign Attribute is used to specify the vertical alignment of text content in a header cell. It is not supported by HTML 5. Syntax: <th valign="top | middle | bottom | baseline"> Attribute Value: top: It sets the table header content to top-align. middle: It sets the table header content to m...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Feb, 2022" }, { "code": null, "e": 166, "s": 28, "text": "The HTML <th> valign Attribute is used to specify the vertical alignment of text content in a header cell. It is not supported by HTML 5." }, { "code": null, "e": ...
Scala Stack apply() method with example
03 Nov, 2019 In Scala Stack class, the apply() method is utilized to return an element at a given position in the stack. The top of the stack corresponds to the element at 0th position and so on. Method Definition: def apply(idx: Int): A Return Type: It returns an element at a given position in the stack. Example #1: /...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Nov, 2019" }, { "code": null, "e": 211, "s": 28, "text": "In Scala Stack class, the apply() method is utilized to return an element at a given position in the stack. The top of the stack corresponds to the element at 0th position and...
Difference between DROP and TRUNCATE in SQL
16 Apr, 2020 Prerequisite – DROP, and TRUNCATE in SQL 1. DROP :DROP is a DDL(Data Definition Language) command and is used to remove table definition and indexes, data, constraints, triggers etc for that table. Performance-wise the DROP command is quick to perform but slower than TRUNCATE because it gives rise to compl...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Apr, 2020" }, { "code": null, "e": 93, "s": 52, "text": "Prerequisite – DROP, and TRUNCATE in SQL" }, { "code": null, "e": 559, "s": 93, "text": "1. DROP :DROP is a DDL(Data Definition Language) command and is us...
HTML <dd> Tag
17 Mar, 2022 The <dd> tag in HTML stands for definition description and is used to denote the description or definition of an item in a description list. Paragraphs, line breaks, images, links, lists can be inserted inside a <dd> tag. The <dd> tag in HTML is used along with <dl> tag which defines the description list a...
[ { "code": null, "e": 53, "s": 25, "text": "\n17 Mar, 2022" }, { "code": null, "e": 484, "s": 53, "text": "The <dd> tag in HTML stands for definition description and is used to denote the description or definition of an item in a description list. Paragraphs, line breaks, images, ...
move cmd command
20 Oct, 2020 The move is an internal command found in the Windows Command Interpreter (cmd) that is used to move files and folders/directories. The command is robust than a regular move operation, as it allows for pattern matching via the inclusion of Wildcards in the source path. The command is a very generic one and ...
[ { "code": null, "e": 52, "s": 24, "text": "\n20 Oct, 2020" }, { "code": null, "e": 321, "s": 52, "text": "The move is an internal command found in the Windows Command Interpreter (cmd) that is used to move files and folders/directories. The command is robust than a regular move o...
SQL Server | Convert tables in T-SQL into XML
09 Mar, 2021 In this, we will focus on how tables will be converted in T-SQL into XML in SQL server. And you will be able to understand how you can convert it with the help of command. Let’s discuss it one by one. Overview :XML (Extensible Markup Language) is a markup language similar to HTML which was designed to shar...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Mar, 2021" }, { "code": null, "e": 229, "s": 28, "text": "In this, we will focus on how tables will be converted in T-SQL into XML in SQL server. And you will be able to understand how you can convert it with the help of command. Let...
Internal Working of ArrayList in Java
31 May, 2022 ArrayList is a resizable array implementation in java. ArrayList grows dynamically and ensures that there is always a space to add elements. The backing data structure of ArrayList is an array of Object classes. ArrayList class in Java has 3 constructors. It has its own version of readObject and writeObjec...
[ { "code": null, "e": 54, "s": 26, "text": "\n31 May, 2022" }, { "code": null, "e": 513, "s": 54, "text": "ArrayList is a resizable array implementation in java. ArrayList grows dynamically and ensures that there is always a space to add elements. The backing data structure of Arr...
Converting all strings in list to integers in Python
Sometimes we can have a list containing strings but the strings themselves are numbers and closing quotes. In such a list we want to convert the string elements into actual integers. The int function takes in parameters and converts it to integers if it is already a number. So we design a for loop to go through each el...
[ { "code": null, "e": 1370, "s": 1187, "text": "Sometimes we can have a list containing strings but the strings themselves are numbers and closing quotes. In such a list we want to convert the string elements into actual integers." }, { "code": null, "e": 1595, "s": 1370, "text": ...
Explain use of Meta tags in HTML ?
24 Aug, 2021 Meta Tag (<meta/>) is a HTML component that gives the metadata about a HTML document. MetaData can be characterized as data that gives the data of different information or basic information about information. It is an empty tag, for example, it just has an initial tag and no end tag. They are always presen...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Aug, 2021" }, { "code": null, "e": 608, "s": 28, "text": "Meta Tag (<meta/>) is a HTML component that gives the metadata about a HTML document. MetaData can be characterized as data that gives the data of different information or bas...
Map Function in MATLAB
22 Sep, 2021 A map function basically takes the elements of the array and applies a function to each element. The resultant output is of the same shape as the array, but the values are the result of the function. In MATLAB, there is a similar function called arrayfun(), which we can be used to achieve the same task. T...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Sep, 2021" }, { "code": null, "e": 389, "s": 28, "text": "A map function basically takes the elements of the array and applies a function to each element. The resultant output is of the same shape as the array, but the values are th...
How to flatten a hierarchical index in Pandas DataFrame columns?
15 Feb, 2022 In this article, we are going to see the flatten a hierarchical index in Pandas DataFrame columns. Hierarchical Index usually occurs as a result of groupby aggregation functions. The aggregated function used will appear in the hierarchical index of the resulting dataframe. Pandas provide a function called...
[ { "code": null, "e": 52, "s": 24, "text": "\n15 Feb, 2022" }, { "code": null, "e": 327, "s": 52, "text": "In this article, we are going to see the flatten a hierarchical index in Pandas DataFrame columns. Hierarchical Index usually occurs as a result of groupby aggregation functi...
ReactJS - Pagination
Pagination is one of the distinct features requiring special logic and at the same time, the UI rendering may vary drastically. For example, the pagination can be done for a tabular content as well as a gallery content. Pagination component will do the pagination logic and delegates the rendering logic to other compone...
[ { "code": null, "e": 2598, "s": 2167, "text": "Pagination is one of the distinct features requiring special logic and at the same time, the UI rendering may vary drastically. For example, the pagination can be done for a tabular content as well as a gallery content. Pagination component will do the ...
Charset name() method in Java with Examples - GeeksforGeeks
28 Mar, 2019 The name() method is a built-in method of the java.nio.charset returns the charset’s canonical name. Syntax: public final String name() Parameters: The function does not accepts any parameter. Return Value: The function returns the charset’s canonical name. Below is the implementation of the above function...
[ { "code": null, "e": 23557, "s": 23529, "text": "\n28 Mar, 2019" }, { "code": null, "e": 23658, "s": 23557, "text": "The name() method is a built-in method of the java.nio.charset returns the charset’s canonical name." }, { "code": null, "e": 23666, "s": 23658, ...
7 Best R Packages for Machine Learning - GeeksforGeeks
21 Dec, 2021 Machine Learning is a subset of artificial intelligence that focuses on the development of computer software or programs that access data to learn themselves and make predictions i.e. without being explicitly programmed. Machine learning consists of different sub-parts i.e. unsupervised learning, supervise...
[ { "code": null, "e": 24904, "s": 24876, "text": "\n21 Dec, 2021" }, { "code": null, "e": 25336, "s": 24904, "text": "Machine Learning is a subset of artificial intelligence that focuses on the development of computer software or programs that access data to learn themselves and m...
Program to find the kth factor of n using Python
Suppose we have two positive values n and k. Now consider we have a list of all factors of n sorted in ascending order, we have to find the kth factor in this list. If there are less than k factors, then return -1. So, if the input is like n = 28 k = 4, then the output will be 7 because, the factors of 28 are [1,2,4,7,...
[ { "code": null, "e": 1277, "s": 1062, "text": "Suppose we have two positive values n and k. Now consider we have a list of all factors of n sorted in ascending order, we have to find the kth factor in this list. If there are less than k factors, then return -1." }, { "code": null, "e": 1...
SQL Query to Remove Primary Key - GeeksforGeeks
08 Oct, 2021 The primary key is the key that may contain one or more columns that uniquely identify each row in a table. We can add a primary key constraint while creating the and we can add or remove after by using ALTER command on our table of the database. In this article let us see how we can remove a primary key ...
[ { "code": null, "e": 25538, "s": 25510, "text": "\n08 Oct, 2021" }, { "code": null, "e": 25785, "s": 25538, "text": "The primary key is the key that may contain one or more columns that uniquely identify each row in a table. We can add a primary key constraint while creating the ...
Pass data between components using Vue.js Event Bus - GeeksforGeeks
26 Mar, 2021 Component communication in Vue.js can become complicated and messy at times using $emit and props. In real-world applications where the Component tree is nested and big, it is not convenient to pass data using this method as it will only increase the complexity of the application and make debugging very te...
[ { "code": null, "e": 26545, "s": 26517, "text": "\n26 Mar, 2021" }, { "code": null, "e": 26910, "s": 26545, "text": "Component communication in Vue.js can become complicated and messy at times using $emit and props. In real-world applications where the Component tree is nested an...
How to create a multiline input control text area in HTML5 ? - GeeksforGeeks
06 Sep, 2021 The HTML <textarea> tag is used to specify a multiline input control text area in HTML5. The <cols> and <rows> attributes specify size of a textarea. Syntax <textarea rows="" cols=""> Contents... </textarea> The <textarea> tag contains 5 attributes that are listed below: cols: It specifies width of textar...
[ { "code": null, "e": 33003, "s": 32975, "text": "\n06 Sep, 2021" }, { "code": null, "e": 33154, "s": 33003, "text": "The HTML <textarea> tag is used to specify a multiline input control text area in HTML5. The <cols> and <rows> attributes specify size of a textarea." }, { ...
How to Extract and Copy Files from ISO Image in Linux? - GeeksforGeeks
20 Apr, 2021 The term ISO was derived from the ISO 9660 file system, which is commonly used by optical media. An ISO image is a full copy of everything contained on a physical optical disc, such as a CD, DVD, or Blu-ray disc, including the file system. There is no compression and they are a sector-by-sector copy of the...
[ { "code": null, "e": 26223, "s": 26195, "text": "\n20 Apr, 2021" }, { "code": null, "e": 26875, "s": 26223, "text": "The term ISO was derived from the ISO 9660 file system, which is commonly used by optical media. An ISO image is a full copy of everything contained on a physical ...
Quadruplet pair with XOR zero in the given Array - GeeksforGeeks
18 Nov, 2021 Given an array arr[] of N integers such that any two adjacent elements in the array differ at only one position in their binary representation. The task is to find whether there exists a quadruple (arr[i], arr[j], arr[k], arr[l]) such that arr[i] ^ arr[j] ^ arr[k] ^ arr[l] = 0. Here ^ denotes the bitwise x...
[ { "code": null, "e": 26041, "s": 26013, "text": "\n18 Nov, 2021" }, { "code": null, "e": 26399, "s": 26041, "text": "Given an array arr[] of N integers such that any two adjacent elements in the array differ at only one position in their binary representation. The task is to find...
All ways to add parenthesis for evaluation - GeeksforGeeks
21 Mar, 2017 Given a string that represents an expression constituting numbers and binary operator +, – and * only. We need to parenthesize the expression in all possible way and return all evaluated values. Input : expr = “3-2-1” Output : {0, 2} ((3-2)-1) = 0 (3-(2-1)) = 2 Input : expr = "5*4-3*2" Output : {-10, 10,...
[ { "code": null, "e": 25941, "s": 25913, "text": "\n21 Mar, 2017" }, { "code": null, "e": 26136, "s": 25941, "text": "Given a string that represents an expression constituting numbers and binary operator +, – and * only. We need to parenthesize the expression in all possible way a...
MoviePy – Adding Mask to Video File Clip
30 Aug, 2020 In this article we will see how we can add mask to the video file clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operations on videos and GIF’s. IsMask property tells that if the given video clip is mask or not, mask is basically that video which is used as mask ...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Aug, 2020" }, { "code": null, "e": 603, "s": 28, "text": "In this article we will see how we can add mask to the video file clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operations on vide...
Insertion Sort
11 May, 2022 Insertion sort is a simple sorting algorithm that works similar to the way you sort playing cards in your hands. The array is virtually split into a sorted and an unsorted part. Values from the unsorted part are picked and placed at the correct position in the sorted part. This algorithm is one of the simp...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 May, 2022" }, { "code": null, "e": 326, "s": 52, "text": "Insertion sort is a simple sorting algorithm that works similar to the way you sort playing cards in your hands. The array is virtually split into a sorted and an unsorted pa...
Python – Add prefix to each key name in dictionary
01 Aug, 2020 Given a dictionary, update its each key by adding prefix to each key. Input : test_dict = {‘Gfg’ : 6, ‘is’ : 7, ‘best’ : 9}, temp = “Pro”Output : {‘ProGfg’ : 6, ‘Prois’ : 7, ‘Probest’ : 9}Explanation : “Pro” prefix added to each key. Input : test_dict = {‘Gfg’ : 6, ‘is’ : 7, ‘best’ : 9}, temp = “a”Output :...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Aug, 2020" }, { "code": null, "e": 98, "s": 28, "text": "Given a dictionary, update its each key by adding prefix to each key." }, { "code": null, "e": 262, "s": 98, "text": "Input : test_dict = {‘Gfg’ : 6, ‘is’ :...
Python | Intersection in Tuple Records Data
29 Oct, 2019 Sometimes, while working with data, we may have a problem in which we require to find the matching records between two lists that we receive. This is a very common problem and records usually occur as a tuple. Let’s discuss certain ways in which this problem can be solved. Method #1 : Using list comprehens...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Oct, 2019" }, { "code": null, "e": 302, "s": 28, "text": "Sometimes, while working with data, we may have a problem in which we require to find the matching records between two lists that we receive. This is a very common problem and...
Python – Counter.items(), Counter.keys() and Counter.values()
27 Oct, 2021 Counter class is a special type of object data-set provided with the collections module in Python3. Collections module provides the user with specialized container datatypes, thus, providing an alternative to Python’s general-purpose built-ins like dictionaries, lists and tuples. Counter is a sub-class tha...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Oct, 2021" }, { "code": null, "e": 437, "s": 28, "text": "Counter class is a special type of object data-set provided with the collections module in Python3. Collections module provides the user with specialized container datatypes, ...
Matplotlib.pyplot.xkcd() in Python
24 Feb, 2022 One of the main process in Data Science is Data Visualization. Data Visualization refers to present a dataset in the form of graphs and pictures. We can identify upcoming trend by observing these Graphs. Python provides us with an amazing Data Visualization library in it which is Matplotlib which was devel...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Feb, 2022" }, { "code": null, "e": 232, "s": 28, "text": "One of the main process in Data Science is Data Visualization. Data Visualization refers to present a dataset in the form of graphs and pictures. We can identify upcoming tren...
Remove elements from array using JavaScript filter - JavaScript
Suppose, we have two arrays of literals like these − const arr1 = [4, 23, 7, 6, 3, 6, 4, 3, 56, 4]; const arr2 = [4, 56, 23]; We are required to write a JavaScript function that takes in these two arrays and filters the first to contain only those elements that are not present in the second array. And then return the f...
[ { "code": null, "e": 1240, "s": 1187, "text": "Suppose, we have two arrays of literals like these −" }, { "code": null, "e": 1313, "s": 1240, "text": "const arr1 = [4, 23, 7, 6, 3, 6, 4, 3, 56, 4];\nconst arr2 = [4, 56, 23];" }, { "code": null, "e": 1486, "s": 131...
Maximum value of short int in C++
21 Jun, 2022 In this article, we will discuss the short int data type in C++. This data type in C++ is used to store 16-bit integers. Some properties of the short int data type are: Being a signed data type, it can store positive values as well as negative values.Takes a size of 16 bits, where 1 bit is used to store th...
[ { "code": null, "e": 53, "s": 25, "text": "\n21 Jun, 2022" }, { "code": null, "e": 174, "s": 53, "text": "In this article, we will discuss the short int data type in C++. This data type in C++ is used to store 16-bit integers." }, { "code": null, "e": 222, "s": 17...
Efficient Huffman Coding for Sorted Input | Greedy Algo-4
08 Jul, 2021 We recommend to read following post as a prerequisite for this.Greedy Algorithms | Set 3 (Huffman Coding) Time complexity of the algorithm discussed in above post is O(nLogn). If we know that the given array is sorted (by non-decreasing order of frequency), we can generate Huffman codes in O(n) time. Follo...
[ { "code": null, "e": 54, "s": 26, "text": "\n08 Jul, 2021" }, { "code": null, "e": 160, "s": 54, "text": "We recommend to read following post as a prerequisite for this.Greedy Algorithms | Set 3 (Huffman Coding)" }, { "code": null, "e": 1257, "s": 160, "text":...
Introduction to Dask in Python
10 Jul, 2020 Dask is a library that supports parallel computing in python. It provides features like- Dynamic task scheduling which is optimized for interactive computational workloadsBig data collections of dask extends the common interfaces like NumPy, Pandas etc. Dynamic task scheduling which is optimized for intera...
[ { "code": null, "e": 53, "s": 25, "text": "\n10 Jul, 2020" }, { "code": null, "e": 142, "s": 53, "text": "Dask is a library that supports parallel computing in python. It provides features like-" }, { "code": null, "e": 307, "s": 142, "text": "Dynamic task sch...
Download Instagram profile pic using Python
16 Jun, 2022 Instagram is a photo and video-sharing social networking service owned by Facebook, Python provides powerful tools for web scraping of Instagram. requests: pip install requests concept – For a given user profile, open view-source and find “profile_pic_url_hd” . To find press ctrl+f and type “profile_pic_u...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Jun, 2022" }, { "code": null, "e": 199, "s": 52, "text": "Instagram is a photo and video-sharing social networking service owned by Facebook, Python provides powerful tools for web scraping of Instagram. " }, { "code": null,...
Iterate over words of a String in Python
23 Jan, 2020 Given a String comprising of many words separated by space, write a Python program to iterate over these words of the string. Examples: Input: str = “GeeksforGeeks is a computer science portal for Geeks”Output:GeeksforGeeksisacomputerscienceportalforGeeks Input: str = “Geeks for Geeks”Output:GeeksforGeeks ...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Jan, 2020" }, { "code": null, "e": 154, "s": 28, "text": "Given a String comprising of many words separated by space, write a Python program to iterate over these words of the string." }, { "code": null, "e": 164, "s"...
How to change browser theme-color using HTML ?
16 Dec, 2021 In this article, we will know how to change the browser theme-color in HTML. Suppose that if we want our website to appear in green color along with changing the browser theme color which will be the same as our website, then we can use a meta tag with name and content attribute. Meta Tag: The <meta> tag i...
[ { "code": null, "e": 53, "s": 25, "text": "\n16 Dec, 2021" }, { "code": null, "e": 334, "s": 53, "text": "In this article, we will know how to change the browser theme-color in HTML. Suppose that if we want our website to appear in green color along with changing the browser them...
What is float property in CSS ?
21 May, 2021 In this article, we will learn about CSS float property with suitable examples of all available attributes. The float property is used to change the normal flow of an element. It defines how an element should float and place an element on its container’s right or left side. float: none|inherit|left|right...
[ { "code": null, "e": 54, "s": 26, "text": "\n21 May, 2021" }, { "code": null, "e": 163, "s": 54, "text": "In this article, we will learn about CSS float property with suitable examples of all available attributes. " }, { "code": null, "e": 331, "s": 163, "text...
SQL Query to Find All Employees Who Are Also Managers
13 Apr, 2021 Structured Query Language or SQL is a standard Database language that is used to create, maintain and retrieve the data from relational databases like MySQL, Oracle, etc. Here, we are going to see how to find the details of all the employees who are also managers in SQL. We will first create a database na...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Apr, 2021" }, { "code": null, "e": 224, "s": 52, "text": "Structured Query Language or SQL is a standard Database language that is used to create, maintain and retrieve the data from relational databases like MySQL, Oracle, etc. " ...
How to Install ImageMagick on Ubuntu
Use ImageMagick to create, edit, compose or convert bitmap pix. It could actually read and write snapshots in a type of codecs (over 200) including PNG, JPEG, JPEG-2000, GIF, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and develop into snapshots, alter...
[ { "code": null, "e": 1681, "s": 1187, "text": "Use ImageMagick to create, edit, compose or convert bitmap pix. It could actually read and write snapshots in a type of codecs (over 200) including PNG, JPEG, JPEG-2000, GIF, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, fli...
Ruby | Array transpose() function
06 Dec, 2019 Array#transpose() : transpose() is a Array class method which returns the length of elements in the array transposes the rows and columns. Syntax: Array.transpose() Parameter: Array Return: transposes the rows and columns. Example #1 : # Ruby code for transpose() method # declaring arraya = [[18, 22], [33...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Dec, 2019" }, { "code": null, "e": 167, "s": 28, "text": "Array#transpose() : transpose() is a Array class method which returns the length of elements in the array transposes the rows and columns." }, { "code": null, "e":...
JSF - h:inputText
The h:inputText tag renders an HTML input element of the type "text". <h:inputText value = "Hello World!" /> <input type = "text" name = "j_idt6:j_idt8" value = "Hello World!" /> id Identifier for a component binding Reference to the component that can be used in a backing bean rendered A boolean; false suppresses r...
[ { "code": null, "e": 2156, "s": 2086, "text": "The h:inputText tag renders an HTML input element of the type \"text\"." }, { "code": null, "e": 2197, "s": 2156, "text": "<h:inputText value = \"Hello World!\" /> \n" }, { "code": null, "e": 2268, "s": 2197, "tex...
JavaScript string.normalize() Method
06 Oct, 2021 Below is the example of the string.normalize() method. Example: javascript <script>var a = "Geeks For Geeks"; b = a.normalize('NFC')c = a.normalize('NFD')d = a.normalize('NFKC')e = a.normalize('NFKD') document.write(b,c,d,e);</script> Output: Geeks For GeeksGeeks For GeeksGeeks For GeeksGeeks For...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Oct, 2021" }, { "code": null, "e": 85, "s": 28, "text": "Below is the example of the string.normalize() method. " }, { "code": null, "e": 96, "s": 85, "text": "Example: " }, { "code": null, "e": 107,...
Lodash _.property() Method
09 Sep, 2020 The Lodash _.property() method is used to return a function that will return the specified property of any passed-in object. Syntax: _.property(path) Parameters: This method accepts one parameter as mentioned above and described below: path: This parameter holds the path of the property to get. Return Va...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Sep, 2020" }, { "code": null, "e": 153, "s": 28, "text": "The Lodash _.property() method is used to return a function that will return the specified property of any passed-in object." }, { "code": null, "e": 162, "s":...
C# Program For Listing the Files in a Directory
15 Nov, 2021 Given files, now our task is to list all these files in the directory using C#. So to do this task we use the following function and class: DirectoryInfo: It is a class that provides different types of methods for moving, creating, and enumerating through directories and their subdirectories. You cannot in...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Nov, 2021" }, { "code": null, "e": 168, "s": 28, "text": "Given files, now our task is to list all these files in the directory using C#. So to do this task we use the following function and class:" }, { "code": null, "e"...
Ruby | Control Flow Alteration
12 Jun, 2019 Prerequisite : Decision Making , Loops Ruby programming language provides some statements in addition to loops, conditionals, and iterators, which are used to change the flow of control in a program.In other words, these statements are a piece of code that executes one after another until the condition is ...
[ { "code": null, "e": 53, "s": 25, "text": "\n12 Jun, 2019" }, { "code": null, "e": 92, "s": 53, "text": "Prerequisite : Decision Making , Loops" }, { "code": null, "e": 509, "s": 92, "text": "Ruby programming language provides some statements in addition to lo...
Search Algorithms in AI
07 Jun, 2022 Artificial Intelligence is the study of building agents that act rationally. Most of the time, these agents perform some kind of search algorithm in the background in order to achieve their tasks. A search problem consists of: A State Space. Set of all possible states where you can be.A Start State. The s...
[ { "code": null, "e": 54, "s": 26, "text": "\n07 Jun, 2022" }, { "code": null, "e": 252, "s": 54, "text": "Artificial Intelligence is the study of building agents that act rationally. Most of the time, these agents perform some kind of search algorithm in the background in order t...
Python DateTime astimezone() Method
02 Sep, 2021 The astimezone() function is used to return a DateTime instance according to the specified time zone parameter tz. Note: The returned DateTime instance is having the new UTC offset value as per the tz parameter. And If this function does not take parameter tz, then the returned DateTime object will have t...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Sep, 2021" }, { "code": null, "e": 144, "s": 28, "text": "The astimezone() function is used to return a DateTime instance according to the specified time zone parameter tz. " }, { "code": null, "e": 371, "s": 144, ...
How to swap two numbers without using a temporary variable?
30 Jun, 2022 Given two variables, x, and y, swap two variables without using a third variable. Method 1 (Using Arithmetic Operators) The idea is to get a sum in one of the two given numbers. The numbers can then be swapped using the sum and subtraction from the sum. C++ C Java Python3 C# PHP Javascript // C++ Progra...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Jun, 2022" }, { "code": null, "e": 135, "s": 52, "text": "Given two variables, x, and y, swap two variables without using a third variable. " }, { "code": null, "e": 174, "s": 135, "text": "Method 1 (Using Arithm...
Minimum changes required to make all element in an array equal
20 Feb, 2022 Given an array of length N, the task is to find minimum operation required to make all elements in the array equal. Operation is as follows: Replace the value of one element of the array by one of its adjacent elements. Examples: Input: N = 4, arr[] = {2, 3, 3, 4} Output: 2 Explanation: Replace 2 and 4 ...
[ { "code": null, "e": 53, "s": 25, "text": "\n20 Feb, 2022" }, { "code": null, "e": 195, "s": 53, "text": "Given an array of length N, the task is to find minimum operation required to make all elements in the array equal. Operation is as follows: " }, { "code": null, ...
Bootstrap shown.bs.tab event
The shown.bs.event fires when the tab is completely displayed. After that the alert generates as shown below − $('.nav-tabs a').on('shown.bs.tab', function(){ alert('New tab is now visible!'); }); The tabs are displayed using the show() method − $(".nav-tabs a").click(function(){ $(this).tab('show'); }); You can tr...
[ { "code": null, "e": 1173, "s": 1062, "text": "The shown.bs.event fires when the tab is completely displayed. After that the alert generates as shown below −" }, { "code": null, "e": 1261, "s": 1173, "text": "$('.nav-tabs a').on('shown.bs.tab', function(){\n alert('New tab is no...
Revealing Robustness in Linear Optimization Problems using Monte Carlo Simulation in Python | by Tellef Solberg | Towards Data Science
We will do the following:> Construct a deterministic linear programming problem using PuLP> Apply Monte Carlo simulations on the problem> Interpret the results using data visualization The linear programming problem we are going to solve is the following: A manufacturer of specialized industrial windows has three produ...
[ { "code": null, "e": 357, "s": 172, "text": "We will do the following:> Construct a deterministic linear programming problem using PuLP> Apply Monte Carlo simulations on the problem> Interpret the results using data visualization" }, { "code": null, "e": 428, "s": 357, "text": "T...
Titanic dataset-Advanced data exploration in Python | Towards Data Science
Unique vignettes tumbled out during the course of my discussions with the Titanic dataset. Some of them well documented in the past and some not. A few examples: Would you feel safer if you were traveling Second class or Third class? Contrary to popular opinion made famous by Hollywood movies, you had DOUBLE the chance...
[ { "code": null, "e": 334, "s": 172, "text": "Unique vignettes tumbled out during the course of my discussions with the Titanic dataset. Some of them well documented in the past and some not. A few examples:" }, { "code": null, "e": 585, "s": 334, "text": "Would you feel safer if ...
Building a multi-output Convolutional Neural Network with Keras | by Rodrigo Bressan | Towards Data Science
In this post, we will be exploring the Keras functional API in order to build a multi-output Deep Learning model. We will show how to train a single model that is capable of predicting three distinct outputs. By using the UTK Face dataset, which is composed of over 20 thousand pictures of people in uncontrolled environ...
[ { "code": null, "e": 638, "s": 172, "text": "In this post, we will be exploring the Keras functional API in order to build a multi-output Deep Learning model. We will show how to train a single model that is capable of predicting three distinct outputs. By using the UTK Face dataset, which is compos...
Assertion in Selenium WebDriver using TestNg - GeeksforGeeks
06 Oct, 2021 Prerequisite – Selenium Actual result is compared with expected result with the help of Assertion. It means verification is done to check if the state of the application is the same to what we are expecting or not. For creating assertion we are going to use the Assert class provided by TestNG. There are t...
[ { "code": null, "e": 24628, "s": 24600, "text": "\n06 Oct, 2021" }, { "code": null, "e": 24924, "s": 24628, "text": "Prerequisite – Selenium Actual result is compared with expected result with the help of Assertion. It means verification is done to check if the state of the appli...
Character replacement after removing duplicates from a string - GeeksforGeeks
22 Apr, 2021 Given a string. The task is to replace each character of the minimized string by a character present at index ‘IND‘ of the original string. The minimized string is the string obtained by removing all duplicates from the original string keeping the order of elements same. IND for any index in the minimized ...
[ { "code": null, "e": 24766, "s": 24738, "text": "\n22 Apr, 2021" }, { "code": null, "e": 25038, "s": 24766, "text": "Given a string. The task is to replace each character of the minimized string by a character present at index ‘IND‘ of the original string. The minimized string is...
What is the relation between 'null' and '0' in JavaScript?
There is a lot of curiosity arises when we are dealing with false values and it is even more especially when dealing with "null" and "0" because of their properties. When we try to compare "null" and "0", we will come across typical scenarios. For greater than(>), less than(<) and equal to(=) we will get Boolean false ...
[ { "code": null, "e": 1480, "s": 1062, "text": "There is a lot of curiosity arises when we are dealing with false values and it is even more especially when dealing with \"null\" and \"0\" because of their properties. When we try to compare \"null\" and \"0\", we will come across typical scenarios. F...
Different Colors of Points and Lines in Base R Plot Legend - GeeksforGeeks
25 Aug, 2021 In this article, we are going to see how to plot different colors of points and lines in base R Programing Language. Creating a dataset for demonstration: R A <- matrix( c( c(0,1,2,3,5), c(1,3,4,2,4)), ncol=2 )B <- matrix( c( c(3,1,2,3,4), c(4,2,1,1,2)), ncol=2 )C <- matrix( c( c(1,1,2,4,5), c(4,4,0,1,2)),...
[ { "code": null, "e": 24876, "s": 24848, "text": "\n25 Aug, 2021" }, { "code": null, "e": 24993, "s": 24876, "text": "In this article, we are going to see how to plot different colors of points and lines in base R Programing Language." }, { "code": null, "e": 25031, ...
GATE | GATE-CS-2014-(Set-1) | Question 65 - GeeksforGeeks
15 Oct, 2019 Given the following schema: employees(emp-id, first-name, last-name, hire-date, dept-id, salary) departments(dept-id, dept-name, manager-id, location-id) You want to display the last names and hire dates of all latest hires in their respective departments in the location ID 1700. You issue the f...
[ { "code": null, "e": 24466, "s": 24438, "text": "\n15 Oct, 2019" }, { "code": null, "e": 24494, "s": 24466, "text": "Given the following schema:" }, { "code": null, "e": 24631, "s": 24494, "text": " employees(emp-id, first-name, last-name, hire-date, dept-...
C library function - raise()
The C library function int raise(int sig) causes signal sig to be generated. The sig argument is compatible with the SIG macros. Following is the declaration for signal() function. int raise(int sig) sig − This is the signal number to send. Following are few important standard signal constants − sig − This is the signa...
[ { "code": null, "e": 2136, "s": 2007, "text": "The C library function int raise(int sig) causes signal sig to be generated. The sig argument is compatible with the SIG macros." }, { "code": null, "e": 2188, "s": 2136, "text": "Following is the declaration for signal() function." ...
Python - Arrays
Array is a container which can hold a fix number of items and these items should be of the same type. Most of the data structures make use of arrays to implement their algorithms. Following are the important terms to understand the concept of Array. Element− Each item stored in an array is called an element. Index − Ea...
[ { "code": null, "e": 2494, "s": 2244, "text": "Array is a container which can hold a fix number of items and these items should be of the same type. Most of the data structures make use of arrays to implement their algorithms. Following are the important terms to understand the concept of Array." ...
Calculate number of nodes in all subtrees | Using DFS - GeeksforGeeks
30 Jun, 2021 Given a tree in the form of adjacency list we have to calculate the number of nodes in the subtree of each node while calculating the number of nodes in the subtree of a particular node that node will also be added as a node in subtree hence the number of nodes in subtree of leaves is 1. Examples: Input ...
[ { "code": null, "e": 25232, "s": 25204, "text": "\n30 Jun, 2021" }, { "code": null, "e": 25533, "s": 25232, "text": "Given a tree in the form of adjacency list we have to calculate the number of nodes in the subtree of each node while calculating the number of nodes in the subtre...