title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
GATE | GATE-CS-2014-(Set-3) | Question 12 - GeeksforGeeks
28 Jun, 2021 Let X and Y be finite sets and f: X -> Y be a function. Which one of the following statements is TRUE?(A) A(B) B(C) C(D) DAnswer: (D)Explanation: Let x = {a, b, c} and y = {1, 2} A Function f maps each element of x to 1 in y. f(a)=1 , f(b)=1 , f(c) =1 A = {a, b} B = {b, c} ---------------------------------...
[ { "code": null, "e": 24559, "s": 24531, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24705, "s": 24559, "text": "Let X and Y be finite sets and f: X -> Y be a function. Which one of the following statements is TRUE?(A) A(B) B(C) C(D) DAnswer: (D)Explanation:" }, { "co...
Predict the Selling Price of HDB Resale Flats | by Jim Meng Kok | Towards Data Science
There are multiple factors affecting the selling price of HDB resale flats in Singapore. Therefore, by using linear regression, I am interested in finding out how the selling price of a HDB resale flat changes based on its following characteristics in this mini exercise: its distance to the Central Business District (C...
[ { "code": null, "e": 444, "s": 172, "text": "There are multiple factors affecting the selling price of HDB resale flats in Singapore. Therefore, by using linear regression, I am interested in finding out how the selling price of a HDB resale flat changes based on its following characteristics in thi...
Train Custom Dataset Mask RCNN. A tutorial to easily train custom... | by Michael Chan | Towards Data Science
Step by step explanation of how to train your Mask RCNN model with custom dataset. First of all simply clone the following repository, it is a demo of an individual class segmentation. (we will cover multiple class too). git clone https://github.com/miki998/Custom_Train_MaskRCNN As mentioned in the README.md it is need...
[ { "code": null, "e": 255, "s": 172, "text": "Step by step explanation of how to train your Mask RCNN model with custom dataset." }, { "code": null, "e": 393, "s": 255, "text": "First of all simply clone the following repository, it is a demo of an individual class segmentation. (...
jQuery | remove() - GeeksforGeeks
13 Feb, 2019 The remove() method in JQuery used to remove all the selected elements including all the text. This method also remove data and all the events of the selected elements.Syntax: $(selector).remove() Return Value: It will return all the data of the selected elements deleted.Example 1: Input: $("p").remove() ...
[ { "code": null, "e": 25361, "s": 25333, "text": "\n13 Feb, 2019" }, { "code": null, "e": 25537, "s": 25361, "text": "The remove() method in JQuery used to remove all the selected elements including all the text. This method also remove data and all the events of the selected elem...
Software Serial in Arduino
The SoftwareSerial library was developed to ensure that any pins of Arduino can exchange Serial data with other peripherals, like GNSS receivers, using software. Arduino Uno, for example, has only one HardwareSerial port (pins 0 and 1), which is connected to the USB via the USB to UART conversion chip. Thus, if you hav...
[ { "code": null, "e": 1528, "s": 1062, "text": "The SoftwareSerial library was developed to ensure that any pins of Arduino can exchange Serial data with other peripherals, like GNSS receivers, using software. Arduino Uno, for example, has only one HardwareSerial port (pins 0 and 1), which is connect...
How to find index of last occurrence of a substring in a string in Python?
Python has a rfind() method which searches from the end of a string for the occurrence of a substring. It returns the index of last occurrence if found, else -1. You can use it as follows: >>> 'some of the some'.rfind('some') 12 >>> 'some of the some'.rfind('none') -1 >>> "NikolaTesla".rfind('kola') 2
[ { "code": null, "e": 1251, "s": 1062, "text": "Python has a rfind() method which searches from the end of a string for the occurrence of a substring. It returns the index of last occurrence if found, else -1. You can use it as follows:" }, { "code": null, "e": 1365, "s": 1251, "t...
Minimum steps to make the product of the array equal to 1 - GeeksforGeeks
28 Mar, 2022 Given an array arr[] containing N integers. In one step, any element of the array can either be increased or decreased by one. The task is to find minimum steps required such that the product of the array elements becomes 1. Examples: Input: arr[] = { -2, 4, 0 } Output: 5 We can change -2 to -1, 0 to -1 a...
[ { "code": null, "e": 25124, "s": 25096, "text": "\n28 Mar, 2022" }, { "code": null, "e": 25349, "s": 25124, "text": "Given an array arr[] containing N integers. In one step, any element of the array can either be increased or decreased by one. The task is to find minimum steps re...
How to handle proxy in Selenium in Java?
We can handle proxy in Selenium in Java with the help of PROXY class. import java.io.IOException; import org.openqa.selenium.Proxy; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.remote.CapabilityType; import org.openqa.selenium.remote.DesiredCapabilit...
[ { "code": null, "e": 1132, "s": 1062, "text": "We can handle proxy in Selenium in Java with the help of PROXY class." }, { "code": null, "e": 1932, "s": 1132, "text": "import java.io.IOException;\nimport org.openqa.selenium.Proxy;\nimport org.openqa.selenium.WebDriver;\nimport or...
C/C++ Program for Linear Search
11 Jun, 2022 Problem: Given an array arr[] of n elements, write a function to search a given element x in arr[]. ALGORITHM :Step 1: Start Step 2: Declare an array, and search data variable-x.Step 3: Traverse the entire array until search data is found. If search data is present then ...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 Jun, 2022" }, { "code": null, "e": 153, "s": 52, "text": "Problem: Given an array arr[] of n elements, write a function to search a given element x in arr[]. " }, { "code": null, "e": 481, "s": 153, "text": "ALGO...
matplotlib.pyplot.jet() in Python
22 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. The jet() function in pyplot module of matplotlib library is used to set the colormap to “jet”. Syntax: matplotl...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Apr, 2020" }, { "code": null, "e": 223, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MAT...
Java Program to Delete a Column in a Table Using JDBC - GeeksforGeeks
14 Aug, 2021 Before deleting a column in a table, first is need to connect the java application to the database. Java has its own API which JDBC API which uses JDBC drivers for database connections. Before JDBC, ODBC API was used but it was written in C which means it was platform-dependent. JDBC API provides the appli...
[ { "code": null, "e": 23892, "s": 23864, "text": "\n14 Aug, 2021" }, { "code": null, "e": 24282, "s": 23892, "text": "Before deleting a column in a table, first is need to connect the java application to the database. Java has its own API which JDBC API which uses JDBC drivers for...
C program to Check Whether a Number is Positive or Negative or Zero?
A number which is greater than 0 is positive and less than 0 are negative. The concept of positive and negative is very important in number theory and programming also. Calculations rely on this concept only. Input: 0 Output:0 is zero Using conditional statement check the number with 0 weather it is greater than 0 or s...
[ { "code": null, "e": 1271, "s": 1062, "text": "A number which is greater than 0 is positive and less than 0 are negative. The concept of positive and negative is very important in number theory and programming also. Calculations rely on this concept only." }, { "code": null, "e": 1297, ...
Placing plot on Tkinter main window in Python
Oftentimes, we need to deal with plots in our Tkinter GUI-based application. To support the plots for the available data points, Python provides a Matplotlib package that can be imported into the application easily. In order to add a plot for the given data points, we have to install several other packages such as NumP...
[ { "code": null, "e": 1493, "s": 1062, "text": "Oftentimes, we need to deal with plots in our Tkinter GUI-based application. To support the plots for the available data points, Python provides a Matplotlib package that can be imported into the application easily. In order to add a plot for the given ...
How to convert JSON into a Pandas DataFrame | by B. Chen | Towards Data Science
Reading data is the first step in any data science project. Often, you’ll work with data in JSON format and run into problems at the very beginning. In this article, you’ll learn how to use the Pandas built-in functions read_json() and json_normalize() to deal with the following common problems: Reading simple JSON fro...
[ { "code": null, "e": 469, "s": 172, "text": "Reading data is the first step in any data science project. Often, you’ll work with data in JSON format and run into problems at the very beginning. In this article, you’ll learn how to use the Pandas built-in functions read_json() and json_normalize() to...
C++ Vector Library - vector() Function
The C++ default constructor std::vector::vector() constructs an empty container, with zero elements. Size of this container is always zero. The storage for container is allocated by internal allocator. Following is the declaration for std::vector::vector() constructor form std::vector header. explicit vector (const all...
[ { "code": null, "e": 2743, "s": 2603, "text": "The C++ default constructor std::vector::vector() constructs an empty container, with zero elements. Size of this container is always zero." }, { "code": null, "e": 2805, "s": 2743, "text": "The storage for container is allocated by ...
Top AutoML open source tools to automate your deep learning applications | by Philippe Bouaziz,Data Scientist at Africa4Data,PhD | Towards Data Science
Article Co-authors with : @bonnefoypy and @emeric.chaize CEOs at Olexya. Building the best model is a key step after exploratory data analysis and feature selection in any data science project. In deep learning this process consists of building layers by layers complexes neural networks (Perceptron, Vanilla, Convolutiv...
[ { "code": null, "e": 245, "s": 172, "text": "Article Co-authors with : @bonnefoypy and @emeric.chaize CEOs at Olexya." }, { "code": null, "e": 531, "s": 245, "text": "Building the best model is a key step after exploratory data analysis and feature selection in any data science p...
Build Your Own Automatic Differentiation Program | by Jonathan Kernes | Towards Data Science
For anyone who’s completely lost at how graphs can be used to compute derivatives, or just wants to know how TensorFlow works at a fundamental level, this is your guide. Deep learning is so popular and so widespread these days, it’s easy to ask the question, “Why did it take so long for people to figure this out?” Ther...
[ { "code": null, "e": 341, "s": 171, "text": "For anyone who’s completely lost at how graphs can be used to compute derivatives, or just wants to know how TensorFlow works at a fundamental level, this is your guide." }, { "code": null, "e": 759, "s": 341, "text": "Deep learning is...
How to create a Python dictionary from text file?
Assuming a following text file (dict.txt) is present 1 aaa2 bbb3 ccc Following Python code reads the file using open() function. Each line as string is split at space character. First component is used as key and second as value d = {} with open("dict.txt") as f: for line in f: (key, val) = line.split() d[int(k...
[ { "code": null, "e": 1115, "s": 1062, "text": "Assuming a following text file (dict.txt) is present" }, { "code": null, "e": 1131, "s": 1115, "text": "1 aaa2 bbb3 ccc" }, { "code": null, "e": 1291, "s": 1131, "text": "Following Python code reads the file using...
Ways to sort list of dictionaries using values in python
In this article, you will learn how to sort the list of dictionaries using values in Python. We will use inbuilt method calls sorted to sort the dictionary. We will follow the steps mentioned below to sort a dictionary using values. Pass the list containing dictionaries and keys to the sorted method.We can pass the key...
[ { "code": null, "e": 1219, "s": 1062, "text": "In this article, you will learn how to sort the list of dictionaries using values in Python. We will use inbuilt method calls sorted to sort the dictionary." }, { "code": null, "e": 1295, "s": 1219, "text": "We will follow the steps ...
Keeping credentials safe in Jupyter Notebooks | by Alexandra Souly | Towards Data Science
Jupyter Notebooks are widely used in Data Science for quick prototyping of models and interactive demonstrations. But how should we store passwords, certificates and keys securely when using them? I will give a quick tour of the available solutions to help you keep your credentials safe. I use Jupyter Notebooks a lot i...
[ { "code": null, "e": 368, "s": 171, "text": "Jupyter Notebooks are widely used in Data Science for quick prototyping of models and interactive demonstrations. But how should we store passwords, certificates and keys securely when using them?" }, { "code": null, "e": 460, "s": 368, ...
MySQL - SET Syntax for Variable Assignment
The SET statement in MySQL is used to assign values for variables. Using this you can set values to, user-defined variables, variables in procedures and, system variables. Following is the syntax of the SET statement in MySQL− SET variable = val1, val2, val3, . . . variable: { user_var_name | param_name | loc...
[ { "code": null, "e": 2505, "s": 2333, "text": "The SET statement in MySQL is used to assign values for variables. Using this you can set values to, user-defined variables, variables in procedures and, system variables." }, { "code": null, "e": 2560, "s": 2505, "text": "Following ...
How to create a tuple with string and int items in C#?
Firstly, set two items in the tuple. Tuple<int, string> tuple = new Tuple<int, string>(20, "Tom"); Now check for first item in the tuple, which is an integer. if (tuple.Item1 == 20) { Console.WriteLine(tuple.Item1); } Now check for second item in the tuple, which is a string − if (tuple.Item2 == "Tom") { Console....
[ { "code": null, "e": 1099, "s": 1062, "text": "Firstly, set two items in the tuple." }, { "code": null, "e": 1161, "s": 1099, "text": "Tuple<int, string> tuple = new Tuple<int, string>(20, \"Tom\");" }, { "code": null, "e": 1221, "s": 1161, "text": "Now check ...
How to create a Custom Ratingbar in Android using Kotlin?
This example demonstrates how to create a Custom Ratingbar in Android using Kotlin. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <RelativeLayout xmlns:android="http://sche...
[ { "code": null, "e": 1146, "s": 1062, "text": "This example demonstrates how to create a Custom Ratingbar in Android using Kotlin." }, { "code": null, "e": 1275, "s": 1146, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required de...
Can finally block be used without catch in Java?
Yes, it is not mandatory to use catch block with finally. You can have to try and finally. Live Demo public class Test { public static void main(String args[]) { int a[] = new int[2]; try { } finally { a[0] = 6; System.out.println("First element value: " + a[0]); System.o...
[ { "code": null, "e": 1153, "s": 1062, "text": "Yes, it is not mandatory to use catch block with finally. You can have to try and finally." }, { "code": null, "e": 1163, "s": 1153, "text": "Live Demo" }, { "code": null, "e": 1446, "s": 1163, "text": "public cla...
Make Beautiful Spatial Visualizations with Plotly and Mapbox | by Will Norris | Towards Data Science
I recently wrote a post about visualizing weather data from NOAA. We walked through processing the data and making some basic interactive maps with Plotly. In this article I want to use the same data but focus on the options we have available for improving our web maps with Plotly and Mapbox. Web maps can serve many pu...
[ { "code": null, "e": 655, "s": 171, "text": "I recently wrote a post about visualizing weather data from NOAA. We walked through processing the data and making some basic interactive maps with Plotly. In this article I want to use the same data but focus on the options we have available for improvin...
PHP vs HTML - GeeksforGeeks
30 Aug, 2019 Example of PHP code: <?php echo "GeeksforGeeks"; ?> Example of HTML code: <!DOCTYPE html><html> <body> <h1>GeeksforGeeks</h1> <p>Hello</p></body> </html> PHP vs HTML Interesting Facts: Famous websites like Facebook, Technorati, Yahoo, Wikipedia.org, WordPress.org, Twitter.com, Flickr, etc are po...
[ { "code": null, "e": 24739, "s": 24711, "text": "\n30 Aug, 2019" }, { "code": null, "e": 24760, "s": 24739, "text": "Example of PHP code:" }, { "code": "<?php echo \"GeeksforGeeks\"; ?> ", "e": 24794, "s": 24760, "text": null }, { "code": null, "...
Zscaler Interview Experience | Campus Placement Drive 2020 - GeeksforGeeks
03 Sep, 2020 Round 1: Online Test on Hackerrank. There were 20 MCQs of 1 marks each and 4 coding questions of total of 240 marks. MCQs were Networking, OS, and Linux/UNIX based. Two coding questions were of 50 marks and two were 70. The questions were : You are given a binary array (with only 1s and 0s), and you are su...
[ { "code": null, "e": 24979, "s": 24951, "text": "\n03 Sep, 2020" }, { "code": null, "e": 25144, "s": 24979, "text": "Round 1: Online Test on Hackerrank. There were 20 MCQs of 1 marks each and 4 coding questions of total of 240 marks. MCQs were Networking, OS, and Linux/UNIX based...
PHP 7 - Anonymous Classes
Anonymous classes can now be defined using new class. Anonymous class can be used in place of a full class definition. <?php interface Logger { public function log(string $msg); } class Application { private $logger; public function getLogger(): Logger { return $this->logger; ...
[ { "code": null, "e": 2196, "s": 2077, "text": "Anonymous classes can now be defined using new class. Anonymous class can be used in place of a full class definition." }, { "code": null, "e": 2710, "s": 2196, "text": "<?php\n interface Logger {\n public function log(string ...
Batch Script - Functions with Parameters
Functions can work with parameters by simply passing them when a call is made to the function. Call :function_name parameter1, parameter2... parametern The parameters can then be accessed from within the function by using the tilde (~) character along with the positional number of the parameter. Following example show...
[ { "code": null, "e": 2264, "s": 2169, "text": "Functions can work with parameters by simply passing them when a call is made to the function." }, { "code": null, "e": 2322, "s": 2264, "text": "Call :function_name parameter1, parameter2... parametern\n" }, { "code": null, ...
How to send a JSON object to a server using Javascript? - GeeksforGeeks
17 Jan, 2022 JavaScript Object Notation (JSON). It is a lightweight data transferring format. It is very easy to understand by human as well as machine. It is commonly used to send data from or to server. Nowadays it is widely used in API integration because of its advantages and simplicity.In this example we are going...
[ { "code": null, "e": 37605, "s": 37577, "text": "\n17 Jan, 2022" }, { "code": null, "e": 38033, "s": 37605, "text": "JavaScript Object Notation (JSON). It is a lightweight data transferring format. It is very easy to understand by human as well as machine. It is commonly used to ...
Creating a Snapchat-Style Filter with Python | by Andrew Udell | Towards Data Science
The introduction of augmented reality (AR) in smart phones ushered a novel approach to entertainment. From playing games like Pokémon Go to making funny faces on Snapchat, AR has become a commonplace phenomenon. While these technologies seem advanced enough to borrow from science fiction, creating a fun, Snapchat-styl...
[ { "code": null, "e": 385, "s": 172, "text": "The introduction of augmented reality (AR) in smart phones ushered a novel approach to entertainment. From playing games like Pokémon Go to making funny faces on Snapchat, AR has become a commonplace phenomenon." }, { "code": null, "e": 627, ...
How to find if a column is auto_increment in MySQL?
To find if a column is auto_increment in MySQL, you can use the following syntax − select COLUMN_NAME from information_schema.columns where TABLE_SCHEMA='yourDatabaseName' and TABLE_NAME='yourTableName' and EXTRA like '%auto_increment%'; Let us first create a table. Here, ClientId is set AUTO_INCREMENT − mysql> create ...
[ { "code": null, "e": 1145, "s": 1062, "text": "To find if a column is auto_increment in MySQL, you can use the following syntax −" }, { "code": null, "e": 1300, "s": 1145, "text": "select COLUMN_NAME from information_schema.columns where\nTABLE_SCHEMA='yourDatabaseName' and TABLE...
Node.js Process exit Event
30 Jul, 2021 The process is the global object in Node.js that keeps track of and contains all the information of the particular node.js process that is executing at a particular time on the machine. The process.exit() method is the method that is used to end the Node.js process. Every process action on the machine or ...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jul, 2021" }, { "code": null, "e": 215, "s": 28, "text": "The process is the global object in Node.js that keeps track of and contains all the information of the particular node.js process that is executing at a particular time on th...
Data Visualization with Python
26 Apr, 2022 In today’s world, a lot of data is being generated on a daily basis. And sometimes to analyze this data for certain trends, patterns may become difficult if the data is in its raw format. To overcome this data visualization comes into play. Data visualization provides a good, organized pictorial representa...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Apr, 2022" }, { "code": null, "e": 477, "s": 28, "text": "In today’s world, a lot of data is being generated on a daily basis. And sometimes to analyze this data for certain trends, patterns may become difficult if the data is in its...
System of Linear Equations in three variables using Cramer’s Rule
11 May, 2021 Cramer’s rule: In linear algebra, Cramer’s rule is an explicit formula for the solution of a system of linear equations with as many equations as unknown variables. It expresses the solution in terms of the determinants of the coefficient matrix and of matrices obtained from it by replacing one column by t...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 May, 2021" }, { "code": null, "e": 702, "s": 52, "text": "Cramer’s rule: In linear algebra, Cramer’s rule is an explicit formula for the solution of a system of linear equations with as many equations as unknown variables. It expres...
Python Tkinter – Frameless window
16 Oct, 2021 Prerequisite: Python GUI – tkinter Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. To create a Frameless window, we will use the o...
[ { "code": null, "e": 53, "s": 25, "text": "\n16 Oct, 2021" }, { "code": null, "e": 88, "s": 53, "text": "Prerequisite: Python GUI – tkinter" }, { "code": null, "e": 313, "s": 88, "text": "Python offers multiple options for developing GUI (Graphical User Interf...
Check if the given characters is present in Golang String
26 Aug, 2019 In Go language, strings are different from other languages like Java, C++, Python, etc. It is a sequence of variable-width characters where each and every character is represented by one or more bytes using UTF-8 Encoding. In Go strings, you are allowed to check the given characters present in the string u...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Aug, 2019" }, { "code": null, "e": 493, "s": 28, "text": "In Go language, strings are different from other languages like Java, C++, Python, etc. It is a sequence of variable-width characters where each and every character is represe...
Probabilistic shortest path routing algorithm for optical networks
16 Jun, 2022 Data transfer operations is a crucial aspect in case of networking and routing. So efficient data transfer operations is a must need, with minimum hardware cost (Optical Cables, WDM Network components, Decoders, Multiplexers) and also in the minimum time possible. Thus, the need is to propose an algorithm ...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Jun, 2022" }, { "code": null, "e": 690, "s": 28, "text": "Data transfer operations is a crucial aspect in case of networking and routing. So efficient data transfer operations is a must need, with minimum hardware cost (Optical Cable...
C/C++ Program for Finding the vertex, focus and directrix of the parabola?
A set of points on a plain surface that forms a curve such that any point on that curve is equidistant from a point in the center (called focus) is a parabola. The general equation for the parabola is y = ax2 + bx + c The vertex of a parabola is the coordinate from which it takes the sharpest turn whereas a is the stra...
[ { "code": null, "e": 1222, "s": 1062, "text": "A set of points on a plain surface that forms a curve such that any point on that curve is equidistant from a point in the center (called focus) is a parabola." }, { "code": null, "e": 1263, "s": 1222, "text": "The general equation f...
Java regex to exclude a specific String constant
regex ^((?!kk).)*$ returns true if a line does not contain kk, otherwise returns false public class RegTest { public static void main(String[] args) { // TODO Auto-generated method stub String s="tutorials"; boolean i=s.matches("^((?!kk).)*$"); System.out.println(i); } }
[ { "code": null, "e": 1149, "s": 1062, "text": "regex ^((?!kk).)*$ returns true if a line does not contain kk, otherwise returns false" }, { "code": null, "e": 1364, "s": 1149, "text": "public class RegTest {\n public static void main(String[] args) {\n // TODO Auto-generat...
QlikView - Multi Box
A Multi Box represents the list of all the values from multiple fields as drop down values. Similar to list box, the selection of a value in Multi Box highlights the related values in other sheet objects. This helps in faster visual analysis. It is also very useful to follow a drill down path among various sheet object...
[ { "code": null, "e": 3243, "s": 2920, "text": "A Multi Box represents the list of all the values from multiple fields as drop down values. Similar to list box, the selection of a value in Multi Box highlights the related values in other sheet objects. This helps in faster visual analysis. It is also...
QTP - Virtual Objects
Sometimes, an application under test may contain standard window object but are not recognized by QTP. Under these circumstances, objects can be defined as virtual object(VO) of type button, link etc. so that user actions can be simulated on the virtual objects during execution. Let us say we are automating a scenario ...
[ { "code": null, "e": 2402, "s": 2122, "text": "Sometimes, an application under test may contain standard window object but are not recognized by QTP. Under these circumstances, objects can be defined as virtual object(VO) of type button, link etc. so that user actions can be simulated on the virtual...
jQuery Tutorial
jQuery is a JavaScript Library. jQuery greatly simplifies JavaScript programming. jQuery is easy to learn. With our online editor, you can edit the code, and click on a button to view the result. Click on the "Try it Yourself" button to see how it works. Use the correct selector to hide all <p> elements. $("").hide(); ...
[ { "code": null, "e": 32, "s": 0, "text": "jQuery is a JavaScript Library." }, { "code": null, "e": 82, "s": 32, "text": "jQuery greatly simplifies JavaScript programming." }, { "code": null, "e": 107, "s": 82, "text": "jQuery is easy to learn." }, { "c...
html.parser — Simple HTML and XHTML parser in Python
The HTMLParser class defined in this module provides functionality to parse HTML and XHMTL documents. This class contains handler methods that can identify tags, data, comments and other HTML elements. We have to define a new class that inherits HTMLParser class and submit HTML text using feed() method. from html.parse...
[ { "code": null, "e": 1264, "s": 1062, "text": "The HTMLParser class defined in this module provides functionality to parse HTML and XHMTL documents. This class contains handler methods that can identify tags, data, comments and other HTML elements." }, { "code": null, "e": 1367, "s":...
p5.js | floor() function - GeeksforGeeks
09 Apr, 2019 The floor() function in p5.js is used to calculate the floor value of a number. This function maps to the Math.floor() of javascript. It calculates the closest int value that is less than or equal to the value of the parameter. Syntax floor(number) Parameters: The function accepts only one parameter as me...
[ { "code": null, "e": 43692, "s": 43664, "text": "\n09 Apr, 2019" }, { "code": null, "e": 43920, "s": 43692, "text": "The floor() function in p5.js is used to calculate the floor value of a number. This function maps to the Math.floor() of javascript. It calculates the closest int...
Getting started with Python environments (using Conda) | by Robert Sandor | Towards Data Science
Whether you want one or have no idea what it is, you’ll have to deal with environments in Python eventually. If you’re a newbie to Python like myselfor a newbie to generally setting up your workspace for any programming language, then you may have dealt with the pain of setting up your environment for the first time. B...
[ { "code": null, "e": 366, "s": 47, "text": "Whether you want one or have no idea what it is, you’ll have to deal with environments in Python eventually. If you’re a newbie to Python like myselfor a newbie to generally setting up your workspace for any programming language, then you may have dealt wi...
Style Bootstrap 4 card with bg-primary class
Use the bg-primary class in Bootstrap 4, to add important stuff to a card and set blue background color. Style the Bootstrap 4 card as in the following code snippet − <div class="card bg-primary text-white"> <div class="card-body">Medical Books</div> </div> I have set the body of the card in the card-body class − <di...
[ { "code": null, "e": 1167, "s": 1062, "text": "Use the bg-primary class in Bootstrap 4, to add important stuff to a card and set blue background color." }, { "code": null, "e": 1229, "s": 1167, "text": "Style the Bootstrap 4 card as in the following code snippet −" }, { "...
Number of subsets with product less than k - GeeksforGeeks
25 May, 2021 You are given an array of n-elements, you have to find the number of subsets whose product of elements is less than or equal to a given integer k. Examples: Input : arr[] = {2, 4, 5, 3}, k = 12 Output : 8 Explanation : All possible subsets whose products are less than 12 are: (2), (4), (5), (3), (2, 4), (...
[ { "code": null, "e": 41274, "s": 41246, "text": "\n25 May, 2021" }, { "code": null, "e": 41421, "s": 41274, "text": "You are given an array of n-elements, you have to find the number of subsets whose product of elements is less than or equal to a given integer k." }, { "c...
C++ Program to Store Information of a Student in a Structure
A structure is a collection of items of different data types. It is very useful in creating complex data structures with different data type records. A structure is defined with the struct keyword. An example of a structure is as follows. struct employee { int empID; char name[50]; float salary; }; A program t...
[ { "code": null, "e": 1260, "s": 1062, "text": "A structure is a collection of items of different data types. It is very useful in creating complex data structures with different data type records. A structure is defined with the struct keyword." }, { "code": null, "e": 1301, "s": 126...
Implementing a Naive Bayes Classifier | by Tarun Gupta | Towards Data Science
In the context of Supervised Learning (Classification), Naive Bayes or rather Bayesian Learning acts as a gold standard for evaluating other learning algorithms along with acting as a powerful probabilistic modelling technique. In this post, we are going to discuss the workings of Naive Bayes classifier implementationa...
[ { "code": null, "e": 399, "s": 171, "text": "In the context of Supervised Learning (Classification), Naive Bayes or rather Bayesian Learning acts as a gold standard for evaluating other learning algorithms along with acting as a powerful probabilistic modelling technique." }, { "code": null,...
SAP ABAP - Inheritance
One of the most important concepts in object oriented programming is that of inheritance. Inheritance allows us to define a class in terms of another class, which makes it easier to create and maintain an application. This also provides an opportunity to reuse the code functionality and fast implementation time. When c...
[ { "code": null, "e": 3212, "s": 2898, "text": "One of the most important concepts in object oriented programming is that of inheritance. Inheritance allows us to define a class in terms of another class, which makes it easier to create and maintain an application. This also provides an opportunity t...
AWT Event Listeners
The Event listener represent the interfaces responsible to handle events. Java provides us various Event listener classes but we will discuss those which are more frequently used. Every method of an event listener method has a single argument as an object which is subclass of EventObject class. For example, mouse event...
[ { "code": null, "e": 2165, "s": 1747, "text": "The Event listener represent the interfaces responsible to handle events. Java provides us various Event listener classes but we will discuss those which are more frequently used. Every method of an event listener method has a single argument as an obje...
Generate Contour Plots Using Python’s Matplotlib | by Rashida Nasrin Sucky | Towards Data Science
I am sure you have seen a contour plot before. At least in weather data. It is used a lot in presenting meteorological or geographical data. But it is also used to present density, brightness, and electric potential. It is used a lot in data analysis and machine learning. It shows how a response variable relates to two...
[ { "code": null, "e": 388, "s": 46, "text": "I am sure you have seen a contour plot before. At least in weather data. It is used a lot in presenting meteorological or geographical data. But it is also used to present density, brightness, and electric potential. It is used a lot in data analysis and m...
How to programmatically take a screenshot on iOS?
In this post we will learn how to take screen shot programmatically in iOS. We will add on textField where we will change the value, take the screen shot by press of a button and then show the screen shot in an imageView which we will place just below the button itself. Remember that you can add this functionality on l...
[ { "code": null, "e": 1138, "s": 1062, "text": "In this post we will learn how to take screen shot programmatically in iOS." }, { "code": null, "e": 1333, "s": 1138, "text": "We will add on textField where we will change the value, take the screen shot by press of a button and the...
LocalStorage in ReactJS
In this article, we are going to see how to set and retrieve data in the localStorage memory of the user’s browser in a React application. LocalStorage is a web storage object to store the data on the user’s computer locally, which means the stored data is saved across browser sessions and the data stored has no expira...
[ { "code": null, "e": 1201, "s": 1062, "text": "In this article, we are going to see how to set and retrieve data in the localStorage memory of the user’s browser in a React application." }, { "code": null, "e": 1393, "s": 1201, "text": "LocalStorage is a web storage object to sto...
Step-by-Step Tutorial: Web Scraping Wikipedia with BeautifulSoup | by Khuyen Tran | Towards Data Science
My roommate and I had a discussion about her observation of the high depression rate in Sweden. We drew the connection between the depression rate and the lack of sunshine. I decided to support my hypothesis by gathering my own data and analyzing it. I use Beautiful Soup, an easy-to-use Python tool for web scraping. Wh...
[ { "code": null, "e": 422, "s": 171, "text": "My roommate and I had a discussion about her observation of the high depression rate in Sweden. We drew the connection between the depression rate and the lack of sunshine. I decided to support my hypothesis by gathering my own data and analyzing it." }...
Common Classification Model Evaluation metrics. | by Oduor George | Towards Data Science
All models are wrong, but some are useful,George E. P. Box. How accurate is a classification model? Is the model reliable? These two questions are easily answered by evaluating how well a model performs when subjected to unseen observations. This post illustrates some of the best ways models can be evaluated. What you ...
[ { "code": null, "e": 231, "s": 171, "text": "All models are wrong, but some are useful,George E. P. Box." }, { "code": null, "e": 294, "s": 231, "text": "How accurate is a classification model? Is the model reliable?" }, { "code": null, "e": 482, "s": 294, "te...
Max sum path in two arrays | Practice | GeeksforGeeks
Given two sorted arrays A and B of size M and N respectively. Each array may have some elements in common with the other array. Find the maximum sum of a path from the beginning of any array to the end of any of the two arrays. We can switch from one array to another array only at the common elements which are present ...
[ { "code": null, "e": 644, "s": 238, "text": "Given two sorted arrays A and B of size M and N respectively. Each array may have some elements in common with the other array. Find the maximum sum of a path from the beginning of any array to the end of any of the two arrays. We can switch from one arra...
CSS Grid Lines
Grid Lines are columns lines and row lines. Columns lines are the lines between columns and row lines between rows. The following is an example of grid lines Live Demo <!DOCTYPE html> <html> <head> <style> .container { display: grid; background-color: green; grid-te...
[ { "code": null, "e": 1106, "s": 1062, "text": "Grid Lines are columns lines and row lines." }, { "code": null, "e": 1178, "s": 1106, "text": "Columns lines are the lines between columns and row lines between rows." }, { "code": null, "e": 1220, "s": 1178, "tex...
Find root of a number using Newton's method - GeeksforGeeks
06 Feb, 2022 Given an integer N and a tolerance level L, the task is to find the square root of that number using Newton’s Method.Examples: Input: N = 16, L = 0.0001 Output: 4 42 = 16Input: N = 327, L = 0.00001 Output: 18.0831 Newton’s Method: Let N be any number then the square root of N can be given by the form...
[ { "code": null, "e": 24716, "s": 24688, "text": "\n06 Feb, 2022" }, { "code": null, "e": 24845, "s": 24716, "text": "Given an integer N and a tolerance level L, the task is to find the square root of that number using Newton’s Method.Examples: " }, { "code": null, "e...
How to use window.location to redirect to a different URL with JavaScript?
You might have encountered a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection. It is quite simple to do a page redirect using JavaScript on the client side. To redirect your site visitors to a new page, you just need to add a line...
[ { "code": null, "e": 1231, "s": 1062, "text": "You might have encountered a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection." }, { "code": null, "e": 1417, "s": 1231, "text": "It is quite s...
Decimal.Compare() Method in C#
The Decimal.Compare() method in C# is used to compare two specified Decimal values. Following is the syntax − public static int Compare (decimal val1, decimal val2); Above, val1 is the first value to compare, whereas Val is the second value to compare. The return value is less than zero if val1 is less than val2. Retur...
[ { "code": null, "e": 1146, "s": 1062, "text": "The Decimal.Compare() method in C# is used to compare two specified Decimal values." }, { "code": null, "e": 1172, "s": 1146, "text": "Following is the syntax −" }, { "code": null, "e": 1228, "s": 1172, "text": "p...
Container for form input and label with Bootstrap
Use the .form-group class in Bootstrap to set a container for form input and label &minus Live Demo <!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet"> <script src = "/scripts/jquery.min.js"></script> <script src =...
[ { "code": null, "e": 1152, "s": 1062, "text": "Use the .form-group class in Bootstrap to set a container for form input and label &minus" }, { "code": null, "e": 1162, "s": 1152, "text": "Live Demo" }, { "code": null, "e": 2021, "s": 1162, "text": "<!DOCTYPE h...
How to create a random sample with values 0 and 1 in R?
It is known that the random sample can be created by using sample function in R. If we want to create a random sample with values 0 and 1 only then there are three different ways to pass them inside the sample function − Creating a vector of 0 and 1 Creating a vector of 0 and 1 Using 0:1 Using 0:1 Using c(1,2) directly...
[ { "code": null, "e": 1283, "s": 1062, "text": "It is known that the random sample can be created by using sample function in R. If we want to create a random sample with values 0 and 1 only then there are three different ways to pass them inside the sample function −" }, { "code": null, ...
How to create Microsoft Word paragraphs and insert Images in Python?
Being a Data Engineering specialist, I often receive test results from testers in Microsoft word. Sigh! they put so much information into word document right from capturing screen shots and very big paragraphs. Other day, I was asked by testing team to help them with a program to insert the tool generated Text and imag...
[ { "code": null, "e": 1273, "s": 1062, "text": "Being a Data Engineering specialist, I often receive test results from testers in Microsoft word. Sigh! they put so much information into word document right from capturing screen shots and very big paragraphs." }, { "code": null, "e": 1449,...
Draw Spiralling Circles Using Turtle Graphics in Python - GeeksforGeeks
01 Oct, 2020 Turtle is an inbuilt module of python. It enables us to draw any drawing by a turtle, methods defined in the turtle module, and by using some logical loops. To draw something on the screen(cardboard) just move the turtle(pen). To move turtle(pen) there are some functions i.e forward(), backward(), etc. App...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n01 Oct, 2020" }, { "code": null, "e": 24596, "s": 24292, "text": "Turtle is an inbuilt module of python. It enables us to draw any drawing by a turtle, methods defined in the turtle module, and by using some logical loops. To dra...
Learn Word2Vec by implementing it in tensorflow | by aneesh joshi | Towards Data Science
Hi! I feel that the best way to understand an algorithm is to implement it. So, in this article I will be teaching you Word Embeddings by implementing it in Tensor Flow. The idea behind this article is to avoid all the introductions and the usual chatter associated with word embeddings/word2vec and jump straight into t...
[ { "code": null, "e": 50, "s": 46, "text": "Hi!" }, { "code": null, "e": 216, "s": 50, "text": "I feel that the best way to understand an algorithm is to implement it. So, in this article I will be teaching you Word Embeddings by implementing it in Tensor Flow." }, { "code...
Geographical plotting using Python plotly
Python provides various libraries to handle geographical and graph data. Python plotly is one of those libraries which are used to draw geographical graphs. Plotly is a free and open source library. Plotly helps to plot various kinds of graphs like Line charts, Horizontal bar charts, bar charts, dashboards, scatter plo...
[ { "code": null, "e": 1427, "s": 1062, "text": "Python provides various libraries to handle geographical and graph data. Python plotly is one of those libraries which are used to draw geographical graphs. Plotly is a free and open source library. Plotly helps to plot various kinds of graphs like Line...
C++ program to Find Sum of Natural Numbers using Recursion
The natural numbers are the positive integers starting from 1. The sequence of natural numbers is − 1, 2, 3, 4, 5, 6, 7, 8, 9, 10...... The program to find the sum of first n natural numbers using recursion is as follows. Live Demo #include <iostream> using namespace std; int sum(int n) { if(n == 0) return n; ...
[ { "code": null, "e": 1125, "s": 1062, "text": "The natural numbers are the positive integers starting from 1." }, { "code": null, "e": 1162, "s": 1125, "text": "The sequence of natural numbers is −" }, { "code": null, "e": 1198, "s": 1162, "text": "1, 2, 3, 4,...
Multiplication of two Matrices in Single line using Numpy in Python
Matrix multiplication is a lengthy process where each element from each row and column of the matrixes are to be multiplied and added in a certain way. For matrix multiplication, the number of columns in the first matrix must be equal to the number of rows in the second matrix. The result matrix has the number of rows ...
[ { "code": null, "e": 1443, "s": 1062, "text": "Matrix multiplication is a lengthy process where each element from each row and column of the matrixes are to be multiplied and added in a certain way. For matrix multiplication, the number of columns in the first matrix must be equal to the number of r...
Delete without head pointer | Practice | GeeksforGeeks
You are given a pointer/ reference to the node which is to be deleted from the linked list of N nodes. The task is to delete the node. Pointer/ reference to head node is not given. Note: No head reference is given to you. It is guaranteed that the node to be deleted is not a tail node in the linked list. Example 1: In...
[ { "code": null, "e": 545, "s": 238, "text": "You are given a pointer/ reference to the node which is to be deleted from the linked list of N nodes. The task is to delete the node. Pointer/ reference to head node is not given. \nNote: No head reference is given to you. It is guaranteed that the node ...
How to detect a new Android notification?
This example demonstrate about How to detect a new Android notification 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 src/MyListener.java public interface MyListener { void setValue (String packageNa...
[ { "code": null, "e": 1134, "s": 1062, "text": "This example demonstrate about How to detect a new Android notification" }, { "code": null, "e": 1263, "s": 1134, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to cre...
Easy string | Practice | GeeksforGeeks
You are given the string S . Compress the string when lower and upper cases are the same. In compressed string characters should be in lowercase. Example 1: Input: S = "aaABBb" Output: "3a3b" Explanation: As 'a' appears 3 times consecutively and 'b' also 3 times, and 'b' and 'B' considered as same. ​Example 2: Inp...
[ { "code": null, "e": 384, "s": 238, "text": "You are given the string S . Compress the string when lower and upper cases are the same. In compressed string characters should be in lowercase." }, { "code": null, "e": 395, "s": 384, "text": "Example 1:" }, { "code": null, ...
SQL Query to Get Yesterday and Tomorrow
08 Apr, 2021 Queries help the users to interact with a database for creating, insertion, deleting, updating data in a database with different queries. In this article let us see how to get yesterday and tomorrow with respect to the given dates in the database. Example – Given date: 2021-03-23Yesterday: 2021-03-22 Monda...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Apr, 2021" }, { "code": null, "e": 166, "s": 28, "text": "Queries help the users to interact with a database for creating, insertion, deleting, updating data in a database with different queries." }, { "code": null, "e": ...
How to get the Highlighted/Selected text in JavaScript?
15 Mar, 2021 There may be a need to find out the text selected/highlighted by the user. It can be done very easily using the window and document objects and their properties. Handling selected text is different for different browsers. The ways to get selected text are shown below: Example-1: By using window.getSelectio...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Mar, 2021" }, { "code": null, "e": 297, "s": 28, "text": "There may be a need to find out the text selected/highlighted by the user. It can be done very easily using the window and document objects and their properties. Handling sele...
Convert a NumPy array to an image
02 Sep, 2020 NumPy Or numeric python is a popular library for array manipulation. Since images are just an array of pixels carrying various color codes. NumPy can be used to convert an array into image. Apart from NumPy we will be using PIL or Python Image Library also known as Pillow to manipulate and save arrays. App...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Sep, 2020" }, { "code": null, "e": 332, "s": 28, "text": "NumPy Or numeric python is a popular library for array manipulation. Since images are just an array of pixels carrying various color codes. NumPy can be used to convert an arr...
Implement Various Types of Partitions in Quick Sort in Java
07 Aug, 2021 Quicksort is a Divide and Conquer Algorithm that is used for sorting the elements. In this algorithm, we choose a pivot and partitions the given array according to the pivot. Quicksort algorithm is a mostly used algorithm because this algorithm is cache-friendly and performs in-place sorting of the element...
[ { "code": null, "e": 54, "s": 26, "text": "\n07 Aug, 2021" }, { "code": null, "e": 419, "s": 54, "text": "Quicksort is a Divide and Conquer Algorithm that is used for sorting the elements. In this algorithm, we choose a pivot and partitions the given array according to the pivot....
PostgreSQL – ALTER DATABASE
22 Feb, 2021 PostgreSQL has an ALTER DATABASE statement that is used for modifying an existing database. The features of a database, once created can be changed using the ALTER DATABASE statement. Syntax: ALTER DATABASE target_database action; As the above syntax depicts, the database where modifications are to be don...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Feb, 2021" }, { "code": null, "e": 213, "s": 28, "text": "PostgreSQL has an ALTER DATABASE statement that is used for modifying an existing database. The features of a database, once created can be changed using the ALTER DATABASE st...
How to convert image into base64 string using JavaScript ?
12 Apr, 2021 Approach : Here we will create a gfg.js file which will include or JavaScript code and one gfg.html file. Now we will put onchange on input type and this will execute a function imageUploaded() when you upload an image. Now we will use file reader and use onload event in file reader than we will get imag...
[ { "code": null, "e": 52, "s": 24, "text": "\n12 Apr, 2021" }, { "code": null, "e": 63, "s": 52, "text": "Approach :" }, { "code": null, "e": 158, "s": 63, "text": "Here we will create a gfg.js file which will include or JavaScript code and one gfg.html file." ...
Transaction Management
14 Feb, 2022 Transactions in DBMS : Transactions are a set of operations used to perform a logical set of work. A transaction usually means that the data in the database has changed. One of the major uses of DBMS is to protect the user’s data from system failures. It is done by ensuring that all the data is restored to...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 Feb, 2022" }, { "code": null, "e": 575, "s": 54, "text": "Transactions in DBMS : Transactions are a set of operations used to perform a logical set of work. A transaction usually means that the data in the database has changed. One ...
How to Implement Pagination in Android RecyclerView using Volley?
26 Feb, 2021 Pagination is one of the most important factors which helps to reduce the loading time inside our app and increase the performance of our data which is represented in the form of Lists. In this article, we will take a look at adding pagination in our Android RecyclerView. And to get the data from API we ar...
[ { "code": null, "e": 52, "s": 24, "text": "\n26 Feb, 2021" }, { "code": null, "e": 395, "s": 52, "text": "Pagination is one of the most important factors which helps to reduce the loading time inside our app and increase the performance of our data which is represented in the for...
How HashTable Works Internally in Java?
03 Jun, 2021 Hashtable is a kind of Hash map but is synchronized. Hash map is non–synchronized, permits one null key & multiple null values, not-thread safe i.e. cannot share between many threads without proper synchronization, the key/values pairs are stored in Hashtable. The Hash table does not allow null value/key....
[ { "code": null, "e": 53, "s": 25, "text": "\n03 Jun, 2021" }, { "code": null, "e": 706, "s": 53, "text": "Hashtable is a kind of Hash map but is synchronized. Hash map is non–synchronized, permits one null key & multiple null values, not-thread safe i.e. cannot share between many...
Compute Density of the Distribution Function in R Programming – dunif() Function
30 Jun, 2020 dunif() function in R Language is used to provide the density of the distribution function. Syntax:dunif(x, min = 0, max = 1, log = FALSE) Parameters:x: represents vectormin, max: represents lower and upper limits of the distributionlog: represents logical value for probabilities Example 1: # Create vector...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jun, 2020" }, { "code": null, "e": 120, "s": 28, "text": "dunif() function in R Language is used to provide the density of the distribution function." }, { "code": null, "e": 167, "s": 120, "text": "Syntax:dunif(x...
Program to count occurrence of a given character in a string
25 May, 2022 Given a string and a character, the task is to make a function which count occurrence of the given character in the string. Examples: Input : str = "geeksforgeeks" c = 'e' Output : 4 'e' appears four times in str. Input : str = "abccdefgaa" c = 'a' Output : 3 'a' appears three times...
[ { "code": null, "e": 53, "s": 25, "text": "\n25 May, 2022" }, { "code": null, "e": 178, "s": 53, "text": "Given a string and a character, the task is to make a function which count occurrence of the given character in the string. " }, { "code": null, "e": 190, "s"...
Encrypt the string – 2
28 Jul, 2021 Given a string S consisting of N, lower case English alphabet, it is also given that a string is encrypted by first replacing every substring of the string consisting of the same character with the concatenation of that character and the hexadecimal representation of the size of the substring and then reve...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jul, 2021" }, { "code": null, "e": 401, "s": 28, "text": "Given a string S consisting of N, lower case English alphabet, it is also given that a string is encrypted by first replacing every substring of the string consisting of the s...
Sort string of characters
06 Jul, 2022 Given a string of lowercase characters from ‘a’ – ‘z’. We need to write a program to print the characters of this string in sorted order.Examples: Input : bbccdefbbaa Output : aabbbbccdef Input : geeksforgeeks Output : eeeefggkkorss A simple approach will be to use sorting algorithms like quick sort ...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jul, 2022" }, { "code": null, "e": 201, "s": 52, "text": "Given a string of lowercase characters from ‘a’ – ‘z’. We need to write a program to print the characters of this string in sorted order.Examples: " }, { "code": nul...
How to convert Image to Byte Array in java?
Java provides ImageIO class for reading and writing an image. To convert an image to a byte array – Read the image using the read() method of the ImageIO class. Create a ByteArrayOutputStream object. Write the image to the ByteArrayOutputStream object created above using the write() method of the ImageIO class. Finally...
[ { "code": null, "e": 1162, "s": 1062, "text": "Java provides ImageIO class for reading and writing an image. To convert an image to a byte array –" }, { "code": null, "e": 1223, "s": 1162, "text": "Read the image using the read() method of the ImageIO class." }, { "code":...
Using pandas crosstab to create a bar plot - GeeksforGeeks
11 Jan, 2022 In this article, we will discuss how to create a bar plot by using pandas crosstab in Python. First Lets us know more about the crosstab, It is a simple cross-tabulation of two or more variables. It is a simple cross-tabulation that help us to understand the relationship between two or more variable. It wi...
[ { "code": null, "e": 25690, "s": 25662, "text": "\n11 Jan, 2022" }, { "code": null, "e": 25886, "s": 25690, "text": "In this article, we will discuss how to create a bar plot by using pandas crosstab in Python. First Lets us know more about the crosstab, It is a simple cross-tabu...
Print pyramid of GeeksforGeeks in PL/SQL - GeeksforGeeks
30 Jul, 2021 PL/SQL is a block-structured language that enables developers to combine the power of SQL with procedural statements. All the statements of a block are passed to the oracle engine all at once which increases processing speed and decreases the traffic.PL/SQL extends SQL by adding constructs found in procedu...
[ { "code": null, "e": 24772, "s": 24744, "text": "\n30 Jul, 2021" }, { "code": null, "e": 25280, "s": 24772, "text": "PL/SQL is a block-structured language that enables developers to combine the power of SQL with procedural statements. All the statements of a block are passed to t...
Magical String in C++
Suppose there is a string. That string is called a magical string S, that consists of only '1' and '2' and obeys the following rules − The string S is magical because concatenating the number of contiguous occurrences of characters '1' and '2' generates the string S itself. The first few components of string S is the f...
[ { "code": null, "e": 1197, "s": 1062, "text": "Suppose there is a string. That string is called a magical string S, that consists of only '1' and '2' and obeys the following rules −" }, { "code": null, "e": 1337, "s": 1197, "text": "The string S is magical because concatenating t...
Java catch Keyword
❮ Java Keywords If an error occur, use try...catch to catch the error and execute some code to handle it: try { int[] myNumbers = {1, 2, 3}; System.out.println(myNumbers[10]); } catch (Exception e) { System.out.println("Something went wrong."); } Try it Yourself » The catch keyword catches exceptions generate...
[ { "code": null, "e": 18, "s": 0, "text": "\n❮ Java Keywords\n" }, { "code": null, "e": 108, "s": 18, "text": "If an error occur, use try...catch to catch the error and execute some code to handle it:" }, { "code": null, "e": 256, "s": 108, "text": "try {\n in...
Output of Java Programs | Set 32 - GeeksforGeeks
11 Sep, 2017 Prerequisite : Arrays in Java Question 1. What is the output of following program? class ArrayDemo {public static void main(String[] args) { int arr1[] = { 1, 2, 3, 4, 5 }; int arr2[5] = { 1, 2, 3, 4, 5 }; for (int i = 0; i < 5; i++) System.out.print(arr1[i] + " "); ...
[ { "code": null, "e": 24440, "s": 24412, "text": "\n11 Sep, 2017" }, { "code": null, "e": 24470, "s": 24440, "text": "Prerequisite : Arrays in Java" }, { "code": null, "e": 24523, "s": 24470, "text": "Question 1. What is the output of following program?" }, ...
PyQt5 – How to change border style of MainWindow ? - GeeksforGeeks
26 Mar, 2020 When we create a window in PyQt5, by default, there is no special type of border to it. But we change the style, thickness as well as color of the main window by using setStyleSheet() method. Below is how normal border vs styled border looks like Syntax : self.setStyleSheet(“border : 3px dashed blue;”) Ar...
[ { "code": null, "e": 24928, "s": 24900, "text": "\n26 Mar, 2020" }, { "code": null, "e": 25120, "s": 24928, "text": "When we create a window in PyQt5, by default, there is no special type of border to it. But we change the style, thickness as well as color of the main window by u...
Class getSuperclass() method in Java with Examples - GeeksforGeeks
27 Jan, 2022 The getSuperclass() method of java.lang.Class class is used to get the super class of this entity. This entity can be a class, an array, an interface, etc. The method returns the super class of this entity.Syntax: public Class<T> getSuperclass() Parameter: This method does not accept any parameter.Return...
[ { "code": null, "e": 24090, "s": 24062, "text": "\n27 Jan, 2022" }, { "code": null, "e": 24306, "s": 24090, "text": "The getSuperclass() method of java.lang.Class class is used to get the super class of this entity. This entity can be a class, an array, an interface, etc. The met...
EDA exploratory data analysis R Analytics python | Towards Data Science
While working on a Data Science or Machine Learning project or assignment, we have all felt the urge to fast-forward to the model building and prediction stage. However, as our mentors and experts reiterate, the initial Exploratory Data Analysis (EDA) phase is crucial to get better outcomes from the later stages of tra...
[ { "code": null, "e": 656, "s": 171, "text": "While working on a Data Science or Machine Learning project or assignment, we have all felt the urge to fast-forward to the model building and prediction stage. However, as our mentors and experts reiterate, the initial Exploratory Data Analysis (EDA) pha...
Converting Row into list RDD in PySpark
18 Jul, 2021 In this article, we are going to convert Row into a list RDD in Pyspark. Creating RDD from Row for demonstration: Python3 # import Row and SparkSessionfrom pyspark.sql import SparkSession, Row # create sparksessionspark = SparkSession.builder.appName('SparkByExamples.com').getOrCreate() # create student ...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Jul, 2021" }, { "code": null, "e": 101, "s": 28, "text": "In this article, we are going to convert Row into a list RDD in Pyspark." }, { "code": null, "e": 142, "s": 101, "text": "Creating RDD from Row for demonst...
How to Build Image Filters like Instagram in Android?
21 Jan, 2021 Now a day many social media apps provide so many filters that we can use to make our image inside the app more beautiful and attractive. This type of feature is generally seen in Instagram, Snapchat, and many socials media apps. In this article, we will take a look at the implementation of this Instagram-l...
[ { "code": null, "e": 54, "s": 26, "text": "\n21 Jan, 2021" }, { "code": null, "e": 393, "s": 54, "text": "Now a day many social media apps provide so many filters that we can use to make our image inside the app more beautiful and attractive. This type of feature is generally see...
LocalTime of() method in Java with Examples
05 Jun, 2020 The of(int hour, int minute) method of the LocalTime class in Java is used to create an instance of LocalTime from the passed values of hour and minute. In this method, the hour and minute are passed in the Integer format and it returns time-based on these values. The values of second and nanosecond are se...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Jun, 2020" }, { "code": null, "e": 4583, "s": 28, "text": "The of(int hour, int minute) method of the LocalTime class in Java is used to create an instance of LocalTime from the passed values of hour and minute. In this method, the h...
jQuery UI Button icon Option
22 Mar, 2021 jQuery UI consists of GUI widgets, visual effects, and themes implemented using HTML, CSS, and jQuery. jQuery UI is great for building UI interfaces for the webpages. The jQuery UI Button icon option is used to add an icon inside button element. Syntax: $( ".selector" ).button({ icon: "ui-icon-gear" }); ...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Mar, 2021" }, { "code": null, "e": 274, "s": 28, "text": "jQuery UI consists of GUI widgets, visual effects, and themes implemented using HTML, CSS, and jQuery. jQuery UI is great for building UI interfaces for the webpages. The jQue...
ZonedDateTime truncatedTo() method in Java with Examples
17 Dec, 2018 The truncatedTo() method of a ZonedDateTime class is used to return the value of this ZonedDateTime in the specified unit. This method takes a parameter Unit, which is the Unit in which this ZonedDateTime is to be truncated to. It returns a truncated immutable ZonedDateTime with the value in the specified ...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Dec, 2018" }, { "code": null, "e": 341, "s": 28, "text": "The truncatedTo() method of a ZonedDateTime class is used to return the value of this ZonedDateTime in the specified unit. This method takes a parameter Unit, which is the Uni...