title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Shell Script to Demonstrate Special Parameters With Example - GeeksforGeeks
20 Apr, 2021 Here, we are going to see what are the special Parameters of the shell script. Before that first, let’s understand what is parameters in the shell. The parameter is the entity that stores the value. The variables are the parameters that are defined by the user to use in that specific shell script. And the ...
[ { "code": null, "e": 25651, "s": 25623, "text": "\n20 Apr, 2021" }, { "code": null, "e": 26119, "s": 25651, "text": "Here, we are going to see what are the special Parameters of the shell script. Before that first, let’s understand what is parameters in the shell. The parameter i...
ConcurrentSkipListMap in Java with Examples - GeeksforGeeks
24 Nov, 2020 The ConcurrentSkipListMap class is a member of the Java Collections Framework. It was introduced in JDK 1.6, it belongs to java.util.concurrent package. The ConcurrentSkipListMap is a scalable implementation of ConcurrentNavigableMap. All the elements are sorted based on natural ordering or by the Comparat...
[ { "code": null, "e": 25251, "s": 25223, "text": "\n24 Nov, 2020" }, { "code": null, "e": 25822, "s": 25251, "text": "The ConcurrentSkipListMap class is a member of the Java Collections Framework. It was introduced in JDK 1.6, it belongs to java.util.concurrent package. The Concur...
How to Install Scala on MacOS? - GeeksforGeeks
30 Nov, 2021 In this article, we are going to show you how you can download and install Scala on your Mac operating system. First of all, you need to download the Java JDK which you can download here Follow the below steps to install Scala on MacOS: Step 1: After installing JDK, run the following commands and make sure...
[ { "code": null, "e": 26221, "s": 26193, "text": "\n30 Nov, 2021" }, { "code": null, "e": 26408, "s": 26221, "text": "In this article, we are going to show you how you can download and install Scala on your Mac operating system. First of all, you need to download the Java JDK whic...
Why can't static methods be abstract in Java? - GeeksforGeeks
23 Aug, 2021 In Java, a static method cannot be abstract. Doing so will cause compilation errors.Example: Java // Java program to demonstrate// abstract static method import java.io.*; // super-class Aabstract class A { // abstract static method func // it has no body abstract static void func();} // subcla...
[ { "code": null, "e": 25250, "s": 25222, "text": "\n23 Aug, 2021" }, { "code": null, "e": 25345, "s": 25250, "text": "In Java, a static method cannot be abstract. Doing so will cause compilation errors.Example: " }, { "code": null, "e": 25350, "s": 25345, "tex...
Kotlin | Type Checking and Smart Casting - GeeksforGeeks
28 Mar, 2022 In Kotlin, we can check the type of certain variable using the is operator at runtime. It is a way of checking the type of a variable at runtime to separate the flow for different objects. Kotlin program of type checking using if-else blocks- Kotlin fun main(args: Array<String>) { var name = "Praveen" ...
[ { "code": null, "e": 25219, "s": 25191, "text": "\n28 Mar, 2022" }, { "code": null, "e": 25463, "s": 25219, "text": "In Kotlin, we can check the type of certain variable using the is operator at runtime. It is a way of checking the type of a variable at runtime to separate the fl...
Program to check Strength of Password - GeeksforGeeks
28 Feb, 2022 A password is said to be strong if it satisfies the following criteria: It contains at least one lowercase English character.It contains at least one uppercase English character.It contains at least one special character. The special characters are: !@#$%^&*()-+Its length is at least 8.It contains at leas...
[ { "code": null, "e": 26477, "s": 26449, "text": "\n28 Feb, 2022" }, { "code": null, "e": 26550, "s": 26477, "text": "A password is said to be strong if it satisfies the following criteria: " }, { "code": null, "e": 26797, "s": 26550, "text": "It contains at le...
Balance pans using given weights that are powers of a number - GeeksforGeeks
06 Jul, 2021 Given a simple weighting scale with two pans, we are given a weight T and some other weights which are the powers of a specific number a, our goal is to balance these pans using the given weights. More formally we need to satisfy this equation, T + (some power of a) = (some other powers of a) Remember that...
[ { "code": null, "e": 25961, "s": 25933, "text": "\n06 Jul, 2021" }, { "code": null, "e": 26341, "s": 25961, "text": "Given a simple weighting scale with two pans, we are given a weight T and some other weights which are the powers of a specific number a, our goal is to balance th...
Minimax Algorithm in Game Theory | Set 2 (Introduction to Evaluation Function) - GeeksforGeeks
17 Mar, 2022 Prerequisite : Minimax Algorithm in Game TheoryAs seen in the above article, each leaf node had a value associated with it. We had stored this value in an array. But in the real world when we are creating a program to play Tic-Tac-Toe, Chess, Backgammon, etc. we need to implement a function that calculates...
[ { "code": null, "e": 26371, "s": 26343, "text": "\n17 Mar, 2022" }, { "code": null, "e": 27252, "s": 26371, "text": "Prerequisite : Minimax Algorithm in Game TheoryAs seen in the above article, each leaf node had a value associated with it. We had stored this value in an array. B...
Scala Iterator count() method with example - GeeksforGeeks
30 Jun, 2019 The count() method belongs to the concrete value members of the class Abstract Iterator. It is defined in the class IterableOnceOps. It counts the number of elements in the stated collection which satisfy the given predicate. Method Definition : def count(p: (A) => Boolean): Int Where, p is the predicate u...
[ { "code": null, "e": 25223, "s": 25195, "text": "\n30 Jun, 2019" }, { "code": null, "e": 25449, "s": 25223, "text": "The count() method belongs to the concrete value members of the class Abstract Iterator. It is defined in the class IterableOnceOps. It counts the number of elemen...
Minimum increment operations to make the array in increasing order - GeeksforGeeks
23 Apr, 2021 Given an array of size N and X. Find minimum moves required to make the array in increasing order. In each move one can add X to any element in the array. Examples: Input : a = { 1, 3, 3, 2 }, X = 2 Output : 3 Explanation : Modified array is { 1, 3, 5, 6 } Input : a = { 3, 5, 6 }, X = 5 Output : 0 Observ...
[ { "code": null, "e": 26305, "s": 26277, "text": "\n23 Apr, 2021" }, { "code": null, "e": 26460, "s": 26305, "text": "Given an array of size N and X. Find minimum moves required to make the array in increasing order. In each move one can add X to any element in the array." }, ...
java.time.ZoneId Class in Java - GeeksforGeeks
03 Mar, 2021 A ZoneId is used to identify the rules that used to convert between a LocalDateTime and an Instant of time. The actual rules, describing when and the way the offset changes, are defined by ZoneRules. This class is just an ID wont to obtain the underlying rules. The given approach has opted because the gove...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n03 Mar, 2021" }, { "code": null, "e": 25606, "s": 25225, "text": "A ZoneId is used to identify the rules that used to convert between a LocalDateTime and an Instant of time. The actual rules, describing when and the way the offse...
Lowest Common Ancestor in a Binary Tree | Set 1 - GeeksforGeeks
17 Apr, 2022 Given a binary tree (not a binary search tree) and two values say n1 and n2, write a program to find the least common ancestor. Following is definition of LCA from Wikipedia: Let T be a rooted tree. The lowest common ancestor between two nodes n1 and n2 is defined as the lowest node in T that has both n1 a...
[ { "code": null, "e": 26523, "s": 26495, "text": "\n17 Apr, 2022" }, { "code": null, "e": 26651, "s": 26523, "text": "Given a binary tree (not a binary search tree) and two values say n1 and n2, write a program to find the least common ancestor." }, { "code": null, "e"...
DCL Full Form - GeeksforGeeks
14 May, 2020 DCL stands for Data Control Language in Structured Query Language (SQL). As the name suggests these commands are used to control privilege in the database. The privileges (Right to access the data) are required for performing all the database operations like creating tables, views, or sequences.DCL command...
[ { "code": null, "e": 25549, "s": 25521, "text": "\n14 May, 2020" }, { "code": null, "e": 25983, "s": 25549, "text": "DCL stands for Data Control Language in Structured Query Language (SQL). As the name suggests these commands are used to control privilege in the database. The pri...
ASCII() Function in SQL Server - GeeksforGeeks
07 Oct, 2020 The ASCII() function returns the ASCII value of the leftmost character of a character expression. Syntax : ASCII(character_expression) Parameter :This method accepts a single-parameter as mentioned above and described below :character_expression :It can be a literal character, an expression of a string, or...
[ { "code": null, "e": 25098, "s": 25070, "text": "\n07 Oct, 2020" }, { "code": null, "e": 25196, "s": 25098, "text": "The ASCII() function returns the ASCII value of the leftmost character of a character expression." }, { "code": null, "e": 25205, "s": 25196, "...
conj() function in C++ with Examples - GeeksforGeeks
05 Aug, 2021 The conj() function is defined in the complex header file. This function is used to find the conjugate of the complex number z. If we represent a complex number z as (real, img), then its conjugate is (real, -img).Syntax: template<class T> complex<T> conj (const complex<T>& Z); Parameter: z: This...
[ { "code": null, "e": 24098, "s": 24070, "text": "\n05 Aug, 2021" }, { "code": null, "e": 24322, "s": 24098, "text": "The conj() function is defined in the complex header file. This function is used to find the conjugate of the complex number z. If we represent a complex number z ...
Groovy - sqrt()
The method returns the square root of the argument. double sqrt(double d) d - Any primitive data type. This method Returns the square root of the argument. Following is an example of the usage of this method − class Example { static void main(String[] args) { double x = 11.635; double y = 2.76; ...
[ { "code": null, "e": 2290, "s": 2238, "text": "The method returns the square root of the argument." }, { "code": null, "e": 2313, "s": 2290, "text": "double sqrt(double d)\n" }, { "code": null, "e": 2342, "s": 2313, "text": "d - Any primitive data type." }, ...
Web Scraping using Selenium and YOLO to build Computer Vision datasets | by Borja Souto García | Towards Data Science
If we ask several experts about the keys of a Computer Vision project (especially if we want a real application), maybe one the most repeated element (and in my opinion the most important thing) is the dataset. The problem appears when we also ask about the most arduous and laborious task, which answer also usually is ...
[ { "code": null, "e": 515, "s": 172, "text": "If we ask several experts about the keys of a Computer Vision project (especially if we want a real application), maybe one the most repeated element (and in my opinion the most important thing) is the dataset. The problem appears when we also ask about t...
Convolutional Neural Network. Learn Convolutional Neural Network from... | by dshahid380 | Towards Data Science
What is CNN ? Why should we use CNN ? Few Definitions Layers in CNN Keras Implementation Computer vision is evolving rapidly day-by-day. Its one of the reason is deep learning. When we talk about computer vision, a term convolutional neural network( abbreviated as CNN) comes in our mind because CNN is heavily used here...
[ { "code": null, "e": 186, "s": 172, "text": "What is CNN ?" }, { "code": null, "e": 210, "s": 186, "text": "Why should we use CNN ?" }, { "code": null, "e": 226, "s": 210, "text": "Few Definitions" }, { "code": null, "e": 240, "s": 226, "te...
Escape sequences in C
Many programming languages support a concept called Escape Sequence. When a character is preceded by a backslash (\), it is called an escape sequence and it has a special meaning to the compiler. For example, \n in the following statement is a valid character and it is called a new line character − char ch = '\n'; Here...
[ { "code": null, "e": 1362, "s": 1062, "text": "Many programming languages support a concept called Escape Sequence. When a character is preceded by a backslash (\\), it is called an escape sequence and it has a special meaning to the compiler. For example, \\n in the following statement is a valid c...
Create COVID-19 Map Animation with Python in 5 Minutes | by Joe T. Santhanavanich | Towards Data Science
In the fight against COVID-19, The GIS technologies have played an important role in many aspects, including the data integration, and geospatial visualization of epidemic information, spatial tracking of confirmed cases, prediction of regional transmission, and many more. These provide support information for governme...
[ { "code": null, "e": 650, "s": 172, "text": "In the fight against COVID-19, The GIS technologies have played an important role in many aspects, including the data integration, and geospatial visualization of epidemic information, spatial tracking of confirmed cases, prediction of regional transmissi...
How to use handler in android?
This example demonstrate about How to use handler 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:an...
[ { "code": null, "e": 1123, "s": 1062, "text": "This example demonstrate about How to use handler in android" }, { "code": null, "e": 1252, "s": 1123, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new p...
How can I convert Python dictionary to JavaScript hash table?
Python and javascript both have different representations for a dictionary. So you need an intermediate representation in order to pass data between them. The most commonly used intermediate representation is JSON, which is a simple lightweight data-interchange format. The dumps function converts the dict to a string. ...
[ { "code": null, "e": 1332, "s": 1062, "text": "Python and javascript both have different representations for a dictionary. So you need an intermediate representation in order to pass data between them. The most commonly used intermediate representation is JSON, which is a simple lightweight data-int...
Deep Convolutional GAN with Keras - GeeksforGeeks
28 Jan, 2022 Deep Convolutional GAN (DCGAN) was proposed by a researcher from MIT and Facebook AI research .It is widely used in many convolution based generation based techniques. The focus of this paper was to make training GANs stable . Hence, they proposed some architectural changes in computer vision problem. In t...
[ { "code": null, "e": 24656, "s": 24628, "text": "\n28 Jan, 2022" }, { "code": null, "e": 25066, "s": 24656, "text": "Deep Convolutional GAN (DCGAN) was proposed by a researcher from MIT and Facebook AI research .It is widely used in many convolution based generation based techniq...
Count occurrences of elements of list in Java - GeeksforGeeks
11 Dec, 2018 Suppose we have an elements in ArrayList, we can count the occurrences of elements present in a number of ways. This data structure uses hash function to map similar values, known as keys to their associated values. Map values can be retrieved using key as it contains key-value pairs. // Java program to co...
[ { "code": null, "e": 24919, "s": 24891, "text": "\n11 Dec, 2018" }, { "code": null, "e": 25031, "s": 24919, "text": "Suppose we have an elements in ArrayList, we can count the occurrences of elements present in a number of ways." }, { "code": null, "e": 25205, "s"...
How to remove an object using filter() in JavaScript?
Let’s say, we have the following objects in JavaScript − ObjectValue =[ { "id": "101", "details": { Name:"John",subjectName:"JavaScript" }}, { "id": "102", "details": { Name:"David",subjectName:"MongoDB" }}, { "id": "103" } ] To remove an object using filter(), the code is as follows − ObjectValue =[ { "id"...
[ { "code": null, "e": 1119, "s": 1062, "text": "Let’s say, we have the following objects in JavaScript −" }, { "code": null, "e": 1297, "s": 1119, "text": "ObjectValue =[\n { \"id\": \"101\", \"details\": { Name:\"John\",subjectName:\"JavaScript\" }},\n { \"id\": \"102\", \"de...
Explain about triggers and active databases in DBMS
A trigger is a procedure which is automatically invoked by the DBMS in response to changes to the database, and is specified by the database administrator (DBA). A database with a set of associated triggers is generally called an active database. A triggers description contains three parts, which are as follows − Event...
[ { "code": null, "e": 1309, "s": 1062, "text": "A trigger is a procedure which is automatically invoked by the DBMS in response to changes to the database, and is specified by the database administrator (DBA). A database with a set of associated triggers is generally called an active database." }, ...
What are required arguments of a function in python?
Required arguments are the mandatory arguments of a function. These argument values must be passed in correct number and order during function call. If you run the given code you get the following output Hi 15 Traceback (most recent call last): File "requiredarg1.py", line 4, in <module> requiredArg('Hello') Typ...
[ { "code": null, "e": 1212, "s": 1062, "text": "Required arguments are the mandatory arguments of a function. These argument values must be passed in correct number and order during function call. " }, { "code": null, "e": 1267, "s": 1212, "text": "If you run the given code you ge...
All combinations of sums for array in JavaScript
We are required to write a JavaScript function that takes in an array of Numbers as the first argument and a number, say n as the second argument. The number n will always be less than or equal to the length of the array. Our function should return an array of the sum of all elements of all the possible subarrays of le...
[ { "code": null, "e": 1284, "s": 1062, "text": "We are required to write a JavaScript function that takes in an array of Numbers as the first\nargument and a number, say n as the second argument. The number n will always be less than or equal to the length of the array." }, { "code": null, ...
Create your own Python package and publish it into PyPI | by Wendy Navarrete | Towards Data Science
I am assuming most of the people, who are reading this article, have already run the command below. But, what happens behind the scenes? pip install pandas At the moment you run the command pip install you are accessing the PyPI site to download a package. The site https://pypi.org/ is a repository of software for the ...
[ { "code": null, "e": 309, "s": 172, "text": "I am assuming most of the people, who are reading this article, have already run the command below. But, what happens behind the scenes?" }, { "code": null, "e": 328, "s": 309, "text": "pip install pandas" }, { "code": null, ...
Python Keywords - GeeksforGeeks
12 Oct, 2021 Python Keywords: Introduction Keywords in Python are reserved words that can not be used as a variable name, function name, or any other identifier. We can also get all the keyword names using the below code. Python3 # Python code to demonstrate working of iskeyword() # importing "keyword" for keyword ope...
[ { "code": null, "e": 41658, "s": 41630, "text": "\n12 Oct, 2021" }, { "code": null, "e": 41688, "s": 41658, "text": "Python Keywords: Introduction" }, { "code": null, "e": 41807, "s": 41688, "text": "Keywords in Python are reserved words that can not be used a...
Calculate the absolute value in R programming - abs() method - GeeksforGeeks
10 May, 2020 abs() method in R programming is used to get the absolute value that is positive value doesn’t change and negative value converted into positive value. Syntax: abs(value) Return: Returns the absolute value. Example 1: # R program to calculate absolute value # Using abs() methodanswer1 <- abs(-12)answer2 <...
[ { "code": null, "e": 26205, "s": 26177, "text": "\n10 May, 2020" }, { "code": null, "e": 26357, "s": 26205, "text": "abs() method in R programming is used to get the absolute value that is positive value doesn’t change and negative value converted into positive value." }, { ...
How to create warning notification alerts in Bootstrap ? - GeeksforGeeks
24 Aug, 2021 Before or after performing an action, we frequently encounter specific notifications on some websites. These alert messages are highlighted text that should be taken into account when executing a task. Using preset classes in Bootstrap, these alert messages can be displayed on the website. Approach: The .a...
[ { "code": null, "e": 25562, "s": 25534, "text": "\n24 Aug, 2021" }, { "code": null, "e": 25853, "s": 25562, "text": "Before or after performing an action, we frequently encounter specific notifications on some websites. These alert messages are highlighted text that should be tak...
MySQL MIN() and MAX() Functions
The MIN() function returns the smallest value of the selected column. The MAX() function returns the largest value of the selected column. Below is a selection from the "Products" table in the Northwind sample database: The following SQL statement finds the price of the cheapest product: The following SQL statement fin...
[ { "code": null, "e": 70, "s": 0, "text": "The MIN() function returns the smallest value of the selected column." }, { "code": null, "e": 139, "s": 70, "text": "The MAX() function returns the largest value of the selected column." }, { "code": null, "e": 220, "s": ...
Find max in struct array - GeeksforGeeks
06 Jun, 2018 Given a struct array of type Height, find max struct Height{ int feet; int inches; } Question source : Microsoft Interview Experience Set 127 | (On-Campus for IDC) The idea is simple, traverse the array, and keep track of max valuevalue of array element(in inches) = 12*feet + inches // CPP program to ...
[ { "code": null, "e": 24820, "s": 24792, "text": "\n06 Jun, 2018" }, { "code": null, "e": 24866, "s": 24820, "text": "Given a struct array of type Height, find max" }, { "code": null, "e": 24910, "s": 24866, "text": "struct Height{\n int feet;\n int inches;\n...
Crime Location Analysis and Prediction Using Python and Machine Learning | by Will Keefe | Towards Data Science
The author of this article is a proud West Virginia University Mountaineer and spent four years in Morgantown, West Virginia. Morgantown is a beautiful city in the Mountain State, and the campus of WVU is very safe. That being said, like in all cities safety incidents do occur, and the University Police Department repo...
[ { "code": null, "e": 720, "s": 47, "text": "The author of this article is a proud West Virginia University Mountaineer and spent four years in Morgantown, West Virginia. Morgantown is a beautiful city in the Mountain State, and the campus of WVU is very safe. That being said, like in all cities safe...
Program to sort each diagonal elements in ascending order of a matrix in C++
Suppose we have n x m matrix Mat, we have to sort this Mat diagonally in increasing order from top-left to the bottom right, so that all elements in the diagonals are sorted. So if the input matrix is like − The output matrix will be − To solve this, we will follow these steps − Define a method called solve(), this wil...
[ { "code": null, "e": 1270, "s": 1062, "text": "Suppose we have n x m matrix Mat, we have to sort this Mat diagonally in increasing order from top-left to the bottom right, so that all elements in the diagonals are sorted. So if the input matrix is like −" }, { "code": null, "e": 1298, ...
A Practical Guide to Implementing a Random Forest Classifier in Python | by Eden Molina | Towards Data Science
Random forest is a supervised learning method, meaning there are labels for and mappings between our input and outputs. It can be used for classification tasks like determining the species of a flower based on measurements like petal length and color, or it can used for regression tasks like predicting tomorrow’s weath...
[ { "code": null, "e": 1574, "s": 172, "text": "Random forest is a supervised learning method, meaning there are labels for and mappings between our input and outputs. It can be used for classification tasks like determining the species of a flower based on measurements like petal length and color, or...
How to create a ToolBar in JavaFX?
A toolbar is used to display UI elements such as buttons, toggle buttons, and separators, etc.. You cannot add any other nodes to a toolbar. The contents of a toolbar can be arranged either horizontally or vertically. You can create a toolbar by instantiating the javafx.scene.control.ToolBar class. The following Exampl...
[ { "code": null, "e": 1362, "s": 1062, "text": "A toolbar is used to display UI elements such as buttons, toggle buttons, and separators, etc.. You cannot add any other nodes to a toolbar. The contents of a toolbar can be arranged either horizontally or vertically. You can create a toolbar by instant...
Angular7 - Project Setup
In this chapter, we shall discuss about the Project Setup in Angular 7. To get started with the project setup, make sure you have nodejs installed. You can check the version of node in the command line using the command, node –v, as shown below − If you do not get the version, install nodejs from their official site −h...
[ { "code": null, "e": 2133, "s": 2061, "text": "In this chapter, we shall discuss about the Project Setup in Angular 7." }, { "code": null, "e": 2308, "s": 2133, "text": "To get started with the project setup, make sure you have nodejs installed. You can check the version of node ...
Peak element | Practice | GeeksforGeeks
An element is called a peak element if its value is not smaller than the value of its adjacent elements(if they exists). Given an array arr[] of size N, find the index of any one of its peak elements. Note: The generated output will always be 1 if the index that you return is correct. Otherwise output will be 0. Exam...
[ { "code": null, "e": 553, "s": 238, "text": "An element is called a peak element if its value is not smaller than the value of its adjacent elements(if they exists).\nGiven an array arr[] of size N, find the index of any one of its peak elements.\nNote: The generated output will always be 1 if the i...
Perfect Cube - GeeksforGeeks
30 Nov, 2021 Given a number N, the task is to check whether the given number N is a perfect cube or not. Examples: Input: N = 216 Output: Yes Explanation: As 216 = 6*6*6. Therefore the cube root of 216 is 6.Input: N = 100 Output: No Method 1: Naive Approach The idea is to check for each number from 1 to N if the cub...
[ { "code": null, "e": 24691, "s": 24663, "text": "\n30 Nov, 2021" }, { "code": null, "e": 24795, "s": 24691, "text": "Given a number N, the task is to check whether the given number N is a perfect cube or not. Examples: " }, { "code": null, "e": 24914, "s": 24795,...
Extreme Rare Event Classification using Autoencoders in Keras | by Chitta Ranjan | Towards Data Science
<<Download the free book, Understanding Deep Learning, to learn more>> In a rare-event problem, we have an unbalanced dataset. Meaning, we have fewer positively labeled samples than negative. In a typical rare-event problem, the positively labeled data are around 5–10% of the total. In an extreme rare event problem, we...
[ { "code": null, "e": 242, "s": 171, "text": "<<Download the free book, Understanding Deep Learning, to learn more>>" }, { "code": null, "e": 592, "s": 242, "text": "In a rare-event problem, we have an unbalanced dataset. Meaning, we have fewer positively labeled samples than nega...
AWK - Bit Manipulation Functions
AWK has the following built-in bit manipulation functions − Performs bitwise AND operation. [jerry]$ awk 'BEGIN { num1 = 10 num2 = 6 printf "(%d AND %d) = %d\n", num1, num2, and(num1, num2) }' On executing this code, you get the following result − (10 AND 6) = 2 It performs bitwise COMPLEMENT operation. [jerr...
[ { "code": null, "e": 1917, "s": 1857, "text": "AWK has the following built-in bit manipulation functions −" }, { "code": null, "e": 1949, "s": 1917, "text": "Performs bitwise AND operation." }, { "code": null, "e": 2059, "s": 1949, "text": "[jerry]$ awk 'BEGIN...
C library function - fclose()
The C library function int fclose(FILE *stream) closes the stream. All buffers are flushed. Following is the declaration for fclose() function. int fclose(FILE *stream) stream − This is the pointer to a FILE object that specifies the stream to be closed. stream − This is the pointer to a FILE object that specifies the ...
[ { "code": null, "e": 2099, "s": 2007, "text": "The C library function int fclose(FILE *stream) closes the stream. All buffers are flushed." }, { "code": null, "e": 2151, "s": 2099, "text": "Following is the declaration for fclose() function." }, { "code": null, "e": 2...
DateTime.AddTicks() Method in C# - GeeksforGeeks
22 Jan, 2019 This method is used to returns a new DateTime that adds the specified number of ticks to the value of this instance. This method does not change the value of this DateTime. Instead, it returns a new DateTime whose value is the result of this operation. Syntax: public DateTime AddTicks (long value); Here, i...
[ { "code": null, "e": 24256, "s": 24228, "text": "\n22 Jan, 2019" }, { "code": null, "e": 24509, "s": 24256, "text": "This method is used to returns a new DateTime that adds the specified number of ticks to the value of this instance. This method does not change the value of this ...
unordered_map hash_function() function in C++ STL - GeeksforGeeks
17 Dec, 2018 The unordered_map::hash_function() is a built in function in C++ STL which is used to get the hash function. This hash function is a unary function which takes a single argument only and returns a unique value of type size_t based on it. Syntax: unordered_map_name.hash_function() Parameter: The function d...
[ { "code": null, "e": 24122, "s": 24094, "text": "\n17 Dec, 2018" }, { "code": null, "e": 24360, "s": 24122, "text": "The unordered_map::hash_function() is a built in function in C++ STL which is used to get the hash function. This hash function is a unary function which takes a s...
Find the first repeated word in a string in Python using Dictionary
In a given sentence there may be a word which get repeated before the sentence ends. In this python program, we are going to catch such word which is repeated in sentence. Below is the logical steps we are going to follow to get this result. Splits the given string into words separated by space. Then we convert these w...
[ { "code": null, "e": 1304, "s": 1062, "text": "In a given sentence there may be a word which get repeated before the sentence ends. In this python program, we are going to catch such word which is repeated in sentence. Below is the logical steps we are going to follow to get this result." }, { ...
Vue.js v-on:keyup Directive
08 Jul, 2020 The v-on:keyup directive is a Vue.js directive used to add an event listener to an button in the keyboard. First, we will create a div element with id as app and let’s apply the v-on:keyup directive to the input element. Further, we can execute a function when we press the associated key. Syntax: v-on:keyu...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Jul, 2020" }, { "code": null, "e": 318, "s": 28, "text": "The v-on:keyup directive is a Vue.js directive used to add an event listener to an button in the keyboard. First, we will create a div element with id as app and let’s apply t...
Worst-Fit Allocation in Operating Systems
03 Feb, 2021 For both fixed and dynamic memory allocation schemes, the operating system must keep a list of each memory location noting which are free and which are busy. Then as new jobs come into the system, the free partitions must be allocated. These partitions may be allocated in 4 ways: 1. First-Fit Memory Allo...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Feb, 2021" }, { "code": null, "e": 265, "s": 28, "text": "For both fixed and dynamic memory allocation schemes, the operating system must keep a list of each memory location noting which are free and which are busy. Then as new jobs ...
Stack contains() method in Java with Example
24 Dec, 2018 The java.util.Stack.contains() method is used to check whether a specific element is present in the Stack or not. So basically it is used to check if a Stack contains any particular element or not. Syntax: Stack.contains(Object element) Parameters: This method takes a mandatory parameter element which is o...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Dec, 2018" }, { "code": null, "e": 226, "s": 28, "text": "The java.util.Stack.contains() method is used to check whether a specific element is present in the Stack or not. So basically it is used to check if a Stack contains any part...
Ruby | pop() function
06 May, 2019 The pop() function in Ruby is used to pop or remove the last element of the given array and returns the removed elements. Syntax: pop(Elements) Parameters:Elements : This is the number of elements which are to be removed from the end of the given array. If this parameter is not used then it removes and ret...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 May, 2019" }, { "code": null, "e": 150, "s": 28, "text": "The pop() function in Ruby is used to pop or remove the last element of the given array and returns the removed elements." }, { "code": null, "e": 172, "s": 15...
Matplotlib – Textbox Widgets
17 Feb, 2022 In this article, we are going to see matplotlib’s textbox widget. Matplotlib is a plotting library for the Python programming language. In this article, we will try to plot a graph for different powers(e.g. t^2, t^3, t^9, etc.) using textbox widget. The Textbox is a widget that accepts input from the user....
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Feb, 2022" }, { "code": null, "e": 278, "s": 28, "text": "In this article, we are going to see matplotlib’s textbox widget. Matplotlib is a plotting library for the Python programming language. In this article, we will try to plot a ...
How to map, reduce and filter a Set element using JavaScript ?
08 May, 2020 The map(), reduce() and filter() are array functions that transform the array according to the applied function and return the updated array. They are used to write simple, short and clean codes for modifying an array instead of using the loops. map() method: It applies a given function on all the elements...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 May, 2020" }, { "code": null, "e": 274, "s": 28, "text": "The map(), reduce() and filter() are array functions that transform the array according to the applied function and return the updated array. They are used to write simple, sh...
HashSet toString() method in Java with Example
24 Dec, 2018 The toString() method of Java HashSet is used to return a string representation of the elements of the Collection. The String representation comprises a set representation of the elements of the Collection in the order they are picked by the iterator closed in square brackets[].This method is used mainly t...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Dec, 2018" }, { "code": null, "e": 143, "s": 28, "text": "The toString() method of Java HashSet is used to return a string representation of the elements of the Collection." }, { "code": null, "e": 438, "s": 143, ...
Understanding Activity Lifecycle to Retain UI Data when Back Pressed in Android
28 Jul, 2021 This is an override function called when the user presses the back button on an Android device. It has great implications on the activity lifecycle of the application. The official documentation states that onBackPressed() method is called when the activity has detected the user’s press of the back key. Th...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jul, 2021" }, { "code": null, "e": 449, "s": 28, "text": "This is an override function called when the user presses the back button on an Android device. It has great implications on the activity lifecycle of the application. The off...
Matplotlib.pyplot.subplots_adjust() in Python
19 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, etc. Th...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Apr, 2020" }, { "code": null, "e": 357, "s": 52, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MA...
Find the largest rectangle of 1’s with swapping of columns allowed
27 Dec, 2021 Given a matrix with 0 and 1’s, find the largest rectangle of all 1’s in the matrix. The rectangle can be formed by swapping any pair of columns of given matrix.Example: Input: bool mat[][] = { {0, 1, 0, 1, 0}, {0, 1, 0, 1, 1}, {1, 1, 0, 1, 0} ...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 Dec, 2021" }, { "code": null, "e": 223, "s": 52, "text": "Given a matrix with 0 and 1’s, find the largest rectangle of all 1’s in the matrix. The rectangle can be formed by swapping any pair of columns of given matrix.Example: " ...
How to compute the eigenvalues and right eigenvectors of a given square array using NumPY?
02 Sep, 2020 In this article, we will discuss how to compute the eigenvalues and right eigenvectors of a given square array using NumPy library. Example: Suppose we have a matrix as: [[1,2], [2,3]] Eigenvalue we get from this matrix or square array is: [-0.23606798 4.23606798] Eigenvectors of this matrix are: [[...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Sep, 2020" }, { "code": null, "e": 161, "s": 28, "text": "In this article, we will discuss how to compute the eigenvalues and right eigenvectors of a given square array using NumPy library. " }, { "code": null, "e": 170, ...
Microsoft Azure – Starting & Stopping a Azure Kubernetes Service Cluster
01 Jun, 2021 In this article, we will learn how to stop and start Azure Kubernetes Service(AKS) clusters. You can stop your entire Azure Kubernetes Service cluster to save costs. To follow along, you will need an existing Azure Kubernetes service that is running. To use start and stop for AKS, we need the AKS preview ...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Jun, 2021" }, { "code": null, "e": 280, "s": 28, "text": "In this article, we will learn how to stop and start Azure Kubernetes Service(AKS) clusters. You can stop your entire Azure Kubernetes Service cluster to save costs. To follow...
How to Convert Array to Set in JavaScript?
31 Jul, 2019 The task is to convert a JavaScript Array to a Set with the help of JavaScript. we’re going to discuss few techniques. Approach: Take the JavaScript array into a variable. Use the new keyword to create a new set and pass the JavaScript array as it first and only argument. This will automatically create the...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Jul, 2019" }, { "code": null, "e": 147, "s": 28, "text": "The task is to convert a JavaScript Array to a Set with the help of JavaScript. we’re going to discuss few techniques." }, { "code": null, "e": 157, "s": 147, ...
Residual, BottleNeck, Inverted Residual, Linear BottleNeck, MBConv Explained | by Francesco Zuppichini | Towards Data Science
An interactive version is available here All these blocks have been implemented in my library glasses Keeping track of names in modern Deep Learning is hard. Today we’ll see different blocks used in modern CNN architecture such as ResNet, MobileNet, EfficientNet, and their implementation in PyTorch! Before we do anythi...
[ { "code": null, "e": 213, "s": 172, "text": "An interactive version is available here" }, { "code": null, "e": 274, "s": 213, "text": "All these blocks have been implemented in my library glasses" }, { "code": null, "e": 473, "s": 274, "text": "Keeping track o...
Count number of triplets (a, b, c) from first N natural numbers such that a * b + c = N - GeeksforGeeks
03 May, 2021 Given an integer N, the task is to count the triplets (a, b, c) from the first N natural numbers such that a * b + c = N. Examples: Input: N = 3Output: 3 Explanation: Triplets of the form a * b + c = N are { (1, 1, 2), (1, 2, 1), (2, 1, 1) } Therefore, the required output is 3. Input: N = 100Output: 473 Ap...
[ { "code": null, "e": 25483, "s": 25455, "text": "\n03 May, 2021" }, { "code": null, "e": 25605, "s": 25483, "text": "Given an integer N, the task is to count the triplets (a, b, c) from the first N natural numbers such that a * b + c = N." }, { "code": null, "e": 2561...
What does the repr() function do in Python Object Oriented Programming?
The official Python documentation says __repr__() is used to compute the “official” string representation of an object. The repr() built-in function uses __repr__() to display the object. __repr__() returns a printable representation of the object, one of the ways possible to create this object. __repr__() is more us...
[ { "code": null, "e": 1436, "s": 1062, "text": "The official Python documentation says __repr__() is used to compute the “official” string representation of an object. The repr() built-in function uses __repr__() to display the object. __repr__() returns a printable representation of the object, one...
Change the ratio between width and height of an image using Python - Pillow - GeeksforGeeks
23 Dec, 2020 Python Imaging Library (expansion of PIL) is the de facto image processing package for the Python language. It incorporates lightweight image processing tools that aid in editing, creating, and saving images. This module is not preloaded with Python. So to install it execute the following command in the co...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n23 Dec, 2020" }, { "code": null, "e": 24611, "s": 24292, "text": "Python Imaging Library (expansion of PIL) is the de facto image processing package for the Python language. It incorporates lightweight image processing tools that...
Normal Probability Plot in R using ggplot2 - GeeksforGeeks
14 Jan, 2022 A normal probability plot is a graphical representation of the data. A normal probability plot is used to check if the given data set is normally distributed or not. It is used to compare a data set with the normal distribution. If a given data set is normally distributed then it will reside in a shape li...
[ { "code": null, "e": 25314, "s": 25283, "text": " \n14 Jan, 2022\n" }, { "code": null, "e": 25640, "s": 25314, "text": "A normal probability plot is a graphical representation of the data. A normal probability plot is used to check if the given data set is normally distributed or...
SWING - GridLayout Class
The class GridLayout arranges the components in a rectangular grid. Following is the declaration for java.awt.GridLayout class − public class GridLayout extends Object implements LayoutManager, Serializable GridLayout() Creates a grid layout with a default of one column per component, in a single row. GridLay...
[ { "code": null, "e": 1831, "s": 1763, "text": "The class GridLayout arranges the components in a rectangular grid." }, { "code": null, "e": 1892, "s": 1831, "text": "Following is the declaration for java.awt.GridLayout class −" }, { "code": null, "e": 1980, "s": 1...
How to randomize and shuffle array of numbers in Java?
At first, create an integer array − int[] arr = { 20, 40, 60, 80,100, 120, 140, 160, 180, 200}; Now, create a Random class object − Random rand = new Random(); Loop until the length of the array and shuffle the elements − for (int i = 0; i < arr.length; ++i) { int index = rand.nextInt(arr.length - i); int tmp = a...
[ { "code": null, "e": 1098, "s": 1062, "text": "At first, create an integer array −" }, { "code": null, "e": 1158, "s": 1098, "text": "int[] arr = { 20, 40, 60, 80,100, 120, 140, 160, 180, 200};" }, { "code": null, "e": 1194, "s": 1158, "text": "Now, create a R...
MySQL WHERE Clause
The WHERE clause is used to filter records. It is used to extract only those records that fulfill a specified condition. Note: The WHERE clause is not only used in SELECT statements, it is also used in UPDATE, DELETE, etc.! Below is a selection from the "Customers" table in the Northwind sample database: The followin...
[ { "code": null, "e": 44, "s": 0, "text": "The WHERE clause is used to filter records." }, { "code": null, "e": 122, "s": 44, "text": "It is used to extract only those records that fulfill a specified \ncondition." }, { "code": null, "e": 226, "s": 122, "text":...
How to list all users in the Mongo shell?
In order to list all users in the Mongo shell, use the getUsers() method or show command. Case 1 − Using getUsers() The syntax is as follows − db.getUsers(); Case 2 − Using show command The syntax is as follows − show users; Let us implement both the syntaxes in order to list all users in the Mongo shell. Case 1 − The ...
[ { "code": null, "e": 1152, "s": 1062, "text": "In order to list all users in the Mongo shell, use the getUsers() method or show command." }, { "code": null, "e": 1178, "s": 1152, "text": "Case 1 − Using getUsers()" }, { "code": null, "e": 1205, "s": 1178, "tex...
Tryit Editor v3.6 - Show Python
f = open("demofile.txt", "r")
[]
Extracting Speech from Video using Python | by Behic Guven | Towards Data Science
In this post, I will show you how to extract speeches from a video recording file. After recognizing the speeches we will convert them into a text document. This will be a simple machine learning project, that will help you to understand some basics of the Google Speech Recognition library. Speech Recognition is a popu...
[ { "code": null, "e": 855, "s": 171, "text": "In this post, I will show you how to extract speeches from a video recording file. After recognizing the speeches we will convert them into a text document. This will be a simple machine learning project, that will help you to understand some basics of th...
VBScript Debug Objects
The Debug Objects are global objects that can send output to a script debugger. Here, the debugger what we refer to is Microsoft Script Debugger. The Debug objects cannot be created like other objects but can be used when we are debugging. The following methods are supported by Debug Objects. These methods or objects h...
[ { "code": null, "e": 2226, "s": 2080, "text": "The Debug Objects are global objects that can send output to a script debugger. Here, the debugger what we refer to is Microsoft Script Debugger." }, { "code": null, "e": 2320, "s": 2226, "text": "The Debug objects cannot be created ...
C Program For Finding Subarray With Given Sum - Set 1 (Nonnegative Numbers) - GeeksforGeeks
21 Dec, 2021 Given an unsorted array of nonnegative integers, find a continuous subarray which adds to a given number. Examples : Input: arr[] = {1, 4, 20, 3, 10, 5}, sum = 33 Output: Sum found between indexes 2 and 4 Sum of elements between indices 2 and 4 is 20 + 3 + 10 = 33 Input: arr[] = {1, 4, 0, 0, 3, 10, 5}, s...
[ { "code": null, "e": 24796, "s": 24768, "text": "\n21 Dec, 2021" }, { "code": null, "e": 24914, "s": 24796, "text": "Given an unsorted array of nonnegative integers, find a continuous subarray which adds to a given number. Examples : " }, { "code": null, "e": 25303, ...
Map size() Method in Java With Examples
05 Sep, 2020 Map size() method in Java is used to get the total number entries i.e, key-value pair. So this method is useful when you want total entries present on the map. If the map contains more than Integer.MAX_VALUE elements return Integer.MAX_VALUE. Syntax: int size(); Parameter: This method does not take any par...
[ { "code": null, "e": 54, "s": 26, "text": "\n05 Sep, 2020" }, { "code": null, "e": 297, "s": 54, "text": "Map size() method in Java is used to get the total number entries i.e, key-value pair. So this method is useful when you want total entries present on the map. If the map con...
Python | Convert String to Tuple
21 Nov, 2019 Interconversion of data types is very common problem one can face while programming. There can be a problem in which we need to convert a string of integers to a tuple. Let’s discuss certain ways in which this can be done. Method #1 : Using map() + int + split() + tuple()This method can be used to solve th...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Nov, 2019" }, { "code": null, "e": 251, "s": 28, "text": "Interconversion of data types is very common problem one can face while programming. There can be a problem in which we need to convert a string of integers to a tuple. Let’s ...
Output of C programs | Set 44 (Structure & Union)
14 Oct, 2020 Prerequisite: Structure and UnionQUE.1 What is the output of this program? C #include <stdio.h>struct sample { int a = 0; char b = 'A'; float c = 10.5;};int main(){ struct sample s; printf("%d, %c, %f", s.a, s.b, s.c); return 0;} OPTION a) Error b) 0, A, 10.5 c) 0, A, 10.500000 d) No Err...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 Oct, 2020" }, { "code": null, "e": 130, "s": 54, "text": "Prerequisite: Structure and UnionQUE.1 What is the output of this program? " }, { "code": null, "e": 132, "s": 130, "text": "C" }, { "code": "#inc...
Python | time.clock() method
27 Sep, 2019 Time module in Python provides various time related functions. time.clock() method of time module in Python is used to get the current processor time as a floating point number expressed in seconds.As, Most of the functions defined in time module call corresponding C library function. time.clock() method a...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Sep, 2019" }, { "code": null, "e": 91, "s": 28, "text": "Time module in Python provides various time related functions." }, { "code": null, "e": 479, "s": 91, "text": "time.clock() method of time module in Python ...
Concept of setjump and longjump in C
02 Jun, 2017 “Setjump” and “Longjump” are defined in setjmp.h, a header file in C standard library. setjump(jmp_buf buf) : uses buf to remember current position and returns 0. longjump(jmp_buf buf, i) : Go back to place buf is pointing to and return i . // A simple C program to demonstrate working of setjmp() and longj...
[ { "code": null, "e": 52, "s": 24, "text": "\n02 Jun, 2017" }, { "code": null, "e": 139, "s": 52, "text": "“Setjump” and “Longjump” are defined in setjmp.h, a header file in C standard library." }, { "code": null, "e": 215, "s": 139, "text": "setjump(jmp_buf bu...
Print all distinct characters of a string in order (3 Methods)
25 Jun, 2022 Given a string, find the all distinct (or non-repeating characters) in it. For example, if the input string is “Geeks for Geeks”, then output should be ‘for’ and if input string is “Geeks Quiz”, then output should be ‘GksQuiz’.The distinct characters should be printed in same order as they appear in input ...
[ { "code": null, "e": 52, "s": 24, "text": "\n25 Jun, 2022" }, { "code": null, "e": 378, "s": 52, "text": "Given a string, find the all distinct (or non-repeating characters) in it. For example, if the input string is “Geeks for Geeks”, then output should be ‘for’ and if input str...
Data Hiding in Python
28 Oct, 2021 In this article, we will discuss data hiding in Python, starting from data hiding in general to data hiding in Python, along with the advantages and disadvantages of using data hiding in python. Data hiding is a concept which underlines the hiding of data or information from the user. It is one of the key ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Oct, 2021" }, { "code": null, "e": 223, "s": 28, "text": "In this article, we will discuss data hiding in Python, starting from data hiding in general to data hiding in Python, along with the advantages and disadvantages of using dat...
Python – Surrounding elements to K
12 Nov, 2020 Given Matrix, from each row, get surrounding elements of K, if present. Input : test_list = [[7, 6, 3, 2], [5, 6], [2, 1], [6, 1, 2]], K = 6 Output : [[7, 3], [5], [], [1]] Explanation : All elements surrounded by 6 are extracted. Input : test_list = [[7, 6, 3, 2], [5, 6], [2, 1], [6, 1, 2]], K = 1 Output ...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Nov, 2020" }, { "code": null, "e": 100, "s": 28, "text": "Given Matrix, from each row, get surrounding elements of K, if present." }, { "code": null, "e": 259, "s": 100, "text": "Input : test_list = [[7, 6, 3, 2],...
Debugging decorators in Python
21 Aug, 2020 Decorators in Python are really a very powerful feature. If you are a web developer and you have used the Django framework or even some other development frameworks you would have already come across decorators. For an overview decorators are wrapper functions that wrap an existing function or a method and...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Aug, 2020" }, { "code": null, "e": 264, "s": 52, "text": "Decorators in Python are really a very powerful feature. If you are a web developer and you have used the Django framework or even some other development frameworks you would...
MySQL - CAST DECIMAL to INT?
Cast DECIMAL to INT with the help of FLOOR() function. The syntax is as follows − SELECT FLOOR(yourColumnName) from yourTableName where condition; Let us first create a table. The following is the query to create a table. mysql> create table DecimalToIntDemo -> ( -> Amount DECIMAL(3,1) -> ); Query OK, 0 rows a...
[ { "code": null, "e": 1144, "s": 1062, "text": "Cast DECIMAL to INT with the help of FLOOR() function. The syntax is as follows −" }, { "code": null, "e": 1209, "s": 1144, "text": "SELECT FLOOR(yourColumnName) from yourTableName where condition;" }, { "code": null, "e"...
Annotator for Object Detection. A tool to generate annotated images for... | by Anuradha Wickramarachchi | Towards Data Science
In computer vision, object detection is an interesting field with numerous application. Like any other supervised machine learning task, we need annotation or labels for this very task as well. However, annotation of images can be a tedious time-consuming task for many of us (lazy ones?). I felt it quite strongly when ...
[ { "code": null, "e": 541, "s": 172, "text": "In computer vision, object detection is an interesting field with numerous application. Like any other supervised machine learning task, we need annotation or labels for this very task as well. However, annotation of images can be a tedious time-consuming...
Program to find the maximum number in rotated list in C++
Suppose there is an array, and that is sorted, consider that array is rotated at some pivot, that is unknown to us. So we have to find the maximum from that rotated array. So if the array is like[3,4,5,1,2], then the output will be 5. To solve this, we will follow these steps − low := 0 and high := last index of array,...
[ { "code": null, "e": 1297, "s": 1062, "text": "Suppose there is an array, and that is sorted, consider that array is rotated at some pivot, that is unknown to us. So we have to find the maximum from that rotated array. So if the array is like[3,4,5,1,2], then the output will be 5." }, { "cod...
Java Swing JOptionPane Html Content 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 tutorial, we learn about the ...
[ { "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, ...
DirectX - Buffers
For the GPU to access an array of vertices, they need to be placed in a special resource structure called a buffer, which is represented by the ID3D11Buffer interface. A buffer that stores vertices is called a vertex buffer. Direct3D buffers not only store data, but also describe how the data will be accessed and where...
[ { "code": null, "e": 2466, "s": 2298, "text": "For the GPU to access an array of vertices, they need to be placed in a special resource structure called a buffer, which is represented by the ID3D11Buffer interface." }, { "code": null, "e": 2663, "s": 2466, "text": "A buffer that ...
Anomaly Detection in IoT Enabled Smart Battery Management Systems | by Manoj Kukreja | Towards Data Science
We are living in the world of electric mobility. Globally, the adoption of electric cars and two-wheeler is steeply on the rise. Electric mobility devices rely on expensive rechargeable lithium-ion batteries for power. These batteries are integral for the fight against the bad effects of fossil fuels such as pollution ...
[ { "code": null, "e": 579, "s": 171, "text": "We are living in the world of electric mobility. Globally, the adoption of electric cars and two-wheeler is steeply on the rise. Electric mobility devices rely on expensive rechargeable lithium-ion batteries for power. These batteries are integral for the...
A Beginner’s Guide to Discrete Time Markov Chains | by Sachin Date | Towards Data Science
A Discrete Time Markov Chain can be used to describe the behavior of a system that jumps from one state to another state with a certain probability, and this probability of transition to the next state depends only on what state the system is in currently, i.e. it does not depend on which states the system was in prior...
[ { "code": null, "e": 515, "s": 172, "text": "A Discrete Time Markov Chain can be used to describe the behavior of a system that jumps from one state to another state with a certain probability, and this probability of transition to the next state depends only on what state the system is in currently...
JavaScript RegExp - [^a-zA-Z]
[^a-zA-Z] matches any string not containing any of the characters ranging from a through z and A through Z. Following example shows usage of RegExp expression. <html> <head> <title>JavaScript RegExp</title> </head> <body> <script type = "text/javascript"> var str = "1323pabc"; var p...
[ { "code": null, "e": 3189, "s": 3081, "text": "[^a-zA-Z] matches any string not containing any of the characters ranging from a through z and A through Z." }, { "code": null, "e": 3241, "s": 3189, "text": "Following example shows usage of RegExp expression." }, { "code": ...
C++ Program to Calculate Average of Numbers Using Arrays
Average of numbers is calculated by adding all the numbers and then dividing the sum by count of numbers available. An example of this is as follows. The numbers whose average is to be calculated are: 10, 5, 32, 4, 9 Sum of numbers = 60 Average of numbers = 60/5 = 12 A program that calculates average of numbers using a...
[ { "code": null, "e": 1178, "s": 1062, "text": "Average of numbers is calculated by adding all the numbers and then dividing the sum by count of numbers available." }, { "code": null, "e": 1212, "s": 1178, "text": "An example of this is as follows." }, { "code": null, ...
Terminal Control Functions in Python
To change the terminal controls in the Unix system, we can use the tty related methods in Python. Using the tty module, we can set two different modes of the terminal. The raw Mode and the cbreak mode. To use the tty module, we should import it using − import tty There are some modules of the tty module, these are − T...
[ { "code": null, "e": 1264, "s": 1062, "text": "To change the terminal controls in the Unix system, we can use the tty related methods in Python. Using the tty module, we can set two different modes of the terminal. The raw Mode and the cbreak mode." }, { "code": null, "e": 1315, "s":...
C++ Program to Find Number of Articulation points in a Graph
Articulation Points (or Cut Vertices) in a Graph is a point iff removing it (and edges through it) disconnects the graph. An articulation point for a disconnected undirected graph, is a vertex removing which increases number of connected components. Begin We use dfs here to find articulation point: In DFS, a vert...
[ { "code": null, "e": 1312, "s": 1062, "text": "Articulation Points (or Cut Vertices) in a Graph is a point iff removing it (and edges through it) disconnects the graph. An articulation point for a disconnected undirected graph, is a vertex removing which increases number of connected components." ...
Mockito - Verifying Behavior
Mockito can ensure whether a mock method is being called with reequired arguments or not. It is done using the verify() method. Take a look at the following code snippet. //test the add functionality Assert.assertEquals(calcService.add(10.0, 20.0),30.0,0); //verify call to calcService is made or not with same argument...
[ { "code": null, "e": 2151, "s": 1980, "text": "Mockito can ensure whether a mock method is being called with reequired arguments or not. It is done using the verify() method. Take a look at the following code snippet." }, { "code": null, "e": 2341, "s": 2151, "text": "//test the ...
Difference between find Element and find Elements in Selenium
There are differences between findElement and findElements method in Selenium webdriver. Both of them can be used to locate elements on a webpage. The findElement points to a single element, while the findElements method returns a list of matching elements. The return type of findElements is a list but the return type ...
[ { "code": null, "e": 1320, "s": 1062, "text": "There are differences between findElement and findElements method in Selenium webdriver. Both of them can be used to locate elements on a webpage. The findElement points to a single element, while the findElements method returns a list of matching eleme...
Return Array from Functions in C++
C++ does not allow to return an entire array as an argument to a function. However, you can return a pointer to an array by specifying the array's name without an index. If you want to return a single-dimension array from a function, you would have to declare a function returning a pointer as in the following example −...
[ { "code": null, "e": 2488, "s": 2318, "text": "C++ does not allow to return an entire array as an argument to a function. However, you can return a pointer to an array by specifying the array's name without an index." }, { "code": null, "e": 2639, "s": 2488, "text": "If you want ...
Repeating only even numbers inside an array in JavaScript
We are required to write a JavaScript function that should repeat the even number inside the same array. For example, given the following array − const arr = [1, 2, 5, 6, 8]; We should get the output − const output = [1, 2, 2, 5, 6, 6, 8, 8]; Therefore, let’s write the code for this function − The code for this will be...
[ { "code": null, "e": 1167, "s": 1062, "text": "We are required to write a JavaScript function that should repeat the even number inside the\nsame array." }, { "code": null, "e": 1208, "s": 1167, "text": "For example, given the following array −" }, { "code": null, "e"...
HTML <area> coords Attribute
The cords attribute of the <area> element is used to set the coordinates of area in image map. Use the attribute with shape attribute and set the size & shape of an area. Following is the syntax <area coords="value"> Under the value above, you can set the following coordinates with different parameters − Let us now see...
[ { "code": null, "e": 1233, "s": 1062, "text": "The cords attribute of the <area> element is used to set the coordinates of area in image map. Use the attribute with shape attribute and set the size & shape of an area." }, { "code": null, "e": 1257, "s": 1233, "text": "Following i...
Balanced expression with replacement - GeeksforGeeks
10 Jun, 2021 Given a string that contains only the following => ‘{‘, ‘}’, ‘(‘, ‘)’, ‘[’, ‘]’. At some places there is ‘X’ in place of any bracket. Determine whether by replacing all ‘X’s with appropriate bracket, is it possible to make a valid bracket sequence. Prerequisite: Balanced Parenthesis Expression Examples: I...
[ { "code": null, "e": 24686, "s": 24658, "text": "\n10 Jun, 2021" }, { "code": null, "e": 24935, "s": 24686, "text": "Given a string that contains only the following => ‘{‘, ‘}’, ‘(‘, ‘)’, ‘[’, ‘]’. At some places there is ‘X’ in place of any bracket. Determine whether by replacin...
Using Data Science to Predict Negative Customer Reviews | by Chuck Utterback | Towards Data Science
If you could confidently predict that a customer was going to leave a negative review, what would your business do differently? Proactively intervene to improve customer experience and hopefully divert them from leaving bad public review scores? Learn from important features in your predictive model to fix the root cau...
[ { "code": null, "e": 300, "s": 172, "text": "If you could confidently predict that a customer was going to leave a negative review, what would your business do differently?" }, { "code": null, "e": 418, "s": 300, "text": "Proactively intervene to improve customer experience and h...