title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Can we define a try block with multiple catch blocks in Java?
Yes, we can define one try block with multiple catch blocks in Java. Every try should and must be associated with at least one catch block. Whenever an exception object is identified in a try block and if there are multiple catch blocks then the priority for the catch block would be given based on the order in which ca...
[ { "code": null, "e": 1131, "s": 1062, "text": "Yes, we can define one try block with multiple catch blocks in Java." }, { "code": null, "e": 1202, "s": 1131, "text": "Every try should and must be associated with at least one catch block." }, { "code": null, "e": 1416,...
Distillation of Knowledge in Neural Networks | by Mukul Malik | Towards Data Science
Distillation of Knowledge (in machine learning) is an architecture agnostic approach for generalization of knowledge (consolidating the knowledge) within a neural network to train another neural network. Currently, especially in NLP, very large scale models are being trained. A large portion of those can’t even fit on ...
[ { "code": null, "e": 376, "s": 172, "text": "Distillation of Knowledge (in machine learning) is an architecture agnostic approach for generalization of knowledge (consolidating the knowledge) within a neural network to train another neural network." }, { "code": null, "e": 654, "s": ...
Get psycopg2 count(*) number of results - GeeksforGeeks
23 Aug, 2021 In this article, we are going to see how to get psycopg2 count(*) number of results. psycopg2 count(*) returns the number of rows from a database table holding some specific conditions. If no condition is given then it returns the total number of tuples present in the relation. Syntax: SELECT COUNT(*) ...
[ { "code": null, "e": 25757, "s": 25729, "text": "\n23 Aug, 2021" }, { "code": null, "e": 25843, "s": 25757, "text": "In this article, we are going to see how to get psycopg2 count(*) number of results. " }, { "code": null, "e": 26038, "s": 25843, "text": "psyc...
Python | Simple GUI calculator using Tkinter - GeeksforGeeks
30 Jun, 2021 Prerequisite : Tkinter Introduction, lambda function Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with Tkinter output...
[ { "code": null, "e": 25581, "s": 25553, "text": "\n30 Jun, 2021" }, { "code": null, "e": 25635, "s": 25581, "text": "Prerequisite : Tkinter Introduction, lambda function " }, { "code": null, "e": 25993, "s": 25635, "text": "Python offers multiple options for d...
Execution from RAM in Embedded systems - GeeksforGeeks
11 Aug, 2021 Prerequisite : Random Access Memory (RAM), Introduction of Embedded Systems Introduction :Unlike application programs in computers, software in embedded systems do not execute from RAM. In vast majority of modern embedded system architectures, programs (instructions) are stored in microcontroller’s flash m...
[ { "code": null, "e": 26049, "s": 26021, "text": "\n11 Aug, 2021" }, { "code": null, "e": 26125, "s": 26049, "text": "Prerequisite : Random Access Memory (RAM), Introduction of Embedded Systems" }, { "code": null, "e": 27431, "s": 26125, "text": "Introduction :...
sciPy stats.histogram() function | Python - GeeksforGeeks
13 Feb, 2019 scipy.stats.histogram(a, numbins, defaultreallimits, weights, printextras) works to segregate the range into several bins and then returns the number of instances in each bin. This function is used to build the histogram. Parameters :arr : [array_like] input array.numbins : [int] number of bins to use for ...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n13 Feb, 2019" }, { "code": null, "e": 25759, "s": 25537, "text": "scipy.stats.histogram(a, numbins, defaultreallimits, weights, printextras) works to segregate the range into several bins and then returns the number of instances ...
LCS (Longest Common Subsequence) of three strings - GeeksforGeeks
17 Jun, 2021 Given 3 strings of all having length < 100,the task is to find the longest common sub-sequence in all three given sequences.Examples: Input : str1 = "geeks" str2 = "geeksfor" str3 = "geeksforgeeks" Output : 5 Longest common subsequence is "geeks" i.e., length = 5 Input : str1 = "abcd...
[ { "code": null, "e": 25943, "s": 25915, "text": "\n17 Jun, 2021" }, { "code": null, "e": 26079, "s": 25943, "text": "Given 3 strings of all having length < 100,the task is to find the longest common sub-sequence in all three given sequences.Examples: " }, { "code": null,...
Count the number of special permutations - GeeksforGeeks
11 May, 2022 Given two positive integers n and k, the task is to count the number of special permutations. A special permutation P is defined as a permutation of first n natural numbers in which there exists at least (n – k) indices such that Pi = i. Prerequisite: Derangements Examples: Input: n = 4, k = 2 Output: 7 {...
[ { "code": null, "e": 26103, "s": 26075, "text": "\n11 May, 2022" }, { "code": null, "e": 26368, "s": 26103, "text": "Given two positive integers n and k, the task is to count the number of special permutations. A special permutation P is defined as a permutation of first n natura...
Count all prime numbers in a given range whose sum of digits is also prime - GeeksforGeeks
24 Feb, 2022 Given two integers L and R, the task is to find the count of total numbers of prime numbers in the range [L, R] whose sum of the digits is also a prime number. Examples: Input: L = 1, R = 10 Output: 4 Explanation: Prime numbers in the range L = 1 to R = 10 are {2, 3, 5, 7}. Their sum of digits is {2, 3, 5,...
[ { "code": null, "e": 26785, "s": 26757, "text": "\n24 Feb, 2022" }, { "code": null, "e": 26945, "s": 26785, "text": "Given two integers L and R, the task is to find the count of total numbers of prime numbers in the range [L, R] whose sum of the digits is also a prime number." ...
Performance of for vs foreach in PHP - GeeksforGeeks
15 Jul, 2021 for Loop: The for loop is an iterative loop which repeats a certain set of code until a specified condition is reached. It is systematically used to execute a set of code for specified number of times, here the number of times denotes the iterator variable. Syntax: for( initialization; condition; increm...
[ { "code": null, "e": 26217, "s": 26189, "text": "\n15 Jul, 2021" }, { "code": null, "e": 26476, "s": 26217, "text": "for Loop: The for loop is an iterative loop which repeats a certain set of code until a specified condition is reached. It is systematically used to execute a set ...
Program to determine focal length of a spherical mirror - GeeksforGeeks
12 Apr, 2021 Write a program to determine the focal length of a spherical mirror.Focal length is the distance between the center of the mirror to the principal foci. In order to determine the focal length of a spherical mirror we should know the radius of curvature of that mirror. The distance from the vertex to the ce...
[ { "code": null, "e": 25961, "s": 25933, "text": "\n12 Apr, 2021" }, { "code": null, "e": 26378, "s": 25961, "text": "Write a program to determine the focal length of a spherical mirror.Focal length is the distance between the center of the mirror to the principal foci. In order t...
Python | super() function with multilevel inheritance - GeeksforGeeks
01 May, 2019 super() function in Python:Python super function provides us the facility to refer to the parent class explicitly. It is basically useful where we have to call superclass functions. It returns the proxy object that allows us to refer parent class by ‘super’. To understand Python super function we must know...
[ { "code": null, "e": 25426, "s": 25398, "text": "\n01 May, 2019" }, { "code": null, "e": 25685, "s": 25426, "text": "super() function in Python:Python super function provides us the facility to refer to the parent class explicitly. It is basically useful where we have to call sup...
KeyFactory generatePublic() method in Java with Examples - GeeksforGeeks
04 Dec, 2018 The generatePublic() method of java.security.KeyFactory class is used to generate a public key object from the provided key specification (key material). Syntax: public final PublicKey generatePublic(KeySpec keySpec) throws InvalidKeySpecException Parameters: This method take...
[ { "code": null, "e": 25861, "s": 25833, "text": "\n04 Dec, 2018" }, { "code": null, "e": 26015, "s": 25861, "text": "The generatePublic() method of java.security.KeyFactory class is used to generate a public key object from the provided key specification (key material)." }, {...
ChronoLocalDate get() method in Java with Examples - GeeksforGeeks
29 Apr, 2019 The get() method of ChronoLocalDate interface in Java method gets the value of the specified field from this Date as an int. Syntax: public int get(TemporalField field) Parameter: This method accepts a parameter field which is the field to get and not necessary null. Return Value: It returns the value for...
[ { "code": null, "e": 26183, "s": 26155, "text": "\n29 Apr, 2019" }, { "code": null, "e": 26308, "s": 26183, "text": "The get() method of ChronoLocalDate interface in Java method gets the value of the specified field from this Date as an int." }, { "code": null, "e": 2...
How to create a Pie Chart using HTML & CSS ? - GeeksforGeeks
11 Jun, 2020 Pie Chart is a type of graph that displays data in a circular shape and is generally used to show percentage or proportional data. The percentage represented in the graph by each category is provided near the corresponding slice of one portion of pie chart. These charts are very good for displaying data fo...
[ { "code": null, "e": 25609, "s": 25581, "text": "\n11 Jun, 2020" }, { "code": null, "e": 25942, "s": 25609, "text": "Pie Chart is a type of graph that displays data in a circular shape and is generally used to show percentage or proportional data. The percentage represented in th...
Bootstrap 4 | Grid System - GeeksforGeeks
28 Apr, 2022 Bootstrap Grid System allows up to 12 columns across the page. You can use each of them individually or merge them together for wider columns. All combinations of values summing up to 12 can be used. Grid Classes: Bootstrap grid system contains five classes which are listed below: .col- It is used for extr...
[ { "code": null, "e": 29685, "s": 29657, "text": "\n28 Apr, 2022" }, { "code": null, "e": 29885, "s": 29685, "text": "Bootstrap Grid System allows up to 12 columns across the page. You can use each of them individually or merge them together for wider columns. All combinations of ...
Retrofit with Kotlin Coroutine in Android - GeeksforGeeks
10 Nov, 2021 The Kotlin team defines coroutines as “lightweight threads”. They are sort of tasks that the actual threads can execute. Coroutines were added to Kotlin in version 1.3 and are based on established concepts from other languages. Kotlin coroutines introduce a new style of concurrency that can be used on Andr...
[ { "code": null, "e": 26381, "s": 26353, "text": "\n10 Nov, 2021" }, { "code": null, "e": 27012, "s": 26381, "text": "The Kotlin team defines coroutines as “lightweight threads”. They are sort of tasks that the actual threads can execute. Coroutines were added to Kotlin in version...
How to check if a string is valid MongoDB ObjectId in Node.js ? - GeeksforGeeks
18 Apr, 2022 MongoDB ObjectId: MongoDB creates a unique 12 bytes ID for every object using the timestamp of respective Object creation.This ObjectId can be used to uniquely target a specific object in the database. Structure: 4-byte timestamp value 5-byte random value 3-byte incrementing counter, initialized to a rando...
[ { "code": null, "e": 26293, "s": 26265, "text": "\n18 Apr, 2022" }, { "code": null, "e": 26495, "s": 26293, "text": "MongoDB ObjectId: MongoDB creates a unique 12 bytes ID for every object using the timestamp of respective Object creation.This ObjectId can be used to uniquely tar...
GraphQL, Grafana and Dash. Introduction and Comparison | by Uditha Maduranga | Towards Data Science
If you’re a person who is interested in Data Science, Data Manipulation or Data Visualization this article is the right one for you. I’m sure you have heard of the names that I have used for my topic above. In this article I would be first going through each of these in some detail and later there will be the compariso...
[ { "code": null, "e": 495, "s": 172, "text": "If you’re a person who is interested in Data Science, Data Manipulation or Data Visualization this article is the right one for you. I’m sure you have heard of the names that I have used for my topic above. In this article I would be first going through e...
Implementing the XOR Gate using Backpropagation in Neural Networks | by Siddhartha Dutta | Towards Data Science
Implementing logic gates using neural networks help understand the mathematical computation by which a neural network processes its inputs to arrive at a certain output. This neural network will deal with the XOR logic problem. An XOR (exclusive OR gate) is a digital logic gate that gives a true output only when both i...
[ { "code": null, "e": 574, "s": 172, "text": "Implementing logic gates using neural networks help understand the mathematical computation by which a neural network processes its inputs to arrive at a certain output. This neural network will deal with the XOR logic problem. An XOR (exclusive OR gate) ...
Find size of array in C/C++ without using sizeof
In this program, we find out Find size of array in C/C++ without using sizeof. Begin Initialize the elements of the array. &a => This is the pointer to array which points at the same memory address as a. &a + 1 => It points at the address after the end of the array. *(a+1) => Dereferencing to *(&a + 1) give...
[ { "code": null, "e": 1141, "s": 1062, "text": "In this program, we find out Find size of array in C/C++ without using sizeof." }, { "code": null, "e": 1544, "s": 1141, "text": "Begin\n Initialize the elements of the array.\n &a => This is the pointer to array which points at ...
Sentiment Analysis with Python (Part 1) | by Aaron Kub | Towards Data Science
Sentiment Analysis is a common NLP task that Data Scientists need to perform. This is a straightforward guide to creating a barebones movie review classifier in Python. Future parts of this series will focus on improving the classifier. All of the code used in this series along with supplemental materials can be found ...
[ { "code": null, "e": 409, "s": 172, "text": "Sentiment Analysis is a common NLP task that Data Scientists need to perform. This is a straightforward guide to creating a barebones movie review classifier in Python. Future parts of this series will focus on improving the classifier." }, { "cod...
To check divisibility of any large number by 9 in java
If the sum of the digits of a number is divisible by 9, then the number is divisible by 9. Some examples of numbers divisible by 9 are as follows. The number 51984 is divisible by 9 because the sum of its digits (5+ 1 + 9 + 8 + 4 = 27) is divisible by 9. The number 91403 is not divisible by 9 because the sum of its di...
[ { "code": null, "e": 1153, "s": 1062, "text": "If the sum of the digits of a number is divisible by 9, then the number is divisible by 9." }, { "code": null, "e": 1209, "s": 1153, "text": "Some examples of numbers divisible by 9 are as follows." }, { "code": null, "e"...
Encrypt/Decrypt Files in Linux using Ccrypt - GeeksforGeeks
15 May, 2019 Ccrypt is a command line tool for encryption and decryption of data. Ccrypt is based on the Rijndael cipher, the same cipher used in the AES standard. On the other hand, in the AES standard, a 128-bit block size is used, whereas ccrypt uses a 256-bit block size. Ccrypt commonly uses the .cpt file extension...
[ { "code": null, "e": 24598, "s": 24570, "text": "\n15 May, 2019" }, { "code": null, "e": 24927, "s": 24598, "text": "Ccrypt is a command line tool for encryption and decryption of data. Ccrypt is based on the Rijndael cipher, the same cipher used in the AES standard. On the other...
A Simple CNN: Multi Image Classifier | by Iftekher Mamun | Towards Data Science
Computer vision and neural networks are the hot new IT of machine learning techniques. With advances of neural networks and an ability to read images as pixel density numbers, numerous companies are relying on this technique for more data. For example, speed camera uses computer vision to take pictures of license plate...
[ { "code": null, "e": 777, "s": 171, "text": "Computer vision and neural networks are the hot new IT of machine learning techniques. With advances of neural networks and an ability to read images as pixel density numbers, numerous companies are relying on this technique for more data. For example, sp...
Flutter - Implementing Pull to Refresh - GeeksforGeeks
01 Jun, 2021 The pull-to-refresh or (swipe-to-refresh) feature enables a user to pull down to fetch more data. The pull-to-refresh feature can be seen in many modern apps. The pull-to-refresh feature can be implemented in those components that are scrollable. In this article, we are going to implement this feature in F...
[ { "code": null, "e": 23932, "s": 23904, "text": "\n01 Jun, 2021" }, { "code": null, "e": 24179, "s": 23932, "text": "The pull-to-refresh or (swipe-to-refresh) feature enables a user to pull down to fetch more data. The pull-to-refresh feature can be seen in many modern apps. The ...
Starting with SQL in Python. This is an introduction to getting SQL... | by Jason Lee | Towards Data Science
A quick and easy way to be able to run SQL queries with Python is using SQLite. SQLite is a library that utilizes an SQL database engine. It performs relatively fast and has been proven to be highly reliable. SQLite is the most commonly used database engine in the test environment. Here are simple steps to getting star...
[ { "code": null, "e": 455, "s": 172, "text": "A quick and easy way to be able to run SQL queries with Python is using SQLite. SQLite is a library that utilizes an SQL database engine. It performs relatively fast and has been proven to be highly reliable. SQLite is the most commonly used database engi...
A Data Scientist’s Guide to the Side Hustle 💰 | by Garrett Eichhorn | 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. Ah, the side hustle....
[ { "code": null, "e": 347, "s": 47, "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 professiona...
Pushdown Automata Acceptance by Final State
30 May, 2022 We have discussed Pushdown Automata (PDA) and its acceptance by empty stack article. Now, in this article, we will discuss how PDA can accept a CFL based on the final state. Given a PDA P as: P = (Q, Σ, Γ, δ, q0, Z, F) The language accepted by P is the set of all strings consuming which PDA can move from i...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 May, 2022" }, { "code": null, "e": 244, "s": 52, "text": "We have discussed Pushdown Automata (PDA) and its acceptance by empty stack article. Now, in this article, we will discuss how PDA can accept a CFL based on the final state. ...
p5.js | loadFont() Function
16 Oct, 2021 The loadFont() function is used to load a font from file or an URL, and return it as a PFont Object. The font loaded is an opentype font file with the formats .otf or .ttf. This method is asynchronous in nature and therefore it may not finish before the font can be used. It is hence advised to load the fon...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Oct, 2021" }, { "code": null, "e": 529, "s": 28, "text": "The loadFont() function is used to load a font from file or an URL, and return it as a PFont Object. The font loaded is an opentype font file with the formats .otf or .ttf. Th...
Intersection process of two DFAs
10 Aug, 2021 Prerequisite – Design a Finite automata Let’s understand the intersection of two DFA with an example. Designing a DFA for the set of string over {0, 1} such that it ends with 01 and has even number 0f 1’s. There two desired language will be formed: L1= {01, 001, 101, 0101, 1001, 1101, ....} L2= {11, 01...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Aug, 2021" }, { "code": null, "e": 69, "s": 28, "text": "Prerequisite – Design a Finite automata " }, { "code": null, "e": 280, "s": 69, "text": "Let’s understand the intersection of two DFA with an example. Desig...
JavaFX | WebView Class
04 Sep, 2018 WebView class is a part of JavaFX. WebView can create and manage a WebEngine and display its content. The associated WebEngine is created automatically at construction time and cannot be changed. WebView manages keyboard and mouse events and automatically adds a scrollbar to the WebView. Constructor of the...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Sep, 2018" }, { "code": null, "e": 317, "s": 28, "text": "WebView class is a part of JavaFX. WebView can create and manage a WebEngine and display its content. The associated WebEngine is created automatically at construction time an...
Responsive UI Design in Android
29 Dec, 2020 Nowadays every Android UI designer is very serious about his UI design. The path of every project goes through UI design. UI design is the face of every project and every website, app & desktop application. UI is the wall between the User & Back-end where users can interact with the server through the UI d...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Dec, 2020" }, { "code": null, "e": 743, "s": 52, "text": "Nowadays every Android UI designer is very serious about his UI design. The path of every project goes through UI design. UI design is the face of every project and every web...
How to add a custom styled Toast in Android using Kotlin
06 Sep, 2021 A Toast is a short alert message shown on the Android screen for a short interval of time. Android Toast is a short popup notification that is used to display information when we perform any operation in the app. In this article, let’s learn how to create a custom toast in Android using Kotlin. Note: To cr...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 Sep, 2021" }, { "code": null, "e": 350, "s": 54, "text": "A Toast is a short alert message shown on the Android screen for a short interval of time. Android Toast is a short popup notification that is used to display information whe...
Recursive program to find all Indices of a Number
30 Nov, 2021 Given an array arr of size N and an integer X. The task is to find all the indices of the integer X in the arrayExamples: Input: arr = {1, 2, 3, 2, 2, 5}, X = 2 Output: 1 3 4 Element 2 is present at indices 1, 3, 4 (0 based indexing)Input: arr[] = {7, 7, 7}, X = 7 Output: 0 1 2 The iterative approach...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 Nov, 2021" }, { "code": null, "e": 178, "s": 54, "text": "Given an array arr of size N and an integer X. The task is to find all the indices of the integer X in the arrayExamples: " }, { "code": null, "e": 337, "s":...
How to Find Correlation Coefficient in Excel?
29 Jun, 2021 Correlation basically means a mutual connection between two or more sets of data. In statistics, bivariate data or two random variables are used to find the correlation between them. The correlation coefficient is generally the measurement of the correlation between the bivariate data which basically denot...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Jun, 2021" }, { "code": null, "e": 401, "s": 28, "text": "Correlation basically means a mutual connection between two or more sets of data. In statistics, bivariate data or two random variables are used to find the correlation betwee...
Install Pytorch on Linux
09 Jun, 2022 In this article, we are going to see how you can install PyTorch in the Linux system. We are using Ubuntu 20 LTS you can use any other one. To successfully install PyTorch in your Linux system, follow the below procedure: First, check if you are using python’s latest version or not. Because PyGame requires...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Jun, 2022" }, { "code": null, "e": 250, "s": 28, "text": "In this article, we are going to see how you can install PyTorch in the Linux system. We are using Ubuntu 20 LTS you can use any other one. To successfully install PyTorch in ...
p5.js | strokeWeight() function
16 Apr, 2019 The strokeWeight() function in p5.js is used to set the width of the stroke used for lines, points, and the border around shapes. The stroke weight are set by using pixel. Syntax: strokeWidth(weight) Parameters: This function accepts single parameter weight which stores the weight (in pixels) of the stroke...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Apr, 2019" }, { "code": null, "e": 200, "s": 28, "text": "The strokeWeight() function in p5.js is used to set the width of the stroke used for lines, points, and the border around shapes. The stroke weight are set by using pixel." ...
Find value of k-th bit in binary representation
16 Jun, 2022 Given a number n and k (1 <= k <= 32), find the value of k-th bit in the binary representation of n. Bits are numbered from right (Least Significant Bit) to left (Most Significant Bit). Examples : Input : n = 13, k = 2 Output : 0 Explanation: Binary representation of 13 is 1101. Second bit from right i...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Jun, 2022" }, { "code": null, "e": 238, "s": 52, "text": "Given a number n and k (1 <= k <= 32), find the value of k-th bit in the binary representation of n. Bits are numbered from right (Least Significant Bit) to left (Most Signif...
PHP - Functions
PHP functions are similar to other programming languages. A function is a piece of code which takes one more input in the form of parameter and does some processing and returns a value. You already have seen many functions like fopen() and fread() etc. They are built-in functions but PHP gives you option to create your...
[ { "code": null, "e": 3077, "s": 2891, "text": "PHP functions are similar to other programming languages. A function is a piece of code which takes one more input in the form of parameter and does some processing and returns a value." }, { "code": null, "e": 3235, "s": 3077, "text...
Minimum swaps required to make a binary string alternating
23 Sep, 2021 You are given a binary string of even length and equal number of 0’s and 1’s. What is the minimum number of swaps to make the string alternating. A binary string is alternating if no two consecutive elements are equal. Examples: Input : 000111 Output : 1 Explanation : Swap index 2 and index 5 to get 01010...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Sep, 2021" }, { "code": null, "e": 273, "s": 54, "text": "You are given a binary string of even length and equal number of 0’s and 1’s. What is the minimum number of swaps to make the string alternating. A binary string is alternati...
Inherited Annotations in Java
24 Sep, 2021 Annotations in Java help associate metadata to the program elements such as classes, instance variables, methods, etc. Annotations can also be used to attach metadata to other annotations. These types of annotations are called meta-annotation. Java, by default, does not allow the custom annotations to be i...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Sep, 2021" }, { "code": null, "e": 541, "s": 28, "text": "Annotations in Java help associate metadata to the program elements such as classes, instance variables, methods, etc. Annotations can also be used to attach metadata to other...
Succinct Encoding of Binary Tree
28 Jun, 2022 A succinct encoding of Binary Tree takes close to minimum possible space. The number of structurally different binary trees on n nodes is n’th Catalan number. For large n, this is about 4n; thus we need at least about log2 4 n = 2n bits to encode it. A succinct binary tree therefore would occupy 2n+o(n) bi...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 Jun, 2022" }, { "code": null, "e": 363, "s": 52, "text": "A succinct encoding of Binary Tree takes close to minimum possible space. The number of structurally different binary trees on n nodes is n’th Catalan number. For large n, th...
Wilcoxon Signed Rank Test in R Programming
23 Dec, 2021 The Wilcoxon signed-rank test is a non-parametric statistical hypothesis test used to compare two related samples, matched samples, or repeated measurements on a single sample to estimate whether their population means ranks differ e.g it is a paired difference test. It can be applied as an alternative to ...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Dec, 2021" }, { "code": null, "e": 728, "s": 28, "text": "The Wilcoxon signed-rank test is a non-parametric statistical hypothesis test used to compare two related samples, matched samples, or repeated measurements on a single sample...
How to combine 2 arrays into 1 object in JavaScript
Let’s say, we have two arrays of equal lengths and are required to write a function that maps the two arrays into an object. The corresponding elements of the first array becomes the corresponding keys of the object and the elements of the second array become the value. We will reduce the first array, at the same time ...
[ { "code": null, "e": 1458, "s": 1187, "text": "Let’s say, we have two arrays of equal lengths and are required to write a function that maps the\ntwo arrays into an object. The corresponding elements of the first array becomes the\ncorresponding keys of the object and the elements of the second arra...
Intersection of Two Objects in R Programming – intersect() Function
15 Jun, 2020 intersect() function in R Language is used to find the intersection of two Objects. This function takes two objects like Vectors, dataframes, etc. as arguments and results in a third object with the common data of both the objects. Syntax: intersect(x, y) Parameters:x and y: Objects with sequence of items ...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Jun, 2020" }, { "code": null, "e": 260, "s": 28, "text": "intersect() function in R Language is used to find the intersection of two Objects. This function takes two objects like Vectors, dataframes, etc. as arguments and results in ...
time.Time.Sub() Function in Golang With Examples
19 Apr, 2020 In Go language, time packages supplies functionality for determining as well as viewing time. The Time.Sub() function in Go language is used to yield the duration obtained by performing the operation t-u. And if the output here surpasses the maximum or the minimum value that can be stored in a Duration “d”...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Apr, 2020" }, { "code": null, "e": 527, "s": 28, "text": "In Go language, time packages supplies functionality for determining as well as viewing time. The Time.Sub() function in Go language is used to yield the duration obtained by ...
React Forms
Just like in HTML, React uses forms to allow users to interact with the web page. You add a form with React like any other element: Add a form that allows users to enter their name: function MyForm() { return ( <form> <label>Enter your name: <input type="text" /> </label> </form> ) } con...
[ { "code": null, "e": 82, "s": 0, "text": "Just like in HTML, React uses forms to allow users to interact with the web page." }, { "code": null, "e": 132, "s": 82, "text": "You add a form with React like any other element:" }, { "code": null, "e": 182, "s": 132, ...
Active and Inactive cells after k Days?
Here we will see one interesting problem. Suppose one binary array is given of size n. Here n > 3. A true value or 1 value indicates that the active state, and 0 or false indicates inactive. Another number k is also given. We have to find active or inactive cells after k days. After every day state of ith cell will be ...
[ { "code": null, "e": 1590, "s": 1062, "text": "Here we will see one interesting problem. Suppose one binary array is given of size n. Here n > 3. A true value or 1 value indicates that the active state, and 0 or false indicates inactive. Another number k is also given. We have to find active or inac...
Linux Admin - Install Anonymous FTP
Before delving into installing FTP on CentOS, we need to learn a little about its use and security. FTP is a really efficient and well-refined protocol for transferring files between the computer systems. FTP has been used and refined for a few decades now. For transferring files efficiently over a network with latency...
[ { "code": null, "e": 2655, "s": 2257, "text": "Before delving into installing FTP on CentOS, we need to learn a little about its use and security. FTP is a really efficient and well-refined protocol for transferring files between the computer systems. FTP has been used and refined for a few decades ...
How to install matplotlib in Python?
Matplotlib is a Python library that helps to plot graphs. It is used in data visualization and graphical plotting. To use matplotlib, we need to install it. Type the following commands in the command prompt to check is python and pip is installed on your system. python --version If python is successfully installed, the...
[ { "code": null, "e": 1177, "s": 1062, "text": "Matplotlib is a Python library that helps to plot graphs. It is used in data visualization and graphical plotting." }, { "code": null, "e": 1219, "s": 1177, "text": "To use matplotlib, we need to install it." }, { "code": nul...
Python Program to Print the Incremented Date if valid - GeeksforGeeks
06 Oct, 2021 In this article, we will write a python program to input a date and check whether it is a valid date or not. If it is valid, output the incremented date. Otherwise, print “Invalid date”. Examples: Input : 1/2/2000 Output: 2/2/2000 Input : 29/2/2002 Output: Invalid date Input : 31/12/2015 Output: 1/1/2016...
[ { "code": null, "e": 23926, "s": 23898, "text": "\n06 Oct, 2021" }, { "code": null, "e": 24113, "s": 23926, "text": "In this article, we will write a python program to input a date and check whether it is a valid date or not. If it is valid, output the incremented date. Otherwise...
Tryit Editor v3.7
CSS User Interface Tryit: Allow resize height only
[ { "code": null, "e": 28, "s": 9, "text": "CSS User Interface" } ]
Think twice before you use Principal Component Analysis in supervised learning tasks | by Wanshun Wong | Towards Data Science
Principal Component Analysis (PCA) is one of the most popular machine learning technique. It reduces the dimension of a given data set, making the data set more approachable and computationally cheaper to handle, while preserving most patterns and trends. This makes PCA an excellent tool for exploratory data analysis. ...
[ { "code": null, "e": 590, "s": 171, "text": "Principal Component Analysis (PCA) is one of the most popular machine learning technique. It reduces the dimension of a given data set, making the data set more approachable and computationally cheaper to handle, while preserving most patterns and trends....
ASP.NET MVC - Scaffolding
ASP.NET Scaffolding is a code generation framework for ASP.NET Web applications. Visual Studio 2013 includes pre-installed code generators for MVC and Web API projects. You add scaffolding to your project when you want to quickly add code that interacts with data models. Using scaffolding can reduce the amount of time ...
[ { "code": null, "e": 2776, "s": 2403, "text": "ASP.NET Scaffolding is a code generation framework for ASP.NET Web applications. Visual Studio 2013 includes pre-installed code generators for MVC and Web API projects. You add scaffolding to your project when you want to quickly add code that interacts...
Level order traversal in spiral form
04 Jul, 2022 Write a function to print spiral order traversal of a tree. For below tree, function should print 1, 2, 3, 4, 5, 6, 7. Method 1 (Recursive) This problem can be seen as an extension of the level order traversal post. To print the nodes in spiral order, nodes at different levels should be printed in alte...
[ { "code": null, "e": 54, "s": 26, "text": "\n04 Jul, 2022" }, { "code": null, "e": 175, "s": 54, "text": "Write a function to print spiral order traversal of a tree. For below tree, function should print 1, 2, 3, 4, 5, 6, 7. " }, { "code": null, "e": 658, "s": 17...
Expandable TextView in Android
06 Apr, 2021 ExpandableTextView is an Android library which allows us to easily create a TextView which can expand/collapse when user clicks on it .we can use this feature in many apps such as movie review app or storytelling app and in many other apps. A sample GIF is given below to get an idea about what we are going...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Apr, 2021" }, { "code": null, "e": 434, "s": 28, "text": "ExpandableTextView is an Android library which allows us to easily create a TextView which can expand/collapse when user clicks on it .we can use this feature in many apps suc...
Python | Type casting whole List and Matrix
30 Dec, 2020 Sometimes, while working with Python List or Matrix, we usually have a problem in which we require to get a generalized function which could perform the type casting of whole container at once. There is always a need of a mechanism code which can transform entirely the allowed change of data type for all e...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Dec, 2020" }, { "code": null, "e": 414, "s": 28, "text": "Sometimes, while working with Python List or Matrix, we usually have a problem in which we require to get a generalized function which could perform the type casting of whole ...
Print a character n times without using loop, recursion or goto in C++
09 Oct, 2019 Given a character c and a number n, print the character c, n times. We are not allowed to use loop, recursion and goto. Examples : Input : n = 10, c = 'a' Output : aaaaaaaaaa Input : n = 6, c = '\n' Output : Input : n = 6, character = '@' output : @@@@@@ In C++, there is a way to initialize a string w...
[ { "code": null, "e": 53, "s": 25, "text": "\n09 Oct, 2019" }, { "code": null, "e": 173, "s": 53, "text": "Given a character c and a number n, print the character c, n times. We are not allowed to use loop, recursion and goto." }, { "code": null, "e": 184, "s": 173...
TypeScript | String substr() Method
18 Jun, 2020 The split() is an inbuilt function in TypeScript which is used to returns the characters in a string beginning at the specified location through the specified number of characters. Syntax: string.substr(start[, length]) Parameter: This method accepts two parameter as mentioned above and described below.: ...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Jun, 2020" }, { "code": null, "e": 209, "s": 28, "text": "The split() is an inbuilt function in TypeScript which is used to returns the characters in a string beginning at the specified location through the specified number of charac...
Edit Distance
There are two strings given. The first string is the source string and the second string is the target string. In this program, we have to find how many possible edits are needed to convert first string to the second string. The edit of strings can be either Insert some elements, delete something from the first string...
[ { "code": null, "e": 1413, "s": 1187, "text": "There are two strings given. The first string is the source string and the second string is the target string. In this program, we have to find how many possible edits are needed to convert first string to the second string. " }, { "code": null,...
T-SQL - DELETE Statement
The SQL Server DELETE Query is used to delete the existing records from a table. You have to use WHERE clause with DELETE query to delete selected rows, otherwise all the records would be deleted. Following is the basic syntax of DELETE query with WHERE clause − DELETE FROM table_name WHERE [condition]; You can comb...
[ { "code": null, "e": 2275, "s": 2194, "text": "The SQL Server DELETE Query is used to delete the existing records from a table." }, { "code": null, "e": 2391, "s": 2275, "text": "You have to use WHERE clause with DELETE query to delete selected rows, otherwise all the records wou...
Create a new empty file in Java
A new empty file with the required abstract path name can be created using the method java.io.File.createNewFile(). This method requires no parameters and it returns true if the file is newly created and it did not exist previously. If the file existed previously, it returns false. A program that demonstrates this is g...
[ { "code": null, "e": 1470, "s": 1187, "text": "A new empty file with the required abstract path name can be created using the method java.io.File.createNewFile(). This method requires no parameters and it returns true if the file is newly created and it did not exist previously. If the file existed ...
Load testing using LOCUST
19 Feb, 2020 Locust is an open source load testing tool. Load testing is a type of software testing that is conducted to check the tolerance/behavior of the system under a specific expected load. The target of locust is load-testing web sites and checking number of concurrent users a system can handle.During a locust t...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Feb, 2020" }, { "code": null, "e": 529, "s": 52, "text": "Locust is an open source load testing tool. Load testing is a type of software testing that is conducted to check the tolerance/behavior of the system under a specific expect...
std::bitset::to_ullong and std::bitset::to_ulong in C++ STL
13 Aug, 2019 Bitset: A bitset is an array of bool but each Boolean value is not stored separately instead bitset optimizes the space such that each bool takes 1 bit space only, so space taken by bitset bs is less than that of bool bs[N] and vector bs(N). However, a limitation of bitset is, N must be known at compile ti...
[ { "code": null, "e": 54, "s": 26, "text": "\n13 Aug, 2019" }, { "code": null, "e": 443, "s": 54, "text": "Bitset: A bitset is an array of bool but each Boolean value is not stored separately instead bitset optimizes the space such that each bool takes 1 bit space only, so space t...
How to iterate through and access the JSON array elements using Rest Assured?
We can iterate through and access the JSON array elements using Rest Assured. First, we shall obtain a Response body which is in JSON format from a request. Then convert it to string. To obtain JSON array size, we have to use the size method on the JSON array. Then introduce a loop that shall iterate up to the array si...
[ { "code": null, "e": 1371, "s": 1187, "text": "We can iterate through and access the JSON array elements using Rest Assured. First, we shall obtain a Response body which is in JSON format from a request. Then convert it to string." }, { "code": null, "e": 1592, "s": 1371, "text":...
Printing frequency of each character just after its consecutive occurrences
21 Jun, 2022 Given a string in such a way that every character occurs in a repeated manner. Your task is to print the string by inserting the frequency of each unique character after it and also eliminating all repeated characters.Examples: Input : GeeeEEKKKss Output : G1e3E2K3s2 Input : ccccOddEEE Output : c4O1d2E3...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jun, 2022" }, { "code": null, "e": 282, "s": 52, "text": "Given a string in such a way that every character occurs in a repeated manner. Your task is to print the string by inserting the frequency of each unique character after it a...
How to Print HashSet Elements in Java?
15 Dec, 2020 In HashSet, duplicates are not allowed. If we are trying to insert duplicates then we won’t get any compile-time or runtime error and the add() method simply returns false. We can use 2 ways to print HashSet elements: Using the iterator() method to traverse the set elements and printing it.Directly printin...
[ { "code": null, "e": 53, "s": 25, "text": "\n15 Dec, 2020" }, { "code": null, "e": 226, "s": 53, "text": "In HashSet, duplicates are not allowed. If we are trying to insert duplicates then we won’t get any compile-time or runtime error and the add() method simply returns false." ...
Producer Consumer Problem in C
07 Feb, 2022 The producer-consumer problem is an example of a multi-process synchronization problem. The problem describes two processes, the producer and the consumer that shares a common fixed-size buffer use it as a queue. The producer’s job is to generate data, put it into the buffer, and start again. At the same t...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Feb, 2022" }, { "code": null, "e": 265, "s": 52, "text": "The producer-consumer problem is an example of a multi-process synchronization problem. The problem describes two processes, the producer and the consumer that shares a commo...
Generate all binary permutations such that there are more or equal 1’s than 0’s before every point in all permutations
24 Jun, 2022 Generate all permutations of a given length such that every permutation has more or equals 1’s than 0’s in all prefixes of the permutation. Examples: Input: len = 4 Output: 1111 1110 1101 1100 1011 1010 Note that a permutation like 0101 can not be in output because there are more 0's from index 0 to 2 in...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 Jun, 2022" }, { "code": null, "e": 193, "s": 52, "text": "Generate all permutations of a given length such that every permutation has more or equals 1’s than 0’s in all prefixes of the permutation. " }, { "code": null, "...
dc command in Linux with examples
10 Feb, 2022 dc command in Linux is used to evaluate arithmetic expressions. It evaluates expressions in the form of a postfix expression. Entering a number pushes it into the stack and entering an operator evaluates an expression and pushes the result back into the stack. It can evaluate +, -, /, *, %, ^. Different co...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Feb, 2022" }, { "code": null, "e": 376, "s": 28, "text": "dc command in Linux is used to evaluate arithmetic expressions. It evaluates expressions in the form of a postfix expression. Entering a number pushes it into the stack and en...
Reverse sum of two arrays in JavaScript
We are required to write a JavaScript function that takes in two arrays of numbers of the same length. The function should return an array with any arbitrary nth element of the array being the sum of nth term from start of first array and nth term from last of second array. For example − If the two arrays are − const a...
[ { "code": null, "e": 1337, "s": 1062, "text": "We are required to write a JavaScript function that takes in two arrays of numbers of the same length. The function should return an array with any arbitrary nth element of the array being the sum of nth term from start of first array and nth term from ...
Perl unpack Function
This function unpacks the binary string STRING using the format specified in TEMPLATE. Basically reverses the operation of pack, returning the list of packed values according to the supplied format. You can also prefix any format field with a %<number> to indicate that you want a 16-bit checksum of the value of STRING,...
[ { "code": null, "e": 2419, "s": 2220, "text": "This function unpacks the binary string STRING using the format specified in TEMPLATE. Basically reverses the operation of pack, returning the list of packed values according to the supplied format." }, { "code": null, "e": 2563, "s": 24...
How to declare String Variables in JavaScript?
JavaScript is an untyped language. This means that a JavaScript variable can hold a value of any data type. To declare variables in JavaScript, you need to use the var, let, or const keyword. Whether it is a string or a number, use the var, let, or const keyword for its declaration. But for declaring a string variable ...
[ { "code": null, "e": 1446, "s": 1062, "text": "JavaScript is an untyped language. This means that a JavaScript variable can hold a value of any data type. To declare variables in JavaScript, you need to use the var, let, or const keyword. Whether it is a string or a number, use the var, let, or cons...
Read and write WAV files using Python (wave)
The wave module in Python's standard library is an easy interface to the audio WAV format. The functions in this module can write audio data in raw format to a file like object and read the attributes of a WAV file. The file is opened in 'write' or read mode just as with built-in open() function, but with open() functi...
[ { "code": null, "e": 1278, "s": 1062, "text": "The wave module in Python's standard library is an easy interface to the audio WAV format. The functions in this module can write audio data in raw format to a file like object and read the attributes of a WAV file." }, { "code": null, "e": ...
Count occurrences of an element in a matrix of size N * N generated such that each element is equal to product of its indices - GeeksforGeeks
26 Apr, 2021 Given two positive integers N and X, the task is to count the occurrences of the given integer X in an N-length square matrix generated such that each element of the matrix is equal to the product of its row and column indices (1-based indexing). Examples: Input: N = 5, X = 6Output: 2Explanation: The 2D ar...
[ { "code": null, "e": 25316, "s": 25288, "text": "\n26 Apr, 2021" }, { "code": null, "e": 25563, "s": 25316, "text": "Given two positive integers N and X, the task is to count the occurrences of the given integer X in an N-length square matrix generated such that each element of t...
Add line break inside a string conditionally in JavaScript
We are required to write a function breakString() that takes in two arguments first the string to be broken and second is a number that represents the threshold count of characters after reaching which we have to repeatedly add line breaks in place of spaces. So, let’s do it. We will iterate over the with a for loop, w...
[ { "code": null, "e": 1322, "s": 1062, "text": "We are required to write a function breakString() that takes in two arguments first the string to be broken and second is a number that represents the threshold count of characters after reaching which we have to repeatedly add line breaks in place of s...
C program to count number of vowels and consonants in a String - GeeksforGeeks
25 Nov, 2019 Given a string and write a C program to count the number of vowels and consonants in this string. Examples: Input: str = "geeks for geeks" Output: Vowels: 5 Consonants: 8 Input: str = "abcdefghijklmnopqrstuvwxyz" Output: Vowels: 5 Consonants: 21 Approach: Take the string as input Take each character from...
[ { "code": null, "e": 24232, "s": 24204, "text": "\n25 Nov, 2019" }, { "code": null, "e": 24330, "s": 24232, "text": "Given a string and write a C program to count the number of vowels and consonants in this string." }, { "code": null, "e": 24340, "s": 24330, "...
Prolog - Introduction
Prolog as the name itself suggests, is the short form of LOGical PROgramming. It is a logical and declarative programming language. Before diving deep into the concepts of Prolog, let us first understand what exactly logical programming is. Logic Programming is one of the Computer Programming Paradigm, in which the pro...
[ { "code": null, "e": 2333, "s": 2092, "text": "Prolog as the name itself suggests, is the short form of LOGical PROgramming. It is a logical and declarative programming language. Before diving deep into the concepts of Prolog, let us first understand what exactly logical programming is." }, { ...
Python | sympy.smoothness() method - GeeksforGeeks
05 Sep, 2019 With the help of sympy.smoothness() method, we can find smoothness and power-smoothness of a given number. The smoothness of a number is its largest prime factor and the power-smoothness is its largest divisor raised to its multiplicity. Syntax:smoothness(n) Parameter:n – It denotes the number for which th...
[ { "code": null, "e": 24212, "s": 24184, "text": "\n05 Sep, 2019" }, { "code": null, "e": 24450, "s": 24212, "text": "With the help of sympy.smoothness() method, we can find smoothness and power-smoothness of a given number. The smoothness of a number is its largest prime factor a...
Adding middleware in Express in Node.js
Each request in app goes through multiple middleware’s in express. If one of the middleware returns the response it ends there. If any middleware wants to pass the request to next middleware, it uses next() function call at the end of its function call. Http Request -> Middleware (req, resp, next)-> Middleware(req, res...
[ { "code": null, "e": 1316, "s": 1062, "text": "Each request in app goes through multiple middleware’s in express. If one of the middleware returns the response it ends there. If any middleware wants to pass the request to next middleware, it uses next() function call at the end of its function call....
NativeScript - Navigation
Navigation enables users to quickly swipe in to their desired screen or to navigate through an app or to perform a particular action. Navigation component helps you implement navigation using simple button clicks to more complex patterns. Navigation differ substantially between core and angular version of NativeScript....
[ { "code": null, "e": 2344, "s": 2105, "text": "Navigation enables users to quickly swipe in to their desired screen or to navigate through an app or to perform a particular action. Navigation component helps you implement navigation using simple button clicks to more complex patterns." }, { ...
What is the use of Thread.sleep() method in Java?
The sleep() method is a static method of Thread class and it makes the thread sleep/stop working for a specific amount of time. The sleep() method throws an InterruptedException if a thread is interrupted by other threads, that means Thread.sleep() method must be enclosed within the try and catch blocks or it must be s...
[ { "code": null, "e": 1661, "s": 1062, "text": "The sleep() method is a static method of Thread class and it makes the thread sleep/stop working for a specific amount of time. The sleep() method throws an InterruptedException if a thread is interrupted by other threads, that means Thread.sleep() meth...
HTML <hr> Tag - GeeksforGeeks
17 Mar, 2022 The <hr> tag in HTML stands for horizontal rule and is used to insert a horizontal rule or a thematic break in an HTML page to divide or separate document sections. The <hr> tag is an empty tag, and it does not require an end tag.Tag Attributes: The table given below describe the <hr> tag attributes: Synt...
[ { "code": null, "e": 22758, "s": 22730, "text": "\n17 Mar, 2022" }, { "code": null, "e": 23061, "s": 22758, "text": "The <hr> tag in HTML stands for horizontal rule and is used to insert a horizontal rule or a thematic break in an HTML page to divide or separate document sections...
Duplicate subtree in Binary Tree | Practice | GeeksforGeeks
Given a binary tree, find out whether it contains a duplicate sub-tree of size two or more, or not. Example 1 : Input : 1 / \ 2 3 / \ \ 4 5 2 / \ 4 5 Output : 1 Explanation : ...
[ { "code": null, "e": 338, "s": 238, "text": "Given a binary tree, find out whether it contains a duplicate sub-tree of size two or more, or not." }, { "code": null, "e": 351, "s": 338, "text": "\nExample 1 :" }, { "code": null, "e": 616, "s": 351, "text": "Inp...
Parallel Algorithm - Quick Guide
An algorithm is a sequence of steps that take inputs from the user and after some computation, produces an output. A parallel algorithm is an algorithm that can execute several instructions simultaneously on different processing devices and then combine all the individual outputs to produce the final result. The easy a...
[ { "code": null, "e": 2213, "s": 1903, "text": "An algorithm is a sequence of steps that take inputs from the user and after some computation, produces an output. A parallel algorithm is an algorithm that can execute several instructions simultaneously on different processing devices and then combine...
C - Error Handling
As such, C programming does not provide direct support for error handling but being a system programming language, it provides you access at lower level in the form of return values. Most of the C or even Unix function calls return -1 or NULL in case of any error and set an error code errno. It is set as a global varia...
[ { "code": null, "e": 2533, "s": 2084, "text": "As such, C programming does not provide direct support for error handling but being a system programming language, it provides you access at lower level in the form of return values. Most of the C or even Unix function calls return -1 or NULL in case of...
8 puzzle Problem using Branch And Bound - GeeksforGeeks
19 Aug, 2021 We have introduced Branch and Bound and discussed the 0/1 Knapsack problem in the below posts. Branch and Bound | Set 1 (Introduction with 0/1 Knapsack) Branch and Bound | Set 2 (Implementation of 0/1 Knapsack) In this puzzle solution of the 8 puzzle problem is discussed. Given a 3×3 board with 8 tiles (e...
[ { "code": null, "e": 34203, "s": 34175, "text": "\n19 Aug, 2021" }, { "code": null, "e": 34299, "s": 34203, "text": "We have introduced Branch and Bound and discussed the 0/1 Knapsack problem in the below posts. " }, { "code": null, "e": 34357, "s": 34299, "te...
How to trim a string using $.trim() in jQuery?
To trim a string in jQuery, use the trim() method. It removes the spaces from starting and end of the string. The sample string I am using has spaces − var myStr = " Hello World "; Use the trim() method, jQuery.trim(myStr); The following is an example to trim a string in jQuery − Live Demo <!DOCTYPE html> <html> <...
[ { "code": null, "e": 1172, "s": 1062, "text": "To trim a string in jQuery, use the trim() method. It removes the spaces from starting and end of the string." }, { "code": null, "e": 1214, "s": 1172, "text": "The sample string I am using has spaces −" }, { "code": null, ...
What are the special symbols in C language?
In C programming language, generally, the special symbols have some special meaning and they cannot be used for other purposes. Some of the special symbols that are used in C programming are as follows − [] () {}, ; * = # Let’s understand their definitions, which are as follows − Brackets[] − Opening and closing of bra...
[ { "code": null, "e": 1190, "s": 1062, "text": "In C programming language, generally, the special symbols have some special meaning and they cannot be used for other purposes." }, { "code": null, "e": 1266, "s": 1190, "text": "Some of the special symbols that are used in C program...
K-Means Clustering: How It Works & Finding The Optimum Number Of Clusters In The Data | by Serafeim Loukas | Towards Data Science
K-means is one of the most widely used unsupervised clustering methods. The K-means algorithm clusters the data at hand by trying to separate samples into K groups of equal variance, minimizing a criterion known as the inertia or within-cluster sum-of-squares. This algorithm requires the number of clusters to be specif...
[ { "code": null, "e": 243, "s": 171, "text": "K-means is one of the most widely used unsupervised clustering methods." }, { "code": null, "e": 624, "s": 243, "text": "The K-means algorithm clusters the data at hand by trying to separate samples into K groups of equal variance, min...
How to set the foreground color of the CheckBox in C#? - GeeksforGeeks
10 Oct, 2021 The CheckBox control is the part of windows form which is used to take input from the user. Or in other words, CheckBox control allows us to select single or multiple elements from the given list. In CheckBox, you are allowed to set the foreground color of the CheckBox using the ForeColor property of the C...
[ { "code": null, "e": 24990, "s": 24962, "text": "\n10 Oct, 2021" }, { "code": null, "e": 25662, "s": 24990, "text": "The CheckBox control is the part of windows form which is used to take input from the user. Or in other words, CheckBox control allows us to select single or multi...
Node.js join() function - GeeksforGeeks
14 Oct, 2021 join() is an array function from Node.js that is used to return a string from the array. Syntax: array_name.join(parameter) Parameter: This function takes a single parameter as per which the join operation has to be performed. Return type: The function returns the string. The program below demonstrates the...
[ { "code": null, "e": 26818, "s": 26790, "text": "\n14 Oct, 2021" }, { "code": null, "e": 26907, "s": 26818, "text": "join() is an array function from Node.js that is used to return a string from the array." }, { "code": null, "e": 26915, "s": 26907, "text": "S...
Blackphish - Phishing tool in Kali Linux - GeeksforGeeks
17 Jun, 2021 Blackphish is a powerful open-source tool Phishing Tool. Blackphish is becoming very popular nowadays that is used to do phishing attacks on Target. Blackphish is easier than Social Engineering Toolkit. Blackphish contains some templates generated by another tool called Blackphish. Blackphish offers phish...
[ { "code": null, "e": 24551, "s": 24523, "text": "\n17 Jun, 2021" }, { "code": null, "e": 25004, "s": 24551, "text": "Blackphish is a powerful open-source tool Phishing Tool. Blackphish is becoming very popular nowadays that is used to do phishing attacks on Target. Blackphish is ...
Encrypt and Decrypt PDF using PyPDF2 - GeeksforGeeks
01 Oct, 2020 PDF (Portable Document Format) is one of the most used file formats for storing and sending documents. They are commonly used for many purposes such as eBooks, Resumes, Scanned documents, etc. But as we share pdf to many people, there is a possibility of its data getting leaked or stolen. So, it’s necessar...
[ { "code": null, "e": 25665, "s": 25637, "text": "\n01 Oct, 2020" }, { "code": null, "e": 26063, "s": 25665, "text": "PDF (Portable Document Format) is one of the most used file formats for storing and sending documents. They are commonly used for many purposes such as eBooks, Res...
How to Check Which Apache Modules are Enabled or Loaded in Linux ? - GeeksforGeeks
29 Jun, 2021 Apache is designed on the modularity principle, which allows web server operators to install new modules to extend their basic tasks while also improving Apache’s performance. The Apache HyperText Switch Protocol (HTTP) server has a front end called apcahe2ctl. Its purpose is to assist an administrator wit...
[ { "code": null, "e": 26197, "s": 26169, "text": "\n29 Jun, 2021" }, { "code": null, "e": 26373, "s": 26197, "text": "Apache is designed on the modularity principle, which allows web server operators to install new modules to extend their basic tasks while also improving Apache’s ...
include - Django Template Tags - GeeksforGeeks
05 Feb, 2020 A Django template is a text document or a Python string marked-up using the Django template language. Django being a powerful Batteries included framework provides convenience to rendering data in a template. Django templates not only allow passing data from view to template, but also provides some limited...
[ { "code": null, "e": 23964, "s": 23936, "text": "\n05 Feb, 2020" }, { "code": null, "e": 24667, "s": 23964, "text": "A Django template is a text document or a Python string marked-up using the Django template language. Django being a powerful Batteries included framework provides...
case - Unix, Linux Command
case - To conditionally perform a command, case will selectively execute the command-list corresponding to the first pattern that matches word. case word in [ [(] pattern [| pattern]...) command-list ;;]... esac The '|' is used to separate multiple patterns, and the ')' operator terminates a pattern list. A list of pa...
[ { "code": null, "e": 10722, "s": 10577, "text": "case - To conditionally perform a command, case will selectively execute the command-list corresponding to the first pattern that matches word. " }, { "code": null, "e": 10790, "s": 10722, "text": "case word in [ [(] pattern [| pat...
Custom Real-Time Object Detection in the Browser Using TensorFlow.js | by Hugo Zanini | Towards Data Science
Train a MobileNetV2 using the TensorFlow 2 Object Detection API and Google Colab, convert the model, and run real-time inferences in the browser through TensorFlow.js. Object detection is the task of detecting and classifying every object of interest in an image. In computer vision, this technique is used in applicatio...
[ { "code": null, "e": 340, "s": 172, "text": "Train a MobileNetV2 using the TensorFlow 2 Object Detection API and Google Colab, convert the model, and run real-time inferences in the browser through TensorFlow.js." }, { "code": null, "e": 564, "s": 340, "text": "Object detection i...
new and delete operator in C++
The new operator requests for the memory allocation in heap. If the sufficient memory is available, it initializes the memory to the pointer variable and returns its address. Here is the syntax of new operator in C++ language, pointer_variable = new datatype; Here is the syntax to initialize the memory, pointer_variabl...
[ { "code": null, "e": 1237, "s": 1062, "text": "The new operator requests for the memory allocation in heap. If the sufficient memory is available, it initializes the memory to the pointer variable and returns its address." }, { "code": null, "e": 1289, "s": 1237, "text": "Here is...