title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Java Examples - Remove an element
How to remove an element of array? Following example shows how to remove an element from array. import java.util.ArrayList; public class Main { public static void main(String[] args) { ArrayList objArray = new ArrayList(); objArray.clear(); objArray.add(0,"0th element"); objArray.add(1,"1st ...
[ { "code": null, "e": 2103, "s": 2068, "text": "How to remove an element of array?" }, { "code": null, "e": 2164, "s": 2103, "text": "Following example shows how to remove an element from array." }, { "code": null, "e": 2648, "s": 2164, "text": "import java.uti...
d-*-block class in Bootstrap 4
Use the d-*block class in Bootstrap to create block on a specific screen width. You can set it for small, medium, large, and extra large screen size − <span class="d-sm-block bg-primary"> d-sm-block </span> <span class="d-md-block bg-success"> d-md-block </span> <span class="d-lg-block bg-info"> d-lg-block </span...
[ { "code": null, "e": 1142, "s": 1062, "text": "Use the d-*block class in Bootstrap to create block on a specific screen width." }, { "code": null, "e": 1213, "s": 1142, "text": "You can set it for small, medium, large, and extra large screen size −" }, { "code": null, ...
Deep Learning Analysis Using Large Model Support | by Pier Paolo Ippolito | Towards Data Science
1 2 3 4 5 6 7 8 9 10 Powered by Play.ht Create audio with Play.ht Create Audio Narrations with Play.ht Memory management is now a really important topic in Machine Learning. Because of memory constraints, it is becoming quite common to train Deep Learning models using cloud tools such as Kaggle and Google Colab thanks ...
[ { "code": null, "e": 174, "s": 172, "text": "1" }, { "code": null, "e": 176, "s": 174, "text": "2" }, { "code": null, "e": 178, "s": 176, "text": "3" }, { "code": null, "e": 180, "s": 178, "text": "4" }, { "code": null, "e": 182...
Derive the string “abb” for leftmost and rightmost derivation
Let’s consider a grammar to derive “abb” string using LMD and RMD S->AB/ ε A-> aB B-> Sb We have to use context free grammar. Derivation is a sequence of production rules, which is used to get input strings. During parsing, we have to take two decisions, which are as follows − We have to decide which non-termi...
[ { "code": null, "e": 1128, "s": 1062, "text": "Let’s consider a grammar to derive “abb” string using LMD and RMD" }, { "code": null, "e": 1140, "s": 1128, "text": " S->AB/ ε" }, { "code": null, "e": 1150, "s": 1140, "text": " A-> aB" }, { "code": n...
How to get content of entire page using Selenium?
We can get the content of the entire page using Selenium. There are more than one ways of achieving it. To get the text of the visible on the page we can use the method findElement(By.tagname()) method to get hold of . Next can then use the getText() method to extract text from the body tag. Syntax − WebElement l=drive...
[ { "code": null, "e": 1355, "s": 1062, "text": "We can get the content of the entire page using Selenium. There are more than one ways of achieving it. To get the text of the visible on the page we can use the method findElement(By.tagname()) method to get hold of . Next can then use the getText() me...
C Program to list all files and sub-directories in a directory - GeeksforGeeks
20 May, 2017 #include <stdio.h>#include <dirent.h> int main(void){ struct dirent *de; // Pointer for directory entry // opendir() returns a pointer of DIR type. DIR *dr = opendir("."); if (dr == NULL) // opendir returns NULL if couldn't open directory { printf("Could not open current direc...
[ { "code": null, "e": 24232, "s": 24204, "text": "\n20 May, 2017" }, { "code": "#include <stdio.h>#include <dirent.h> int main(void){ struct dirent *de; // Pointer for directory entry // opendir() returns a pointer of DIR type. DIR *dr = opendir(\".\"); if (dr == NULL) // ...
Detecting low contrast images with OpenCV, scikit-image, and Python - GeeksforGeeks
04 Jan, 2022 In this article, we are going to see how to detect low contrast images with OpenCV, scikit-image using Python A low contrast image has the minimal distinction between light and dark parts, making it difficult to tell where an object’s boundary begins and the scene’s background begins. For example The left ...
[ { "code": null, "e": 25665, "s": 25637, "text": "\n04 Jan, 2022" }, { "code": null, "e": 25775, "s": 25665, "text": "In this article, we are going to see how to detect low contrast images with OpenCV, scikit-image using Python" }, { "code": null, "e": 25963, "s": ...
Materialize CSS | Typography - GeeksforGeeks
12 Jun, 2020 Materialize CSS provides several elements that can be used for the typography of the page: Headers Blockquotes Flow Text Headers: Materialize CSS provides basic styling to be used on the header tags. The tags below show the available header tags that are styled by Materialize CSS: <h1>Heading 1</h1> <h2>...
[ { "code": null, "e": 28046, "s": 28018, "text": "\n12 Jun, 2020" }, { "code": null, "e": 28137, "s": 28046, "text": "Materialize CSS provides several elements that can be used for the typography of the page:" }, { "code": null, "e": 28145, "s": 28137, "text": ...
Maximize profit that can be earned by selling an item among N buyers - GeeksforGeeks
05 Apr, 2022 Given an array arr[] of size N, the task is to find the price of the item such that the profit earned by selling the item among N buyers is maximum possible consisting of budgets of N buyers. An item can be sold to any buyer if the budget of the buyer is greater than or equal to the price of the item. Exam...
[ { "code": null, "e": 24574, "s": 24546, "text": "\n05 Apr, 2022" }, { "code": null, "e": 24877, "s": 24574, "text": "Given an array arr[] of size N, the task is to find the price of the item such that the profit earned by selling the item among N buyers is maximum possible consis...
How to display most frequent value in a Pandas series? - GeeksforGeeks
18 Aug, 2020 In this article, our basic task is to print the most frequent value in a series. We can find the number of occurrences of elements using the value_counts() method. From that the most frequent element can be accessed by using the mode() method. Example 1 : # importing the moduleimport pandas as pd # creat...
[ { "code": null, "e": 25647, "s": 25619, "text": "\n18 Aug, 2020" }, { "code": null, "e": 25891, "s": 25647, "text": "In this article, our basic task is to print the most frequent value in a series. We can find the number of occurrences of elements using the value_counts() method....
HTTP headers | Connection - GeeksforGeeks
07 Nov, 2019 The HTTP Connection header is a general type header that allows the sender or client to specify options that are desired for that particular connection. Instead of opening a new connection for every single request/response, Connection helps in sending or receiving multiple HTTP requests/responses using a s...
[ { "code": null, "e": 24906, "s": 24878, "text": "\n07 Nov, 2019" }, { "code": null, "e": 25339, "s": 24906, "text": "The HTTP Connection header is a general type header that allows the sender or client to specify options that are desired for that particular connection. Instead of...
Using KDTree to detect similarities in a multidimensional dataset | by Thomas Vie | Towards Data Science
Most of data science is oriented towards the Train, Test, Predict paradigm. Who doesn’t want to guess the future! But there are some cases where other implementations are needed like unsupervised classification or discovering patterns in existing data. In other words, how to take advantage of the data which is already ...
[ { "code": null, "e": 374, "s": 47, "text": "Most of data science is oriented towards the Train, Test, Predict paradigm. Who doesn’t want to guess the future! But there are some cases where other implementations are needed like unsupervised classification or discovering patterns in existing data. In ...
Node.js console.timeStamp() Method - GeeksforGeeks
06 Sep, 2020 The console module provides a simple debugging console that is provided by web browsers which export two specific components: A Console class that can be used to write to any Node.js stream. Example: console.log(), console.error(), etc. A global console that can be used without importing console. Example...
[ { "code": null, "e": 26449, "s": 26418, "text": " \n06 Sep, 2020\n" }, { "code": null, "e": 26575, "s": 26449, "text": "The console module provides a simple debugging console that is provided by web browsers which export two specific components:" }, { "code": null, "e...
C program to calculate range of values and an average cost of a personal system.
A personal system is sold at different costs by the vendors. Let’s take the list of costs (in hundreds) quoted by some vendors − 25.00, 30.50, 15.00, 28.25, 58.15, 37.00, 16.65, 42.00 68.45, 53.50 Calculate the average cost and range of values. The difference between the highest and the lowest values in the series is c...
[ { "code": null, "e": 1123, "s": 1062, "text": "A personal system is sold at different costs by the vendors." }, { "code": null, "e": 1191, "s": 1123, "text": "Let’s take the list of costs (in hundreds) quoted by some vendors −" }, { "code": null, "e": 1226, "s": 1...
accumulate() and partial_sum() in C++ STL : Numeric header - GeeksforGeeks
04 Jan, 2022 The numeric header is part of the numeric library in C++ STL. This library consists of basic mathematical functions and types, as well as optimized numeric arrays and support for random number generation. Some of the functions in the numeric header: iota accumulate reduce inner_product partial_sum etc. Thi...
[ { "code": null, "e": 24572, "s": 24544, "text": "\n04 Jan, 2022" }, { "code": null, "e": 24822, "s": 24572, "text": "The numeric header is part of the numeric library in C++ STL. This library consists of basic mathematical functions and types, as well as optimized numeric arrays ...
Data Transformation in PySpark. A step by step walkthrough of certain... | by Neel Iyer | Towards Data Science
Data is now growing faster than processing speeds. One of the many solutions to this problem is to parallelise our computing on large clusters. Enter PySpark. However, PySpark requires you to think about data differently. Instead of looking at a dataset row-wise. PySpark encourages you to look at it column-wise. This w...
[ { "code": null, "e": 330, "s": 171, "text": "Data is now growing faster than processing speeds. One of the many solutions to this problem is to parallelise our computing on large clusters. Enter PySpark." }, { "code": null, "e": 393, "s": 330, "text": "However, PySpark requires y...
brk() - Unix, Linux System Call
Unix - Home Unix - Getting Started Unix - File Management Unix - Directories Unix - File Permission Unix - Environment Unix - Basic Utilities Unix - Pipes & Filters Unix - Processes Unix - Communication Unix - The vi Editor Unix - What is Shell? Unix - Using Variables Unix - Special Variables Unix - Using Arrays Unix -...
[ { "code": null, "e": 1466, "s": 1454, "text": "Unix - Home" }, { "code": null, "e": 1489, "s": 1466, "text": "Unix - Getting Started" }, { "code": null, "e": 1512, "s": 1489, "text": "Unix - File Management" }, { "code": null, "e": 1531, "s": 1...
The Top 7 Best Github Repositories to Learn Python | by Byron Dolon | Towards Data Science
All roads lead to GitHub. You may remember a similar article I published called “Top 4 Repositories on GitHub to Learn Pandas”. There, I said I was afraid of using anything more than git commit + git push because GitHub is scary. I’ve progressed a little bit: now I remember to hit git pull every time I have fresh work ...
[ { "code": null, "e": 73, "s": 47, "text": "All roads lead to GitHub." }, { "code": null, "e": 508, "s": 73, "text": "You may remember a similar article I published called “Top 4 Repositories on GitHub to Learn Pandas”. There, I said I was afraid of using anything more than git co...
Tracking current Maximum Element in a Stack
19 Jan, 2022 Given a Stack, keep track of the maximum value in it. The maximum value may be the top element of the stack, but once a new element is pushed or an element is popped from the stack, the maximum element will be now from the rest of the elements.Examples: Input : 4 19 7 14 20 Output : Max Values in stack a...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Jan, 2022" }, { "code": null, "e": 308, "s": 52, "text": "Given a Stack, keep track of the maximum value in it. The maximum value may be the top element of the stack, but once a new element is pushed or an element is popped from the...
Kotlin | Lambdas Expressions and Anonymous Functions
09 May, 2022 In this article, we are going to learn lambdas expression and anonymous function in Kotlin. While syntactically similar, Kotlin and Java lambdas have very different features. Lambdas expression and Anonymous function both are function literals means these functions are not declared but passed immediately ...
[ { "code": null, "e": 52, "s": 24, "text": "\n09 May, 2022" }, { "code": null, "e": 228, "s": 52, "text": "In this article, we are going to learn lambdas expression and anonymous function in Kotlin. While syntactically similar, Kotlin and Java lambdas have very different features....
GATE CS 2019 - GeeksforGeeks
06 Oct, 2021 The data breaks down into three main categories. revolve: move in a circle on a central axis. play: engage in activity for enjoyment and recreation rather than a serious or practical purpose. sink: go down below the surface of something, especially of a liquid; become submerged. burst: break open or apart ...
[ { "code": null, "e": 29577, "s": 29549, "text": "\n06 Oct, 2021" }, { "code": null, "e": 29626, "s": 29577, "text": "The data breaks down into three main categories." }, { "code": null, "e": 29671, "s": 29626, "text": "revolve: move in a circle on a central ax...
Django Interview Questions & Answers With Practical Tips For Junior Developers
09 Sep, 2021 Django... Isn’t it your favorite framework? (especially if you are new to the programming world) Yes! It is... Did you try to learn this framework and build some projects? If the answer is Yes then here is the next question... Did you understand the complete flow of the project? Again if the answer is Yes ...
[ { "code": null, "e": 52, "s": 24, "text": "\n09 Sep, 2021" }, { "code": null, "e": 149, "s": 52, "text": "Django... Isn’t it your favorite framework? (especially if you are new to the programming world)" }, { "code": null, "e": 163, "s": 149, "text": "Yes! It ...
Use EJS as Template Engine in Node.js
09 Jul, 2021 EJS: EJS or Embedded Javascript Templating is a templating engine used by Node.js. Template engine helps to create an HTML template with minimal code. Also, it can inject data into HTML template at the client side and produce the final HTML. EJS is a simple templating language which is used to generate HTM...
[ { "code": null, "e": 52, "s": 24, "text": "\n09 Jul, 2021" }, { "code": null, "e": 531, "s": 52, "text": "EJS: EJS or Embedded Javascript Templating is a templating engine used by Node.js. Template engine helps to create an HTML template with minimal code. Also, it can inject dat...
PostgreSQL – Copy Table
28 Aug, 2020 PostgreSQL allows copying an existing table including the table structure and data by using various forms of PostgreSQL copy table statement. To copy a table completely, including both table structure and data sue the below statement. Syntax: CREATE TABLE new_table AS TABLE existing_table; To copy a table...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Aug, 2020" }, { "code": null, "e": 263, "s": 28, "text": "PostgreSQL allows copying an existing table including the table structure and data by using various forms of PostgreSQL copy table statement. To copy a table completely, inclu...
JavaScript Array indexOf() Method
28 Jan, 2022 Below is the example of the Array indexOf() method. Example: javascript <script> var name = [ 'gfg', 'cse', 'geeks', 'portal' ]; a = name.indexOf('gfg') // Printing result of method document.write(a);</script> Output: 0 The arr.indexOf() method is used to find the index of the first occ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jan, 2022" }, { "code": null, "e": 82, "s": 28, "text": "Below is the example of the Array indexOf() method. " }, { "code": null, "e": 93, "s": 82, "text": "Example: " }, { "code": null, "e": 104, ...
Python | Sympy Line.angle_between method
30 Jan, 2020 Syntax: Line.angle_between(l2) Parameters: l1: LinearEntity l2: LinearEntity Returns: angle: angle in radians Notes: From the dot product of vectors v1 and v2 it is known that: dot(v1, v2) = |v1|*|v2|*cos(A)where A is the angle formed between the two vectors. We can get the directional vectors of ...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jan, 2020" }, { "code": null, "e": 147, "s": 28, "text": "Syntax: Line.angle_between(l2)\n\n Parameters: \n l1: LinearEntity\n l2: LinearEntity\n\nReturns:\n angle: angle in radians" }, { "code": null, "e": 417, "s"...
How to plot a histogram with various variables in Matplotlib in Python?
04 Jan, 2022 In this article, we are going to see how to plot a histogram with various variables in Matplotlib using Python. A histogram is a visual representation of data presented in the form of groupings. It is a precise approach for displaying numerical data distribution graphically. It’s a type of bar plot in whic...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Jan, 2022" }, { "code": null, "e": 140, "s": 28, "text": "In this article, we are going to see how to plot a histogram with various variables in Matplotlib using Python." }, { "code": null, "e": 456, "s": 140, "te...
Matplotlib.axis.Axis.set_label() function in Python
05 Jun, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. The Axis.set_label() function in axis module of matplotlib library is used to set the ...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Jun, 2020" }, { "code": null, "e": 249, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and u...
Twitter Automation using Selenium Python
05 Oct, 2021 If you are someone like me who considers Twitter to be far better than Instagram, then I might be having something for you. We all know gaining followers on twitter can be pretty tough but sometimes retweeting quality content can gain you, followers, too. Obviously, you are a busy person and you don’t have...
[ { "code": null, "e": 54, "s": 26, "text": "\n05 Oct, 2021" }, { "code": null, "e": 571, "s": 54, "text": "If you are someone like me who considers Twitter to be far better than Instagram, then I might be having something for you. We all know gaining followers on twitter can be pr...
How to Convert ASCII Char to Byte in C#?
28 May, 2020 Given a char, the task is to convert this ASCII character into a Byte in C#. Examples: Input: chr = 'a' Output: 97 Input: chr = 'H' Output: 72 Method 1: Naive Approach Step 1: Get the character. Step 2: Convert the character using the Byte struct byte b = (byte) chr; Step 3: Return or perform the oper...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 May, 2020" }, { "code": null, "e": 105, "s": 28, "text": "Given a char, the task is to convert this ASCII character into a Byte in C#." }, { "code": null, "e": 115, "s": 105, "text": "Examples:" }, { "code...
Get Month from date in Pandas – Python
02 Jul, 2020 Pandas has many inbuilt methods that can be used to extract the month from a given date that are being generated randomly using the random function or by using Timestamp function or that are transformed to date format using the to_datetimefunction. Let’s see few examples for better understanding. Example 1...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Jul, 2020" }, { "code": null, "e": 326, "s": 28, "text": "Pandas has many inbuilt methods that can be used to extract the month from a given date that are being generated randomly using the random function or by using Timestamp funct...
Double SAT is NP Complete
14 Oct, 2020 Problem Statement: Given a formula f, the problem is to determine if f has two satisfying assignments. Explanation: An instance of the problem is an input specified to the problem. An instance of Double Sat problem is a boolean formula f. Since an NP-complete problem is a problem which is both NP and NP-Ha...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Oct, 2020" }, { "code": null, "e": 131, "s": 28, "text": "Problem Statement: Given a formula f, the problem is to determine if f has two satisfying assignments." }, { "code": null, "e": 415, "s": 131, "text": "Exp...
Text Generation with Pretrained GPT2 Using PyTorch | by Raymond Cheng | Towards Data Science
Text Generation is one of the most exciting applications of Natural Language Processing (NLP) in recent years. Most of us have probably heard of GPT-3, a powerful language model that can possibly generate close to human-level texts. However, models like these are extremely difficult to train because of their heavy size...
[ { "code": null, "e": 555, "s": 172, "text": "Text Generation is one of the most exciting applications of Natural Language Processing (NLP) in recent years. Most of us have probably heard of GPT-3, a powerful language model that can possibly generate close to human-level texts. However, models like t...
How to remove all CSS classes using jQuery?
To remove all classes, use the removeClass() method with no parameters. This will remove all of the item's classes. You can try to run the following code to remove all CSS classes using jQuery: Live Demo <html> <head> <title>jQuery Selector</title> <script src = "https://ajax.googleapis.com/ajax/libs/jqu...
[ { "code": null, "e": 1178, "s": 1062, "text": "To remove all classes, use the removeClass() method with no parameters. This will remove all of the item's classes." }, { "code": null, "e": 1256, "s": 1178, "text": "You can try to run the following code to remove all CSS classes us...
SAP Cloud Platform - Quick Guide
SAP Cloud Platform is a cloud service provided by SAP based on platform as a service (PaaS) to develop and deploy custom web applications. SAP is responsible for managing complete infrastructure of this platform including hardware servers, maintenance cost, component upgrades, and system lifecycle. SAP Cloud service pr...
[ { "code": null, "e": 2423, "s": 2123, "text": "SAP Cloud Platform is a cloud service provided by SAP based on platform as a service (PaaS) to develop and deploy custom web applications. SAP is responsible for managing complete infrastructure of this platform including hardware servers, maintenance c...
Matplotlib.figure.Figure.set_size_inches() in Python - GeeksforGeeks
03 May, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains all the plot elements. This module is used to control the default spacing of the subplots and top level container for all plot elemen...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n03 May, 2020" }, { "code": null, "e": 24212, "s": 23901, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, whic...
How to assign values to variables in C#?
A variable is a name given to a storage area that our programs can manipulate. Each variable in C# has a specific type, which determines the size and layout of the variable's memory the range of values that can be stored within that memory and the set of operations that can be applied to the variable. To assign values ...
[ { "code": null, "e": 1365, "s": 1062, "text": "A variable is a name given to a storage area that our programs can manipulate. Each variable in C# has a specific type, which determines the size and layout of the variable's memory the range of values that can be stored within that memory and the set o...
CSS - Tada Effect
It provides to move an element from side to side. @keyframes tada { 0% {transform: scale(1);} 10%, 20% {transform: scale(0.9) rotate(-3deg);} 30%, 50%, 70%, 90% {transform: scale(1.1) rotate(3deg);} 40%, 60%, 80% {transform: scale(1.1) rotate(-3deg);} 100% {transform: scale(1) rotate(0);} } Transfo...
[ { "code": null, "e": 2676, "s": 2626, "text": "It provides to move an element from side to side." }, { "code": null, "e": 2939, "s": 2676, "text": "@keyframes tada {\n 0% {transform: scale(1);} \n 10%, 20% {transform: scale(0.9) rotate(-3deg);} \n 30%, 50%, 70%, 90% {transf...
How to Display the List of Sensors Present in an Android Device Programmatically? - GeeksforGeeks
23 Feb, 2021 All Android devices produced worldwide come with built-in sensors that measure motion, orientation, and various environmental conditions. These sensors generally facilitate Android architecture by providing the data from the sensor for various applications. For example, a temperature sensor provides the de...
[ { "code": null, "e": 25406, "s": 25378, "text": "\n23 Feb, 2021" }, { "code": null, "e": 25899, "s": 25406, "text": "All Android devices produced worldwide come with built-in sensors that measure motion, orientation, and various environmental conditions. These sensors generally f...
DataPrep.Clean: Accelerate Your Data Cleaning | by Brandon Lockhart | Towards Data Science
Authors: Brandon Lockhart and Alice Lin DataPrep is a library that aims to provide the easiest way to prepare data in Python. To address the onerous data cleaning step of data preparation, DataPrep has developed a new component: DataPrep.Clean. DataPrep.Clean contains simple and efficient functions for cleaning, standa...
[ { "code": null, "e": 212, "s": 172, "text": "Authors: Brandon Lockhart and Alice Lin" }, { "code": null, "e": 417, "s": 212, "text": "DataPrep is a library that aims to provide the easiest way to prepare data in Python. To address the onerous data cleaning step of data preparatio...
BeautifulSoup CSS selector - Selecting nth child - GeeksforGeeks
26 Mar, 2021 In this article, we will see how beautifulsoup can be employed to select nth-child. For this, select() methods of the module are used. The select() method uses the SoupSieve package to use the CSS selector against the parsed document. Syntax: select(“css_selector”) CSS SELECTOR: nth-of-type(n): Selects the...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n26 Mar, 2021" }, { "code": null, "e": 24527, "s": 24292, "text": "In this article, we will see how beautifulsoup can be employed to select nth-child. For this, select() methods of the module are used. The select() method uses the...
Dynamically change TableView Cell height in Swift
To change the height of tableView cell in ios dynamically, i.e resizing the cell according to the content available, we’ll need to make use of automatic dimension property. We’ll see this with the help of an sample project. Create an empty project and go to it’s viewController class, conform it to UITableViewDataSource...
[ { "code": null, "e": 1286, "s": 1062, "text": "To change the height of tableView cell in ios dynamically, i.e resizing the cell according to the content available, we’ll need to make use of automatic dimension property. We’ll see this with the help of an sample project." }, { "code": null, ...
How to delete all the file contents using PowerShell?
If you want to delete the entire text file content using PowerShell, then we can use the Clear-Content command. For example, we have the below text file called Locations.txt on the C:\Temp path. You can check the content using the below file. Get-Content C:\temp\locations.txt To clear the file content, we can use the b...
[ { "code": null, "e": 1305, "s": 1062, "text": "If you want to delete the entire text file content using PowerShell, then we can use the Clear-Content command. For example, we have the below text file called Locations.txt on the C:\\Temp path. You can check the content using the below file." }, {...
How to create a dashed horizontal line in a ggplot2 graph in R?
To create a dashed horizontal line in a ggplot2 graph in R, we can follow the below steps − First of all, create a data frame. Then, create a plot using ggplot2. After that, create the same plot with geom_hline function having horizontal line defined with y intercept and its type defined with line type argument. Let's ...
[ { "code": null, "e": 1154, "s": 1062, "text": "To create a dashed horizontal line in a ggplot2 graph in R, we can follow the below steps −" }, { "code": null, "e": 1189, "s": 1154, "text": "First of all, create a data frame." }, { "code": null, "e": 1224, "s": 118...
Build Your Own Convolution Neural Network in 5 mins | by Rohith Gandhi | Towards Data Science
Before answering what a convolutional neural network is, I believe you guys are aware of what neural networks are. If you are shaky on the basics, check out this link. Moving on. A convolution neural network is similar to a multi-layer perceptron network. The major differences are what the network learns, how they are ...
[ { "code": null, "e": 851, "s": 172, "text": "Before answering what a convolutional neural network is, I believe you guys are aware of what neural networks are. If you are shaky on the basics, check out this link. Moving on. A convolution neural network is similar to a multi-layer perceptron network....
Change grid line thickness in 3D surface plot in Python - Matplotlib - GeeksforGeeks
14 Sep, 2021 Prerequisites: Matplotlib Using Matplotlib library we can plot the three-dimensional plot by importing the mplot3d toolkit. In this plot, we are going the change the thickness of the gridline in a three-dimensional surface plot. Surface Plot is the diagram of 3D data it shows the functional relationship be...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n14 Sep, 2021" }, { "code": null, "e": 24318, "s": 24292, "text": "Prerequisites: Matplotlib" }, { "code": null, "e": 24721, "s": 24318, "text": "Using Matplotlib library we can plot the three-dimensional plot ...
Double.ToString Method in C#
The Double.ToString() method in C# is used to convert the numeric value of this instance to its equivalent string representation. Following is the syntax − public override string ToString (); Let us now see an example to implement the Double.ToString() method − using System; public class Demo{ public static void Mai...
[ { "code": null, "e": 1192, "s": 1062, "text": "The Double.ToString() method in C# is used to convert the numeric value of this instance to its equivalent string representation." }, { "code": null, "e": 1218, "s": 1192, "text": "Following is the syntax −" }, { "code": null...
How to add a new column in an R data frame by combining two columns with a special character?
A data frame can have multiple types of column and some of them could be combined to make a single column based on their characteristics. For example, if a column has characters and the other has numbers then we might want to join them by separating with a special character to showcase them as an identity. Consider the...
[ { "code": null, "e": 1370, "s": 1062, "text": "A data frame can have multiple types of column and some of them could be combined to make a single column based on their characteristics. For example, if a column has characters and the other has numbers then we might want to join them by separating wit...
jQuery replaceWith() with Examples
The replaceWith() method in jQuery is used to replace selected elements with new content. The syntax is as follows − $(selector).replaceWith(content,function(index)) Above, the content parameter is the content to insert, whereas function is to return the content to replace. Let us now see an example to implement the jQ...
[ { "code": null, "e": 1152, "s": 1062, "text": "The replaceWith() method in jQuery is used to replace selected elements with new content." }, { "code": null, "e": 1179, "s": 1152, "text": "The syntax is as follows −" }, { "code": null, "e": 1228, "s": 1179, "te...
Cycle Sort - GeeksforGeeks
25 Mar, 2021 Cycle sort is an in-place sorting Algorithm, unstable sorting algorithm, a comparison sort that is theoretically optimal in terms of the total number of writes to the original array. It is optimal in terms of number of memory writes. It minimizes the number of memory writes to sort (Each value is either ...
[ { "code": null, "e": 23465, "s": 23437, "text": "\n25 Mar, 2021" }, { "code": null, "e": 23650, "s": 23465, "text": "Cycle sort is an in-place sorting Algorithm, unstable sorting algorithm, a comparison sort that is theoretically optimal in terms of the total number of writes to ...
Count maximum possible pairs from an array having sum K - GeeksforGeeks
17 Nov, 2021 Given an array arr[] consisting of N integers and an integer K, the task is to find the maximum number of pairs having a sum K possible from the given array. Note: Every array element can be part of a single pair. Examples: Input: arr[] = {1, 2, 3, 4}, K = 5Output: 2Explanation: Pairs with sum K from the ...
[ { "code": null, "e": 24796, "s": 24768, "text": "\n17 Nov, 2021" }, { "code": null, "e": 24955, "s": 24796, "text": "Given an array arr[] consisting of N integers and an integer K, the task is to find the maximum number of pairs having a sum K possible from the given array. " }...
Transfer Learning using VGG Pre-trained model with Keras | Towards Data Science
Transfer learning is one of the state-of-the-art techniques in machine learning that has been widely used in image classification. In this article, I will discuss transfer learning, the VGG model, and feature extraction. In the last section, I will demonstrate an interesting example of transfer learning where the trans...
[ { "code": null, "e": 593, "s": 171, "text": "Transfer learning is one of the state-of-the-art techniques in machine learning that has been widely used in image classification. In this article, I will discuss transfer learning, the VGG model, and feature extraction. In the last section, I will demons...
Mastering catplot() in Seaborn with categorical plots | Towards Data Science
The goal of this article is to introduce you to the most common categorical plots using Seaborn’s catplot() function. While doing Exploratory or Explanatory data analysis, you will have to choose from a wide range of plot types. Choosing one which depicts the relationships in your data accurately can be tricky. If you ...
[ { "code": null, "e": 290, "s": 172, "text": "The goal of this article is to introduce you to the most common categorical plots using Seaborn’s catplot() function." }, { "code": null, "e": 485, "s": 290, "text": "While doing Exploratory or Explanatory data analysis, you will have ...
NLP with CNNs. Convolutional neural networks (CNNs)... | by Taha Binhuraib | Towards Data Science
Convolutional neural networks (CNNs) are the most widely used deep learning architectures in image processing and image recognition. Given their supremacy in the field of vision, it’s only natural that implementations on different fields of machine learning would be tried. In this article, I will try to explain the imp...
[ { "code": null, "e": 649, "s": 172, "text": "Convolutional neural networks (CNNs) are the most widely used deep learning architectures in image processing and image recognition. Given their supremacy in the field of vision, it’s only natural that implementations on different fields of machine learni...
Python Program for Extended Euclidean algorithms
In this article, we will learn about the solution to the problem statement given below. Problem statement − Given two numbers we need to calculate gcd of those two numbers and display them. GCD Greatest Common Divisor of two numbers is the largest number that can divide both of them. Here we follow the euclidean approa...
[ { "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 − Given two numbers we need to calculate gcd of those two numbers and displa...
Checking the Given File Exists or Not in Golang - GeeksforGeeks
23 Mar, 2020 In Go language, you are allowed to check whether the given file exists or not with the help of the IsNotExist() function. If this function returns true, then it indicates that the error is known to report that the specified file or directory already does not exist and if it returns false, then it indicates...
[ { "code": null, "e": 24460, "s": 24432, "text": "\n23 Mar, 2020" }, { "code": null, "e": 25005, "s": 24460, "text": "In Go language, you are allowed to check whether the given file exists or not with the help of the IsNotExist() function. If this function returns true, then it in...
Python Program for Print Number series without using any loop
04 May, 2022 Problem – Givens Two number N and K, our task is to subtract a number K from N until number(N) is greater than zero, once the N becomes negative or zero then we start adding K until that number become the original number(N). Note : Not allow to use any loop. Examples : Input : N = 15 K = 5 Output : 15 10...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 May, 2022" }, { "code": null, "e": 298, "s": 28, "text": "Problem – Givens Two number N and K, our task is to subtract a number K from N until number(N) is greater than zero, once the N becomes negative or zero then we start adding K...
Fall Through Condition in Java
11 Feb, 2021 The switch statement is a multi-way branch statement. It provides an easy way to dispatch execution to different parts of code based on the value of the expression. Basically, the expression can be a byte, short, char, and int primitive data types. Beginning with JDK7, it also works with enumerated types (...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Feb, 2021" }, { "code": null, "e": 391, "s": 28, "text": "The switch statement is a multi-way branch statement. It provides an easy way to dispatch execution to different parts of code based on the value of the expression. Basically,...
Goldman Sachs Interview Experience (1.8 Years of Experience )
21 Jun, 2021 I was contacted by HR on LinkedIn Round 1(Online Coding Round): Hackerrank platform 1 hour 30 min Given an input string, write a function that returns the Run Length Encoded string for the input string.For example, if the input string is “wwwwaaadexxxxxx”, then the function should return “w4a3d1e1x6” Exp...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jun, 2021" }, { "code": null, "e": 86, "s": 52, "text": "I was contacted by HR on LinkedIn" }, { "code": null, "e": 150, "s": 86, "text": "Round 1(Online Coding Round): Hackerrank platform 1 hour 30 min" }, {...
How to use ToggleButtonGroup Component in ReactJS ?
08 Apr, 2021 Whenever the user wants to group a related option, the ToggleButtonGroup component is used. Material UI for ReactJS has this component available for us, and it is very easy to integrate. We can use the following approach in ReactJS to use ToggleButtonGroup component. Creating React Application And Installi...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Apr, 2021" }, { "code": null, "e": 296, "s": 28, "text": "Whenever the user wants to group a related option, the ToggleButtonGroup component is used. Material UI for ReactJS has this component available for us, and it is very easy to...
How to set a click event once a page or view is loaded in vue.js?
22 Jan, 2021 In this article, we will discuss how to set a click event once a page or view is loaded in vue.js. Just like every other JavaScript framework Vue also supports the Mounting hooks. Mounting hooks are often the most used hooks. They allow us to access or modify the DOM of your component just before or after ...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Jan, 2021" }, { "code": null, "e": 354, "s": 28, "text": "In this article, we will discuss how to set a click event once a page or view is loaded in vue.js. Just like every other JavaScript framework Vue also supports the Mounting ho...
How to Implement Stack in Java Using Array and Generics?
13 Oct, 2021 Stack is a linear Data Structure that is based on the LIFO concept (last in first out). Instead of only an Integer Stack, Stack can be of String, Character, or even Float type. There are 4 primary operations in the stack as follows: push() Method adds element x to the stack.pop() Method removes the last el...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Oct, 2021" }, { "code": null, "e": 285, "s": 52, "text": "Stack is a linear Data Structure that is based on the LIFO concept (last in first out). Instead of only an Integer Stack, Stack can be of String, Character, or even Float typ...
implicitly_wait driver method – Selenium Python
15 May, 2020 Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout – Navigating links using get method – Selenium Python. Just being able ...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 May, 2020" }, { "code": null, "e": 767, "s": 28, "text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium ...
WTF is Sensor Fusion? The good old Kalman filter | by Marko Cotra | Towards Data Science
In my previous post in this series I talked about the two equations that are used for essentially all sensor fusion algorithms: the predict and update equations. I did not however showcase any practical algorithm that makes the equations analytically tractable. So, in this post I’ll explain perhaps the most famous and ...
[ { "code": null, "e": 534, "s": 172, "text": "In my previous post in this series I talked about the two equations that are used for essentially all sensor fusion algorithms: the predict and update equations. I did not however showcase any practical algorithm that makes the equations analytically trac...
How to convert list to string in Python?
There may be some situations, where we need to convert a list into a string. We will discuss different methods to do the same. Iterate through the list and append the elements to the string to convert list into a string. We will use for-in loop to iterate through the list elements. Live Demo list1=["Welcome","To","Tut...
[ { "code": null, "e": 1189, "s": 1062, "text": "There may be some situations, where we need to convert a list into a string. We will discuss different methods to do the same." }, { "code": null, "e": 1345, "s": 1189, "text": "Iterate through the list and append the elements to the...
BFS using STL for competitive coding in C++?
The Breadth First Search (BFS) traversal is an algorithm, which is used to visit all of the nodes of a given graph. In this traversal algorithm one node is selected and then all of the adjacent nodes are visited one by one. After completing all of the adjacent vertices, it moves further to check another vertices and ch...
[ { "code": null, "e": 1416, "s": 1062, "text": "The Breadth First Search (BFS) traversal is an algorithm, which is used to visit all of the nodes of a given graph. In this traversal algorithm one node is selected and then all of the adjacent nodes are visited one by one. After completing all of the a...
Check whether a given graph is Bipartite or not - GeeksforGeeks
23 Feb, 2022 A Bipartite Graph is a graph whose vertices can be divided into two independent sets, U and V such that every edge (u, v) either connects a vertex from U to V or a vertex from V to U. In other words, for every edge (u, v), either u belongs to U and v to V, or u belongs to V and v to U. We can also say that...
[ { "code": null, "e": 34596, "s": 34568, "text": "\n23 Feb, 2022" }, { "code": null, "e": 34957, "s": 34596, "text": "A Bipartite Graph is a graph whose vertices can be divided into two independent sets, U and V such that every edge (u, v) either connects a vertex from U to V or a...
Neural Network for Satellite Data Classification Using Tensorflow in Python | by Pratyush Tripathy | Towards Data Science
Deep Learning has taken over the majority of fields in solving complex problems, and the geospatial field is no exception. The title of the article interests you and hence, I hope that you are familiar with satellite datasets; for now, Landsat 5 TM. Little knowledge of how Machine Learning (ML) algorithms work, will he...
[ { "code": null, "e": 952, "s": 172, "text": "Deep Learning has taken over the majority of fields in solving complex problems, and the geospatial field is no exception. The title of the article interests you and hence, I hope that you are familiar with satellite datasets; for now, Landsat 5 TM. Littl...
ArrayDeque remove() Method in Java - GeeksforGeeks
10 Dec, 2018 The Java.util.ArrayDeque.remove() method is used to remove the element present at the head of the Deque.Syntax:Array_Deque.remove()Parameters: The method does not take any parameters.Return Value: This method returns the element present at the head of the Deque.Exceptions: The method throws NoSuchElementEx...
[ { "code": null, "e": 23649, "s": 23621, "text": "\n10 Dec, 2018" }, { "code": null, "e": 28110, "s": 23649, "text": "The Java.util.ArrayDeque.remove() method is used to remove the element present at the head of the Deque.Syntax:Array_Deque.remove()Parameters: The method does not ...
Compute n! under modulo p - GeeksforGeeks
26 Apr, 2022 Given a large number n and a prime p, how to efficiently compute n! % p?Examples : Input: n = 5, p = 13 Output: 3 5! = 120 and 120 % 13 = 3 Input: n = 6, p = 11 Output: 5 6! = 720 and 720 % 11 = 5 A Naive Solution is to first compute n!, then compute n! % p. This solution works fine when the value of ...
[ { "code": null, "e": 24568, "s": 24540, "text": "\n26 Apr, 2022" }, { "code": null, "e": 24653, "s": 24568, "text": "Given a large number n and a prime p, how to efficiently compute n! % p?Examples : " }, { "code": null, "e": 24770, "s": 24653, "text": "Input...
Mean of range in array in C++
In this problem, we are given an array of n integers and some m querries. Our task is to create a program that calculates the integral value(round down) of the mean of the ranges given by the querries. Let’s take an example to understand the problem, Input − array = {5, 7, 8, 9, 10} m = 2; [0, 3], [2, 4] Output − 7 9 T...
[ { "code": null, "e": 1264, "s": 1062, "text": "In this problem, we are given an array of n integers and some m querries. Our task is to create a program that calculates the integral value(round down) of the mean of the ranges given by the querries." }, { "code": null, "e": 1313, "s":...
C++ Program to Implement a Binary Search Tree using Linked Lists
Here is a C++ program to Implement a Binary Search Tree using Linked Lists. Begin Take the nodes of the tree as input. Create a structure nod to take the data d, a left pointer l and a right r as input. Create a function create() to insert nodes into the tree: Initialize c = 0 as number of nodes. P...
[ { "code": null, "e": 1138, "s": 1062, "text": "Here is a C++ program to Implement a Binary Search Tree using Linked Lists." }, { "code": null, "e": 1887, "s": 1138, "text": "Begin\n Take the nodes of the tree as input.\n Create a structure nod to take the data d, a left point...
Bootstrap 4 | Cards - GeeksforGeeks
28 Jul, 2021 A Bootstrap card is a flexible box containing some padding around the content. It includes the options for headers and footers, color, content, and powerful display options. It replaces the use of panels, wells, and thumbnails. It can be used in a single container called card. Basic Card: The .card and ....
[ { "code": null, "e": 28049, "s": 28021, "text": "\n28 Jul, 2021" }, { "code": null, "e": 28329, "s": 28049, "text": "A Bootstrap card is a flexible box containing some padding around the content. It includes the options for headers and footers, color, content, and powerful displa...
Python Design Patterns - Factory
The factory pattern comes under the creational patterns list category. It provides one of the best ways to create an object. In factory pattern, objects are created without exposing the logic to client and referring to the newly created object using a common interface. Factory patterns are implemented in Python using f...
[ { "code": null, "e": 2749, "s": 2479, "text": "The factory pattern comes under the creational patterns list category. It provides one of the best ways to create an object. In factory pattern, objects are created without exposing the logic to client and referring to the newly created object using a c...
Hibernate One To Many Annotations | Hibernate Annotations | @OnetoMany
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 tutorials, we are going to implement ...
[ { "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, ...
How to combine two lists of same size to make a data frame in R?
If we have two lists of same size then we can create a data frame using those lists and this can be easily done with the help of expand.grid function. The expand.grid function create a data frame from all combinations of the provided lists or vectors or factors. For example, if we have two lists defined as List1 and Li...
[ { "code": null, "e": 1459, "s": 1062, "text": "If we have two lists of same size then we can create a data frame using those lists and this can be easily done with the help of expand.grid function. The expand.grid function create a data frame from all combinations of the provided lists or vectors or...
C++ Program to Display Factors of a Number
Factors are those numbers that are multiplied to get a number. For example: 5 and 3 are factors of 15 as 5*3=15. Similarly other factors of 15 are 1 and 15 as 15*1=15. The program to display the factors of a number are given as follows. Live Demo #include<iostream> using namespace std; int main() { int num = 20, i;...
[ { "code": null, "e": 1125, "s": 1062, "text": "Factors are those numbers that are multiplied to get a number." }, { "code": null, "e": 1230, "s": 1125, "text": "For example: 5 and 3 are factors of 15 as 5*3=15. Similarly other factors of 15 are 1 and 15 as 15*1=15." }, { ...
Data Analysis and Visualization with Python | Set 2 - GeeksforGeeks
09 Sep, 2018 Prerequisites : NumPy in Python, Data Analysis Visualization with Python | Set 1 1. Storing DataFrame in CSV Format : Pandas provide to.csv('filename', index = "False|True") function to write DataFrame into a CSV file. Here filename is the name of the CSV file that you want to create and index tells that i...
[ { "code": null, "e": 24601, "s": 24573, "text": "\n09 Sep, 2018" }, { "code": null, "e": 24682, "s": 24601, "text": "Prerequisites : NumPy in Python, Data Analysis Visualization with Python | Set 1" }, { "code": null, "e": 24719, "s": 24682, "text": "1. Storin...
A Hello World App using Flutter - GeeksforGeeks
24 Nov, 2020 Flutter is an app SDK for building high-performance, high-fidelity apps for iOS, Android, Web(beta), and desktop(technical preview) from a single codebase written in Dart Language. In this article, I will provide line by line explanation on how to build a simple Hello World App using Flutter. In Flutter e...
[ { "code": null, "e": 25547, "s": 25519, "text": "\n24 Nov, 2020" }, { "code": null, "e": 25842, "s": 25547, "text": "Flutter is an app SDK for building high-performance, high-fidelity apps for iOS, Android, Web(beta), and desktop(technical preview) from a single codebase written ...
Optimizing Hyperparameters the right Way | by Richard Michael | Towards Data Science
In this post, we will build a machine learning pipeline using multiple optimizers and use the power of Bayesian Optimization to arrive at the most optimal configuration for all our parameters. All we need is the sklearn Pipeline and Skopt.You can use your favorite ML models, as long as they have a sklearn wrapper (look...
[ { "code": null, "e": 524, "s": 172, "text": "In this post, we will build a machine learning pipeline using multiple optimizers and use the power of Bayesian Optimization to arrive at the most optimal configuration for all our parameters. All we need is the sklearn Pipeline and Skopt.You can use your...
Optimize your Investments using Math and Python | by Andrew Hershy | Towards Data Science
During the MBA, we learned all about predictive modeling techniques using Excel and University of Waikato’s free software, WEKA. We learned the foundational concepts but never ventured into the hard skills required for advanced calculation. After some time studying python, I thought it would be fun to rework one of my ...
[ { "code": null, "e": 702, "s": 172, "text": "During the MBA, we learned all about predictive modeling techniques using Excel and University of Waikato’s free software, WEKA. We learned the foundational concepts but never ventured into the hard skills required for advanced calculation. After some tim...
What are obsolete attributes in C#?
If a method has an obsolete attribute, then the compiler issues a warning in the code after it is compiled. When a new method is being used in a class and if you still want to retain the old method in the class, you may mark it as obsolete by displaying a message the new method should be used, instead of the old method...
[ { "code": null, "e": 1170, "s": 1062, "text": "If a method has an obsolete attribute, then the compiler issues a warning in the code after it is compiled." }, { "code": null, "e": 1384, "s": 1170, "text": "When a new method is being used in a class and if you still want to retain...
Data visualization using ggplot2: 5 features worth knowing | by Abhinav Malasi | Towards Data Science
Whether you are working on your school project, term paper, master’s thesis, or a business presentation, the quality of the data translates well to the audience if the data is presented in a meaningful and aesthetically pleasing way. Although making an impactful figure from the data is challenging and time-consuming, b...
[ { "code": null, "e": 606, "s": 171, "text": "Whether you are working on your school project, term paper, master’s thesis, or a business presentation, the quality of the data translates well to the audience if the data is presented in a meaningful and aesthetically pleasing way. Although making an im...
Puppet - Installing and Configuring r10K
In Puppet, we have a code management tool known as r10k that helps in managing environment configurations related to different kind of environments that we can configure in Puppet such as development, testing, and production. This helps in storing environment-related configuration in the source code repository. Using t...
[ { "code": null, "e": 2645, "s": 2173, "text": "In Puppet, we have a code management tool known as r10k that helps in managing environment configurations related to different kind of environments that we can configure in Puppet such as development, testing, and production. This helps in storing envir...
JavaFX - Text
Just like various shapes, you can also create a text node in JavaFX. The text node is represented by the class named Text, which belongs to the package javafx.scene.text. This class contains several properties to create text in JavaFX and modify its appearance. This class also inherits the Shape class which belongs to ...
[ { "code": null, "e": 2071, "s": 1900, "text": "Just like various shapes, you can also create a text node in JavaFX. The text node is represented by the class named Text, which belongs to the package javafx.scene.text." }, { "code": null, "e": 2252, "s": 2071, "text": "This class ...
Bucket Sort
In the Bucket Sorting technique, the data items are distributed in a set of buckets. Each bucket can hold a similar type of data. After distributing, each bucket is sorted using another sorting algorithm. After that, all elements are gathered on the main list to get the sorted form. Time Complexity: O(n + k) for best c...
[ { "code": null, "e": 1346, "s": 1062, "text": "In the Bucket Sorting technique, the data items are distributed in a set of buckets. Each bucket can hold a similar type of data. After distributing, each bucket is sorted using another sorting algorithm. After that, all elements are gathered on the mai...
How to count the number of characters (including spaces) in a text file using Java?
To count the number of lines in a file Instantiate the FileInputStream class by passing an object of the required file as parameter to its constructor. Instantiate the FileInputStream class by passing an object of the required file as parameter to its constructor. Read the contents of the file to a byte array using the...
[ { "code": null, "e": 1101, "s": 1062, "text": "To count the number of lines in a file" }, { "code": null, "e": 1214, "s": 1101, "text": "Instantiate the FileInputStream class by passing an object of the required file as parameter to its constructor." }, { "code": null, ...
Regular Expression in Python with Examples?
Regular expressions is a kind of programming language which is used to identify whether a pattern exists in a given sequence of characters (string) or not. Regular expression or Regex is a sequence of characters that is used to check if a string contains the specified search pattern. To use RegEx module, python comes w...
[ { "code": null, "e": 1218, "s": 1062, "text": "Regular expressions is a kind of programming language which is used to identify whether a pattern exists in a given sequence of characters (string) or not." }, { "code": null, "e": 1347, "s": 1218, "text": "Regular expression or Rege...
Randomize string in C#
To randomize string, firstly use Random class − Random r = new Random(); Now, use the Next() method with OrderBy() − string random = new string(str.ToCharArray().OrderBy(s => (r.Next(2) % 2) == 0).ToArray()); Here is the compete code that displays randomize string − Live Demo using System; using System.IO; using Syste...
[ { "code": null, "e": 1110, "s": 1062, "text": "To randomize string, firstly use Random class −" }, { "code": null, "e": 1135, "s": 1110, "text": "Random r = new Random();" }, { "code": null, "e": 1179, "s": 1135, "text": "Now, use the Next() method with OrderB...
__init_subclass__ in Python - GeeksforGeeks
22 Jun, 2020 Prerequisites: Python Classes and Objects, Inheritance in Python Regardless of any programming languages, Inheritance is one of the most important topics in Object-Oriented Programming Concepts. Inheritance is a concept of defining a class in terms of another class. As per inheritance, we know that a super...
[ { "code": null, "e": 23697, "s": 23669, "text": "\n22 Jun, 2020" }, { "code": null, "e": 23762, "s": 23697, "text": "Prerequisites: Python Classes and Objects, Inheritance in Python" }, { "code": null, "e": 24170, "s": 23762, "text": "Regardless of any program...
How to get first letter of each word using regular expression in Java?
The metacharacter “\b” matches for the word boundaries and [a-zA-Z] matches one character from the English alphabet (both cases). In short, the expression \\b[a-zA-Z] matches one single character from the English alphabet, both cases after every word boundary. Therefore, to retrieve the first letter of each word − Comp...
[ { "code": null, "e": 1323, "s": 1062, "text": "The metacharacter “\\b” matches for the word boundaries and [a-zA-Z] matches one character from the English alphabet (both cases). In short, the expression \\\\b[a-zA-Z] matches one single character from the English alphabet, both cases after every word...
SWING - Event Handling
In this chapter, you will learn about Events, its types, and also learn how to handle an event. Example is provided at the end of the chapter for better understanding. Change in the state of an object is known as Event, i.e., event describes the change in the state of the source. Events are generated as a result of use...
[ { "code": null, "e": 1931, "s": 1763, "text": "In this chapter, you will learn about Events, its types, and also learn how to handle an event. Example is provided at the end of the chapter for better understanding." }, { "code": null, "e": 2341, "s": 1931, "text": "Change in the ...
Fortran - Basic Syntax
A Fortran program is made of a collection of program units like a main program, modules, and external subprograms or procedures. Each program contains one main program and may or may not contain other program units. The syntax of the main program is as follows − program program_name implicit none ! type declarat...
[ { "code": null, "e": 2275, "s": 2146, "text": "A Fortran program is made of a collection of program units like a main program, modules, and external subprograms or procedures." }, { "code": null, "e": 2409, "s": 2275, "text": "Each program contains one main program and may or may...
Bootstrap 4 .float-right class
Use the float-right class in Bootstrap to place an element on the right. The default text alignment is on the left and use the float-right class to align text on the right as in the following code snippet − <div class="float-right"> This text is on the right. </div> It can be used on any other element as well, for ex...
[ { "code": null, "e": 1135, "s": 1062, "text": "Use the float-right class in Bootstrap to place an element on the right." }, { "code": null, "e": 1269, "s": 1135, "text": "The default text alignment is on the left and use the float-right class to align text on the right as in the ...
Multiply Large Numbers represented as Strings in C++
Given two numbers in the string formats. We need to multiply them. The idea to solve the problem is to maintain a previous digit multiplication answer and carry. We can use the previous digits multiplication answer and carry to get the next set digits multiplication. Let's see an example. Input 15 2 Output 30 Initialis...
[ { "code": null, "e": 1330, "s": 1062, "text": "Given two numbers in the string formats. We need to multiply them. The idea to solve the problem is to maintain a previous digit multiplication answer and carry. We can use the previous digits multiplication answer and carry to get the next set digits m...
How to Structure Your Data Science Workflow | by Mikhail Klassen | Towards Data Science
From the outside, data science can appear to be a huge and nebulous discipline. Today’s data science experts did not attend university to get data science degrees (although many universities now offer these programs). The first generation of professional data scientists are drawn from the disciplines of mathematics, st...
[ { "code": null, "e": 390, "s": 172, "text": "From the outside, data science can appear to be a huge and nebulous discipline. Today’s data science experts did not attend university to get data science degrees (although many universities now offer these programs)." }, { "code": null, "e": ...
QlikView - Fill Function
The Fill function in QlikView is used to fill values from existing fields into a new field. Let us consider the following input data, which represents the actual and forecasted sales figures. Month,Forecast,Actual March,2145,2247 April,2458, May,1245, June,5124,3652 July,7421,7514 August,2584, September,5314,4251 Octo...
[ { "code": null, "e": 3013, "s": 2920, "text": "The Fill function in QlikView is used to fill values from existing fields into a new field. " }, { "code": null, "e": 3113, "s": 3013, "text": "Let us consider the following input data, which represents the actual and forecasted sale...
host - Unix, Linux Command
host - DNS lookup utility host [-aCdlnrsTwv] [-c class] [-N ndots] [-R number] [-t type] [-W wait] [-m flag] [-4] [-6] {name} [server] When no arguments or options are given, host prints a short summary of its command line arguments and options. EXAMPLE-1: Making simple query for any site say google.com using sitenam...
[ { "code": null, "e": 10603, "s": 10577, "text": "host - DNS lookup utility" }, { "code": null, "e": 10712, "s": 10603, "text": "host [-aCdlnrsTwv] [-c class] [-N ndots] [-R number] [-t type] [-W wait] [-m flag] [-4] [-6] {name} [server]" }, { "code": null, "e": 10825,...
Swing Examples - Open file Dialog with multi-select option
Following example showcase how to show a Open File dialog to select multiple files in swing based application. We are using the following APIs. JFileChooser − To create a file chooser. JFileChooser − To create a file chooser. JFileChooser.showOpenDialog() − To show an open file dialog. JFileChooser.showOpenDialog() − T...
[ { "code": null, "e": 2150, "s": 2039, "text": "Following example showcase how to show a Open File dialog to select multiple files in swing based application." }, { "code": null, "e": 2183, "s": 2150, "text": "We are using the following APIs." }, { "code": null, "e": 2...
Java - The Set Interface
A Set is a Collection that cannot contain duplicate elements. It models the mathematical set abstraction. The Set interface contains only methods inherited from Collection and adds the restriction that duplicate elements are prohibited. Set also adds a stronger contract on the behavior of the equals and hashCode operat...
[ { "code": null, "e": 2483, "s": 2377, "text": "A Set is a Collection that cannot contain duplicate elements. It models the mathematical set abstraction." }, { "code": null, "e": 2614, "s": 2483, "text": "The Set interface contains only methods inherited from Collection and adds t...