title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
malloc() vs new - GeeksforGeeks
08 Jul, 2021 Following are the differences between malloc() and operator new.: Calling Constructors: new calls constructors, while malloc() does not. In fact primitive data types (char, int, float.. etc) can also be initialized with new. For example, below program prints 10. Calling Constructors: new calls constructor...
[ { "code": null, "e": 25707, "s": 25679, "text": "\n08 Jul, 2021" }, { "code": null, "e": 25774, "s": 25707, "text": "Following are the differences between malloc() and operator new.: " }, { "code": null, "e": 25971, "s": 25774, "text": "Calling Constructors: n...
How to create an array with random values with the help of JavaScript ? - GeeksforGeeks
31 Dec, 2019 The task is to generate an array with random values with the help of JavaScript. There are two approaches which are discussed below: Approach 1: Use Math.random() and Math.floor() method to get the random values. Push the values one by one in the array (But this approach may generate repeated values). Exam...
[ { "code": null, "e": 26083, "s": 26055, "text": "\n31 Dec, 2019" }, { "code": null, "e": 26216, "s": 26083, "text": "The task is to generate an array with random values with the help of JavaScript. There are two approaches which are discussed below:" }, { "code": null, ...
Python - Union of Tuples - GeeksforGeeks
30 Jan, 2020 Sometimes, while working with tuples, we can have a problem in which we need union of two records. This type of application can come in Data Science domain. Let’s discuss certain ways in which this problem can be solved. Method #1 : Using set() + “+” operator This task can be performed using union function...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n30 Jan, 2020" }, { "code": null, "e": 25758, "s": 25537, "text": "Sometimes, while working with tuples, we can have a problem in which we need union of two records. This type of application can come in Data Science domain. Let’s ...
Puzzle | (Basketball shots) - GeeksforGeeks
26 Jul, 2017 You have a basketball hoop and someone says that you can play one of two games.Game1 : You get one shot to make the hoop.Game2 : You get three shots and you have to make two of three shots.If p is the probability of making a particular shot, for which values of p should you pick one game or the other? Answ...
[ { "code": null, "e": 25687, "s": 25659, "text": "\n26 Jul, 2017" }, { "code": null, "e": 25990, "s": 25687, "text": "You have a basketball hoop and someone says that you can play one of two games.Game1 : You get one shot to make the hoop.Game2 : You get three shots and you have t...
MO's Algorithm (Query Square Root Decomposition) | Set 1 (Introduction) - GeeksforGeeks
30 Mar, 2022 Let us consider the following problem to understand MO’s Algorithm.We are given an array and a set of query ranges, we are required to find the sum of every query range. Example: Input: arr[] = {1, 1, 2, 1, 3, 4, 5, 2, 8}; query[] = [0, 4], [1, 3] [2, 4] Output: Sum of arr[] elements in range [...
[ { "code": null, "e": 25959, "s": 25931, "text": "\n30 Mar, 2022" }, { "code": null, "e": 26129, "s": 25959, "text": "Let us consider the following problem to understand MO’s Algorithm.We are given an array and a set of query ranges, we are required to find the sum of every query ...
Difference between preventDefault() and stopPropagation() methods in JavaScript
04 Apr, 2022 In this article, we will be discussing the PreventDefault & stopPropagation methods with suitable code examples for each condition & then we will see the difference between the PreventDefault vs stopPropagation. preventDefault() Method: It is a method present in the event interface. This method prevents th...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Apr, 2022" }, { "code": null, "e": 240, "s": 28, "text": "In this article, we will be discussing the PreventDefault & stopPropagation methods with suitable code examples for each condition & then we will see the difference between th...
Python | Split strings in list with same prefix in all elements
25 Apr, 2019 Sometimes we face a problem in which we have a list of strings and there are some garbage/unwanted letters at its prefix or suffix or at the specified position uniformly, i.e this extends to all the strings in the list. Let’s discuss certain ways in which this problem can be solved. Method #1 : Using list ...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Apr, 2019" }, { "code": null, "e": 312, "s": 28, "text": "Sometimes we face a problem in which we have a list of strings and there are some garbage/unwanted letters at its prefix or suffix or at the specified position uniformly, i.e ...
Represent Tree using graphics in C/C++
05 May, 2021 Prerequisite: graphics.h, How to include graphics.h? In C/C++ there is graphics.h header file which is used to create the object like line, circle, etc. Given an array arr[] of N integers, the task is to write C++ program to create the Tree using graphics.h. Approach: To run the program we have the includ...
[ { "code": null, "e": 52, "s": 24, "text": "\n05 May, 2021" }, { "code": null, "e": 106, "s": 52, "text": "Prerequisite: graphics.h, How to include graphics.h? " }, { "code": null, "e": 312, "s": 106, "text": "In C/C++ there is graphics.h header file which is u...
Print level order traversal line by line | Set 1
24 Jun, 2022 Given a binary tree, print level order traversal in a way that nodes of all levels are printed in separate lines.For example consider the following tree Example 1: Output for above tree should be 20 8 22 4 12 10 14 Example 2: 1 / \ 2 3 / \ \ 4 5 ...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 Jun, 2022" }, { "code": null, "e": 207, "s": 52, "text": "Given a binary tree, print level order traversal in a way that nodes of all levels are printed in separate lines.For example consider the following tree " }, { "code...
Overview of Scaling: Vertical And Horizontal Scaling
06 Aug, 2020 Given architecture is an example of a client-server based system. In this, there is a client who sends requests to the server and then the client receives a response from the server accordingly but when the number of users/clients increases, the load on the server increases enormously which makes it diffic...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 Aug, 2020" }, { "code": null, "e": 596, "s": 54, "text": "Given architecture is an example of a client-server based system. In this, there is a client who sends requests to the server and then the client receives a response from the...
Matplotlib.pyplot.set_cmap() in Python
19 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, etc. Th...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Apr, 2020" }, { "code": null, "e": 333, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MAT...
Netcracker Interview Experience
22 Feb, 2021 Round 1: The first round was an aptitude and coding test, an aptitude round quantitative aptitude, logical reasoning, and technical questions were asked. They were more intuitive. They were not very difficult but were very tricky. Suggestion: Practice aptitude to gain confidence, accuracy, and speed. There...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Feb, 2021" }, { "code": null, "e": 259, "s": 28, "text": "Round 1: The first round was an aptitude and coding test, an aptitude round quantitative aptitude, logical reasoning, and technical questions were asked. They were more intuit...
Sorting 2D Vector in C++ | Set 1 (By row and column)
18 Jan, 2022 A 2D vector is a vector of vectors. In C++, 2D vectors are used for creating matrices, tables, or any other structures, dynamically. Basically, It is a matrix implemented with the help of vectors. They are created using the <vector> header file. Following is a program to demonstrate 2D vectors in C++: CPP ...
[ { "code": null, "e": 54, "s": 26, "text": "\n18 Jan, 2022" }, { "code": null, "e": 300, "s": 54, "text": "A 2D vector is a vector of vectors. In C++, 2D vectors are used for creating matrices, tables, or any other structures, dynamically. Basically, It is a matrix implemented wit...
TypeScript | Array push() Method
18 Jun, 2020 The Array.push() is an inbuilt TypeScript function which is used to append the given element(s) in the last of the array and returns the length of the new array. Syntax: array.push(element1, ..., elementN) Parameter: This method accept a single parameter as mentioned above and described below: element1, ....
[ { "code": null, "e": 53, "s": 25, "text": "\n18 Jun, 2020" }, { "code": null, "e": 223, "s": 53, "text": "The Array.push() is an inbuilt TypeScript function which is used to append the given element(s) in the last of the array and returns the length of the new array. Syntax:" }...
Interview Preparation for Software Developer - GeeksforGeeks
28 Jun, 2021 Most Important ones Interview Preparation Course (Free) How to prepare for ACM-ICPC Internship Interview Experiences Company-Wise How to prepare for Google Kickstart – a CodeJam competition? How to prepare for Facebook Hacker Cup? A step by step guide for placement preparation Set 1 – Basic A step by step ...
[ { "code": null, "e": 29577, "s": 29549, "text": "\n28 Jun, 2021" }, { "code": null, "e": 29597, "s": 29577, "text": "Most Important ones" }, { "code": null, "e": 29633, "s": 29597, "text": "Interview Preparation Course (Free)" }, { "code": null, "e...
PriorityQueue toArray() Method in Java
10 Dec, 2018 The java.util.PriorityQueue.toArray() method in Java is used to form an array of the same elements as that of the Priority Queue. Basically, it copies all the element from a priority queue to a new array.Syntax:Object[] arr = Priority_Queue.toArray()Parameters: The method does not take any parameters.Retur...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Dec, 2018" }, { "code": null, "e": 4385, "s": 52, "text": "The java.util.PriorityQueue.toArray() method in Java is used to form an array of the same elements as that of the Priority Queue. Basically, it copies all the element from a...
Maximum size square sub-matrix with all 1s
25 Jun, 2022 Given a binary matrix, find out the maximum size square sub-matrix with all 1s. For example, consider the below binary matrix. Algorithm: Let the given binary matrix be M[R][C]. The idea of the algorithm is to construct an auxiliary size matrix S[][] in which each entry S[i][j] represents the size of the...
[ { "code": null, "e": 54, "s": 26, "text": "\n25 Jun, 2022" }, { "code": null, "e": 135, "s": 54, "text": "Given a binary matrix, find out the maximum size square sub-matrix with all 1s. " }, { "code": null, "e": 183, "s": 135, "text": "For example, consider th...
JavaScript Comma operator
06 Jan, 2022 Below is the example of the Comma operator. Example:<script> function x() { document.write('one'+"</br>"); return 'one'; } function y() { document.write('two'+"</br>"); return 'two'; } function z() { document.write('three'+"</br>"); return...
[ { "code": null, "e": 53, "s": 25, "text": "\n06 Jan, 2022" }, { "code": null, "e": 97, "s": 53, "text": "Below is the example of the Comma operator." }, { "code": null, "e": 498, "s": 97, "text": "Example:<script> function x() { document.write('one...
Introduction to Excel Spreadsheet
26 Sep, 2021 A spreadsheet is a computer application that is designed to add, display, analyze, organize, and manipulate data arranged in rows and columns. It is the most popular application for accounting, analytics, data presentation, etc. Or in other words, spreadsheets are scalable grid-based files that are used to...
[ { "code": null, "e": 53, "s": 25, "text": "\n26 Sep, 2021" }, { "code": null, "e": 978, "s": 53, "text": "A spreadsheet is a computer application that is designed to add, display, analyze, organize, and manipulate data arranged in rows and columns. It is the most popular applicat...
Python | Text Summarizer
27 Feb, 2020 Today various organizations, be it online shopping, government and private sector organizations, catering and tourism industry or other institutions that offer customer services are concerned about their customers and ask for feedback every single time we use their services. Consider the fact, that these c...
[ { "code": null, "e": 54, "s": 26, "text": "\n27 Feb, 2020" }, { "code": null, "e": 1147, "s": 54, "text": "Today various organizations, be it online shopping, government and private sector organizations, catering and tourism industry or other institutions that offer customer serv...
How to Run Multiple Versions of Node.js ?
17 Aug, 2021 Usually, we work on different versions for our Node.js project and it’s hard to manage them, but fortunately, there is a tool called NVM(node version manager) which helps to manage your node version and switch between them according to your projects. Install NVM Module: You can install the nvm module using...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Aug, 2021" }, { "code": null, "e": 279, "s": 28, "text": "Usually, we work on different versions for our Node.js project and it’s hard to manage them, but fortunately, there is a tool called NVM(node version manager) which helps to m...
Python Program to Generate Random binary string
08 Oct, 2021 Given a number n, the task is to generate a random binary string of length n.Examples: Input: 7 Output: Desired length random binary string is: 1000001 Input: 5 Output: Desired length random binary string is: 01001 Approach Initialize an empty string, say key Generate a randomly either “0” or “1” usin...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Oct, 2021" }, { "code": null, "e": 116, "s": 28, "text": "Given a number n, the task is to generate a random binary string of length n.Examples: " }, { "code": null, "e": 247, "s": 116, "text": "Input: 7\nOutput: ...
DorkScout – Automate google dork scan against the entiere internet or specific targets
23 Sep, 2021 Dorking is the technique used for advanced searching. Dorking can be useful in target domain detection or forgetting some sensitive data from the target domain, This can be done through automated tools which can reduce the time of manual searching. DorkScout is a tool to automate the finding of vulnerable ...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Sep, 2021" }, { "code": null, "e": 713, "s": 28, "text": "Dorking is the technique used for advanced searching. Dorking can be useful in target domain detection or forgetting some sensitive data from the target domain, This can be do...
How to highlight text based on user input with React.js ? - GeeksforGeeks
12 Mar, 2021 The following approach covers how to highlight text input given by users in ReactJS. It is a simple effect you can add to any ReactJS website. Prerequisite: Basic knowledge of npm & create-react-app command. Basic knowledge of styled-components. Knowledge of useState() React hooks. Knowledge of onChange() ...
[ { "code": null, "e": 24423, "s": 24395, "text": "\n12 Mar, 2021" }, { "code": null, "e": 24566, "s": 24423, "text": "The following approach covers how to highlight text input given by users in ReactJS. It is a simple effect you can add to any ReactJS website." }, { "code"...
Wait for user input to start a sketch in Arduino
A problem faced by several people using Arduino, or any microcontroller board for that matter, is that you may forget to start the Serial Monitor before programming the board, and miss some print statements by the time you open the Serial Monitor. One way to overcome this is to start the sketch only after an input is r...
[ { "code": null, "e": 1310, "s": 1062, "text": "A problem faced by several people using Arduino, or any microcontroller board for that matter, is that you may forget to start the Serial Monitor before programming the board, and miss some print statements by the time you open the Serial Monitor." },...
Retrieving specific documents from collection by _id in MongoDB
To retrieve document from collection by _id, use find() with $in. Let us create a collection with documents − > db.demo281.insertOne({"Name":"Chris","Age":21}); { "acknowledged" : true, "insertedId" : ObjectId("5e4aac28dd099650a5401a66") } > db.demo281.insertOne({"Name":"Bob","Age":23}); { "acknowledged" : tru...
[ { "code": null, "e": 1172, "s": 1062, "text": "To retrieve document from collection by _id, use find() with $in. Let us create a collection with documents −" }, { "code": null, "e": 1578, "s": 1172, "text": "> db.demo281.insertOne({\"Name\":\"Chris\",\"Age\":21});\n{\n \"acknow...
How to call JavaScript function in an alert box?
To call a JavaScript function in an alert box, you can try to run the following code − Live Demo <!DOCTYPE html> <html> <body> <script> function myFunction(warning) { alert(warning); catchedAlert(); } function catchedAlert() { alert('Alert called!'...
[ { "code": null, "e": 1149, "s": 1062, "text": "To call a JavaScript function in an alert box, you can try to run the following code −" }, { "code": null, "e": 1159, "s": 1149, "text": "Live Demo" }, { "code": null, "e": 1510, "s": 1159, "text": "<!DOCTYPE html...
C# | Char.Equals() Method - GeeksforGeeks
01 Feb, 2019 In C#, Char.Equals() is a System.Char struct method which is used to return a value by checking whether current instance is equal to a specified object or Char value. This method can be overloaded by passing different type of arguments to it. Char.Equals(Char) MethodChar.Equals(Object) Method Char.Equals(C...
[ { "code": null, "e": 23952, "s": 23924, "text": "\n01 Feb, 2019" }, { "code": null, "e": 24195, "s": 23952, "text": "In C#, Char.Equals() is a System.Char struct method which is used to return a value by checking whether current instance is equal to a specified object or Char val...
Examples of Big-O analysis - GeeksforGeeks
20 Jan, 2022 Prerequisite: Analysis of Algorithms | Big-O analysis In the previous article, the analysis of the algorithm using Big O asymptotic notation is discussed. In this article, some examples are discussed to illustrate the Big O time complexity notation and also learn how to compute the time complexity of any p...
[ { "code": null, "e": 24653, "s": 24625, "text": "\n20 Jan, 2022" }, { "code": null, "e": 24707, "s": 24653, "text": "Prerequisite: Analysis of Algorithms | Big-O analysis" }, { "code": null, "e": 24968, "s": 24707, "text": "In the previous article, the analysi...
An Extensive Step by Step Guide to Exploratory Data Analysis | by Terence Shin | Towards Data Science
Be sure to subscribe here or to my exclusive newsletter to never miss another article on data science guides, tricks and tips, life lessons, and more! Exploratory Data Analysis (EDA), also known as Data Exploration, is a step in the Data Analysis Process, where a number of techniques are used to better understand the d...
[ { "code": null, "e": 323, "s": 172, "text": "Be sure to subscribe here or to my exclusive newsletter to never miss another article on data science guides, tricks and tips, life lessons, and more!" }, { "code": null, "e": 511, "s": 323, "text": "Exploratory Data Analysis (EDA), al...
How to check whether a passed string is palindrome or not in JavaScript ?
23 Jun, 2022 Given a string, our task is to find string is palindrome or not. Example: Input : "race" Output : passed string is not a palindrome Explanation : if we write "race" in reverse that is "ecer" it not matches with first string so it is not a palindrome. Example 2: Input : "hellolleh" Output : passed string i...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Jun, 2022" }, { "code": null, "e": 93, "s": 28, "text": "Given a string, our task is to find string is palindrome or not." }, { "code": null, "e": 349, "s": 93, "text": "Example:\nInput : \"race\"\nOutput : passed...
LRU Approximation (Second Chance Algorithm)
30 Apr, 2019 If you are not familiar with Least Recently Used Algorithm, check Least Recently Used Algorithm(Page Replacement) This algorithm is a combination of using a queue, similar to FIFO (FIFO (Page Replacement)) alongside using an array to keep track of the bits used to give the queued page a “second chance”.How...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Apr, 2019" }, { "code": null, "e": 142, "s": 28, "text": "If you are not familiar with Least Recently Used Algorithm, check Least Recently Used Algorithm(Page Replacement)" }, { "code": null, "e": 361, "s": 142, "...
ML | Kaggle Breast Cancer Wisconsin Diagnosis using KNN and Cross Validation
21 Aug, 2020 Dataset :It is given by Kaggle from UCI Machine Learning Repository, in one of its challenges.https://www.kaggle.com/uciml/breast-cancer-wisconsin-data. It is a dataset of Breast Cancer patients with Malignant and Benign tumor.K-nearest neighbour algorithm is used to predict whether is patient is having ca...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Aug, 2020" }, { "code": null, "e": 383, "s": 28, "text": "Dataset :It is given by Kaggle from UCI Machine Learning Repository, in one of its challenges.https://www.kaggle.com/uciml/breast-cancer-wisconsin-data. It is a dataset of Bre...
Different Ways to Convert Char Array to String in C#
28 May, 2020 We have given a character array arr and the task is to convert char array to string str in C#. Input: arr = [s, t, r, i, n, g] Output: string Input: arr = [G, e, e, k, s, F, o, r, G, e, e, k, s] Output: GeeksForGeeks In order to do this task, we have the following methods: Using string() Method: The...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 May, 2020" }, { "code": null, "e": 148, "s": 52, "text": "We have given a character array arr and the task is to convert char array to string str in C#. " }, { "code": null, "e": 276, "s": 148, "text": "Input: ar...
Python Program for BogoSort or Permutation Sort
08 Jun, 2021 BogoSort also known as permutation sort, stupid sort, slow sort, shotgun sort or monkey sort is a particularly ineffective algorithm based on generate and test paradigm. The algorithm successively generates permutations of its input until it finds one that is sorted.(Wiki) For example, if bogosort is used ...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Jun, 2021" }, { "code": null, "e": 554, "s": 28, "text": "BogoSort also known as permutation sort, stupid sort, slow sort, shotgun sort or monkey sort is a particularly ineffective algorithm based on generate and test paradigm. The a...
Basic Slicing and Advanced Indexing in NumPy Python
05 Aug, 2021 Prerequisites : Numpy in Python IntroductionNumPy or Numeric Python is a package for computation on homogeneous n-dimensional arrays. In numpy dimensions are called as axes. Why do we need NumPy ? A question arises that why do we need NumPy when python lists are already there. The answer to it is we cannot...
[ { "code": null, "e": 54, "s": 26, "text": "\n05 Aug, 2021" }, { "code": null, "e": 228, "s": 54, "text": "Prerequisites : Numpy in Python IntroductionNumPy or Numeric Python is a package for computation on homogeneous n-dimensional arrays. In numpy dimensions are called as axes."...
N-Queen Problem | Practice | GeeksforGeeks
The n-queens puzzle is the problem of placing n queens on a (n×n) chessboard such that no two queens can attack each other. Given an integer n, find all distinct solutions to the n-queens puzzle. Each solution contains distinct board configurations of the n-queens’ placement, where the solutions are a permutation of [1...
[ { "code": null, "e": 751, "s": 238, "text": "The n-queens puzzle is the problem of placing n queens on a (n×n) chessboard such that no two queens can attack each other.\nGiven an integer n, find all distinct solutions to the n-queens puzzle. Each solution contains distinct board configurations of th...
Replace every element of the array by product of all other elements
12 May, 2021 Given an array of integers. Replace every element by the product of all other elements of the array.Examples: Input : arr[] = { 2, 3, 3, 5, 7 } Output : 315 210 210 126 90 Approach : First, take the product of all the element of the array. Now replace each element by the product divided by that elemen...
[ { "code": null, "e": 52, "s": 24, "text": "\n12 May, 2021" }, { "code": null, "e": 164, "s": 52, "text": "Given an array of integers. Replace every element by the product of all other elements of the array.Examples: " }, { "code": null, "e": 227, "s": 164, "t...
XML Parsing in Android using XmlPullParser
23 Feb, 2021 In android, the XMLPullParser interface provides the functionality to parse the XML files in android applications. The XMLPullParser is a simple and efficient parser method to parse the XML data when compared to other parser methods such as DOM Parser and SAX Parser. The XMLPullParser has a method next() t...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Feb, 2021" }, { "code": null, "e": 554, "s": 28, "text": "In android, the XMLPullParser interface provides the functionality to parse the XML files in android applications. The XMLPullParser is a simple and efficient parser method to...
numpy.flatnonzero() in Python
28 Nov, 2018 numpy.flatnonzero()function is used to Compute indices that are non-zero in the flattened version of arr. Syntax : numpy.flatnonzero(arr) Parameters :arr : [array_like] Input array. Return : ndarrayOutput array, containing the indices of the elements of arr.ravel() that are non-zero. Code #1 : Working # Py...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Nov, 2018" }, { "code": null, "e": 134, "s": 28, "text": "numpy.flatnonzero()function is used to Compute indices that are non-zero in the flattened version of arr." }, { "code": null, "e": 166, "s": 134, "text": "...
Difference between Direct and Immediate Addressing Modes
29 Jun, 2022 Prerequisite – Addressing Modes 1. Direct Addressing Mode: In direct addressing mode, the address field contains the address of the operand. Effective Address (EA) = address field of operand Example: Add the contents of register 1303 to the accumulator. Add (1303) Only a single memory reference is req...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Jun, 2022" }, { "code": null, "e": 61, "s": 28, "text": "Prerequisite – Addressing Modes " }, { "code": null, "e": 170, "s": 61, "text": "1. Direct Addressing Mode: In direct addressing mode, the address field con...
PyQt5 QDockWidget – Setting Floating Property
28 Jul, 2020 In this article, we will see how we can set floating property to the QDockWidget. QDockWidget provides the concept of dock widgets, also know as tool palettes or utility windows. Dock windows are secondary windows placed in the dock widget area around the central widget in a QMainWindow(original window). T...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jul, 2020" }, { "code": null, "e": 543, "s": 28, "text": "In this article, we will see how we can set floating property to the QDockWidget. QDockWidget provides the concept of dock widgets, also know as tool palettes or utility windo...
Non-Repeating Element | Practice | GeeksforGeeks
Find the first non-repeating element in a given array arr of N integers. Note: Array consists of only positive and negative integers and not zero. Example 1: Input : arr[] = {-1, 2, -1, 3, 2} Output : 3 Explanation: -1 and 2 are repeating whereas 3 is the only number occuring once. Hence, the output is 3. Example 2...
[ { "code": null, "e": 385, "s": 238, "text": "Find the first non-repeating element in a given array arr of N integers.\nNote: Array consists of only positive and negative integers and not zero." }, { "code": null, "e": 396, "s": 385, "text": "Example 1:" }, { "code": null,...
turtle.tilt() function in Python
26 Jul, 2020 The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses tkinter for the underlying graphics, it needs a version of Python installed with Tk support. This function is used to rotate the turtleshape by the angle from its current tilt-angle, ...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Jul, 2020" }, { "code": null, "e": 245, "s": 28, "text": "The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses tkinter for the underlying graphics, it needs a ver...
How to echo HTML in PHP ?
31 Jul, 2021 While making a web application with PHP, we often need to print or echo few results in form of HTML. We can do this task in many different ways. Some of methods are described here: Using echo or print: PHP echo or print can be used to display HTML markup, javascript, text or variables.Example 1: This examp...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Jul, 2021" }, { "code": null, "e": 209, "s": 28, "text": "While making a web application with PHP, we often need to print or echo few results in form of HTML. We can do this task in many different ways. Some of methods are described ...
Python Data Structures
19 May, 2022 Data Structures are a way of organizing data so that it can be accessed more efficiently depending upon the situation. Data Structures are fundamentals of any programming language around which a program is built. Python helps to learn the fundamental of these data structures in a simpler way as compared to...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 May, 2022" }, { "code": null, "e": 389, "s": 52, "text": "Data Structures are a way of organizing data so that it can be accessed more efficiently depending upon the situation. Data Structures are fundamentals of any programming lan...
Python – Summation of Unique elements
27 Feb, 2020 This article focuses on one of the operation of getting the unique list from a list that contains a possible duplicates and performing its summation. This operations has large no. of applications and hence it’s knowledge is good to have. Method 1 : Naive method + sum()In naive method, we simply traverse th...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Feb, 2020" }, { "code": null, "e": 266, "s": 28, "text": "This article focuses on one of the operation of getting the unique list from a list that contains a possible duplicates and performing its summation. This operations has large...
How to customize Django forms using Django Widget Tweaks ?
04 Jan, 2021 Django forms are a great feature to create usable forms with just few lines of code. But Django doesn’t easily let us edit the form for good designs. Here, we will see one of the ways to customize Django forms, So they will look according to our wish on our HTML page. Basically we will check the methods to...
[ { "code": null, "e": 52, "s": 24, "text": "\n04 Jan, 2021" }, { "code": null, "e": 434, "s": 52, "text": "Django forms are a great feature to create usable forms with just few lines of code. But Django doesn’t easily let us edit the form for good designs. Here, we will see one of...
Unified Modeling Language (UML) | Object Diagrams
13 Feb, 2018 An Object Diagram can be referred to as a screenshot of the instances in a system and the relationship that exists between them. Since object diagrams depict behaviour when objects have been instantiated, we are able to study the behavior of the system at a particular instant. Object diagrams are vital to ...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Feb, 2018" }, { "code": null, "e": 602, "s": 52, "text": "An Object Diagram can be referred to as a screenshot of the instances in a system and the relationship that exists between them. Since object diagrams depict behaviour when o...
std::to_wstring in c++
14 Sep, 2021 This function is used to convert the numerical value to the wide string i.e. it parses a numerical value of datatypes (int, long long, float, double ) to a wide string. It returns a wide string of data type wstring representing the numerical value passed in the function. In this function data type is being...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Sep, 2021" }, { "code": null, "e": 556, "s": 28, "text": "This function is used to convert the numerical value to the wide string i.e. it parses a numerical value of datatypes (int, long long, float, double ) to a wide string. It ret...
How to Convert MySQL Table Field Type from BLOB to JSON?
16 Dec, 2021 In this article, we would be learning a MySQL query to convert a field of BLOB Data Type to JSON Data Type in a table. To execute this query, we would need to alter the table and subsequently the field’s definition. We would first need to use the ALTER TABLE command to start making changes to the table. AL...
[ { "code": null, "e": 54, "s": 26, "text": "\n16 Dec, 2021" }, { "code": null, "e": 359, "s": 54, "text": "In this article, we would be learning a MySQL query to convert a field of BLOB Data Type to JSON Data Type in a table. To execute this query, we would need to alter the table...
Find position of the given number among the numbers made of 4 and 7
08 Jun, 2022 Consider a series of numbers composed of only digits 4 and 7. The first few numbers in the series are 4, 7, 44, 47, 74, 77, 444, .. etc. Given a number constructed by 4, 7 digits only, we need to find the position of this number in this series.Examples: Input : 7 Output : pos = 2 Input : 444 Output : p...
[ { "code": null, "e": 54, "s": 26, "text": "\n08 Jun, 2022" }, { "code": null, "e": 310, "s": 54, "text": "Consider a series of numbers composed of only digits 4 and 7. The first few numbers in the series are 4, 7, 44, 47, 74, 77, 444, .. etc. Given a number constructed by 4, 7 di...
TIMESTAMPDIFF() function in MYSQL
30 Dec, 2020 TIMESTAMPDIFF() : This function in MySQL is used to return a value after subtracting a DateTime expression from another. Syntax : TIMESTAMPDIFF(unit,expr1,expr2) Parameters : It will accept three parameters. unit – It denotes the unit for the result. It can be one of the following.MICROSECOND, SECOND, MIN...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Dec, 2020" }, { "code": null, "e": 46, "s": 28, "text": "TIMESTAMPDIFF() :" }, { "code": null, "e": 149, "s": 46, "text": "This function in MySQL is used to return a value after subtracting a DateTime expression f...
HTML | <meta> http-equiv Attribute
06 Jun, 2022 The HTML <meta> http-equiv Attribute is used to provide header information or value of the content Attribute. It can be used to simulate an HTTP Header response. It can be used in meta Element.Syntax: <meta http-equiv="content-type | default-style | refresh"> Example: html <!DOCTYPE html><html> <head> ...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Jun, 2022" }, { "code": null, "e": 229, "s": 28, "text": "The HTML <meta> http-equiv Attribute is used to provide header information or value of the content Attribute. It can be used to simulate an HTTP Header response. It can be use...
Why 0.3 – 0.2 is not equal to 0.1 in Python?
26 Nov, 2020 In this article, we will see why 0.3 – 0.2 is not equal to 0.1 in Python. The reason behind it is called “precision”, and it’s due to the fact that computers do not compute in Decimal, but in Binary. Computers do not use a base 10 system, they use a base 2 system (also called Binary code). Below is the Imp...
[ { "code": null, "e": 54, "s": 26, "text": "\n26 Nov, 2020" }, { "code": null, "e": 345, "s": 54, "text": "In this article, we will see why 0.3 – 0.2 is not equal to 0.1 in Python. The reason behind it is called “precision”, and it’s due to the fact that computers do not compute i...
C program to perform intersection operation on two arrays
If array 1 = { 1,2,3,4,6} Array 2 = {1,2,5,6,7} Then, intersection of array1 and array 2 is Array1 ^ array 2 = {1,2,3,4,6} ^ {1,2,5,6,7} = {1,2,6} Set of common elements is called an intersection. The logic for intersection is as follows − k=0; for(i=0;i<size1;i++){ for(j=0;j<size2;j++){ if(...
[ { "code": null, "e": 1088, "s": 1062, "text": "If array 1 = { 1,2,3,4,6}" }, { "code": null, "e": 1112, "s": 1088, "text": " Array 2 = {1,2,5,6,7}" }, { "code": null, "e": 1156, "s": 1112, "text": "Then, intersection of array1 and array 2 is" }, { "co...
5 things that make my job as a Data Scientist easier | by Shree Vandana | Towards Data Science
Time Series Data Processing with Pandas Time Series Data Processing with Pandas If you work with time series data, chances are you have spent a significant amount of time accounting for missing records or aggregating data at a particular temporal granularity either via SQL queries or writing custom functions. Pandas ha...
[ { "code": null, "e": 211, "s": 171, "text": "Time Series Data Processing with Pandas" }, { "code": null, "e": 251, "s": 211, "text": "Time Series Data Processing with Pandas" }, { "code": null, "e": 655, "s": 251, "text": "If you work with time series data, ch...
Generating Python Scripts with OpenAi’s Github Copilot | by Lucas Soares | Towards Data Science
It’s been a while since I got access to the technical preview of OpenAi’s Github copilot. Since then, I kind of learned to enjoy asking it all sorts of questions in the form of function names and descriptions to see what kind of code it could come up with. In this article, I will share how I used the Github Copilot ext...
[ { "code": null, "e": 429, "s": 172, "text": "It’s been a while since I got access to the technical preview of OpenAi’s Github copilot. Since then, I kind of learned to enjoy asking it all sorts of questions in the form of function names and descriptions to see what kind of code it could come up with...
PySpark debugging — 6 common issues | by Maria Karanasou | Towards Data Science
Debugging a spark application can range from a fun to a very (and I mean very) frustrating experience. I’ve started gathering the issues I’ve come across from time to time to compile a list of the most common problems and their solutions. This is the first part of this list. I hope you find it useful and it saves you s...
[ { "code": null, "e": 275, "s": 172, "text": "Debugging a spark application can range from a fun to a very (and I mean very) frustrating experience." }, { "code": null, "e": 411, "s": 275, "text": "I’ve started gathering the issues I’ve come across from time to time to compile a l...
What is modulo % operator in Python?
The % symbol is defined in Python as modulo operator. It can also be called remainder operator. It returns remainder of division of two numeric operands (except complex numbers). >>> a=10 >>> b=3 >>> a%b 1 >>> a=12.25 >>> b=4 >>> a%b 0.25 >>> a=-10 >>> b=6 >>> a%b 2 >>> a=1.55 >>> b=0.05 >>> a%b 0.04999999999999996
[ { "code": null, "e": 1241, "s": 1062, "text": "The % symbol is defined in Python as modulo operator. It can also be called remainder operator. It returns remainder of division of two numeric operands (except complex numbers)." }, { "code": null, "e": 1379, "s": 1241, "text": ">>>...
losetup - Unix, Linux Command
losetup: set up and control loop devices. losetup loopdev losetup -l [-a] losetup -j file [-o offset] Detach a loop device: losetup -d loopdev... Detach all associated loop devices: losetup -D Print the name of the first unused loop device: losetup -...
[ { "code": null, "e": 10619, "s": 10577, "text": "losetup: set up and control loop devices." }, { "code": null, "e": 11096, "s": 10619, "text": " losetup loopdev\n\n losetup -l [-a]\n\n losetup -j file [-o offset]\n\n Detach a loop device:\n\n losetup -d loopdev...
Python - How to Group Pandas DataFrame by Days?
We will group Pandas DataFrame using the groupby(). Select the column to be used using the grouper function. We will group day-wise and calculate sum of Registration Price with day interval for our example shown below for Car Sale Records. Set the frequency as an interval of days in the groupby() grouper method, that m...
[ { "code": null, "e": 1302, "s": 1062, "text": "We will group Pandas DataFrame using the groupby(). Select the column to be used using the grouper function. We will group day-wise and calculate sum of Registration Price with day interval for our example shown below for Car Sale Records." }, { ...
Java - String matches() Method
This method tells whether or not this string matches the given regular expression. An invocation of this method of the form str.matches(regex) yields exactly the same result as the expression Pattern.matches(regex, str). Here is the syntax of this method − public boolean matches(String regex) Here is the detail of par...
[ { "code": null, "e": 2598, "s": 2377, "text": "This method tells whether or not this string matches the given regular expression. An invocation of this method of the form str.matches(regex) yields exactly the same result as the expression Pattern.matches(regex, str)." }, { "code": null, ...
Java - Arrays
Java provides a data structure, the array, which stores a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type. Instead of declaring individual variables, such as numb...
[ { "code": null, "e": 2642, "s": 2377, "text": "Java provides a data structure, the array, which stores a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the...
Image Classification using CNN. Classification of Marvel characters... | by Vishnu Bhaarath | Towards Data Science
Before diving in to the technicalities behind CNN let us talk about living beings . How do they recognize and perceive images. We see multiple images every second and we are able to process it and we are able to recognize it in the future. All this is capable due to Human brain, the most powerful machine in the world. ...
[ { "code": null, "e": 606, "s": 172, "text": "Before diving in to the technicalities behind CNN let us talk about living beings . How do they recognize and perceive images. We see multiple images every second and we are able to process it and we are able to recognize it in the future. All this is cap...
Classification in Imbalanced Data Sets. | by Ada kibet | Towards Data Science
Classification is a type of supervised learning in Machine Learning that deals with categorizing data into classes. Supervised learning implies models that take input with their matched output to train a model which can later make useful predictions on a new set of data with no output. Some examples of classification p...
[ { "code": null, "e": 762, "s": 172, "text": "Classification is a type of supervised learning in Machine Learning that deals with categorizing data into classes. Supervised learning implies models that take input with their matched output to train a model which can later make useful predictions on a ...
How to add git hooks for your python projects using the pre-commit framework | by Mathanraj Sharma | Towards Data Science
As a developer, we need to ensure readability, writability, and reliability of the program we are writing. If we take a git repo multiple contributors write or modify hundreds of lines of codes each day, new contributors come in as few go out. So to make the codebase consistent, we have to follow certain standards. For...
[ { "code": null, "e": 768, "s": 172, "text": "As a developer, we need to ensure readability, writability, and reliability of the program we are writing. If we take a git repo multiple contributors write or modify hundreds of lines of codes each day, new contributors come in as few go out. So to make ...
How I would Learn Python for Data Science if I Had to Start Over | by Nicholas | Towards Data Science
I reached over to grab another sip of my red bull. My eyes were bloodshot from staring at the screen for so long. I was exhausted. But I needed to do this, I had to get my head around it. So I flipped the page. Then wrote a couple more lines in my notebook. ‎....And I did it again. ..................And again. ...........
[ { "code": null, "e": 223, "s": 172, "text": "I reached over to grab another sip of my red bull." }, { "code": null, "e": 286, "s": 223, "text": "My eyes were bloodshot from staring at the screen for so long." }, { "code": null, "e": 360, "s": 286, "text": "I w...
How to make a page redirect using jQuery?
To redirect to another webpage in jQuery, use attr(). You can try to run the following code to redirect to another webpage − <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"> </script> <script> $(document).ready(function() { $(locatio...
[ { "code": null, "e": 1187, "s": 1062, "text": "To redirect to another webpage in jQuery, use attr(). You can try to run the following code to redirect to another webpage −" }, { "code": null, "e": 1487, "s": 1187, "text": "<html>\n <head>\n <script src=\"https://ajax.googl...
Javascript | Window Blur() and Window Focus() Method - GeeksforGeeks
22 Nov, 2021 Window.blur() MethodThe blur() method is used to remove focus from the current window. i.e, It send the new open Window to the background. Syntax: Window.blur() Parameter: It does not require any parameters. Return Value: It does not Return any value. Window.focus() MethodThe focus() method is used to focu...
[ { "code": null, "e": 25922, "s": 25894, "text": "\n22 Nov, 2021" }, { "code": null, "e": 26061, "s": 25922, "text": "Window.blur() MethodThe blur() method is used to remove focus from the current window. i.e, It send the new open Window to the background." }, { "code": nu...
Flex - Style with CSS
Flex supports the use of CSS syntax and styles to apply to its UI controls in the same way as CSS to HTML components. You can refer to a style sheet available in the class path of the application. For example consider Style.css file in com/tutorialspoint/client folder where HelloWorld.mxml file also lies. /* CSS file *...
[ { "code": null, "e": 2165, "s": 2047, "text": "Flex supports the use of CSS syntax and styles to apply to its UI controls in the same way as CSS to HTML components." }, { "code": null, "e": 2354, "s": 2165, "text": "You can refer to a style sheet available in the class path of th...
Plus One | Practice | GeeksforGeeks
Given a non-negative number represented as a list of digits, add 1 to the number (increment the number represented by the digits). The digits are stored such that the most significant digit is first element of array. Example 1: Input: N = 3 arr[] = {1, 2, 4} Output: 1 2 5 Explanation: 124+1 = 125, and so the Outpu...
[ { "code": null, "e": 458, "s": 238, "text": "Given a non-negative number represented as a list of digits, add 1 to the number (increment the number represented by the digits). The digits are stored such that the most significant digit is first element of array. \n " }, { "code": null, "e...
Spring AOP - Annotation Based Around Advice
@Around is an advice type, which ensures that an advice can run before and after the method execution. Following is the syntax of @Around advice. @Pointcut("execution(* com.tutorialspoint.Student.getAge(..))") private void selectGetName(){} @Around("selectGetAge()") public void aroundAdvice(ProceedingJoinPoint proceed...
[ { "code": null, "e": 2415, "s": 2269, "text": "@Around is an advice type, which ensures that an advice can run before and after the method execution. Following is the syntax of @Around advice." }, { "code": null, "e": 2976, "s": 2415, "text": "@Pointcut(\"execution(* com.tutorial...
Construct a ∈-NFA for the language L = (a* + b*)
The ε transitions in Non-deterministic finite automata (NFA) are used to move from one state to another without having any symbol from input set Σ ε-NFA is defined in five-tuple representation {Q, q0, Σ, δ, F} Where, δ − Q × (Σ∪ε)→2Q δ − Q × (Σ∪ε)→2Q Q − Finite set of states Q − Finite set of states Σ − Finite set of t...
[ { "code": null, "e": 1209, "s": 1062, "text": "The ε transitions in Non-deterministic finite automata (NFA) are used to move from one state to another without having any symbol from input set Σ" }, { "code": null, "e": 1255, "s": 1209, "text": "ε-NFA is defined in five-tuple repr...
Convex Hull Graham Scan in C++
In this tutorial, we will be discussing a program to find the convex hull of a given set of points. Convex hull is the smallest polygon convex figure containing all the given points either on the boundary on inside the figure. In Graham Scan, firstly the pointes are sorted to get to the bottommost point. Then the point...
[ { "code": null, "e": 1162, "s": 1062, "text": "In this tutorial, we will be discussing a program to find the convex hull of a given set of points." }, { "code": null, "e": 1289, "s": 1162, "text": "Convex hull is the smallest polygon convex figure containing all the given points ...
Check if two arrays are equal or not | Practice | GeeksforGeeks
Given two arrays A and B of equal size N, the task is to find if given arrays are equal or not. Two arrays are said to be equal if both of them contain same set of elements, arrangements (or permutation) of elements may be different though. Note : If there are repetitions, then counts of repeated elements must also be ...
[ { "code": null, "e": 590, "s": 238, "text": "Given two arrays A and B of equal size N, the task is to find if given arrays are equal or not. Two arrays are said to be equal if both of them contain same set of elements, arrangements (or permutation) of elements may be different though.\nNote : If the...
SQL Tryit Editor v1.6
SELECT * FROM Customers WHERE CustomerID=1; ​ Edit the SQL Statement, and click "Run SQL" to see the result. This SQL-Statement is not supported in the WebSQL Database. The example still works, because it uses a modified version of SQL. Your browser does not support WebSQL. Your are now using a light-version of the Try...
[ { "code": null, "e": 24, "s": 0, "text": "SELECT * FROM Customers" }, { "code": null, "e": 44, "s": 24, "text": "WHERE CustomerID=1;" }, { "code": null, "e": 46, "s": 44, "text": "​" }, { "code": null, "e": 109, "s": 46, "text": "Edit the S...
Why variable name does not start with numbers in C ? - GeeksforGeeks
06 Jul, 2020 In C, apart from keywords, everything in the C program is treated as Identifier. Identifiers can be the names given to variables, constants, functions, and user-defined data. A variable name can consist of alphabets (upper case, lower case), numbers (0-9), and _ (underscore) character. But the name of any ...
[ { "code": null, "e": 24103, "s": 24075, "text": "\n06 Jul, 2020" }, { "code": null, "e": 24612, "s": 24103, "text": "In C, apart from keywords, everything in the C program is treated as Identifier. Identifiers can be the names given to variables, constants, functions, and user-de...
Java 8 Stream Filter Example | Filter Streams in Java | online TutorialsPoint Streams
PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC EXCEPTIONS COLLECTIONS SWING JDBC JAVA 8 SPRING SPRING BOOT HIBERNATE PYTHON PHP JQUERY PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws In this tutorial, we are going to show you ho...
[ { "code": null, "e": 158, "s": 123, "text": "PROGRAMMINGJava ExamplesC Examples" }, { "code": null, "e": 172, "s": 158, "text": "Java Examples" }, { "code": null, "e": 183, "s": 172, "text": "C Examples" }, { "code": null, "e": 195, "s": 183, ...
Typing Enter/Return key in Selenium.
We can type Enter/Return key in Selenium. We shall use the sendKeys method and pass Keys.ENTER as an argument to the method. Also, we can use pass Keys.RETURN as an argument to the sendKeys method for the same purpose. To use the Keys class, we have to incorporate import org.openqa.selenium.Keys to the code. Let us typ...
[ { "code": null, "e": 1281, "s": 1062, "text": "We can type Enter/Return key in Selenium. We shall use the sendKeys method and pass Keys.ENTER as an argument to the method. Also, we can use pass Keys.RETURN as an argument to the sendKeys method for the same purpose." }, { "code": null, "e...
How to Change Root Password in Kali Linux? - GeeksforGeeks
28 Jul, 2020 After completing the installation of the Kali Linux machine the most highly performed task and asked question is to change the root password of your Kali Linux machine. Note: This is not exclusive only just with Kali Linux machine, you can perform the steps in any Linux machine with grub, we are using Kali...
[ { "code": null, "e": 24164, "s": 24136, "text": "\n28 Jul, 2020" }, { "code": null, "e": 24333, "s": 24164, "text": "After completing the installation of the Kali Linux machine the most highly performed task and asked question is to change the root password of your Kali Linux mac...
PHP Syntax
A PHP script is executed on the server, and the plain HTML result is sent back to the browser. A PHP script can be placed anywhere in the document. A PHP script starts with <?php and ends with ?>: The default file extension for PHP files is ".php". A PHP file normally contains HTML tags, and some PHP scripting code. B...
[ { "code": null, "e": 95, "s": 0, "text": "A PHP script is executed on the server, and the plain HTML result is sent back to the browser." }, { "code": null, "e": 148, "s": 95, "text": "A PHP script can be placed anywhere in the document." }, { "code": null, "e": 198, ...
Remove Leading Zeros from an Array using C++
We are provided an array, and we are tasked to remove the leading zeros from the given array and then print the array. Input : arr[] = {0, 0, 0, 1, 2, 3} Output : 1 2 3 Input : arr[] = {0, 0, 0, 1, 0, 2, 3} Output : 1 0 2 3 We can make a new array that doesn’t contain the leading zeroes of the previous array in the gi...
[ { "code": null, "e": 1181, "s": 1062, "text": "We are provided an array, and we are tasked to remove the leading zeros from the given array and then print the array." }, { "code": null, "e": 1287, "s": 1181, "text": "Input : arr[] = {0, 0, 0, 1, 2, 3}\nOutput : 1 2 3\n\nInput : a...
SQL Tryit Editor v1.6
DROP TABLE Shippers; ​ Edit the SQL Statement, and click "Run SQL" to see the result. This SQL-Statement is not supported in the WebSQL Database. The example still works, because it uses a modified version of SQL. Your browser does not support WebSQL. Your are now using a light-version of the Try-SQL Editor, with a rea...
[ { "code": null, "e": 21, "s": 0, "text": "DROP TABLE Shippers;" }, { "code": null, "e": 23, "s": 21, "text": "​" }, { "code": null, "e": 86, "s": 23, "text": "Edit the SQL Statement, and click \"Run SQL\" to see the result." }, { "code": null, "e":...
Program to find number of arithmetic sequences from a list of numbers in Python?
Suppose we have a list of numbers called nums, we have to find the number of contiguous arithmetic sequences of length ≥ 3. As we know an arithmetic sequence is a list of numbers where the difference between one number and the next number is the same. So, if the input is like nums = [6, 8, 10, 12, 13, 14], then the out...
[ { "code": null, "e": 1314, "s": 1062, "text": "Suppose we have a list of numbers called nums, we have to find the number of contiguous arithmetic sequences of length ≥ 3. As we know an arithmetic sequence is a list of numbers where the difference between one number and the next number is the same." ...
Maximum XOR using K numbers from 1 to n - GeeksforGeeks
15 Feb, 2022 Given an positive integer n and k. Find maximum xor of 1 to n using at most k numbers. Xor sum of 1 to n is defined as 1 ^ 2 ^ 3 ^ ... ^ n.Examples : Input : n = 4, k = 3 Output : 7 Explanation Maximum possible xor sum is 1 ^ 2 ^ 4 = 7. Input : n = 11, k = 1 Output : 11 Explanation Maximum Possible xor...
[ { "code": null, "e": 25014, "s": 24986, "text": "\n15 Feb, 2022" }, { "code": null, "e": 25166, "s": 25014, "text": "Given an positive integer n and k. Find maximum xor of 1 to n using at most k numbers. Xor sum of 1 to n is defined as 1 ^ 2 ^ 3 ^ ... ^ n.Examples : " }, { ...
How to set the decoration of a text with JavaScript?
Use the textDecoration property in JavaScript to decorate the text. You can underline a text using this property. You can try to run the following code to set the decoration of a text with JavaScript − <!DOCTYPE html> <html> <body> <div id = "myText">This is demo text.</div><br> <button onclick = "displ...
[ { "code": null, "e": 1176, "s": 1062, "text": "Use the textDecoration property in JavaScript to decorate the text. You can underline a text using this property." }, { "code": null, "e": 1264, "s": 1176, "text": "You can try to run the following code to set the decoration of a tex...
Program to print a pattern of numbers in C++
In this tutorial, we will be discussing a program to print a given pattern of numbers. Our task is to make use of looping structure in the code and print the given pattern − 1 232 34543 4567654 567898765 Live Demo #include<bits/stdc++.h> using namespace std; int main(){ int n = 5, i, j, num = 1, gap; ...
[ { "code": null, "e": 1149, "s": 1062, "text": "In this tutorial, we will be discussing a program to print a given pattern of numbers." }, { "code": null, "e": 1236, "s": 1149, "text": "Our task is to make use of looping structure in the code and print the given pattern −" }, ...
ISRO | ISRO CS 2016 | Question 35 - GeeksforGeeks
10 May, 2020 What is the highest type number that can be assigned to the following grammar? S → Aa A → Ba B → abc (A) Type 0(B) Type 1(C) Type 2(D) Type 3Answer: (D)Explanation: According to Chomsky Hierarchy, option (D) is correct.Quiz of this Question ApurvaRaj ISRO Writing code in comment? Please use ide.geeksforgee...
[ { "code": null, "e": 24035, "s": 24007, "text": "\n10 May, 2020" }, { "code": null, "e": 24114, "s": 24035, "text": "What is the highest type number that can be assigned to the following grammar?" }, { "code": null, "e": 24136, "s": 24114, "text": "S → Aa\nA →...
Count number of elements between two given elements in array in C++
We are given an array containing integer elements and two numbers start and end and the task is to calculate the count of elements present between start and end in an array. Arrays a kind of data structure that can store a fixed-size sequential collection of elements of the same type. An array is used to store a collec...
[ { "code": null, "e": 1236, "s": 1062, "text": "We are given an array containing integer elements and two numbers start and end and the task is to calculate the count of elements present between start and end in an array." }, { "code": null, "e": 1717, "s": 1236, "text": "Arrays a...
LocalDate atStartOfDay() method in Java with Examples - GeeksforGeeks
28 Nov, 2018 The atStartOfDay() method of LocalDate class in Java is combines this date with the time of midnight to create a LocalDateTime at the start of this date. Syntax: public ZonedDateTime atStartOfDay(ZoneId zone) Parameter: This method accepts a parameter zone which is the zone ID to be used and not necessary...
[ { "code": null, "e": 23557, "s": 23529, "text": "\n28 Nov, 2018" }, { "code": null, "e": 23711, "s": 23557, "text": "The atStartOfDay() method of LocalDate class in Java is combines this date with the time of midnight to create a LocalDateTime at the start of this date." }, {...
Using CX_Freeze in Python
Sometimes we feel to create something different which is very exciting, and according to human nature, we always love to share it. Python also fulfills those wishes. Using Python, if we want to share our Python program with our friends we can do that, only need to have the same version of Python installed with all the ...
[ { "code": null, "e": 1193, "s": 1062, "text": "Sometimes we feel to create something different which is very exciting, and according to human nature, we always love to share it." }, { "code": null, "e": 1434, "s": 1193, "text": "Python also fulfills those wishes. Using Python, if...
How to create an array of linked lists in java?
A linked list is a sequence of data structures, which are connected together via links. To create an array of linked lists, create required linked lists and, create an array of objects with them. Live Demo import java.util.LinkedList; public class ArrayOfLinkedList { public static void main(String args[]) { L...
[ { "code": null, "e": 1150, "s": 1062, "text": "A linked list is a sequence of data structures, which are connected together via links." }, { "code": null, "e": 1258, "s": 1150, "text": "To create an array of linked lists, create required linked lists and, create an array of objec...
What is One-Hot Encoding and how to use Pandas get_dummies function | by B. Chen | Towards Data Science
I get questions all the time about some concepts in machine learning and what they really mean, for example, in one of my previous articles Google’s 7 steps of Machine Learning in practice, I get asked what is one-hot encoding, and when should we use it? That’s is a great question and every machine learning practitione...
[ { "code": null, "e": 469, "s": 47, "text": "I get questions all the time about some concepts in machine learning and what they really mean, for example, in one of my previous articles Google’s 7 steps of Machine Learning in practice, I get asked what is one-hot encoding, and when should we use it? T...
HTML course | Building Main Content - Section 3 - GeeksforGeeks
10 Aug, 2021 Course Navigation In the previous article we have seen the 3-Column layout and completed the Section 2 of the main content. The main content of the website is now almost complete. We just need to build the Section 3 of the main content. The Section 3 is shown in the below image: If you look at the abov...
[ { "code": null, "e": 29988, "s": 29960, "text": "\n10 Aug, 2021" }, { "code": null, "e": 30008, "s": 29988, "text": "Course Navigation " }, { "code": null, "e": 30272, "s": 30008, "text": "In the previous article we have seen the 3-Column layout and completed...
Java Program to check the end of a string
To check the end of a string, use the endsWith() method. Let’s say the following is our string. String str = "demo"; Now, check for the substring “mo” using the endsWith() method in an if-else condition. if(str.endsWith("mo")) { System.out.println("The string ends with the word mo"); } else { System.out.println("...
[ { "code": null, "e": 1119, "s": 1062, "text": "To check the end of a string, use the endsWith() method." }, { "code": null, "e": 1158, "s": 1119, "text": "Let’s say the following is our string." }, { "code": null, "e": 1179, "s": 1158, "text": "String str = \"...
Python Program to find whether a no is power of two
In this article, we will learn about the solution to the problem statement given below. Problem statement − We are given a number, we need to check that the number is a power of two or not. We can solve this using two approaches as discussed below. Live Demo # power of 2 def find(n): if (n == 0): return False...
[ { "code": null, "e": 1150, "s": 1062, "text": "In this article, we will learn about the solution to the problem statement given below." }, { "code": null, "e": 1252, "s": 1150, "text": "Problem statement − We are given a number, we need to check that the number is a power of two ...
Get the position of the maximum element in each Row of a Matrix in R Programming - max.col() Function - GeeksforGeeks
16 Jun, 2020 max.col() function in R Language check for maximum value in each row and returns the column no. for it. Syntax: max.col(x, ties.method) Parameters:x: Numeric matrixties.method: It takes random, first, and last as value and returns the position accordingly in case of a tie. Example 1: # R program to find po...
[ { "code": null, "e": 24794, "s": 24766, "text": "\n16 Jun, 2020" }, { "code": null, "e": 24898, "s": 24794, "text": "max.col() function in R Language check for maximum value in each row and returns the column no. for it." }, { "code": null, "e": 24930, "s": 24898,...
Git: A Complete Guide. Covering the essential commands for a... | by Rahul Pathak | Towards Data Science
In a project where there are multiple collaborators, there can be conflict while building a project. Git & GitHub have provided us with the ultimate solution to such problems. Git simplifies the process of working with other people and makes it easy to collaborate on projects. In this post, we will be covering all the ...
[ { "code": null, "e": 548, "s": 171, "text": "In a project where there are multiple collaborators, there can be conflict while building a project. Git & GitHub have provided us with the ultimate solution to such problems. Git simplifies the process of working with other people and makes it easy to co...
Tryit Editor v3.7
CSS Grid Intro Tryit: Grid lines
[ { "code": null, "e": 24, "s": 9, "text": "CSS Grid Intro" } ]