title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
SWING - JCheckBox Class
The class JCheckBox is an implementation of a check box - an item that can be selected or deselected, and which displays its state to the user. Following is the declaration for javax.swing.JCheckBox class − public class JCheckBox extends JToggleButton implements Accessible Following are the fields for javax.s...
[ { "code": null, "e": 1907, "s": 1763, "text": "The class JCheckBox is an implementation of a check box - an item that can be selected or deselected, and which displays its state to the user." }, { "code": null, "e": 1970, "s": 1907, "text": "Following is the declaration for javax...
3 bit Synchronous Down Counter - GeeksforGeeks
19 May, 2021 Prerequisite : Counter , Synchronous counter. 3 bit Synchronous Down Counter : In synchronous counter clock is provided to all the flip-flops simultaneously. Circuit becomes complex as the number of states increases. Speed is high. Design : The steps involves in design are 1. Decide the number of Flip f...
[ { "code": null, "e": 24035, "s": 24007, "text": "\n19 May, 2021" }, { "code": null, "e": 24081, "s": 24035, "text": "Prerequisite : Counter , Synchronous counter." }, { "code": null, "e": 24114, "s": 24081, "text": "3 bit Synchronous Down Counter :" }, { ...
ios good() function in C++ with Examples - GeeksforGeeks
02 Sep, 2019 The good() method of ios class in C++ is used to check if the stream is good enough to work. It means that this function will check if this stream has raised any error or not. Syntax: bool good() const; Parameters: This method does not accept any parameter. Return Value: This method returns true if the st...
[ { "code": null, "e": 23707, "s": 23679, "text": "\n02 Sep, 2019" }, { "code": null, "e": 23883, "s": 23707, "text": "The good() method of ios class in C++ is used to check if the stream is good enough to work. It means that this function will check if this stream has raised any e...
Graph Theory | Rooting a Tree. Today, we are going to see how we can... | by Kelvin Jose | Towards Data Science
Today, we are going to see how we can root a tree. This is the 8th post of my ongoing series Graph Theory : Go Hero. You should definitely check out the index page to deep dive into Graphs and related problems. I mostly try to come up with new posts of this series in every weekends. Let’s see how rooting is done. This ...
[ { "code": null, "e": 486, "s": 171, "text": "Today, we are going to see how we can root a tree. This is the 8th post of my ongoing series Graph Theory : Go Hero. You should definitely check out the index page to deep dive into Graphs and related problems. I mostly try to come up with new posts of th...
Kotlin When Expressions
Instead of writing many if..else expressions, you can use the when expression, which is much easier to read. It is used to select one of many code blocks to be executed: Use the weekday number to calculate the weekday name: val day = 4 val result = when (day) { 1 -> "Monday" 2 -> "Tuesday" 3 -> "Wednesday" 4 ...
[ { "code": null, "e": 110, "s": 0, "text": "Instead of writing many if..else expressions, you can use the when \nexpression, which is much easier to read." }, { "code": null, "e": 171, "s": 110, "text": "It is used to select one of many code blocks to be executed:" }, { "c...
Matlab - Matrix - GeeksforGeeks
21 Feb, 2022 A Matrix is a two-dimensional array of elements. In MATLAB, the matrix is created by assigning the array elements that are delimited by spaces or commas and using semicolons to mark the end of each row. Now let’s have a glance at some examples to understand it better. Syntax: a = [elements; elements] Exam...
[ { "code": null, "e": 24434, "s": 24406, "text": "\n21 Feb, 2022" }, { "code": null, "e": 24704, "s": 24434, "text": "A Matrix is a two-dimensional array of elements. In MATLAB, the matrix is created by assigning the array elements that are delimited by spaces or commas and using...
Assertions in Python 3
An assertion is a sanity-check that you can turn on or turn off when you are done with your testing of the program. The easiest way to think of an assertion is to liken it to a raise-if statement (or to be more accurate, a raise-if-not statement). An expression is tested, and if the result comes up false, an exception...
[ { "code": null, "e": 2457, "s": 2340, "text": "An assertion is a sanity-check that you can turn on or turn off when you are done with your testing of the program." }, { "code": null, "e": 2672, "s": 2457, "text": "The easiest way to think of an assertion is to liken it to a rais...
Absolute Difference of all pairwise consecutive elements in an array - GeeksforGeeks
26 Oct, 2021 Given an array of integers of N elements. The task is to print the absolute difference of all of the pairwise consecutive elements.Pairwise consecutive pairs of an array of size N are (a[i], a[i+1]) for all i ranging from 0 to N-2Examples: Input: arr[] = {8, 5, 4, 3, 15, 20} Output: 3, 1, 1, 12, 5 Input...
[ { "code": null, "e": 24878, "s": 24850, "text": "\n26 Oct, 2021" }, { "code": null, "e": 25120, "s": 24878, "text": "Given an array of integers of N elements. The task is to print the absolute difference of all of the pairwise consecutive elements.Pairwise consecutive pairs of an...
Essential guide to Impute Missing Values in a single line of Python code | by Satyam Kumar | Towards Data Science
A real-world dataset often has a lot of missing records that may be caused due to data corruption or failure to record the values. To train a robust machine learning model handling of missing values is essential during the feature engineering pipeline. There are various imputation strategies that can be used to impute ...
[ { "code": null, "e": 425, "s": 172, "text": "A real-world dataset often has a lot of missing records that may be caused due to data corruption or failure to record the values. To train a robust machine learning model handling of missing values is essential during the feature engineering pipeline." ...
HSQLDB - Indexes
A database index is a data structure that improves the speed of operations in a table. Indexes can be created using one or more columns, providing the basis for both rapid random lookups and efficient ordering of access to the records. While creating an index, it should be considered what are the columns which will be ...
[ { "code": null, "e": 2218, "s": 1982, "text": "A database index is a data structure that improves the speed of operations in a table. Indexes can be created using one or more columns, providing the basis for both rapid random lookups and efficient ordering of access to the records." }, { "co...
HTTP headers | Content-Language - GeeksforGeeks
23 Oct, 2019 HTTP headers are used to provide additional information in HTTP request and HTTP response. HTTP headers Content-Language is used to define, which language speaker document is intended to. It doesn’t define the language of the document. In case this header is not specified, it is assumed that the document i...
[ { "code": null, "e": 24181, "s": 24153, "text": "\n23 Oct, 2019" }, { "code": null, "e": 24526, "s": 24181, "text": "HTTP headers are used to provide additional information in HTTP request and HTTP response. HTTP headers Content-Language is used to define, which language speaker ...
Malware Classification using Machine Learning | by Arpan Das | Towards Data Science
If you love to explore large and challenging data sets, then probably you should give Microsoft Malware Classification a try. Before diving deep in to the problem let’s take few points on what can you expect to learn from this: How to handle large scale data? Total train data set consist of 200 GB data out of which 50 ...
[ { "code": null, "e": 400, "s": 172, "text": "If you love to explore large and challenging data sets, then probably you should give Microsoft Malware Classification a try. Before diving deep in to the problem let’s take few points on what can you expect to learn from this:" }, { "code": null,...
Voting System Project Using Django Framework - GeeksforGeeks
04 Sep, 2021 Project Title: Pollster (Voting System) web application using Django frameworkType of Application (Category): Web application. Introduction: We will create a pollster (voting system) web application using Django. This application will conduct a series of questions along with many choices. A user will be al...
[ { "code": null, "e": 25807, "s": 25779, "text": "\n04 Sep, 2021" }, { "code": null, "e": 25934, "s": 25807, "text": "Project Title: Pollster (Voting System) web application using Django frameworkType of Application (Category): Web application." }, { "code": null, "e":...
Kotlin if-else expression - GeeksforGeeks
09 Sep, 2021 Decision Making in programming is similar to decision making in real life. In programming too, a certain block of code needs to be executed when some condition is fulfilled.A programming language uses control statements to control the flow of execution of program based on certain conditions.If condition is...
[ { "code": null, "e": 25447, "s": 25419, "text": "\n09 Sep, 2021" }, { "code": null, "e": 25895, "s": 25447, "text": "Decision Making in programming is similar to decision making in real life. In programming too, a certain block of code needs to be executed when some condition is ...
Need help selecting non-empty column values from MySQL?
Select non-empty column values using NOT IS NULL and TRIM() function. The syntax is as follows. SELECT * FROM yourTableName WHERE yourColumnName IS NOT NULL AND TRIM(yourColumnName) <> ' '; You can select non-empty value as well as whitespace from column using the same TRIM() function. To understand the syntax we discu...
[ { "code": null, "e": 1158, "s": 1062, "text": "Select non-empty column values using NOT IS NULL and TRIM() function. The syntax is as follows." }, { "code": null, "e": 1252, "s": 1158, "text": "SELECT * FROM yourTableName WHERE yourColumnName IS NOT NULL AND TRIM(yourColumnName) ...
Remove Leading Zeros from a String in C#
Let’s say the following is our string with leading zeros. String str ="000234"; Use the TrimStart() method and set the 0 to remove it. TrimStart(new Char[] { '0' } ) The following is the complete code to remove leading zeros. Live Demo using System; class Program { static void Main() { String str ="000234".T...
[ { "code": null, "e": 1120, "s": 1062, "text": "Let’s say the following is our string with leading zeros." }, { "code": null, "e": 1142, "s": 1120, "text": "String str =\"000234\";" }, { "code": null, "e": 1197, "s": 1142, "text": "Use the TrimStart() method an...
Find XOR of all elements in an Array - GeeksforGeeks
22 Mar, 2022 Given an array arr[] containing integers of size N, the task is to find the XOR of this array.Examples: Input: arr[] = {2, 4, 7} Output: 1 Explanation: XOR of the array = 2 ^ 4 ^ 7 = 1Input: arr[] = { 3, 9, 12, 13, 15 } Output: 4 Approach: In order to find the XOR of all elements in the array, we sim...
[ { "code": null, "e": 26608, "s": 26580, "text": "\n22 Mar, 2022" }, { "code": null, "e": 26714, "s": 26608, "text": "Given an array arr[] containing integers of size N, the task is to find the XOR of this array.Examples: " }, { "code": null, "e": 26842, "s": 2671...
Apache POI - Fonts
This chapter explains how to set different fonts, apply styles, and display text in different angles of direction in an Excel spreadsheet. Every system comes bundled with a huge collection of fonts such as Arial, Impact, Times New Roman, etc. The collection can also be updated with new fonts, if required. Similarly the...
[ { "code": null, "e": 2043, "s": 1904, "text": "This chapter explains how to set different fonts, apply styles, and display text in different angles of direction in an Excel spreadsheet." }, { "code": null, "e": 2339, "s": 2043, "text": "Every system comes bundled with a huge coll...
PHP mysqli_connect_error() Function
During the attempt to connect to a MySQL server, if an occurs, the mysqli_connect_error() function returns the description of the error occurred (during the last connect call). mysqli_connect_error() This method doesn't accept any parameters. PHP mysqli_connect_error() function returns an string value representing the...
[ { "code": null, "e": 3068, "s": 2891, "text": "During the attempt to connect to a MySQL server, if an occurs, the mysqli_connect_error() function returns the description of the error occurred (during the last connect call)." }, { "code": null, "e": 3092, "s": 3068, "text": "mysql...
CIL or MSIL | Microsoft Intermediate Language or Common Intermediate Language
30 Apr, 2019 The Microsoft Intermediate Language (MSIL), also known as the Common Intermediate Language (CIL) is a set of instructions that are platform independent and are generated by the language-specific compiler from the source code. The MSIL is platform independent and consequently, it can be executed on any of t...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 Apr, 2019" }, { "code": null, "e": 755, "s": 54, "text": "The Microsoft Intermediate Language (MSIL), also known as the Common Intermediate Language (CIL) is a set of instructions that are platform independent and are generated by t...
Python – Find union of multiple sets
02 Feb, 2021 Given multiple sets list, the task is to write a Python program to find union of each set. Examples: Input : test_list = [{4, 3, 5, 2}, {8, 4, 7, 2}, {1, 2, 3, 4}, {9, 5, 3, 7}] Output : {1, 2, 3, 4, 5, 7, 8, 9} Explanation : All elements from all sets included. Duplicates removed. Input : test_list = [{4,...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Feb, 2021" }, { "code": null, "e": 119, "s": 28, "text": "Given multiple sets list, the task is to write a Python program to find union of each set." }, { "code": null, "e": 129, "s": 119, "text": "Examples:" },...
Storing money amounts in MySQL?
To store money amounts in MySQL, the best choice is to use DECIMAL data type or NUMERIC type. Float data type is not a good choice for money amounts. It gives some rounding errors. Therefore, avoid float for money amounts. Let us first create a table with data type DECIMAL. The following is the query to create a table ...
[ { "code": null, "e": 1285, "s": 1062, "text": "To store money amounts in MySQL, the best choice is to use DECIMAL data type or NUMERIC type. Float data type is not a good choice for money amounts. It gives some rounding errors. Therefore, avoid float for money amounts." }, { "code": null, ...
An intuitive approach to DTW — Dynamic Time Warping | by Himanshu Chandra | Towards Data Science
Since you are here, I assume you already know the reason why we use Dynamic Time Warping, or DTW in time-series data. Simply put, it’s used to align or match two similar patterns. One of the reasons DTW was initially developed was for speech recognition. Your mother may speak slowly one day, and hurriedly on another; e...
[ { "code": null, "e": 352, "s": 172, "text": "Since you are here, I assume you already know the reason why we use Dynamic Time Warping, or DTW in time-series data. Simply put, it’s used to align or match two similar patterns." }, { "code": null, "e": 767, "s": 352, "text": "One of...
Is it mandatory to override the default methods of an interface in Java?
The default methods are introduced in an interface since Java8. Unlike other abstract methods these are the methods can have a default implementation. If you have default method in an interface, it is not mandatory to override (provide body) it in the classes that are already implementing this interface. In short, you ...
[ { "code": null, "e": 1368, "s": 1062, "text": "The default methods are introduced in an interface since Java8. Unlike other abstract methods these are the methods can have a default implementation. If you have default method in an interface, it is not mandatory to override (provide body) it in the c...
React Native - State
The data inside React Components is managed by state and props. In this chapter, we will talk about state. The state is mutable while props are immutable. This means that state can be updated in the future while props cannot be updated. This is our root component. We are just importing Home which will be used in most o...
[ { "code": null, "e": 2451, "s": 2344, "text": "The data inside React Components is managed by state and props. In this chapter, we will talk about state." }, { "code": null, "e": 2581, "s": 2451, "text": "The state is mutable while props are immutable. This means that state can b...
How can we delete multiple rows from a MySQL table?
We can use DELETE statement along with a WHERE clause, which identifies those multiple rows, to delete multiple rows from MySQL table. mysql> Select * from names; +------+-----------+ | id | name | +------+-----------+ | 1 | Rahul | | 2 | Gaurav | | 3 | Raman | | 5 | Ram | +------+--...
[ { "code": null, "e": 1197, "s": 1062, "text": "We can use DELETE statement along with a WHERE clause, which identifies those multiple rows, to delete multiple rows from MySQL table." }, { "code": null, "e": 1495, "s": 1197, "text": "mysql> Select * from names;\n+------+----------...
How to create a subset of matrix in R using greater than or less than a certain value of a column?
Subsetting can be required in many different ways, we can say that there might be infinite number of ways for subsetting as it depends on the objective of the bigger or smaller analysis. One such way is subsetting a matrix based on a certain value of column of the matrix. In R, we can easily do the same with the help o...
[ { "code": null, "e": 1427, "s": 1062, "text": "Subsetting can be required in many different ways, we can say that there might be infinite number of ways for subsetting as it depends on the objective of the bigger or smaller analysis. One such way is subsetting a matrix based on a certain value of co...
Difference between Early and Late Binding in Java - GeeksforGeeks
17 Jun, 2019 Early Binding: The binding which can be resolved at compile time by the compiler is known as static or early binding. Binding of all the static, private and final methods is done at compile-time. Example: public class NewClass { public static class superclass { static void print() { ...
[ { "code": null, "e": 24804, "s": 24776, "text": "\n17 Jun, 2019" }, { "code": null, "e": 25000, "s": 24804, "text": "Early Binding: The binding which can be resolved at compile time by the compiler is known as static or early binding. Binding of all the static, private and final ...
JavaScript modules
Modules were introduced in ES 2015. Modules were introduced to break over code into smaller pieces. The modules could contain classes or functions in them. Keywords export and import are used to export variables, functions, objects and import them in other files. Note − To run this example you will need to run a localh...
[ { "code": null, "e": 1326, "s": 1062, "text": "Modules were introduced in ES 2015. Modules were introduced to break over code into smaller pieces. The modules could contain classes or functions in them. Keywords export and import are used to export variables, functions, objects and import them in ot...
DFS of Graph | Practice | GeeksforGeeks
Given a connected undirected graph. Perform a Depth First Traversal of the graph. Note: Use recursive approach to find the DFS traversal of the graph starting from the 0th vertex from left to right according to the graph.. Example 1: Input: Output: 0 1 2 4 3 Explanation: 0 is connected to 1, 2, 4. 1 is connected to ...
[ { "code": null, "e": 461, "s": 238, "text": "Given a connected undirected graph. Perform a Depth First Traversal of the graph.\nNote: Use recursive approach to find the DFS traversal of the graph starting from the 0th vertex from left to right according to the graph.." }, { "code": null, ...
Implement and set DOUBLE length in MySQL
To implement DOUBLE in MySQL, the syntax is as follows − create table yourTableName ( yourColumnName double(5,2) unsigned ); Let us first create a table − mysql> create table DemoTable1814 ( Amount double(5,2) unsigned ); Query OK, 0 rows affected (0.00 sec) Insert some records in the table usi...
[ { "code": null, "e": 1119, "s": 1062, "text": "To implement DOUBLE in MySQL, the syntax is as follows −" }, { "code": null, "e": 1197, "s": 1119, "text": "create table yourTableName\n (\n yourColumnName double(5,2) unsigned\n);" }, { "code": null, "e": 1227, ...
HTML5 - datetime
A date and time (year, month, day, hour, minute, second, fractions of a second) encoded according to ISO 8601 with the time zone set to UTC. <!DOCTYPE HTML> <html> <body> <form action = "/cgi-bin/html5.cgi" method = "get"> Date and Time : <input type = "datetime" name = "newinput" /> ...
[ { "code": null, "e": 2749, "s": 2608, "text": "A date and time (year, month, day, hour, minute, second, fractions of a second) encoded according to ISO 8601 with the time zone set to UTC." }, { "code": null, "e": 3011, "s": 2749, "text": "<!DOCTYPE HTML>\n<html>\n \n <body>\n...
JavaFX | Group Class - GeeksforGeeks
10 Sep, 2018 Group class is a part of JavaFX. A Group contains the number of nodes. A Group will take on the collective bounds of its children and is not directly resizable. Group class inherits Parent class. Constructor of the class: Group(): Constructs a new group.Group(Collection children): Constructs a new group wi...
[ { "code": null, "e": 24048, "s": 24020, "text": "\n10 Sep, 2018" }, { "code": null, "e": 24244, "s": 24048, "text": "Group class is a part of JavaFX. A Group contains the number of nodes. A Group will take on the collective bounds of its children and is not directly resizable. Gr...
A Simple Approach To Templated SQL Queries In Python | by Sergei Izrailev | Towards Data Science
There are numerous situations in which one would want to insert parameters in a SQL query, and there are many ways to implement templated SQL queries in python. Without going into comparing different approaches, this post explains a simple and effective method for parameterizing SQL using JinjaSql. Besides many powerfu...
[ { "code": null, "e": 820, "s": 171, "text": "There are numerous situations in which one would want to insert parameters in a SQL query, and there are many ways to implement templated SQL queries in python. Without going into comparing different approaches, this post explains a simple and effective m...
How to copy a String into another String in C#
To copy a String into another String, the code is as follows − Live Demo using System; public class Demo { static public void Main(){ string str1 = "Kevin"; string str2 = String.Copy(str1); Console.WriteLine("String1 = "+str1); Console.WriteLine("String2 = "+str2); } } This will produce t...
[ { "code": null, "e": 1125, "s": 1062, "text": "To copy a String into another String, the code is as follows −" }, { "code": null, "e": 1136, "s": 1125, "text": " Live Demo" }, { "code": null, "e": 1363, "s": 1136, "text": "using System;\npublic class Demo {\n ...
GATE | GATE-CS-2006 | Question 59 - GeeksforGeeks
15 Sep, 2021 Consider the following translation scheme.S → ERR → *E{print(“*”);}R | εE → F + E {print(“+”);} | FF → (S) | id {print(id.value);}Here id is a token that represents an integer and id.value represents the corresponding integer value. For an input ‘2 * 3 + 4’, this translation scheme prints(A) 2 * 3 + 4(B) 2...
[ { "code": null, "e": 24456, "s": 24428, "text": "\n15 Sep, 2021" }, { "code": null, "e": 24918, "s": 24456, "text": "Consider the following translation scheme.S → ERR → *E{print(“*”);}R | εE → F + E {print(“+”);} | FF → (S) | id {print(id.value);}Here id is a token that represent...
nested if statement in java
It is always legal to nest if-else statements which means you can use one if or else if statement inside another if or else if statement. The syntax for a nested if...else is as follows − if(Boolean_expression 1) { // Executes when the Boolean expression 1 is true if(Boolean_expression 2) { // Executes when...
[ { "code": null, "e": 2515, "s": 2377, "text": "It is always legal to nest if-else statements which means you can use one if or else if statement inside another if or else if statement." }, { "code": null, "e": 2565, "s": 2515, "text": "The syntax for a nested if...else is as foll...
D3.js selection.text() Function - GeeksforGeeks
23 Aug, 2020 The selection.text() function in d3.js is used to set the text content to the specified value of the selected elements thus, it replaces any existing child elements. If the value that is given is constant than all elements will be given that constant value. Syntax: selection.text([value]); Parameters: Thi...
[ { "code": null, "e": 24306, "s": 24278, "text": "\n23 Aug, 2020" }, { "code": null, "e": 24564, "s": 24306, "text": "The selection.text() function in d3.js is used to set the text content to the specified value of the selected elements thus, it replaces any existing child element...
SWING - JWindow Class
The class JWindow is a container that can be displayed but does not have the title bar or window-management buttons. Following is the declaration for javax.swing.JWindow class − public class JWindow extends Window implements Accessible, RootPaneContainer Following are the fields for java.awt.Component class −...
[ { "code": null, "e": 1880, "s": 1763, "text": "The class JWindow is a container that can be displayed but does not have the title bar or window-management buttons." }, { "code": null, "e": 1941, "s": 1880, "text": "Following is the declaration for javax.swing.JWindow class −" }...
Merge 3 Sorted Arrays - GeeksforGeeks
26 Apr, 2022 Given 3 arrays (A, B, C) which are sorted in ascending order, we are required to merge them together in ascending order and output the array D. Examples: Input : A = [1, 2, 3, 4, 5] B = [2, 3, 4] C = [4, 5, 6, 7]Output : D = [1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 7] Input : A = [1, 2, 3, 5] ...
[ { "code": null, "e": 24766, "s": 24738, "text": "\n26 Apr, 2022" }, { "code": null, "e": 24911, "s": 24766, "text": "Given 3 arrays (A, B, C) which are sorted in ascending order, we are required to merge them together in ascending order and output the array D. " }, { "cod...
How to make Analysis Tool with Python | Towards Data Science
Since the new policy in October last year, Medium calculates the earnings differently and updates them daily. Before the change, it was based on the number of claps from members and the amount that they themselves clap in general, but now it is based on reading time. Similar to youtube’s algorithm, which is watch time....
[ { "code": null, "e": 492, "s": 171, "text": "Since the new policy in October last year, Medium calculates the earnings differently and updates them daily. Before the change, it was based on the number of claps from members and the amount that they themselves clap in general, but now it is based on r...
XPath - Predicate
Predicate refers to the XPath expression written in square brackets. It refers to restrict the selected nodes in a node set for some condition. For example, /class/student[1] Select first student element which is child of the class element. /class/student[last()] Select last student element which is child of the class ...
[ { "code": null, "e": 1886, "s": 1729, "text": "Predicate refers to the XPath expression written in square brackets. It refers to restrict the selected nodes in a node set for some condition. For example," }, { "code": null, "e": 1904, "s": 1886, "text": "/class/student[1]" }, ...
3 tips to handle timestamps in C. A concise guide to deal with time zones | by Mario Emmanuel | Towards Data Science
Whoever has handled timestamps with timezones in time series analysis has always faced some headache. No matter how many times I deal with time series, which in my case invariantly involves dealing with time zones, I always have to revisit how it works because it is often counter-intuitive. Working with time series oft...
[ { "code": null, "e": 464, "s": 172, "text": "Whoever has handled timestamps with timezones in time series analysis has always faced some headache. No matter how many times I deal with time series, which in my case invariantly involves dealing with time zones, I always have to revisit how it works be...
MySQL - Clone Tables
There may be a situation when you need an exact copy of a table and CREATE TABLE ... SELECT doesn't suit your purposes because the copy must include the same indexes, default values and so forth. You can handle this situation by following the steps given below − Use SHOW CREATE TABLE to get a CREATE TABLE statement tha...
[ { "code": null, "e": 2529, "s": 2333, "text": "There may be a situation when you need an exact copy of a table and CREATE TABLE ... SELECT doesn't suit your purposes because the copy must include the same indexes, default values and so forth." }, { "code": null, "e": 2596, "s": 2529,...
Android Custom Component with Custom Attributes
Following example shows you how to define a simple Android custom component with custom attributes. Following is the content of the modified main activity file src/com.example.dateviewdemo/MainActivity.java. This file can include each of the fundamental lifecycle methods. package com.example.dateviewdemo; import andro...
[ { "code": null, "e": 3707, "s": 3607, "text": "Following example shows you how to define a simple Android custom component with custom attributes." }, { "code": null, "e": 3880, "s": 3707, "text": "Following is the content of the modified main activity file src/com.example.datevi...
C++ Program for Recursive Bubble Sort - GeeksforGeeks
28 Jun, 2021 Background :Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order.Following is iterative Bubble sort algorithm : // Iterative Bubble Sort bubbleSort(arr[], n) { for (i = 0; i < n-1; i++) // Last i elements are already ...
[ { "code": null, "e": 24631, "s": 24603, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24819, "s": 24631, "text": "Background :Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order.Following is iterative...
How to plot multiple data columns in a DataFrame? - GeeksforGeeks
30 Dec, 2021 Prerequisites: Pandas Python comes with a lot of useful packages such as pandas, matplotlib, numpy etc. To use dataframe, we need pandas library and to plot columns of a dataframe, we require matplotlib. Pandas has a tight integration with Matplotlib. You can plot data directly from your DataFrame using th...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n30 Dec, 2021" }, { "code": null, "e": 24314, "s": 24292, "text": "Prerequisites: Pandas" }, { "code": null, "e": 24617, "s": 24314, "text": "Python comes with a lot of useful packages such as pandas, matplotli...
Count of interesting primes upto N - GeeksforGeeks
24 Nov, 2021 Given a number N, the task is to find the number of interesting primes less than equal to N.An interesting prime is any prime number which can be written as a2 + b4, where a and b are positive integers. For e.g. The smallest interesting prime number is 2 = 12 + 14. Examples: Input: N = 10 Output: 2 2 = 1...
[ { "code": null, "e": 24692, "s": 24664, "text": "\n24 Nov, 2021" }, { "code": null, "e": 24959, "s": 24692, "text": "Given a number N, the task is to find the number of interesting primes less than equal to N.An interesting prime is any prime number which can be written as a2 + b...
How to read data from a file stored in XAMPP webserver using PHP ? - GeeksforGeeks
01 Dec, 2020 We have given a file stored on XAMPP server and the task is to read the file from server and display the file content on the screen using PHP. We use some PHP functions to solve this problem. File: A file is set of data stored in a disk in different formats. For example – .txt, .exe, .pdf etc fopen() func...
[ { "code": null, "e": 24972, "s": 24944, "text": "\n01 Dec, 2020" }, { "code": null, "e": 25164, "s": 24972, "text": "We have given a file stored on XAMPP server and the task is to read the file from server and display the file content on the screen using PHP. We use some PHP func...
Display default initial values of DataTypes in Java
To display default initial values of a datatype, you need to just declare a variable of the same datatype and display it. The following is a Java program to display initial values of DataTypes. Live Demo public class Demo { boolean t; byte b; short s; int i; long l; float f; double d; void Disp...
[ { "code": null, "e": 1184, "s": 1062, "text": "To display default initial values of a datatype, you need to just declare a variable of the same datatype and display it." }, { "code": null, "e": 1256, "s": 1184, "text": "The following is a Java program to display initial values of...
Check if the number is divisible 43 or not - GeeksforGeeks
24 Nov, 2021 Given a number N, the task is to check whether the number is divisible by 43 or not. Examples: Input: N = 2795 Output: yes Explanation: 43 * 65 = 2795Input: N = 11094 Output: yes Explanation: 43 * 258 = 11094 Approach: The divisibility test of 43 is: Extract the last digit.Add 13 * last digit from ...
[ { "code": null, "e": 25526, "s": 25498, "text": "\n24 Nov, 2021" }, { "code": null, "e": 25623, "s": 25526, "text": "Given a number N, the task is to check whether the number is divisible by 43 or not. Examples: " }, { "code": null, "e": 25739, "s": 25623, "t...
C program to print the ASCII values in a string.
An array of characters is called a string. Given below is the declaration of a string − char stringname [size]; For example, char string[50]; string of length 50 characters. Using single character constant. char string[10] = { ‘H’, ‘e’, ‘l’, ‘l’, ‘o’ ,‘\0’} Using string constants. char string[10] = “Hello”:; There is a...
[ { "code": null, "e": 1105, "s": 1062, "text": "An array of characters is called a string." }, { "code": null, "e": 1150, "s": 1105, "text": "Given below is the declaration of a string −" }, { "code": null, "e": 1174, "s": 1150, "text": "char stringname [size];...
C library function - strftime()
The C library function size_t strftime(char *str, size_t maxsize, const char *format, const struct tm *timeptr) formats the time represented in the structure timeptr according to the formatting rules defined in format and stored into str. Following is the declaration for strftime() function. size_t strftime(char *str, ...
[ { "code": null, "e": 2246, "s": 2007, "text": "The C library function size_t strftime(char *str, size_t maxsize, const char *format, const struct tm *timeptr) formats the time represented in the structure timeptr according to the formatting rules defined in format and stored into str." }, { ...
Boosting your data science workflow with vim+tmux | by Grégoire Hornung | Towards Data Science
Like most of my peers, I started my career in data science working with the Jupyter ecosystem. Jupyter is a great environment, easy to set up, which offers useful built-in features. At some points, I nevertheless felt that I needed to move beyond. Some limitations, inherent to notebooks, started to kill my productivity...
[ { "code": null, "e": 353, "s": 171, "text": "Like most of my peers, I started my career in data science working with the Jupyter ecosystem. Jupyter is a great environment, easy to set up, which offers useful built-in features." }, { "code": null, "e": 513, "s": 353, "text": "At s...
SAP ABAP - Quick Guide
ABAP stands for Advanced Business Application Programming, a 4GL (4th generation) language. Currently it is positioned, along with Java, as the main language for SAP application server programming. Let's start with the high level architecture of SAP system. The 3-tier Client/Server architecture of a typical SAP system ...
[ { "code": null, "e": 3096, "s": 2898, "text": "ABAP stands for Advanced Business Application Programming, a 4GL (4th generation) language. Currently it is positioned, along with Java, as the main language for SAP application server programming." }, { "code": null, "e": 3242, "s": 309...
Sum of all natural numbers in range L to R - GeeksforGeeks
05 Apr, 2021 Given a range L and R, the task is to find the sum of all natural numbers in range L to R. Examples: Input: L = 2, R = 5 Output: 14 2 + 3 + 4 + 5 = 14 Input: L = 10, R = 20 Output: 165 A naive approach is to traverse from L to R and add all the elements one by one to get the sum.An efficient approach ...
[ { "code": null, "e": 24301, "s": 24273, "text": "\n05 Apr, 2021" }, { "code": null, "e": 24404, "s": 24301, "text": "Given a range L and R, the task is to find the sum of all natural numbers in range L to R. Examples: " }, { "code": null, "e": 24489, "s": 24404, ...
Extracting information from XML files into a Pandas dataframe | by Parul Pandey | Towards Data Science
Real-world data is messy, and we know it. Not only does such data require a lot of cleaning, a lot of times, the format in which we receive data is also not suited for analysis. This means that before the analysis even begins, the data has to undergo a series of transformations to get it into a suitable format — a form...
[ { "code": null, "e": 910, "s": 172, "text": "Real-world data is messy, and we know it. Not only does such data require a lot of cleaning, a lot of times, the format in which we receive data is also not suited for analysis. This means that before the analysis even begins, the data has to undergo a se...
Check if both halves of a string are Palindrome or not - GeeksforGeeks
02 Feb, 2022 Given a string str, the task is to check whether the given string can be split into two halves, each of which is palindromic. If it is possible, print Yes. Otherwise, print No.Examples: Input: str = “naan” Output: No Explanation: Since both halves “na” and “an” are not palindrome.Input: momdad Output: Ye...
[ { "code": null, "e": 24961, "s": 24933, "text": "\n02 Feb, 2022" }, { "code": null, "e": 25149, "s": 24961, "text": "Given a string str, the task is to check whether the given string can be split into two halves, each of which is palindromic. If it is possible, print Yes. Otherwi...
Python Pandas - Merge DataFrame with indicator value
To merge Pandas DataFrame, use the merge() function. In that, you can set the parameter indicator to True or False. If you want to check which dataframe has a specific record, then use − indicator= True As shown above, using above parameter as True, adds a column to the output DataFrame called “_merge”. At first, let u...
[ { "code": null, "e": 1249, "s": 1062, "text": "To merge Pandas DataFrame, use the merge() function. In that, you can set the parameter indicator to True or False. If you want to check which dataframe has a specific record, then use −" }, { "code": null, "e": 1265, "s": 1249, "tex...
C++ String Library - empty
It returns whether the string is empty (i.e. whether its length is 0). Following is the declaration for std::string::empty. bool empty() const; bool empty() const noexcept; none it returns true if the string length is 0, false otherwise. if an exception is thrown, there are no changes in the string. In below example fo...
[ { "code": null, "e": 2674, "s": 2603, "text": "It returns whether the string is empty (i.e. whether its length is 0)." }, { "code": null, "e": 2727, "s": 2674, "text": "Following is the declaration for std::string::empty." }, { "code": null, "e": 2747, "s": 2727, ...
Sequential Parallel Transitions
Following is the program which demonstrates Sequential Transition in JavaFX. Save this code in a file with the name SequentialTransitionExample.java. import javafx.animation.PathTransition; import javafx.animation.ScaleTransition; import javafx.animation.SequentialTransition; import javafx.animation.TranslateTransit...
[ { "code": null, "e": 2050, "s": 1900, "text": "Following is the program which demonstrates Sequential Transition in JavaFX. Save this code in a file with the name SequentialTransitionExample.java." }, { "code": null, "e": 6516, "s": 2050, "text": "import javafx.animation.PathTran...
Java Program to Set Minimum and Maximum Heap Size - GeeksforGeeks
09 Jun, 2021 The Heap area is one of the various memory areas present inside the JVM. For every JVM one heap area is available. The Heap area will be created at the time of the JVM startup. Objects and the corresponding instance variable will be stored in the heap area. Every array in java is the object only, hence th...
[ { "code": null, "e": 23582, "s": 23554, "text": "\n09 Jun, 2021" }, { "code": null, "e": 24078, "s": 23582, "text": "The Heap area is one of the various memory areas present inside the JVM. For every JVM one heap area is available. The Heap area will be created at the time of th...
Powershell - If Else Statement
An if statement can be followed by an optional else statement, which executes when the Boolean expression is false. Following is the syntax of an if...else statement − if(Boolean_expression) { // Executes when the Boolean expression is true }else { // Executes when the Boolean expression is false } If the boolea...
[ { "code": null, "e": 2150, "s": 2034, "text": "An if statement can be followed by an optional else statement, which executes when the Boolean expression is false." }, { "code": null, "e": 2202, "s": 2150, "text": "Following is the syntax of an if...else statement −" }, { ...
Write a program in Python to filter armstrong numbers in a given series
Assume you have a series and the result for filtering armstrong numbers, original series is 0 153 1 323 2 371 3 420 4 500 dtype: int64 Armstrong numbers are:- 0 153 2 371 dtype: int64 To solve this, we will follow the steps given below − Define a series. Define a series. Create an empty list and se...
[ { "code": null, "e": 1135, "s": 1062, "text": "Assume you have a series and the result for filtering armstrong numbers," }, { "code": null, "e": 1267, "s": 1135, "text": "original series is\n0 153\n1 323\n2 371\n3 420\n4 500\ndtype: int64\nArmstrong numbers are:-\n...
Matplotlib – Date manipulation to show the year tick every 12 months
To make matplotlib date manipulation so that the year tick shows up every 12 months, we can take the following steps − Set the figure size and adjust the padding between and around the subplots. Create d, y, s, years, months, monthsFmt and yearsFmt using Pandas, Numpy and matplotlib dates. Use "%B" in DateFormatter to ...
[ { "code": null, "e": 1181, "s": 1062, "text": "To make matplotlib date manipulation so that the year tick shows up every 12 months, we can take the following steps −" }, { "code": null, "e": 1257, "s": 1181, "text": "Set the figure size and adjust the padding between and around t...
HTML DOM NodeList.forEach() Method - GeeksforGeeks
24 Jul, 2020 The forEach() method of the NodeList interface calls the callback given in parameter once for each value pair in the list, in insertion order. Syntax: NodeList.forEach(callback, currentValue); Parameters: Callback: A function to execute on each element of NodeList. It accepts 3 parameters: currentValue: Th...
[ { "code": null, "e": 24622, "s": 24594, "text": "\n24 Jul, 2020" }, { "code": null, "e": 24765, "s": 24622, "text": "The forEach() method of the NodeList interface calls the callback given in parameter once for each value pair in the list, in insertion order." }, { "code"...
Create bar plot of one column in an R data frame using ggplot2.
To create bar plot of one column in an R data frame using ggplot2, we can use rownames of the data frame as x variable in aes. For Example, if we have a data frame called df that contains two columns say X and Y and we want to create the bar plot of values in Y then we can use the below mentioned command − ggplot(df,ae...
[ { "code": null, "e": 1189, "s": 1062, "text": "To create bar plot of one column in an R data frame using ggplot2, we can use\nrownames of the data frame as x variable in aes." }, { "code": null, "e": 1370, "s": 1189, "text": "For Example, if we have a data frame called df that co...
MySQLi - Insert Query
To insert data into a MySQL table, you would need to use the SQL INSERT INTO command. You can insert data into the MySQL table by using the mysql> prompt or by using any script like PHP. Here is a generic SQL syntax of INSERT INTO command to insert data into the MySQL table − INSERT INTO table_name ( field1, field2,.....
[ { "code": null, "e": 2450, "s": 2263, "text": "To insert data into a MySQL table, you would need to use the SQL INSERT INTO command. You can insert data into the MySQL table by using the mysql> prompt or by using any script like PHP." }, { "code": null, "e": 2541, "s": 2450, "tex...
What is abstraction in C#?
Abstraction and encapsulation are related features in object-oriented programming. Abstraction allows making relevant information visible and encapsulation enables a programmer to implement the desired level of abstraction. Abstraction can be achieved using abstract classes in C#. C# allows you to create abstract class...
[ { "code": null, "e": 1286, "s": 1062, "text": "Abstraction and encapsulation are related features in object-oriented programming. Abstraction allows making relevant information visible and encapsulation enables a programmer to implement the desired level of abstraction." }, { "code": null, ...
Erlang - Atoms
An atom is a literal, a constant with name. An atom is to be enclosed in single quotes (') if it does not begin with a lower-case letter or if it contains other characters than alphanumeric characters, underscore (_), or @. The following program is an example of how atoms can be used in Erlang. This program declares 3 ...
[ { "code": null, "e": 2525, "s": 2301, "text": "An atom is a literal, a constant with name. An atom is to be enclosed in single quotes (') if it does not begin with a lower-case letter or if it contains other characters than alphanumeric characters, underscore (_), or @." }, { "code": null, ...
C# | Get an ICollection containing values in OrderedDictionary - GeeksforGeeks
01 Feb, 2019 OrderedDictionary.Values property is used to get an ICollection object containing the values in the OrderedDictionary collection. Syntax: public System.Collections.ICollection Values { get; } Return Value: It returns an ICollection object containing the values in the OrderedDictionary collection. Below gi...
[ { "code": null, "e": 24302, "s": 24274, "text": "\n01 Feb, 2019" }, { "code": null, "e": 24432, "s": 24302, "text": "OrderedDictionary.Values property is used to get an ICollection object containing the values in the OrderedDictionary collection." }, { "code": null, "...
numpy.ravel_multi_index() function | Python - GeeksforGeeks
22 Apr, 2020 numpy.ravel_multi_index() function converts a tuple of index arrays into an array of flat indices, applying boundary modes to the multi-index. Syntax : numpy.ravel_multi_index(multi_index, dims, mode = ‘raise’, order = ‘C)Parameters :multi_index : [tuple of array_like] A tuple of integer arrays, one array ...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n22 Apr, 2020" }, { "code": null, "e": 24435, "s": 24292, "text": "numpy.ravel_multi_index() function converts a tuple of index arrays into an array of flat indices, applying boundary modes to the multi-index." }, { "code"...
Program to list of candidates who have got majority vote in python
Suppose we have a list of numbers called nums where each number represents a vote to a candidate. We have to find the ids of the candidates that have greater than floor(n/3) votes, in non-decreasing order. So, if the input is like nums = [3, 2, 6, 6, 6, 6, 7, 7, 7, 7, 7], then the output will be [6, 7], as 6 and 7 have...
[ { "code": null, "e": 1268, "s": 1062, "text": "Suppose we have a list of numbers called nums where each number represents a vote to a candidate. We have to find the ids of the candidates that have greater than floor(n/3) votes, in non-decreasing order." }, { "code": null, "e": 1401, ...
A Simple Guide To Command Line Arguments With ArgParse | by Sam Starkman | Towards Data Science
The standard Python library argparse used to incorporate the parsing of command line arguments. Instead of having to manually set variables inside of the code, argparse can be used to add flexibility and reusability to your code by allowing user input values to be parsed and utilized. Since argparse is part of the stan...
[ { "code": null, "e": 457, "s": 171, "text": "The standard Python library argparse used to incorporate the parsing of command line arguments. Instead of having to manually set variables inside of the code, argparse can be used to add flexibility and reusability to your code by allowing user input val...
Bulma | Pagination - GeeksforGeeks
29 Jun, 2020 Bulma is a FLexbox based open-source CSS framework and its completely free. It is component rich, compatible, and well documented. It is highly responsive in nature. It uses classes to implement its design.The ‘pagination’ is a component used to indicate the existence of a series of related content across ...
[ { "code": null, "e": 26108, "s": 26080, "text": "\n29 Jun, 2020" }, { "code": null, "e": 26653, "s": 26108, "text": "Bulma is a FLexbox based open-source CSS framework and its completely free. It is component rich, compatible, and well documented. It is highly responsive in natur...
Python and Oracle Cloud: loading data | by Luigi Saetta | Towards Data Science
Using OCI Python SDK and Autonomous DWH API you can easily load data for your Data Science and ML work In a previous article, I have explored how we can use Python and popular Open Source frameworks, like Pandas and scikit-learn, to analyze data stored with Oracle Autonomous Data Warehouse (ADWC). In this shorter story...
[ { "code": null, "e": 275, "s": 172, "text": "Using OCI Python SDK and Autonomous DWH API you can easily load data for your Data Science and ML work" }, { "code": null, "e": 579, "s": 275, "text": "In a previous article, I have explored how we can use Python and popular Open Sourc...
Remove all values from HashMap in Java
To remove all values from HashMap, use the clear() method. First, let us create a HashMap. HashMap hm = new HashMap(); Add some elements to the HashMap hm.put("Wallet", new Integer(700)); hm.put("Belt", new Integer(600)); hm.put("Backpack", new Integer(1200)); Now, remove all the elements hm.clear(); The following is a...
[ { "code": null, "e": 1121, "s": 1062, "text": "To remove all values from HashMap, use the clear() method." }, { "code": null, "e": 1153, "s": 1121, "text": "First, let us create a HashMap." }, { "code": null, "e": 1181, "s": 1153, "text": "HashMap hm = new Has...
Ways to Evaluate Regression Models | by Shravankumar Hiregoudar | Towards Data Science
Evaluation metrics; Mean/Median of predictionStandard Deviation of predictionRange of predictionCoefficient of Determination (R2)Relative Standard Deviation/Coefficient of Variation (RSD)Relative Squared Error (RSE)Mean Absolute Error (MAE)Relative Absolute Error (RAE)Mean Squared Error (MSE)Root Mean Squared Error on ...
[ { "code": null, "e": 191, "s": 171, "text": "Evaluation metrics;" }, { "code": null, "e": 603, "s": 191, "text": "Mean/Median of predictionStandard Deviation of predictionRange of predictionCoefficient of Determination (R2)Relative Standard Deviation/Coefficient of Variation (RSD...
How to dynamically add/remove/update labels in a Tkinter window?
We can use the Tkinter Label widget to display text and images. By configuring the label widget, we can dynamically change the text, images, and other properties of the widget. To dynamically update the Label widget, we can use either config(**options) or an inline configuration method such as for updating the text, we...
[ { "code": null, "e": 1239, "s": 1062, "text": "We can use the Tkinter Label widget to display text and images. By configuring the label widget, we can dynamically change the text, images, and other properties of the widget." }, { "code": null, "e": 1475, "s": 1239, "text": "To dy...
How to create a Vertical menu bar in Java?
Let us create a MenuBar − JMenuBar menuBar = new JMenuBar(); Now, set its layout to create a Vertical Menu Bar with GridLayout − menuBar.setLayout(new GridLayout(0,1)); The following is an example to create a Vertical menu bar in Java − package my; import java.awt.GridLayout; import java.awt.event.KeyEvent; import java...
[ { "code": null, "e": 1088, "s": 1062, "text": "Let us create a MenuBar −" }, { "code": null, "e": 1123, "s": 1088, "text": "JMenuBar menuBar = new JMenuBar();" }, { "code": null, "e": 1191, "s": 1123, "text": "Now, set its layout to create a Vertical Menu Bar ...
HTML - keygen Tag
The HTML <keygen> tag is used to process Web forms with certificate management systems. The element generates a secure key and submits the public key. <!DOCTYPE html> <html> <head> <title>HTML keygen Tag</title> </head> <body> <form> <keygen name = "random_key" challenge = "0987654321"> ...
[ { "code": null, "e": 2525, "s": 2374, "text": "The HTML <keygen> tag is used to process Web forms with certificate management systems. The element generates a secure key and submits the public key." }, { "code": null, "e": 2785, "s": 2525, "text": "<!DOCTYPE html>\n<html>\n\n <...
Match the elements of an array in a MySQL query
Let us first create a table table − mysql> create table DemoTable1523 -> ( -> Id int, -> Value int -> ); Query OK, 0 rows affected (0.76 sec) Insert some records in the table using insert command − mysql> insert into DemoTable1523 values(1,56); Query OK, 1 row affected (0.15 sec) mysql> insert into DemoTabl...
[ { "code": null, "e": 1098, "s": 1062, "text": "Let us first create a table table −" }, { "code": null, "e": 1216, "s": 1098, "text": "mysql> create table DemoTable1523\n -> (\n -> Id int,\n -> Value int\n -> );\nQuery OK, 0 rows affected (0.76 sec)" }, { "code": n...
Jython - Servlets
A Java servlet is the most widely used web development technique. We can use Jython to write servlets and this adds many more advantages beyond what Java has to offer because now we can make use of the Python language features as well. We shall use the NetBeans IDE to develop a Java web application with a Jython servle...
[ { "code": null, "e": 2317, "s": 2081, "text": "A Java servlet is the most widely used web development technique. We can use Jython to write servlets and this adds many more advantages beyond what Java has to offer because now we can make use of the Python language features as well." }, { "co...
Boosting Python Scripts With Cython (Applied on Raspberry Pi) | by Ahmed Gad | Towards Data Science
Python might be one of today’s most popular programming languages, but it’s definitely not the most efficient. In the machine learning world in particular, practitioners sacrifice efficiency for the ease-of-use that Python offers. That doesn’t mean that you can’t speed things up in other ways. Cython is an easy way to ...
[ { "code": null, "e": 403, "s": 172, "text": "Python might be one of today’s most popular programming languages, but it’s definitely not the most efficient. In the machine learning world in particular, practitioners sacrifice efficiency for the ease-of-use that Python offers." }, { "code": nu...
W3.CSS - Modal Dialog
W3.CSS can be used to display a customizable modal dialog box instead of the standard JavaScript alert. It uses w3-row and w3-col style classes to define rows and columns respectively. modal-dialog Represents the main parent window to define a dialog box. w3-modal-dialog Represents the dialog content container. w3-moda...
[ { "code": null, "e": 2013, "s": 1909, "text": "W3.CSS can be used to display a customizable modal dialog box instead of the standard JavaScript alert." }, { "code": null, "e": 2094, "s": 2013, "text": "It uses w3-row and w3-col style classes to define rows and columns respectivel...
Autowire byName in Spring | Spring Bean Autowire byName Example
PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC EXCEPTIONS COLLECTIONS SWING JDBC JAVA 8 SPRING SPRING BOOT HIBERNATE PYTHON PHP JQUERY PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws In this tutorial, we are going to learn about...
[ { "code": null, "e": 158, "s": 123, "text": "PROGRAMMINGJava ExamplesC Examples" }, { "code": null, "e": 172, "s": 158, "text": "Java Examples" }, { "code": null, "e": 183, "s": 172, "text": "C Examples" }, { "code": null, "e": 195, "s": 183, ...
Flask – Templates
It is possible to return the output of a function bound to a certain URL in the form of HTML. For instance, in the following script, hello() function will render ‘Hello World’ with <h1> tag attached to it. from flask import Flask app = Flask(__name__) @app.route('/') def index(): return '<html><body><h1>Hello World...
[ { "code": null, "e": 2239, "s": 2033, "text": "It is possible to return the output of a function bound to a certain URL in the form of HTML. For instance, in the following script, hello() function will render ‘Hello World’ with <h1> tag attached to it." }, { "code": null, "e": 2427, ...
MomentJS - Day of week
This method will get/set the day of the week. It takes input from 0-6, where 0 is for Sunday and 6 as Saturday. If the value is greater than the range, it will fall in the next week. You can set the day of week using number or string. moment().day(Number|String); moment().day(); moment().days(Number|String); moment().d...
[ { "code": null, "e": 2195, "s": 1960, "text": "This method will get/set the day of the week. It takes input from 0-6, where 0 is for Sunday and 6 as Saturday. If the value is greater than the range, it will fall in the next week. You can set the day of week using number or string." }, { "cod...
Equation of ellipse from its focus, directrix, and eccentricity - GeeksforGeeks
09 Apr, 2021 Given focus(x, y), directrix(ax + by + c) and eccentricity e of an ellipse, the task is to find the equation of ellipse using its focus, directrix, and eccentricity.Examples: Input: x1 = 1, y1 = 1, a = 1, b = -1, c = 3, e = 0.5 Output: 1.75 x^2 + 1.75 y^2 + -5.50 x + -2.50 y + 0.50 xy + 1.75 = 0 Input: ...
[ { "code": null, "e": 25204, "s": 25176, "text": "\n09 Apr, 2021" }, { "code": null, "e": 25381, "s": 25204, "text": "Given focus(x, y), directrix(ax + by + c) and eccentricity e of an ellipse, the task is to find the equation of ellipse using its focus, directrix, and eccentricit...
Sort in C++ Standard Template Library (STL)
Here we will see how to use the sort() function of C++ STL to sort an array So if the array is like A = [52, 14, 85, 63, 99, 54, 21], then the output will be [14 21 52 54 63 85 99]. To sort we will use the sort() function, that is present in the header file <algorithm>. The code is like below − Live Demo #include <ios...
[ { "code": null, "e": 1358, "s": 1062, "text": "Here we will see how to use the sort() function of C++ STL to sort an array So if the array is like A = [52, 14, 85, 63, 99, 54, 21], then the output will be [14 21 52 54 63 85 99]. To sort we will use the sort() function, that is present in the header ...
Getting console.log output from Chrome with Selenium Python API bindings.
We can get console.log output from Chrome with Selenium Python API bindings. We will perform this with the DesiredCapabilities class. We shall enable the logging from the browser with DesiredCapabilities.Chrome setting. We have to pass this browser capability to the driver object by passing it as a parameter to the Chr...
[ { "code": null, "e": 1282, "s": 1062, "text": "We can get console.log output from Chrome with Selenium Python API bindings. We will perform this with the DesiredCapabilities class. We shall enable the logging from the browser with DesiredCapabilities.Chrome setting." }, { "code": null, "...
Returning a value even if there is no result in a MySQL query?
You can use IFNULL() function from MySQL to return a value even if there is not result. Let us create a table. Te query to create a table. mysql> create table IfNullDemo −> ( −> Id int, −> Name varchar(100) −> ); Query OK, 0 rows affected (0.60 sec) Insert some records in the table with the help of insert c...
[ { "code": null, "e": 1201, "s": 1062, "text": "You can use IFNULL() function from MySQL to return a value even if there is not result. Let us create a table. Te query to create a table." }, { "code": null, "e": 1324, "s": 1201, "text": "mysql> create table IfNullDemo\n −> (\n ...
Reverse Linked List II in C++
Suppose we have a linked list. We have to reverse the nodes from position m to n. We have to do it in one pass. So if the list is [1,2,3,4,5] and m = 2 and n = 4, then the result will be [1,4,,3,2,5] Let us see the steps − There will be two methods, the reverseN() and reverseBetween(). The reverseBetween() will work as...
[ { "code": null, "e": 1262, "s": 1062, "text": "Suppose we have a linked list. We have to reverse the nodes from position m to n. We have to do it in one pass. So if the list is [1,2,3,4,5] and m = 2 and n = 4, then the result will be [1,4,,3,2,5]" }, { "code": null, "e": 1285, "s": 1...
Add Interactive Slider to Bokeh Plots - GeeksforGeeks
28 Jul, 2021 Bokeh is an interactive Data visualization library of Python. It can be used to create interactive plots, dashboards, and data applications. Widgets are nothing but additional visual elements that you can add to your plots to interactively control your Bokeh document. There are various types of widgets suc...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n28 Jul, 2021" }, { "code": null, "e": 24313, "s": 23901, "text": "Bokeh is an interactive Data visualization library of Python. It can be used to create interactive plots, dashboards, and data applications. Widgets are nothing bu...
Ext.js - Quick Guide
Ext JS is a popular JavaScript framework which provides rich UI for building web applications with cross-browser functionality. Ext JS is basically used for creating desktop applications. It supports all the modern browsers such as IE6+, FF, Chrome, Safari 6+, Opera 12+, etc. Whereas another product of Sencha, Sencha T...
[ { "code": null, "e": 2381, "s": 2023, "text": "Ext JS is a popular JavaScript framework which provides rich UI for building web applications with cross-browser functionality. Ext JS is basically used for creating desktop applications. It supports all the modern browsers such as IE6+, FF, Chrome, Saf...
Predict Lead Score (the Right Way) Using PyCaret | by Moez Ali | Towards Data Science
Leads are the driving force of many businesses today. With the advancement of subscription-based business models particularly in the start-up space, the ability to convert leads into paying customers is key to survival. In simple terms, a “lead” represents a potential customer interested in buying your product/service....
[ { "code": null, "e": 493, "s": 172, "text": "Leads are the driving force of many businesses today. With the advancement of subscription-based business models particularly in the start-up space, the ability to convert leads into paying customers is key to survival. In simple terms, a “lead” represent...
Variable length arguments for Macros in C
We know that we can use variable length arguments for functions in C. For that we have to use ellipsis (...). Similarly for macros, we can use variable length arguments. Here also we have to include ellipsis, The ‘__VA_ARGS__’ is used to handle variable length arguments. Concatenation operator ‘##’ is used to concatena...
[ { "code": null, "e": 1409, "s": 1062, "text": "We know that we can use variable length arguments for functions in C. For that we have to use ellipsis (...). Similarly for macros, we can use variable length arguments. Here also we have to include ellipsis, The ‘__VA_ARGS__’ is used to handle variable...
Class getResourceAsStream() method in Java with Examples - GeeksforGeeks
27 Dec, 2019 The getResourceAsStream() method of java.lang.Class class is used to get the resource with the specified resource of this class. The method returns the specified resource of this class in the form of InputStream object. Syntax: public InputStream getResourceAsStream(String resourceName) Parameter: This me...
[ { "code": null, "e": 24672, "s": 24644, "text": "\n27 Dec, 2019" }, { "code": null, "e": 24892, "s": 24672, "text": "The getResourceAsStream() method of java.lang.Class class is used to get the resource with the specified resource of this class. The method returns the specified r...
Count triplets with sum smaller than X | Practice | GeeksforGeeks
Given an array arr[] of distinct integers of size N and a value sum, the task is to find the count of triplets (i, j, k), having (i<j<k) with the sum of (arr[i] + arr[j] + arr[k]) smaller than the given value sum. Example 1: Input: N = 4, sum = 2 arr[] = {-2, 0, 1, 3} Output: 2 Explanation: Below are triplets with ...
[ { "code": null, "e": 452, "s": 238, "text": "Given an array arr[] of distinct integers of size N and a value sum, the task is to find the count of triplets (i, j, k), having (i<j<k) with the sum of (arr[i] + arr[j] + arr[k]) smaller than the given value sum." }, { "code": null, "e": 464,...
C library function - toupper()
The C library function int toupper(int c) converts lowercase letter to uppercase. Following is the declaration for toupper() function. int toupper(int c); c − This is the letter to be converted to uppercase. c − This is the letter to be converted to uppercase. This function returns uppercase equivalent to c, if such va...
[ { "code": null, "e": 2089, "s": 2007, "text": "The C library function int toupper(int c) converts lowercase letter to uppercase." }, { "code": null, "e": 2142, "s": 2089, "text": "Following is the declaration for toupper() function." }, { "code": null, "e": 2162, ...