title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
shown.bs.modal Bootstrap Event
The shown.bs.modal event in Bootstrap fires when the modal is completely displayed. Here, on button click the modal would generate. The following is our button − <button type="button" class="btn btn-default btn-lg" id="button1"> Result </button> The following is the script to generate our modal on button click − $("#...
[ { "code": null, "e": 1146, "s": 1062, "text": "The shown.bs.modal event in Bootstrap fires when the modal is completely displayed." }, { "code": null, "e": 1224, "s": 1146, "text": "Here, on button click the modal would generate. The following is our button −" }, { "code"...
Java BufferedImage Class
Java BufferedImage class is a subclass of Image class. It is used to handle and manipulate the image data. A BufferedImage is made of ColorModel of image data. All BufferedImage objects have an upper left corner coordinate of (0, 0). This class supports three types of constructors. The first constructor constructs a ne...
[ { "code": null, "e": 2571, "s": 2337, "text": "Java BufferedImage class is a subclass of Image class. It is used to handle and manipulate the image data. A BufferedImage is made of ColorModel of image data. All BufferedImage objects have an upper left corner coordinate of (0, 0)." }, { "code...
Python – Replace None with Empty Dictionary
01 Oct, 2020 Given a dictionary, replace None values in every nesting with an empty dictionary. Input : test_dict = {“Gfg” : {1 : None, 7 : None}, “is” : None, “Best” : [1, { 5 : None }, 9, 3]} Output : {‘Gfg’: {1: {}, 7: {}}, ‘is’: {}, ‘Best’: [1, {5: {}}, 9, 3]} Explanation : All None values are replaced by empty dic...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Oct, 2020" }, { "code": null, "e": 111, "s": 28, "text": "Given a dictionary, replace None values in every nesting with an empty dictionary." }, { "code": null, "e": 346, "s": 111, "text": "Input : test_dict = {“G...
Triplet Sum in Array | Practice | GeeksforGeeks
Given an array arr of size n and an integer X. Find if there's a triplet in the array which sums up to the given integer X. Example 1: Input: n = 6, X = 13 arr[] = [1 4 45 6 10 8] Output: 1 Explanation: The triplet {1, 4, 8} in the array sums up to 13. Example 2: Input: n = 5, X = 10 arr[] = [1 2 4 3 6] Output: 1 Ex...
[ { "code": null, "e": 363, "s": 238, "text": "Given an array arr of size n and an integer X. Find if there's a triplet in the array which sums up to the given integer X. " }, { "code": null, "e": 375, "s": 363, "text": "\nExample 1:" }, { "code": null, "e": 494, "s...
Initializing HashSet in Java
17 Mar, 2022 Set in Java is an interface which extends Collection. It is an unordered collection of objects in which duplicate values cannot be stored. Basically, set is implemented by HashSet, LinkedHashSet or TreeSet (sorted representation). Set has various methods to add, remove clear, size, etc to enhance the usage...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 Mar, 2022" }, { "code": null, "e": 609, "s": 52, "text": "Set in Java is an interface which extends Collection. It is an unordered collection of objects in which duplicate values cannot be stored. Basically, set is implemented by Ha...
Python PIP
23 Aug, 2021 In this article, we will discuss what is pip, how to install, upgrade and uninstall packages using pip. So before starting using let us understand what is pip? Python pip is the package manager for Python packages. We can use pip to install packages that do not come with Python. The basic syntax of pip com...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Aug, 2021" }, { "code": null, "e": 188, "s": 28, "text": "In this article, we will discuss what is pip, how to install, upgrade and uninstall packages using pip. So before starting using let us understand what is pip?" }, { "...
How to call a Java function inside JavaScript Function?
JavaScript cannot call java method directly since it is on the server. You need a Java framework like JSP to call when a request is received from JavaScript. Let’s see how to use JSP to call a Java function inside JavaScript function. Here’s the JavaScript code: //javascript code function initiateFunc() { $.get('loc...
[ { "code": null, "e": 1422, "s": 1187, "text": "JavaScript cannot call java method directly since it is on the server. You need a Java framework like JSP to call when a request is received from JavaScript. Let’s see how to use JSP to call a Java function inside JavaScript function." }, { "cod...
Count of all unique substrings with non-repeating characters
10 Mar, 2022 Given a string str consisting of lowercase characters, the task is to find the total numbers of unique substrings with non-repeating characters.Examples: Input: str = “abba” Output: 4 Explanation: There are 4 unique substrings. They are: “a”, “ab”, “b”, “ba”.Input: str = “acbacbacaa” Output: 10 Appro...
[ { "code": null, "e": 54, "s": 26, "text": "\n10 Mar, 2022" }, { "code": null, "e": 210, "s": 54, "text": "Given a string str consisting of lowercase characters, the task is to find the total numbers of unique substrings with non-repeating characters.Examples: " }, { "cod...
SQL | Declare Local Temporary Table
19 Aug, 2020 Declare Local Temporary Table statement used to create a temporary table. A temporary table is where the rows in it are visible only to the connection that created the table and inserted the rows. Syntax – DECLARE LOCAL TEMPORARY TABLE table-name ( column-name [ column-value ] ); Example : DECLARE LOCAL T...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Aug, 2020" }, { "code": null, "e": 225, "s": 28, "text": "Declare Local Temporary Table statement used to create a temporary table. A temporary table is where the rows in it are visible only to the connection that created the table a...
Python | Calculate City Block Distance
11 May, 2020 City block distance is generally calculated between 2-coordinates of a paired object. It is the summation of absolute difference between 2-coordinates. The city block distance of 2-points a and b with k dimension is mathematically calculated using below formula: In this article two solution are explained f...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 May, 2020" }, { "code": null, "e": 291, "s": 28, "text": "City block distance is generally calculated between 2-coordinates of a paired object. It is the summation of absolute difference between 2-coordinates. The city block distance...
When to use static vs instantiated classes in PHP?
30 Apr, 2019 Prerequisite – Static Function PHP In PHP, we can have both static as well as non-static (instantiated) classes. Static class Introduction: A static class in PHP is a type of class which is instantiated only once in a program. It must contain a static member (variable) or a static member function (method) ...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 Apr, 2019" }, { "code": null, "e": 89, "s": 54, "text": "Prerequisite – Static Function PHP" }, { "code": null, "e": 167, "s": 89, "text": "In PHP, we can have both static as well as non-static (instantiated) cla...
Node.js Building simple REST API in express
14 Oct, 2021 Let’s have a brief introduction about the Express framework before starting the code section:Express: It is an open-source NodeJs web application framework designed to develop websites, web applications, and APIs in a pretty easier way. Express helps us to handle different HTTP requests at specific routes....
[ { "code": null, "e": 54, "s": 26, "text": "\n14 Oct, 2021" }, { "code": null, "e": 450, "s": 54, "text": "Let’s have a brief introduction about the Express framework before starting the code section:Express: It is an open-source NodeJs web application framework designed to develo...
URL getQuery() method in Java with Examples
31 Dec, 2018 The getQuery() function is a part of URL class. The function getQuery() returns the Query of a specified URL. Function Signature: public String getQuery() Syntax: url.getQuery() Parameter: This function does not require any parameter Return Type: The function returns String Type Query of a specified URL. B...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Dec, 2018" }, { "code": null, "e": 138, "s": 28, "text": "The getQuery() function is a part of URL class. The function getQuery() returns the Query of a specified URL." }, { "code": null, "e": 158, "s": 138, "text...
Radio Button in Excel
20 May, 2021 Radio button, also known as Option Button is used extensively when we have a choice of selecting one option from a set of predefined options. We can see radio buttons on websites during a Review or Feedback, Survey or in online competitive exams mostly. It looks like a small circle and when we click on it ...
[ { "code": null, "e": 54, "s": 26, "text": "\n20 May, 2021" }, { "code": null, "e": 494, "s": 54, "text": "Radio button, also known as Option Button is used extensively when we have a choice of selecting one option from a set of predefined options. We can see radio buttons on webs...
JavaScript Date toLocaleString() Method
21 Oct, 2021 Below is the example of Date toLocaleString() method. Example:<script> var d = new Date(Date.UTC(2020, 9, 26, 7, 0, 0)); var result = d.toLocaleString(); document.write("Date and Time of apocalypse: " + result);</script> <script> var d = new Date(Date.UTC(2020, 9, 26, 7, ...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Oct, 2021" }, { "code": null, "e": 82, "s": 28, "text": "Below is the example of Date toLocaleString() method." }, { "code": null, "e": 281, "s": 82, "text": "Example:<script> var d = new Date(Date.UTC(2020, 9,...
iomanip setprecision() function in C++ with Examples
18 Feb, 2022 The setprecision() method of iomanip library in C++ is used to set the ios library floating point precision based on the precision specified as the parameter to this method. Syntax: setprecision(int n) Parameters: This method accepts n as a parameter which is the integer argument corresponding to which the...
[ { "code": null, "e": 53, "s": 25, "text": "\n18 Feb, 2022" }, { "code": null, "e": 227, "s": 53, "text": "The setprecision() method of iomanip library in C++ is used to set the ios library floating point precision based on the precision specified as the parameter to this method."...
Is sizeof for a struct equal to the sum of sizeof of each member?
21 Aug, 2019 Prerequisite : sizeof operator in CThe sizeof for a struct is not always equal to the sum of sizeof of each individual member. This is because of the padding added by the compiler to avoid alignment issues. Padding is only added when a structure member is followed by a member with a larger size or at the e...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Aug, 2019" }, { "code": null, "e": 380, "s": 52, "text": "Prerequisite : sizeof operator in CThe sizeof for a struct is not always equal to the sum of sizeof of each individual member. This is because of the padding added by the com...
Sqrt (or Square Root) Decomposition | Set 2 (LCA of Tree in O(sqrt(height)) time)
07 Jul, 2022 Prerequisite: Introduction and DFSThe task is to find LCA of two given nodes in a tree (not necessarily a Binary Tree). In previous posts, we have seen how to calculate LCA using the Sparse Matrix DP approach. In this post, we will see an optimization done on the Naive method by sqrt decomposition techniqu...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Jul, 2022" }, { "code": null, "e": 402, "s": 52, "text": "Prerequisite: Introduction and DFSThe task is to find LCA of two given nodes in a tree (not necessarily a Binary Tree). In previous posts, we have seen how to calculate LCA u...
Apache Oozie - Property File
Oozie workflows can be parameterized. The parameters come from a configuration file called as property file. We can run multiple jobs using same workflow by using multiple .property files (one property for each job). Suppose we want to change the jobtracker url or change the script name or value of a param. We can spec...
[ { "code": null, "e": 1992, "s": 1775, "text": "Oozie workflows can be parameterized. The parameters come from a configuration file called as property file. We can run multiple jobs using same workflow by using multiple .property files (one property for each job)." }, { "code": null, "e":...
Java String compareToIgnoreCase() Method
❮ String Methods Compare two strings, ignoring lower case and upper case differences: String myStr1 = "HELLO"; String myStr2 = "hello"; System.out.println(myStr1.compareToIgnoreCase(myStr2)); Try it Yourself » The compareToIgnoreCase() method compares two strings lexicographically, ignoring lower case and upper cas...
[ { "code": null, "e": 19, "s": 0, "text": "\n❮ String Methods\n" }, { "code": null, "e": 88, "s": 19, "text": "Compare two strings, ignoring lower case and upper case differences:" }, { "code": null, "e": 194, "s": 88, "text": "String myStr1 = \"HELLO\";\nStrin...
Analysis of Top 50 Spotify Songs using Python | by Sadrach Pierre, Ph.D. | Towards Data Science
What were the most popular songs of 2019? Which genres were most popular in 2019? Which artists were most popular? In this post we will analyze the Top 50 Spotify Songs data set, which can be found on Kaggle. The data set provides the 50 most listened to songs on Spotify in 2019. It was extracted from the Organize Your...
[ { "code": null, "e": 287, "s": 172, "text": "What were the most popular songs of 2019? Which genres were most popular in 2019? Which artists were most popular?" }, { "code": null, "e": 505, "s": 287, "text": "In this post we will analyze the Top 50 Spotify Songs data set, which c...
GitLab - Restore Backup
GitLab allows restoring the backup copy of your repository. In this chapter, we will discuss about how to restore the backup copy in the GitLab − Step 1 − First, login to your GitLab server using SSH (Secure Shell). Step 2 − Before restoring the backup copy, first make sure backup copy is in the /var/opt/gitlab/backups...
[ { "code": null, "e": 2470, "s": 2324, "text": "GitLab allows restoring the backup copy of your repository. In this chapter, we will discuss about how to restore the backup copy in the GitLab −" }, { "code": null, "e": 2540, "s": 2470, "text": "Step 1 − First, login to your GitLab...
Java Program to Print all unique words of a String
To find unique words in a string use Map utility of java because of its property that it does not contain duplicate keys.In order to find unique words first get all words in array so that compare each word,for this split string on the basis of space/s.If other characters such as comma(,) or fullstop (.) are present the...
[ { "code": null, "e": 1453, "s": 1062, "text": "To find unique words in a string use Map utility of java because of its property that it does not contain duplicate keys.In order to find unique words first get all words in array so that compare each word,for this split string on the basis of space/s.I...
Tcl - Relational Operators
Following table shows all the relational operators supported by Tcl language. Assume variable A holds 10 and variable B holds 20, then − Try the following example to understand all the relational operators available in Tcl language − #!/usr/bin/tclsh set a 21 set b 10 if { $a == $b } { puts "Line 1 - a is equal to...
[ { "code": null, "e": 2338, "s": 2201, "text": "Following table shows all the relational operators supported by Tcl language. Assume variable A holds 10 and variable B holds 20, then −" }, { "code": null, "e": 2435, "s": 2338, "text": "Try the following example to understand all t...
Use Python to Automate the PowerPoint Update | by Yeung WONG | Towards Data Science
After the two articles about using Microsoft Excel smarter, I have received a few direct messages saying that they are interested in this area and hope I could share more on other office products. It stimulates me to make a collection series of articles related to office tips. And the first one is Microsoft PowerPoint....
[ { "code": null, "e": 531, "s": 171, "text": "After the two articles about using Microsoft Excel smarter, I have received a few direct messages saying that they are interested in this area and hope I could share more on other office products. It stimulates me to make a collection series of articles r...
Customer Segmentation in Online Retail | by Rahul Khandelwal | Towards Data Science
In this article, I am going to write about how to carry out customer segmentation and other related analysis on online retail data using python. This is going to get a bit long, so feel free to go through some sections at a time and come back again. Before going into the definition of customer segmentation, let us take...
[ { "code": null, "e": 316, "s": 171, "text": "In this article, I am going to write about how to carry out customer segmentation and other related analysis on online retail data using python." }, { "code": null, "e": 421, "s": 316, "text": "This is going to get a bit long, so feel ...
Dart - Splitting of String - GeeksforGeeks
20 Jul, 2020 In Dart splitting of a string can be done with the help split string function in the dart. It is a built-in function use to split the string into substring across a common character. Syntax: string_name.split(pattern) This function splits the string into substring across the given pattern and then store t...
[ { "code": null, "e": 25309, "s": 25281, "text": "\n20 Jul, 2020" }, { "code": null, "e": 25492, "s": 25309, "text": "In Dart splitting of a string can be done with the help split string function in the dart. It is a built-in function use to split the string into substring across ...
Python | Pandas Series.tz_localize - GeeksforGeeks
30 Jan, 2019 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique bu...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n30 Jan, 2019" }, { "code": null, "e": 25751, "s": 25537, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages a...
C# | Literals - GeeksforGeeks
05 Nov, 2020 The fixed values are called as Literal. Literal is a value that is used by the variables. Values can be either an integer, float or string, etc. // Here 100 is a constant/literal. int x = 100; Literals can be of the following types: Integer Literals Floating-point Literals Character Literals String L...
[ { "code": null, "e": 26550, "s": 26522, "text": "\n05 Nov, 2020" }, { "code": null, "e": 26696, "s": 26550, "text": "The fixed values are called as Literal. Literal is a value that is used by the variables. Values can be either an integer, float or string, etc. " }, { "co...
How to Create Facebook Login UI using Android Studio? - GeeksforGeeks
24 Feb, 2021 Nowadays, android apps are very popular especially social media apps. This UI has generally seen in the “Facebook Lite” App. In this article, we will create a Facebook login UI in Android. Below are the various steps on how to do it. Step 1: Create a New Project To create a new project in Android Studio pl...
[ { "code": null, "e": 26407, "s": 26379, "text": "\n24 Feb, 2021" }, { "code": null, "e": 26641, "s": 26407, "text": "Nowadays, android apps are very popular especially social media apps. This UI has generally seen in the “Facebook Lite” App. In this article, we will create a Face...
Dynamic Constructor in C++ with Examples - GeeksforGeeks
14 Dec, 2021 When allocation of memory is done dynamically using dynamic memory allocator new in a constructor, it is known as dynamic constructor. By using this, we can dynamically initialize the objects. Example 1: CPP14 #include <iostream>using namespace std; class geeks { const char* p; public: // default c...
[ { "code": null, "e": 25369, "s": 25341, "text": "\n14 Dec, 2021" }, { "code": null, "e": 25575, "s": 25369, "text": "When allocation of memory is done dynamically using dynamic memory allocator new in a constructor, it is known as dynamic constructor. By using this, we can dynami...
Operating Systems | Set 15 - GeeksforGeeks
27 Mar, 2017 Following questions have been asked in GATE CS 2006 exam. 1) Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4 and 8 time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by giving...
[ { "code": null, "e": 25263, "s": 25235, "text": "\n27 Mar, 2017" }, { "code": null, "e": 25321, "s": 25263, "text": "Following questions have been asked in GATE CS 2006 exam." }, { "code": null, "e": 25704, "s": 25321, "text": "1) Consider three processes (pro...
HTML | <area> shape Attribute - GeeksforGeeks
07 Jun, 2021 The HTML area shape Attribute is used with the coords attribute to describe the size, shape, and placement of a <area> element. Syntax: <area shape="default | rect | circle | poly"> Attribute Values: default: It is used to specify the entire region. rect: It is used to specify the rectangular region. cir...
[ { "code": null, "e": 25119, "s": 25091, "text": "\n07 Jun, 2021" }, { "code": null, "e": 25247, "s": 25119, "text": "The HTML area shape Attribute is used with the coords attribute to describe the size, shape, and placement of a <area> element." }, { "code": null, "e"...
Mysql | User-defined Variables - GeeksforGeeks
03 Sep, 2021 Mysql also supports the concept of User-defined variables, which allows passing of a value from one statement to another. A user-defined variable in Mysql is written as @var_name where, var_name is the name of the variable and can consist of alphanumeric characters, ., _, and $. A user-defined variable is ...
[ { "code": null, "e": 25189, "s": 25161, "text": "\n03 Sep, 2021" }, { "code": null, "e": 25469, "s": 25189, "text": "Mysql also supports the concept of User-defined variables, which allows passing of a value from one statement to another. A user-defined variable in Mysql is writt...
Difference between Type Casting and Type Conversion - GeeksforGeeks
08 Jun, 2020 1. Type Casting:In typing casting, a data type is converted into another data type by the programmer using the casting operator during the program design. In typing casting, the destination data type may be smaller than the source data type when converting the data type to another data type, that’s why it ...
[ { "code": null, "e": 25479, "s": 25451, "text": "\n08 Jun, 2020" }, { "code": null, "e": 25823, "s": 25479, "text": "1. Type Casting:In typing casting, a data type is converted into another data type by the programmer using the casting operator during the program design. In typin...
Java Program to Find GCD or HCF of Two Numbers - GeeksforGeeks
28 Mar, 2021 GCD (i.e. Greatest Common Divisor) or HCF (i.e. Highest Common Factor) is the largest number that can divide both the given numbers. Example: HCF of 10 and 20 is 10, and HCF of 9 and 21 is 3. Therefore, firstly find all the prime factors of both the stated numbers, then find the intersection of all those f...
[ { "code": null, "e": 25250, "s": 25222, "text": "\n28 Mar, 2021" }, { "code": null, "e": 25383, "s": 25250, "text": "GCD (i.e. Greatest Common Divisor) or HCF (i.e. Highest Common Factor) is the largest number that can divide both the given numbers." }, { "code": null, ...
How to Install Fabric in Python on Windows? - GeeksforGeeks
22 Sep, 2021 Fabric is a Python library used to execute shell commands remotely over SSH, yielding useful Python objects in return.. In this article, we will look into the process of installing the Fabric Library on Windows. The only thing that you need for installing the Scrapy module on Windows are: Python PIP or Co...
[ { "code": null, "e": 26197, "s": 26169, "text": "\n22 Sep, 2021" }, { "code": null, "e": 26409, "s": 26197, "text": "Fabric is a Python library used to execute shell commands remotely over SSH, yielding useful Python objects in return.. In this article, we will look into the proc...
Lodash _.uniq() Method - GeeksforGeeks
19 Aug, 2020 The _.uniq method is used to create an array of unique values in order, from all given arrays using SameValueZero for equality comparisons. Syntax: _.union(array) Parameters: This method accepts a single parameter as mentioned above and described below: array: This parameter holds array to inspect. Return...
[ { "code": null, "e": 25559, "s": 25531, "text": "\n19 Aug, 2020" }, { "code": null, "e": 25699, "s": 25559, "text": "The _.uniq method is used to create an array of unique values in order, from all given arrays using SameValueZero for equality comparisons." }, { "code": n...
How to Make Bluetooth Discoverable to Other Devices in Android? - GeeksforGeeks
23 Feb, 2021 In android devices, Bluetooth is a communication network protocol that allows devices to connect wirelessly to exchange data with other Bluetooth devices. In general, we can make use of Bluetooth API to implement Bluetooth functionalities, such as enable or disable Bluetooth, searching for available Blueto...
[ { "code": null, "e": 26381, "s": 26353, "text": "\n23 Feb, 2021" }, { "code": null, "e": 27973, "s": 26381, "text": "In android devices, Bluetooth is a communication network protocol that allows devices to connect wirelessly to exchange data with other Bluetooth devices. In gener...
How to refresh a page using jQuery? - GeeksforGeeks
03 Aug, 2021 Method 1: Using the location.reload(): The location.reload() method reloads the current web page emulating the clicking of the refresh button on the browser. The optional true parameter passed to the method is used to force the page to load from the server and ignore the browser cache. Syntax: location.rel...
[ { "code": null, "e": 41968, "s": 41940, "text": "\n03 Aug, 2021" }, { "code": null, "e": 42255, "s": 41968, "text": "Method 1: Using the location.reload(): The location.reload() method reloads the current web page emulating the clicking of the refresh button on the browser. The o...
How to update data in a Collection using Python? - GeeksforGeeks
17 May, 2020 MongoDB is a cross-platform, document-oriented database that works on the concept of collections and documents. MongoDB offers high speed, high availability, and high scalability. We can update data in a collection using update_one() method and update_many() method. Update_one() method updated first occur...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n17 May, 2020" }, { "code": null, "e": 25717, "s": 25537, "text": "MongoDB is a cross-platform, document-oriented database that works on the concept of collections and documents. MongoDB offers high speed, high availability, and h...
How to run a code on scroll event in jQuery? - GeeksforGeeks
20 Dec, 2021 In this article, we will discuss how to run the code when users scroll the content using jQuery. To run the code on scrolling the content, the scroll() method is used. The scroll() method is used to run the code when the user scrolls in the specified element. Syntax: $(selector).scroll(function) Parameter:...
[ { "code": null, "e": 26202, "s": 26174, "text": "\n20 Dec, 2021" }, { "code": null, "e": 26462, "s": 26202, "text": "In this article, we will discuss how to run the code when users scroll the content using jQuery. To run the code on scrolling the content, the scroll() method is u...
Node.js date-and-time Date.transform() Method - GeeksforGeeks
25 Mar, 2021 The date-and-time.Date.transform() method is used to transform date and time from the existing string format to new string format. Required Module: Install the module by npm or used it locally. By using npm: npm install date-and-time --save By using CDN link: <script src="/path/to/date-and-time.min.js"></s...
[ { "code": null, "e": 26267, "s": 26239, "text": "\n25 Mar, 2021" }, { "code": null, "e": 26398, "s": 26267, "text": "The date-and-time.Date.transform() method is used to transform date and time from the existing string format to new string format." }, { "code": null, ...
Input and Output in Python - GeeksforGeeks
18 Aug, 2021 In this article, we will see different ways in which first we can take input from users and second show output to them. Sometimes a developer might want to take user input at some point in the program. To do this Python provides an input() function. Syntax: input('prompt') where prompt is an optional strin...
[ { "code": null, "e": 25897, "s": 25869, "text": "\n18 Aug, 2021" }, { "code": null, "e": 26017, "s": 25897, "text": "In this article, we will see different ways in which first we can take input from users and second show output to them." }, { "code": null, "e": 26147,...
Type Conversion in C
25 Nov, 2020 A type cast is basically a conversion from one type to another. There are two types of type conversion: Implicit Type ConversionAlso known as ‘automatic type conversion’.Done by the compiler on its own, without any external trigger from the user.Generally takes place when in an expression more than one dat...
[ { "code": null, "e": 52, "s": 24, "text": "\n25 Nov, 2020" }, { "code": null, "e": 156, "s": 52, "text": "A type cast is basically a conversion from one type to another. There are two types of type conversion:" }, { "code": null, "e": 1314, "s": 156, "text": "...
Drawing multiple legends on the same axes in Matplotlib
To draw multiple legends on the same axes in Matplotlib, we can take the following steps − Set the figure size and adjust the padding between and around the subplots Plot lines using two lists with different labels, linewidth and linestyle. Place the first legend at the upper-right location. Add artist, i.e., first leg...
[ { "code": null, "e": 1278, "s": 1187, "text": "To draw multiple legends on the same axes in Matplotlib, we can take the following steps −" }, { "code": null, "e": 1353, "s": 1278, "text": "Set the figure size and adjust the padding between and around the subplots" }, { "c...
time.Time.String() Function in Golang With Examples
19 Apr, 2020 In Go language, time packages supplies functionality for determining as well as viewing time. The Time.String() function in Go language is used to yield the time which is formatted with the help of the format string. Moreover, this function is defined under the time package. Here, you need to import the “t...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Apr, 2020" }, { "code": null, "e": 381, "s": 28, "text": "In Go language, time packages supplies functionality for determining as well as viewing time. The Time.String() function in Go language is used to yield the time which is form...
Java Unary Operator with Examples
11 Apr, 2022 Operators constitute the basic building block to any programming language. Java too provides many types of operators which can be used according to the need to perform various calculations and functions be it logical, arithmetic, relational, etc. They are classified based on the functionality they provide....
[ { "code": null, "e": 53, "s": 25, "text": "\n11 Apr, 2022" }, { "code": null, "e": 383, "s": 53, "text": "Operators constitute the basic building block to any programming language. Java too provides many types of operators which can be used according to the need to perform variou...
Output of C programs | Set 46
29 Aug, 2017 QUE.1 What would be output following C program? #include <stdio.h>int main(){ char* str = "IncludeHelp"; printf("%c\n", *&*str); return 0;} OPTIONa) Errorb) IncludeHelpc) Id)*I Answer: c Explanation : & is a reference operator, * is de-reference operator. We can use these operators any number of ...
[ { "code": null, "e": 54, "s": 26, "text": "\n29 Aug, 2017" }, { "code": null, "e": 102, "s": 54, "text": "QUE.1 What would be output following C program?" }, { "code": "#include <stdio.h>int main(){ char* str = \"IncludeHelp\"; printf(\"%c\\n\", *&*str); return 0...
Subtree of all nodes in a tree using DFS
29 Oct, 2021 Given n nodes of a tree and their connections, print Subtree nodes of every node.Subtree of a node is defined as a tree which is a child of a node. The name emphasizes that everything which is a descendant of a tree node is a tree too, and is a subset of the larger tree. Examples : Input: N = 5 0 1 ...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Oct, 2021" }, { "code": null, "e": 325, "s": 52, "text": "Given n nodes of a tree and their connections, print Subtree nodes of every node.Subtree of a node is defined as a tree which is a child of a node. The name emphasizes that e...
Why import star in Python is a bad idea
08 Jan, 2020 Using import * in python programs is considered a bad habit because this way you are polluting your namespace, the import * statement imports all the functions and classes into your own namespace, which may clash with the functions you define or functions of other libraries that you import. Also it becomes...
[ { "code": null, "e": 53, "s": 25, "text": "\n08 Jan, 2020" }, { "code": null, "e": 548, "s": 53, "text": "Using import * in python programs is considered a bad habit because this way you are polluting your namespace, the import * statement imports all the functions and classes in...
Program for Hexagonal Pattern
06 May, 2021 Given a positive integer n, print a hexagonal pattern using start with each sides containing n stars. Example : Input : 4 Output : * * * * * * * * * * * * * * * * * * // Hexagon pattern with each side // having n stars where n is the user input. Input : 6 Output : ...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 May, 2021" }, { "code": null, "e": 142, "s": 28, "text": "Given a positive integer n, print a hexagonal pattern using start with each sides containing n stars. Example : " }, { "code": null, "e": 496, "s": 142, "...
Count the number of possible triangles | Practice | GeeksforGeeks
Given an unsorted array arr[] of n positive integers. Find the number of triangles that can be formed with three different array elements as lengths of three sides of triangles. Example 1: Input: n = 3 arr[] = {3, 5, 4} Output: 1 Explanation: A triangle is possible with all the elements 5, 3 and 4. Example 2: Inpu...
[ { "code": null, "e": 417, "s": 238, "text": "Given an unsorted array arr[] of n positive integers. Find the number of triangles that can be formed with three different array elements as lengths of three sides of triangles. " }, { "code": null, "e": 428, "s": 417, "text": "Example...
HashMap computeIfAbsent() method in Java with Examples
24 May, 2019 The computeIfAbsent(Key, Function) method of HashMap class is used to compute value for a given key using the given mapping function, if key is not already associated with a value (or is mapped to null) and enter that computed value in Hashmap else null. If mapping function of this method returns null, the...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 May, 2019" }, { "code": null, "e": 283, "s": 28, "text": "The computeIfAbsent(Key, Function) method of HashMap class is used to compute value for a given key using the given mapping function, if key is not already associated with a v...
Matplotlib.axes.Axes.clabel() in Python
01 Jul, 2022 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": 28, "s": 0, "text": "\n01 Jul, 2022" }, { "code": null, "e": 328, "s": 28, "text": "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...
MoviePy – Getting Cut Out of Video File Clip
27 Dec, 2021 In this article we will see how we can get the cut out of the video file clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operations on videos and GIF’s. Cut out video is the trimmed video or we can say it as some few seconds get cut from the original video, it is ...
[ { "code": null, "e": 54, "s": 26, "text": "\n27 Dec, 2021" }, { "code": null, "e": 494, "s": 54, "text": "In this article we will see how we can get the cut out of the video file clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operations...
Multiple Sequence Alignment using Clustal Omega and T-Coffee | by Vijini Mallawaarachchi | Towards Data Science
Have you wondered how scientists identify regions of similarity in three or more biological sequences? As described in my previous article, Sequence alignment is a method of arranging sequences of DNA, RNA, or protein to identify regions of similarity. In my latest article on bioinformatics, I have discussed about pair...
[ { "code": null, "e": 698, "s": 172, "text": "Have you wondered how scientists identify regions of similarity in three or more biological sequences? As described in my previous article, Sequence alignment is a method of arranging sequences of DNA, RNA, or protein to identify regions of similarity. In...
8086 program to print a String - GeeksforGeeks
10 Dec, 2021 Problem: Write an assembly level program to print a given string . Examples: Input String: "This is a sample string" Output: This is a sample string Input String: "Geeks for Geeks" Output: Geeks for Geeks Explanation: Create a stringLoad the effective address of the string in dx using LEA commandPrint...
[ { "code": null, "e": 25154, "s": 25126, "text": "\n10 Dec, 2021" }, { "code": null, "e": 25221, "s": 25154, "text": "Problem: Write an assembly level program to print a given string ." }, { "code": null, "e": 25231, "s": 25221, "text": "Examples:" }, { ...
Feature Scaling — Effectively Choose Input Variables Based on Distributions | by Sushmitha Pulagam | Towards Data Science
We often come across a situation dealing with a variety of numerical variables consisting of different ranges, units, and magnitudes while building an ML model. As a common practice, we will apply Standardization or Normalization techniques for all the features before building a model. However, it is crucial to study t...
[ { "code": null, "e": 594, "s": 171, "text": "We often come across a situation dealing with a variety of numerical variables consisting of different ranges, units, and magnitudes while building an ML model. As a common practice, we will apply Standardization or Normalization techniques for all the fe...
String.Format() Method in C# with Examples | Set – 2
28 May, 2020 In C#, Format() is a string method. This method is used to replace one or more format items in the specified string with the string representation of a specified object.In other words, this method is used to insert the value of the variable or an object or expression into another string. This method can b...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 May, 2020" }, { "code": null, "e": 318, "s": 28, "text": "In C#, Format() is a string method. This method is used to replace one or more format items in the specified string with the string representation of a specified object.In ot...
How to fit the image into modal popup using Bootstrap?
05 May, 2022 Modal plugin allows us to add a dialog popup window that is displayed on top of the current page. Bootstrap provides an easy, yet effective way to incorporate modal into our web pages. Modal can consist of any content along with a header and footer. Images can be fitted in modal popup using Bootstrap by in...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 May, 2022" }, { "code": null, "e": 278, "s": 28, "text": "Modal plugin allows us to add a dialog popup window that is displayed on top of the current page. Bootstrap provides an easy, yet effective way to incorporate modal into our w...
How to Print a Collection in Java?
24 May, 2022 Collection is a set of objects that hold references to other objects in the program. In doing the same we already have studied a data structure- HashMap which internally works out the same way. So we come up with one of the approaches to print a Collection in java that is through HashMap. Now a step furthe...
[ { "code": null, "e": 54, "s": 26, "text": "\n24 May, 2022" }, { "code": null, "e": 401, "s": 54, "text": "Collection is a set of objects that hold references to other objects in the program. In doing the same we already have studied a data structure- HashMap which internally work...
PHP - Installation on Linux/Unix
If you plan to install PHP on Linux or any other variant of Unix, then here is the list of prerequisites − The PHP source distribution http://www.php.net/downloads.php The PHP source distribution http://www.php.net/downloads.php The latest Apache source distribution https://httpd.apache.org/download.cgi The latest Apac...
[ { "code": null, "e": 2998, "s": 2891, "text": "If you plan to install PHP on Linux or any other variant of Unix, then here is the list of prerequisites −" }, { "code": null, "e": 3059, "s": 2998, "text": "The PHP source distribution http://www.php.net/downloads.php" }, { ...
List.FindIndex() Method in C# with Examples
23 Mar, 2022 List<T>.FindIndex Method is used to search for an element that matches the conditions defined by a specified predicate and returns the index of the first occurrence within the List<T>. If an item which matches the conditions is not found then this method will return -1. There are 3 methods in the overload ...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Mar, 2022" }, { "code": null, "e": 367, "s": 28, "text": "List<T>.FindIndex Method is used to search for an element that matches the conditions defined by a specified predicate and returns the index of the first occurrence within the...
Groovy - collect()
The method collect iterates through a collection, converting each element into a new value using the closure as the transformer. List collect(Closure closure) The Closure expression. The modified list collection. Following is an example of the usage of this method of the every method − class Example { static void m...
[ { "code": null, "e": 2501, "s": 2372, "text": "The method collect iterates through a collection, converting each element into a new value using the closure as the transformer." }, { "code": null, "e": 2532, "s": 2501, "text": "List collect(Closure closure)\n" }, { "code":...
Python | Pandas Index.drop()
16 Dec, 2018 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Index.drop() function make new Index with passed list of labels deleted. The function ...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Dec, 2018" }, { "code": null, "e": 242, "s": 28, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp...
Ternary Operator in Java
A ternary operator uses 3 operands and it can be used to replace the if else statement. This can be done to make the code simpler and more compact. The syntax of the ternary operator is given as follows − Expression ? Statement 1 : Statement 2 In the above syntax, the expression is a conditional expression that results...
[ { "code": null, "e": 1335, "s": 1187, "text": "A ternary operator uses 3 operands and it can be used to replace the if else statement. This can be done to make the code simpler and more compact." }, { "code": null, "e": 1392, "s": 1335, "text": "The syntax of the ternary operator...
numpy.greater() in Python
28 Mar, 2022 The numpy.greater() checks whether x1 is greater than x2 or not. Syntax : numpy.greater(x1, x2[, out]) Parameters : x1, x2 : [array_like]Input arrays. If x1.shape != x2.shape, they must be broadcastable to a common shape out : [ndarray, boolean]Array of bools, or a single bool if x1 an...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Mar, 2022" }, { "code": null, "e": 103, "s": 28, "text": "The numpy.greater() checks whether x1 is greater than x2 or not. Syntax : " }, { "code": null, "e": 133, "s": 103, "text": "numpy.greater(x1, x2[, out]) " ...
Problem solving on scatter matrix
03 Feb, 2022 Prerequisite : Scatter Plot Matrix We calculate Sw ( within class scatter matrix ) and SB ( between class scatter matrix ) for the available data points. SW : To minimize variability within a class, inner class scatter.SB : To increase between class variability, between class scatter. scatter plot of th...
[ { "code": null, "e": 54, "s": 26, "text": "\n03 Feb, 2022" }, { "code": null, "e": 89, "s": 54, "text": "Prerequisite : Scatter Plot Matrix" }, { "code": null, "e": 210, "s": 89, "text": "We calculate Sw ( within class scatter matrix ) and SB ( between class ...
How to remove the default arrow icon from a dropdown list?
04 Jul, 2022 Dropdowns are graphical control elements that allow a user to choose a value from a list of values. They are prominent in web-based forms where a certain input is required out of a fixed set of values. In web pages, the HTML elements select and option are used to implement a drop-down list. You can learn a...
[ { "code": null, "e": 53, "s": 25, "text": "\n04 Jul, 2022" }, { "code": null, "e": 421, "s": 53, "text": "Dropdowns are graphical control elements that allow a user to choose a value from a list of values. They are prominent in web-based forms where a certain input is required ou...
Python | Calculate difference between adjacent elements in given list
28 Feb, 2019 Given a list, the task is to create a new list containing difference of adjacent elements in the given list. Method #1: Using zip() # Python code to demonstrate# to calculate difference# between adjacent elements in list # initialising _listini_list = [5, 4, 89, 12, 32, 45] # printing iniial_listprint(...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Feb, 2019" }, { "code": null, "e": 137, "s": 28, "text": "Given a list, the task is to create a new list containing difference of adjacent elements in the given list." }, { "code": null, "e": 160, "s": 137, "text"...
How to export dataframe to RDATA file in R ?
17 Apr, 2021 In this, article we are going to save the information of a data frame in a RDATA file and display the information of the file using R Programming language. To save the information of a data frame in a file and display the information of the file in R language is as follows: Using the save function to save ...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Apr, 2021" }, { "code": null, "e": 303, "s": 28, "text": "In this, article we are going to save the information of a data frame in a RDATA file and display the information of the file using R Programming language. To save the informa...
How to change the background color of the active nav-item?
10 May, 2022 Given an HTML document containing a list of items and the task is to change the background color of list of items when the item is active. The state of list of items can be changed by changing the background-color CSS property. Syntax: background-color: color | transparent; Property Values: color: It spe...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 May, 2022" }, { "code": null, "e": 256, "s": 28, "text": "Given an HTML document containing a list of items and the task is to change the background color of list of items when the item is active. The state of list of items can be ch...
Distributed Data Pre-processing using Dask, Amazon ECS and Python (Part 1) | by Will Badr | Towards Data Science
The quality and accuracy of machine learning models depend on many factors. One of the most critical factors is pre-processing the dataset before feeding it into the machine learning algorithm that learns from the data. Therefore, it is critical that you feed them the right data for the problem you want to solve. For e...
[ { "code": null, "e": 737, "s": 172, "text": "The quality and accuracy of machine learning models depend on many factors. One of the most critical factors is pre-processing the dataset before feeding it into the machine learning algorithm that learns from the data. Therefore, it is critical that you ...
Neural Networks and Neural Autoencoders as Dimensional Reduction Tools: Knime and Python | by Israel Fernández Pina | Towards Data Science
In my first story I wrote a humble story about embedding images from the MNIST dataset from OpenML, of handwritten numbers from 0 to 9, by Yann LeCun, Corinna Cortes and Christopher J.C. Burges. I used the UMAP algorithm for dimensional reduction. After that, I used DBSCAN for clustering and identify the original clust...
[ { "code": null, "e": 532, "s": 172, "text": "In my first story I wrote a humble story about embedding images from the MNIST dataset from OpenML, of handwritten numbers from 0 to 9, by Yann LeCun, Corinna Cortes and Christopher J.C. Burges. I used the UMAP algorithm for dimensional reduction. After t...
Python - Number of values greater than K in list
One of the basic problems for many complex problems is finding numbers greater than certain number in list in python, is commonly encountered. Live Demo # find number of elements > k using for loop # initializing list test_list = [1, 7, 5, 6, 3, 8] # initializing k k = 4 # printing list print ("The list : " + str(test...
[ { "code": null, "e": 1205, "s": 1062, "text": "One of the basic problems for many complex problems is finding numbers greater than certain number in list in python, is commonly encountered." }, { "code": null, "e": 1216, "s": 1205, "text": " Live Demo" }, { "code": null, ...
Explainable Artificial Intelligence | by z_ai | Towards Data Science
Explainable AI is one of the hottest topics in the field of Machine Learning. Machine Learning models are often thought of as black boxes that are imposible to interpret. In the end, these models are used by humans who need to trust them, understand the errors they make, and the reasoning behind their predictions. In t...
[ { "code": null, "e": 626, "s": 172, "text": "Explainable AI is one of the hottest topics in the field of Machine Learning. Machine Learning models are often thought of as black boxes that are imposible to interpret. In the end, these models are used by humans who need to trust them, understand the e...
Accessing variables of two interfaces, which are same from an implementing class in java?
An interface in Java is similar to class but, it contains only abstract methods and fields which are final and static. You can implement multiple interfaces using a single class in Java. Whenever both interfaces have same name, since all the fields of an interface are static by default, you can access them using the na...
[ { "code": null, "e": 1181, "s": 1062, "text": "An interface in Java is similar to class but, it contains only abstract methods and fields which are final and static." }, { "code": null, "e": 1407, "s": 1181, "text": "You can implement multiple interfaces using a single class in J...
Building a Conversational AI Chatbot With AWS Lambda Function and Amazon EFS | by Yi Ai | Towards Data Science
Amazon announced the general availability of AWS Lambda support for Amazon Elastic File System. Amazon EFS is a fully managed, elastic, shared file system and designed to be consumed by other AWS services. With the release of Amazon EFS for Lambda, we can now easily share data across function invocations. It also opens...
[ { "code": null, "e": 378, "s": 172, "text": "Amazon announced the general availability of AWS Lambda support for Amazon Elastic File System. Amazon EFS is a fully managed, elastic, shared file system and designed to be consumed by other AWS services." }, { "code": null, "e": 711, "s"...
JUnit - Exceptions Test
JUnit provides an option of tracing the exception handling of code. You can test whether the code throws a desired exception or not. The expected parameter is used along with @Test annotation. Let us see @Test(expected) in action. Create a java class to be tested, say, MessageUtil.java in C:\> JUNIT_WORKSPACE. Add an e...
[ { "code": null, "e": 2203, "s": 1972, "text": "JUnit provides an option of tracing the exception handling of code. You can test whether the code throws a desired exception or not. The expected parameter is used along with @Test annotation. Let us see @Test(expected) in action." }, { "code": ...
The Simplest Tutorial for Python Decorators | by Christopher Tao | Towards Data Science
One of the most unique features of the Python programming language is the decorator. That is the at sign “@” you may have seen it everywhere in Python code. Of course, many other languages have decorator as well, but the concepts are different. In Python, the decorator can be defined extremely easily and utilised for a...
[ { "code": null, "e": 517, "s": 171, "text": "One of the most unique features of the Python programming language is the decorator. That is the at sign “@” you may have seen it everywhere in Python code. Of course, many other languages have decorator as well, but the concepts are different. In Python,...
First class function in JavaScript
JavaScript treats functions as objects and allow us to pass functions as parameter to another function and even return functions from other functions. In JavaScript the functions are first class functions meaning we can store them in variable, objects and array. The higher order functions can take function, return them...
[ { "code": null, "e": 1395, "s": 1062, "text": "JavaScript treats functions as objects and allow us to pass functions as parameter to another function and even return functions from other functions. In JavaScript the functions are first class functions meaning we can store them in variable, objects a...
How do we find out if first character of a string is a number in java?
The isDigit() method of the java.lang.Character class accepts a character as a parameter and determines whether it is a digit or not. If the given character is a digit this method returns true else, this method returns false. Therefore, to determine whether the first character of the given String is a digit. The charAt...
[ { "code": null, "e": 1288, "s": 1062, "text": "The isDigit() method of the java.lang.Character class accepts a character as a parameter and determines whether it is a digit or not. If the given character is a digit this method returns true else, this method returns false." }, { "code": null,...
How to subtract 3 hours from a datetime in MySQL?
Subtract 3 hours from DateTime in MySQL, using any of the following ways. The first approach is as follows − select date_add(yourColumnName,interval -3 hours) from yourTableName; select date_sub(yourColumnName,interval 3 hours) from yourTableName; Firstly, use now() to get the current date-time − mysql> select now(); T...
[ { "code": null, "e": 1171, "s": 1062, "text": "Subtract 3 hours from DateTime in MySQL, using any of the following ways. The first approach is as follows −" }, { "code": null, "e": 1241, "s": 1171, "text": "select date_add(yourColumnName,interval -3 hours) from yourTableName;" ...
for command in Linux with Examples - GeeksforGeeks
15 May, 2019 for command in Linux is used to repeatedly execute a set of command for every element present in the list. Syntax: for NAME [in WORDS ... ] ; do COMMANDS; done Example: Options: help for : It displays help information. linux-command Linux-Shell-Commands Picked Technical Scripter 2018 Linux-Unix Technical S...
[ { "code": null, "e": 24015, "s": 23987, "text": "\n15 May, 2019" }, { "code": null, "e": 24122, "s": 24015, "text": "for command in Linux is used to repeatedly execute a set of command for every element present in the list." }, { "code": null, "e": 24130, "s": 241...
Mathematical Functions in C#
The System.Math class in C# provides methods are properties to perform mathematical operations, trigonometric, logarithmic calculations, etc. Some of its methods include − For all the methods, refer MSDN Let us see an example to get the absolute value − using System; class Program { static void Main() { int v...
[ { "code": null, "e": 1204, "s": 1062, "text": "The System.Math class in C# provides methods are properties to perform mathematical operations, trigonometric, logarithmic calculations, etc." }, { "code": null, "e": 1234, "s": 1204, "text": "Some of its methods include −" }, { ...
How to find nth highest value of a MySQL column?
To find the nth highest value of a column, you need to use ORDER BY DESC with LIMIT clause. If you want the second highest value of a column, use the below syntax: SELECT *FROM yourTableName ORDER BY DESC yourColumnName LIMIT 1,1; If you want the fourth highest value of a column, use the below syntax: SELECT *FROM your...
[ { "code": null, "e": 1226, "s": 1062, "text": "To find the nth highest value of a column, you need to use ORDER BY DESC with LIMIT clause. If you want the second highest value of a column, use the below syntax:" }, { "code": null, "e": 1293, "s": 1226, "text": "SELECT *FROM yourT...
Paging in AngularJS - GeeksforGeeks
27 Jun, 2020 Pagination is a technique of dividing the contents of a particular large page into small pages and showing them in an indexed format in order. This technique is very popular in designing search engines in which, the most relatable contents are presented on a priority basis. Also, the pagination technique i...
[ { "code": null, "e": 23860, "s": 23832, "text": "\n27 Jun, 2020" }, { "code": null, "e": 24267, "s": 23860, "text": "Pagination is a technique of dividing the contents of a particular large page into small pages and showing them in an indexed format in order. This technique is ve...
React Conditional Rendering
In React, you can conditionally render components. There are several ways to do this. We can use the if JavaScript operator to decide which component to render. We'll use these two components: function MissedGoal() { return <h1>MISSED!</h1>; } function MadeGoal() { return <h1>Goal!</h1>; } Now, we'll create anoth...
[ { "code": null, "e": 51, "s": 0, "text": "In React, you can conditionally render components." }, { "code": null, "e": 86, "s": 51, "text": "There are several ways to do this." }, { "code": null, "e": 161, "s": 86, "text": "We can use the if JavaScript operator...
Program to find maximum product of two distinct elements from an array in Python
Suppose we have a list of numbers called nums, we have to find the largest product of two unique elements. So, if the input is like nums = [8, -3, 1, -5], then the output will be 15, (-3)*(-5) = 15 which is maximum here. To solve this, we will follow these steps − n := size of nums n := size of nums nums_sort := sort t...
[ { "code": null, "e": 1169, "s": 1062, "text": "Suppose we have a list of numbers called nums, we have to find the largest product of two unique elements." }, { "code": null, "e": 1283, "s": 1169, "text": "So, if the input is like nums = [8, -3, 1, -5], then the output will be 15,...
Why it is important to write "using namespace std" in C++ program? - GeeksforGeeks
22 Nov, 2021 In this article, we will discuss the use of “using namespace std” in the C++ program. Need of namespace: As the same name can’t be given to multiple variables, functions, classes, etc. in the same scope. So to overcome this situation namespace is introduced. Program 1: Below is the C++ program illustratin...
[ { "code": null, "e": 24116, "s": 24085, "text": " \n22 Nov, 2021\n" }, { "code": null, "e": 24202, "s": 24116, "text": "In this article, we will discuss the use of “using namespace std” in the C++ program." }, { "code": null, "e": 24221, "s": 24202, "text": "N...
Bootstrap 4 .flex-nowrap class
Avoid wrapping flex items in Bootstrap 4, using the .flex-nowrap class. Below you can see the flex items aren’t wrapping after the “Eight” flex-item − The flex is set in the div class as if we add any other class in <div>− <div class="d-flex flex-nowrap bg-primary"> The following is an example to implement flex-nowrap ...
[ { "code": null, "e": 1134, "s": 1062, "text": "Avoid wrapping flex items in Bootstrap 4, using the .flex-nowrap class." }, { "code": null, "e": 1213, "s": 1134, "text": "Below you can see the flex items aren’t wrapping after the “Eight” flex-item −" }, { "code": null, ...
8086 program to find the factorial of a number - GeeksforGeeks
22 May, 2018 Prerequisite – 8085 program to find the factorial of a numberProblem – Write an assembly language program for calculating the factorial of a number using 8086 microprocessor Examples – Input : 04H Output : 18H as In Decimal : 4*3*2*1 = 24 In Hexadecimal : 24 = 18H Input : 06H Output : 02D0H as In Decim...
[ { "code": null, "e": 24765, "s": 24737, "text": "\n22 May, 2018" }, { "code": null, "e": 24939, "s": 24765, "text": "Prerequisite – 8085 program to find the factorial of a numberProblem – Write an assembly language program for calculating the factorial of a number using 8086 micr...
How to use android date change listener ?
Before getting into the example, we should know what is date picker and how does it work in android. The date picker is a subclass of frame layout and it allows to select the date, month and year. This example demonstrates how to use android date change listener. Step 1 − Create a new project in Android Studio, go to F...
[ { "code": null, "e": 1259, "s": 1062, "text": "Before getting into the example, we should know what is date picker and how does it work in android. The date picker is a subclass of frame layout and it allows to select the date, month and year." }, { "code": null, "e": 1326, "s": 1259...
Tryit Editor v3.7
Tryit: HTML image - alt attribute
[]
Count all subsequences having product less than K - GeeksforGeeks
29 Apr, 2022 Given a positive array, find the number of subsequences having product smaller than or equal to K.Examples: Input : [1, 2, 3, 4] k = 10Output :11 Explanation: The subsequences are {1}, {2}, {3}, {4}, {1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 4}, {1, 2, 3}, {1, 2, 4} Input : [4, 8, 7, 2] k = 50...
[ { "code": null, "e": 25328, "s": 25300, "text": "\n29 Apr, 2022" }, { "code": null, "e": 25437, "s": 25328, "text": "Given a positive array, find the number of subsequences having product smaller than or equal to K.Examples: " }, { "code": null, "e": 25598, "s": 2...
Unpacking arguments in Python - GeeksforGeeks
05 Sep, 2020 If you have used Python even for a few days now, you probably know about unpacking tuples. Well for starter, you can unpack tuples or lists to separate variables but that not it. There is a lot more to unpack in Python. Unpacking without storing the values: You might encounter a situation where you might n...
[ { "code": null, "e": 23926, "s": 23898, "text": "\n05 Sep, 2020" }, { "code": null, "e": 24146, "s": 23926, "text": "If you have used Python even for a few days now, you probably know about unpacking tuples. Well for starter, you can unpack tuples or lists to separate variables b...
How to convert a data frame with categorical columns to numeric in R?
We might want to convert categorical columns to numeric for reasons such as parametric results of the ordinal or nominal data. If we have categorical columns and the values are represented by using letters/words then the conversion will be based on the first character of the category. To understand the conversion, chec...
[ { "code": null, "e": 1408, "s": 1062, "text": "We might want to convert categorical columns to numeric for reasons such as parametric results of the ordinal or nominal data. If we have categorical columns and the values are represented by using letters/words then the conversion will be based on the ...
How to test WinRM connectivity using PowerShell?
In system admin role or as a PowerShell engineer you need to connect to many computers remotely. So as the first step, we need to test the remote connectivity by applying ping command or Test-Connection but many organizations have a stringent policy, and some of the servers ICMP packets are blocked. In such a case you ...
[ { "code": null, "e": 1417, "s": 1062, "text": "In system admin role or as a PowerShell engineer you need to connect to many computers remotely. So as the first step, we need to test the remote connectivity by applying ping command or Test-Connection but many organizations have a stringent policy, an...
How to insert multiple document into a MongoDB collection using Java?
You can insert multiple documents into an existing collection in MongoDB using the insertMany() method. db.coll.insert(docArray) Where, db is the database. db is the database. coll is the collection (name) in which you want to insert the document coll is the collection (name) in which you want to insert the document do...
[ { "code": null, "e": 1166, "s": 1062, "text": "You can insert multiple documents into an existing collection in MongoDB using the insertMany() method." }, { "code": null, "e": 1191, "s": 1166, "text": "db.coll.insert(docArray)" }, { "code": null, "e": 1198, "s": 1...