title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Inner reducing pattern printing - GeeksforGeeks
27 Dec, 2018 Given a number N, print the following pattern. Examples : Input : 4 Output : 4444444 4333334 4322234 4321234 4322234 4333334 4444444 Explanation: (1) Given value of n forms the outer-most rectangular box layer. (2) Value of n reduces by 1 and forms an ...
[ { "code": null, "e": 25465, "s": 25437, "text": "\n27 Dec, 2018" }, { "code": null, "e": 25512, "s": 25465, "text": "Given a number N, print the following pattern." }, { "code": null, "e": 25523, "s": 25512, "text": "Examples :" }, { "code": null, ...
EnumSet in Java - GeeksforGeeks
17 Jan, 2022 Enumerations or popularly known as enum serve the purpose of representing a group of named constants in a programming language. For example, the 4 suits in a deck of playing cards may be 4 enumerators named Club, Diamond, Heart, and Spade, belonging to an enumerated type named Suit. The EnumSet is one of t...
[ { "code": null, "e": 23830, "s": 23802, "text": "\n17 Jan, 2022" }, { "code": null, "e": 24114, "s": 23830, "text": "Enumerations or popularly known as enum serve the purpose of representing a group of named constants in a programming language. For example, the 4 suits in a deck ...
Animations of Multiple Linear Regression with Python | by Tobias Roeschl | Towards Data Science
In this article, we aim to expand our capabilities in visualizing gradient descent to Multiple Linear Regression. This is the follow-up article to “Gradient Descent Animation: 1. Simple linear regression”. Just as we did before, our goal is to set up a model, fit the model to our training data using batch gradient desc...
[ { "code": null, "e": 638, "s": 171, "text": "In this article, we aim to expand our capabilities in visualizing gradient descent to Multiple Linear Regression. This is the follow-up article to “Gradient Descent Animation: 1. Simple linear regression”. Just as we did before, our goal is to set up a mo...
How to create a regression model in R with interaction between all combinations of two variables?
The easiest way to create a regression model with interactions is inputting the variables with multiplication sign that is * but this will create many other combinations that are of higher order. If we want to create the interaction of two variables combinations then power operator can be used as shown in the below exa...
[ { "code": null, "e": 1389, "s": 1062, "text": "The easiest way to create a regression model with interactions is inputting the variables with multiplication sign that is * but this will create many other combinations that are of higher order. If we want to create the interaction of two variables com...
JavaFX Effects - Color Adjust
You can adjust the color of an image by applying the color adjust effect to it. This includes the adjustment of the Hue, Saturation, Brightness and Contrast on each pixel. The class named ColorAdjust of the package javafx.scene.effect represents the color adjust effect, this class contains five properties namely − inpu...
[ { "code": null, "e": 2072, "s": 1900, "text": "You can adjust the color of an image by applying the color adjust effect to it. This includes the adjustment of the Hue, Saturation, Brightness and Contrast on each pixel." }, { "code": null, "e": 2216, "s": 2072, "text": "The class ...
How to write a Python regular expression that matches floating point numbers?
The following code uses Python regex to match floating point numbers import re s = '234.6789' match = re.match(r'[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?',s) print match.group() s2 = '0.45' match = re.match(r'[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?',s2) print match.group() This gives the output 234.6789 0.45
[ { "code": null, "e": 1131, "s": 1062, "text": "The following code uses Python regex to match floating point numbers" }, { "code": null, "e": 1335, "s": 1131, "text": "import re\ns = '234.6789'\nmatch = re.match(r'[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?',s)\nprint match.grou...
C++ map having key as a user define data type
30 Mar, 2018 C++ map stores keys in ordered form (Note that it internally use a self balancing binary search tree). Ordering is internally done using operator ” < " So if we use our own data type as key, we must overload this operator for our data type. Let us consider a map having key data type as a structure and mapp...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 Mar, 2018" }, { "code": null, "e": 295, "s": 54, "text": "C++ map stores keys in ordered form (Note that it internally use a self balancing binary search tree). Ordering is internally done using operator ” < \" So if we use our own ...
C# - Continue Statement
The continue statement in C# works somewhat like the break statement. Instead of forcing termination, however, continue forces the next iteration of the loop to take place, skipping any code in between. For the for loop, continue statement causes the conditional test and increment portions of the loop to execute. For t...
[ { "code": null, "e": 2607, "s": 2404, "text": "The continue statement in C# works somewhat like the break statement. Instead of forcing termination, however, continue forces the next iteration of the loop to take place, skipping any code in between." }, { "code": null, "e": 2834, "s"...
How to Plot Predicted Values in R?
19 Dec, 2021 In this article, we will discuss how to plot predicted values in the R Programming Language. A linear model is used to predict the value of an unknown variable based on independent variables using the technique linear regression. It is mostly used for finding out the relationship between variables and fore...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Dec, 2021" }, { "code": null, "e": 121, "s": 28, "text": "In this article, we will discuss how to plot predicted values in the R Programming Language." }, { "code": null, "e": 634, "s": 121, "text": "A linear mode...
Why “0” is equal to false in JavaScript ?
27 Jun, 2019 In JavaScript “0” is equal to false because “0” is of type string but when it tested for equality the automatic type conversion of JavaScript comes into effect and converts the “0” to its numeric value which is 0 and as we know 0 represents false value. So, “0” equals to false. Example: This example illust...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Jun, 2019" }, { "code": null, "e": 307, "s": 28, "text": "In JavaScript “0” is equal to false because “0” is of type string but when it tested for equality the automatic type conversion of JavaScript comes into effect and converts th...
PostgreSQL – Constants
28 Aug, 2020 Unlike variables, the value of constants cannot be changed once initialized. The main purpose of the use of constants in PostgreSQL are: It makes the query more readable. It reduces the maintenance efforts. Syntax: constant_name CONSTANT data_type := expression; Let’s analyze the above syntax: First, spec...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Aug, 2020" }, { "code": null, "e": 165, "s": 28, "text": "Unlike variables, the value of constants cannot be changed once initialized. The main purpose of the use of constants in PostgreSQL are:" }, { "code": null, "e": 1...
Why the error Collection was modified; enumeration operation may not execute occurs and how to handle it in C#?
This error occurs when a looping process is being running on a collection (Ex: List) and the collection is modified (data added or removed) during the runtime. Live Demo using System; using System.Collections.Generic; namespace DemoApplication { public class Program { static void Main(string[] args) { ...
[ { "code": null, "e": 1347, "s": 1187, "text": "This error occurs when a looping process is being running on a collection (Ex: List) and the collection is modified (data added or removed) during the runtime." }, { "code": null, "e": 1358, "s": 1347, "text": " Live Demo" }, { ...
Node.js util.inspect() Method
28 Jul, 2020 The “util” module provides ‘utility’ functions that are used for debugging purposes. For accessing those functions we need to call them by ‘require(‘util’)’. The util.inspect() (Added in v0.3.0) method is an inbuilt application programming interface of the util module which is intended for debugging and re...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jul, 2020" }, { "code": null, "e": 186, "s": 28, "text": "The “util” module provides ‘utility’ functions that are used for debugging purposes. For accessing those functions we need to call them by ‘require(‘util’)’." }, { "co...
PostgreSQL – EXCEPT Operator
28 Aug, 2020 In PostgreSQL, the EXCEPT operator is used to return distinct rows from the first (left) query that are not in the output of the second (right) query while comparing result sets of two or more queries. Syntax: SELECT column_list FROM A WHERE condition_a EXCEPT SELECT column_list FROM B WHERE condition_b; ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Aug, 2020" }, { "code": null, "e": 230, "s": 28, "text": "In PostgreSQL, the EXCEPT operator is used to return distinct rows from the first (left) query that are not in the output of the second (right) query while comparing result se...
How to connect multiple MySQL databases on a single webpage ?
15 Jul, 2021 This article explains how to connect multiple MySQL databases into a single webpage. It is useful to access data from multiple databases. There are two methods to connect multiple MySQL databases into a single webpage which are: Using MySQLi (Improved version of MySQL) Using PDO (PHP Data Objects) Syntax...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Jul, 2021" }, { "code": null, "e": 167, "s": 28, "text": "This article explains how to connect multiple MySQL databases into a single webpage. It is useful to access data from multiple databases. " }, { "code": null, "e":...
C# | Math.Sin() Method
31 Jan, 2019 Math.Sin() is an inbuilt Math class method which returns the sine of a given double value argument(specified angle). Syntax: public static double Sin(double num) Parameter: num: It is the angle(measured in radian) whose sine is to be returned and the type of this parameter is System.Double. Return Value: R...
[ { "code": null, "e": 54, "s": 26, "text": "\n31 Jan, 2019" }, { "code": null, "e": 171, "s": 54, "text": "Math.Sin() is an inbuilt Math class method which returns the sine of a given double value argument(specified angle)." }, { "code": null, "e": 179, "s": 171, ...
Designing a RESTful API to interact with SQLite database
27 Apr, 2021 In this chapter, we will create Django API views for HTTP requests and will discuss how Django and Django REST framework process each HTTP request. Creating Django Views Routing URLs to Django views and functions Launching Django’s development server Making HTTP requests using the command-line tool Making...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Apr, 2021" }, { "code": null, "e": 177, "s": 28, "text": "In this chapter, we will create Django API views for HTTP requests and will discuss how Django and Django REST framework process each HTTP request. " }, { "code": null...
Count of Prime Nodes of a Singly Linked List - GeeksforGeeks
29 Oct, 2021 Given a singly linked list containing N nodes, the task is to find the total count of prime numbers. Examples: Input: List = 15 -> 5 -> 6 -> 10 -> 17 Output: 2 5 and 17 are the prime nodes Input: List = 29 -> 3 -> 4 -> 2 -> 9 Output: 3 2, 3 and 29 are the prime nodes Approach: The idea is to traverse t...
[ { "code": null, "e": 24770, "s": 24742, "text": "\n29 Oct, 2021" }, { "code": null, "e": 24871, "s": 24770, "text": "Given a singly linked list containing N nodes, the task is to find the total count of prime numbers." }, { "code": null, "e": 24882, "s": 24871, ...
How to set “value” to input web element using selenium?
We can set value to input webelement using Selenium webdriver. We can take the help of the sendKeys method to enter text to the input field. The value to be entered is passed as an argument to the method. driver.findElement(By.id("txtSearchText")).sendKeys("Selenium"); We can also perform web operations like entering t...
[ { "code": null, "e": 1267, "s": 1062, "text": "We can set value to input webelement using Selenium webdriver. We can take the help of the sendKeys method to enter text to the input field. The value to be entered is passed as an argument to the method." }, { "code": null, "e": 1332, "...
How to find an element using the attribute “id” in Selenium?
We can find an element using the attribute id with Selenium webdriver using the locators - id, css, or xpath. To identify the element with css, the expression should be tagname[id='value'] and the method to be used is By.cssSelector. To identify the element with xpath, the expression should be //tagname[@id='value']. T...
[ { "code": null, "e": 1296, "s": 1062, "text": "We can find an element using the attribute id with Selenium webdriver using the locators - id, css, or xpath. To identify the element with css, the expression should be tagname[id='value'] and the method to be used is By.cssSelector." }, { "code...
How to create a borderless fullscreen application using Python-3 Tkinter?
In order to make a Tkinter window borderless and full-screen, we can use the utility method attributes(‘-fullscreen’, True). Tkinter windows can be configured using functions and methods defined in the Tkinter library. Another similar method Tkinter provides to make the application window full-screen is, overrideredire...
[ { "code": null, "e": 1281, "s": 1062, "text": "In order to make a Tkinter window borderless and full-screen, we can use the utility method attributes(‘-fullscreen’, True). Tkinter windows can be configured using functions and methods defined in the Tkinter library." }, { "code": null, "e...
D3.js axis.tickFormat() Function - GeeksforGeeks
05 Aug, 2020 The d3.axis.tickFormat() Function in D3.js is used to control which ticks are labelled. This function is used to implement your own tick format function. Syntax: axis.tickFormat([format]) Parameters: This function accepts the following parameter. format: These parameters are format to set the tick format f...
[ { "code": null, "e": 24890, "s": 24862, "text": "\n05 Aug, 2020" }, { "code": null, "e": 25044, "s": 24890, "text": "The d3.axis.tickFormat() Function in D3.js is used to control which ticks are labelled. This function is used to implement your own tick format function." }, {...
C - Loops
You may encounter situations, when a block of code needs to be executed several number of times. In general, statements are executed sequentially: The first statement in a function is executed first, followed by the second, and so on. Programming languages provide various control structures that allow for more complica...
[ { "code": null, "e": 2319, "s": 2084, "text": "You may encounter situations, when a block of code needs to be executed several number of times. In general, statements are executed sequentially: The first statement in a function is executed first, followed by the second, and so on." }, { "cod...
How to avoid binding by using arrow functions in callbacks in ReactJS? - GeeksforGeeks
18 Feb, 2022 In React class-based components when we use event handler callbacks, it is very important to give special attention to the ‘this’ keyword. In these cases the context this is undefined when the callback function actually gets invoked that’s why we have to bind the context of this. Now if binding all the met...
[ { "code": null, "e": 27142, "s": 27114, "text": "\n18 Feb, 2022" }, { "code": null, "e": 27776, "s": 27142, "text": "In React class-based components when we use event handler callbacks, it is very important to give special attention to the ‘this’ keyword. In these cases the conte...
Odd even sort in an array - JavaScript
We are required to write a JavaScript function that takes in an array of numbers and sorts the array such that first all the even numbers appear in ascending order and then all the odd numbers appear in ascending order. For example: If the input array is − const arr = [2, 5, 2, 6, 7, 1, 8, 9]; Then the output should be...
[ { "code": null, "e": 1282, "s": 1062, "text": "We are required to write a JavaScript function that takes in an array of numbers and sorts the array such that first all the even numbers appear in ascending order and then all the odd numbers appear in ascending order." }, { "code": null, "...
How to use isEmpty() in Android textview?
This example demonstrate about How to use isEmpty() in Android textview. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <LinearLayout ...
[ { "code": null, "e": 1135, "s": 1062, "text": "This example demonstrate about How to use isEmpty() in Android textview." }, { "code": null, "e": 1264, "s": 1135, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to cr...
How to use an image as a link in HTML?
To use image as a link in HTML, use the <img> tag as well as the <a> tag with the href attribute. The <img> tag is for using an image in a web page and the <a> tag is for adding a link. Under the image tag src attribute, add the URL of the image. With that, also add the height and width. You can try to run the followin...
[ { "code": null, "e": 1351, "s": 1062, "text": "To use image as a link in HTML, use the <img> tag as well as the <a> tag with the href attribute. The <img> tag is for using an image in a web page and the <a> tag is for adding a link. Under the image tag src attribute, add the URL of the image. With t...
Program to find all possible IP address after restoration in C++
Suppose we have a string with only digits, we have to restore it by forming all possible valid IP address combinations. We know that a valid IP address consists of exactly four integers (each integer is in range 0 to 255) separated by single period symbol. So, if the input is like ip = "25525511136", then the output wi...
[ { "code": null, "e": 1319, "s": 1062, "text": "Suppose we have a string with only digits, we have to restore it by forming all possible valid IP address combinations. We know that a valid IP address consists of exactly four integers (each integer is in range 0 to 255) separated by single period symb...
How to use sys.argv in Python - GeeksforGeeks
27 Dec, 2019 Command line arguments are those values that are passed during calling of program along with the calling statement. Thus, the first element of the array sys.argv() is the name of the program itself. sys.argv() is an array for command line arguments in Python. To employ this module named “sys” is used. sys....
[ { "code": null, "e": 23835, "s": 23807, "text": "\n27 Dec, 2019" }, { "code": null, "e": 24223, "s": 23835, "text": "Command line arguments are those values that are passed during calling of program along with the calling statement. Thus, the first element of the array sys.argv()...
Binary Search Trees - GeeksforGeeks
06 Sep, 2021 10 / 20 / 30 / 40 Search 40. Delete 40 Insert 50. The following numbers are inserted into an empty binary search tree in the given order: 10, 1, 3, 5, 15, 12, 16. What is the height of the binary search tree (the height is the maximum distance of a leaf node f...
[ { "code": null, "e": 28855, "s": 28827, "text": "\n06 Sep, 2021" }, { "code": null, "e": 28952, "s": 28855, "text": " 10\n /\n 20\n /\n 30\n / \n 40\n\nSearch 40. \nDelete 40\nInsert 50.\n" }, { "code": null, "e": 29193, "s": 28...
C# | Get an ICollection containing the values in ListDictionary - GeeksforGeeks
01 Feb, 2019 ListDictionary.Values property is used to get an ICollection containing the values in the ListDictionary. Syntax: public System.Collections.ICollection Values { get; } Return Value : It returns an ICollection containing the values in the ListDictionary. Below are the programs to illustrate the use of List...
[ { "code": null, "e": 25833, "s": 25805, "text": "\n01 Feb, 2019" }, { "code": null, "e": 25939, "s": 25833, "text": "ListDictionary.Values property is used to get an ICollection containing the values in the ListDictionary." }, { "code": null, "e": 25947, "s": 2593...
std::stable_partition in C++ - GeeksforGeeks
05 Oct, 2017 The stable_partition( ) algorithm arranges the sequence defined by start and end such that all elements for which the predicate specified by pfn returns true come before those for which the predicate returns false. The partitioning is stable. This means that the relative ordering of the sequence is preserv...
[ { "code": null, "e": 25367, "s": 25339, "text": "\n05 Oct, 2017" }, { "code": null, "e": 25685, "s": 25367, "text": "The stable_partition( ) algorithm arranges the sequence defined by start and end such that all elements for which the predicate specified by pfn returns true come ...
D3.js | Path.arc() Function - GeeksforGeeks
22 Jun, 2020 D3.js is mostly used for making of graph and visualizing data on the HTML SVG elements. D3.js has many functions one of which is arc() function. The Path.arc() function is used to make a arc and a circle and other shapes. D3 stands for Data Driven Documents and mostly used for data visualization. Syntax: p...
[ { "code": null, "e": 25871, "s": 25843, "text": "\n22 Jun, 2020" }, { "code": null, "e": 26169, "s": 25871, "text": "D3.js is mostly used for making of graph and visualizing data on the HTML SVG elements. D3.js has many functions one of which is arc() function. The Path.arc() fun...
Recon-ng Information gathering tool in Kali Linux - GeeksforGeeks
16 Apr, 2021 Recon-ng is free and open source tool available on GitHub. Recon-ng is based upon Open Source Intelligence (OSINT), the easiest and useful tool for reconnaissance. Recon-ng interface is very similar to Metasploit 1 and Metasploit 2.Recon-ng provides a command-line interface that you can run on Kali Linux. ...
[ { "code": null, "e": 26022, "s": 25994, "text": "\n16 Apr, 2021" }, { "code": null, "e": 26824, "s": 26022, "text": "Recon-ng is free and open source tool available on GitHub. Recon-ng is based upon Open Source Intelligence (OSINT), the easiest and useful tool for reconnaissance....
Rope Cutting | Practice | GeeksforGeeks
You are given N ropes. A cut operation is performed on ropes such that all of them are reduced by the length of the smallest rope. Display the number of ropes left after every cut operation until the length of each rope is zero. Example 1: Input : arr[ ] = {5, 1, 1, 2, 3, 5} Output : 4 3 2 Explanation: In the first o...
[ { "code": null, "e": 467, "s": 238, "text": "You are given N ropes. A cut operation is performed on ropes such that all of them are reduced by the length of the smallest rope. Display the number of ropes left after every cut operation until the length of each rope is zero." }, { "code": null...
p5.js | getURL() Function - GeeksforGeeks
09 Jul, 2019 The getURL() function in p5.js is used to return the current URL. Syntax: getURL() Parameters: This function does not accept any parameter. Return Value: It returns the current URL string. Below program illustrates the getURL() function in p5.js: Example: // Declare a URL variablelet url; // Function to s...
[ { "code": null, "e": 26627, "s": 26599, "text": "\n09 Jul, 2019" }, { "code": null, "e": 26693, "s": 26627, "text": "The getURL() function in p5.js is used to return the current URL." }, { "code": null, "e": 26701, "s": 26693, "text": "Syntax:" }, { "c...
JQuery | isEmptyObject() method - GeeksforGeeks
27 Apr, 2020 This isEmptyObject() Method in jQuery is used to determines if an object is empty. Syntax: jQuery.isEmptyObject( object ) Parameters: The isEmptyObject() method accepts only one parameter that is mentioned above and described below: object : This parameter is the object that will be checked to see if it’s...
[ { "code": null, "e": 26442, "s": 26414, "text": "\n27 Apr, 2020" }, { "code": null, "e": 26525, "s": 26442, "text": "This isEmptyObject() Method in jQuery is used to determines if an object is empty." }, { "code": null, "e": 26533, "s": 26525, "text": "Syntax:...
Deconstructing Interpreter: Understanding Behind the Python Bytecode - GeeksforGeeks
10 May, 2020 When the CPython interpreter executes your program, it first translates onto a sequence of bytecode instructions. Bytecode is an intermediate language for the Python virtual machine that’s used as a performance optimization. Instead of directly executing the human-readable source code, compact numeric code...
[ { "code": null, "e": 25563, "s": 25535, "text": "\n10 May, 2020" }, { "code": null, "e": 25788, "s": 25563, "text": "When the CPython interpreter executes your program, it first translates onto a sequence of bytecode instructions. Bytecode is an intermediate language for the Pyth...
Instant parse() method in Java with Examples - GeeksforGeeks
28 Nov, 2018 The parse() method of Instant class help to get an instance of Instant from a string value passed as parameter. This string is an instant in the UTC time zone. It is parsed using DateTimeFormatter.ISO_INSTANT. Syntax: public static Instant parse(CharSequence text) Parameters: This method accepts one p...
[ { "code": null, "e": 25797, "s": 25769, "text": "\n28 Nov, 2018" }, { "code": null, "e": 26007, "s": 25797, "text": "The parse() method of Instant class help to get an instance of Instant from a string value passed as parameter. This string is an instant in the UTC time zone. It ...
Python | Find maximum length sub-list in a nested list - GeeksforGeeks
19 Feb, 2019 Given a list of lists, write a Python program to find the list with maximum length. The output should be in the form (list, list_length). Examples: Input : [['A'], ['A', 'B'], ['A', 'B', 'C']] Output : (['A', 'B', 'C'], 3) Input : [[1, 2, 3, 9, 4], [5], [3, 8], [2]] Output : ([1, 2, 3, 9, 4], 5) Let’s d...
[ { "code": null, "e": 26095, "s": 26067, "text": "\n19 Feb, 2019" }, { "code": null, "e": 26233, "s": 26095, "text": "Given a list of lists, write a Python program to find the list with maximum length. The output should be in the form (list, list_length)." }, { "code": nul...
Maximise the number of toys that can be purchased with amount K using min Heap - GeeksforGeeks
05 May, 2022 Given an array arr[] consisting of the cost of toys and an integer K depicting the amount of money available to purchase toys. The task is to find the maximum number of toys one can buy with the amount K.Note: One can buy only 1 quantity of a particular toy. Examples: Input: arr[] = {1, 12, 5, 111, 200, ...
[ { "code": null, "e": 26335, "s": 26307, "text": "\n05 May, 2022" }, { "code": null, "e": 26594, "s": 26335, "text": "Given an array arr[] consisting of the cost of toys and an integer K depicting the amount of money available to purchase toys. The task is to find the maximum numb...
Apache Storm - Working Example
We have gone through the core technical details of the Apache Storm and now it is time to code some simple scenarios. Mobile call and its duration will be given as input to Apache Storm and the Storm will process and group the call between the same caller and receiver and their total number of calls. Spout is a compone...
[ { "code": null, "e": 2045, "s": 1927, "text": "We have gone through the core technical details of the Apache Storm and now it is time to code some simple scenarios." }, { "code": null, "e": 2229, "s": 2045, "text": "Mobile call and its duration will be given as input to Apache St...
PyQt - QPushButton Widget
In any GUI design, the command button is the most important and most often used control. Buttons with Save, Open, OK, Yes, No and Cancel etc. as caption are familiar to any computer user. In PyQt API, the QPushButton class object presents a button which when clicked can be programmed to invoke a certain function. QPush...
[ { "code": null, "e": 2241, "s": 1926, "text": "In any GUI design, the command button is the most important and most often used control. Buttons with Save, Open, OK, Yes, No and Cancel etc. as caption are familiar to any computer user. In PyQt API, the QPushButton class object presents a button which...
Boruta Feature Selection (an Example in Python) | by Aaron Lee | Towards Data Science
If you aren’t using Boruta for feature selection, you should try it out. It can be used on any classification model. Boruta is a random forest based method, so it works for tree models like Random Forest or XGBoost, but is also valid with other classification models like Logistic Regression or SVM. Boruta iteratively r...
[ { "code": null, "e": 472, "s": 172, "text": "If you aren’t using Boruta for feature selection, you should try it out. It can be used on any classification model. Boruta is a random forest based method, so it works for tree models like Random Forest or XGBoost, but is also valid with other classifica...
Area of largest Circle inscribe in N-sided Regular polygon - GeeksforGeeks
19 Jan, 2022 Given a regular polygon of N sides with side length a. The task is to find the area of the Circle which inscribed in the polygon. Note : This problem is mixed version of This and This Examples: Input: N = 6, a = 4 Output: 37.6801 Explanation: In this, the polygon have 6 faces and as we see in fig.1 we c...
[ { "code": null, "e": 25062, "s": 25034, "text": "\n19 Jan, 2022" }, { "code": null, "e": 25258, "s": 25062, "text": "Given a regular polygon of N sides with side length a. The task is to find the area of the Circle which inscribed in the polygon. Note : This problem is mixed vers...
HTML - Color Names
The following table shows the 16 color names that were introduced in HTML 3.2 − There are other colors which are not part of HTML or XHTML but they are supported by most of the versions of major browsers. Some characters are reserved in HTML and they have special meaning when used in HTML document. For example, you can...
[ { "code": null, "e": 2454, "s": 2374, "text": "The following table shows the 16 color names that were introduced in HTML 3.2 −" }, { "code": null, "e": 2579, "s": 2454, "text": "There are other colors which are not part of HTML or XHTML but they are supported by most of the versi...
Construct a Turing machine for L = {aibjck | i>j>k; k ≥ 1} - GeeksforGeeks
24 Aug, 2021 Prerequisite – Turing Machine In given language L = {aibjck | i>j>k; k ≥ 1}, every string of ‘a’, ‘b’ and ‘c’ have certain number of a’s, then certain number of b’s and then certain number of c’s. The condition is that count of 3rd symbols should be atleast 1. ‘a’ and ‘b’ can have thereafter be as many but...
[ { "code": null, "e": 24714, "s": 24686, "text": "\n24 Aug, 2021" }, { "code": null, "e": 24744, "s": 24714, "text": "Prerequisite – Turing Machine" }, { "code": null, "e": 25154, "s": 24744, "text": "In given language L = {aibjck | i>j>k; k ≥ 1}, every string ...
TF-IDF : A visual explainer and Python Implementation on Presidential Inauguration Speeches | by Anupama Garla | Towards Data Science
Ever asked to explain TF-IDF to non-technical audiences? Here is a visual unpacking of TF-IDF (Term Frequency — Inverse Document Frequency) to share with non-technical colleagues and gain an intuition for the equation that drives ranking search engines from Google to Amazon, and many industry standard Natural Language ...
[ { "code": null, "e": 557, "s": 171, "text": "Ever asked to explain TF-IDF to non-technical audiences? Here is a visual unpacking of TF-IDF (Term Frequency — Inverse Document Frequency) to share with non-technical colleagues and gain an intuition for the equation that drives ranking search engines fr...
Face Detection in 2 Minutes using OpenCV & Python | by Adarsh Menon | Towards Data Science
First of all make sure you have OpenCV installed. You can install it using pip: pip install opencv-python Face detection using Haar cascades is a machine learning based approach where a cascade function is trained with a set of input data. OpenCV already contains many pre-trained classifiers for face, eyes, smiles, etc...
[ { "code": null, "e": 252, "s": 172, "text": "First of all make sure you have OpenCV installed. You can install it using pip:" }, { "code": null, "e": 278, "s": 252, "text": "pip install opencv-python" }, { "code": null, "e": 590, "s": 278, "text": "Face detect...
Market Basket Analysis with Pandas | by Soner Yıldırım | Towards Data Science
Market basket analysis is a common data science practice implemented by retailers. The goal is to discover the associations among items. It is very important to have an idea of what people tend to buy together. Having a decent market basket analysis provides useful insight for aisle organizations, sales, marketing camp...
[ { "code": null, "e": 382, "s": 171, "text": "Market basket analysis is a common data science practice implemented by retailers. The goal is to discover the associations among items. It is very important to have an idea of what people tend to buy together." }, { "code": null, "e": 508, ...
p5.js shader() Method - GeeksforGeeks
24 Mar, 2021 The shader() function in p5.js makes it possible to use a custom shader to fill in shapes in the WEBGL mode. A custom shader could be loaded using the loadShader() method, and it could even be programmed to have moving graphics on them. Syntax: shader( [s] ) Parameter: This function has a single parameter ...
[ { "code": null, "e": 25017, "s": 24989, "text": "\n24 Mar, 2021" }, { "code": null, "e": 25254, "s": 25017, "text": "The shader() function in p5.js makes it possible to use a custom shader to fill in shapes in the WEBGL mode. A custom shader could be loaded using the loadShader()...
Set a container that spans the full width of the screen with Bootstrap
Use the .container-fluid class in Bootstrap to set a container that spans the full width of the screen. You can try to run the following code to implement the container-fluid class Live Demo <!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link rel = "stylesheet" href = "https://maxcdn.boo...
[ { "code": null, "e": 1166, "s": 1062, "text": "Use the .container-fluid class in Bootstrap to set a container that spans the full width of the screen." }, { "code": null, "e": 1243, "s": 1166, "text": "You can try to run the following code to implement the container-fluid class" ...
atomic.AddInt32() Function in Golang With Examples - GeeksforGeeks
30 Dec, 2020 In Go language, atomic packages supply lower-level atomic memory that is helpful is implementing synchronization algorithms. The AddInt32() function in Golang is used to atomically add delta to the *addr. This function is defined under the atomic package. Here, you need to import “sync/atomic” package in o...
[ { "code": null, "e": 24380, "s": 24352, "text": "\n30 Dec, 2020" }, { "code": null, "e": 24716, "s": 24380, "text": "In Go language, atomic packages supply lower-level atomic memory that is helpful is implementing synchronization algorithms. The AddInt32() function in Golang is u...
PySpark - Environment Setup
In this chapter, we will understand the environment setup of PySpark. Note − This is considering that you have Java and Scala installed on your computer. Let us now download and set up PySpark with the following steps. Step 1 − Go to the official Apache Spark download page and download the latest version of Apache Spar...
[ { "code": null, "e": 1875, "s": 1805, "text": "In this chapter, we will understand the environment setup of PySpark." }, { "code": null, "e": 1959, "s": 1875, "text": "Note − This is considering that you have Java and Scala installed on your computer." }, { "code": null, ...
How to multiply two matrices using pointers in C?
Pointer is a variable that stores the address of another variable. Pointer saves the memory space. The execution time of a pointer is faster because of the direct access to a memory location. With the help of pointers, the memory is accessed efficiently i.e. memory is allocated and deallocated dynamically. Pointers are...
[ { "code": null, "e": 1129, "s": 1062, "text": "Pointer is a variable that stores the address of another variable." }, { "code": null, "e": 1161, "s": 1129, "text": "Pointer saves the memory space." }, { "code": null, "e": 1254, "s": 1161, "text": "The executio...
How to Visualize Data on top of a Map in Python using the Geoviews library | by Christos Zeglis | Towards Data Science
So let’s start with the problem we are about to tackle. Say you have some data that represent a specific figure (e.g. population) which differs from place to place (e.g. different cities) and you want to make a plot to visualize that data. How do you proceed with that? One way to do that (and the most common one) is to...
[ { "code": null, "e": 441, "s": 171, "text": "So let’s start with the problem we are about to tackle. Say you have some data that represent a specific figure (e.g. population) which differs from place to place (e.g. different cities) and you want to make a plot to visualize that data. How do you proc...
Tkinter Application to Switch Between Different Page Frames
15 Feb, 2021 Prerequisites: Python GUI – tkinter Sometimes it happens that we need to create an application with several pops up dialog boxes, i.e Page Frames. Here is a step by step process to create multiple Tkinter Page Frames and link them! This can be used as a boilerplate for more complex python GUI applications...
[ { "code": null, "e": 54, "s": 26, "text": "\n15 Feb, 2021" }, { "code": null, "e": 91, "s": 54, "text": "Prerequisites: Python GUI – tkinter " }, { "code": null, "e": 447, "s": 91, "text": "Sometimes it happens that we need to create an application with severa...
Java Program to Print Reverse Pyramid Star Pattern
17 Mar, 2021 Approach: 1. Get the number of input rows from the user using Scanner Class or BufferedReader Class object. 2. Now run two loops Outer loop to iterate through a number of rows as initialized or input is taken from reader class object in java. Now,Run an inner loop from 1 to ‘i-1’Ru another inner loop from ...
[ { "code": null, "e": 53, "s": 25, "text": "\n17 Mar, 2021" }, { "code": null, "e": 63, "s": 53, "text": "Approach:" }, { "code": null, "e": 161, "s": 63, "text": "1. Get the number of input rows from the user using Scanner Class or BufferedReader Class object....
Huffman Encoding | Practice | GeeksforGeeks
Given a string S of distinct character of size N and their corresponding frequency f[ ] i.e. character S[i] has f[i] frequency. Your task is to build the Huffman tree print all the huffman codes in preorder traversal of the tree. Note: While merging if two nodes have the same value, then the node which occurs at first ...
[ { "code": null, "e": 731, "s": 238, "text": "Given a string S of distinct character of size N and their corresponding frequency f[ ] i.e. character S[i] has f[i] frequency. Your task is to build the Huffman tree print all the huffman codes in preorder traversal of the tree.\nNote: While merging if t...
Program for Area And Perimeter Of Rectangle
21 Jun, 2022 A rectangle is a flat figure in a plane. It has four sides and four equal angles of 90 degree each. In rectangle all four sides are not of equal length like square, sides opposite to each other have equal length. Both diagonals of the rectangle have equal length. Examples: Input : 4 5 Output : Area = 20 ...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jun, 2022" }, { "code": null, "e": 316, "s": 52, "text": "A rectangle is a flat figure in a plane. It has four sides and four equal angles of 90 degree each. In rectangle all four sides are not of equal length like square, sides opp...
GATE | GATE CS 1996 | Question 38
03 Jul, 2020 The average number of key comparisons done in a successful sequential search in a list of length it is(A) log n(B) (n-1)/2(C) n/2(D) (n+1)/2Answer: (D)Explanation: If element is at 1 position then it requires 1 comparison.If element is at 2 position then it requires 2 comparison.If element is at 3 position...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Jul, 2020" }, { "code": null, "e": 461, "s": 52, "text": "The average number of key comparisons done in a successful sequential search in a list of length it is(A) log n(B) (n-1)/2(C) n/2(D) (n+1)/2Answer: (D)Explanation: If element...
Platform Module in Python
23 Jan, 2020 Python defines an in-built module platform that provides system information. The Platform module is used to retrieve as much possible information about the platform on which the program is being currently executed. Now by platform info, it means information about the device, it’s OS, node, OS version, Pyth...
[ { "code": null, "e": 53, "s": 25, "text": "\n23 Jan, 2020" }, { "code": null, "e": 130, "s": 53, "text": "Python defines an in-built module platform that provides system information." }, { "code": null, "e": 700, "s": 130, "text": "The Platform module is used ...
Optional isPresent() method in Java with examples
30 Jul, 2019 The isPresent() method of java.util.Optional class in Java is used to find out if there is a value present in this Optional instance. If there is no value present in this Optional instance, then this method returns false, else true. Syntax: public boolean isPresent() Parameters: This method do not accept ...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jul, 2019" }, { "code": null, "e": 261, "s": 28, "text": "The isPresent() method of java.util.Optional class in Java is used to find out if there is a value present in this Optional instance. If there is no value present in this Opti...
How To Approach A Coding Problem ?
08 Jul, 2022 Developers and students solve a lot of coding questions of data structures and algorithms but most of them don’t understand the importance of it. A lot of them also have this opinion that data structure and algorithms only help in interviews and after that, there is no use of all those complicated stuff in...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Jul, 2022" }, { "code": null, "e": 373, "s": 52, "text": "Developers and students solve a lot of coding questions of data structures and algorithms but most of them don’t understand the importance of it. A lot of them also have this...
Lottery Process Scheduling in Operating System
16 Aug, 2019 Prerequisite – CPU Scheduling, Process ManagementLottery Scheduling is type of process scheduling, somewhat different from other Scheduling. Processes are scheduled in a random manner. Lottery scheduling can be preemptive or non-preemptive. It also solves the problem of starvation. Giving each process at l...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Aug, 2019" }, { "code": null, "e": 475, "s": 52, "text": "Prerequisite – CPU Scheduling, Process ManagementLottery Scheduling is type of process scheduling, somewhat different from other Scheduling. Processes are scheduled in a rand...
HTML Geolocation
01 Jun, 2022 In this article, we will know HTML Geolocation, various properties, methods & their implementation through the examples. Geo-location in HTML5 is used to share the location with some websites and be aware of the exact location. It is mainly used for local businesses, restaurants, or showing locations on th...
[ { "code": null, "e": 52, "s": 24, "text": "\n01 Jun, 2022" }, { "code": null, "e": 173, "s": 52, "text": "In this article, we will know HTML Geolocation, various properties, methods & their implementation through the examples." }, { "code": null, "e": 566, "s": 17...
Minimum number of edges to be removed from given Graph such that no path exists between given pairs of vertices
16 Feb, 2022 Given an undirected graph consisting of N valued over the range [1, N] such that vertices (i, i + 1) are connected and an array arr[] consisting of M pair of integers, the task is to find the minimum number of edges that should be removed from the graph such that there doesn’t exist any path for every pair...
[ { "code": null, "e": 54, "s": 26, "text": "\n16 Feb, 2022" }, { "code": null, "e": 389, "s": 54, "text": "Given an undirected graph consisting of N valued over the range [1, N] such that vertices (i, i + 1) are connected and an array arr[] consisting of M pair of integers, the ta...
Local Labels in C
08 May, 2017 Everybody who has programmed in C programming language must be aware about “goto” and “labels” used in C to jump within a C function. GCC provides an extension to C called “local labels”. Conventional Labels vs Local LabelsConventional labels in C have function scope. Where as local label can be scoped to ...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 May, 2017" }, { "code": null, "e": 216, "s": 28, "text": "Everybody who has programmed in C programming language must be aware about “goto” and “labels” used in C to jump within a C function. GCC provides an extension to C called “lo...
NumberFormatException in Java with Examples
18 Feb, 2022 The NumberFormatException occurs when an attempt is made to convert a string with improper format into a numeric value. That means, when it is not possible to convert a string in any numeric type (float, int, etc), this exception is thrown. It is a Runtime Exception (Unchecked Exception) in Java. It is a ...
[ { "code": null, "e": 54, "s": 26, "text": "\n18 Feb, 2022" }, { "code": null, "e": 461, "s": 54, "text": "The NumberFormatException occurs when an attempt is made to convert a string with improper format into a numeric value. That means, when it is not possible to convert a stri...
Python List pop() Method
Python list method pop() removes and returns last object or obj from the list. Following is the syntax for pop() method − list.pop(obj = list[-1]) obj − This is an optional parameter, index of the object to be removed from the list. obj − This is an optional parameter, index of the object to be removed from the list. ...
[ { "code": null, "e": 2457, "s": 2378, "text": "Python list method pop() removes and returns last object or obj from the list." }, { "code": null, "e": 2500, "s": 2457, "text": "Following is the syntax for pop() method −" }, { "code": null, "e": 2526, "s": 2500, ...
Limited rows selection with given column in Pandas | Python
24 Oct, 2019 Methods in Pandas like iloc[], iat[] are generally used to select the data from a given dataframe. In this article, we will learn how to select the limited rows with given columns with the help of these methods. Example 1: Select two columns # Import pandas package import pandas as pd # Define a dictio...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Oct, 2019" }, { "code": null, "e": 240, "s": 28, "text": "Methods in Pandas like iloc[], iat[] are generally used to select the data from a given dataframe. In this article, we will learn how to select the limited rows with given col...
Quorum Consistency in Cassandra
24 Jun, 2022 In this article, we will discuss how quorum consistency is helpful in Cassandra and how we can calculate it, and also discuss how quorum consistency works. What is Quorum Consistency? Quorum consistency is consistency in Cassandra for high mechanism and to ensure that how many nodes will respond when we ...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Jun, 2022" }, { "code": null, "e": 185, "s": 28, "text": "In this article, we will discuss how quorum consistency is helpful in Cassandra and how we can calculate it, and also discuss how quorum consistency works. " }, { "cod...
unordered_map count() in C++
26 Sep, 2018 The unordered_map::count() is a builtin method in C++ which is used to count the number of elements present in an unordered_map with a given key. Note: As unordered_map does not allow to store elements with duplicate keys, so the count() function basically checks if there exists an element in the unordered...
[ { "code": null, "e": 52, "s": 24, "text": "\n26 Sep, 2018" }, { "code": null, "e": 198, "s": 52, "text": "The unordered_map::count() is a builtin method in C++ which is used to count the number of elements present in an unordered_map with a given key." }, { "code": null, ...
What is the TouchableHighlight in react native ?
28 Jun, 2021 TouchableHighlight is a component that is used to provide a wrapper to Views in order to make them respond correctly to touch-based input. On press down the TouchableHighlight component has its opacity decreased which allows the underlying View or other component’s style to get highlighted. This component ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jun, 2021" }, { "code": null, "e": 320, "s": 28, "text": "TouchableHighlight is a component that is used to provide a wrapper to Views in order to make them respond correctly to touch-based input. On press down the TouchableHighlight...
static Keyword in Java
02 Dec, 2021 The static keyword in Java is mainly used for memory management. The static keyword in Java is used to share the same variable or method of a given class. The users can apply static keywords with variables, methods, blocks, and nested classes. The static keyword belongs to the class than an instance of the...
[ { "code": null, "e": 52, "s": 24, "text": "\n02 Dec, 2021" }, { "code": null, "e": 478, "s": 52, "text": "The static keyword in Java is mainly used for memory management. The static keyword in Java is used to share the same variable or method of a given class. The users can apply...
Remove Duplicate rows in R using Dplyr
21 Jul, 2021 In this article, we are going to remove duplicate rows in R programming language using Dplyr package. This function is used to remove the duplicate rows in the dataframe and get the unique data Syntax: distinct(dataframe) We can also remove duplicate rows based on the multiple columns/variables in the data...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Jul, 2021" }, { "code": null, "e": 130, "s": 28, "text": "In this article, we are going to remove duplicate rows in R programming language using Dplyr package." }, { "code": null, "e": 222, "s": 130, "text": "This...
Decimal.Compare() Method in C#
29 Jan, 2019 This method is used to compare two specified Decimal values. Syntax: public static int Compare (decimal a1, decimal a2); Parameters:a1:This parameter specifies the first value to compare.a2:This parameter specifies the second value to compare. Return Value: It returns a signed number indicating the relativ...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Jan, 2019" }, { "code": null, "e": 89, "s": 28, "text": "This method is used to compare two specified Decimal values." }, { "code": null, "e": 149, "s": 89, "text": "Syntax: public static int Compare (decimal a1, ...
Python program to check if string is empty or not
30 Sep, 2021 Python strings are immutable and hence have more complex handling when talking about its operations. Note that a string with spaces is actually an empty string but has a non-zero size. This article also discussed that problem and solution to it. Let’s see different methods of checking if string is empty or...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Sep, 2021" }, { "code": null, "e": 573, "s": 28, "text": "Python strings are immutable and hence have more complex handling when talking about its operations. Note that a string with spaces is actually an empty string but has a non-z...
p5.js | fullscreen() function
16 Apr, 2019 The fullscreen() function in p5.js is used to get the current fullscreen state of the user’s browser window. If an argument is given, sets the sketch to fullscreen or not based on the value of the argument. If no argument is given, returns the current fullscreen state. Note that due to browser restrictions...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Apr, 2019" }, { "code": null, "e": 375, "s": 28, "text": "The fullscreen() function in p5.js is used to get the current fullscreen state of the user’s browser window. If an argument is given, sets the sketch to fullscreen or not base...
Python program to check if a string is palindrome or not
16 Jun, 2022 Given a string, write a python function to check if it is palindrome or not. A string is said to be palindrome if the reverse of the string is the same as string. For example, “radar” is a palindrome, but “radix” is not a palindrome. Examples: Input : malayalam Output : Yes Input : geeks Output : No Meth...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Jun, 2022" }, { "code": null, "e": 286, "s": 52, "text": "Given a string, write a python function to check if it is palindrome or not. A string is said to be palindrome if the reverse of the string is the same as string. For example...
fmt.Println() Function in Golang With Examples
05 May, 2020 In Go language, fmt package implements formatted I/O with functions analogous to C’s printf() and scanf() function. The fmt.Println() function in Go language formats using the default formats for its operands and writes to standard output. Here spaces are always added between operands and a newline is appe...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 May, 2020" }, { "code": null, "e": 486, "s": 28, "text": "In Go language, fmt package implements formatted I/O with functions analogous to C’s printf() and scanf() function. The fmt.Println() function in Go language formats using the...
Python – Accessing Items in Lists Within Dictionary
23 Aug, 2021 Given a dictionary with values as a list, the task is to write a python program that can access list value items within this dictionary. This is a straightforward method, where the key from which the values have to be extracted is passed along with the index for a specific value. Syntax: dictionary_name[k...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Aug, 2021" }, { "code": null, "e": 166, "s": 28, "text": "Given a dictionary with values as a list, the task is to write a python program that can access list value items within this dictionary. " }, { "code": null, "e": ...
Print the frequency of each character in Alphabetical order
10 Jun, 2021 Given a string str, the task is to print the frequency of each of the characters of str in alphabetical order.Example: Input: str = “aabccccddd” Output: a2b1c4d3 Since it is already in alphabetical order, the frequency of the characters is returned for each character. Input: str = “geeksforgeeks” Output:...
[ { "code": null, "e": 54, "s": 26, "text": "\n10 Jun, 2021" }, { "code": null, "e": 175, "s": 54, "text": "Given a string str, the task is to print the frequency of each of the characters of str in alphabetical order.Example: " }, { "code": null, "e": 379, "s": 17...
std::string::append() in C++
06 Jul, 2017 This member function appends characters in the end of string. Syntax 1 : Appends the characters of string str. It Throws length_error if the resulting size exceeds the maximum number of characters.string& string::append (const string& str) str : is the string to be appended. Returns : *this// CPP code t...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jul, 2017" }, { "code": null, "e": 114, "s": 52, "text": "This member function appends characters in the end of string." }, { "code": null, "e": 5516, "s": 114, "text": "Syntax 1 : Appends the characters of strin...
Java Swing | JTable
12 Oct, 2021 The JTable class is a part of Java Swing Package and is generally used to display or edit two-dimensional data that is having both rows and columns. It is similar to a spreadsheet. This arranges data in a tabular form.Constructors in JTable: JTable(): A table is created with empty cells.JTable(int rows, i...
[ { "code": null, "e": 54, "s": 26, "text": "\n12 Oct, 2021" }, { "code": null, "e": 297, "s": 54, "text": "The JTable class is a part of Java Swing Package and is generally used to display or edit two-dimensional data that is having both rows and columns. It is similar to a spread...
p5.js | keyReleased() Function
27 Mar, 2020 The keyReleased() function is invoked whenever a key is called every time when a key is pressed. The most recently typed ASCII key is stored into the ‘key’ variable, however, it does not distinguish between uppercase and lowercase characters. The non-ASCII characters can be accessed in the ‘keyCode’ variab...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Mar, 2020" }, { "code": null, "e": 367, "s": 28, "text": "The keyReleased() function is invoked whenever a key is called every time when a key is pressed. The most recently typed ASCII key is stored into the ‘key’ variable, however, ...
How to Dynamically Load Modules or Classes in Python
27 Feb, 2020 Python provides a feature to create and store classes and methods and store them for further use. The file containing these sets of methods and classes is called a module. A module can have other modules inside it. Note: For more information, refer to Python Modules Example: A simple example of importing a...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Feb, 2020" }, { "code": null, "e": 243, "s": 28, "text": "Python provides a feature to create and store classes and methods and store them for further use. The file containing these sets of methods and classes is called a module. A m...
Sum of squares of first n natural numbers
28 May, 2022 Given n, find sum of squares of first n natural numbers. Examples : Input : n = 2 Output : 5 Explanation: 1^2+2^2 = 5 Input : n = 8 Output : 204 Explanation : 1^2 + 2^2 + 3^2 + 4^2 + 5^2 + 6^2 + 7^2 + 8^2 = 204 Naive approach : A naive approach will be to run a loop from 1 to n and sum up all the sq...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 May, 2022" }, { "code": null, "e": 122, "s": 52, "text": "Given n, find sum of squares of first n natural numbers. Examples : " }, { "code": null, "e": 268, "s": 122, "text": "Input : n = 2\nOutput : 5\nExplanat...
How to get seconds since epoch in JavaScript?
14 May, 2020 Given a date, we have to find the number of seconds since the epoch (i.e. 1 January 1970, 00:00:00 UTC ). The getTime() method in the JavaScript returns the number of milliseconds since January 1, 1970, or epoch. If we divide these milliseconds by 1000 and then integer part will give us the number of secon...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 May, 2020" }, { "code": null, "e": 351, "s": 28, "text": "Given a date, we have to find the number of seconds since the epoch (i.e. 1 January 1970, 00:00:00 UTC ). The getTime() method in the JavaScript returns the number of millisec...
cmd | Dir command
21 Jun, 2022 Dir is a command found inside the windows command processor (cmd.exe) that is generally used for listing the directories and files within the current directory. The command by itself is really basic, but the presence of its extensive switches makes it quite a dynamic command that has several use cases. It ...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Jun, 2022" }, { "code": null, "e": 588, "s": 28, "text": "Dir is a command found inside the windows command processor (cmd.exe) that is generally used for listing the directories and files within the current directory. The command by...
Methods of Ordered Dictionary in Python
16 Feb, 2022 An OrderedDict is a dict that remembers the order in that keys were first inserted. If a new entry overwrites an existing entry, the original insertion position is left unchanged. Deleting an entry and reinserting it will move it to the end. Ordered dictionary somehow can be used in the place where there i...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Feb, 2022" }, { "code": null, "e": 579, "s": 52, "text": "An OrderedDict is a dict that remembers the order in that keys were first inserted. If a new entry overwrites an existing entry, the original insertion position is left uncha...
robots.txt File
04 Nov, 2018 What is robots.txt File?The web surface is an open place. Almost all the websites on the surface can be accessed by several search engines e.g. if we search something in Google, a vast number of results can be obtained from it. But, what if the web designers create something on their website and don’t want...
[ { "code": null, "e": 52, "s": 24, "text": "\n04 Nov, 2018" }, { "code": null, "e": 813, "s": 52, "text": "What is robots.txt File?The web surface is an open place. Almost all the websites on the surface can be accessed by several search engines e.g. if we search something in Goog...
How to get current date and time in firebase using ReactJS ?
28 Jun, 2021 The following approach covers how to get the current date and time in firebase using react. We have used the firebase module to achieve so. Creating React Application and Installing Module: Step 1: Create a React-app using the following command:npx create-react-app myapp Step 1: Create a React-app using th...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jun, 2021" }, { "code": null, "e": 168, "s": 28, "text": "The following approach covers how to get the current date and time in firebase using react. We have used the firebase module to achieve so." }, { "code": null, "e"...
typing.NamedTuple – Improved Namedtuples
02 Sep, 2020 The NamedTuple class of the typing module added in Python 3.6 is the younger sibling of the namedtuple class in the collections module. The main difference being an updated syntax for defining new record types and added support for type hints. Like dictionaries, NamedTuples contain keys that are hashed to ...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Sep, 2020" }, { "code": null, "e": 472, "s": 28, "text": "The NamedTuple class of the typing module added in Python 3.6 is the younger sibling of the namedtuple class in the collections module. The main difference being an updated sy...
jQuery UI Tooltips destroy() Method
05 Feb, 2021 jQuery UI consists of GUI widgets, visual effects, and themes implemented using jQuery, CSS, and HTML. jQuery UI is great for building UI interfaces for the webpages. jQuery UI tooltip widget helps us to add new themes and allows for customization. In this article, we will see how to use destroy option in ...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Feb, 2021" }, { "code": null, "e": 420, "s": 28, "text": "jQuery UI consists of GUI widgets, visual effects, and themes implemented using jQuery, CSS, and HTML. jQuery UI is great for building UI interfaces for the webpages. jQuery U...
Tags vs Elements vs Attributes in HTML
11 Jun, 2021 HTML Tags: Tags are the starting and ending parts of an HTML element. They begin with < symbol and end with > symbol. Whatever written inside < and > are called tags.Example: html <b> </b> HTML elements: Elements enclose the contents in between the tags. They consist of some kind of structure or expressi...
[ { "code": null, "e": 53, "s": 25, "text": "\n11 Jun, 2021" }, { "code": null, "e": 230, "s": 53, "text": "HTML Tags: Tags are the starting and ending parts of an HTML element. They begin with < symbol and end with > symbol. Whatever written inside < and > are called tags.Example:...
How to Update Data in API using Retrofit in Android?
21 Dec, 2021 We have seen reading data from API as well as posting data to our database with the help of the API. In this article, we will take a look at updating our data in our API. We will be using the Retrofit library for updating our data in our API. We will be building a simple application in which we will be di...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Dec, 2021" }, { "code": null, "e": 272, "s": 28, "text": "We have seen reading data from API as well as posting data to our database with the help of the API. In this article, we will take a look at updating our data in our API. We w...
Properties getProperty(key) method in Java with Examples
23 May, 2019 The getProperty(key) method of Properties class is used to get the value mapped to this key, passed as the parameter, in this Properties object. This method will fetch the corresponding value to this key, if present, and return it. If there is no such mapping, then it returns null. Syntax: public Object ge...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 May, 2019" }, { "code": null, "e": 311, "s": 28, "text": "The getProperty(key) method of Properties class is used to get the value mapped to this key, passed as the parameter, in this Properties object. This method will fetch the cor...
Detect Mutation using Python
12 Nov, 2020 Prerequisite: Random Numbers in Python The following article depicts how Python can be used to detect a mutated DNA strand. generateDNASequence(): This method generates a random DNA strand of length 40 characters using the list of DNA bases A,C,G,T. This method returns the generated DNA strand.applyGammaR...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Nov, 2020" }, { "code": null, "e": 67, "s": 28, "text": "Prerequisite: Random Numbers in Python" }, { "code": null, "e": 153, "s": 67, "text": "The following article depicts how Python can be used to detect a muta...
DAX Filter - KEEPFILTERS function
Modifies how filters are applied while evaluating a CALCULATE or CALCULATETABLE function. KEEPFILTERS (<expression>) Expression Any DAX expression. DAX KEEPFILTERS function does not return any value. You can use DAX KEEPFILTERS function within the context CALCULATE and CALCULATETABLE functions, to override the standa...
[ { "code": null, "e": 2225, "s": 2135, "text": "Modifies how filters are applied while evaluating a CALCULATE or CALCULATETABLE function." }, { "code": null, "e": 2254, "s": 2225, "text": "KEEPFILTERS (<expression>) \n" }, { "code": null, "e": 2265, "s": 2254, ...