title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
C# Program to Check a Specified Type is a Primitive Data Type or Not - GeeksforGeeks | 16 Nov, 2021
In C#, data types are used to specify the type of data that a variable can hold. There are two types of data types available in C# that is, primitive and non-primitive data types. Primitive data types are predefined data types such as Byte, SByte, Boolean, Int16, UInt16, Int32, UInt32, Char, Double, Int64,... | [
{
"code": null,
"e": 24400,
"s": 24372,
"text": "\n16 Nov, 2021"
},
{
"code": null,
"e": 25173,
"s": 24400,
"text": "In C#, data types are used to specify the type of data that a variable can hold. There are two types of data types available in C# that is, primitive and non-primi... |
__subclasscheck__ and __subclasshook__ in Python - GeeksforGeeks | 30 Jan, 2020
Class is a collection of data (variables and methods). It bundles data and functionality together. It provides all standard features of object-oriented programming. Basically it is a blueprint for creating objects. Creating a new class creates a new type of object, allowing new instances of that type to be... | [
{
"code": null,
"e": 25673,
"s": 25645,
"text": "\n30 Jan, 2020"
},
{
"code": null,
"e": 25987,
"s": 25673,
"text": "Class is a collection of data (variables and methods). It bundles data and functionality together. It provides all standard features of object-oriented programming... |
Espresso Testing Framework - Quick Guide | In general, mobile automation testing is a difficult and challenging task. Android availability for different devices and platforms makes it things tedious for mobile automation testing. To make it easier, Google took on the challenge and developed Espresso framework. It provides a very simple, consistent and flexible ... | [
{
"code": null,
"e": 2485,
"s": 1976,
"text": "In general, mobile automation testing is a difficult and challenging task. Android availability for different devices and platforms makes it things tedious for mobile automation testing. To make it easier, Google took on the challenge and developed Espr... |
How to change font size with HTML in Java Swing JEditorPane? | Use HTMLEditorKitt to change the font size with HTML. With that, use the JEditorPane setText() method to set HTML:
HTMLEditorKit kit = new HTMLEditorKit();
editorPane.setEditorKit(kit);
editorPane.setSize(size);
editorPane.setOpaque(true);
editorPane.setText("<b><font face=\"Verdana\" size=\"30\"> This is a demo text w... | [
{
"code": null,
"e": 1177,
"s": 1062,
"text": "Use HTMLEditorKitt to change the font size with HTML. With that, use the JEditorPane setText() method to set HTML:"
},
{
"code": null,
"e": 1418,
"s": 1177,
"text": "HTMLEditorKit kit = new HTMLEditorKit();\neditorPane.setEditorKit(k... |
Different Methods to find Prime Number in Python Program | In this tutorial, we are going to explore different methods to find whether a given number is valid or not. Let's start without further due.
It's a general method to find prime numbers.
If the number is less than or equal to one, return False.
If the number is less than or equal to one, return False.
If the number is d... | [
{
"code": null,
"e": 1203,
"s": 1062,
"text": "In this tutorial, we are going to explore different methods to find whether a given number is valid or not. Let's start without further due."
},
{
"code": null,
"e": 1248,
"s": 1203,
"text": "It's a general method to find prime numbe... |
Providence Interview Experience (On-Campus) - GeeksforGeeks | 09 Oct, 2020
Online Round: Around 250 candidates turned up for this round. The exam contained 3 sections:
Technical MCQ(24 questions)Coding Questions(2 easy-medium)SQL Query(1 Question)
Technical MCQ(24 questions)
Coding Questions(2 easy-medium)
SQL Query(1 Question)
This round was very easy. Basically, you have to be ... | [
{
"code": null,
"e": 25008,
"s": 24980,
"text": "\n09 Oct, 2020"
},
{
"code": null,
"e": 25101,
"s": 25008,
"text": "Online Round: Around 250 candidates turned up for this round. The exam contained 3 sections:"
},
{
"code": null,
"e": 25181,
"s": 25101,
"text"... |
How to Check if an element is a child of a parent using JavaScript? - GeeksforGeeks | 31 Oct, 2019
Method 1: Using the Node.contains() methodThe Node.contains() method is used to check if a given node is the descendant of another node at any level. The descendant may be directly the childβs parent or further up the chain. It returns a boolean value of the result.This method is used on the parent element... | [
{
"code": null,
"e": 25364,
"s": 25336,
"text": "\n31 Oct, 2019"
},
{
"code": null,
"e": 27709,
"s": 25364,
"text": "Method 1: Using the Node.contains() methodThe Node.contains() method is used to check if a given node is the descendant of another node at any level. The descendan... |
Implementation of Bit Stuffing and Bit Destuffing - GeeksforGeeks | 31 Dec, 2021
Bit Stuffing is a process of inserting an extra bit as 0, once the frame sequence encountered 5 consecutive 1βs. Given an array, arr[] of size N consisting of 0βs and 1βs, the task is to return an array after the bit stuffing.
Examples:
Input: N = 6, arr[] = {1, 1, 1, 1, 1, 1}Output: 1111101Explanation: Du... | [
{
"code": null,
"e": 25625,
"s": 25597,
"text": "\n31 Dec, 2021"
},
{
"code": null,
"e": 25852,
"s": 25625,
"text": "Bit Stuffing is a process of inserting an extra bit as 0, once the frame sequence encountered 5 consecutive 1βs. Given an array, arr[] of size N consisting of 0βs ... |
Output of Java programs | Set 10 (Garbage Collection) - GeeksforGeeks | 28 Jun, 2021
Prerequisite β Garbage Collection in Java
Difficulty level : IntermediateIn Java, object destruction is taken care by the Garbage Collector module and the objects which do not have any references to them are eligible for garbage collection. Below are some important output questions on Garbage collection.Pr... | [
{
"code": null,
"e": 25693,
"s": 25665,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25735,
"s": 25693,
"text": "Prerequisite β Garbage Collection in Java"
},
{
"code": null,
"e": 26045,
"s": 25735,
"text": "Difficulty level : IntermediateIn Java, object d... |
Flag register of 8086 microprocessor - GeeksforGeeks | 22 May, 2018
Prerequisite β Flag register in 8085 microprocessorThe Flag register is a Special Purpose Register. Depending upon the value of result after any arithmetic and logical operation the flag bits become set (1) or reset (0).
Figure β Format of flag registerThere are total 9 flags in 8086 and the flag register ... | [
{
"code": null,
"e": 25931,
"s": 25903,
"text": "\n22 May, 2018"
},
{
"code": null,
"e": 26152,
"s": 25931,
"text": "Prerequisite β Flag register in 8085 microprocessorThe Flag register is a Special Purpose Register. Depending upon the value of result after any arithmetic and log... |
How to Build a News App Using WebView Controller in Android Studio? - GeeksforGeeks | 05 Aug, 2021
In this article, we are going to make a News App with help of a WebView Controller in Android Studio. By making this application we will learn how to access Internet Permission in our android application and how to use WebView with its class named WebView Controller. After making this application you will ... | [
{
"code": null,
"e": 26407,
"s": 26379,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 26795,
"s": 26407,
"text": "In this article, we are going to make a News App with help of a WebView Controller in Android Studio. By making this application we will learn how to access Intern... |
Python | Skipping Test Failures - GeeksforGeeks | 12 Jun, 2019
Problem β To skip or mark selected tests as an anticipated failure in the unit tests.
The unittest module has decorators that can be applied to selected test methods to control their handling as shown in the code given below.
Code #1 :
import unittestimport osimport platform class Tests(unittest.TestCase)... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n12 Jun, 2019"
},
{
"code": null,
"e": 25623,
"s": 25537,
"text": "Problem β To skip or mark selected tests as an anticipated failure in the unit tests."
},
{
"code": null,
"e": 25763,
"s": 25623,
"text": "The ... |
N-th multiple in sorted list of multiples of two numbers - GeeksforGeeks | 10 May, 2022
Given three positive integers a, b and n. Consider a list that has all multiples of βaβ and βbβ. the list is sorted and duplicates are removed. The task is to find n-th element of the list.Examples :
Input : a = 3, b = 5, n = 5
Output : 10
a = 3 b = 5, Multiple of 3 are 3, 6, 9, 12, 15,... and
multipl... | [
{
"code": null,
"e": 25929,
"s": 25901,
"text": "\n10 May, 2022"
},
{
"code": null,
"e": 26132,
"s": 25929,
"text": "Given three positive integers a, b and n. Consider a list that has all multiples of βaβ and βbβ. the list is sorted and duplicates are removed. The task is to fin... |
Minimize the difference between minimum and maximum elements - GeeksforGeeks | 13 May, 2021
Given an array of integers and an integer . It is allowed to modify an element either by increasing or decreasing them by k (only once).The task is to minimize and print the maximum difference between the shortest and longest towers.Examples:
Input: arr[] = {1, 10, 8, 5}, k = 2
Output : Max height differ... | [
{
"code": null,
"e": 26121,
"s": 26093,
"text": "\n13 May, 2021"
},
{
"code": null,
"e": 26366,
"s": 26121,
"text": "Given an array of integers and an integer . It is allowed to modify an element either by increasing or decreasing them by k (only once).The task is to minimize and... |
Python del to delete objects - GeeksforGeeks | 29 Apr, 2020
The del keyword in python is primarily used to delete objects in Python. Since everything in python represents an object in one way or another, The del keyword can also be used to delete a list, slice a list, delete a dictionaries, remove key-value pairs from a dictionary, delete variables, etc.
Syntax: d... | [
{
"code": null,
"e": 25357,
"s": 25329,
"text": "\n29 Apr, 2020"
},
{
"code": null,
"e": 25654,
"s": 25357,
"text": "The del keyword in python is primarily used to delete objects in Python. Since everything in python represents an object in one way or another, The del keyword can... |
turtle.turtlesize() function in Python - GeeksforGeeks | 26 Jul, 2020
The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support.
This function is used to return or set the penβs attributes x or y-stretchfactors and outl... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n26 Jul, 2020"
},
{
"code": null,
"e": 25754,
"s": 25537,
"text": "The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it... |
Find the sum of Eigen Values of the given N*N matrix - GeeksforGeeks | 10 May, 2021
Given an N*N matrix mat[][], the task is to find the sum of Eigen values of the given matrix.Examples:
Input: mat[][] = { {2, -1, 0}, {-1, 2, -1}, {0, -1, 2}} Output: 6Input: mat[][] = { {1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}} Output: 34
Approach: The sum of Eigen values of a m... | [
{
"code": null,
"e": 26141,
"s": 26113,
"text": "\n10 May, 2021"
},
{
"code": null,
"e": 26246,
"s": 26141,
"text": "Given an N*N matrix mat[][], the task is to find the sum of Eigen values of the given matrix.Examples: "
},
{
"code": null,
"e": 26406,
"s": 26246... |
How to Design Digital Clock using JavaScript ? - GeeksforGeeks | 30 Jul, 2021
Clocks are useful element for any UI if used in a proper way. Clocks can be used in sites where time is the main concern like some booking sites or some app showing arriving times of train, buses, flights, etc. Clock is basically of two types, Analog and Digital. We will be looking at making a digital one.... | [
{
"code": null,
"e": 37892,
"s": 37864,
"text": "\n30 Jul, 2021"
},
{
"code": null,
"e": 38200,
"s": 37892,
"text": "Clocks are useful element for any UI if used in a proper way. Clocks can be used in sites where time is the main concern like some booking sites or some app showin... |
JSON with Python | This chapter covers how to encode and decode JSON objects using Python programming language. Let's start with preparing the environment to start our programming with Python for JSON.
Before you start with encoding and decoding JSON using Python, you need to install any of the JSON modules available. For this tutorial w... | [
{
"code": null,
"e": 1963,
"s": 1780,
"text": "This chapter covers how to encode and decode JSON objects using Python programming language. Let's start with preparing the environment to start our programming with Python for JSON."
},
{
"code": null,
"e": 2153,
"s": 1963,
"text": ... |
Machine Learning with Python: Easy and robust method to fit nonlinear data | by Tirthajyoti Sarkar | Towards Data Science | Nonlinear data modeling is a routine task in data science and analytics domain. It is extremely rare to find a natural process whose outcome varies linearly with the independent variables. Therefore, we need an easy and robust methodology to quickly fit a measured data set against a set of variables assuming that the m... | [
{
"code": null,
"e": 647,
"s": 171,
"text": "Nonlinear data modeling is a routine task in data science and analytics domain. It is extremely rare to find a natural process whose outcome varies linearly with the independent variables. Therefore, we need an easy and robust methodology to quickly fit a... |
How to resolve exception Element Not Interactable Exception in Selenium? | We can resolve the exception β ElementNotInteractableException with Selenium webdriver. This exception is thrown if a webelement exists in DOM but cannot be accessed. The below image shows an example of such an exception.
If a specific webelement is overspread by another webelement we normally get this exception. To fi... | [
{
"code": null,
"e": 1284,
"s": 1062,
"text": "We can resolve the exception β ElementNotInteractableException with Selenium webdriver. This exception is thrown if a webelement exists in DOM but cannot be accessed. The below image shows an example of such an exception."
},
{
"code": null,
... |
C Program for the Difference between sums of odd and even digits? | Given a number, find the difference between sum of odd digits and sum of even digits. Which means we will be count all even digits and all odd digits and the subtracting their sums.
Input:12345
Output:3
the odd digits is 2+4=6
the even digits is 1+3+5=9
odd-even=9-6=3
Taking every digit out of number and checking wheth... | [
{
"code": null,
"e": 1244,
"s": 1062,
"text": "Given a number, find the difference between sum of odd digits and sum of even digits. Which means we will be count all even digits and all odd digits and the subtracting their sums."
},
{
"code": null,
"e": 1265,
"s": 1244,
"text": "... |
How to Install and Configure Caching-Only DNS Server on Linux | This article will show you β how to configure the DNS caching or forwarding server in the local environment with the use of DNS. DNS (Domain Name System) are often critical servers to get right, when we are learning things such as configure websites and servers. Most of the people will choose to use the DNS servers whi... | [
{
"code": null,
"e": 1447,
"s": 1062,
"text": "This article will show you β how to configure the DNS caching or forwarding server in the local environment with the use of DNS. DNS (Domain Name System) are often critical servers to get right, when we are learning things such as configure websites and... |
Height of Heap | Practice | GeeksforGeeks | Given a Binary Heap of size N in an array arr[]. Write a program to calculate the height of the Heap.
Example 1:
Input: N = 6
arr = {1, 3, 6, 5, 9, 8}
Output: 2
Explaination: The tree is like the following
(1)
/ \
(3) (6)
/ \ /
(5) (9) (8)
Example 2:
Input: N = 9
arr = {3, 6, 9, 2, ... | [
{
"code": null,
"e": 340,
"s": 238,
"text": "Given a Binary Heap of size N in an array arr[]. Write a program to calculate the height of the Heap."
},
{
"code": null,
"e": 351,
"s": 340,
"text": "Example 1:"
},
{
"code": null,
"e": 515,
"s": 351,
"text": "Inpu... |
Four Unusual Python Code Smells. And how to deal with them. | by Mohammed Ayar | Towards Data Science | When I think about programming and education, I cringe. I cringe because courses address all programming aspects, except one β software design. And sadly, software design is a key element of software development.
βWriting code is not production, itβs not always craftsmanship though it can be, itβs design.β β Joel Spols... | [
{
"code": null,
"e": 385,
"s": 172,
"text": "When I think about programming and education, I cringe. I cringe because courses address all programming aspects, except one β software design. And sadly, software design is a key element of software development."
},
{
"code": null,
"e": 495,
... |
Building Subtitle Text from Speech-to-Textβs Word Timestamps | by Ng Wai Foong | Towards Data Science | Speech-to-Text functionality has been gaining momentum recently as it offers a whole new user experience to users. It is being widely adopted by companies in the market especially in the customer services industry. In fact, big players such as Google and Microsoft provide their own Speech-to-Text API as part of their t... | [
{
"code": null,
"e": 505,
"s": 172,
"text": "Speech-to-Text functionality has been gaining momentum recently as it offers a whole new user experience to users. It is being widely adopted by companies in the market especially in the customer services industry. In fact, big players such as Google and ... |
Coalesced hashing - GeeksforGeeks | 05 Nov, 2019
Coalesced hashing is a collision avoidance technique when there is a fixed sized data. It is a combination of both Separate chaining and Open addressing. It uses the concept of Open Addressing(linear probing) to find first empty place for colliding element from the bottom of the hash table and the concept ... | [
{
"code": null,
"e": 24095,
"s": 24067,
"text": "\n05 Nov, 2019"
},
{
"code": null,
"e": 24595,
"s": 24095,
"text": "Coalesced hashing is a collision avoidance technique when there is a fixed sized data. It is a combination of both Separate chaining and Open addressing. It uses t... |
MySQL Tryit Editor v1.0 | SELECT Country FROM Customers;
β
Edit the SQL Statement, and click "Run SQL" to see the result.
This SQL-Statement is not supported in the WebSQL Database.
The example still works, because it uses a modified version of SQL.
Your browser does not support WebSQL.
Your are now using a light-version of the Try-SQL... | [
{
"code": null,
"e": 31,
"s": 0,
"text": "SELECT Country FROM Customers;"
},
{
"code": null,
"e": 33,
"s": 31,
"text": "β"
},
{
"code": null,
"e": 105,
"s": 42,
"text": "Edit the SQL Statement, and click \"Run SQL\" to see the result."
},
{
"code": nul... |
Java JList Multiple Selection Example - onlinetutorialspoint | PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
In the previous tutorials, we have discussed ... | [
{
"code": null,
"e": 158,
"s": 123,
"text": "PROGRAMMINGJava ExamplesC Examples"
},
{
"code": null,
"e": 172,
"s": 158,
"text": "Java Examples"
},
{
"code": null,
"e": 183,
"s": 172,
"text": "C Examples"
},
{
"code": null,
"e": 195,
"s": 183,
... |
Memory Management in Python. How does it work? A list of examples... | by Jun Wu | Towards Data Science | Understanding memory management is important for a software developer. With Python being used widely across software development, writing efficient Python code often means writing memory-efficient code. With the increasing use of big data, the importance of memory management can not be overlooked. Ineffective memory ma... | [
{
"code": null,
"e": 733,
"s": 172,
"text": "Understanding memory management is important for a software developer. With Python being used widely across software development, writing efficient Python code often means writing memory-efficient code. With the increasing use of big data, the importance ... |
How can we add FOREIGN KEY constraints to more than one fields of a MySQL table? | MySQL allows us to add a FOREIGN KEY constraint on more than one field in a table. The condition is that each Foreign Key in the child table must refer to the different parent table.
Suppose we have a table βcustomer2β which have a Primary Key constraint on the field βcust_unq_idβ as follows β
mysql> describe customer2... | [
{
"code": null,
"e": 1245,
"s": 1062,
"text": "MySQL allows us to add a FOREIGN KEY constraint on more than one field in a table. The condition is that each Foreign Key in the child table must refer to the different parent table."
},
{
"code": null,
"e": 1357,
"s": 1245,
"text": ... |
Check if an URL is valid or not using Regular Expression - GeeksforGeeks | 11 Feb, 2021
Given a URL as a character string str of size N.The task is to check if the given URL is valid or not.Examples :
Input : str = βhttps://www.geeksforgeeks.org/β Output : Yes Explanation : The above URL is a valid URL.Input : str = βhttps:// www.geeksforgeeks.org/β Output : No Explanation : Note that there ... | [
{
"code": null,
"e": 25406,
"s": 25378,
"text": "\n11 Feb, 2021"
},
{
"code": null,
"e": 25520,
"s": 25406,
"text": "Given a URL as a character string str of size N.The task is to check if the given URL is valid or not.Examples : "
},
{
"code": null,
"e": 25768,
"... |
What is Bubble Sort in Python? Explain with an example? | Bubble sort is a sorting algorithm to sort a list into ascending (or descending) order. This is the easiest sorting algorithm but it is not very efficient. It can be used on small input sizes but not time efficient for lists or arrays with larger length. Its time complexity is O(n^2). However, this is an in-place sorti... | [
{
"code": null,
"e": 1579,
"s": 1062,
"text": "Bubble sort is a sorting algorithm to sort a list into ascending (or descending) order. This is the easiest sorting algorithm but it is not very efficient. It can be used on small input sizes but not time efficient for lists or arrays with larger length... |
StringTokenizer class in Java | The StringTokenizer class of the java.util package allows an application to break a string into tokens.
This class is a legacy class that is retained for compatibility reasons although its use is discouraged in new code.
Its methods do not distinguish among identifiers, numbers, and quoted strings.
This class methods d... | [
{
"code": null,
"e": 1166,
"s": 1062,
"text": "The StringTokenizer class of the java.util package allows an application to break a string into tokens."
},
{
"code": null,
"e": 1283,
"s": 1166,
"text": "This class is a legacy class that is retained for compatibility reasons althou... |
How to find the percentage of missing values in each column of an R data frame? | To find the percentage of missing values in each column of an R data frame, we can use colMeans function with is.na function. This will find the mean of missing values in each column. After that we can multiply the output with 100 to get the percentage.
Check out the below given examples to understand how it can be don... | [
{
"code": null,
"e": 1316,
"s": 1062,
"text": "To find the percentage of missing values in each column of an R data frame, we can use colMeans function with is.na function. This will find the mean of missing values in each column. After that we can multiply the output with 100 to get the percentage.... |
Print characters and their frequencies in order of occurrence using Binary Tree - GeeksforGeeks | 04 Apr, 2022
Given a string str containing only lowercase characters. The problem is to print the characters along with their frequency in the order of their occurrence using Binary TreeExamples:
Input: str = βaaaabbnncccczβ Output: βa4b2n2c4zβ Explanation:
Input: str = βgeeksforgeeksβ Output: g2e4k2s2for
Appro... | [
{
"code": null,
"e": 24930,
"s": 24902,
"text": "\n04 Apr, 2022"
},
{
"code": null,
"e": 25115,
"s": 24930,
"text": "Given a string str containing only lowercase characters. The problem is to print the characters along with their frequency in the order of their occurrence using B... |
Apache Airflow. Setting up and creating your first... | by Shivangi Sareen | Towards Data Science | Airflow was born out of Airbnbβs problem of dealing with large amounts of data that was being used in a variety of jobs. To speed up the end-to-end process, Airflow was created to quickly author, iterate on, and monitor batch data pipelines. Airflow later joined Apache.
Apache Airflow is a platform for programmatically... | [
{
"code": null,
"e": 442,
"s": 171,
"text": "Airflow was born out of Airbnbβs problem of dealing with large amounts of data that was being used in a variety of jobs. To speed up the end-to-end process, Airflow was created to quickly author, iterate on, and monitor batch data pipelines. Airflow later... |
.NET Core - Getting Started | Visual Studio 2015 provides a full-featured development environment for developing .NET Core applications. In this chapter, we will be creating a new project inside Visual Studio. Once you have installed the Visual Studio 2015 tooling, you can start building a new .NET Core Application.
In the New Project dialog box, i... | [
{
"code": null,
"e": 2674,
"s": 2386,
"text": "Visual Studio 2015 provides a full-featured development environment for developing .NET Core applications. In this chapter, we will be creating a new project inside Visual Studio. Once you have installed the Visual Studio 2015 tooling, you can start bui... |
Perl join Function | This function combines the elements of LIST into a single string using the value of EXPR to separate each element. It is effectively the opposite of split.
Note that EXPR is only interpolated between pairs of elements in LIST; it will not be placed either before the first or after the last element in the string. To joi... | [
{
"code": null,
"e": 2376,
"s": 2220,
"text": "This function combines the elements of LIST into a single string using the value of EXPR to separate each element. It is effectively the opposite of split."
},
{
"code": null,
"e": 2622,
"s": 2376,
"text": "Note that EXPR is only int... |
Is it possible to use UPDATE query with LIMIT in MySQL? | Yes, it is possible to use UPDATE query with LIMIT in MySQL. Let us see how.
For our example, we will first create a table. The CREATE command is used to create a table.
mysql>CREATE table tblUpdateLimit
-> (
-> id int,
-> name varchar(100)
-> );
Query OK, 0 rows affected (0.53 sec)
Records are inserted with the help o... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "Yes, it is possible to use UPDATE query with LIMIT in MySQL. Let us see how."
},
{
"code": null,
"e": 1232,
"s": 1139,
"text": "For our example, we will first create a table. The CREATE command is used to create a table."
},
{
... |
Churn prediction. Learn how to train a decision tree... | by Roman Orac | Towards Data Science | Customer churn, also known as customer attrition, occurs when customers stop doing business with a company. The companies are interested in identifying segments of these customers because the price for acquiring a new customer is usually higher than retaining the old one. For example, if Netflix knew a segment of custo... | [
{
"code": null,
"e": 612,
"s": 172,
"text": "Customer churn, also known as customer attrition, occurs when customers stop doing business with a company. The companies are interested in identifying segments of these customers because the price for acquiring a new customer is usually higher than retai... |
Python 3 - String islower() Method | The islower() method checks whether all the case-based characters (letters) of the string are lowercase.
Following is the syntax for islower() method β
str.islower()
NA
This method returns true if all cased characters in the string are lowercase and there is at least one cased character, false otherwise.
The following... | [
{
"code": null,
"e": 2445,
"s": 2340,
"text": "The islower() method checks whether all the case-based characters (letters) of the string are lowercase."
},
{
"code": null,
"e": 2492,
"s": 2445,
"text": "Following is the syntax for islower() method β"
},
{
"code": null,
... |
Scalable Log Analytics with Apache Spark β A Comprehensive Case-Study | by Dipanjan (DJ) Sarkar | Towards Data Science | One of the most popular and effective enterprise case-studies which leverage analytics today is log analytics. Almost every small and big organization today have multiple systems and infrastructure running day in and day out. To effectively keep their business running, organizations need to know if their infrastructure... | [
{
"code": null,
"e": 902,
"s": 172,
"text": "One of the most popular and effective enterprise case-studies which leverage analytics today is log analytics. Almost every small and big organization today have multiple systems and infrastructure running day in and day out. To effectively keep their bus... |
Quickly search for a string in MySQL database? | Use FULLTEXT search to quickly search for a string. Let us first create a table β
mysql> create table DemoTable1554
-> (
-> Title text
-> );
Query OK, 0 rows affected (0.63 sec)
Here is the query to create full text search β
mysql> create fulltext index faster_title on DemoTable1554(Title);
Query OK, 0 rows af... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "Use FULLTEXT search to quickly search for a string. Let us first create a table β"
},
{
"code": null,
"e": 1249,
"s": 1144,
"text": "mysql> create table DemoTable1554\n -> (\n -> Title text\n -> );\nQuery OK, 0 rows affected (0... |
Operators in C | Set 1 (Arithmetic Operators) - GeeksforGeeks | 28 Jun, 2021
Operators are the foundation of any programming language. Thus the functionality of C language is incomplete without the use of operators. Operators allow us to perform different kinds of operations on operands. In C, operators in Can be categorized in following categories:
Arithmetic Operators (+, -, *, ... | [
{
"code": null,
"e": 25587,
"s": 25559,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 25863,
"s": 25587,
"text": "Operators are the foundation of any programming language. Thus the functionality of C language is incomplete without the use of operators. Operators allow us to pe... |
How to Convert .rpm package to .deb using alien Package Converter? - GeeksforGeeks | 02 Nov, 2020
Most of the time there are packages (in repositories and GitHub) that are ready to use. But sometimes packages are not available in binaries (ready to install on the go) we have to download the source code and build from scratch. This is not an issue if you have time but for increasing Productivity.
Here ... | [
{
"code": null,
"e": 24504,
"s": 24476,
"text": "\n02 Nov, 2020"
},
{
"code": null,
"e": 24806,
"s": 24504,
"text": "Most of the time there are packages (in repositories and GitHub) that are ready to use. But sometimes packages are not available in binaries (ready to install on t... |
Find number of segments covering each point in an given array - GeeksforGeeks | 18 Feb, 2022
Given segments and some points, for each point find the number of segments covering that point.
A segment (l, r) covers a point x if and only if l < = x < = r.
Examples:
Input: Segments = {{0, 3}, {1, 3}, {3, 8}}, Points = {-1, 3, 8}.Output : {0, 3, 1}Explanation :
No segments passing through point -1
... | [
{
"code": null,
"e": 26283,
"s": 26255,
"text": "\n18 Feb, 2022"
},
{
"code": null,
"e": 26379,
"s": 26283,
"text": "Given segments and some points, for each point find the number of segments covering that point."
},
{
"code": null,
"e": 26443,
"s": 26379,
"te... |
Count of integers of length N and value less than K such that they contain digits only from the given set - GeeksforGeeks | 05 Aug, 2021
Given a set of digits A[] in sorted order and two integers N and K, the task is to find how many numbers of length N are possible whose value is less than K and the digits are from the given set only. Note that you can use the same digit multiple times.
Examples:
Input: A[] = {0, 1, 5}, N = 1, K = 2 Outpu... | [
{
"code": null,
"e": 26151,
"s": 26123,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 26405,
"s": 26151,
"text": "Given a set of digits A[] in sorted order and two integers N and K, the task is to find how many numbers of length N are possible whose value is less than K and th... |
Basis Path Testing in Software Testing - GeeksforGeeks | 07 Jul, 2020
Prerequisite β Path TestingBasis Path Testing is a white-box testing technique based on the control structure of a program or a module. Using this structure, a control flow graph is prepared and the various possible paths present in the graph are executed as a part of testing. Therefore, by definition,
Bas... | [
{
"code": null,
"e": 26170,
"s": 26142,
"text": "\n07 Jul, 2020"
},
{
"code": null,
"e": 26474,
"s": 26170,
"text": "Prerequisite β Path TestingBasis Path Testing is a white-box testing technique based on the control structure of a program or a module. Using this structure, a con... |
How to join list of lists in python? | There are different ways to flatten a list of lists. Straightforward way is to run two nested loops β outer loop gives one sublist of lists, and inner loop gives one element of sublist at a time. Each element is appended to flat list object.
L1=[[1,2],[3,4,5],[6,7,8,9]]
flat=[]
for i in L1:
for j in i:
flat.appen... | [
{
"code": null,
"e": 1304,
"s": 1062,
"text": "There are different ways to flatten a list of lists. Straightforward way is to run two nested loops β outer loop gives one sublist of lists, and inner loop gives one element of sublist at a time. Each element is appended to flat list object."
},
{
... |
Python Variable Assignment. Explaining One Of The Most Fundamental... | by Farhad Malik | Towards Data Science | This article aims to explain how Python variable assignment works.
Variables store information that can be used and/or changed in your program. This information can be an integer, text, collection, etc.
Variables are used to hold user inputs, local states of your program, etc.
Variables have a name so that they can be ... | [
{
"code": null,
"e": 239,
"s": 172,
"text": "This article aims to explain how Python variable assignment works."
},
{
"code": null,
"e": 375,
"s": 239,
"text": "Variables store information that can be used and/or changed in your program. This information can be an integer, text, ... |
How to use column with colours to change the colour of points using ggplot2 in R? | If we have a colour column in an R data frame and we want to change the point colours in ggplot2 using that column then colour argument will be used. For example, if we have a data frame called df that contains three columns say x, y, and color then the scatterplot between x and y with the colour of points using color ... | [
{
"code": null,
"e": 1473,
"s": 1062,
"text": "If we have a colour column in an R data frame and we want to change the point colours in ggplot2 using that column then colour argument will be used. For example, if we have a data frame called df that contains three columns say x, y, and color then the... |
Data objects and Structures | Data structures are defined as special classes implemented to hold data only, i.e. Pure models, e.g. Car, Kid, Animal, Event, Employee, Company, Customer ...etc. Those data are generally declared or considered as instance variables in other classes beginnings.
The methods of this class should not perform any real signi... | [
{
"code": null,
"e": 1323,
"s": 1062,
"text": "Data structures are defined as special classes implemented to hold data only, i.e. Pure models, e.g. Car, Kid, Animal, Event, Employee, Company, Customer ...etc. Those data are generally declared or considered as instance variables in other classes begi... |
Interactive plotting with Bokeh. Interactive plots with few lines of... | by Roman Orac | Towards Data Science | As a JupyterLab power user, I like using Bokeh for plotting because of its interactive plots. JupyterLab also offers an extension for interactive matplotlib, but it is slow and it crashes with bigger datasets.
A thing I donβt like about Bokeh is its overwhelming documentation and complex examples. Sometimes I want to m... | [
{
"code": null,
"e": 382,
"s": 172,
"text": "As a JupyterLab power user, I like using Bokeh for plotting because of its interactive plots. JupyterLab also offers an extension for interactive matplotlib, but it is slow and it crashes with bigger datasets."
},
{
"code": null,
"e": 742,
... |
3 Advanced Operations in Python Lists with Examples | by Rukshan Pramoditha | Towards Data Science | The list is one of the built-in data types in Python. It is used to store multiple Python objects (integer, float, string, etc.) in a single variable. The elements are placed inside a pair of square brackets.
list_1 = [1, 0, 10] # A list of integerslist_2 = [5.3, 10.0, 7.5] # A list of floatslist_3 = ['A', 'I', 'Help',... | [
{
"code": null,
"e": 381,
"s": 172,
"text": "The list is one of the built-in data types in Python. It is used to store multiple Python objects (integer, float, string, etc.) in a single variable. The elements are placed inside a pair of square brackets."
},
{
"code": null,
"e": 579,
... |
Advanced master theorem for divide and conquer recurrences | Divide and conquer is an algorithm that works on the paradigm based on recursively branching problem into multiple sub-problems of similar type that can be solved easily.
Letβs take an example to learn more about the divide and conquer technique β
function recursive(input x size n)
if(n < k)
Divide the input i... | [
{
"code": null,
"e": 1233,
"s": 1062,
"text": "Divide and conquer is an algorithm that works on the paradigm based on recursively branching problem into multiple sub-problems of similar type that can be solved easily."
},
{
"code": null,
"e": 1310,
"s": 1233,
"text": "Letβs take ... |
Fade In Right Animation Effect with CSS | To implement Fade In Right Animation Effect on an image with CSS, you can try to run the following code β
Live Demo
<html>
<head>
<style>
.animated {
background-image: url(/css/images/logo.png);
background-repeat: no-repeat;
background-position: left top;
... | [
{
"code": null,
"e": 1168,
"s": 1062,
"text": "To implement Fade In Right Animation Effect on an image with CSS, you can try to run the following code β"
},
{
"code": null,
"e": 1178,
"s": 1168,
"text": "Live Demo"
},
{
"code": null,
"e": 2554,
"s": 1178,
"tex... |
Swing Examples - Show Standard Progress Bar | Following example showcase how to show a standard Progress bar in a Java Swing application.
We are using the following APIs.
JProgressBar β To create a progress bar field.
JProgressBar β To create a progress bar field.
JProgressBar.setValue β To set the progress in progress bar.
JProgressBar.setValue β To set the progr... | [
{
"code": null,
"e": 2131,
"s": 2039,
"text": "Following example showcase how to show a standard Progress bar in a Java Swing application."
},
{
"code": null,
"e": 2164,
"s": 2131,
"text": "We are using the following APIs."
},
{
"code": null,
"e": 2211,
"s": 2164,... |
How to change cursor style using jQuery ? - GeeksforGeeks | 28 Jun, 2019
The cursor style is used to specify the mouse cursor to be displayed while pointing on an element.
Cursor Value:
alias: This property is used to display the cursorβs indication of something is to be created.
all-scroll: In this property, the cursor indicates scrolling.
auto: This is the default property wh... | [
{
"code": null,
"e": 26312,
"s": 26284,
"text": "\n28 Jun, 2019"
},
{
"code": null,
"e": 26411,
"s": 26312,
"text": "The cursor style is used to specify the mouse cursor to be displayed while pointing on an element."
},
{
"code": null,
"e": 26425,
"s": 26411,
... |
PHP Basics of Class and Object | Class is a user defined data type in PHP. In order to define a new class, PHP provides a keyword class, which is followed by a name. Any label that is valid as per PHP's naming convention (excluding PHP's reserved words) can be used as name of class. Constituents of class are defined in curly bracket that follows name ... | [
{
"code": null,
"e": 1391,
"s": 1062,
"text": "Class is a user defined data type in PHP. In order to define a new class, PHP provides a keyword class, which is followed by a name. Any label that is valid as per PHP's naming convention (excluding PHP's reserved words) can be used as name of class. Co... |
How to Generate MD5 Checksum for Files in Java? - GeeksforGeeks | 29 Jul, 2021
An alphanumeric value i.e. the sequence of letters and numbers that uniquely defines the contents of a file is called a checksum (often referred to as a hash). Checksums are generally used to check the integrity of files downloaded from an external source. You may use a checksum utility to ensure that your... | [
{
"code": null,
"e": 23894,
"s": 23866,
"text": "\n29 Jul, 2021"
},
{
"code": null,
"e": 24523,
"s": 23894,
"text": "An alphanumeric value i.e. the sequence of letters and numbers that uniquely defines the contents of a file is called a checksum (often referred to as a hash). Che... |
Git Getting Started | You can download Git for free from the following website: https://www.git-scm.com/
To start using Git, we are first going to open up our Command shell.
For Windows, you can use Git bash, which comes included in Git for Windows.
For Mac and Linux you can use the built-in terminal.
The first thing we need to do, is to c... | [
{
"code": null,
"e": 83,
"s": 0,
"text": "You can download Git for free from the following website: https://www.git-scm.com/"
},
{
"code": null,
"e": 152,
"s": 83,
"text": "To start using Git, we are first going to open up our Command shell."
},
{
"code": null,
"e": 2... |
41 Questions to Test your Knowledge of Python Strings | by GreekDataGuy | Towards Data Science | Iβve started tracking the most commonly used functions while doing algorithm questions on LeetCode and HackerRank.
Being a good engineer isnβt about memorizing a languageβs functions, but that doesnβt mean itβs not helpful. Particularly in interviews.
This is my string cheatsheet converted into a list of questions to q... | [
{
"code": null,
"e": 287,
"s": 172,
"text": "Iβve started tracking the most commonly used functions while doing algorithm questions on LeetCode and HackerRank."
},
{
"code": null,
"e": 424,
"s": 287,
"text": "Being a good engineer isnβt about memorizing a languageβs functions, bu... |
Data Analysis with Unix - Part 1 - GeeksforGeeks | 14 Jul, 2019
To understand how to work with Unix, data β Weather Dataset is used.Weather sensors gather information consistently at numerous areas over the globe and assemble an enormous volume of log information, which is a decent possibility for investigation with MapReduce in light of the fact that is required to pr... | [
{
"code": null,
"e": 23601,
"s": 23573,
"text": "\n14 Jul, 2019"
},
{
"code": null,
"e": 24003,
"s": 23601,
"text": "To understand how to work with Unix, data β Weather Dataset is used.Weather sensors gather information consistently at numerous areas over the globe and assemble a... |
Deep Clustering for Financial Market Segmentation | by Yuefeng Zhang, PhD | Towards Data Science | Unsupervised learning, supervised learning and reinforcement learning are three main categories of machine learning methods. Unsupervised learning has many applications such as clustering, dimensionality reduction, etc. The machine learning algorithms K-means and Principal Component Analysis (PCA) are widely used for c... | [
{
"code": null,
"e": 820,
"s": 172,
"text": "Unsupervised learning, supervised learning and reinforcement learning are three main categories of machine learning methods. Unsupervised learning has many applications such as clustering, dimensionality reduction, etc. The machine learning algorithms K-m... |
Python Program to Reverse a Stack using Recursion | When it is required to reverse a stack data structure using recursion, a βstack_reverseβ method, in addition to methods to add value, delete value, and print the elements of the stack are defined.
Below is a demonstration of the same β
Live Demo
class Stack_structure:
def __init__(self):
self.items = []
d... | [
{
"code": null,
"e": 1259,
"s": 1062,
"text": "When it is required to reverse a stack data structure using recursion, a βstack_reverseβ method, in addition to methods to add value, delete value, and print the elements of the stack are defined."
},
{
"code": null,
"e": 1298,
"s": 1259... |
Create user and add role in MongoDB - GeeksforGeeks | 18 Apr, 2022
In MongoDB, we are allowed to create new users for the database. Every MongoDB user only accesses the data that is required for their role. A role in MongoDB grants privileges to perform some set of operations on a given resource. In MongoDB, users are created using createUser() method. This method creates... | [
{
"code": null,
"e": 23879,
"s": 23851,
"text": "\n18 Apr, 2022"
},
{
"code": null,
"e": 24312,
"s": 23879,
"text": "In MongoDB, we are allowed to create new users for the database. Every MongoDB user only accesses the data that is required for their role. A role in MongoDB grant... |
Datablocks API & Image Classification in fastai using Lego Minifigures Dataset | by Vinayak Nayak | Towards Data Science | The topics covered in this post are as follows
Introduction
The Task
The fastai DataBlock API
Training A Classification Model
Interpreting A Classification Model
References
You can click on any topic above to navigate to the respective section
Image Classification has been a very common task since time immemorial howev... | [
{
"code": null,
"e": 219,
"s": 172,
"text": "The topics covered in this post are as follows"
},
{
"code": null,
"e": 232,
"s": 219,
"text": "Introduction"
},
{
"code": null,
"e": 241,
"s": 232,
"text": "The Task"
},
{
"code": null,
"e": 266,
"s... |
Convert PDF to CSV using Python | Python is well known for its huge library of packages. With the help of libraries, we will see how to convert a PDF to a CSV file. A CSV file is nothing but a collection of data, framed along with a set of rows and columns. There are various packages available in the Python library to convert PDF to CSV, but we will us... | [
{
"code": null,
"e": 1541,
"s": 1062,
"text": "Python is well known for its huge library of packages. With the help of libraries, we will see how to convert a PDF to a CSV file. A CSV file is nothing but a collection of data, framed along with a set of rows and columns. There are various packages av... |
Biggest Square that can be inscribed within an Equilateral triangle - GeeksforGeeks | 10 Mar, 2021
Given here is an equilateral triangle of side length a. The task is to find the side of the biggest square that can be inscribed within it.Examples:
Input: a = 5
Output: 2.32
Input: a = 7
Output: 3.248
Approach: Let the side of the square be x. Now, AH is perpendicular to DE. DE is parallel to BC, ... | [
{
"code": null,
"e": 24215,
"s": 24187,
"text": "\n10 Mar, 2021"
},
{
"code": null,
"e": 24366,
"s": 24215,
"text": "Given here is an equilateral triangle of side length a. The task is to find the side of the biggest square that can be inscribed within it.Examples: "
},
{
... |
Finally learn how to use command line apps... by making one! | by Zack Akil | Towards Data Science | At the risk of alienating a lot of readers... I grew up with GUIβs, so I never needed to learn the ways of the terminal! This is socially acceptable in todays society of friendly user interfaces, except maybe if youβre in software engineering... whoops!
Iβve gotten pretty far just through copy and pasting full command-... | [
{
"code": null,
"e": 426,
"s": 172,
"text": "At the risk of alienating a lot of readers... I grew up with GUIβs, so I never needed to learn the ways of the terminal! This is socially acceptable in todays society of friendly user interfaces, except maybe if youβre in software engineering... whoops!"
... |
How to draw a rectangle in HTML5 SVG? | SVG stands for Scalable Vector Graphics and is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer. Most of the web browsers can display SVG just like they can display PNG, GIF, and JPG.
To draw a rectangle in HTML SVG, use the SVG <rect> element.
You ca... | [
{
"code": null,
"e": 1315,
"s": 1062,
"text": "SVG stands for Scalable Vector Graphics and is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer. Most of the web browsers can display SVG just like they can display PNG, GIF, and JPG."... |
Memory leaks in Java | 07 May, 2021
In C, programmers totally control allocation and deallocation of dynamically created objects. And if a programmer does not destroy objects, memory leak happens in C,
Java does automatic Garbage collection. However there can be situations where garbage collector does not collect objects because there are re... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n07 May, 2021"
},
{
"code": null,
"e": 219,
"s": 53,
"text": "In C, programmers totally control allocation and deallocation of dynamically created objects. And if a programmer does not destroy objects, memory leak happens in C,"
},
... |
strchr() function in C++ and its applications | 12 May, 2022
In C++, strchr() is a predefined function used for finding the occurrence of a character in a string. It is present in cstring header file.
Syntax:
// Returns pointer to the first occurrence// of c in str[]char *strchr(const char *str, int c)
Note that c is passed as its int promotion, but it is internall... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n12 May, 2022"
},
{
"code": null,
"e": 194,
"s": 54,
"text": "In C++, strchr() is a predefined function used for finding the occurrence of a character in a string. It is present in cstring header file."
},
{
"code": null,
"e... |
Python getpass module | 23 Dec, 2020
When we use terminal based application with some security credentials that use password before execution the application, Then It will be done with Python Getpass module. In this article we are going see how to use Getpass module.
Getpass module provides two function:
getpass.getpass()
getpass.getuser()
In... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Dec, 2020"
},
{
"code": null,
"e": 283,
"s": 52,
"text": "When we use terminal based application with some security credentials that use password before execution the application, Then It will be done with Python Getpass module. In ... |
Python | Pandas dataframe.ffill() | 01 Jul, 2021
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 dataframe.ffill() function is used to fill the missing value in the dataframe. βffillβ ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Jul, 2021"
},
{
"code": null,
"e": 439,
"s": 54,
"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 im... |
Completely fair Scheduler (CFS) and Brain Fuck Scheduler (BFS) | 28 Jul, 2021
Prerequisite β CPU Scheduling Completely fair Scheduler (CFS) and Brain Fuck Scheduler (BFS) are two different process schedulers currently used in Linux.
Process Scheduling β As any program is loaded as process in RAM and then CPU executes the process according to the priority of the process.
1. Complet... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jul, 2021"
},
{
"code": null,
"e": 184,
"s": 28,
"text": "Prerequisite β CPU Scheduling Completely fair Scheduler (CFS) and Brain Fuck Scheduler (BFS) are two different process schedulers currently used in Linux. "
},
{
"code... |
SQL Query to Drop Unique Key Constraints Using ALTER Command | 19 Apr, 2021
Here, we see how to drop unique constraints using alter command. ALTER is used to add, delete/drop or modify columns in the existing table. It is also used to add and drop various constraints on the existing table.
Syntax :
ALTER TABLE table_name
DROP CONSTRAINT unique_constraint;
For instance, consider th... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n19 Apr, 2021"
},
{
"code": null,
"e": 267,
"s": 52,
"text": "Here, we see how to drop unique constraints using alter command. ALTER is used to add, delete/drop or modify columns in the existing table. It is also used to add and drop va... |
React.js static getDerivedStateFromProps() | 12 Mar, 2021
The getDerivedStateFromProps() method is used when the state of a component depends on changes of props.
getDerivedStateFromProps(props, state) is a static method that is called just before render() method in both mounting and updating phase in React. It takes updated props and the current state as argumen... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Mar, 2021"
},
{
"code": null,
"e": 133,
"s": 28,
"text": "The getDerivedStateFromProps() method is used when the state of a component depends on changes of props."
},
{
"code": null,
"e": 339,
"s": 133,
"text": "g... |
Create Contact Us using WTForms in Flask | 26 May, 2022
WTForms is a library designed to make the processing of forms easier to manage. It handles the data submitted by the browser very easily. In this article, we will discuss how to create a contact us form using WTForms.
We donβt have to worry about validators.Avoidance of Cross-Site Request Forgery (CSRF).WT... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 May, 2022"
},
{
"code": null,
"e": 272,
"s": 54,
"text": "WTForms is a library designed to make the processing of forms easier to manage. It handles the data submitted by the browser very easily. In this article, we will discuss how... |
Lexicographically smallest permutation of a string with given subsequences | 09 Dec, 2021
Given a string consisting only of two lowercase characters and and two numbers and . The task is to print the lexicographically smallest permutation of the given string such that the count of subsequences of is and of is . If no such string exists, print βImpossibleβ (without quotes).Examples:
Input: str... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Dec, 2021"
},
{
"code": null,
"e": 351,
"s": 54,
"text": "Given a string consisting only of two lowercase characters and and two numbers and . The task is to print the lexicographically smallest permutation of the given string such ... |
Lexicographic rank of a string with duplicate characters | Difficulty Level :
Hard
Given a string s that may have duplicate characters. Find out the lexicographic rank of s. s may consist of lower as well as upper case letters. We consider the lexicographic order of characters as their order of ASCII value. Hence the lexicographical order of characters will be βAβ, βBβ, βCβ, .... | [
{
"code": null,
"e": 24,
"s": 0,
"text": "Difficulty Level :\nHard"
},
{
"code": null,
"e": 364,
"s": 24,
"text": "Given a string s that may have duplicate characters. Find out the lexicographic rank of s. s may consist of lower as well as upper case letters. We consider the lexi... |
Rearrange positive and negative numbers with constant extra space | 15 Jun, 2022
Given an array of positive and negative numbers, arrange them such that all negative integers appear before all the positive integers in the array without using any additional data structure like hash table, arrays, etc. The order of appearance should be maintained.
Examples:
Input: [12 11 -13 -5 6 -7 5... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n15 Jun, 2022"
},
{
"code": null,
"e": 321,
"s": 54,
"text": "Given an array of positive and negative numbers, arrange them such that all negative integers appear before all the positive integers in the array without using any additiona... |
Sum of XOR of all subarrays | 23 Jun, 2022
Given an array containing N positive integers, the task is to find the sum of XOR of all sub-arrays of the array.Examples:
Input : arr[] = {1, 3, 7, 9, 8, 7}
Output : 128
Input : arr[] = {3, 8, 13}
Output : 46
Explanation for second test-case:
XOR of {3} = 3
XOR of {3, 8} = 11
XOR of {3, 8, 13} = 6
XOR... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 177,
"s": 52,
"text": "Given an array containing N positive integers, the task is to find the sum of XOR of all sub-arrays of the array.Examples: "
},
{
"code": null,
"e": 443,
"s"... |
Python os.access() Method | Python method access() uses the real uid/gid to test for access to path. Most operations will use the effective uid/gid, therefore this routine can be used in a suid/sgid environment to test if the invoking user has the specified access to path.It returns True if access is allowed, False if not.
Following is the syntax... | [
{
"code": null,
"e": 2541,
"s": 2244,
"text": "Python method access() uses the real uid/gid to test for access to path. Most operations will use the effective uid/gid, therefore this routine can be used in a suid/sgid environment to test if the invoking user has the specified access to path.It retur... |
How to Plot Multiple Histograms in R? - GeeksforGeeks | 19 Dec, 2021
In this article, we will discuss how to plot multiple histograms in the R Programming language.
To create multiple histograms in base R, we first make a single histogram then add another layer of the histogram on top of it. But in doing so some plots may clip off as axis are made according to the first plo... | [
{
"code": null,
"e": 24851,
"s": 24823,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 24947,
"s": 24851,
"text": "In this article, we will discuss how to plot multiple histograms in the R Programming language."
},
{
"code": null,
"e": 25279,
"s": 24947,
"te... |
Longest Increasing Subsequence | Practice | GeeksforGeeks | Given an array of integers, find the length of the longest (strictly) increasing subsequence from the given array.
Example 1:
Input:
N = 16
A[]={0,8,4,12,2,10,6,14,1,9,5
13,3,11,7,15}
Output: 6
Explanation:Longest increasing subsequence
0 2 6 9 13 15, which has length 6
Example 2:
Input:
N = 6
A[] = {5,8,3,7,9,1}... | [
{
"code": null,
"e": 353,
"s": 238,
"text": "Given an array of integers, find the length of the longest (strictly) increasing subsequence from the given array."
},
{
"code": null,
"e": 364,
"s": 353,
"text": "Example 1:"
},
{
"code": null,
"e": 515,
"s": 364,
... |
Implement Onclick in JavaScript and allow web browser to go back to previous page? | For reaching the back page on button click, use the concept of β
window.history.go(-1)
Live Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initialscale=1.0">
<title>Document</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/b... | [
{
"code": null,
"e": 1127,
"s": 1062,
"text": "For reaching the back page on button click, use the concept of β"
},
{
"code": null,
"e": 1149,
"s": 1127,
"text": "window.history.go(-1)"
},
{
"code": null,
"e": 1160,
"s": 1149,
"text": " Live Demo"
},
{
... |
C# program to check if a Substring is present in a Given String | Use the contains() method in C# to check if a substring is in a given string.
Let us say the string is β
United
Within the string, you need to find the substring βUniβ. For that, use the contains method and use it like the following code snippet β
res = str1.Contains(str2);
You can try to run the following code to find... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "Use the contains() method in C# to check if a substring is in a given string."
},
{
"code": null,
"e": 1167,
"s": 1140,
"text": "Let us say the string is β"
},
{
"code": null,
"e": 1174,
"s": 1167,
"text": "United... |
Angular 6 - Http Client | HttpClient is introduced in Angular 6 and it will help us fetch external data, post to it, etc. We need to import the http module to make use of the http service. Let us consider an example to understand how to make use of the http service.
To start using the http service, we need to import the module in app.module.ts ... | [
{
"code": null,
"e": 2236,
"s": 1995,
"text": "HttpClient is introduced in Angular 6 and it will help us fetch external data, post to it, etc. We need to import the http module to make use of the http service. Let us consider an example to understand how to make use of the http service."
},
{
... |
HTML5 Canvas - Text and Fonts | HTML5 canvas provides capabilities to create text using different font and text properties listed below β
font [ = value ]
This property returns the current font settings and can be set, to change the font.
textAlign [ = value ]
This property returns the current text alignment settings and can be set, to change the ali... | [
{
"code": null,
"e": 2714,
"s": 2608,
"text": "HTML5 canvas provides capabilities to create text using different font and text properties listed below β"
},
{
"code": null,
"e": 2731,
"s": 2714,
"text": "font [ = value ]"
},
{
"code": null,
"e": 2815,
"s": 2731,
... |
Predicting the task duration based on a range | by Michael Larionov, PhD | Towards Data Science | In one of the previous entries we have established a statistical model for predicting the actual project time and cost based on the estimates. We discussed that we can fit the estimates (both for the Agile and Waterfall projects) to a Log-Normal distribution, which guarantees the positive support. Using statistical app... | [
{
"code": null,
"e": 659,
"s": 171,
"text": "In one of the previous entries we have established a statistical model for predicting the actual project time and cost based on the estimates. We discussed that we can fit the estimates (both for the Agile and Waterfall projects) to a Log-Normal distribut... |
Python - Smallest integer possible from combination of list elements - GeeksforGeeks | 29 Dec, 2019
Given a list of integers, the task is to get smallest integer possible from the combination of list elements. This is one of the problems that is essential in a competitive point of view and this article discusses various shorthands to solve this problem in Python. Letβs discuss certain ways in which this ... | [
{
"code": null,
"e": 25537,
"s": 25509,
"text": "\n29 Dec, 2019"
},
{
"code": null,
"e": 25867,
"s": 25537,
"text": "Given a list of integers, the task is to get smallest integer possible from the combination of list elements. This is one of the problems that is essential in a co... |
How to replicate a matrix by rows in R? | The replication of matrix by rows means that repeating a matrix one or more times but row-wise. For example, if we have a matrix that contains only one row and three columns then the replication of that matrix three times will repeat that one row three times. This can be done by using rep function along with matrix fun... | [
{
"code": null,
"e": 1419,
"s": 1062,
"text": "The replication of matrix by rows means that repeating a matrix one or more times but row-wise. For example, if we have a matrix that contains only one row and three columns then the replication of that matrix three times will repeat that one row three ... |
How to change text inside an element using jQuery? | To change text inside an element using jQuery, use the text() method.
You can try to run the following code to replace text inside an element:
Live Demo
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$('#dem... | [
{
"code": null,
"e": 1132,
"s": 1062,
"text": "To change text inside an element using jQuery, use the text() method."
},
{
"code": null,
"e": 1205,
"s": 1132,
"text": "You can try to run the following code to replace text inside an element:"
},
{
"code": null,
"e": 12... |
Data Analysis and Visualization of scraped data from IMDb with R | Towards Data Science | Surely you, like me at any time of the day or week, take that break to get out of the routine, work, problems, and just relax, watching your favorite television series on a streaming service, on television, or dusting old DVDs.
We enjoy those moments of entertainment, either alone or with someone, where we can immerse ... | [
{
"code": null,
"e": 400,
"s": 172,
"text": "Surely you, like me at any time of the day or week, take that break to get out of the routine, work, problems, and just relax, watching your favorite television series on a streaming service, on television, or dusting old DVDs."
},
{
"code": null,... |
java.time.LocalDate.plus() Method Example | The java.time.LocalDate.plus(long amountToAdd, TemporalUnit unit) method returns a copy of this date with the specified amount added.
Following is the declaration for java.time.LocalDate.plus(long amountToAdd, TemporalUnit unit) method.
public LocalDate plus(long amountToAdd, TemporalUnit unit)
amountToAdd β the amoun... | [
{
"code": null,
"e": 2049,
"s": 1915,
"text": "The java.time.LocalDate.plus(long amountToAdd, TemporalUnit unit) method returns a copy of this date with the specified amount added."
},
{
"code": null,
"e": 2152,
"s": 2049,
"text": "Following is the declaration for java.time.Local... |
Longest Common Subsequence | Practice | GeeksforGeeks | Given two sequences, find the length of longest subsequence present in both of them. Both the strings are of uppercase.
Example 1:
Input:
A = 6, B = 6
str1 = ABCDGH
str2 = AEDFHR
Output: 3
Explanation: LCS for input Sequences
βABCDGHβ and βAEDFHRβ is βADHβ of
length 3.
Example 2:
Input:
A = 3, B = 2
str1 = ABC
str2 = ... | [
{
"code": null,
"e": 358,
"s": 238,
"text": "Given two sequences, find the length of longest subsequence present in both of them. Both the strings are of uppercase."
},
{
"code": null,
"e": 369,
"s": 358,
"text": "Example 1:"
},
{
"code": null,
"e": 509,
"s": 369,... |
Train without labeling data using Self-Supervised Learning by Relational Reasoning | by Chien Vu | Towards Data Science | In a modern deep learning algorithm, the dependence on manual annotation of unlabeled data is one of the major limitations. To train a good model, usually, we have to prepare a vast amount of labeled data. In the case of a small number of classes and data, we can use the pre-trained model from the labeled public datase... | [
{
"code": null,
"e": 977,
"s": 172,
"text": "In a modern deep learning algorithm, the dependence on manual annotation of unlabeled data is one of the major limitations. To train a good model, usually, we have to prepare a vast amount of labeled data. In the case of a small number of classes and data... |
How to Use Locks in Multi-Threaded Java Program? | 02 Feb, 2021
A lock may be a more flexible and complicated thread synchronization mechanism than the standard synchronized block. A lock may be a tool for controlling access to a shared resource by multiple threads. Commonly, a lock provides exclusive access to a shared resource: just one thread at a time can acquire t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Feb, 2021"
},
{
"code": null,
"e": 539,
"s": 28,
"text": "A lock may be a more flexible and complicated thread synchronization mechanism than the standard synchronized block. A lock may be a tool for controlling access to a shared re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.