title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
HTML | input readonly Attribute
16 Apr, 2019 The readonly attribute of <input> element in HTML is used to specify that the input field is read-only. If an input is readonly, then it’s content cannot be changed but can be copied and highlighted. It is a boolean attribute. Syntax: <input readonly> Example: This example uses HTML <input> readonly Attrib...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Apr, 2019" }, { "code": null, "e": 255, "s": 28, "text": "The readonly attribute of <input> element in HTML is used to specify that the input field is read-only. If an input is readonly, then it’s content cannot be changed but can be...
Evaluate an array expression with numbers, + and –
15 Jun, 2022 Given an array arr[] of string type which consists of strings “+”, “-” and Numbers. Find the sum of the given array. Examples : Input : arr[] = {"3", "+", "4", "-", "7", "+", "13"} Output : Value = 13 The value of expression 3+4-7+13 is 13. Input : arr[] = { "2", "+", "1", "-8", "+", "13"} Output : Valu...
[ { "code": null, "e": 53, "s": 25, "text": "\n15 Jun, 2022" }, { "code": null, "e": 183, "s": 53, "text": "Given an array arr[] of string type which consists of strings “+”, “-” and Numbers. Find the sum of the given array. Examples : " }, { "code": null, "e": 366, ...
Unix / Linux - Shell Quoting Mechanisms
In this chapter, we will discuss in detail about the Shell quoting mechanisms. We will start by discussing the metacharacters. Unix Shell provides various metacharacters which have special meaning while using them in any Shell Script and causes termination of a word unless quoted. For example, ? matches with a single c...
[ { "code": null, "e": 2874, "s": 2747, "text": "In this chapter, we will discuss in detail about the Shell quoting mechanisms. We will start by discussing the metacharacters." }, { "code": null, "e": 3029, "s": 2874, "text": "Unix Shell provides various metacharacters which have s...
What is the importance of SwingUtilities class in Java?
In Java, after swing components displayed on the screen, they can be operated by only one thread called Event Handling Thread. We can write our code in a separate block and can give this block reference to Event Handling thread. The SwingUtilities class has two important static methods, invokeAndWait() and invokeLater(...
[ { "code": null, "e": 1449, "s": 1062, "text": "In Java, after swing components displayed on the screen, they can be operated by only one thread called Event Handling Thread. We can write our code in a separate block and can give this block reference to Event Handling thread. The SwingUtilities class...
Deploy a machine learning application with Streamlit and Docker on AWS | by Kostas Stathoulopoulos | Towards Data Science
In the previous blog, we discussed how to build a semantic search engine with sentence transformers and Faiss. Here, we will create a Streamlit application and deploy the search engine both locally and on AWS Elastic Beanstalk. If you want to jump straight into the code, check out the GitHub repo! Streamlit is an open-...
[ { "code": null, "e": 399, "s": 171, "text": "In the previous blog, we discussed how to build a semantic search engine with sentence transformers and Faiss. Here, we will create a Streamlit application and deploy the search engine both locally and on AWS Elastic Beanstalk." }, { "code": null,...
jQuery load() with Examples
The load() method in jQuery is used to load data from a server and puts the returned data into the selected element The syntax is as follows − $(selector).load(url,data,function(response,status,xhr)) Above, URL is the URL to be loaded. The data parameter is the data to send to the server, whereas the callback function ...
[ { "code": null, "e": 1178, "s": 1062, "text": "The load() method in jQuery is used to load data from a server and puts the returned data into the selected element" }, { "code": null, "e": 1205, "s": 1178, "text": "The syntax is as follows −" }, { "code": null, "e": 12...
__file__ (A Special variable) in Python - GeeksforGeeks
08 Aug, 2021 A double underscore variable in Python is usually referred to as a dunder. A dunder variable is a variable that Python has defined so that it can use it in a “Special way”. This Special way depends on the variable that is being used. Note: For more information, refer to Dunder or magic methods in Python ...
[ { "code": null, "e": 23926, "s": 23898, "text": "\n08 Aug, 2021" }, { "code": null, "e": 24161, "s": 23926, "text": "A double underscore variable in Python is usually referred to as a dunder. A dunder variable is a variable that Python has defined so that it can use it in a “Spec...
Step-by-Step Guide — Building a Prediction Model in Python | by Behic Guven | Towards Data Science
Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking professional advice. See our Reader Terms for details. In this post, I will...
[ { "code": null, "e": 472, "s": 172, "text": "Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking profession...
Program to calculate area of Circumcircle of an Equilateral Triangle
A circumcircle is a circle that inscribes a regular polygon inside it. The triangle that is inscribed inside a circle is an equilateral triangle. Area of circumcircle of can be found using the following formula, Area of circumcircle = “(a * a * (丌 / 3))” Code Logic, The area of circumcircle of an equilateral triangle i...
[ { "code": null, "e": 1274, "s": 1062, "text": "A circumcircle is a circle that inscribes a regular polygon inside it. The triangle that is inscribed inside a circle is an equilateral triangle. Area of circumcircle of can be found using the following formula," }, { "code": null, "e": 1317...
How to echo print statements while executing an SQL script?
To perform echo print statements while executing SQL scripts, use the following syntax. The syntax is as follows − SELECT ‘anyStringValue as’ ‘; The query is as follows − mysql> select 'This is a SQL Script' AS' '; The following is the output − +----------------------+ | | +----------------------+ ...
[ { "code": null, "e": 1150, "s": 1062, "text": "To perform echo print statements while executing SQL scripts, use the following syntax." }, { "code": null, "e": 1177, "s": 1150, "text": "The syntax is as follows −" }, { "code": null, "e": 1207, "s": 1177, "text...
How to enable wifi in android?
This example demonstrate about How to enable wifi in android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:andro...
[ { "code": null, "e": 1124, "s": 1062, "text": "This example demonstrate about How to enable wifi in android." }, { "code": null, "e": 1253, "s": 1124, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new ...
React Native - Text Input
In this chapter, we will show you how to work with TextInput elements in React Native. The Home component will import and render inputs. import React from 'react'; import Inputs from './inputs.js' const App = () => { return ( <Inputs /> ) } export default App We will define the initial state. After definin...
[ { "code": null, "e": 2431, "s": 2344, "text": "In this chapter, we will show you how to work with TextInput elements in React Native." }, { "code": null, "e": 2481, "s": 2431, "text": "The Home component will import and render inputs." }, { "code": null, "e": 2617, ...
Python Desktop News Notifier in 20 lines - GeeksforGeeks
03 Sep, 2021 To get started with the Desktop News Notifier, we require two libraries: feedparser and notify2. Give following command to to install feedparser: sudo pip3 install feedparser For installing notify2 in your terminal: sudo pip3 install notify2 Feedparser will parse the feed that we will get from the URL. We...
[ { "code": null, "e": 24938, "s": 24910, "text": "\n03 Sep, 2021" }, { "code": null, "e": 25085, "s": 24938, "text": "To get started with the Desktop News Notifier, we require two libraries: feedparser and notify2. Give following command to to install feedparser: " }, { "c...
Why We Need Indexes for Database Tables | by Christopher Tao | Towards Data Science
If you are not a DBA or a Database Developer, you may not know the mechanisms of the database index. But as long as you can write some SQL queries, you must have been heard of database indexes and know that indexes can improve the performance of the SQL queries. In this article, I’ll try to use the simplest language an...
[ { "code": null, "e": 435, "s": 172, "text": "If you are not a DBA or a Database Developer, you may not know the mechanisms of the database index. But as long as you can write some SQL queries, you must have been heard of database indexes and know that indexes can improve the performance of the SQL q...
Predicate.not() Method in Java with Examples - GeeksforGeeks
05 Feb, 2021 In order to negate an existing predicate, the Predicate.not() static method added to Java 11. The Predicate class is present in java.util.function package. Syntax: negate = Predicate.not( positivePredicate ); Parameters: Predicate whose negate is required Return Type: Return type not() method is Predicate....
[ { "code": null, "e": 23868, "s": 23840, "text": "\n05 Feb, 2021" }, { "code": null, "e": 24024, "s": 23868, "text": "In order to negate an existing predicate, the Predicate.not() static method added to Java 11. The Predicate class is present in java.util.function package." }, ...
Summarize whole paragraph to one sentence by Extractive Approach | by Edward Ma | Towards Data Science
To catch a quick idea of long document, we will always to do a summarization when we read a article or book. In English, the first (or first two) sentence(s) of each article has a very high chance of representing the whole article. Of course, the topic sentence can be the last sentence in sometimes. In NLP, there are t...
[ { "code": null, "e": 473, "s": 172, "text": "To catch a quick idea of long document, we will always to do a summarization when we read a article or book. In English, the first (or first two) sentence(s) of each article has a very high chance of representing the whole article. Of course, the topic se...
What is the correct way of using <br>, <br/>, or <br /> in HTML?
In HTML, the <br> tag is used for line break. It is an empty tag i.e. no need to add an end tag. Writing <br> tag is perfectly fine. Let’s see the usage of other br tags i.e. <br/> or <br />, In HTML, use <br> tag. In XHTML, the valid way is to use <br/> or <br></br> as mentioned in the XHTML guidelines. According to w...
[ { "code": null, "e": 1195, "s": 1062, "text": "In HTML, the <br> tag is used for line break. It is an empty tag i.e. no need to add an end tag. Writing <br> tag is perfectly fine." }, { "code": null, "e": 1254, "s": 1195, "text": "Let’s see the usage of other br tags i.e. <br/> o...
What is the difference between checked and unchecked exceptions in Java?
A checked exception is an exception that occurs at the compile time, these are also called as compile time exceptions. These exceptions cannot simply be ignored at the time of compilation; the programmer should take care of (handle) these exceptions. If you use FileReader class in your program to read data from a file,...
[ { "code": null, "e": 1313, "s": 1062, "text": "A checked exception is an exception that occurs at the compile time, these are also called as compile time exceptions. These exceptions cannot simply be ignored at the time of compilation; the programmer should take care of (handle) these exceptions." ...
1 quick tip for pulling data from a Pandas dataframe using SQL queries | by George Seif | Towards Data Science
Want to be inspired? Come join my Super Quotes newsletter. 😎 The Pandas library is awesome for anyone that uses Python to analyse their data. It’s very easy to use, quite fast when applied properly, and flexible in its capabilities. With Pandas, a lot of the functions that would have normally required more work, for e...
[ { "code": null, "e": 233, "s": 172, "text": "Want to be inspired? Come join my Super Quotes newsletter. 😎" }, { "code": null, "e": 314, "s": 233, "text": "The Pandas library is awesome for anyone that uses Python to analyse their data." }, { "code": null, "e": 586, ...
MongoDB query for exact match on multiple document fields
For exact match, set the values to be matched inside MongoDB $in(). Let us first create a collection with documents − > db.demo422.insertOne({"Name":"Chris","Marks":34}); { "acknowledged" : true, "insertedId" : ObjectId("5e73a4059822da45b30346e1") } > db.demo422.insertOne({"Name":"Chris","Marks":56}); { "ackno...
[ { "code": null, "e": 1180, "s": 1062, "text": "For exact match, set the values to be matched inside MongoDB $in(). Let us first create a collection with documents −" }, { "code": null, "e": 1868, "s": 1180, "text": "> db.demo422.insertOne({\"Name\":\"Chris\",\"Marks\":34});\n{\n ...
CSS - Outlines
Outlines are very similar to borders, but there are few major differences as well − An outline does not take up space. An outline does not take up space. Outlines do not have to be rectangular. Outlines do not have to be rectangular. Outline is always the same on all sides; you cannot specify different values for diffe...
[ { "code": null, "e": 2710, "s": 2626, "text": "Outlines are very similar to borders, but there are few major differences as well −" }, { "code": null, "e": 2745, "s": 2710, "text": "An outline does not take up space." }, { "code": null, "e": 2780, "s": 2745, "...
How to set cookies to expire in 30 minutes in JavaScript?
You can extend the life of a cookie beyond the current browser session by setting an expiration date and saving the expiry date within the cookie. This can be done by setting the ‘expires’ attribute to a date and time. You can try to run the following example to set cookies to expire in 30 minutes Live Demo <html> <...
[ { "code": null, "e": 1281, "s": 1062, "text": "You can extend the life of a cookie beyond the current browser session by setting an expiration date and saving the expiry date within the cookie. This can be done by setting the ‘expires’ attribute to a date and time." }, { "code": null, "e...
Modular Arithmetic - GeeksforGeeks
04 May, 2020 Modular arithmetic is the branch of arithmetic mathematics related with the “mod” functionality. Basically, modular arithmetic is related with computation of “mod” of expressions. Expressions may have digits and computational symbols of addition, subtraction, multiplication, division or any other. Here we ...
[ { "code": null, "e": 24792, "s": 24764, "text": "\n04 May, 2020" }, { "code": null, "e": 25161, "s": 24792, "text": "Modular arithmetic is the branch of arithmetic mathematics related with the “mod” functionality. Basically, modular arithmetic is related with computation of “mod”...
C# Cast method
To cast elements, use the Cast() method. The following is our list. List<object> myList = new List<object> { "Mac", "Windows", "Linux", "Solaris" }; Now, cast and use the Cast() method with substring() method to display the first two letters of every string in the list. IEnumerable<string> res = myList.AsQueryable().Ca...
[ { "code": null, "e": 1103, "s": 1062, "text": "To cast elements, use the Cast() method." }, { "code": null, "e": 1130, "s": 1103, "text": "The following is our list." }, { "code": null, "e": 1211, "s": 1130, "text": "List<object> myList = new List<object> { \"...
A step-by-step guide for clustering images | by Erdogan Taskesen | Towards Data Science
For the detection and exploration of natural groups or clusters of images by carefully pre-processing images, utilizing well-known feature extraction approaches, and evaluation of the goodness of the clustering. A theoretical background followed by a hands-on tutorial. Many computer vision tasks rely on (deep) neural n...
[ { "code": null, "e": 442, "s": 172, "text": "For the detection and exploration of natural groups or clusters of images by carefully pre-processing images, utilizing well-known feature extraction approaches, and evaluation of the goodness of the clustering. A theoretical background followed by a hand...
Explain the unary operations of algebra relations in DBMS?
Query is a question or requesting information. Query language is a language which is used to retrieve information from a database. Query language is divided into two types − Procedural language Procedural language Non-procedural language Non-procedural language Information is retrieved from the database by specifying t...
[ { "code": null, "e": 1193, "s": 1062, "text": "Query is a question or requesting information. Query language is a language which is used to retrieve information from a database." }, { "code": null, "e": 1236, "s": 1193, "text": "Query language is divided into two types −" }, ...
Count the number of elements which are greater than any of element on right side of an array
04 Aug, 2021 Given an array Arr[]. The task is to count the number of elements Arr[i] in the given array such that one or more smaller elements are present on the right side of the element Arr[i] in array. Examples: Input: Arr[] = { 3, 9, 4, 6, 7, 5 } Output: 3Numbers that counts are: 9, 6, 7 9 – As all numbers are p...
[ { "code": null, "e": 53, "s": 25, "text": "\n04 Aug, 2021" }, { "code": null, "e": 246, "s": 53, "text": "Given an array Arr[]. The task is to count the number of elements Arr[i] in the given array such that one or more smaller elements are present on the right side of the elemen...
numpy.ndarray.resize() function – Python
11 Jun, 2020 numpy.ndarray.resize() function change shape and size of array in-place. Syntax : numpy.ndarray.resize(new_shape, refcheck = True) Parameters :new_shape :[tuple of ints, or n ints] Shape of resized array.refcheck :[bool, optional] If False, reference count will not be checked. Default is True. Return : Non...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Jun, 2020" }, { "code": null, "e": 101, "s": 28, "text": "numpy.ndarray.resize() function change shape and size of array in-place." }, { "code": null, "e": 159, "s": 101, "text": "Syntax : numpy.ndarray.resize(new...
How to run multiple npm scripts in parallel?
09 Feb, 2021 As there is no straightforward way provided by npm to run multiple scripts in parallel, We can try coming up with a solution in the following way: Create a basic React App project on the Localhost server and at the same time, we want to run the build operation of the project. Now what we can do is we can m...
[ { "code": null, "e": 54, "s": 26, "text": "\n09 Feb, 2021" }, { "code": null, "e": 201, "s": 54, "text": "As there is no straightforward way provided by npm to run multiple scripts in parallel, We can try coming up with a solution in the following way:" }, { "code": null,...
Node.js crypto.verify() Function
24 Sep, 2021 The crypto.verify() is a method of the inbuilt module of node.js crypto that is used to verify the signature of data that is hashed using a different kind of hashing functions Like SHA256 algorithm etc. Syntax: crypto.verify(algorithm, data, publicKey, signature) Parameters: algorithm: It is a string-typ...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Sep, 2021" }, { "code": null, "e": 232, "s": 28, "text": "The crypto.verify() is a method of the inbuilt module of node.js crypto that is used to verify the signature of data that is hashed using a different kind of hashing function...
Create a GUI for Weather Forecast using openweathermap API in Python
05 Sep, 2020 Prerequisites: Find current weather of any city using openweathermap API The idea of this article is to provide a simple GUI application to users to get the current temperature of any city they wish to see. The system also provides a simple user interface for simplification of application. It also provides...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Sep, 2020" }, { "code": null, "e": 101, "s": 28, "text": "Prerequisites: Find current weather of any city using openweathermap API" }, { "code": null, "e": 679, "s": 101, "text": "The idea of this article is to pr...
How to Convert ArrayList to LinkedHashSet in Java? - GeeksforGeeks
20 Sep, 2021 ArrayList is a data structure that overcomes the shortcomings of the common array in Java wherein the size has to be explicitly specified beforehand. The length of the array data structure cannot be modified which is taken care of the ArrayList data structure. This data structure is also known as the dynam...
[ { "code": null, "e": 25237, "s": 25209, "text": "\n20 Sep, 2021" }, { "code": null, "e": 25716, "s": 25237, "text": "ArrayList is a data structure that overcomes the shortcomings of the common array in Java wherein the size has to be explicitly specified beforehand. The length of...
Finding Similar Quora Questions with BOW, TFIDF and Xgboost | by Susan Li | Towards Data Science
Quora is a question-and-answer website where questions are asked, answered, edited, and organized by its community of users in the form of opinions. In September 2018, Quora reported hitting 300 million monthly users. With over 300 million people visit Quora every month, it’s no surprise that many people ask duplicated...
[ { "code": null, "e": 321, "s": 172, "text": "Quora is a question-and-answer website where questions are asked, answered, edited, and organized by its community of users in the form of opinions." }, { "code": null, "e": 760, "s": 321, "text": "In September 2018, Quora reported hit...
jQuery focus() with Example
The focus() method in jQuery is used to trigger the focus event. The focus event occurs when an element gets focus. The syntax is as follows − $(selector).focus() Let us now see an example to implement the jQuery focus() method − <!DOCTYPE html> <html> <head> <style> .demo { color: blue; } </style> <script ...
[ { "code": null, "e": 1178, "s": 1062, "text": "The focus() method in jQuery is used to trigger the focus event. The focus event occurs when an element gets focus." }, { "code": null, "e": 1205, "s": 1178, "text": "The syntax is as follows −" }, { "code": null, "e": 12...
Java Program to Find the Frequency of Odd & Even Numbers in the Matrix - GeeksforGeeks
29 Oct, 2020 Matrix is simply a two-dimensional array. Just like in one-dimensional traversal operation is required to figure out. The task is to find the frequencies of odd and even number in the given matrix. The size of matrix is defined as product of numbers of columns and rows. So, the size of the matrix is m × n...
[ { "code": null, "e": 25347, "s": 25319, "text": "\n29 Oct, 2020" }, { "code": null, "e": 25546, "s": 25347, "text": "Matrix is simply a two-dimensional array. Just like in one-dimensional traversal operation is required to figure out. The task is to find the frequencies of odd an...
Taking Screenshots using pyscreenshot in Python
05 Sep, 2020 Python offers multiple libraries to ease our work. Here we will learn how to take a screenshot using Python. Python provides a module called pyscreenshot for this task. It is only a pure Python wrapper, a thin layer over existing backends. Performance and interactivity are not important for this library. I...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Sep, 2020" }, { "code": null, "e": 334, "s": 28, "text": "Python offers multiple libraries to ease our work. Here we will learn how to take a screenshot using Python. Python provides a module called pyscreenshot for this task. It is ...
Java.util.concurrent.ExecutorService Interface with Examples
13 May, 2022 The ExecutorService interface extends Executor by adding methods that help manage and control the execution of threads. It is defined in java.util.concurrent package. It defines methods that execute the threads that return results, a set of threads that determine the shutdown status. The ExecutorService in...
[ { "code": null, "e": 54, "s": 26, "text": "\n13 May, 2022" }, { "code": null, "e": 559, "s": 54, "text": "The ExecutorService interface extends Executor by adding methods that help manage and control the execution of threads. It is defined in java.util.concurrent package. It defi...
SASS | Use variables across multiple files
30 Jan, 2020 To use variables across multiple files in SASS is carried out by @import rule of SASS. @import rule which import Sass and CSS stylesheets for providing variables, @mixins and functions.Such that combine all stylesheets together for compiled css. It also imports URL such as frameworks like Bootstrap etc.. T...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jan, 2020" }, { "code": null, "e": 115, "s": 28, "text": "To use variables across multiple files in SASS is carried out by @import rule of SASS." }, { "code": null, "e": 274, "s": 115, "text": "@import rule which ...
Logistic Regression in Python - Quick Guide
Logistic Regression is a statistical method of classification of objects. This chapter will give an introduction to logistic regression with the help of some examples. To understand logistic regression, you should know what classification means. Let us consider the following examples to understand this better − A docto...
[ { "code": null, "e": 2035, "s": 1867, "text": "Logistic Regression is a statistical method of classification of objects. This chapter will give an introduction to logistic regression with the help of some examples." }, { "code": null, "e": 2180, "s": 2035, "text": "To understand ...
Number of subsequences with zero sum
21 Jun, 2022 Given an array arr[] of N integers. The task is to count the number of sub-sequences whose sum is 0. Examples: Input: arr[] = {-1, 2, -2, 1} Output: 3 All possible sub-sequences are {-1, 1}, {2, -2} and {-1, 2, -2, 1} Input: arr[] = {-2, -4, -1, 6, -2} Output: 2 Approach: The problem can be solved us...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jun, 2022" }, { "code": null, "e": 165, "s": 52, "text": "Given an array arr[] of N integers. The task is to count the number of sub-sequences whose sum is 0. Examples: " }, { "code": null, "e": 319, "s": 165, "...
Power in Mathematics
06 Jul, 2022 The power of a number says how many times to use the number in a multiplication. Powers are also called Exponents or Indices. For example, 8^2 could be called “8 to the power 2” or “8 to the second power”, or simply “8 squared”. Some interesting fact about Power : If the indices is 1, then you just hav...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Jul, 2022" }, { "code": null, "e": 259, "s": 28, "text": "The power of a number says how many times to use the number in a multiplication. Powers are also called Exponents or Indices. For example, 8^2 could be called “8 to the power ...
Sort an array according to absolute difference with a given value “using constant extra space”
30 Apr, 2021 Given an array of n distinct elements and a number x, arrange array elements according to the absolute difference with x, i. e., element having minimum difference comes first and so on, using constant extra space. Note : If two or more elements are at equal distance arrange them in same sequence as in the ...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 Apr, 2021" }, { "code": null, "e": 385, "s": 54, "text": "Given an array of n distinct elements and a number x, arrange array elements according to the absolute difference with x, i. e., element having minimum difference comes first...
Convert Character String to Variable Name in R
09 May, 2021 In this article we will discuss how to convert a character string to the variable name in the R programming language i.e. we are going to assign the character string to the variable as the variable name We can assign character string to variable name by using assign() function. We simply have to pass the n...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 May, 2021" }, { "code": null, "e": 231, "s": 28, "text": "In this article we will discuss how to convert a character string to the variable name in the R programming language i.e. we are going to assign the character string to the va...
Find sum of sum of all sub-sequences
07 Jul, 2022 Given an array of n integers. The task is to find the sum of each sub-sequence of the array. Examples : Input : arr[] = { 6, 8, 5 } Output : 76 All subsequence sum are: { 6 }, sum = 6 { 8 }, sum = 8 { 5 }, sum = 5 { 6, 8 }, sum = 14 { 6, 5 }, sum = 11 { 8, 5 }, sum = 13 { 6, 8, 5 }, sum = 19 Total sum = 7...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Jul, 2022" }, { "code": null, "e": 145, "s": 52, "text": "Given an array of n integers. The task is to find the sum of each sub-sequence of the array." }, { "code": null, "e": 157, "s": 145, "text": "Examples : "...
How to Create Volatile Table in Teradata?
11 Aug, 2021 Volatile tables are as same as simple tables but with a small difference i.e. they are volatile in nature. Like a simple table, the volatile table is also formed by the user and can only be used until the user is logged into. Once the user is logged off or disconnects, the Teradata manager automatically d...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 Aug, 2021" }, { "code": null, "e": 160, "s": 52, "text": "Volatile tables are as same as simple tables but with a small difference i.e. they are volatile in nature. " }, { "code": null, "e": 392, "s": 160, "text"...
Minimization of Boolean Functions
25 Nov, 2019 As discussed in the “Representation of Boolean Functions” every boolean function can be expressed as a sum of minterms or a product of maxterms. Since the number of literals in such an expression is usually high, and the complexity of the digital logic gates that implement a Boolean function is directly re...
[ { "code": null, "e": 52, "s": 24, "text": "\n25 Nov, 2019" }, { "code": null, "e": 1218, "s": 52, "text": "As discussed in the “Representation of Boolean Functions” every boolean function can be expressed as a sum of minterms or a product of maxterms. Since the number of literals...
Method Class | getGenericParameterTypes() method in Java
04 Nov, 2019 The java.lang.reflect.Method.getGenericParameterTypes() method of Method class returns an array of Type objects that represent the parameter types, declared in method at time of coding. It means that the getGenericParameterTypes() method returns array of parameters that belongs to method object. It returns...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Nov, 2019" }, { "code": null, "e": 399, "s": 28, "text": "The java.lang.reflect.Method.getGenericParameterTypes() method of Method class returns an array of Type objects that represent the parameter types, declared in method at time ...
Find the number of primitive roots modulo prime
29 Jun, 2022 Given a prime . The task is to count all the primitive roots of .A primitive root is an integer x (1 <= x < p) such that none of the integers x – 1, x2 – 1, ...., xp – 2 – 1 are divisible by but xp – 1 – 1 is divisible by . Examples: Input: P = 3 Output: 1 The only primitive root modulo 3 is 2. Input: P ...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Jun, 2022" }, { "code": null, "e": 264, "s": 28, "text": "Given a prime . The task is to count all the primitive roots of .A primitive root is an integer x (1 <= x < p) such that none of the integers x – 1, x2 – 1, ...., xp – 2 – 1 a...
Python | Extract Strings with only Alphabets
22 Apr, 2020 Sometimes, while working with Python lists, we can have a problem in which we need to extract only those strings which contains only alphabets and discard those which include digits. This has application in day-day programming and web development domain. Lets discuss certain ways in which this task can be ...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Apr, 2020" }, { "code": null, "e": 346, "s": 28, "text": "Sometimes, while working with Python lists, we can have a problem in which we need to extract only those strings which contains only alphabets and discard those which include ...
How to trigger onchange event on input type=range while dragging in Firefox ?
21 Jun, 2019 Onchange: Onchange executes a JavaScript when a user changes the state of a select element. This attribute occurs only when the element becomes unfocused. Syntax: <select onchange="function()"> Attribute Value: It works on <select> element and fires the given JavaScript after the value is committed. Examp...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Jun, 2019" }, { "code": null, "e": 183, "s": 28, "text": "Onchange: Onchange executes a JavaScript when a user changes the state of a select element. This attribute occurs only when the element becomes unfocused." }, { "code"...
PHP | get_headers() Function
20 May, 2019 The get_headers() function in PHP is used to fetch all the headers sent by the server in the response of an HTTP request. Syntax: get_headers( $url, $format, $context ) Parameters: This function accepts three parameters as mentioned above and described below: $url: It is a mandatory parameter of type strin...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 May, 2019" }, { "code": null, "e": 150, "s": 28, "text": "The get_headers() function in PHP is used to fetch all the headers sent by the server in the response of an HTTP request." }, { "code": null, "e": 158, "s": 15...
How to enable routing and navigation between component pages in Angular 8 ?
27 May, 2020 The task is to enable routing between angular components by making their routes when a user clicks the link, it will be navigated to page link corresponding to the required component. Let us know what is routing in Angular Angular 8 routing: The Angular 8 Router helps to navigate between pages that are bei...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 May, 2020" }, { "code": null, "e": 212, "s": 28, "text": "The task is to enable routing between angular components by making their routes when a user clicks the link, it will be navigated to page link corresponding to the required co...
Sum of heights of all individual nodes in a binary tree
26 May, 2021 Given a binary tree, find the sum of heights of all individual nodes in the tree. Example: For this tree: 1). Height of Node 1 - 3 2). Height of Node 2 - 2 3). Height of Node 3 - 1 4). Height of Node 4 - 1 5). Height of Node 5 - 1 Adding all of them = 8 Prerequisites:- Height of binary tree Simple Solutio...
[ { "code": null, "e": 52, "s": 24, "text": "\n26 May, 2021" }, { "code": null, "e": 134, "s": 52, "text": "Given a binary tree, find the sum of heights of all individual nodes in the tree." }, { "code": null, "e": 143, "s": 134, "text": "Example:" }, { ...
Primitive and Reference value in JavaScript
08 Jan, 2021 In JavaScript, a variable may store two type of values, Primitive values or Reference values. This article will describe and help to compare both these type of values. 1. Primitive value: JavaScript provides six type of primitive values that includes Number, String, Boolean, Undefined, Symbol, and BigInt. ...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Jan, 2021" }, { "code": null, "e": 220, "s": 52, "text": "In JavaScript, a variable may store two type of values, Primitive values or Reference values. This article will describe and help to compare both these type of values." }, ...
Python | Indexing a sublist
27 Mar, 2019 In Python, we have several ways to perform the indexing in list, but sometimes, we have more than just an element to index, the real problem starts when we have a sublist and its element has to be indexed. Let’s discuss certain ways in which this can be performed. Method #1 : Using index() + list comprehen...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Mar, 2019" }, { "code": null, "e": 293, "s": 28, "text": "In Python, we have several ways to perform the indexing in list, but sometimes, we have more than just an element to index, the real problem starts when we have a sublist and ...
PyCairo – Setting Context Color
18 Feb, 2022 In this article, we will see how we can set context colors in pycairo Python. Pycairo is a Python module providing bindings for the Cairo graphics library. This library is used for creating SVG i.e vector files in python. The easiest and quickest way to open an SVG file to view it (read only) is with a mod...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Feb, 2022" }, { "code": null, "e": 699, "s": 28, "text": "In this article, we will see how we can set context colors in pycairo Python. Pycairo is a Python module providing bindings for the Cairo graphics library. This library is use...
How to make a loading gif in PyQT5?
02 Feb, 2021 PyQt5 is a GUI toolkit which can be used to develop GUI application in Python. It provides many modules that can help to build various components of the GUI application. pip install PyQt5 Gif Link: https://loading.io/ Import module Create window and labels Load GIF Start GIF using start() Add mechanism t...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Feb, 2021" }, { "code": null, "e": 198, "s": 28, "text": "PyQt5 is a GUI toolkit which can be used to develop GUI application in Python. It provides many modules that can help to build various components of the GUI application." },...
How to add suffix to column names in R DataFrame ?
28 Apr, 2021 Each of the columns in a data frame is defined by a name, known as the column name. It may be of the type of numerical or string value. In this article, we will discuss how to add a suffix to column names in DataFrame in R Programming Language. In order to modify the column names, the paste function in R ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Apr, 2021" }, { "code": null, "e": 274, "s": 28, "text": "Each of the columns in a data frame is defined by a name, known as the column name. It may be of the type of numerical or string value. In this article, we will discuss how to...
HTTP headers | Cross-Origin-Resource-Policy
28 Nov, 2019 The Cross-Origin-Resource-Policy is an HTTP response-type header that allows the servers to protect against certain cross-origin or cross-site embedding of the returned source. It complements the Cross-Origin Read Blocking (A mechanism which is used to prevent some cross-origin reads), so it is especially ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Nov, 2019" }, { "code": null, "e": 678, "s": 28, "text": "The Cross-Origin-Resource-Policy is an HTTP response-type header that allows the servers to protect against certain cross-origin or cross-site embedding of the returned source...
PHP | is_uploaded_file( ) Function
08 Jun, 2018 The is_uploaded_file() function in PHP is an inbuilt function which is used to check whether the specified file uploaded via HTTP POST or not. The name of the file is sent as a parameter to the is_uploaded_file() function and it returns True if the file is uploaded via HTTP POST. This function can be used ...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Jun, 2018" }, { "code": null, "e": 459, "s": 28, "text": "The is_uploaded_file() function in PHP is an inbuilt function which is used to check whether the specified file uploaded via HTTP POST or not. The name of the file is sent as ...
Windows 10 Toast Notifications with Python
08 Jan, 2019 Python is a general-purpose language, can be used to develop both desktop and web applications. By using a package available in Python named win10toast , we can create desktop notifications. It is an easy way to get notified when some event occurs. The package is available in Pypi and it is installed using...
[ { "code": null, "e": 54, "s": 26, "text": "\n08 Jan, 2019" }, { "code": null, "e": 303, "s": 54, "text": "Python is a general-purpose language, can be used to develop both desktop and web applications. By using a package available in Python named win10toast , we can create deskto...
Matplotlib.axis.Axis.zoom() function in Python
08 Jun, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. The Axis.zoom() function in axis module of matplotlib library is used to zoom in or ou...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Jun, 2020" }, { "code": null, "e": 249, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and u...
Java - Generics
It would be nice if we could write a single sort method that could sort the elements in an Integer array, a String array, or an array of any type that supports ordering. Java Generic methods and generic classes enable programmers to specify, with a single method declaration, a set of related methods, or with a single c...
[ { "code": null, "e": 2547, "s": 2377, "text": "It would be nice if we could write a single sort method that could sort the elements in an Integer array, a String array, or an array of any type that supports ordering." }, { "code": null, "e": 2753, "s": 2547, "text": "Java Generic...
C++ ios Library - Showpoint Function
It is used to sets the showpoint format flag for the str stream. When the showpoint format flag is set, the decimal point is always written for floating point values inserted into the stream (even for those whose decimal part is zero). Following the decimal point, as many digits as necessary are written to match the pr...
[ { "code": null, "e": 2960, "s": 2603, "text": "It is used to sets the showpoint format flag for the str stream. When the showpoint format flag is set, the decimal point is always written for floating point values inserted into the stream (even for those whose decimal part is zero). Following the dec...
Inter Thread Communication With Condition() Method in Python - GeeksforGeeks
24 Jan, 2021 This article is based on how we use the Condition() method to implement Inter Thread Communication, let’s discuss this topic below -: Let’s have some brief discussion on Inter Thread Communication before talking about Condition() implementation for inter-thread communication, When any thread required somet...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n24 Jan, 2021" }, { "code": null, "e": 24426, "s": 24292, "text": "This article is based on how we use the Condition() method to implement Inter Thread Communication, let’s discuss this topic below -:" }, { "code": null, ...
Naive Bayes Document Classification in Python | by Kelly Epley | Towards Data Science
Naive Bayes is a reasonably effective strategy for document classification tasks even though it is, as the name indicates, “naive.” Naive Bayes classification makes use of Bayes theorem to determine how probable it is that an item is a member of a category. If I have a document that contains the word “trust” or “virtue...
[ { "code": null, "e": 304, "s": 172, "text": "Naive Bayes is a reasonably effective strategy for document classification tasks even though it is, as the name indicates, “naive.”" }, { "code": null, "e": 683, "s": 304, "text": "Naive Bayes classification makes use of Bayes theorem ...
AI with Python – Deep Learning
Artificial Neural Network (ANN) it is an efficient computing system, whose central theme is borrowed from the analogy of biological neural networks. Neural networks are one type of model for machine learning. In the mid-1980s and early 1990s, much important architectural advancements were made in neural networks. In th...
[ { "code": null, "e": 2597, "s": 2205, "text": "Artificial Neural Network (ANN) it is an efficient computing system, whose central theme is borrowed from the analogy of biological neural networks. Neural networks are one type of model for machine learning. In the mid-1980s and early 1990s, much impor...
Inorder Successor in BST | Practice | GeeksforGeeks
Given a BST, and a reference to a Node x in the BST. Find the Inorder Successor of the given node in the BST. Example 1: Input: 2 / \ 1 3 K(data of x) = 2 Output: 3 Explanation: Inorder traversal : 1 2 3 Hence, inorder successor of 2 is 3. Example 2: Input: 20 / \ ...
[ { "code": null, "e": 350, "s": 238, "text": "Given a BST, and a reference to a Node x in the BST. Find the Inorder Successor of the given node in the BST.\n " }, { "code": null, "e": 361, "s": 350, "text": "Example 1:" }, { "code": null, "e": 503, "s": 361, "t...
A Complete Logistic Regression Algorithm for Image Classification in Python From Scratch | by Rashida Nasrin Sucky | Towards Data Science
Logistic regression is very popular in machine learning and statistics. It can work on both binary and multiclass classification very well. I wrote tutorials on both binary and multiclass classification with logistic regression before. This article will be focused on image classification with logistic regression. If yo...
[ { "code": null, "e": 487, "s": 172, "text": "Logistic regression is very popular in machine learning and statistics. It can work on both binary and multiclass classification very well. I wrote tutorials on both binary and multiclass classification with logistic regression before. This article will b...
Area of squares formed by joining mid points repeatedly - GeeksforGeeks
19 Apr, 2021 Given a square having a side of length L. Another square form inside the first square by joining midpoint of the side of the first square. Now 3rd square is form inside 2nd one by joining midpoints of the side of the 2nd square and so on. You have 10 squares inside each other. and you are given side length...
[ { "code": null, "e": 26623, "s": 26595, "text": "\n19 Apr, 2021" }, { "code": null, "e": 26996, "s": 26623, "text": "Given a square having a side of length L. Another square form inside the first square by joining midpoint of the side of the first square. Now 3rd square is form i...
Cellular Networks - GeeksforGeeks
16 Nov, 2018 Cellular Network is formed of some cells, cell covers a geographical region, has a base station analogous to 802.11 AP which helps mobile users attach to network and there is an air-interface of physical and link layer protocol between mobile and base station. All these base stations are connected to Mobil...
[ { "code": null, "e": 25499, "s": 25471, "text": "\n16 Nov, 2018" }, { "code": null, "e": 25905, "s": 25499, "text": "Cellular Network is formed of some cells, cell covers a geographical region, has a base station analogous to 802.11 AP which helps mobile users attach to network a...
Angular ngx bootstrap Dropdowns Component - GeeksforGeeks
02 Sep, 2021 Angular ngx bootstrap is a bootstrap framework used with angular to create components with great styling and this framework is very easy to use and is used to make responsive websites. In this article, we will see how to use Dropdowns in angular ngx bootstrap. Installation syntax: npm install ngx-bootstrap...
[ { "code": null, "e": 26354, "s": 26326, "text": "\n02 Sep, 2021" }, { "code": null, "e": 26539, "s": 26354, "text": "Angular ngx bootstrap is a bootstrap framework used with angular to create components with great styling and this framework is very easy to use and is used to make...
p5.js | input() Function - GeeksforGeeks
17 Jan, 2020 The input() function is invoked whenever user input is detected on the element. It can be used to detect keystrokes or changes in the values of a slider. It can also be used to attach an event listener to an element. Syntax: input(fxn) Parameters: This function accepts a single parameter as mentioned above...
[ { "code": null, "e": 44937, "s": 44909, "text": "\n17 Jan, 2020" }, { "code": null, "e": 45154, "s": 44937, "text": "The input() function is invoked whenever user input is detected on the element. It can be used to detect keystrokes or changes in the values of a slider. It can al...
How to name aggregate columns in PySpark DataFrame ? - GeeksforGeeks
17 Jun, 2021 In this article, we are going to see how to name aggregate columns in the Pyspark dataframe. We can do this by using alias after groupBy(). groupBy() is used to join two columns and it is used to aggregate the columns, alias is used to change the name of the new column which is formed by grouping data in c...
[ { "code": null, "e": 26229, "s": 26201, "text": "\n17 Jun, 2021" }, { "code": null, "e": 26322, "s": 26229, "text": "In this article, we are going to see how to name aggregate columns in the Pyspark dataframe." }, { "code": null, "e": 26544, "s": 26322, "text"...
How to compare two arrays in JavaScript ? - GeeksforGeeks
04 Dec, 2021 In this article, the task is to compare two arrays, & we need to check the length of both arrays that should be the same, the objects present in them are of the same type and each item in one array is equal to the counterpart in another array. By doing this, we can conclude both arrays are the same or not....
[ { "code": null, "e": 26708, "s": 26680, "text": "\n04 Dec, 2021" }, { "code": null, "e": 27218, "s": 26708, "text": "In this article, the task is to compare two arrays, & we need to check the length of both arrays that should be the same, the objects present in them are of the sa...
Node.js | os.userInfo() Method - GeeksforGeeks
07 Aug, 2021 The os.userInfo() method is an inbuilt application programming interface of the os module which is used to get the information of currently effective user. Syntax: os.userInfo( options ) Parameters: This method accepts single parameter options which is optional parameter. It specifies the process options ...
[ { "code": null, "e": 26149, "s": 26121, "text": "\n07 Aug, 2021" }, { "code": null, "e": 26305, "s": 26149, "text": "The os.userInfo() method is an inbuilt application programming interface of the os module which is used to get the information of currently effective user." }, ...
How to implement text Auto-complete feature using Ternary Search Tree - GeeksforGeeks
05 Aug, 2021 Given a set of strings S and a string patt the task is to autocomplete the string patt to strings from S that have patt as a prefix, using a Ternary Search Tree. If no string matches the given prefix, print “None”.Examples: Input: S = {“wallstreet”, “geeksforgeeks”, “wallmart”, “walmart”, “waldomort”, “w...
[ { "code": null, "e": 25731, "s": 25703, "text": "\n05 Aug, 2021" }, { "code": null, "e": 25957, "s": 25731, "text": "Given a set of strings S and a string patt the task is to autocomplete the string patt to strings from S that have patt as a prefix, using a Ternary Search Tree. I...
LINQ | Projection Operator | SelectMany - GeeksforGeeks
21 May, 2019 In LINQ, projection is an operation which converts an object into the new form which holds only those properties which will be subsequently used. By using projection, a developer can create a new type which is built from each object. You are allowed to project property and conduct mathematical function on ...
[ { "code": null, "e": 25663, "s": 25635, "text": "\n21 May, 2019" }, { "code": null, "e": 26044, "s": 25663, "text": "In LINQ, projection is an operation which converts an object into the new form which holds only those properties which will be subsequently used. By using projecti...
How to find the minimum and maximum element of an Array using STL in C++? - GeeksforGeeks
18 Aug, 2021 Given an array arr[], find the minimum and maximum element of this array using STL in C++.Example: Input: arr[] = {1, 45, 54, 71, 76, 12} Output: min = 1, max = 76 Input: arr[] = {10, 7, 5, 4, 6, 12} Output: min = 4, max = 12 Approach: Min or Minimum element can be found with the help of *min_element()...
[ { "code": null, "e": 25367, "s": 25339, "text": "\n18 Aug, 2021" }, { "code": null, "e": 25467, "s": 25367, "text": "Given an array arr[], find the minimum and maximum element of this array using STL in C++.Example: " }, { "code": null, "e": 25595, "s": 25467, ...
in_place module in Python - GeeksforGeeks
18 Jul, 2021 Sometimes, while working with Python files, we can have utility in which we wish to alter files without using system context or sys stdout. Such situation require reading/writing files inplace, i.e without using process resources. This can be achieved using the ein_place module in Python. This module – Doe...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n18 Jul, 2021" }, { "code": null, "e": 25841, "s": 25537, "text": "Sometimes, while working with Python files, we can have utility in which we wish to alter files without using system context or sys stdout. Such situation require ...
Implementation of Locally Weighted Linear Regression - GeeksforGeeks
12 Dec, 2021 LOESS or LOWESS are non-parametric regression methods that combine multiple regression models in a k-nearest-neighbor-based meta-model. LOESS combines much of the simplicity of linear least squares regression with the flexibility of nonlinear regression. It does this by fitting simple models to localized s...
[ { "code": null, "e": 25905, "s": 25877, "text": "\n12 Dec, 2021" }, { "code": null, "e": 26314, "s": 25905, "text": "LOESS or LOWESS are non-parametric regression methods that combine multiple regression models in a k-nearest-neighbor-based meta-model. LOESS combines much of the ...
How to Send Automated Email Messages in Python - GeeksforGeeks
31 Aug, 2021 In this article, we are going to see how to send automated email messages which involve delivering text messages, essential photos, and important files, among other things. in Python. We’ll be using two libraries for this: email, and smtplib, as well as the MIMEMultipart object. This object has multiple s...
[ { "code": null, "e": 25563, "s": 25535, "text": "\n31 Aug, 2021" }, { "code": null, "e": 25748, "s": 25563, "text": "In this article, we are going to see how to send automated email messages which involve delivering text messages, essential photos, and important files, among othe...
Python | Convert String to tuple list - GeeksforGeeks
24 Jun, 2020 Sometimes, while working with Python strings, we can have a problem in which we receive a tuple, list in the comma-separated string format, and have to convert to the tuple list. Let’s discuss certain ways in which this task can be performed. Method #1 : Using loop + split() + replace()This is a brute forc...
[ { "code": null, "e": 25757, "s": 25729, "text": "\n24 Jun, 2020" }, { "code": null, "e": 26000, "s": 25757, "text": "Sometimes, while working with Python strings, we can have a problem in which we receive a tuple, list in the comma-separated string format, and have to convert to ...
How to create a MySQL table with InnoDB engine table?
To create a table with InnoDB engine, we can use the ENGINE command. Here is the query to create a table. mysql> create table EmployeeRecords - > ( - > EmpId int, - > EmpName varchar(100), - > EmpAge int, - > EmpSalary float - > )ENGINE=INNODB; Query OK, 0 rows affected (0.46 sec) We have set the ENGINE as INNODB above...
[ { "code": null, "e": 1168, "s": 1062, "text": "To create a table with InnoDB engine, we can use the ENGINE command. Here is the query to create a table." }, { "code": null, "e": 1344, "s": 1168, "text": "mysql> create table EmployeeRecords\n- > (\n- > EmpId int,\n- > EmpName varc...
Add only numeric values present in a list in Python
We have a Python list which contains both string and numbers. In this article we will see how to sum up the numbers present in such list by ignoring the strings. The isinstance function can be used to filter out only the numbers from the elements in the list. Then we apply and the sum function and get the final result....
[ { "code": null, "e": 1224, "s": 1062, "text": "We have a Python list which contains both string and numbers. In this article we will see how to sum up the numbers present in such list by ignoring the strings." }, { "code": null, "e": 1383, "s": 1224, "text": "The isinstance funct...
Calculating median of an array JavaScript
We are required to write a JavaScript function that takes in an array of Numbers and returns its median. The median is the middle number in a sorted, ascending or descending, list of numbers and can be more descriptive of that data set than the average. First, we will sort the array, if its size is even, we will need e...
[ { "code": null, "e": 1167, "s": 1062, "text": "We are required to write a JavaScript function that takes in an array of Numbers and returns its median." }, { "code": null, "e": 1316, "s": 1167, "text": "The median is the middle number in a sorted, ascending or descending, list of...
Build an Application to translate English to Hindi in Python - GeeksforGeeks
15 Feb, 2022 In these articles, We are going to write python scripts to translate English word to Hindi word and bind it with the GUI application. We are using the English-to-Hindi module to translate the English word to the Hindi word. Installation: Run this code into your terminal: pip install English-to-Hindi Approa...
[ { "code": null, "e": 24353, "s": 24325, "text": "\n15 Feb, 2022" }, { "code": null, "e": 24577, "s": 24353, "text": "In these articles, We are going to write python scripts to translate English word to Hindi word and bind it with the GUI application. We are using the English-to-H...
Angular PrimeNG BlockUI Component - GeeksforGeeks
24 Aug, 2021 Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will know how to use the BlockUI component in Angular PrimeNG. BlockUI component: It is...
[ { "code": null, "e": 26464, "s": 26436, "text": "\n24 Aug, 2021" }, { "code": null, "e": 26747, "s": 26464, "text": "Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make resp...
Check if strings are rotations of each other or not | Set 2 - GeeksforGeeks
14 Apr, 2021 Given two strings s1 and s2, check whether s2 is a rotation of s1. Examples: Input : ABACD, CDABA Output : True Input : GEEKS, EKSGE Output : True We have discussed an approach in earlier post which handles substring match as a pattern. In this post, we will be going to use KMP algorithm’s lps (longest p...
[ { "code": null, "e": 25202, "s": 25174, "text": "\n14 Apr, 2021" }, { "code": null, "e": 25280, "s": 25202, "text": "Given two strings s1 and s2, check whether s2 is a rotation of s1. Examples: " }, { "code": null, "e": 25351, "s": 25280, "text": "Input : ABAC...
Check if there exist two elements in an array whose sum is equal to the sum of rest of the array - GeeksforGeeks
27 Sep, 2021 We have an array of integers and we have to find two such elements in the array such that sum of these two elements is equal to the sum of rest of elements in array. Examples: Input : arr[] = {2, 11, 5, 1, 4, 7} Output : Elements are 4 and 11 Note that 4 + 11 = 2 + 5 + 1 + 7 Input : arr[] = {2, 4, 2, ...
[ { "code": null, "e": 26585, "s": 26557, "text": "\n27 Sep, 2021" }, { "code": null, "e": 26752, "s": 26585, "text": "We have an array of integers and we have to find two such elements in the array such that sum of these two elements is equal to the sum of rest of elements in arra...
Wand Python - Introduction and Installation - GeeksforGeeks
15 May, 2020 Imagemagick is a tool developed to convert images from one format to another. Due to a versatile range of image formats and its precise and simple working, it has a huge community support. We can get images from pdf files.Wand is a binding developed for python by Imagemagick.wWand opens and manipulate imag...
[ { "code": null, "e": 26127, "s": 26099, "text": "\n15 May, 2020" }, { "code": null, "e": 26504, "s": 26127, "text": "Imagemagick is a tool developed to convert images from one format to another. Due to a versatile range of image formats and its precise and simple working, it has ...
How to Connect Data Points on Boxplot with Lines in R? - GeeksforGeeks
10 Oct, 2021 In this article, we will discuss how to connect paired points in box plot in ggplot2 in R Programming Language. Boxplots with data points help us to visualize the summary information between distributions. For example, we may have two quantitative variables corresponding to two different categories and wou...
[ { "code": null, "e": 24851, "s": 24823, "text": "\n10 Oct, 2021" }, { "code": null, "e": 24963, "s": 24851, "text": "In this article, we will discuss how to connect paired points in box plot in ggplot2 in R Programming Language." }, { "code": null, "e": 25257, "s"...
GANscapes: Create Impressionist Paintings with AI | Towards Data Science
This is my third article on experimenting with Generative Adversarial Networks (GANs) to create fine art. The first two articles focused on creating abstract art by using image augmentation, but this one focuses on creating Impressionist landscape paintings. I posted all of the source code for GANscapes on GitHub and p...
[ { "code": null, "e": 430, "s": 171, "text": "This is my third article on experimenting with Generative Adversarial Networks (GANs) to create fine art. The first two articles focused on creating abstract art by using image augmentation, but this one focuses on creating Impressionist landscape paintin...
String slicing in Python to rotate a string
A string is given, our task is to slicing the string into two way. One is clockwise and another anticlockwise. 1. Left (Or anticlockwise) rotate the given string by d elements (where d <= n). 2. Right (Or clockwise) rotate the given string by d elements (where d <= n). Input: string = "pythonprogram" d = 2 Output: Left...
[ { "code": null, "e": 1173, "s": 1062, "text": "A string is given, our task is to slicing the string into two way. One is clockwise and another anticlockwise." }, { "code": null, "e": 1254, "s": 1173, "text": "1. Left (Or anticlockwise) rotate the given string by d elements (where...
Can We Access Private Data Members of a Class without using a Member or a Friend Function in C++?
21 Jun, 2022 The idea of Encapsulation is to bundle data and methods (that work on the data) together and restrict access of private data members outside the class. In C++, a friend function or friend class can also access private data members. So, is it possible to access private members outside a class without friend...
[ { "code": null, "e": 54, "s": 26, "text": "\n21 Jun, 2022" }, { "code": null, "e": 468, "s": 54, "text": "The idea of Encapsulation is to bundle data and methods (that work on the data) together and restrict access of private data members outside the class. In C++, a friend funct...
std::minmax() and std::minmax_element() in C++ STL
15 Jun, 2017 C++ defined functions to get smallest and largest elements among 2 or in a container using different functions. But there are also functions that are used to get both smallest and largest element using a single function, “minmax()” function achieves this task for us. This function is defined in “algorithm”...
[ { "code": null, "e": 52, "s": 24, "text": "\n15 Jun, 2017" }, { "code": null, "e": 448, "s": 52, "text": "C++ defined functions to get smallest and largest elements among 2 or in a container using different functions. But there are also functions that are used to get both smalles...
Tailwind CSS Margin
23 Mar, 2022 This class accepts lots of values in tailwind CSS in which all the properties are covered as in the class form. It is the alternative to the CSS Margin Property. This class is used to create space around the element, outside any defined border. We can set different margins for individual sides(top, right, ...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Mar, 2022" }, { "code": null, "e": 577, "s": 52, "text": "This class accepts lots of values in tailwind CSS in which all the properties are covered as in the class form. It is the alternative to the CSS Margin Property. This class i...
reflect.FieldByName() Function in Golang with Examples
03 May, 2020 Go language provides inbuilt support implementation of run-time reflection and allowing a program to manipulate objects with arbitrary types with the help of reflect package. The reflect.FieldByName() Function in Golang is used to get the struct field with the given name. To access this function, one needs...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 May, 2020" }, { "code": null, "e": 383, "s": 28, "text": "Go language provides inbuilt support implementation of run-time reflection and allowing a program to manipulate objects with arbitrary types with the help of reflect package. ...
Writing power function for large numbers
28 May, 2021 We have given two numbers x and n which are base and exponent respectively. Write a function to compute x^n where 1 <= x, n <= 10000 and overflow may happenExamples: Input : x = 5, n = 20 Output : 95367431640625 Input : x = 2, n = 100 Output : 1267650600228229401496703205376 In the above example, 2^10...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 May, 2021" }, { "code": null, "e": 222, "s": 54, "text": "We have given two numbers x and n which are base and exponent respectively. Write a function to compute x^n where 1 <= x, n <= 10000 and overflow may happenExamples: " }, ...
numpy.random.laplace() in Python
15 Jul, 2020 With the help of numpy.random.laplace() method, we can get the random samples of Laplace or double exponential distribution having specific mean and scale value and returns the random samples by using this method. laplace distribution Syntax : numpy.random.laplace(loc=0.0, scale=1.0, size=None) Return : Re...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Jul, 2020" }, { "code": null, "e": 242, "s": 28, "text": "With the help of numpy.random.laplace() method, we can get the random samples of Laplace or double exponential distribution having specific mean and scale value and returns th...