title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
What do you mean by static memory allocation in C programming?
Memory can be allocated in the following two ways − Static variable defines in one block of allocated space, of a fixed size. Once it is allocated, it can never be freed. Memory is allocated for the declared variable in the program. The address can be obtained by using ‘&’ operator and can be assigned to a pointer. The...
[ { "code": null, "e": 1114, "s": 1062, "text": "Memory can be allocated in the following two ways −" }, { "code": null, "e": 1233, "s": 1114, "text": "Static variable defines in one block of allocated space, of a fixed size. Once it is allocated, it can never be freed." }, { ...
Maximum sum of absolute difference of any permutation - GeeksforGeeks
24 May, 2021 Given an array, we need to find the maximum sum of absolute difference of any permutation of the given array.Examples: Input : { 1, 2, 4, 8 } Output : 18 Explanation : For the given array there are several sequence possible like : {2, 1, 4, 8} {4, 2, 1, 8} and some more. Now, the absolute differe...
[ { "code": null, "e": 24513, "s": 24485, "text": "\n24 May, 2021" }, { "code": null, "e": 24634, "s": 24513, "text": "Given an array, we need to find the maximum sum of absolute difference of any permutation of the given array.Examples: " }, { "code": null, "e": 25078...
16 Must-Know Bash Commands for Data Scientists | by Giorgos Myrianthous | Towards Data Science
It is very important for Data Scientists to have a basic understanding around bash and its commands. Often referred to as the terminal, console or command line, Bash is a Unix shell that can help you navigate within your machine and perform certain tasks. In today’s article, we are going to explore a few of the most co...
[ { "code": null, "e": 428, "s": 172, "text": "It is very important for Data Scientists to have a basic understanding around bash and its commands. Often referred to as the terminal, console or command line, Bash is a Unix shell that can help you navigate within your machine and perform certain tasks....
Machine Learning ‘on the rocks’ 🥃 [Whiskey Dataset] | by Gerasimos Plegas | Towards Data Science
“Always carry a flagon of whisky in case of snakebite, and furthermore, always carry a small snake.” | W.C. Fields Apparently, the project’s domain relies on the most popular liquor in the world — Whiskey. A dark spirit coming from a great variety of grains, distilled throughout the world and arriving at quite a number...
[ { "code": null, "e": 287, "s": 172, "text": "“Always carry a flagon of whisky in case of snakebite, and furthermore, always carry a small snake.” | W.C. Fields" }, { "code": null, "e": 701, "s": 287, "text": "Apparently, the project’s domain relies on the most popular liquor in t...
PL/SQL | User Input - GeeksforGeeks
03 Oct, 2018 Prerequisite – PL/SQL IntroductionIn PL/SQL, user can be prompted to input a value using & character. & can be used to prompt input for different data types. Consider, following table: Following queries will create a new table named GFG in the database. SQL> create table GFG (id number(4), author varchar2(...
[ { "code": null, "e": 23973, "s": 23945, "text": "\n03 Oct, 2018" }, { "code": null, "e": 24158, "s": 23973, "text": "Prerequisite – PL/SQL IntroductionIn PL/SQL, user can be prompted to input a value using & character. & can be used to prompt input for different data types. Consi...
Natural Language Toolkit - Word Replacement
Stemming and lemmatization can be considered as a kind of linguistic compression. In the same sense, word replacement can be thought of as text normalization or error correction. But why we needed word replacement? Suppose if we talk about tokenization, then it is having issues with contractions (like can’t, won’t, etc...
[ { "code": null, "e": 2563, "s": 2384, "text": "Stemming and lemmatization can be considered as a kind of linguistic compression. In the same sense, word replacement can be thought of as text normalization or error correction." }, { "code": null, "e": 2828, "s": 2563, "text": "But...
How to create a function in MATLAB ? - GeeksforGeeks
26 May, 2021 A function is a block of statements that intend to perform a specific task. Functions allow the users to reuse the code frequently. MATLAB has several predefined functions which are ready to use such as sin(), fact(), cos() etc. MATLAB also allows the users to define their own functions. Syntax: function o...
[ { "code": null, "e": 24468, "s": 24440, "text": "\n26 May, 2021" }, { "code": null, "e": 24757, "s": 24468, "text": "A function is a block of statements that intend to perform a specific task. Functions allow the users to reuse the code frequently. MATLAB has several predefined f...
Fast I/O for Competitive Programming - GeeksforGeeks
08 Nov, 2021 In competitive programming, it is important to read input as fast as possible so we save valuable time. You must have seen various problem statements saying: “Warning: Large I/O data, be careful with certain languages (though most should be OK if the algorithm is well designed)”. The key for such problems ...
[ { "code": null, "e": 24750, "s": 24722, "text": "\n08 Nov, 2021" }, { "code": null, "e": 24854, "s": 24750, "text": "In competitive programming, it is important to read input as fast as possible so we save valuable time." }, { "code": null, "e": 25091, "s": 24854,...
How to Change Colours in Command Prompt in Windows? - GeeksforGeeks
23 Mar, 2020 Command Prompt is a neat command-line interpreter that comes in-built with the Windows operating system. Command prompt is still used for performing various functions such as, collecting information on the network state of the computer, troubleshooting the system, deleting files, formatting computers, etc....
[ { "code": null, "e": 24964, "s": 24936, "text": "\n23 Mar, 2020" }, { "code": null, "e": 25608, "s": 24964, "text": "Command Prompt is a neat command-line interpreter that comes in-built with the Windows operating system. Command prompt is still used for performing various functi...
4 Ways To Replace Items In Python Lists | by AnBento | Towards Data Science
Update: Many of you contacted me asking for valuable resources to nail Python coding interviews. Below I share 4 courses that I strongly recommend to keep exercising after practicing the algorithms in this post: LeetCode In Python: 50 Algorithms Coding Interview Questions → Best For Coding Rounds Prep! Python advanced ...
[ { "code": null, "e": 258, "s": 46, "text": "Update: Many of you contacted me asking for valuable resources to nail Python coding interviews. Below I share 4 courses that I strongly recommend to keep exercising after practicing the algorithms in this post:" }, { "code": null, "e": 350, ...
11 Dimensionality reduction techniques you should know in 2021 | by Rukshan Pramoditha | Towards Data Science
In both Statistics and Machine Learning, the number of attributes, features or input variables of a dataset is referred to as its dimensionality. For example, let’s take a very simple dataset containing 2 attributes called Height and Weight. This is a 2-dimensional dataset and any observation of this dataset can be plo...
[ { "code": null, "e": 386, "s": 47, "text": "In both Statistics and Machine Learning, the number of attributes, features or input variables of a dataset is referred to as its dimensionality. For example, let’s take a very simple dataset containing 2 attributes called Height and Weight. This is a 2-di...
Environments in R Programming - GeeksforGeeks
05 Aug, 2020 The environment is a virtual space that is triggered when an interpreter of a programming language is launched. Simply, the environment is a collection of all the objects, variables, and functions. Or, Environment can be assumed as a top-level object that contains the set of names/variables associated with...
[ { "code": null, "e": 29044, "s": 29016, "text": "\n05 Aug, 2020" }, { "code": null, "e": 29616, "s": 29044, "text": "The environment is a virtual space that is triggered when an interpreter of a programming language is launched. Simply, the environment is a collection of all the ...
Exploring Pathfinding Graph Algorithms | by Tomaz Bratanic | Towards Data Science
In the first part of the series, we constructed a knowledge graph of monuments located in Spain from WikiData API. Now we’ll put on our graph data science goggles and explore various pathfinding algorithms available in the Neo4j Graph Data Science library. To top it off, we’ll look at a brute force solution for a Santa...
[ { "code": null, "e": 852, "s": 172, "text": "In the first part of the series, we constructed a knowledge graph of monuments located in Spain from WikiData API. Now we’ll put on our graph data science goggles and explore various pathfinding algorithms available in the Neo4j Graph Data Science library...
Learn Bayes Theorem by Detecting SPAM | by GreekDataGuy | Towards Data Science
This tutorial has 2 parts:1. Deriving Bayes theorem from conditional probability2. Predicting if an SMS message is a spam I covered conditional probability in more depth here. Conditional probability tells us the probability of an event occurring, given another event. P(A|B) = P(A ∩ B) / P(B) is the probability A occur...
[ { "code": null, "e": 293, "s": 171, "text": "This tutorial has 2 parts:1. Deriving Bayes theorem from conditional probability2. Predicting if an SMS message is a spam" }, { "code": null, "e": 347, "s": 293, "text": "I covered conditional probability in more depth here." }, { ...
Python | Convert a list of lists into tree-like dict - GeeksforGeeks
18 Feb, 2019 Given a list of lists, write a Python program to convert the given list of lists into a tree-like dictionary. Examples: Input : [[1], [2, 1], [3, 1], [4, 2, 1], [5, 2, 1], [6, 3, 1], [7, 3, 1]] Output : {1: {2: {4: {}, 5: {}}, 3: {6: {}, 7: {}}}} Input : [['A'], ['B', 'A'], ['C', 'A'], ['D', 'C', 'A']] Ou...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n18 Feb, 2019" }, { "code": null, "e": 24011, "s": 23901, "text": "Given a list of lists, write a Python program to convert the given list of lists into a tree-like dictionary." }, { "code": null, "e": 24021, "s": ...
Connecting to SQL Database using SQLAlchemy in Python
19 Dec, 2021 In this article, we will see how to connect to an SQL database using SQLAlchemy in Python. To connect to a SQL database using SQLAlchemy we will require the sqlalchemy library installed in our python environment. It can be installed using pip – $ pip install sqlalchemy The create_engine() method of sqlalch...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Dec, 2021" }, { "code": null, "e": 119, "s": 28, "text": "In this article, we will see how to connect to an SQL database using SQLAlchemy in Python." }, { "code": null, "e": 273, "s": 119, "text": "To connect to a...
Delete alternate nodes of a Linked List
03 Jul, 2022 Given a Singly Linked List, starting from the second node delete all alternate nodes of it. For example, if the given linked list is 1->2->3->4->5 then your function should convert it to 1->3->5, and if the given linked list is 1->2->3->4 then convert it to 1->3. Method 1 (Iterative) Keep track of previou...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Jul, 2022" }, { "code": null, "e": 317, "s": 52, "text": "Given a Singly Linked List, starting from the second node delete all alternate nodes of it. For example, if the given linked list is 1->2->3->4->5 then your function should c...
SortedMap Interface in Java with Examples
20 Aug, 2020 SortedMap is an interface in the collection framework. This interface extends the Map interface and provides a total ordering of its elements (elements can be traversed in sorted order of keys). The class that implements this interface is TreeMap. The main characteristic of a SortedMap is that it orders t...
[ { "code": null, "e": 54, "s": 26, "text": "\n20 Aug, 2020" }, { "code": null, "e": 303, "s": 54, "text": "SortedMap is an interface in the collection framework. This interface extends the Map interface and provides a total ordering of its elements (elements can be traversed in so...
Matplotlib.axes.Axes.text() in Python
13 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. The Axe...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Apr, 2020" }, { "code": null, "e": 328, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text...
How to use Glob() function to find files recursively in Python?
To use Glob() to find files recursively, you need Python 3.5+. The glob module supports the "**" directive(which is parsed only if you pass recursive flag) which tells python to look recursively in the directories. import glob for filename in glob.iglob('src/**/*', recursive=True): print(filename) You can check th...
[ { "code": null, "e": 1403, "s": 1187, "text": "To use Glob() to find files recursively, you need Python 3.5+. The glob module supports the \"**\" directive(which is parsed only if you pass recursive flag) which tells python to look recursively in the directories. " }, { "code": null, "e"...
Docker – LABEL Instruction
28 Oct, 2020 Labels are used in Dockerfile to help organize your Docker Images. Labels are key-value pairs and simply adds custom metadata to your Docker Images. Some key points associated with the LABEL instructions are as follows: To include spaces inside a label, you can use quotes. For multi line labels, you can us...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Oct, 2020" }, { "code": null, "e": 248, "s": 28, "text": "Labels are used in Dockerfile to help organize your Docker Images. Labels are key-value pairs and simply adds custom metadata to your Docker Images. Some key points associated...
Sort an array of strings based on count of distinct characters
18 Dec, 2020 Given a string array arr[] as input, the task is to print the words sorted by number of distinct characters that occur in the word, followed by length of word. Note: If two words have same number of distinct characters, the word with more total characters comes first. If two words have same number of di...
[ { "code": null, "e": 52, "s": 24, "text": "\n18 Dec, 2020" }, { "code": null, "e": 213, "s": 52, "text": "Given a string array arr[] as input, the task is to print the words sorted by number of distinct characters that occur in the word, followed by length of word. " }, { ...
How to create responsive stacked cards hover effect using CSS ?
25 Aug, 2021 Introduction: Cards are a very important part of any website. It is used to display some important information in short to viewers. In this article, we will create responsive stackend cards hover effect using HTML and CSS. In order to achieve a multi-layer stacking effect, you have to follow certain steps ...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Aug, 2021" }, { "code": null, "e": 358, "s": 28, "text": "Introduction: Cards are a very important part of any website. It is used to display some important information in short to viewers. In this article, we will create responsive ...
Python – Extract Unique values dictionary values
22 Apr, 2020 Sometimes, while working with data, we can have problem in which we need to perform the extraction of only unique values from dictionary values list. This can have application in many domains such as web development. Lets discuss certain ways in which this task can be performed. Method #1 : Using sorted() ...
[ { "code": null, "e": 53, "s": 25, "text": "\n22 Apr, 2020" }, { "code": null, "e": 333, "s": 53, "text": "Sometimes, while working with data, we can have problem in which we need to perform the extraction of only unique values from dictionary values list. This can have applicatio...
JavaScript and Cookies
Web Browsers and Servers use HTTP protocol to communicate and HTTP is a stateless protocol. But for a commercial website, it is required to maintain session information among different pages. For example, one user registration ends after completing many pages. But how to maintain users' session information across all t...
[ { "code": null, "e": 2934, "s": 2600, "text": "Web Browsers and Servers use HTTP protocol to communicate and HTTP is a stateless protocol. But for a commercial website, it is required to maintain session information among different pages. For example, one user registration ends after completing many...
Find two prime numbers with given sum
02 May, 2022 Given an even number (greater than 2 ), print two prime numbers whose sum will be equal to given number. There may be several combinations possible. Print only first such pair. An interesting point is, a solution always exist according to Goldbach’s conjecture.Examples : Input: n = 74 Output: 3 71 Input...
[ { "code": null, "e": 54, "s": 26, "text": "\n02 May, 2022" }, { "code": null, "e": 328, "s": 54, "text": "Given an even number (greater than 2 ), print two prime numbers whose sum will be equal to given number. There may be several combinations possible. Print only first such pai...
GATE | GATE CS 2021 | Set 2 | Question 10
23 May, 2021 Six students P, Q, R, S, T and U, with distinct heights, compare their heights and make the following observations. Observation I: S is taller than R. Observation II: Q is the shortest of all. Observation III: U is taller than only one student. Observation IV: T is taller than S but is not the tallest. The...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 May, 2021" }, { "code": null, "e": 144, "s": 28, "text": "Six students P, Q, R, S, T and U, with distinct heights, compare their heights and make the following observations." }, { "code": null, "e": 179, "s": 144, ...
Scales of Measurement
02 Jul, 2018 Data can be classified as being on one of four scales: nominal, ordinal, interval or ratio. Each level of measurement has some important properties that are useful to know. Properties of Measurement Scales: Identity – Each value on the measurement scale has a unique meaning. Magnitude – Values on the measu...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Jul, 2018" }, { "code": null, "e": 201, "s": 28, "text": "Data can be classified as being on one of four scales: nominal, ordinal, interval or ratio. Each level of measurement has some important properties that are useful to know." ...
Queries for bitwise AND in the index range [L, R] of the given array
26 Nov, 2021 Given an array arr[] of N and Q queries consisting of a range [L, R]. the task is to find the bit-wise AND of all the elements of in that index range.Examples: Input: arr[] = {1, 3, 1, 2, 3, 4}, q[] = {{0, 1}, {3, 5}} Output: 1 0 1 AND 3 = 1 2 AND 3 AND 4 = 0Input: arr[] = {1, 2, 3, 4, 5}, q[] = {{0, 4},...
[ { "code": null, "e": 54, "s": 26, "text": "\n26 Nov, 2021" }, { "code": null, "e": 216, "s": 54, "text": "Given an array arr[] of N and Q queries consisting of a range [L, R]. the task is to find the bit-wise AND of all the elements of in that index range.Examples: " }, { ...
Linear Convolution using C and MATLAB
13 Jul, 2021 A key concept often introduced to those pursuing electronics engineering is Linear Convolution. This is a crucial component of Digital Signal Processing and Signals and Systems. Keeping general interest and academic implications in mind, this article introduces the concept and its applications and implemen...
[ { "code": null, "e": 53, "s": 25, "text": "\n13 Jul, 2021" }, { "code": null, "e": 386, "s": 53, "text": "A key concept often introduced to those pursuing electronics engineering is Linear Convolution. This is a crucial component of Digital Signal Processing and Signals and Syste...
How to make a timezone aware datetime object in Python
26 Sep, 2021 In this example, we are going to see how to make a timezone-aware DateTime object in Python. Timezone-aware objects are Python DateTime or time objects that include timezone information. An aware object represents a specific moment in time that is not open to interpretation. We can easily check if a dateti...
[ { "code": null, "e": 52, "s": 24, "text": "\n26 Sep, 2021" }, { "code": null, "e": 145, "s": 52, "text": "In this example, we are going to see how to make a timezone-aware DateTime object in Python." }, { "code": null, "e": 328, "s": 145, "text": "Timezone-awa...
How to use NULL in MySQL SELECT statement?
In MySQL, the length of NULL is 0. Here, we will see how NULL can be used with SELECT statement. Let us create a table with the help of CREATE command − Creating a table − mysql> CREATE table NullWIthSelect -> ( -> Name varchar(100) -> ); Query OK, 0 rows affected (0.62 sec) Above, I have created a table successfully. ...
[ { "code": null, "e": 1340, "s": 1187, "text": "In MySQL, the length of NULL is 0. Here, we will see how NULL can be used with SELECT\nstatement. Let us create a table with the help of CREATE command −" }, { "code": null, "e": 1359, "s": 1340, "text": "Creating a table −" }, {...
Java.util.Timer Class in Java
14 Nov, 2021 Timer class provides a method call that is used by a thread to schedule a task, such as running a block of code after some regular instant of time. Each task may be scheduled to run once or for a repeated number of executions. Each timer object is associated with a background thread that is responsible for...
[ { "code": null, "e": 53, "s": 25, "text": "\n14 Nov, 2021" }, { "code": null, "e": 418, "s": 53, "text": "Timer class provides a method call that is used by a thread to schedule a task, such as running a block of code after some regular instant of time. Each task may be scheduled...
How to Convert Excel to XML Format in Python?
17 Feb, 2021 Python proves to be a powerful language when the requirement is to convert a file from one format to the other. It supports tools that can be employed to easily achieve the functionality. In this article, we’ll find out how we will convert from an Excel file to Extensible terminology (XML) files with Pytho...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Feb, 2021" }, { "code": null, "e": 339, "s": 28, "text": "Python proves to be a powerful language when the requirement is to convert a file from one format to the other. It supports tools that can be employed to easily achieve the fu...
PyQtGraph – Adding Qt Widgets with the Bar Graph
30 Nov, 2021 In this article we will see how we can add Qt widgets with the bar graph in the PyQtGraph module. PyQtGraph is a graphics and user interface library for Python that provides functionality commonly required in designing and science applications. Its primary goals are to provide fast, interactive graphics fo...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Nov, 2021" }, { "code": null, "e": 977, "s": 28, "text": "In this article we will see how we can add Qt widgets with the bar graph in the PyQtGraph module. PyQtGraph is a graphics and user interface library for Python that provides f...
Treap (A Randomized Binary Search Tree)
22 Mar, 2017 Like Red-Black and AVL Trees, Treap is a Balanced Binary Search Tree, but not guaranteed to have height as O(Log n). The idea is to use Randomization and Binary Heap property to maintain balance with high probability. The expected time complexity of search, insert and delete is O(Log n). Every node of Trea...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Mar, 2017" }, { "code": null, "e": 343, "s": 54, "text": "Like Red-Black and AVL Trees, Treap is a Balanced Binary Search Tree, but not guaranteed to have height as O(Log n). The idea is to use Randomization and Binary Heap property...
Scala List init() method with example
29 Jul, 2019 The init() method is utilized to find all the elements of the list except the last one. Method Definition: def init: List[A] Return Type: It returns all the elements of the list except the last one. Example #1: // Scala program of init()// method // Creating objectobject GfG{ // Main method def m...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Jul, 2019" }, { "code": null, "e": 116, "s": 28, "text": "The init() method is utilized to find all the elements of the list except the last one." }, { "code": null, "e": 153, "s": 116, "text": "Method Definition:...
Python Program to print digit pattern
16 Jun, 2022 The program must accept an integer N as the input. The program must print the desired pattern as shown in the example input/ output. Examples: Input : 41325 Output : |**** |* |*** |** |***** Explanation: for a given integer print the number of *’s that are equivalent to each digit in the integer. Here the ...
[ { "code": null, "e": 53, "s": 25, "text": "\n16 Jun, 2022" }, { "code": null, "e": 196, "s": 53, "text": "The program must accept an integer N as the input. The program must print the desired pattern as shown in the example input/ output. Examples:" }, { "code": null, ...
Building an End-to-End Defect Classifier Application for Printed Circuit Boards | by Sean McClure | Towards Data Science
The Printed Circuit Board (PCB) is in most electronic products, mechanically supporting and connecting components along conductive tracks. Their prevalence underlies the modern electronics industry, with a world market exceeding $60 billion1. PCBs are prone to a variety of defects that impede proper manufacturing, cost...
[ { "code": null, "e": 414, "s": 171, "text": "The Printed Circuit Board (PCB) is in most electronic products, mechanically supporting and connecting components along conductive tracks. Their prevalence underlies the modern electronics industry, with a world market exceeding $60 billion1." }, { ...
Angular Google Charts - Tree Map
TreeMap is a visual representation of a data tree, where each node may have zero or more children, and one parent (except for the root). Each node is displayed as a rectangle, can be sized and colored according to values that we assign. Sizes and colors are valued relative to all other nodes in the graph. Following is ...
[ { "code": null, "e": 2147, "s": 1796, "text": "TreeMap is a visual representation of a data tree, where each node may have zero or more children, and one parent (except for the root). Each node is displayed as a rectangle, can be sized and colored according to values that we assign. Sizes and colors...
Angular ng Bootstrap Rating Component - GeeksforGeeks
06 Jul, 2021 Angular ng bootstrap is a bootstrap framework used with angular to create components with great styling and this framework is very easy to use and is used to make responsive websites. In this article, we will see how to use Rating in angular ng bootstrap. Rating component is used to make a component that w...
[ { "code": null, "e": 25109, "s": 25081, "text": "\n06 Jul, 2021" }, { "code": null, "e": 25293, "s": 25109, "text": "Angular ng bootstrap is a bootstrap framework used with angular to create components with great styling and this framework is very easy to use and is used to make ...
How do I unload (reload) a Python module?
The function reload(moduleName) reloads a previously loaded module (assuming you loaded it with the syntax "importmoduleName" without exiting the script. It is intended for conversational use, where you have edited the source file for a module and want to test it without leaving Python and starting it again. For exampl...
[ { "code": null, "e": 1385, "s": 1062, "text": "The function reload(moduleName) reloads a previously loaded module (assuming you loaded it with the syntax \"importmoduleName\" without exiting the script. It is intended for conversational use, where you have edited the source file for a module and wan...
Declare an empty List in Python - GeeksforGeeks
12 Dec, 2019 Lists are just like the arrays, declared in other languages. Lists need not be homogeneous always which makes it the most powerful tool in Python. A single list may contain DataTypes like Integers, Strings, as well as Objects. Lists are mutable, and hence, they can be altered even after their creation. How...
[ { "code": null, "e": 24402, "s": 24374, "text": "\n12 Dec, 2019" }, { "code": null, "e": 24706, "s": 24402, "text": "Lists are just like the arrays, declared in other languages. Lists need not be homogeneous always which makes it the most powerful tool in Python. A single list ma...
Dynamic filtering in Power BI. Check this simple technique to avoid... | by Nikola Ilic | Towards Data Science
Recently, I’ve come across a request to deliver a report which will enable end-users to choose if they want to see data filtered by specific year/month or as Year-To-Date calculation. I wrote about 5 useful tips and tricks which can boost your Power BI development, but I thought that this one deserves a separate post. ...
[ { "code": null, "e": 491, "s": 171, "text": "Recently, I’ve come across a request to deliver a report which will enable end-users to choose if they want to see data filtered by specific year/month or as Year-To-Date calculation. I wrote about 5 useful tips and tricks which can boost your Power BI de...
Create a large button group with Bootstrap
To create a large button group in Bootstrap, use the .btn-group-lg class. You can try to run the following code to form a large button group − Live Demo <!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/boot...
[ { "code": null, "e": 1136, "s": 1062, "text": "To create a large button group in Bootstrap, use the .btn-group-lg class." }, { "code": null, "e": 1205, "s": 1136, "text": "You can try to run the following code to form a large button group −" }, { "code": null, "e": 12...
3 Methods for Parallelization in Spark | by Ben Weber | Towards Data Science
Spark is great for scaling up data science tasks and workloads! As long as you’re using Spark data frames and libraries that operate on these data structures, you can scale to massive data sets that distribute across a cluster. However, there are some scenarios where libraries may not be available for working with Spar...
[ { "code": null, "e": 660, "s": 172, "text": "Spark is great for scaling up data science tasks and workloads! As long as you’re using Spark data frames and libraries that operate on these data structures, you can scale to massive data sets that distribute across a cluster. However, there are some sce...
Java Program to display Time in 12-hour format
Use the SimpleDateFormat class to display time in 12-hour format. Set the format Date dt = new Date(); SimpleDateFormat dateFormat; dateFormat = new SimpleDateFormat("hh:mm:ss a"); Now, the following will display time in 12-hour format dateFormat.format(dt) The following is an example Live Demo import java.text.Simple...
[ { "code": null, "e": 1128, "s": 1062, "text": "Use the SimpleDateFormat class to display time in 12-hour format." }, { "code": null, "e": 1143, "s": 1128, "text": "Set the format" }, { "code": null, "e": 1243, "s": 1143, "text": "Date dt = new Date();\nSimpleD...
Integer toString() in Java
The toString() method of the java.lang.Integer returns a string object. The Integer class has three toString() methods. Let us see them one by one − The java.lang.Integer.toString() method returns a String object representing this Integer's value. Let us now see an example − Live Demo import java.lang.*; public class ...
[ { "code": null, "e": 1211, "s": 1062, "text": "The toString() method of the java.lang.Integer returns a string object. The Integer class has three toString() methods. Let us see them one by one −" }, { "code": null, "e": 1338, "s": 1211, "text": "The java.lang.Integer.toString() ...
How to delete the specific node from the XML file using PowerShell?
To delete the specific XML node from the PowerShell, we can use the RemoveChild() method of the XML. For example, We have a sample XML file from Microsoft. https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ms762271(v=vs.85) We have saved the above file into C:\Temp\SampleXml.XML and we need to delete t...
[ { "code": null, "e": 1163, "s": 1062, "text": "To delete the specific XML node from the PowerShell, we can use the RemoveChild() method of the XML." }, { "code": null, "e": 1218, "s": 1163, "text": "For example, We have a sample XML file from Microsoft." }, { "code": null...
Lodash _.mapValues() Method - GeeksforGeeks
22 Mar, 2021 Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc. The _.mapValues() method is used to create a new mapped object with the same keys of the given object and the values are generated using the given iteratee function. S...
[ { "code": null, "e": 24678, "s": 24650, "text": "\n22 Mar, 2021" }, { "code": null, "e": 24818, "s": 24678, "text": "Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc." }, { "code": n...
PHP | DOMNode removeChild() Function - GeeksforGeeks
02 Mar, 2020 The DOMNode::removeChild() function is an inbuilt function in PHP which is used remove child from list of children. Syntax: DOMNode DOMNode::removeChild( DOMNode $oldnode ) Parameters: This function accepts a single parameter $oldnode which holds the child to remove. Return Value: This function returns the...
[ { "code": null, "e": 24495, "s": 24467, "text": "\n02 Mar, 2020" }, { "code": null, "e": 24611, "s": 24495, "text": "The DOMNode::removeChild() function is an inbuilt function in PHP which is used remove child from list of children." }, { "code": null, "e": 24619, ...
Sending data from a Flask app to PostgreSQL database | by Brendan Ferris | Towards Data Science
Managing the flow of data through a website or app is a crucial skill to master if you plan on making any sort of modern web service. With flask, Object Relational Mappers (ORM’s) are employed to allow your app to interact with a relational database. An Object Relational Mapper is a framework that, in our case, will al...
[ { "code": null, "e": 657, "s": 171, "text": "Managing the flow of data through a website or app is a crucial skill to master if you plan on making any sort of modern web service. With flask, Object Relational Mappers (ORM’s) are employed to allow your app to interact with a relational database. An O...
Java Examples - Use of label in a method
How to use method overloading for printing different types of array ? This example shows how to jump to a particular label when break or continue statements occour in a loop. public class NewClass { public static void main(String[] args) { String strSearch = "This is the string in which you have to search for...
[ { "code": null, "e": 2139, "s": 2068, "text": "How to use method overloading for printing different types of array ?" }, { "code": null, "e": 2244, "s": 2139, "text": "This example shows how to jump to a particular label when break or continue statements occour in a loop." }, ...
Kali Linux - Information Gathering Tools - GeeksforGeeks
07 Sep, 2021 Information Gathering means gathering different kinds of information about the target. It is basically, the first step or the beginning stage of Ethical Hacking, where the penetration testers or hackers (both black hat or white hat) tries to gather all the information about the target, in order to use it f...
[ { "code": null, "e": 24624, "s": 24596, "text": "\n07 Sep, 2021" }, { "code": null, "e": 25082, "s": 24624, "text": "Information Gathering means gathering different kinds of information about the target. It is basically, the first step or the beginning stage of Ethical Hacking, w...
Python Tkinter - Label - GeeksforGeeks
04 Sep, 2020 Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with Tkinter is the fastest and easiest way to create GUI applications. C...
[ { "code": null, "e": 41554, "s": 41526, "text": "\n04 Sep, 2020" }, { "code": null, "e": 42007, "s": 41554, "text": "Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. It is a stand...
Deploying a TensorFlow Model to Production made Easy. | by Renu Khandelwal | Towards Data Science
Learn step by step deployment of a TensorFlow model to Production using TensorFlow Serving. You created a deep learning model using Tensorflow, fine-tuned the model for better accuracy and precision, and now want to deploy your model to production for users to use it to make predictions. What’s the best way to deploy y...
[ { "code": null, "e": 264, "s": 172, "text": "Learn step by step deployment of a TensorFlow model to Production using TensorFlow Serving." }, { "code": null, "e": 461, "s": 264, "text": "You created a deep learning model using Tensorflow, fine-tuned the model for better accuracy a...
JavaScript group a JSON object by two properties and count
Suppose, we have an array of objects like this − const arr = [ {"location":"Kirrawee","identity_long":"student"}, {"location":"Kirrawee","identity_long":"visitor"}, {"location":"Kirrawee","identity_long":"visitor"}, {"location":"Kirrawee","identity_long":"worker"}, {"location":"Sutherland","identity_long...
[ { "code": null, "e": 1111, "s": 1062, "text": "Suppose, we have an array of objects like this −" }, { "code": null, "e": 1878, "s": 1111, "text": "const arr = [\n {\"location\":\"Kirrawee\",\"identity_long\":\"student\"},\n {\"location\":\"Kirrawee\",\"identity_long\":\"visit...
Python | Create a Pandas Dataframe from a dict of equal length lists - GeeksforGeeks
23 Nov, 2018 Given a dictionary of equal length lists, task is to create a Pandas DataFrame from it. There are various ways of creating a DataFrame in Pandas. One way is to convert a dictionary containing lists of equal lengths as values. Let’s discuss how to create a Pandas Dataframe from a dict of equal length lists ...
[ { "code": null, "e": 24318, "s": 24290, "text": "\n23 Nov, 2018" }, { "code": null, "e": 24406, "s": 24318, "text": "Given a dictionary of equal length lists, task is to create a Pandas DataFrame from it." }, { "code": null, "e": 24648, "s": 24406, "text": "Th...
How to use snackbar in Android?
This example demonstrates how do I use snackBar in android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:andro...
[ { "code": null, "e": 1122, "s": 1062, "text": "This example demonstrates how do I use snackBar in android." }, { "code": null, "e": 1251, "s": 1122, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new pr...
Inheritance in Dart Programming
Inheritance in dart is defined as the process in which one class derive the properties and characteristics of another class. It is helpful as it provides an ability with which we can create a new class from an existing class. Inheritance is a major component of a programming paradigm known as OOPS (Object-Oriented Prog...
[ { "code": null, "e": 1288, "s": 1062, "text": "Inheritance in dart is defined as the process in which one class derive the properties and characteristics of another class. It is helpful as it provides an ability with which we can create a new class from an existing class." }, { "code": null,...
GATE | Gate IT 2007 | Question 30
28 Jun, 2021 Suppose you are given an implementation of a queue of integers. The operations that can be performed on the queue are:i. isEmpty (Q) — returns true if the queue is empty, false otherwise.ii. delete (Q) — deletes the element at the front of the queue and returns its value.iii. insert (Q, i) — inserts the in...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jun, 2021" }, { "code": null, "e": 401, "s": 28, "text": "Suppose you are given an implementation of a queue of integers. The operations that can be performed on the queue are:i. isEmpty (Q) — returns true if the queue is empty, fals...
Primary key constraint in SQL
11 Nov, 2020 A primary key constraint depicts a key comprising one or more columns that will help uniquely identify every tuple/record in a table. Properties : No duplicate values are allowed, i.e. Column assigned as primary key should have UNIQUE values only.NO NULL values are present in column with Primary key. Hence...
[ { "code": null, "e": 53, "s": 25, "text": "\n11 Nov, 2020" }, { "code": null, "e": 187, "s": 53, "text": "A primary key constraint depicts a key comprising one or more columns that will help uniquely identify every tuple/record in a table." }, { "code": null, "e": 200...
Sum of Fibonacci Numbers in a range
09 Jun, 2022 Given a range [l, r], the task is to find the sum fib(l) + fib(l + 1) + fib(l + 2) + ..... + fib(r) where fib(n) is the nth Fibonacci number. Examples: Input: l = 2, r = 5 Output: 11 fib(2) + fib(3) + fib(4) + fib(5) = 1 + 2 + 3 + 5 = 11 Input: l = 4, r = 8 Output: 50 Naive approach: Simply calculate fi...
[ { "code": null, "e": 54, "s": 26, "text": "\n09 Jun, 2022" }, { "code": null, "e": 196, "s": 54, "text": "Given a range [l, r], the task is to find the sum fib(l) + fib(l + 1) + fib(l + 2) + ..... + fib(r) where fib(n) is the nth Fibonacci number." }, { "code": null, ...
Thread Safety and how to achieve it in Java
24 Jun, 2021 As we know Java has a feature, Multithreading, which is a process of running multiple threads simultaneously. When multiple threads are working on the same data, and the value of our data is changing, that scenario is not thread-safe and we will get inconsistent results. When a thread is already working on...
[ { "code": null, "e": 54, "s": 26, "text": "\n24 Jun, 2021" }, { "code": null, "e": 472, "s": 54, "text": "As we know Java has a feature, Multithreading, which is a process of running multiple threads simultaneously. When multiple threads are working on the same data, and the valu...
How to swap columns of a given NumPy array?
22 Jun, 2021 In this article, let’s discuss how to swap columns of a given NumPy array. Approach : Import NumPy module Create a NumPy array Swap the column with Index Print the Final array Example 1: Swapping the column of an array. Python3 # importing Moduleimport numpy as np # creating array with shape(4,3)my_array...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Jun, 2021" }, { "code": null, "e": 103, "s": 28, "text": "In this article, let’s discuss how to swap columns of a given NumPy array." }, { "code": null, "e": 114, "s": 103, "text": "Approach :" }, { "code"...
HTML | <Iframe> frameborder Attribute
19 Sep, 2019 The HTML Iframe frameborder Attribute is used to specify whether or not to display the border around the content of an <Iframe> Element. Syntax: <iframe frameborder="1 | 0"> Attribute Values: 0: It has a Default value. It sets the border on one state. 1: It sets the border on-off state. Note: This attribut...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Sep, 2019" }, { "code": null, "e": 165, "s": 28, "text": "The HTML Iframe frameborder Attribute is used to specify whether or not to display the border around the content of an <Iframe> Element." }, { "code": null, "e": 1...
A Programmer’s approach of looking at Array vs. Linked List
22 Jun, 2022 In general, the array is considered a data structure for which size is fixed at the compile time, and array memory is allocated either from the Data section (e.g. global array) or Stack section (e.g. local array). Similarly, a linked list is considered a data structure for which size is not fixed and memor...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Jun, 2022" }, { "code": null, "e": 719, "s": 54, "text": "In general, the array is considered a data structure for which size is fixed at the compile time, and array memory is allocated either from the Data section (e.g. global arra...
MongoDB - Aggregation
Aggregations operations process data records and return computed results. Aggregation operations group values from multiple documents together, and can perform a variety of operations on the grouped data to return a single result. In SQL count(*) and with group by is an equivalent of MongoDB aggregation. For the aggreg...
[ { "code": null, "e": 2993, "s": 2687, "text": "Aggregations operations process data records and return computed results. Aggregation operations group values from multiple documents together, and can perform a variety of operations on the grouped data to return a single result. In SQL count(*) and wi...
Python | Intersection of two lists
01 Sep, 2021 Intersection of two list means we need to take all those elements which are common to both of the initial lists and store them into another list. Now there are various ways in Python, through which we can perform the Intersection of the lists. Examples: Input : lst1 = [15, 9, 10, 56, 23, 78, 5, 4, 9] ls...
[ { "code": null, "e": 53, "s": 25, "text": "\n01 Sep, 2021" }, { "code": null, "e": 309, "s": 53, "text": "Intersection of two list means we need to take all those elements which are common to both of the initial lists and store them into another list. Now there are various ways i...
Elements that occurred only once in the array
20 May, 2021 Given an array arr that has numbers appearing twice or once. The task is to identify numbers that occur only once in the array. Note: Duplicates appear side by side every time. There might be a few numbers that can occur at one time and just assume this is a right rotating array (just say an array can rot...
[ { "code": null, "e": 52, "s": 24, "text": "\n20 May, 2021" }, { "code": null, "e": 181, "s": 52, "text": "Given an array arr that has numbers appearing twice or once. The task is to identify numbers that occur only once in the array. " }, { "code": null, "e": 443, ...
Timeline Component in React.js
31 Mar, 2021 Timelines are often used in user interfaces to illustrate a step-by-step procedure. It can describe to the user which stage of the process they currently are and what the further tasks are. Material UI labs module provide a Timeline component along with some other utility components to make this very easy ...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Mar, 2021" }, { "code": null, "e": 364, "s": 28, "text": "Timelines are often used in user interfaces to illustrate a step-by-step procedure. It can describe to the user which stage of the process they currently are and what the furt...
HTML | DOM Input Radio disabled Property
17 Oct, 2019 The DOM Input Radio disabled Property is used to set or return whether the Radio Button must be disabled or not. A disabled Radio Button is un-clickable and unusable. It is a boolean attribute and used to reflect the HTML Disabled attribute. It is usually rendered in grey color by default in all the Browse...
[ { "code": null, "e": 53, "s": 25, "text": "\n17 Oct, 2019" }, { "code": null, "e": 364, "s": 53, "text": "The DOM Input Radio disabled Property is used to set or return whether the Radio Button must be disabled or not. A disabled Radio Button is un-clickable and unusable. It is a...
How to Fix: module ‘pandas’ has no attribute ‘dataframe’
19 Dec, 2021 In this article, we are going to see how to fix errors while creating dataframe ” module ‘pandas’ has no attribute ‘dataframe’”. To create dataframe we need to use DataFrame(). If we use dataframe it will throw an error because there is no dataframe attribute in pandas. The method is DataFrame(). We need t...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Dec, 2021" }, { "code": null, "e": 157, "s": 28, "text": "In this article, we are going to see how to fix errors while creating dataframe ” module ‘pandas’ has no attribute ‘dataframe’”." }, { "code": null, "e": 565, ...
set vs unordered_set in C++ STL
13 Jun, 2022 Pre-requisite : set in C++, unordered_set in C++ Differences : | set | unordered_set --------------------------------------------------------- Ordering | increasing order | no ordering | (by default) | Implementation | Self balancing BST ...
[ { "code": null, "e": 54, "s": 26, "text": "\n13 Jun, 2022" }, { "code": null, "e": 118, "s": 54, "text": "Pre-requisite : set in C++, unordered_set in C++ Differences : " }, { "code": null, "e": 667, "s": 118, "text": " | set | u...
Instruction Level Parallelism
02 Feb, 2022 Prerequisite – Introduction to Parallel Computing Instruction Level Parallelism (ILP) is used to refer to the architecture in which multiple operations can be performed parallelly in a particular process, with its own set of resources – address space, registers, identifiers, state, program counters. It ref...
[ { "code": null, "e": 53, "s": 25, "text": "\n02 Feb, 2022" }, { "code": null, "e": 103, "s": 53, "text": "Prerequisite – Introduction to Parallel Computing" }, { "code": null, "e": 651, "s": 103, "text": "Instruction Level Parallelism (ILP) is used to refer to...
How to Enable Authentication on MongoDB ?
21 Jul, 2021 Authentication is enforced when access control is enabled on a MongoDB deployment, requiring users to identify themselves. Users can only conduct activities that are defined by their roles when visiting a MongoDB deployment with access control enabled. The following tutorial utilizes the default authentica...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Jul, 2021" }, { "code": null, "e": 281, "s": 28, "text": "Authentication is enforced when access control is enabled on a MongoDB deployment, requiring users to identify themselves. Users can only conduct activities that are defined b...
Find three closest elements from given three sorted arrays
24 Sep, 2021 Given three sorted arrays A[], B[] and C[], find 3 elements i, j and k from A, B and C respectively such that max(abs(A[i] – B[j]), abs(B[j] – C[k]), abs(C[k] – A[i])) is minimized. Here abs() indicates absolute value. Example : Input: A[] = {1, 4, 10} B[] = {2, 15, 20} C[] = {10, 12} Output...
[ { "code": null, "e": 54, "s": 26, "text": "\n24 Sep, 2021" }, { "code": null, "e": 273, "s": 54, "text": "Given three sorted arrays A[], B[] and C[], find 3 elements i, j and k from A, B and C respectively such that max(abs(A[i] – B[j]), abs(B[j] – C[k]), abs(C[k] – A[i])) is min...
StringBuilder toString() method in Java with Examples
30 Aug, 2021 The toString() method of the StringBuilder class is the inbuilt method used to return a string representing the data contained by StringBuilder Object. A new String object is created and initialized to get the character sequence from this StringBuilder object and then String is returned by toString(). Subs...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Aug, 2021" }, { "code": null, "e": 429, "s": 28, "text": "The toString() method of the StringBuilder class is the inbuilt method used to return a string representing the data contained by StringBuilder Object. A new String object is ...
Machine Learning in C++
30 Jun, 2019 Most of us have C++ as our First Language but when it comes to something like Data Analysis and Machine Learning, Python becomes our go-to Language because of its simplicity and plenty of libraries of pre-written Modules.But can C++ be used for Machine Learning too? and If yes, then how? Pre-requisites: C+...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Jun, 2019" }, { "code": null, "e": 341, "s": 52, "text": "Most of us have C++ as our First Language but when it comes to something like Data Analysis and Machine Learning, Python becomes our go-to Language because of its simplicity ...
Top Information Security Attack Vectors
06 Jan, 2021 Information Security alludes to the cycles and procedures which are planned and executed to ensure print, electronic, or some other type of secret, private and touchy data or information from unapproved access, use, abuse, revelation, obliteration, change, or disturbance. An attack vector is a way or means...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 Jan, 2021" }, { "code": null, "e": 327, "s": 54, "text": "Information Security alludes to the cycles and procedures which are planned and executed to ensure print, electronic, or some other type of secret, private and touchy data or...
What is Event Capturing in JavaScript?
Event capturing is the event starts from top element to the target element. It is the opposite of Event bubbling, which starts from target element to the top element. In the following code, in body section three div elements are taken and a style got applied so as to make them nested. Add a event handler to each of the...
[ { "code": null, "e": 1354, "s": 1187, "text": "Event capturing is the event starts from top element to the target element. It is the opposite of Event bubbling, which starts from target element to the top element." }, { "code": null, "e": 1473, "s": 1354, "text": "In the followin...
Python | Ways to find all permutation of a string
23 Jul, 2021 Given a string, write a Python program to find out all possible permutations of a string. Let’s discuss a few methods to solve the problem.Method #1: Using Naive Method Python3 # Python code to demonstrate# to find all permutation of# a given string # Initialising stringini_str = "abc" # Printing initial...
[ { "code": null, "e": 52, "s": 24, "text": "\n23 Jul, 2021" }, { "code": null, "e": 223, "s": 52, "text": "Given a string, write a Python program to find out all possible permutations of a string. Let’s discuss a few methods to solve the problem.Method #1: Using Naive Method " ...
ReactJS | Using Babel
30 Mar, 2021 Now we know that what Babel is, we will focus on how to install it on your machine using node. Babel can be installed easily after following these simple steps. Requirements : A code editor like atom, sublime text or Visual studio code. Node should be installed on the machine with npm too. We will instal...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Mar, 2021" }, { "code": null, "e": 206, "s": 28, "text": "Now we know that what Babel is, we will focus on how to install it on your machine using node. Babel can be installed easily after following these simple steps. Requirements :...
Python | Ways to count number of substring in string
30 Jun, 2019 Given a string and a substring, write a Python program to find how many numbers of substring are there in the string (including overlapping cases). Let’s discuss a few methods below. Method #1: Using re.findall() # Python code to demonstrate # to count total number# of substring in string import re# Initi...
[ { "code": null, "e": 53, "s": 25, "text": "\n30 Jun, 2019" }, { "code": null, "e": 236, "s": 53, "text": "Given a string and a substring, write a Python program to find how many numbers of substring are there in the string (including overlapping cases). Let’s discuss a few method...
Perl | eq operator
07 May, 2019 ‘eq‘ operator in Perl is one of the string comparison operators used to check for the equality of the two strings. It is used to check if the string to its left is stringwise equal to the string to its right. Syntax: String1 eq String2 Returns: 1 if left argument is equal to the right argument Example 1: #...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 May, 2019" }, { "code": null, "e": 237, "s": 28, "text": "‘eq‘ operator in Perl is one of the string comparison operators used to check for the equality of the two strings. It is used to check if the string to its left is stringwise ...
HTTP headers | If-Match
21 May, 2020 The HTTP headers If-Match is request-type header. It is used to make the request conditional. If it matches one of the listed conditional ETags then the server will send back the requested resource for PUT and other non-safe methods, it will only upload the resource in this case. This ETag header uses a st...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 May, 2020" }, { "code": null, "e": 309, "s": 28, "text": "The HTTP headers If-Match is request-type header. It is used to make the request conditional. If it matches one of the listed conditional ETags then the server will send back ...
p5.js | save() Function
23 Aug, 2021 The save() function in p5.js is used to save to the file system by prompting a download to the computer. This function can be used to save text, images, JSON, CSV, wav, or HTML files. The default option is to save the current canvas as an image.The first parameter of the function can be specified various v...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Aug, 2021" }, { "code": null, "e": 697, "s": 28, "text": "The save() function in p5.js is used to save to the file system by prompting a download to the computer. This function can be used to save text, images, JSON, CSV, wav, or HTM...
Python Program to perform cross join in Pandas
10 Jul, 2020 In Pandas, there are parameters to perform left, right, inner or outer merge and join on two DataFrames or Series. However there’s no possibility as of now to perform a cross join to merge or join two methods using how="cross" parameter. Cross Join : Example 1: The above example is proven as follows # impo...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Jul, 2020" }, { "code": null, "e": 266, "s": 28, "text": "In Pandas, there are parameters to perform left, right, inner or outer merge and join on two DataFrames or Series. However there’s no possibility as of now to perform a cross ...
How to Zip a directory in PHP?
We can use PHP ZipArchive class in order to zipping and unzipping the folder in PHP. As of PHP 5.3, this class is inbuilt. For using in windows users need to enable php_zip.dll inside of php.ini. <?php //Enter the name of directory $pathdir = "Directory Name/"; //Enter the name to creating zipped directory $zipcr...
[ { "code": null, "e": 1383, "s": 1187, "text": "We can use PHP ZipArchive class in order to zipping and unzipping the folder in PHP. As of PHP 5.3, this class is inbuilt. For using in windows users need to enable php_zip.dll inside of php.ini." }, { "code": null, "e": 1862, "s": 1383,...
How to remove border radius from Select tag using Bootstrap ?
26 Jun, 2020 <select> Tag: The <select> component is used to make a drop-down list. The <select> component is most frequently used in a form, to gather user input. The name attribute is required to reference the form data after the form is submitted (in case you exclude the name attribute, no data from the drop-down li...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Jun, 2020" }, { "code": null, "e": 539, "s": 28, "text": "<select> Tag: The <select> component is used to make a drop-down list. The <select> component is most frequently used in a form, to gather user input. The name attribute is re...
Python | Titanic Data EDA using Seaborn
03 Aug, 2021 What is EDA? Exploratory Data Analysis (EDA) is a method used to analyze and summarize datasets. Majority of the EDA techniques involve the use of graphs. Titanic Dataset – It is one of the most popular datasets used for understanding machine learning basics. It contains information of all the passengers a...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Aug, 2021" }, { "code": null, "e": 183, "s": 28, "text": "What is EDA? Exploratory Data Analysis (EDA) is a method used to analyze and summarize datasets. Majority of the EDA techniques involve the use of graphs." }, { "code"...
Truncate a String using filter in Vue.js
15 Jul, 2021 In this article, we are going to learn how to truncate strings using filters in VueJS. Filters are a functionality provided by Vue components that let you apply formatting and transformations to any part of your template dynamic data. The filter property of the component is an object. A single filter is a ...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Jul, 2021" }, { "code": null, "e": 470, "s": 28, "text": "In this article, we are going to learn how to truncate strings using filters in VueJS. Filters are a functionality provided by Vue components that let you apply formatting and...
Python | Pandas Series.tolist()
01 Oct, 2018 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas tolist() is used to convert a series to list. Initially the series is of type pandas.c...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Oct, 2018" }, { "code": null, "e": 242, "s": 28, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages and makes imp...
How to Get a List of Class Attributes in Python?
30 Jan, 2020 A class is a user-defined blueprint or prototype from which objects are created. Classes provide a means of bundling data and functionality together. Creating a new class creates a new type of object, allowing new instances of that type to be made. Each class instance can have attributes attached to it for...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 Jan, 2020" }, { "code": null, "e": 471, "s": 54, "text": "A class is a user-defined blueprint or prototype from which objects are created. Classes provide a means of bundling data and functionality together. Creating a new class cre...
How to Specify a Date Format on Creating a Table and Fill it in SQL?
28 Nov, 2021 Whenever we work with databases, we find that almost every single table contains a Date column. After all, the date of the data plays an important role while analyzing it. Storing dates in a specific or understandable format is very important. In this article, we are going to learn how we can specify a Dat...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Nov, 2021" }, { "code": null, "e": 359, "s": 28, "text": "Whenever we work with databases, we find that almost every single table contains a Date column. After all, the date of the data plays an important role while analyzing it. Sto...
Java.lang.InheritableThreadLocal Class with Examples
22 May, 2018 The java.lang.InheritableThreadLocal class extends ThreadLocal to provide inheritance of values from parent thread to child thread: when a child thread is created, the child receives initial values for all inheritable thread-local variables for which the parent has values. Parent thread, ThreadLocal variab...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 May, 2018" }, { "code": null, "e": 302, "s": 28, "text": "The java.lang.InheritableThreadLocal class extends ThreadLocal to provide inheritance of values from parent thread to child thread: when a child thread is created, the child r...
TCS NQT Coding Questions & How Coding Task Evaluated in TCS NQT
24 Jan, 2022 To know more about the TCS NQT: TCS NQT – National Qualifier Test 1. How to solve the Coding Section in TCS NQT 2022? STEP by STEP guide to solving the coding section in TCS NQT 2022. STEP 1: Understanding the storyYou are given 30 minutes to write a program and clear all the test cases. Of this, spend th...
[ { "code": null, "e": 54, "s": 26, "text": "\n24 Jan, 2022" }, { "code": null, "e": 120, "s": 54, "text": "To know more about the TCS NQT: TCS NQT – National Qualifier Test" }, { "code": null, "e": 173, "s": 120, "text": "1. How to solve the Coding Section in T...
How to remove all white spaces from a string in PHP ?
27 May, 2020 Given a string element containing some spaces and the task is to remove all the spaces from the given string str in PHP. In order to do this task, we have the following methods in PHP: Method 1: Using str_replace() Method: The str_replace() method is used to replace all the occurrences of the search string...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 May, 2020" }, { "code": null, "e": 213, "s": 28, "text": "Given a string element containing some spaces and the task is to remove all the spaces from the given string str in PHP. In order to do this task, we have the following method...
How to Clone a Map in Java
21 Jan, 2019 Given a map, the task is to clone that map. Following are the 5 different ways to Clone a Map in Java. Example: {1=Geeks, 2=For, 3=Geeks} Method 1: Naive method1. Create an object for the class map.2. Put the elements into the map using the put() method.3. Again create another object for the class map.4. ...
[ { "code": null, "e": 54, "s": 26, "text": "\n21 Jan, 2019" }, { "code": null, "e": 98, "s": 54, "text": "Given a map, the task is to clone that map." }, { "code": null, "e": 157, "s": 98, "text": "Following are the 5 different ways to Clone a Map in Java." }...
How to Get substring from a column in PySpark Dataframe ?
09 Sep, 2021 In this article, we are going to see how to get the substring from the PySpark Dataframe column and how to create the new column and put the substring in that newly created column. We can get the substring of the column using substring() and substr() function. Syntax: substring(str,pos,len) df.col_name.sub...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Sep, 2021" }, { "code": null, "e": 209, "s": 28, "text": "In this article, we are going to see how to get the substring from the PySpark Dataframe column and how to create the new column and put the substring in that newly created co...