title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Dice Roll Simulation in C++
Suppose a die simulator generates a random number from 1 to 6 for each roll. We want to introduced a constraint to the generator such that it cannot roll the number i more than rollMax[i] (1-indexed) consecutive times. Consider we have an array of integers rollMax and an integer n, we have to return the number of disti...
[ { "code": null, "e": 1868, "s": 1062, "text": "Suppose a die simulator generates a random number from 1 to 6 for each roll. We want to introduced a constraint to the generator such that it cannot roll the number i more than rollMax[i] (1-indexed) consecutive times. Consider we have an array of integ...
Exception handling and object destruction | Set 1 - GeeksforGeeks
24 Jan, 2022 Predict the output of following C++ program. CPP #include <iostream>using namespace std; class Test {public: Test() { cout << "Constructing an object of Test " << endl; } ~Test() { cout << "Destructing an object of Test " << endl; }}; int main() { try { Test t1; throw 10; } catch(int i) { co...
[ { "code": null, "e": 26569, "s": 26541, "text": "\n24 Jan, 2022" }, { "code": null, "e": 26615, "s": 26569, "text": "Predict the output of following C++ program. " }, { "code": null, "e": 26619, "s": 26615, "text": "CPP" }, { "code": "#include <iostrea...
How to Upload Your Python Package to PyPI and pip | Towards Data Science
You wrote a new Python package that solves a specific problem and it’s now time to share it with the wider Python community. To do so, you need to upload the package to a central repository that can be accessed by developers across the globe. In today’s article we are going to discuss how PyPI lets developers share pac...
[ { "code": null, "e": 414, "s": 171, "text": "You wrote a new Python package that solves a specific problem and it’s now time to share it with the wider Python community. To do so, you need to upload the package to a central repository that can be accessed by developers across the globe." }, { ...
A Guide to Building Your First Regression Model in Just 8 Lines of Code | by Braden Riggs | Towards Data Science
Mathematical modeling and machine learning can often feel like difficult topics to explore and learn, especially to those unfamiliar with the fields of computer science and mathematics. It surprises me to hear from my non-STEM friends that they feel overwhelmed trying to use basic modeling techniques in their own proje...
[ { "code": null, "e": 858, "s": 172, "text": "Mathematical modeling and machine learning can often feel like difficult topics to explore and learn, especially to those unfamiliar with the fields of computer science and mathematics. It surprises me to hear from my non-STEM friends that they feel overw...
CICS - REWRITE
REWRITE command is used to modify a record that is already present in a file. Prior to this command, the record must be read with a READ UPDATE command. The parameters are same as described before. The syntax for the Rewrite command is as follows − EXEC CICS REWRITE FILE (name) FROM (data-area) LENGTH (data-v...
[ { "code": null, "e": 2175, "s": 1926, "text": "REWRITE command is used to modify a record that is already present in a file. Prior to this command, the record must be read with a READ UPDATE command. The parameters are same as described before. The syntax for the Rewrite command is as follows −" }...
How to get the values of a particular row in a table in Selenium with python?
We can get the values of a particular row in a table in Selenium. The rows of a table are represented by <tr> tag in html code. The data in each row is enclosed with the <td> tag in html. Thus a <td> tag’s parent is always a <tr> tag. The logic is get all the rows, we shall use the locator xpath and then use find_eleme...
[ { "code": null, "e": 1297, "s": 1062, "text": "We can get the values of a particular row in a table in Selenium. The rows\nof a table are represented by <tr> tag in html code. The data in each row is enclosed\nwith the <td> tag in html. Thus a <td> tag’s parent is always a <tr> tag." }, { "c...
Clear a Hashtable in C#
Clear a Hashtable, using the Clear() method in C#. The following is our Hashtable − Hashtable h = new Hashtable(); h.Add(1, "Amit"); h.Add(2, "Sachin"); h.Add(3, "Rahul"); Use the clear method. h.Clear(); If you will now try to display the Hashtable, nothing would get display since the Hashtable is empty. Live Demo us...
[ { "code": null, "e": 1113, "s": 1062, "text": "Clear a Hashtable, using the Clear() method in C#." }, { "code": null, "e": 1146, "s": 1113, "text": "The following is our Hashtable −" }, { "code": null, "e": 1234, "s": 1146, "text": "Hashtable h = new Hashtable...
Lexicographically largest string possible in one swap - GeeksforGeeks
03 Aug, 2021 Given string str of length N, the task is to obtain the lexicographically largest string by at most one swap. Note: The swapping characters might not be adjacent. Examples: Input: str = “string” Output: tsring Explanation: Lexicographically largest string obtained by swapping string -> tsring. Input: str ...
[ { "code": null, "e": 26908, "s": 26880, "text": "\n03 Aug, 2021" }, { "code": null, "e": 27019, "s": 26908, "text": "Given string str of length N, the task is to obtain the lexicographically largest string by at most one swap. " }, { "code": null, "e": 27072, "s":...
Python - String with most unique characters - GeeksforGeeks
06 Mar, 2020 Sometimes, while working with python strings, we can have a problem in which we desire to extract particular list which has most number of unique characters. This kind of problem can have application in competitive programming and web development domain. Lets discuss certain ways in which this task can be ...
[ { "code": null, "e": 25647, "s": 25619, "text": "\n06 Mar, 2020" }, { "code": null, "e": 25965, "s": 25647, "text": "Sometimes, while working with python strings, we can have a problem in which we desire to extract particular list which has most number of unique characters. This ...
How to set vertical gap between elements in a GridLayout with Java?
Use the setVgap() method to set the vertical gap between elements in a GridLayout. Let’s say we have a GridLaypout − GridLayout layout = new GridLayout(3,3); Set the horizontal gap − layout.setVgap(30); The following is an example − package my; import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayou...
[ { "code": null, "e": 1179, "s": 1062, "text": "Use the setVgap() method to set the vertical gap between elements in a GridLayout. Let’s say we have a GridLaypout −" }, { "code": null, "e": 1220, "s": 1179, "text": "GridLayout layout = new GridLayout(3,3);" }, { "code": nu...
Boolean Algebraic Theorems - GeeksforGeeks
01 Apr, 2021 Boolean algebraic theorems are the theorems that are used to change the form of a boolean expression. Sometimes these theorems are used to minimize the terms of the expression, and sometimes they are used just to transfer the expression from one form to another. There are boolean algebraic theorems in dig...
[ { "code": null, "e": 25706, "s": 25678, "text": "\n01 Apr, 2021" }, { "code": null, "e": 25970, "s": 25706, "text": "Boolean algebraic theorems are the theorems that are used to change the form of a boolean expression. Sometimes these theorems are used to minimize the terms of th...
Difference between hardware serial and software serial in Arduino
A hardware serial, as the name suggests, denotes that a dedicated piece of hardware (UART) enables Serial communication. In Arduino Uno, for instance, pins 0 and 1 have UART support,and they are connected to the USB via a USB-to-UART converter. That facilitates communication between your computer/laptop and the Arduino...
[ { "code": null, "e": 1531, "s": 1062, "text": "A hardware serial, as the name suggests, denotes that a dedicated piece of hardware (UART) enables Serial communication. In Arduino Uno, for instance, pins 0 and 1 have UART support,and they are connected to the USB via a USB-to-UART converter. That fac...
Mastering User Management on Linux
Are you working as Linux admin? Do you create/delete users in Linux Command line? If yes, then this article is for you guys! After reading the below content, you will be able to manipulate users and group permissions in Linux system. In the below example sai is the username. The usermod command modifies the approach ac...
[ { "code": null, "e": 1296, "s": 1062, "text": "Are you working as Linux admin? Do you create/delete users in Linux Command line? If yes, then this article is for you guys! After reading the below content, you will be able to manipulate users and group permissions in Linux system." }, { "code...
C - nested if statements
It is always legal in C programming to nest if-else statements, which means you can use one if or else if statement inside another if or else if statement(s). The syntax for a nested if statement is as follows − if( boolean_expression 1) { /* Executes when the boolean expression 1 is true */ if(boolean_expressio...
[ { "code": null, "e": 2243, "s": 2084, "text": "It is always legal in C programming to nest if-else statements, which means you can use one if or else if statement inside another if or else if statement(s)." }, { "code": null, "e": 2296, "s": 2243, "text": "The syntax for a nested...
Algorithm for non recursive Predictive Parsing - GeeksforGeeks
24 May, 2021 Prerequisite – Classification of Top Down Parsers Predictive parsing is a special form of recursive descent parsing, where no backtracking is required, so this can predict which products to use to replace the input string. Non-recursive predictive parsing or table-driven is also known as LL(1) parser. This...
[ { "code": null, "e": 24414, "s": 24386, "text": "\n24 May, 2021" }, { "code": null, "e": 24770, "s": 24414, "text": "Prerequisite – Classification of Top Down Parsers Predictive parsing is a special form of recursive descent parsing, where no backtracking is required, so this can...
How to Add GIFs on README .md File in a GitHub Repository? - GeeksforGeeks
10 Nov, 2021 Git is a free and open-source distributed version control system designed to handle everything from small to very large projects. Github is a highly used software that is used for version control. It is more helpful when more than one person is working on a project. GIF as we all know stands for Graphics I...
[ { "code": null, "e": 24666, "s": 24638, "text": "\n10 Nov, 2021" }, { "code": null, "e": 25056, "s": 24666, "text": "Git is a free and open-source distributed version control system designed to handle everything from small to very large projects. Github is a highly used software ...
Creating a list of range of dates in Python - GeeksforGeeks
09 May, 2021 Given a date, and the task is to write a Python program to create a list of range of dates with the next K dates starting from the current date. Examples: Input : test_date = datetime.datetime(1997, 1, 4), K = 5 Output : [datetime.datetime(1997, 1, 4, 0, 0), datetime.datetime(1997, 1, 5, 0, 0), datetime.da...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n09 May, 2021" }, { "code": null, "e": 24437, "s": 24292, "text": "Given a date, and the task is to write a Python program to create a list of range of dates with the next K dates starting from the current date." }, { "cod...
C | Pointer Basics | Question 12 - GeeksforGeeks
05 Feb, 2013 Consider this C code to swap two integers and these five statements after it: void swap(int *px, int *py) { *px = *px - *py; *py = *px + *py; *px = *py - *px; } S1: will generate a compilation errorS2: may generate a segmentation fault at runtime depending on the arguments passedS3: correctly impl...
[ { "code": null, "e": 24268, "s": 24240, "text": "\n05 Feb, 2013" }, { "code": null, "e": 24346, "s": 24268, "text": "Consider this C code to swap two integers and these five statements after it:" }, { "code": "void swap(int *px, int *py) { *px = *px - *py; *py = *px...
Get elapsed time in minutes in Java
To get the elapsed time of an operation in minutes in Java, we use the System.currentTimeMillis() method. The java.lang.System.currentTimeMillis() returns the current time in milliseconds. Declaration −The java.lang.System.currentTimeMillis() is declared as follows − public static long currentTimeMillis() The method re...
[ { "code": null, "e": 1251, "s": 1062, "text": "To get the elapsed time of an operation in minutes in Java, we use the System.currentTimeMillis() method. The java.lang.System.currentTimeMillis() returns the current time in milliseconds." }, { "code": null, "e": 1330, "s": 1251, "t...
Count ordered pairs of numbers with a given LCM - GeeksforGeeks
10 May, 2021 Given an integer N, the task is to count the total number of ordered pairs such that the LCM of each pair is equal to N. Examples: Input: N = 6Output: 9 Explanation: Pairs with LCM equal to N(= 6) are {(1, 6), (2, 6), (2, 3), (3, 6), (6, 6), (6, 3), (3, 2), (6, 2), (6, 1)} Therefore, the output is 9. Input...
[ { "code": null, "e": 25378, "s": 25350, "text": "\n10 May, 2021" }, { "code": null, "e": 25499, "s": 25378, "text": "Given an integer N, the task is to count the total number of ordered pairs such that the LCM of each pair is equal to N." }, { "code": null, "e": 25509...
Handling NetCDF Files using XArray for Absolute Beginners | by Eden Au | Towards Data Science
NetCDF is a machine-independent, array-oriented, multi-dimensional, self-describing, and portable data format used by various scientific communities. It has a filename extension of .nc or .cdf (though it is believed that there are subtle differences between the two). Unlike files in .csv or .xlsx, NetCDF format cannot ...
[ { "code": null, "e": 552, "s": 172, "text": "NetCDF is a machine-independent, array-oriented, multi-dimensional, self-describing, and portable data format used by various scientific communities. It has a filename extension of .nc or .cdf (though it is believed that there are subtle differences betwe...
OOAD - Quick Guide
The object-oriented paradigm took its shape from the initial concept of a new programming approach, while the interest in design and analysis methods came much later. The first object–oriented language was Simula (Simulation of real systems) that was developed in 1960 by researchers at the Norwegian Computing Center. T...
[ { "code": null, "e": 2154, "s": 1987, "text": "The object-oriented paradigm took its shape from the initial concept of a new programming approach, while the interest in design and analysis methods came much later." }, { "code": null, "e": 2306, "s": 2154, "text": "The first objec...
Understanding Customer Churning with Big Data Analytics | by Bowen Chen | Towards Data Science
Take a guess. What is the world’s most valuable asset right now? It is not gold, not crude oil... it is data. You must have heard about the popular buzz word “big data”, and wondering what exactly that term means. Think about your favorite music streaming services — Spotify, Pandora... etc. Every second across the worl...
[ { "code": null, "e": 112, "s": 47, "text": "Take a guess. What is the world’s most valuable asset right now?" }, { "code": null, "e": 586, "s": 112, "text": "It is not gold, not crude oil... it is data. You must have heard about the popular buzz word “big data”, and wondering wha...
C# | Boolean.ToString() Method - GeeksforGeeks
04 Oct, 2021 This method is used to convert the value of this instance to its equivalent string representation i.e. either “True” or “False”. Syntax: public override string ToString (); Return Value: This method returns “True” (the value of the TrueString property) if the value of this instance is true, or “False” (the...
[ { "code": null, "e": 25757, "s": 25729, "text": "\n04 Oct, 2021" }, { "code": null, "e": 25886, "s": 25757, "text": "This method is used to convert the value of this instance to its equivalent string representation i.e. either “True” or “False”." }, { "code": null, "e...
Integer toString() in Java
05 Dec, 2018 The java.lang.Integer.toString() is an inbuilt method in Java which is used to return the String object representing this Integer’s value.Syntax :public static String toString()Parameters: The method does not accept any parameters.Return Value:The method returns the string object of the particular Integer ...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Dec, 2018" }, { "code": null, "e": 7312, "s": 28, "text": "The java.lang.Integer.toString() is an inbuilt method in Java which is used to return the String object representing this Integer’s value.Syntax :public static String toStrin...
Reverse a string in PL/SQL
29 Jun, 2018 Prerequisite – PL/SQL introduction In PL/SQL code groups of commands are arranged within a block. A block group related declarations or statements. In declare part, we declare variables and between begin and end part, we perform the operations. Given a string, the task is to reverse a string using PL/SQL. ...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Jun, 2018" }, { "code": null, "e": 63, "s": 28, "text": "Prerequisite – PL/SQL introduction" }, { "code": null, "e": 273, "s": 63, "text": "In PL/SQL code groups of commands are arranged within a block. A block gr...
Parallel (Othographic & Oblique) Projection in Computer Graphics
15 Feb, 2022 Projection is a kind of phenomena that are used in computer graphics to map the view of a 3D object onto the projecting display panel where the viewing volume is specified by the world coordinate and then map these world coordinate over the view port. Projection is of the following kind : a) Paral...
[ { "code": null, "e": 52, "s": 24, "text": "\n15 Feb, 2022" }, { "code": null, "e": 304, "s": 52, "text": "Projection is a kind of phenomena that are used in computer graphics to map the view of a 3D object onto the projecting display panel where the viewing volume is specified by...
How to Find Duplicate Records that Meet Certain Conditions in SQL?
28 Oct, 2021 In this article, we will understand how to find Duplicate Records that meet certain conditions in SQL. Using the GROUP BY and HAVING clauses we can show the duplicates in table data. The GROUP BY statement in SQL is used to arrange identical data into groups with the help of some functions. i.e if a partic...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 Oct, 2021" }, { "code": null, "e": 453, "s": 52, "text": "In this article, we will understand how to find Duplicate Records that meet certain conditions in SQL. Using the GROUP BY and HAVING clauses we can show the duplicates in tab...
HTML textarea autocomplete Attribute
09 May, 2022 The HTML <textarea> autocomplete Attribute is used to specify whether the Textarea field has autocomplete on or off. When the autocomplete attribute is set to on, the browser will automatically complete the values based on which the user entered before. It works with many input fields such as text, search,...
[ { "code": null, "e": 52, "s": 24, "text": "\n09 May, 2022" }, { "code": null, "e": 423, "s": 52, "text": "The HTML <textarea> autocomplete Attribute is used to specify whether the Textarea field has autocomplete on or off. When the autocomplete attribute is set to on, the browser...
std::remove_const in C++ with Examples
21 Jun, 2020 The std::remove_const template of C++ STL is present in the <type_traits> header file. The std::remove_const template of C++ STL is used to get the type T without const qualification. It return the boolean value true if T is without const qualified, otherwise return false. Below is the syntax for the same:...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Jun, 2020" }, { "code": null, "e": 336, "s": 28, "text": "The std::remove_const template of C++ STL is present in the <type_traits> header file. The std::remove_const template of C++ STL is used to get the type T without const qualif...
How to generate a random letter in Python?
03 Mar, 2021 In this article, let’s discuss how to generate a random letter. Python provides rich module support and some of these modules can help us to generate random numbers and letters. There are multiple ways we can do that using various Python modules. Method 1: Using string and random module The string module h...
[ { "code": null, "e": 53, "s": 25, "text": "\n03 Mar, 2021" }, { "code": null, "e": 300, "s": 53, "text": "In this article, let’s discuss how to generate a random letter. Python provides rich module support and some of these modules can help us to generate random numbers and lette...
How to close window using JavaScript which is opened by the user with a URL ?
05 Nov, 2020 JavaScript does not allow one to close a window opened by the user, using the window.close() method due to security issues. However, we can close a window by using a workaround. The approach to be followed is by opening the current URL using JavaScript so that it could be closed with a script. The steps be...
[ { "code": null, "e": 54, "s": 26, "text": "\n05 Nov, 2020" }, { "code": null, "e": 349, "s": 54, "text": "JavaScript does not allow one to close a window opened by the user, using the window.close() method due to security issues. However, we can close a window by using a workarou...
PHP | Send Attachment With Email
16 Jun, 2022 Sending an email is a very common activity in a web browser. For example, sending an email when a new user joins a network, sending a newsletter, sending greeting mail, or sending an invoice. We can use the built-in mail() function to send an email programmatically. This function needs three required argum...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Jun, 2022" }, { "code": null, "e": 1003, "s": 52, "text": "Sending an email is a very common activity in a web browser. For example, sending an email when a new user joins a network, sending a newsletter, sending greeting mail, or s...
Translator App Project using Django
16 Mar, 2021 Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source. Refer to...
[ { "code": null, "e": 53, "s": 25, "text": "\n16 Mar, 2021" }, { "code": null, "e": 352, "s": 53, "text": "Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassl...
SMTP Commands
13 Sep, 2021 Simple Mail Transfer Protocol (SMTP) is an ASCII protocol. It is based on client-server model. It uses TCP port number 25 for this service. Therefore e-mail; is delivered from source to destination by having the source machine established a TCP to port 25 of the destination machine. To send mail, a system ...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Sep, 2021" }, { "code": null, "e": 605, "s": 28, "text": "Simple Mail Transfer Protocol (SMTP) is an ASCII protocol. It is based on client-server model. It uses TCP port number 25 for this service. Therefore e-mail; is delivered from...
R – Bar Charts
21 Apr, 2020 A bar chart is a pictorial representation of data that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. In other words, it is the pictorial representation of dataset. These data sets contain the numerical values of variables that repres...
[ { "code": null, "e": 53, "s": 25, "text": "\n21 Apr, 2020" }, { "code": null, "e": 386, "s": 53, "text": "A bar chart is a pictorial representation of data that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent....
Count minimum number of subsets (or subsequences) with consecutive numbers
06 Jul, 2022 Given an array of distinct positive numbers, the task is to calculate the number of subsets (or subsequences) from the array such that each subset contains consecutive numbers. Examples: Input : arr[] = {100, 56, 5, 6, 102, 58, 101, 57, 7, 103, 59} Output : 3 {5, 6, 7}, { 56,...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jul, 2022" }, { "code": null, "e": 229, "s": 52, "text": "Given an array of distinct positive numbers, the task is to calculate the number of subsets (or subsequences) from the array such that each subset contains consecutive number...
How to create Donghnut chart in react using material UI and DevExpress ?
19 Jul, 2021 DevExpress: DevExpress is a package for controlling and building the user interface of the Window, Mobile, and other applications. Doughnut Charts: Doughnut charts are the modified version of Pie Charts with the area of center cut out. A donut is more concerned about the use of an area of arcs to represent...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Jul, 2021" }, { "code": null, "e": 159, "s": 28, "text": "DevExpress: DevExpress is a package for controlling and building the user interface of the Window, Mobile, and other applications." }, { "code": null, "e": 478, ...
Josephus problem | Set 1 (A O(n) Solution)
07 Jun, 2022 In computer science and mathematics, the Josephus Problem (or Josephus permutation) is a theoretical problem. Following is the problem statement: There are n people standing in a circle waiting to be executed. The counting out begins at some point in the circle and proceeds around the circle in a fixed dir...
[ { "code": null, "e": 54, "s": 26, "text": "\n07 Jun, 2022" }, { "code": null, "e": 200, "s": 54, "text": "In computer science and mathematics, the Josephus Problem (or Josephus permutation) is a theoretical problem. Following is the problem statement:" }, { "code": null, ...
SAP ABAP - Nested If Statement
It is always legal to nest IF....ELSE statements, which means you can use one IF or ELSEIF statement inside another IF or ELSEIF statement. The syntax for a nested IF....ELSE statement is as follows − IF<condition_1>. <statement block>. IF<condition_2>. <statement block>. ELSE. <statement block>. ENDIF. ELSE ...
[ { "code": null, "e": 3172, "s": 3032, "text": "It is always legal to nest IF....ELSE statements, which means you can use one IF or ELSEIF statement inside another IF or ELSEIF statement." }, { "code": null, "e": 3233, "s": 3172, "text": "The syntax for a nested IF....ELSE stateme...
JavaScript to generate random hex codes of color
24 May, 2018 What is hex code? A hex code is a six-digit, three-byte hexadecimal number used to represent colors in HTML, CSS, SVG. The bytes represent the red, green and blue components of the color. One byte represents a number in the range 00 to FF (in hexadecimal notation), or 0 to 255 in decimal notation. This rep...
[ { "code": null, "e": 53, "s": 25, "text": "\n24 May, 2018" }, { "code": null, "e": 71, "s": 53, "text": "What is hex code?" }, { "code": null, "e": 443, "s": 71, "text": "A hex code is a six-digit, three-byte hexadecimal number used to represent colors in HTML...
Python | Add leading K character
11 Mar, 2022 Sometimes, during the string manipulation, we are into a problem where we need to pad or add leading K to the string as per the requirements. This problem can occur in web development. Having shorthands to solve this problem turns to be handy in many situations. Let’s discuss certain ways in which this pro...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Mar, 2022" }, { "code": null, "e": 578, "s": 28, "text": "Sometimes, during the string manipulation, we are into a problem where we need to pad or add leading K to the string as per the requirements. This problem can occur in web dev...
HTML <select> disabled Attribute
04 Jan, 2019 The disabled attribute for <select> element in HTML is used to specify that the select element is disabled. A disabled drop-down list is un-clickable and unusable. It is a boolean attribute. Syntax: <select disabled>option values...</select> Example: <!DOCTYPE html> <html> <head> <title>HTML s...
[ { "code": null, "e": 53, "s": 25, "text": "\n04 Jan, 2019" }, { "code": null, "e": 244, "s": 53, "text": "The disabled attribute for <select> element in HTML is used to specify that the select element is disabled. A disabled drop-down list is un-clickable and unusable. It is a bo...
Sum of the series 1 + (1+2) + (1+2+3) + (1+2+3+4) + ...... + (1+2+3+4+...+n)
09 Sep, 2021 Given the value of n, we need to find the sum of the series where i-th term is sum of first i natural numbers.Examples : Input : n = 5 Output : 35 Explanation : (1) + (1+2) + (1+2+3) + (1+2+3+4) + (1+2+3+4+5) = 35 Input : n = 10 Output : 220 Explanation : (1) + (1+2) + (1+2+3) + .... +(1+2+3+4+......
[ { "code": null, "e": 54, "s": 26, "text": "\n09 Sep, 2021" }, { "code": null, "e": 177, "s": 54, "text": "Given the value of n, we need to find the sum of the series where i-th term is sum of first i natural numbers.Examples : " }, { "code": null, "e": 374, "s": ...
How to use animation on favicon image ?
31 Jan, 2020 A favicon is a special icon that appears at the top left corner near the web address bar. The file type can be of any jpg, png, gif or icon(.ico) image. The default favicon name is favicon.ico. The favicons are also commonly known as a shortcut icon, bookmark icon or website icon. They provide convenience ...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Jan, 2020" }, { "code": null, "e": 737, "s": 28, "text": "A favicon is a special icon that appears at the top left corner near the web address bar. The file type can be of any jpg, png, gif or icon(.ico) image. The default favicon na...
BigDecimal setScale() method in Java with Examples
17 Jun, 2019 The java.math.BigDecimal.setScale() is used to set the scale of BigDecimal. This method performs an operation upon the current BigDecimal by which this method is called. There are three overloads of setScale() method available in Java which is listed below: setScale(int newScale) setScale(int newScale, int...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Jun, 2019" }, { "code": null, "e": 198, "s": 28, "text": "The java.math.BigDecimal.setScale() is used to set the scale of BigDecimal. This method performs an operation upon the current BigDecimal by which this method is called." },...
Python – Web App To Send Push Notification To Your Phone
05 Oct, 2021 In this article, we will discuss two apps and how they can be configured using python to send notifications. Pushbullet, a prominent Python package, which connects multiple devices using python code. In this article, we will discuss how to send messages or notifications through it. Using our computer and p...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Oct, 2021" }, { "code": null, "e": 137, "s": 28, "text": "In this article, we will discuss two apps and how they can be configured using python to send notifications." }, { "code": null, "e": 598, "s": 137, "text"...
How to set full-screen iframe with height 100% in JavaScript ?
31 Oct, 2019 Given an HTML document containing an <iframe> element and the task is to change the height of the <iframe> element to 100% with the help of JavaScript. There are two methods to change the height of the iframe which are discussed below: Method 1: This method uses id attribute of iframe with height property ...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Oct, 2019" }, { "code": null, "e": 264, "s": 28, "text": "Given an HTML document containing an <iframe> element and the task is to change the height of the <iframe> element to 100% with the help of JavaScript. There are two methods t...
Simple Chat Room using Python
19 Feb, 2022 This article demonstrates – How to set up a simple Chat Room server and allow multiple clients to connect to it using a client-side script. The code uses the concept of sockets and threading. Sockets can be thought of as endpoints in a communication channel that is bi-directional and establishes communic...
[ { "code": null, "e": 54, "s": 26, "text": "\n19 Feb, 2022" }, { "code": null, "e": 248, "s": 54, "text": "This article demonstrates – How to set up a simple Chat Room server and allow multiple clients to connect to it using a client-side script. The code uses the concept of socke...
Python String islower() method
12 Aug, 2021 Python String islower() method checks if all characters in the string are lowercase. This method returns True if all alphabets in a string are lowercase alphabets. If the string contains at least one uppercase alphabet, it returns False. Syntax: string.islower() Parameters: None Returns: True: If all th...
[ { "code": null, "e": 54, "s": 26, "text": "\n12 Aug, 2021" }, { "code": null, "e": 292, "s": 54, "text": "Python String islower() method checks if all characters in the string are lowercase. This method returns True if all alphabets in a string are lowercase alphabets. If the str...
Changing Column Width Based on Screen Size using CSS
To change column width based on screen size, the code is as follows − Live Demo <!DOCTYPE html> <html> <head> <style> body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } .sample { width: 50%; background-color: lightblue; height: 200px; font-size: 18px; } @media only screen and (max-wi...
[ { "code": null, "e": 1257, "s": 1187, "text": "To change column width based on screen size, the code is as follows −" }, { "code": null, "e": 1268, "s": 1257, "text": " Live Demo" }, { "code": null, "e": 1897, "s": 1268, "text": "<!DOCTYPE html>\n<html>\n<head...
Statistical Functions in Excel With Examples
07 Oct, 2021 To begin with, statistical function in Excel let’s first understand what is statistics and why we need it? So, statistics is a branch of sciences that can give a property to a sample. It deals with collecting, organizing, analyzing, and presenting the data. One of the great mathematicians Karl Pearson, als...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Oct, 2021" }, { "code": null, "e": 423, "s": 28, "text": "To begin with, statistical function in Excel let’s first understand what is statistics and why we need it? So, statistics is a branch of sciences that can give a property to a...
Flutter – Loading Progress Indicator Button
30 Nov, 2021 In this article, we will learn about the Loading Progress Indicator Button in Flutter. Progress Indicator informs customers and users who are using the app about the ongoing Process such as loading an app, submitting a form, or uploading a document online. As the loading gets completed successfully we get ...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Nov, 2021" }, { "code": null, "e": 115, "s": 28, "text": "In this article, we will learn about the Loading Progress Indicator Button in Flutter." }, { "code": null, "e": 353, "s": 115, "text": "Progress Indicator ...
Tailwind CSS Grid Template Columns
23 Mar, 2022 This class accepts more than one value in tailwind CSS all the properties are covered as in class form. It is the alternative of CSS grid-template-columns property in CSS. It is used to set the number of columns and size of the columns of the grid, here we will do the same but for fast development of front...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Mar, 2022" }, { "code": null, "e": 416, "s": 28, "text": "This class accepts more than one value in tailwind CSS all the properties are covered as in class form. It is the alternative of CSS grid-template-columns property in CSS. It ...
Getting Data From Microsoft Exchange Server in Java - GeeksforGeeks
04 Dec, 2020 In the software industry, many programs require information that you need to fetch from some kind of previously existing business software. In other words, you will probably come across the need to integrate with software from Microsoft, Salesforce, SAP, and other software giants. And, although it might se...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n04 Dec, 2020" }, { "code": null, "e": 25585, "s": 25225, "text": "In the software industry, many programs require information that you need to fetch from some kind of previously existing business software. In other words, you wil...
C# | Dictionary.Count Property - GeeksforGeeks
01 Feb, 2019 This property is used to get the number of key/value pairs contained in the Dictionary. Syntax: public int Count { get; } Return Value : The number of key/value pairs contained in the Dictionary. Below are the programs to illustrate the use of above-discussed property: Example 1: // C# code to count the n...
[ { "code": null, "e": 25547, "s": 25519, "text": "\n01 Feb, 2019" }, { "code": null, "e": 25635, "s": 25547, "text": "This property is used to get the number of key/value pairs contained in the Dictionary." }, { "code": null, "e": 25643, "s": 25635, "text": "Sy...
Angular PrimeNG Rating Component - GeeksforGeeks
26 Aug, 2021 Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will know how to use the Rating component in Angular PrimeNG. Let’s learn about the pro...
[ { "code": null, "e": 26354, "s": 26326, "text": "\n26 Aug, 2021" }, { "code": null, "e": 26745, "s": 26354, "text": "Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make resp...
Matplotlib.axes.Axes.fill_between() in Python - GeeksforGeeks
13 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. The Axe...
[ { "code": null, "e": 26079, "s": 26051, "text": "\n13 Apr, 2020" }, { "code": null, "e": 26177, "s": 26079, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library." }, { "code": null, "e": 26379, "s": 26177, "...
Node.js path.extname() Method - GeeksforGeeks
13 Oct, 2021 The path.extname() method is used to get the extension portion of a file path. The extension string returned from the last occurrence of a period (.) in the path to the end of the path string. If there are no periods in the file path, then an empty string is returned. Syntax: path.extname( path ) Parameter...
[ { "code": null, "e": 38501, "s": 38473, "text": "\n13 Oct, 2021" }, { "code": null, "e": 38770, "s": 38501, "text": "The path.extname() method is used to get the extension portion of a file path. The extension string returned from the last occurrence of a period (.) in the path t...
ReactJS Blueprint Toast Component - GeeksforGeeks
08 Apr, 2022 BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop applications. Toast Component provides a way for users to the user to show an ephemeral message as an overlay. We can use the following approach in...
[ { "code": null, "e": 26557, "s": 26529, "text": "\n08 Apr, 2022" }, { "code": null, "e": 26731, "s": 26557, "text": "BlueprintJS is a React-based UI toolkit for the web. This library is very optimized and popular for building interfaces that are complex data-dense for desktop app...
C | Loops & Control Structure | Question 1 - GeeksforGeeks
09 Jan, 2013 #include <stdio.h> int main(){ int i = 1024; for (; i; i >>= 1) printf("GeeksQuiz"); return 0;} How many times will GeeksQuiz be printed in the above program?(A) 10(B) 11(C) Infinite(D) The program will show compile-time errorAnswer: (B)Explanation: In for loop, mentioning expression is op...
[ { "code": null, "e": 26057, "s": 26029, "text": "\n09 Jan, 2013" }, { "code": "#include <stdio.h> int main(){ int i = 1024; for (; i; i >>= 1) printf(\"GeeksQuiz\"); return 0;}", "e": 26170, "s": 26057, "text": null }, { "code": null, "e": 26592, ...
Remove all the occurrences of an element from a list in Python - GeeksforGeeks
09 Apr, 2022 The task is to perform the operation of removing all the occurrences of a given item/element present in a list. Examples : Input : 1 1 2 3 4 5 1 2 1 Output : 2 3 4 5 2 Explanation : The input list is [1, 1, 2, 3, 4, 5, 1, 2] and the item to be removed is 1. After removing the item, the output list is [2, 3...
[ { "code": null, "e": 25562, "s": 25534, "text": "\n09 Apr, 2022" }, { "code": null, "e": 25685, "s": 25562, "text": "The task is to perform the operation of removing all the occurrences of a given item/element present in a list. Examples :" }, { "code": null, "e": 259...
Most Useful CMD Commands in Windows - GeeksforGeeks
31 Aug, 2021 CMD Commands are the most preferred way of doing anything to computer experts and coders. Today we’re going to learn some useful commands that make our work easy and productive. Most Useful CMD Commands in Windows Usually, when we open our command prompt, we see in the left corner path of the current direc...
[ { "code": null, "e": 26007, "s": 25979, "text": "\n31 Aug, 2021" }, { "code": null, "e": 26185, "s": 26007, "text": "CMD Commands are the most preferred way of doing anything to computer experts and coders. Today we’re going to learn some useful commands that make our work easy a...
Heap and Priority Queue using heapq module in Python - GeeksforGeeks
10 May, 2022 Heaps are widely used tree-like data structures in which the parent nodes satisfy any one of the criteria given below. The value of the parent node in each level is less than or equal to its children’s values – min-heap. The value of the parent node in each level higher than or equal to its children’s valu...
[ { "code": null, "e": 25581, "s": 25553, "text": "\n10 May, 2022" }, { "code": null, "e": 25700, "s": 25581, "text": "Heaps are widely used tree-like data structures in which the parent nodes satisfy any one of the criteria given below." }, { "code": null, "e": 25802, ...
How To Compare Two Dataframes with Pandas compare?
12 Nov, 2020 A DataFrame is a 2D structure composed of rows and columns, and where data is stored into a tubular form. It is mutable in terms of size, and heterogeneous tabular data. Arithmetic operations can also be performed on both row and column labels. To know more about the creation of Pandas DataFrame. Here, we ...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Nov, 2020" }, { "code": null, "e": 273, "s": 28, "text": "A DataFrame is a 2D structure composed of rows and columns, and where data is stored into a tubular form. It is mutable in terms of size, and heterogeneous tabular data. Arith...
What is a Pointer to a Null pointer
16 Jun, 2022 NULL pointer in C At the very high level, we can think of NULL as a null pointer which is used in C for various purposes. Some of the most common use cases for NULL are To initialize a pointer variable when that pointer variable isn’t assigned any valid memory address yet. To initialize a pointer variable...
[ { "code": null, "e": 54, "s": 26, "text": "\n16 Jun, 2022" }, { "code": null, "e": 223, "s": 54, "text": "NULL pointer in C At the very high level, we can think of NULL as a null pointer which is used in C for various purposes. Some of the most common use cases for NULL are" },...
Sum of the nodes of a Singly Linked List
26 Oct, 2021 Given a singly linked list. The task is to find the sum of nodes of the given linked list. Task is to do A + B + C + D. Examples: Input: 7->6->8->4->1 Output: 26 Sum of nodes: 7 + 6 + 8 + 4 + 1 = 26 Input: 1->7->3->9->11->5 Output: 36 Recursive Solution: Call a function by passing the head and vari...
[ { "code": null, "e": 54, "s": 26, "text": "\n26 Oct, 2021" }, { "code": null, "e": 146, "s": 54, "text": "Given a singly linked list. The task is to find the sum of nodes of the given linked list. " }, { "code": null, "e": 175, "s": 146, "text": "Task is to do...
DAX Time Intelligence - DATEADD function
Returns a table that contains a column of dates, shifted either forward or backward in time by the specified number of intervals from the dates in the current context. DATEADD (<dates>, <number_of_intervals>, <interval>) dates A column that contains dates. number_of_intervals A column that contains dates. interval Th...
[ { "code": null, "e": 2169, "s": 2001, "text": "Returns a table that contains a column of dates, shifted either forward or backward in time by the specified number of intervals from the dates in the current context." }, { "code": null, "e": 2224, "s": 2169, "text": "DATEADD (<date...
Convert a data frame with grouping column into a list based on groups in R.
To convert a data frame with grouping column into a list based on groups, we can use split function. For Example, if we have a data frame called df that contains a categorical column say Group and a numerical column say DV then we can convert df into a list based on groups in Group column by using the command as mentio...
[ { "code": null, "e": 1163, "s": 1062, "text": "To convert a data frame with grouping column into a list based on groups, we can use\nsplit function." }, { "code": null, "e": 1394, "s": 1163, "text": "For Example, if we have a data frame called df that contains a categorical colum...
HTML DOM customElements define() Method - GeeksforGeeks
14 Jul, 2020 The customElements define() method is used to define a new custom element. There are two types of custom elements that can be created: Autonomous custom element: These elements do not inherit from built-in HTML elements. Customized built-in element: These elements inherit from built-in HTML elements. Synta...
[ { "code": null, "e": 26139, "s": 26111, "text": "\n14 Jul, 2020" }, { "code": null, "e": 26274, "s": 26139, "text": "The customElements define() method is used to define a new custom element. There are two types of custom elements that can be created:" }, { "code": null, ...
Automatic Birthday mail sending with Python - GeeksforGeeks
25 Jan, 2022 Are you bored with sending birthday wishes to your friends or do you forget to send wishes to your friends or do you want to wish them at 12 AM but you always fall asleep? Why not automate this simple task by writing a Python script. The first thing we do is import six libraries: pandas datetime smtplib t...
[ { "code": null, "e": 26211, "s": 26183, "text": "\n25 Jan, 2022" }, { "code": null, "e": 26445, "s": 26211, "text": "Are you bored with sending birthday wishes to your friends or do you forget to send wishes to your friends or do you want to wish them at 12 AM but you always fall...
Arduino - Tone Library
In this chapter, we will use the Arduino Tone Library. It is nothing but an Arduino Library, which produces square-wave of a specified frequency (and 50% duty cycle) on any Arduino pin. A duration can optionally be specified, otherwise the wave continues until the stop() function is called. The pin can be connected to ...
[ { "code": null, "e": 3237, "s": 2870, "text": "In this chapter, we will use the Arduino Tone Library. It is nothing but an Arduino Library, which produces square-wave of a specified frequency (and 50% duty cycle) on any Arduino pin. A duration can optionally be specified, otherwise the wave continue...
Python | Convert string dictionary to dictionary - GeeksforGeeks
22 May, 2019 Interconversions of data types have been discussed many times and have been quite a popular problem to solve. This article discusses yet another problem of interconversion of dictionary, in string format to a dictionary. Let’s discuss certain ways in which this can be done. Method #1 : Using json.loads() T...
[ { "code": null, "e": 24136, "s": 24108, "text": "\n22 May, 2019" }, { "code": null, "e": 24411, "s": 24136, "text": "Interconversions of data types have been discussed many times and have been quite a popular problem to solve. This article discusses yet another problem of interco...
Maximum sum of minimums of pairs in an array - GeeksforGeeks
07 Mar, 2022 Given an array arr[] of N integers where N is even, the task is to group the array elements in the pairs (X1, Y1), (X2, Y2), (X3, Y3), ... such that the sum min(X1, Y1) + min(X2, Y2) + min(X3, Y3) + ... is maximum.Examples: Input: arr[] = {1, 5, 3, 2} Output: 4 (1, 5) and (3, 2) -> 1 + 2 = 3 (1, 3) and (...
[ { "code": null, "e": 24301, "s": 24273, "text": "\n07 Mar, 2022" }, { "code": null, "e": 24527, "s": 24301, "text": "Given an array arr[] of N integers where N is even, the task is to group the array elements in the pairs (X1, Y1), (X2, Y2), (X3, Y3), ... such that the sum min(X1...
Convert an image into jpg format using Pillow in Python - GeeksforGeeks
20 Aug, 2020 Let us see how to convert an image into jpg format in Python. The size of png is larger when compared to jpg format. We also know that some applications might ask for images of smaller sizes. Hence conversion from png(larger ) to jpg(smaller) is needed.For this task we will be using the Image.convert() met...
[ { "code": null, "e": 24392, "s": 24364, "text": "\n20 Aug, 2020" }, { "code": null, "e": 24725, "s": 24392, "text": "Let us see how to convert an image into jpg format in Python. The size of png is larger when compared to jpg format. We also know that some applications might ask ...
How can BeautifulSoup be used to extract ‘href’ links from a website?
BeautifulSoup is a third party Python library that is used to parse data from web pages. It helps in web scraping, which is a process of extracting, using, and manipulating the data from different resources. Web scraping can also be used to extract data for research purposes, understand/compare market trends, perform S...
[ { "code": null, "e": 1270, "s": 1062, "text": "BeautifulSoup is a third party Python library that is used to parse data from web pages. It helps in web scraping, which is a process of extracting, using, and manipulating the data from different resources." }, { "code": null, "e": 1408, ...
Python | Append String to list - GeeksforGeeks
29 Nov, 2019 Sometimes, while working with data, we can have a problem in which we need to add elements to a container. List can contain any type of data type. Let’s discuss certain ways in which we can perform string append operation in list of integers. Method #1 : Using + operator + list conversionIn this method, we...
[ { "code": null, "e": 23994, "s": 23966, "text": "\n29 Nov, 2019" }, { "code": null, "e": 24237, "s": 23994, "text": "Sometimes, while working with data, we can have a problem in which we need to add elements to a container. List can contain any type of data type. Let’s discuss ce...
How to find the nth occurrence of substring in a string in Python?
You can find the nth occurrence of a substring in a string by splitting at the substring with max n+1 splits. If the resulting list has a size greater than n+1, it means that the substring occurs more than n times. Its index can be found by a simple formula, length of the original string - length of last splitted part ...
[ { "code": null, "e": 1409, "s": 1062, "text": "You can find the nth occurrence of a substring in a string by splitting at the substring with max n+1 splits. If the resulting list has a size greater than n+1, it means that the substring occurs more than n times. Its index can be found by a simple for...
HashSet in C#
HashSet in C# eliminates duplicate strings or elements in an array.In C#, it is an optimized set collection. Let us see an example to remove duplicate strings using C# HashSet. Here, we have duplicate elements − Live Demo using System; using System.Collections.Generic; using System.Linq; class Program { static voi...
[ { "code": null, "e": 1171, "s": 1062, "text": "HashSet in C# eliminates duplicate strings or elements in an array.In C#, it is an optimized set collection." }, { "code": null, "e": 1274, "s": 1171, "text": "Let us see an example to remove duplicate strings using C# HashSet. Here,...
PHP - session_start() Function
Sessions or session handling is a way to make the data available across various pages of a web application. The session_start() function is used to start a new session or, resume an existing one. session_start([$options]); array(Optional) This is an array representing a set of session options. This function returns a ...
[ { "code": null, "e": 2953, "s": 2757, "text": "Sessions or session handling is a way to make the data available across various pages of a web application. The session_start() function is used to start a new session or, resume an existing one." }, { "code": null, "e": 2981, "s": 2953,...
Django - Quick Guide
Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. Django makes it easier to build better web apps quickly and with less code. Note − Django is a registered trademark of the Django Software Foundation, and is licensed under BSD License. 2003 − Started by Adrian Ho...
[ { "code": null, "e": 2228, "s": 2045, "text": "Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. Django makes it easier to build better web apps quickly and with less code." }, { "code": null, "e": 2338, "s": 2228, "text": ...
Functions with R and rvest: A Laymen’s Guide | by peterjgensler | Towards Data Science
If there had to be one topic that was so hard to comprehend after using R, it has to be functions. Everything from writing a function, to learning how to debug a function has just never had some clear instructions on how to do so. In addition, there are tools that have come out that are meant to help with this task, bu...
[ { "code": null, "e": 755, "s": 172, "text": "If there had to be one topic that was so hard to comprehend after using R, it has to be functions. Everything from writing a function, to learning how to debug a function has just never had some clear instructions on how to do so. In addition, there are t...
ReactJS - Quick Guide
ReactJS is a simple, feature rich, component based JavaScript UI library. It can be used to develop small applications as well as big, complex applications. ReactJS provides minimal and solid feature set to kick-start a web application. React community compliments React library by providing large set of ready-made comp...
[ { "code": null, "e": 2519, "s": 2033, "text": "ReactJS is a simple, feature rich, component based JavaScript UI library. It can be used to develop small applications as well as big, complex applications. ReactJS provides minimal and solid feature set to kick-start a web application. React community ...
Python - Google Maps
Python provides modules which can be used to translate addresses available in google map directly to geographic coordinates. It is helpful in finding business addresses and locating the closeness of different addresses. We use a module named pygeocoder which provides the functionalities to receive addresses and geocod...
[ { "code": null, "e": 2547, "s": 2326, "text": "Python provides modules which can be used to translate addresses available in google map directly to geographic coordinates. It is helpful in finding business addresses and locating the closeness of different addresses. " }, { "code": null, ...
Batch Script - DIR
This batch command lists the contents of a directory. dir The following example shows the different variants of the dir command. @echo off Rem All the directory listings from C:\ will be routed to the file lists.txt dir C:\>C:\lists.txt Rem Lists all directories and subdirectories recursively dir /s Rem Lists the cont...
[ { "code": null, "e": 2223, "s": 2169, "text": "This batch command lists the contents of a directory." }, { "code": null, "e": 2228, "s": 2223, "text": "dir\n" }, { "code": null, "e": 2299, "s": 2228, "text": "The following example shows the different variants ...
Use Cython to get more than 30X speedup on your Python code | by George Seif | Towards Data Science
Want to be inspired? Come join my Super Quotes newsletter. 😎 Python is a community favourite programming language! It’s by far one of the easiest to use as code is written in an intuitive, human-readable way. Yet you’ll often hear the same complaint about Python over and over again, especially from the C code gurus ou...
[ { "code": null, "e": 233, "s": 172, "text": "Want to be inspired? Come join my Super Quotes newsletter. 😎" }, { "code": null, "e": 381, "s": 233, "text": "Python is a community favourite programming language! It’s by far one of the easiest to use as code is written in an intuiti...
JUnit - Parameterized Test
JUnit 4 has introduced a new feature called parameterized tests. Parameterized tests allow a developer to run the same test over and over again using different values. There are five steps that you need to follow to create a parameterized test. Annotate test class with @RunWith(Parameterized.class). Annotate test class...
[ { "code": null, "e": 2217, "s": 1972, "text": "JUnit 4 has introduced a new feature called parameterized tests. Parameterized tests allow a developer to run the same test over and over again using different values. There are five steps that you need to follow to create a parameterized test." }, ...
DynamoDB - Access Control
DynamoDB uses credentials you provide to authenticate requests. These credentials are required and must include permissions for AWS resource access. These permissions span virtually every aspect of DynamoDB down to the minor features of an operation or functionality. In this section, we will discuss regarding the vario...
[ { "code": null, "e": 2659, "s": 2391, "text": "DynamoDB uses credentials you provide to authenticate requests. These credentials are required and must include permissions for AWS resource access. These permissions span virtually every aspect of DynamoDB down to the minor features of an operation or ...
Extract Content from Java Class File
How to extract content from a java .class file using java. Following is the program to extract content from a java .class file using java. import java.io.File; import java.io.FileInputStream; import java.io.IOException; import org.apache.tika.exception.TikaException; import org.apache.tika.metadata.Metadata; import or...
[ { "code": null, "e": 2127, "s": 2068, "text": "How to extract content from a java .class file using java." }, { "code": null, "e": 2207, "s": 2127, "text": "Following is the program to extract content from a java .class file using java." }, { "code": null, "e": 3451, ...
Check if a string can be repeated to make another string - GeeksforGeeks
13 May, 2021 Given two strings a and b, the task is to check how many times the string a can be repeated to generate the string b. If b cannot be generated by repeating a then print -1.Examples: Input: a = “geeks”, b = “geeksgeeks” Output: 2 “geeks” can be repeated twice to generate “geeksgeeks”Input: a = “df”, b = “...
[ { "code": null, "e": 25408, "s": 25380, "text": "\n13 May, 2021" }, { "code": null, "e": 25592, "s": 25408, "text": "Given two strings a and b, the task is to check how many times the string a can be repeated to generate the string b. If b cannot be generated by repeating a then ...
Classic for Loop Implementation
Following is the classic ‘for’ statement which is available in most programming languages. for(variable declaration;expression;Increment) { statement #1 statement #2 ... } The Batch Script language does not have a direct ‘for’ statement which is similar to the above syntax, but one can still do an implementat...
[ { "code": null, "e": 2260, "s": 2169, "text": "Following is the classic ‘for’ statement which is available in most programming languages." }, { "code": null, "e": 2351, "s": 2260, "text": "for(variable declaration;expression;Increment) {\n statement #1\n statement #2\n ...\...
What is Two-Stream Self-Attention in XLNet | by Xu LIANG | Towards Data Science
In my previous post What is XLNet and why it outperforms BERT, I mainly talked about the difference between XLNet (AR language model) and BERT (AE language model) and the Permutation Language Modeling. I believe that having an intuitive understanding of XLNet is far important than the implementation detail, so I only e...
[ { "code": null, "e": 249, "s": 47, "text": "In my previous post What is XLNet and why it outperforms BERT, I mainly talked about the difference between XLNet (AR language model) and BERT (AE language model) and the Permutation Language Modeling." }, { "code": null, "e": 699, "s": 249...
Equilibrium Point | Practice | GeeksforGeeks
Given an array A of n positive numbers. The task is to find the first Equilibium Point in the array. Equilibrium Point in an array is a position such that the sum of elements before it is equal to the sum of elements after it. Note: Retun the index of Equilibrium point. (1-based index) Example 1: Input: n = 5 A[] = ...
[ { "code": null, "e": 466, "s": 238, "text": "Given an array A of n positive numbers. The task is to find the first Equilibium Point in the array. \nEquilibrium Point in an array is a position such that the sum of elements before it is equal to the sum of elements after it." }, { "code": null...
How to modularize code in ReactJS ? - GeeksforGeeks
08 Oct, 2021 Modularized code is divided into segments or modules, where each file is responsible for a feature or specific functionality. React code can easily be modularized by using the component structure. The approach is to define each component into different files. With each component separated into different fi...
[ { "code": null, "e": 24397, "s": 24369, "text": "\n08 Oct, 2021" }, { "code": null, "e": 24907, "s": 24397, "text": "Modularized code is divided into segments or modules, where each file is responsible for a feature or specific functionality. React code can easily be modularized ...
Querying age from DOB in MySQL?
Let us first create a table − mysql> create table DemoTable611 (DOB date); Query OK, 0 rows affected (0.99 sec) Insert some records in the table using insert command − mysql> insert into DemoTable611 values('1996-04-21'); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable611 values('2001-01-31'); Query OK...
[ { "code": null, "e": 1092, "s": 1062, "text": "Let us first create a table −" }, { "code": null, "e": 1174, "s": 1092, "text": "mysql> create table DemoTable611 (DOB date);\nQuery OK, 0 rows affected (0.99 sec)" }, { "code": null, "e": 1230, "s": 1174, "text":...
How can I source a Python file from another Python file?
In order to source a Python file from another python file, you have to use it like a module. import the file you want to run and run its functions. For example, say you want to import fileB.py into fileA.py, assuming the files are in the same directory, inside fileA you'd write import fileB Now in fileA, you can call a...
[ { "code": null, "e": 1341, "s": 1062, "text": "In order to source a Python file from another python file, you have to use it like a module. import the file you want to run and run its functions. For example, say you want to import fileB.py into fileA.py, assuming the files are in the same directory,...
Python - Convert String Truth values to Boolean - GeeksforGeeks
02 Sep, 2020 Given a String List, convert the String Truth values to Boolean values. Input : test_list = [“True”, “False”, “True”, “False”]Output : [True, False, True, False]Explanation : String booleans converted to actual Boolean. Input : test_list = [“True”]Output : [True]Explanation : String boolean converted to ac...
[ { "code": null, "e": 24465, "s": 24437, "text": "\n02 Sep, 2020" }, { "code": null, "e": 24537, "s": 24465, "text": "Given a String List, convert the String Truth values to Boolean values." }, { "code": null, "e": 24685, "s": 24537, "text": "Input : test_list ...
How to generate XML from Python dictionary?
To generate XML from a python dictionary, you need to install the dicttoxml package. You can install it using: $ pip install dicttoxml Once installed, you can use the dicttoxml method to create the xml. a = { 'foo': 45, 'bar': { 'baz': "Hello" } } xml = dicttoxml.dicttoxml(a) print(xml) This will give t...
[ { "code": null, "e": 1173, "s": 1062, "text": "To generate XML from a python dictionary, you need to install the dicttoxml package. You can install it using:" }, { "code": null, "e": 1197, "s": 1173, "text": "$ pip install dicttoxml" }, { "code": null, "e": 1266, ...
Streams in Java
Stream is a new abstract layer introduced in Java 8. Using stream, you can process data in a declarative way similar to SQL statements. For example, consider the following SQL statement. SELECT max(salary), employee_id, employee_name FROM Employee The above SQL expression automatically returns the maximum salaried empl...
[ { "code": null, "e": 1249, "s": 1062, "text": "Stream is a new abstract layer introduced in Java 8. Using stream, you can process data in a declarative way similar to SQL statements. For example, consider the following SQL statement." }, { "code": null, "e": 1310, "s": 1249, "tex...
Universal Selector in CSS
The CSS * selector is a universal selector which is used to select all elements of the HTML DOM. The syntax for CSS universal selector is as follows − * { /*declarations*/ } The following examples illustrate CSS universal selector − Live Demo <!DOCTYPE html> <html> <head> <style> * { margin: 15px; padding: 5p...
[ { "code": null, "e": 1159, "s": 1062, "text": "The CSS * selector is a universal selector which is used to select all elements of the HTML DOM." }, { "code": null, "e": 1213, "s": 1159, "text": "The syntax for CSS universal selector is as follows −" }, { "code": null, ...