title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Chessboard Pawn-Pawn game - GeeksforGeeks
02 Jun, 2021 There is an 8*8 chessboard and two chess players having a single pawn each. A player has to move his pawn in each turn, either one step forward or one step diagonally only when this move kills the other pawn. The player who is unable to make any move loses. Given row and column numbers of white and black p...
[ { "code": null, "e": 25278, "s": 25250, "text": "\n02 Jun, 2021" }, { "code": null, "e": 25735, "s": 25278, "text": "There is an 8*8 chessboard and two chess players having a single pawn each. A player has to move his pawn in each turn, either one step forward or one step diagona...
Linear Algebra for Natural Language Processing | by Taaniya Arora | Towards Data Science
The field of Natural Language Processing involves building techniques to process text in natural language by people like you and me, and extract insights from it for performing a variety of tasks from interpreting user queries on search engines and returning web pages, to solving customer queries as chatbot assistant. ...
[ { "code": null, "e": 777, "s": 171, "text": "The field of Natural Language Processing involves building techniques to process text in natural language by people like you and me, and extract insights from it for performing a variety of tasks from interpreting user queries on search engines and return...
Create a Stack and Queue using ArrayDeque in Java
Create a stack using ArrayDeque. Deque<String> s = new ArrayDeque<String>(); // stack s.push("Bat"); s.push("Mat"); s.push("Cat"); s.push("Rat"); s.push("Hat"); s.push("Fat"); Create a queue using ArrayDeque − Deque<String> q = new ArrayDeque<String>(); // queue q.add("Bat"); q.add("Mat"); q.add("Cat"); q.add("Rat"); q...
[ { "code": null, "e": 1095, "s": 1062, "text": "Create a stack using ArrayDeque." }, { "code": null, "e": 1238, "s": 1095, "text": "Deque<String> s = new ArrayDeque<String>();\n// stack\ns.push(\"Bat\");\ns.push(\"Mat\");\ns.push(\"Cat\");\ns.push(\"Rat\");\ns.push(\"Hat\");\ns.pu...
How to convert a binary matrix to logical matrix in R?
A binary matrix contains values such as Yes or NO, 1 or 0, or any other two values that represents opposite mostly and the globally accepted logical values are FALSE and TRUE. Therefore, to convert a binary matrix to logical matrix, we can use ifelse function and convert the one category of binary variable to appropria...
[ { "code": null, "e": 1538, "s": 1062, "text": "A binary matrix contains values such as Yes or NO, 1 or 0, or any other two values that represents opposite mostly and the globally accepted logical values are FALSE and TRUE. Therefore, to convert a binary matrix to logical matrix, we can use ifelse fu...
Maximum XOR value in matrix - GeeksforGeeks
30 Apr, 2021 Given a square matrix (N X N), the task is to find the maximum XOR value of a complete row or a complete column.Examples : Input : N = 3 mat[3][3] = {{1, 0, 4}, {3, 7, 2}, {5, 9, 10} }; Output : 14 We get this maximum XOR value by doing XOR of elements i...
[ { "code": null, "e": 24615, "s": 24587, "text": "\n30 Apr, 2021" }, { "code": null, "e": 24740, "s": 24615, "text": "Given a square matrix (N X N), the task is to find the maximum XOR value of a complete row or a complete column.Examples : " }, { "code": null, "e": 2...
MongoDB query to display all the values excluding the id?
For this, use the project.Theproject takes a document that can specify the inclusion of fields, the suppression of the _id field, the addition of new fields, and the resetting of the values of existing fields Let us first create a collection with documents − > db.demo226.insertOne({"Name":"Chris","Age":21}); { "ackn...
[ { "code": null, "e": 1271, "s": 1062, "text": "For this, use the project.Theproject takes a document that can specify the inclusion of fields, the suppression of the _id field, the addition of new fields, and the resetting of the values of existing fields" }, { "code": null, "e": 1321, ...
JavaScript - RegExp test Method
The test method searches string for text that matches regexp. If it finds a match, it returns true; otherwise, it returns false. Its syntax is as follows − RegExpObject.test( string ); string − The string to be searched Returns the matched text if a match is found, and null if not. Try the following example program. ...
[ { "code": null, "e": 2595, "s": 2466, "text": "The test method searches string for text that matches regexp. If it finds a match, it returns true; otherwise, it returns false." }, { "code": null, "e": 2622, "s": 2595, "text": "Its syntax is as follows −" }, { "code": null...
How to Create a Representative Test Set | by Dimitris Poulopoulos | Towards Data Science
Splitting a data set into train and test sets is usually one of the first processing steps in a machine learning pipeline. After this point, there is just one inviolable rule: set aside the test data split and refer to it again only when your model is ready for its final evaluation. But is there a way to be confident t...
[ { "code": null, "e": 605, "s": 171, "text": "Splitting a data set into train and test sets is usually one of the first processing steps in a machine learning pipeline. After this point, there is just one inviolable rule: set aside the test data split and refer to it again only when your model is rea...
Python dictionary fromkeys() Method
Python dictionary method fromkeys() creates a new dictionary with keys from seq and values set to value. Following is the syntax for fromkeys() method − dict.fromkeys(seq[, value]) seq − This is the list of values which would be used for dictionary keys preparation. seq − This is the list of values which would be use...
[ { "code": null, "e": 2350, "s": 2244, "text": "Python dictionary method fromkeys() creates a new dictionary with keys from seq and values set to value." }, { "code": null, "e": 2398, "s": 2350, "text": "Following is the syntax for fromkeys() method −" }, { "code": null, ...
rsync - Unix, Linux Command
rsync [OPTION]... SRC [SRC]... DEST rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST rsync [OPTION]... SRC [SRC]... rsync://[USER@]HOST[:PORT]/DEST rsync [OPTION]... SRC rsync [OPTION]... [USER@]HOST:SRC [DEST] rsync [OPTION]... [USER@]HOST::SRC [DEST] rsync...
[ { "code": null, "e": 10615, "s": 10577, "text": "\nrsync [OPTION]... SRC [SRC]... DEST\n" }, { "code": null, "e": 10665, "s": 10615, "text": "\nrsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST\n" }, { "code": null, "e": 10716, "s": 10665, "text": "\nrsync [OPTI...
Keep Calm and Stack Up— Implement Stacking Regression in Python using mlxtend | by Dehao Zhang | Towards Data Science
If you have ever combined multiple ML models to boost your score up on the leaderboard on some Kaggle competition, you know what this is about. In fact, many winning solutions of these Kaggle competitions use ensemble models instead of just a single fine-tuned model. The intuition behind ensemble models is quite simple...
[ { "code": null, "e": 314, "s": 46, "text": "If you have ever combined multiple ML models to boost your score up on the leaderboard on some Kaggle competition, you know what this is about. In fact, many winning solutions of these Kaggle competitions use ensemble models instead of just a single fine-t...
Generate a string with maximum possible alphabets with odd frequencies - GeeksforGeeks
19 Apr, 2021 Given an integer N, the task is to generate a string str which contains maximum possible lowercase alphabets with each of them appearing an odd number of times.Examples: Input: N = 17 Output: bcdefghijklmnopqr Explanation: In order to maximize the number of characters, any 17 characters can be selected a...
[ { "code": null, "e": 25024, "s": 24996, "text": "\n19 Apr, 2021" }, { "code": null, "e": 25196, "s": 25024, "text": "Given an integer N, the task is to generate a string str which contains maximum possible lowercase alphabets with each of them appearing an odd number of times.Exa...
Generate Parentheses in Python
Suppose we have a value n. We have to generate all possible well-formed parentheses where n number of opening and closing parentheses are present. So if the value of n = 3, then the parentheses set will be ["()()()","()(())","(())()","(()())","((()))"] To solve this, we will follow these steps − Define method called ge...
[ { "code": null, "e": 1315, "s": 1062, "text": "Suppose we have a value n. We have to generate all possible well-formed parentheses where n number of opening and closing parentheses are present. So if the value of n = 3, then the parentheses set will be [\"()()()\",\"()(())\",\"(())()\",\"(()())\",\"...
Program to find the surface area of the square pyramid - GeeksforGeeks
22 Mar, 2021 Given the base length(b) and slant height(s) of the square pyramid. The task is to find the surface area of the Square Pyramid. A Pyramid with a square base, 4 triangular faces, and an apex is a square pyramid. In this figure, b – base length of the square pyramid. s – slant height of the square pyramid. ...
[ { "code": null, "e": 25036, "s": 25008, "text": "\n22 Mar, 2021" }, { "code": null, "e": 25248, "s": 25036, "text": "Given the base length(b) and slant height(s) of the square pyramid. The task is to find the surface area of the Square Pyramid. A Pyramid with a square base, 4 tri...
Calculating the mean of all pixels for each band in an image using the Pillow library
In this program, we will calculate the mean of all the pixels in each channel using the Pillow library. There are a total three channels in an image and therefore, we will get a list of three values. Step 1: Import the Image and ImageStat libraries. Step 2: Open the image. Step 3: Pass the image to the stat function of...
[ { "code": null, "e": 1262, "s": 1062, "text": "In this program, we will calculate the mean of all the pixels in each channel using the Pillow library. There are a total three channels in an image and therefore, we will get a list of three values." }, { "code": null, "e": 1442, "s": 1...
How to count number of occurrences of repeated names in an array of objects in JavaScript ? - GeeksforGeeks
24 Apr, 2021 Given an array of objects and the task is to find the occurrences of a given key according to its value. Example: Input : arr = [ { employeeName: "Ram", employeeId: 23 }, { employeeName: "Shyam", employeeId: 24 }, { employeeName: "Ram", employeeId: 21 }...
[ { "code": null, "e": 37970, "s": 37942, "text": "\n24 Apr, 2021" }, { "code": null, "e": 38075, "s": 37970, "text": "Given an array of objects and the task is to find the occurrences of a given key according to its value." }, { "code": null, "e": 38084, "s": 38075...
DATE_FORMAT() Function in MariaDB - GeeksforGeeks
26 Oct, 2020 DATE_FORMAT() Function :In MariaDB, the DATE_FORMAT() function uses two parameters – a date as specified by a format mask. In this function, the first parameter will be a date and the second parameter will be the mask. This function will return the date in the given mask. This function will convert the dat...
[ { "code": null, "e": 24268, "s": 24240, "text": "\n26 Oct, 2020" }, { "code": null, "e": 24602, "s": 24268, "text": "DATE_FORMAT() Function :In MariaDB, the DATE_FORMAT() function uses two parameters – a date as specified by a format mask. In this function, the first parameter wi...
Analyzing lyrics from different music genres with universal sentence encoding | by Sam Ho | Towards Data Science
My enduring love affair with music was ignited in 1992 when on my 12th Christmas, my doting parents stumped up the pennies and bought me an Alba HiFi. Belt-drive Turntable? Check! Twin Cassette Players? Check!Graphic Equalizer with BASS BOOST? Of course! I have been listening to all kinds of music ever since. I’m now a...
[ { "code": null, "e": 198, "s": 47, "text": "My enduring love affair with music was ignited in 1992 when on my 12th Christmas, my doting parents stumped up the pennies and bought me an Alba HiFi." }, { "code": null, "e": 302, "s": 198, "text": "Belt-drive Turntable? Check! Twin Ca...
SAP Payroll - Indirect Evaluation
Indirect Evaluation is used to calculate payroll for some specific wage types that are defaulted under the Basic Pay Infotype (0008) or Infotype 0014 or 001 (recurring payment/deductions or Additional payments). Note − While using indirect evaluation, it is also possible to calculate INVAL as numbers instead of using v...
[ { "code": null, "e": 2194, "s": 1982, "text": "Indirect Evaluation is used to calculate payroll for some specific wage types that are defaulted under the Basic Pay Infotype (0008) or Infotype 0014 or 001 (recurring payment/deductions or Additional payments)." }, { "code": null, "e": 2365...
Can we create non static variables in an interface using java?
Interface in Java is similar to class but, it contains only abstract methods and fields which are final and static. Since all the methods are abstract you cannot instantiate it. To use it, you need to implement this interface using a class and provide body to all the abstract methods int it. No you cannot have non-stat...
[ { "code": null, "e": 1178, "s": 1062, "text": "Interface in Java is similar to class but, it contains only abstract methods and fields which are final and static." }, { "code": null, "e": 1355, "s": 1178, "text": "Since all the methods are abstract you cannot instantiate it. To u...
6 Steps To Write Any Machine Learning Algorithm From Scratch: Perceptron Case Study | by John Sullivan | Towards Data Science
Writing a machine learning algorithm from scratch is an extremely rewarding learning experience. It provides you with that “ah ha!” moment where it finally clicks, and you understand what’s really going on under the hood. Some algorithms are just more complicated than others, so start with something simple, such as the...
[ { "code": null, "e": 269, "s": 172, "text": "Writing a machine learning algorithm from scratch is an extremely rewarding learning experience." }, { "code": null, "e": 394, "s": 269, "text": "It provides you with that “ah ha!” moment where it finally clicks, and you understand wha...
How will you travel from child to parent with xpath in Selenium with python?
We can identify a parent from its children in DOM with the help of xpath. There are situations where we have dynamic attributes for the parent node in html but the child nodes have unique static attributes for identification. This can be achieved with the help of relative xpath along with the parent xpath axe. Method. ...
[ { "code": null, "e": 1288, "s": 1062, "text": "We can identify a parent from its children in DOM with the help of xpath. There are situations where we have dynamic attributes for the parent node in html but the child nodes have unique static attributes for identification." }, { "code": null,...
Text Generation Using Recurrent Neural Networks | by Donald Dong | Towards Data Science
Text generation is a popular problem in Data Science and Machine Learning, and it is a suitable task for Recurrent Neural Nets. This report uses TensorFlow to build an RNN text generator and builds a high-level API in Python3. The report is inspired by @karpathy ( min-char-rnn) and Aurélien Géron ( Hands-On Machine L...
[ { "code": null, "e": 656, "s": 172, "text": "Text generation is a popular problem in Data Science and Machine Learning, and it is a suitable task for Recurrent Neural Nets. This report uses TensorFlow to build an RNN text generator and builds a high-level API in Python3. The report is inspired by @k...
\circledR - Tex Command
\circledR - Used to draw circled R. { \circledR } \circledR command draws circled R. \circledR ® \circledR ® \circledR 14 Lectures 52 mins Ashraf Said 11 Lectures 1 hours Ashraf Said 9 Lectures 1 hours Emenwa Global, Ejike IfeanyiChukwu 29 Lectures 2.5 hours ...
[ { "code": null, "e": 8022, "s": 7986, "text": "\\circledR - Used to draw circled R." }, { "code": null, "e": 8036, "s": 8022, "text": "{ \\circledR }" }, { "code": null, "e": 8071, "s": 8036, "text": "\\circledR command draws circled R." }, { "code": n...
Overlapping Y-axis tick label and X-axis tick label in Matplotlib
To reduce the chances of overlapping between x and y tick labels in matplotlib, we can take the following steps − Create x and y data points using numpy. Create x and y data points using numpy. Add a subplot to the current figure at index 1 (nrows=1 and ncols=2). Add a subplot to the current figure at index 1 (nrows=1 ...
[ { "code": null, "e": 1176, "s": 1062, "text": "To reduce the chances of overlapping between x and y tick labels in matplotlib, we can take the following steps −" }, { "code": null, "e": 1216, "s": 1176, "text": "Create x and y data points using numpy." }, { "code": null, ...
Python Program for Binary Insertion Sort - GeeksforGeeks
25 Feb, 2022 We can use binary search to reduce the number of comparisons in normal insertion sort. Binary Insertion Sort find use binary search to find the proper location to insert the selected item at each iteration.In normal insertion, sort it takes O(i) (at ith iteration) in worst case. we can reduce it to O(logi)...
[ { "code": null, "e": 24557, "s": 24529, "text": "\n25 Feb, 2022" }, { "code": null, "e": 24889, "s": 24557, "text": "We can use binary search to reduce the number of comparisons in normal insertion sort. Binary Insertion Sort find use binary search to find the proper location to ...
CSS - Bounce out Effect
Bounce Animation effect is used to move the element quick up, back, or away from a surface after hitting it. @keyframes bounceOut { 0% { transform: scale(1); } 25% { transform: scale(.95); } 50% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0; transform:...
[ { "code": null, "e": 2735, "s": 2626, "text": "Bounce Animation effect is used to move the element quick up, back, or away from a surface after hitting it." }, { "code": null, "e": 2966, "s": 2735, "text": "@keyframes bounceOut {\n 0% {\n transform: scale(1);\n }\n 25%...
Named Entity Recognition - GeeksforGeeks
15 Feb, 2022 The named entity recognition (NER) is one of the most data preprocessing task. It involves the identification of key information in the text and classification into a set of predefined categories. An entity is basically the thing that is consistently talked about or refer to in the text. NER is the form of...
[ { "code": null, "e": 25613, "s": 25585, "text": "\n15 Feb, 2022" }, { "code": null, "e": 25902, "s": 25613, "text": "The named entity recognition (NER) is one of the most data preprocessing task. It involves the identification of key information in the text and classification int...
Count numbers which are divisible by all the numbers from 2 to 10 - GeeksforGeeks
12 Jul, 2021 Given an integer N, the task is to find the count of numbers from 1 to N which are divisible by all the numbers from 2 to 10. Examples: Input: N = 3000 Output: 1 2520 is the only number below 3000 which is divisible by all the numbers from 2 to 10. Input: N = 2000 Output: 0 Approach: Let’s factorize nu...
[ { "code": null, "e": 26357, "s": 26329, "text": "\n12 Jul, 2021" }, { "code": null, "e": 26483, "s": 26357, "text": "Given an integer N, the task is to find the count of numbers from 1 to N which are divisible by all the numbers from 2 to 10." }, { "code": null, "e": ...
Pandas Profiling in Python - GeeksforGeeks
22 Jun, 2020 The pandas_profiling library in Python include a method named as ProfileReport() which generate a basic report on the input DataFrame. The report consist of the following: DataFrame overview, Each attribute on which DataFrame is defined, Correlations between attributes (Pearson Correlation and Spearman Co...
[ { "code": null, "e": 25871, "s": 25843, "text": "\n22 Jun, 2020" }, { "code": null, "e": 26007, "s": 25871, "text": "The pandas_profiling library in Python include a method named as ProfileReport() which generate a basic report on the input DataFrame. " }, { "code": null,...
How to Remove rows in Numpy array that contains non-numeric values? - GeeksforGeeks
25 Oct, 2020 Many times we have non-numeric values in NumPy array. These values need to be removed, so that array will be free from all these unnecessary values and look more decent. It is possible to remove all rows containing Nan values using the Bitwise NOT operator and np.isnan() function. Example 1: Python3 # Impo...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n25 Oct, 2020" }, { "code": null, "e": 25819, "s": 25537, "text": "Many times we have non-numeric values in NumPy array. These values need to be removed, so that array will be free from all these unnecessary values and look more d...
Job Sequencing Problem | Set 2 (Using Disjoint Set) - GeeksforGeeks
25 Jan, 2021 Given a set of n jobs where each job i has a deadline di >=1 and profit pi>=0. Only one job can be scheduled at a time. Each job takes 1 unit of time to complete. We earn the profit if and only if the job is completed by its deadline. The task is to find the subset of jobs that maximizes profit. Examples: ...
[ { "code": null, "e": 26379, "s": 26351, "text": "\n25 Jan, 2021" }, { "code": null, "e": 26676, "s": 26379, "text": "Given a set of n jobs where each job i has a deadline di >=1 and profit pi>=0. Only one job can be scheduled at a time. Each job takes 1 unit of time to complete. ...
jQWidgets jqxGrid cellbeginedit Event - GeeksforGeeks
03 Nov, 2021 jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful, optimized, platform-independent, and widely supported framework. The jqxGrid is used to illustrate a jQuery widget that shows data in tabular form. Moreover, it renders full support for c...
[ { "code": null, "e": 89964, "s": 89936, "text": "\n03 Nov, 2021" }, { "code": null, "e": 90354, "s": 89964, "text": "jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful, optimized, platform-independent, and widely...
Construct Pushdown Automata for all length palindrome - GeeksforGeeks
17 Apr, 2018 A Pushdown Automaton (PDA) is like an epsilon Non deterministic Finite Automata (NFA) with infinite stack. PDA is a way to implement context free languages. Hence, it is important to learn, how to draw PDA. Here, take the example of odd length palindrome:Que-1: Construct a PDA for language L = {wcw’ | w={0...
[ { "code": null, "e": 31081, "s": 31053, "text": "\n17 Apr, 2018" }, { "code": null, "e": 31288, "s": 31081, "text": "A Pushdown Automaton (PDA) is like an epsilon Non deterministic Finite Automata (NFA) with infinite stack. PDA is a way to implement context free languages. Hence,...
Python | shutil.copy() method - GeeksforGeeks
20 Jun, 2021 Python3 # Python program to explain shutil.copy() method # importing shutil moduleimport shutil # Source pathsource = "/home/User/Documents/file.txt" # Destination pathdestination = "/home/User/Documents/file.txt" # Copy the content of# source to destination try: shutil.copy(source, destination) pr...
[ { "code": null, "e": 25523, "s": 25495, "text": "\n20 Jun, 2021" }, { "code": null, "e": 25531, "s": 25523, "text": "Python3" }, { "code": "# Python program to explain shutil.copy() method # importing shutil moduleimport shutil # Source pathsource = \"/home/User/Documen...
How to create form validation by using only HTML ? - GeeksforGeeks
15 Apr, 2020 In Web Development, we often use JavaScript with HTML to validate the form, but we can also do the same via HTML in the following ways. HTML <input> required Attribute HTML <input> type Attribute HTML <input> pattern Attribute HTML <input> required Attribute: In input tag of HTML, we can specify via “requi...
[ { "code": null, "e": 33028, "s": 33000, "text": "\n15 Apr, 2020" }, { "code": null, "e": 33164, "s": 33028, "text": "In Web Development, we often use JavaScript with HTML to validate the form, but we can also do the same via HTML in the following ways." }, { "code": null,...
setfillstyle() and floodfill() in C - GeeksforGeeks
25 Jan, 2018 The header file graphics.h contains setfillstyle() function which sets the current fill pattern and fill color. floodfill() function is used to fill an enclosed area. Current fill pattern and fill color is used to fill the area. Syntax : void setfillstyle(int pattern, int color) void floodfill(int x, int ...
[ { "code": null, "e": 26027, "s": 25999, "text": "\n25 Jan, 2018" }, { "code": null, "e": 26256, "s": 26027, "text": "The header file graphics.h contains setfillstyle() function which sets the current fill pattern and fill color. floodfill() function is used to fill an enclosed ar...
How to Disable an datepicker in jQuery UI ? - GeeksforGeeks
27 Jan, 2021 To disable a datepicker in jQuery UI we will be using disable() method which is discussed below: jQuery UI disable() method is used to disable the datepicker. Syntax: $( ".selector" ).datepicker( "disable" ) Parameters: This method does not accept any parameters. Return values: This method returns an objec...
[ { "code": null, "e": 27144, "s": 27116, "text": "\n27 Jan, 2021" }, { "code": null, "e": 27241, "s": 27144, "text": "To disable a datepicker in jQuery UI we will be using disable() method which is discussed below:" }, { "code": null, "e": 27303, "s": 27241, "t...
Spring Boot - Application Properties - GeeksforGeeks
15 Dec, 2021 As we already know Spring Boot is built on the top of the spring and contains all the features of spring. And is becoming a favorite of developers these days because it’s a rapid production-ready environment that enables the developers to directly focus on the logic instead of struggling with the configura...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n15 Dec, 2021" }, { "code": null, "e": 25821, "s": 25225, "text": "As we already know Spring Boot is built on the top of the spring and contains all the features of spring. And is becoming a favorite of developers these days becau...
GATE | GATE CS 2008 | Question 63 - GeeksforGeeks
02 Dec, 2021 The P and V operations on counting semaphores, where s is a counting semaphore, are defined as follows: P(s) : s = s - 1; if (s < 0) then wait; V(s) : s = s + 1; if (s <= 0) then wakeup a process waiting on s; Assume that Pb and Vb the wait and signal operations on binary semaphores are provided. Two...
[ { "code": null, "e": 25833, "s": 25805, "text": "\n02 Dec, 2021" }, { "code": null, "e": 25937, "s": 25833, "text": "The P and V operations on counting semaphores, where s is a counting semaphore, are defined as follows:" }, { "code": null, "e": 26049, "s": 25937,...
Python - Matrix Row subset - GeeksforGeeks
30 Dec, 2020 Sometimes, while working with Python Matrix, one can have a problem in which, one needs to extract all the rows that are a possible subset of any row of other Matrix. This kind of problem can have application in data domains as a matrix is a key data type in those domains. Let’s discuss certain ways in whi...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n30 Dec, 2020" }, { "code": null, "e": 25875, "s": 25537, "text": "Sometimes, while working with Python Matrix, one can have a problem in which, one needs to extract all the rows that are a possible subset of any row of other Matr...
Angular PrimeNG OrderList Component - GeeksforGeeks
03 Oct, 2021 Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will know how to use the OrderList component in Angular PrimeNG. We will also learn abo...
[ { "code": null, "e": 26354, "s": 26326, "text": "\n03 Oct, 2021" }, { "code": null, "e": 26763, "s": 26354, "text": "Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make resp...
General Tree (Each node can have arbitrary number of children) Level Order Traversal - GeeksforGeeks
28 Jun, 2021 Given a generic tree, perform a Level order traversal and print all of its nodesExamples: Input : 10 / / \ \ 2 34 56 100 / \ | / | \ 77 88 1 7 8 9 Output : 10 2 34 56 100 77 88 1 7 8 9 Input : ...
[ { "code": null, "e": 24984, "s": 24956, "text": "\n28 Jun, 2021" }, { "code": null, "e": 25076, "s": 24984, "text": "Given a generic tree, perform a Level order traversal and print all of its nodesExamples: " }, { "code": null, "e": 25476, "s": 25076, "text":...
How to use Boto3 to get the details of a connection from AWS Glue Data catalog?
Problem Statement − Use boto3 library in Python to get details of a connection present in AWS Glue Data catalog. Example − Get the details of a connection definition, ‘aurora-test’. Step 1 − Import boto3 and botocore exceptions to handle exceptions. Step 2 − Pass the parameter connection_name whose definition needs to ...
[ { "code": null, "e": 1175, "s": 1062, "text": "Problem Statement − Use boto3 library in Python to get details of a connection present in AWS Glue Data catalog." }, { "code": null, "e": 1244, "s": 1175, "text": "Example − Get the details of a connection definition, ‘aurora-test’."...
Number of ways to reach Nth floor by taking at-most K leaps - GeeksforGeeks
31 May, 2021 Given N number of stairs. Also given the number of steps that one can cover at most in one leap (K). The task is to find the number of possible ways one (only consider combinations) can climb to the top of the building in K leaps or less from the ground floor.Examples: Input: N = 5, K = 3 Output: 5 To re...
[ { "code": null, "e": 25085, "s": 25057, "text": "\n31 May, 2021" }, { "code": null, "e": 25357, "s": 25085, "text": "Given N number of stairs. Also given the number of steps that one can cover at most in one leap (K). The task is to find the number of possible ways one (only cons...
Types of Statements in JDBC
09 Jul, 2021 The statement interface is used to create SQL basic statements in Java it provides methods to execute queries with the database. There are different types of statements that are used in JDBC as follows: Create Statement Prepared Statement Callable Statement 1. Create a Statement: From the connection inter...
[ { "code": null, "e": 54, "s": 26, "text": "\n09 Jul, 2021" }, { "code": null, "e": 257, "s": 54, "text": "The statement interface is used to create SQL basic statements in Java it provides methods to execute queries with the database. There are different types of statements that ...
KitHack – Hacking tools pack in Kali Linux
23 Sep, 2021 KitHack Framework is a free and open-source tool available on GitHub. It is designed to automate the process of downloading and installing different tools for penetration testing, with a special option that allows generating cross-platform backdoors using Metasploit Framework. The framework has the followi...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Sep, 2021" }, { "code": null, "e": 306, "s": 28, "text": "KitHack Framework is a free and open-source tool available on GitHub. It is designed to automate the process of downloading and installing different tools for penetration test...
Selective Search for Object Detection | R-CNN
22 Jul, 2021 The problem of object localization is the most difficult part of object detection. One approach is that we use sliding window of different size to locate objects in the image. This approach is called Exhaustive search. This approach is computationally very expensive as we need to search for object in thous...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Jul, 2021" }, { "code": null, "e": 798, "s": 52, "text": "The problem of object localization is the most difficult part of object detection. One approach is that we use sliding window of different size to locate objects in the image...
How to make Flappy Bird Game in Pygame?
31 Aug, 2021 In this article, we are going to see how to make a flappy bird game in Pygame. We all are familiar with this game. In this game, the main objective of the player is to gain the maximum points by defending the bird from hurdles. Here, we will build our own Flappy Bird game using Python. We will be using Pyg...
[ { "code": null, "e": 54, "s": 26, "text": "\n31 Aug, 2021" }, { "code": null, "e": 133, "s": 54, "text": "In this article, we are going to see how to make a flappy bird game in Pygame." }, { "code": null, "e": 341, "s": 133, "text": "We all are familiar with t...
JavaFX | Point3D Class
13 Aug, 2021 Point3D class is a part of JavaFX. This class defines a 3-dimensional point in a 3D space. The Point3D class represents a 3D point by its x, y, z coordinates. Constructor of the class is: Point3D(double x, double y, double z): Creates a Point3D object using the specified coordinates. Commonly Used Methods...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Aug, 2021" }, { "code": null, "e": 187, "s": 28, "text": "Point3D class is a part of JavaFX. This class defines a 3-dimensional point in a 3D space. The Point3D class represents a 3D point by its x, y, z coordinates." }, { "c...
Insertion at Specific Position in a Circular Doubly Linked List
23 Jun, 2022 Prerequisite: Insert Element Circular Doubly Linked List. Convert an Array to a Circular Doubly Linked List. Given the start pointer pointing to the start of a Circular Doubly Linked List, an element and a position. The task is to insert the element at the specified position in the given Circular Doubly L...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Jun, 2022" }, { "code": null, "e": 67, "s": 52, "text": "Prerequisite: " }, { "code": null, "e": 111, "s": 67, "text": "Insert Element Circular Doubly Linked List." }, { "code": null, "e": 162, "s...
How to use the recyclerview with a database in Android using Kotlin?
This example demonstrates how to use the recyclerview with a database in Android using Kotlin. 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="u...
[ { "code": null, "e": 1282, "s": 1187, "text": "This example demonstrates how to use the recyclerview with a database in Android using Kotlin." }, { "code": null, "e": 1411, "s": 1282, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all ...
Node.js NPM shortid Module
08 Apr, 2022 NPM(Node Package Manager) is a package manager of Node.js packages. There is a NPM package called ‘shortid’ used to create short non-sequential url-friendly unique ids. By default, it uses 7-14 url-friendly characters: A-Z, a-z, 0-9, _-. It Supports cluster (automatically), custom seeds, custom alphabet. I...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Apr, 2022" }, { "code": null, "e": 389, "s": 28, "text": "NPM(Node Package Manager) is a package manager of Node.js packages. There is a NPM package called ‘shortid’ used to create short non-sequential url-friendly unique ids. By def...
PHP | strcasecmp() Function
28 Nov, 2018 The strcasecmp() function is a built-in function in PHP and is used to compare two given strings. It is case-insensitive. This function is similar to strncasecmp(), the only difference is that the strncasecmp() provides the provision to specify the number of characters to be used from each string for the c...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Nov, 2018" }, { "code": null, "e": 346, "s": 28, "text": "The strcasecmp() function is a built-in function in PHP and is used to compare two given strings. It is case-insensitive. This function is similar to strncasecmp(), the only d...
Convert PySpark dataframe to list of tuples
18 Jul, 2021 In this article, we are going to convert the Pyspark dataframe into a list of tuples. The rows in the dataframe are stored in the list separated by a comma operator. So we are going to create a dataframe by using a nested list Creating Dataframe for demonstration: Python3 # importing moduleimport pyspark ...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Jul, 2021" }, { "code": null, "e": 114, "s": 28, "text": "In this article, we are going to convert the Pyspark dataframe into a list of tuples." }, { "code": null, "e": 255, "s": 114, "text": "The rows in the data...
Using a variable as format specifier in C
29 May, 2017 It is known that, printf() function is an inbuilt library function in C programming language in the header file stdio.h. It is used to print a character, string, float, integer etc. onto the output screen. However, while printing the float values, the number of digits following the decimal point can be con...
[ { "code": null, "e": 54, "s": 26, "text": "\n29 May, 2017" }, { "code": null, "e": 509, "s": 54, "text": "It is known that, printf() function is an inbuilt library function in C programming language in the header file stdio.h. It is used to print a character, string, float, integ...
How to set the div height to auto-adjust to background size?
08 Jun, 2020 Sometimes, while creating a website, it is required to make a div adjust its height automatically according to the background without having the need to set a specific height or min-height. It makes it convenient for the developer while writing the code. We’ll create an img element inside our div and will...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Jun, 2020" }, { "code": null, "e": 284, "s": 28, "text": "Sometimes, while creating a website, it is required to make a div adjust its height automatically according to the background without having the need to set a specific height ...
Python | dtype object length of Numpy array of strings
14 Mar, 2019 In this post, we are going to see the datatype of the numpy object when the underlying data is of string type. In numpy, if the underlying data type of the given object is string then the dtype of object is the length of the longest string in the array. This is so because we cannot create variable length s...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Mar, 2019" }, { "code": null, "e": 423, "s": 28, "text": "In this post, we are going to see the datatype of the numpy object when the underlying data is of string type. In numpy, if the underlying data type of the given object is str...
JSTL - Core <fmt:formatDate> Tag
The <fmt:formatDate> tag is used to format dates in a variety of ways. The <fmt:formatDate> tag has the following attributes − The pattern attribute is used to specify even more precise handling of the date − <%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix = "fmt" uri = "http://j...
[ { "code": null, "e": 2445, "s": 2373, "text": "The <fmt:formatDate> tag is used to format dates in a variety of ways." }, { "code": null, "e": 2501, "s": 2445, "text": "The <fmt:formatDate> tag has the following attributes −" }, { "code": null, "e": 2583, "s": 25...
UI Testing with Espresso in Android Studio
11 Jul, 2021 UI testing is the process of testing the visual elements of an application to ensure whether they appropriately meet the anticipated functionality. Verifying the application manually whether it works or not is a time taking and tiring process, but using espresso we can write automated tests that run fast a...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Jul, 2021" }, { "code": null, "e": 490, "s": 28, "text": "UI testing is the process of testing the visual elements of an application to ensure whether they appropriately meet the anticipated functionality. Verifying the application m...
Remove rows with empty cells in R
23 May, 2021 A dataframe may contain elements belonging to different data types as cells. However, it may contain blank rows or rows containing missing values in all the columns. These rows are equivalent to dummy records and are termed empty rows. There are multiple ways to remove them. A vector is declared to keep t...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 May, 2021" }, { "code": null, "e": 305, "s": 28, "text": "A dataframe may contain elements belonging to different data types as cells. However, it may contain blank rows or rows containing missing values in all the columns. These row...
Convert XML to CSV in Python
24 Jan, 2021 Prerequisites: Pandas XML stands for Extensible Markup Language. This format is extremely useful for keeping track of small to medium amounts of data. As the data in XML format is not readable by general users, we need to convert it to some user-friendly format like CSV. CSV is easily readable and can be o...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Jan, 2021" }, { "code": null, "e": 50, "s": 28, "text": "Prerequisites: Pandas" }, { "code": null, "e": 359, "s": 50, "text": "XML stands for Extensible Markup Language. This format is extremely useful for keeping...
Aliquot sum - GeeksforGeeks
08 Apr, 2021 In number theory, the aliquot sum s(n) of a positive integer n is the sum of all proper divisors of n, that is, all divisors of n other than n itself.They are defined by the sums of their aliquot divisors. The aliquot divisors of a number are all of its divisors except the number itself. The aliquot sum is...
[ { "code": null, "e": 24692, "s": 24664, "text": "\n08 Apr, 2021" }, { "code": null, "e": 25218, "s": 24692, "text": "In number theory, the aliquot sum s(n) of a positive integer n is the sum of all proper divisors of n, that is, all divisors of n other than n itself.They are defi...
How to align a logo image to center of navigation bar using HTML and CSS ? - GeeksforGeeks
23 Nov, 2020 Problem statement: You must have seen that while applying margin:auto property to the image tag in the navigation bar, the logo image in the navigation bar does not get centered. Approach: As the image tag in CSS is an inline element, so the image tag will occupy only that much space which is required by i...
[ { "code": null, "e": 25011, "s": 24983, "text": "\n23 Nov, 2020" }, { "code": null, "e": 25190, "s": 25011, "text": "Problem statement: You must have seen that while applying margin:auto property to the image tag in the navigation bar, the logo image in the navigation bar does no...
SAP ABAP - Variables
Variables are named data objects used to store values within the allotted memory area of a program. As the name suggests, users can change the content of variables with the help of ABAP statements. Each variable in ABAP has a specific type, which determines the size and layout of the variable's memory; the range of val...
[ { "code": null, "e": 3324, "s": 2898, "text": "Variables are named data objects used to store values within the allotted memory area of a program. As the name suggests, users can change the content of variables with the help of ABAP statements. Each variable in ABAP has a specific type, which determ...
Spring - Bean Post Processors
The BeanPostProcessor interface defines callback methods that you can implement to provide your own instantiation logic, dependency-resolution logic, etc. You can also implement some custom logic after the Spring container finishes instantiating, configuring, and initializing a bean by plugging in one or more BeanPostP...
[ { "code": null, "e": 2638, "s": 2292, "text": "The BeanPostProcessor interface defines callback methods that you can implement to provide your own instantiation logic, dependency-resolution logic, etc. You can also implement some custom logic after the Spring container finishes instantiating, config...
Performance metrics for binary classifier (in simple words) | by Irene P | Towards Data Science
Say we have a simple binary classifier which accepts boxes with Schrodinger’s cats 😺 as the input and we expect the classifier to return label 1 (positive) if the cat is alive and 0 (negative) if not, but errors occur from time to time. The reasons may be different, for example — poor quality of input data, or wrong f...
[ { "code": null, "e": 284, "s": 47, "text": "Say we have a simple binary classifier which accepts boxes with Schrodinger’s cats 😺 as the input and we expect the classifier to return label 1 (positive) if the cat is alive and 0 (negative) if not, but errors occur from time to time." }, { "cod...
The Nice Way To Deploy An ML Model Using Docker | by Yash Prakash | Towards Data Science
There are challenges associated with ML projects when built and run by different developers in a team or otherwise. Sometime, the dependencies may end up mismatching, causing troubles for other dependent libraries in the same project. Besides, you also need to have a clear documentation of every step to take in case yo...
[ { "code": null, "e": 560, "s": 172, "text": "There are challenges associated with ML projects when built and run by different developers in a team or otherwise. Sometime, the dependencies may end up mismatching, causing troubles for other dependent libraries in the same project. Besides, you also ne...
How to create a label using JavaFX?
You can display a text element/image on the User Interface using the Label component. It is a not editable text control, mostly used to specify the purpose of other nodes in the application. In JavaFX, you can create a label by instantiating the javafx.scene.control.Label class. Just like a text node you can set the de...
[ { "code": null, "e": 1253, "s": 1062, "text": "You can display a text element/image on the User Interface using the Label\ncomponent. It is a not editable text control, mostly used to specify the purpose of\nother nodes in the application." }, { "code": null, "e": 1342, "s": 1253, ...
Find modular node in a linked list - GeeksforGeeks
18 Aug, 2021 Given a singly linked list and a number k, find the last node whose n%k == 0, where n is the number of nodes in the list.Examples: Input : list = 1->2->3->4->5->6->7 k = 3 Output : 6 Input : list = 3->7->1->9->8 k = 2 Output : 9 1. Take a pointer modularNode and initialize it with NULL...
[ { "code": null, "e": 31010, "s": 30982, "text": "\n18 Aug, 2021" }, { "code": null, "e": 31143, "s": 31010, "text": "Given a singly linked list and a number k, find the last node whose n%k == 0, where n is the number of nodes in the list.Examples: " }, { "code": null, ...
Set the base time zone offset to GMT in Java
In order to set the base time zone to GMT in Java, we use the setRawOffset(int offsetMillis) method. The java.util.TimeZone.setRawOffset(int offsetMillis) method set the base timezone offset to GMT. Declaration − The java.util.TimeZone.setRawOffset(int offsetMillis) method is declared as follows − public abstract void ...
[ { "code": null, "e": 1261, "s": 1062, "text": "In order to set the base time zone to GMT in Java, we use the setRawOffset(int offsetMillis) method. The java.util.TimeZone.setRawOffset(int offsetMillis) method set the base timezone offset to GMT." }, { "code": null, "e": 1361, "s": 12...
Unit Testing in Python using Unittest
In this article, we will learn about the fundamentals of software testing with the help of the unit test module available in Python 3.x. Or earlier. It allows automation, sharing of the setup and exit code for tests, and independent tests for every framework. In the unit tests, we use a wide variety of object-oriented ...
[ { "code": null, "e": 1322, "s": 1062, "text": "In this article, we will learn about the fundamentals of software testing with the help of the unit test module available in Python 3.x. Or earlier. It allows automation, sharing of the setup and exit code for tests, and independent tests for every fram...
Easy Fine-Tuning of Transformers for Named-Entity Recognition | by Lars Kjeldgaard | Towards Data Science
In this article, we will go through how to easily fine-tune any pretrained Natural Language Processing (=NLP) transformer for Named-Entity Recognition (=NER) in any language. Why should you care? Well, NER is a powerful NLP task with many applications, as has been thoroughly described on Towards Data Science. However, ...
[ { "code": null, "e": 347, "s": 172, "text": "In this article, we will go through how to easily fine-tune any pretrained Natural Language Processing (=NLP) transformer for Named-Entity Recognition (=NER) in any language." }, { "code": null, "e": 691, "s": 347, "text": "Why should ...
How To Host Your Own Python Models | by Emmett Boudreau | Towards Data Science
Under the topic of deployment with machine-learning, there are a lot of things to consider and a lot of different options that will provide you with a different result. Firstly, there are a lot of standard VPS and semi-shared hosts that you could go with for deploying your models. These are usually not great options fo...
[ { "code": null, "e": 1005, "s": 172, "text": "Under the topic of deployment with machine-learning, there are a lot of things to consider and a lot of different options that will provide you with a different result. Firstly, there are a lot of standard VPS and semi-shared hosts that you could go with...
How can I make a time delay in Python?
In order to introduce delay of definite interval, we can use sleep() function that is available in time module of Standard Python library. The sleep() function takes an integer number corresponding to seconds as an argument. time.sleep(sec) In following example, current time is first displayed and then the execution is...
[ { "code": null, "e": 1287, "s": 1062, "text": "In order to introduce delay of definite interval, we can use sleep() function that is available in time module of Standard Python library. The sleep() function takes an integer number corresponding to seconds as an argument." }, { "code": null, ...
Python 3 - String isspace() Method
The isspace() method checks whether the string consists of whitespace. Following is the syntax for isspace() method − str.isspace() NA This method returns true if there are only whitespace characters in the string and there is at least one character, false otherwise. The following example shows the usage of isspace() ...
[ { "code": null, "e": 2411, "s": 2340, "text": "The isspace() method checks whether the string consists of whitespace." }, { "code": null, "e": 2458, "s": 2411, "text": "Following is the syntax for isspace() method −" }, { "code": null, "e": 2473, "s": 2458, "t...
DateTime.SpecifyKind() Method in C# - GeeksforGeeks
06 Feb, 2019 This method is used to create a new DateTime object which has the same number of ticks as the specified DateTime but is designated as either local time, Coordinated Universal Time (UTC), or neither, as indicated by the specified DateTimeKind value. Syntax: public static DateTime SpecifyKind (DateTime value...
[ { "code": null, "e": 24302, "s": 24274, "text": "\n06 Feb, 2019" }, { "code": null, "e": 24551, "s": 24302, "text": "This method is used to create a new DateTime object which has the same number of ticks as the specified DateTime but is designated as either local time, Coordinate...
Machine Learning Basics: Polynomial Regression | by Gurucharan M K | Towards Data Science
In previous stories, I have given a brief of Linear Regression and showed how to perform Simple and Multiple Linear Regression. In this article, we will go through the program for building a Polynomial Regression model based on the non-linear data. In the previous examples of Linear Regression, when the data is plotted...
[ { "code": null, "e": 420, "s": 171, "text": "In previous stories, I have given a brief of Linear Regression and showed how to perform Simple and Multiple Linear Regression. In this article, we will go through the program for building a Polynomial Regression model based on the non-linear data." }, ...
D3.js transform.scale() Function - GeeksforGeeks
15 Oct, 2020 The transform.scale() function in D3.js library is used to get the transformation whose scale k1 is equal to k0k, where k0 is the transform’s scale. Syntax: transform.scale(k) Parameters: This function accepts a single parameter as mentioned above and described below. k: This parameter is the scale argum...
[ { "code": null, "e": 25300, "s": 25272, "text": "\n15 Oct, 2020" }, { "code": null, "e": 25449, "s": 25300, "text": "The transform.scale() function in D3.js library is used to get the transformation whose scale k1 is equal to k0k, where k0 is the transform’s scale." }, { ...
HTML DOM appendChild() Method
The HTML DOM appendChild() method is used to create and add a text node at the end of the list of child nodes. The appendChild() method can also be used to move an element from current position to a new position. Using appendChild() you can add new values to a list and can even add a new paragraph under another paragra...
[ { "code": null, "e": 1386, "s": 1062, "text": "The HTML DOM appendChild() method is used to create and add a text node at the end of the list of child nodes. The appendChild() method can also be used to move an element from current position to a new position. Using appendChild() you can add new valu...
Get the items which are not common of two Pandas series - GeeksforGeeks
01 Aug, 2020 Pandas does not support specific methods to perform set operations. However, we can use the following formula to get unique items from both the sets : Algorithm : Import the Pandas and NumPy modules.Create 2 Pandas Series.Find the union of the series using the union1d() method.Find the intersection of the ...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n01 Aug, 2020" }, { "code": null, "e": 24443, "s": 24292, "text": "Pandas does not support specific methods to perform set operations. However, we can use the following formula to get unique items from both the sets :" }, { ...
C library function - puts()
The C library function int puts(const char *str) writes a string to stdout up to but not including the null character. A newline character is appended to the output. Following is the declaration for puts() function. int puts(const char *str) str − This is the C string to be written. str − This is the C string to be wri...
[ { "code": null, "e": 2173, "s": 2007, "text": "The C library function int puts(const char *str) writes a string to stdout up to but not including the null character. A newline character is appended to the output." }, { "code": null, "e": 2223, "s": 2173, "text": "Following is the...
C# program to replace n-th character from a given index in a string
Firstly, set a string. string str1 = "Port"; Console.WriteLine("Original String: "+str1); Now convert the string into character array. char[] ch = str1.ToCharArray(); Set the character you want to replace with the index of the location. To set a character at position 3rd. ch[2] = 'F'; To remove nth character from a str...
[ { "code": null, "e": 1085, "s": 1062, "text": "Firstly, set a string." }, { "code": null, "e": 1152, "s": 1085, "text": "string str1 = \"Port\";\nConsole.WriteLine(\"Original String: \"+str1);" }, { "code": null, "e": 1197, "s": 1152, "text": "Now convert the ...
Count of sub-strings of length n possible from the given string - GeeksforGeeks
07 May, 2021 Given a string str and an integer N, the task is to find the number of possible sub-strings of length N.Examples: Input: str = “geeksforgeeks”, n = 5 Output: 9 All possible sub-strings of length 5 are “geeks”, “eeksf”, “eksfo”, “ksfor”, “sforg”, “forge”, “orgee”, “rgeek” and “geeks”.Input: str = “jgec”, ...
[ { "code": null, "e": 24528, "s": 24500, "text": "\n07 May, 2021" }, { "code": null, "e": 24644, "s": 24528, "text": "Given a string str and an integer N, the task is to find the number of possible sub-strings of length N.Examples: " }, { "code": null, "e": 24853, ...
Java Online Compiler (Editor / Interpreter)
With our online Java compiler, you can edit Java code, and view the result in your browser. public class Main { public static void main(String[] args) { System.out.println("Hello World!"); } } Click on the "Try it Yourself" button to see how it works. The window to the left is editable - edit the code and clic...
[ { "code": null, "e": 92, "s": 0, "text": "With our online Java compiler, you can edit Java code, and view the result in your browser." }, { "code": null, "e": 202, "s": 92, "text": "public class Main {\n public static void main(String[] args) {\n System.out.println(\"Hello Wo...
Character Class in Java - GeeksforGeeks
14 Feb, 2022 Java provides a wrapper class Character in java.lang package. An object of type Character contains a single field, whose type is char. The Character class offers a number of useful class (i.e., static) methods for manipulating characters. You can create a Character object with the Character constructor. Cr...
[ { "code": null, "e": 23040, "s": 23012, "text": "\n14 Feb, 2022" }, { "code": null, "e": 23345, "s": 23040, "text": "Java provides a wrapper class Character in java.lang package. An object of type Character contains a single field, whose type is char. The Character class offers a...
How to set the unit length of an axis in Matplotlib?
To set the unit length of an axis in Matplotlib, we can use xlim or ylim with scale factor of the axes, i.e., of unit length times. Set the figure size and adjust the padding between and around the subplots. Set the figure size and adjust the padding between and around the subplots. Create x and y data points using num...
[ { "code": null, "e": 1194, "s": 1062, "text": "To set the unit length of an axis in Matplotlib, we can use xlim or ylim with scale factor of the axes, i.e., of unit length times." }, { "code": null, "e": 1270, "s": 1194, "text": "Set the figure size and adjust the padding between...
C++ Program to Find Minimum Element in an Array using Linear Search
This is a C++ Program to find the minimum element of an array using Linear Search approach. The time complexity of this program is O(n). Begin Assign the data element to an array. Assign the value at ‘0’ index to minimum variable. Compare minimum with other data element sequentially. Swap values if minimum ...
[ { "code": null, "e": 1199, "s": 1062, "text": "This is a C++ Program to find the minimum element of an array using Linear Search approach. The time complexity of this program is O(n)." }, { "code": null, "e": 1482, "s": 1199, "text": "Begin\n Assign the data element to an array...
NumPy - Statistical Functions
NumPy has quite a few useful statistical functions for finding minimum, maximum, percentile standard deviation and variance, etc. from the given elements in the array. The functions are explained as follows − These functions return the minimum and the maximum from the elements in the given array along the specified axi...
[ { "code": null, "e": 2452, "s": 2243, "text": "NumPy has quite a few useful statistical functions for finding minimum, maximum, percentile standard deviation and variance, etc. from the given elements in the array. The functions are explained as follows −" }, { "code": null, "e": 2566, ...
How to group data with Angular filter ?
29 Jul, 2020 The task is to show how to group-data with an Angular-filter. Steps involved: 1. You can install angular-filter using these four different methods: Clone & build https://github.com/a8m/angular-filter git repository Via Bower: by running $ bower install angular-filter from your terminal Via npm: by running ...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Jul, 2020" }, { "code": null, "e": 90, "s": 28, "text": "The task is to show how to group-data with an Angular-filter." }, { "code": null, "e": 106, "s": 90, "text": "Steps involved:" }, { "code": null, ...
Python | Check for None values in given dictionary
11 Jul, 2019 Many times, while working with dictionaries, we wish to check for a non-null dictionary, i.e check for None values in given dictionary. This finds application in Machine Learning in which we have to feed data with no none values. Let’s discuss certain ways in which this task can be performed. Method #1 : U...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Jul, 2019" }, { "code": null, "e": 322, "s": 28, "text": "Many times, while working with dictionaries, we wish to check for a non-null dictionary, i.e check for None values in given dictionary. This finds application in Machine Learn...
Python time asctime() Method
Pythom time method asctime() converts a tuple or struct_time representing a time as returned by gmtime() or localtime() to a 24-character string of the following form: 'Tue Feb 17 23:21:05 2009'. Following is the syntax for asctime() method − time.asctime([t])) t − This is a tuple of 9 elements or struct_time represen...
[ { "code": null, "e": 2574, "s": 2378, "text": "Pythom time method asctime() converts a tuple or struct_time representing a time as returned by gmtime() or localtime() to a 24-character string of the following form: 'Tue Feb 17 23:21:05 2009'." }, { "code": null, "e": 2621, "s": 2574,...
Python | Ways to remove n characters from start of given string
07 Jun, 2019 Given a string and a number ‘n’, the task is to remove a string of length ‘n’ from the start of the string. Let’s a few methods to solve the given task.Method #1: Using Naive Method # Python3 code to demonstrate # how to remove 'n' characters from starting# of a string # Initialising stringini_string1 = '...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Jun, 2019" }, { "code": null, "e": 210, "s": 28, "text": "Given a string and a number ‘n’, the task is to remove a string of length ‘n’ from the start of the string. Let’s a few methods to solve the given task.Method #1: Using Naive ...
What is contextual selector in CSS ?
21 Nov, 2021 In this article, we will learn about the contextual selector in CSS & understand the declaration syntax with the help of code examples.A contextual selector is defined as a selector which considers the context where the style is to be applied. In simple words, the specified style is applied to an element o...
[ { "code": null, "e": 53, "s": 25, "text": "\n21 Nov, 2021" }, { "code": null, "e": 695, "s": 53, "text": "In this article, we will learn about the contextual selector in CSS & understand the declaration syntax with the help of code examples.A contextual selector is defined as a s...
How to prevent Body from scrolling when a modal is opened using jQuery ?
12 Jan, 2021 Given an HTML document with a modal, the task is to prevent the body element from scrolling whenever the modal is in an open state. This task can be easily accomplished using JavaScript. Approach: A simple solution to this problem is to set the value of the “overflow” property of the body element to “hidde...
[ { "code": null, "e": 52, "s": 24, "text": "\n12 Jan, 2021" }, { "code": null, "e": 239, "s": 52, "text": "Given an HTML document with a modal, the task is to prevent the body element from scrolling whenever the modal is in an open state. This task can be easily accomplished using...
How to Install Solidity in Windows?
11 May, 2022 To install solidity on windows ensure that you are using windows 10, as only windows 10 provides built-in Linux Subsystem. With the help of this feature, we can run the Ubuntu terminal on the Windows machine. Below are the steps to setup Solidity on windows: Step 1: Open control panel on your system and to...
[ { "code": null, "e": 52, "s": 24, "text": "\n11 May, 2022" }, { "code": null, "e": 311, "s": 52, "text": "To install solidity on windows ensure that you are using windows 10, as only windows 10 provides built-in Linux Subsystem. With the help of this feature, we can run the Ubunt...
Int32.MinValue Field in C# with Examples
08 Apr, 2019 The MinValue property or Field of Int32 Struct is used to represent the minimum possible value of Int32. The value of this field is constant means that a user cannot change the value of this field. The value of this field is -2,147,483,648. Its hexadecimal value is 0x80000000. Syntax: public const int MinV...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Apr, 2019" }, { "code": null, "e": 306, "s": 28, "text": "The MinValue property or Field of Int32 Struct is used to represent the minimum possible value of Int32. The value of this field is constant means that a user cannot change th...
Encoding Methods in Genetic Algorithm
29 Nov, 2021 Chromosome : All living organisms consists of cells. In each cell there is a same set of Chromosomes. Chromosomes are strings of DNA and consists of genes, blocks of DNA. Each gene encodes a trait, for example color of eyes. Reproduction : During reproduction, combination (or crossover) occurs first. Genes...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Nov, 2021" }, { "code": null, "e": 593, "s": 28, "text": "Chromosome : All living organisms consists of cells. In each cell there is a same set of Chromosomes. Chromosomes are strings of DNA and consists of genes, blocks of DNA. Each...
Period between() method in Java with Examples
27 Nov, 2018 The between() method of Period class in Java is used to obtain a period consisting of the number of years, months, and days between two given dates (including start date and excluding end date). This period is obtained as follows: Remove complete months. Now, calculate the remaining number of days. Then, a...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Nov, 2018" }, { "code": null, "e": 223, "s": 28, "text": "The between() method of Period class in Java is used to obtain a period consisting of the number of years, months, and days between two given dates (including start date and e...
Fixed-priority pre-emptive scheduling
16 Apr, 2020 Prerequisite – CPU Scheduling in Operating SystemsFixed priority pre-emptive scheduling algorithm is mostly used in real time systems.In this scheduling algorithm the processor make sure that the highest priority task is to be performed first ignoring the other task to be executed. The process having highe...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Apr, 2020" }, { "code": null, "e": 311, "s": 28, "text": "Prerequisite – CPU Scheduling in Operating SystemsFixed priority pre-emptive scheduling algorithm is mostly used in real time systems.In this scheduling algorithm the processo...