title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Robot Framework - Working With Checkbox | For testing, it becomes important to understand how to interact with the browser and locate the html elements. It is very easy to work with input fields with robot framework. In this chapter, we will learn how to work with checkbox using Selenium Library. To work with checkbox, we need the locator, which is the main un... | [
{
"code": null,
"e": 2565,
"s": 2169,
"text": "For testing, it becomes important to understand how to interact with the browser and locate the html elements. It is very easy to work with input fields with robot framework. In this chapter, we will learn how to work with checkbox using Selenium Librar... |
Pandas Pivot — The Ultimate Guide | by Roman Orac | Towards Data Science | Pandas pivot is an essential tool of every Data Scientist. Some use it daily and others avoid it because it seems complex. I was in the latter group for quite a while. After I took the time and did some research, I felt like I wasted a lot of time writing unnecessary code. To my surprise, I already knew the main buildi... | [
{
"code": null,
"e": 549,
"s": 172,
"text": "Pandas pivot is an essential tool of every Data Scientist. Some use it daily and others avoid it because it seems complex. I was in the latter group for quite a while. After I took the time and did some research, I felt like I wasted a lot of time writing... |
TensorFlow 2 on Raspberry Pi. TensorFlow Lite on Raspberry Pi 4 can... | by Leigh Johnson | Towards Data Science | Originally published at bitsy.ai/3-ways-to-install-tensorflow-on-raspberry-pi.
With the new Raspberry Pi 400 shipping worldwide, you might be wondering: can this little powerhouse board be used for Machine Learning?
The answer is, yes! TensorFlow Lite on Raspberry Pi 4 can achieve performance comparable to NVIDIA’s Jet... | [
{
"code": null,
"e": 251,
"s": 172,
"text": "Originally published at bitsy.ai/3-ways-to-install-tensorflow-on-raspberry-pi."
},
{
"code": null,
"e": 388,
"s": 251,
"text": "With the new Raspberry Pi 400 shipping worldwide, you might be wondering: can this little powerhouse board ... |
Get a List of points obtained by Interpolation in R Programming - spline() and splinefun() Function - GeeksforGeeks | 03 Jul, 2020
In R programming, spline() and splinefun() function is used to create a list of points obtained by interpolation. It performs cubic spline interpolation of given data points.
Syntax:spline(x, y, method)andsplinefun(x, y, method)
Parameters:x, y: represents vectors giving the points for interpolationmethod:... | [
{
"code": null,
"e": 25162,
"s": 25134,
"text": "\n03 Jul, 2020"
},
{
"code": null,
"e": 25337,
"s": 25162,
"text": "In R programming, spline() and splinefun() function is used to create a list of points obtained by interpolation. It performs cubic spline interpolation of given d... |
How to assign values to variables in Python | Variable assignment is a very basic requirement in any computer programming language. In python there are multiple ways we can declare a variable and assign value to it. Below we see each of them.
In this method, we directly declare the variable and assign a value using the = sign. If the variable is declare multiple t... | [
{
"code": null,
"e": 1259,
"s": 1062,
"text": "Variable assignment is a very basic requirement in any computer programming language. In python there are multiple ways we can declare a variable and assign value to it. Below we see each of them."
},
{
"code": null,
"e": 1451,
"s": 1259... |
Convert image to binary using Python - GeeksforGeeks | 17 Dec, 2020
In this article, we are going to convert the image into its binary form. A binary image is a monochromatic image that consists of pixels that can have one of exactly two colors, usually black and white. Binary images are also called bi-level or two-level. This means that each pixel is stored as a single b... | [
{
"code": null,
"e": 24364,
"s": 24333,
"text": " \n17 Dec, 2020\n"
},
{
"code": null,
"e": 24687,
"s": 24364,
"text": "In this article, we are going to convert the image into its binary form. A binary image is a monochromatic image that consists of pixels that can have one of ex... |
Print Fibonacci sequence using 2 variables - GeeksforGeeks | 26 Nov, 2021
Print the Fibonacci sequence. The first Fibonacci numbers are:
C++
Java
Python3
C#
PHP
Javascript
// Simple CPP Program to print Fibonacci// sequence#include <iostream>using std::cout;void fib(int n){ int a = 0, b = 1, c; if (n >= 0) cout << a << " "; if (n >= 1) cout << b << " "... | [
{
"code": null,
"e": 24868,
"s": 24840,
"text": "\n26 Nov, 2021"
},
{
"code": null,
"e": 24933,
"s": 24868,
"text": "Print the Fibonacci sequence. The first Fibonacci numbers are: "
},
{
"code": null,
"e": 24939,
"s": 24935,
"text": "C++"
},
{
"code":... |
Chomsky Classification of Grammars | According to Noam Chomosky, there are four types of grammars − Type 0, Type 1, Type 2, and Type 3. The following table shows how they differ from each other −
Take a look at the following illustration. It shows the scope of each type of grammar −
Type-3 grammars generate regular languages. Type-3 grammars must have a s... | [
{
"code": null,
"e": 2842,
"s": 2683,
"text": "According to Noam Chomosky, there are four types of grammars − Type 0, Type 1, Type 2, and Type 3. The following table shows how they differ from each other −"
},
{
"code": null,
"e": 2930,
"s": 2842,
"text": "Take a look at the foll... |
Python | Frequency of substring in given string - GeeksforGeeks | 25 Jun, 2019
Finding a substring in a string has been dealt in many ways. But sometimes, we are just interested to know how many times a particular substring occurs in a string. Let’s discuss certain ways in which this task is performed.
Method #1 : Using count()This is a quite straightforward method in which this task... | [
{
"code": null,
"e": 24966,
"s": 24938,
"text": "\n25 Jun, 2019"
},
{
"code": null,
"e": 25191,
"s": 24966,
"text": "Finding a substring in a string has been dealt in many ways. But sometimes, we are just interested to know how many times a particular substring occurs in a string... |
Amazon Interview Experience for SDE - GeeksforGeeks | 20 Aug, 2021
Round 1(Online Assessment): This round usually consists of two coding questions, for which you have to write the code as well as give a proper explanation in a separate window. The time for this round is approx 1 hr
Questions asked were:
Sort a list of orders of prime and non-prime orders (https://leetc... | [
{
"code": null,
"e": 24800,
"s": 24772,
"text": "\n20 Aug, 2021"
},
{
"code": null,
"e": 25019,
"s": 24800,
"text": "Round 1(Online Assessment): This round usually consists of two coding questions, for which you have to write the code as well as give a proper explanation in a sep... |
Node.js zlib.inflateRawSync() Method - GeeksforGeeks | 11 Oct, 2021
The zlib.inflateRawSync() method is an inbuilt application programming interface of the Zlib module which is used to decompress a chunk of data with InflateRaw.
Syntax:
zlib.inflateRawSync( buffer, options )
Parameters: This method accepts two parameters as mentioned above and described below:
buffer: This... | [
{
"code": null,
"e": 24850,
"s": 24822,
"text": "\n11 Oct, 2021"
},
{
"code": null,
"e": 25011,
"s": 24850,
"text": "The zlib.inflateRawSync() method is an inbuilt application programming interface of the Zlib module which is used to decompress a chunk of data with InflateRaw."
... |
Unit Testing using Unittest in Python | In this tutorial, we are going to learn about Unit Testing using the unittest built-in module. Testing plays a major role in software development. You will know the issues before going to the production itself.
We'll learn the basics of testing in Python using the built-in module called unittest. Let's jump into the tu... | [
{
"code": null,
"e": 1273,
"s": 1062,
"text": "In this tutorial, we are going to learn about Unit Testing using the unittest built-in module. Testing plays a major role in software development. You will know the issues before going to the production itself."
},
{
"code": null,
"e": 1390,... |
Tutorial: How do I add images with HTML? – W3Schools.com | How to library
W3Schools.com
How to library
Tutorial: Learn HTML
Tutorial: Learn CSS
Tutorial: Learn JavaScript
Tutorial: Learn W3.CSS
How do I set up Google Analytics?
How do I make a website?
How do I create a link tree website?
How do I create a portfolio?
How do I create an online resume?
H... | [
{
"code": null,
"e": 35,
"s": 0,
"text": "\nHow to library\n\n"
},
{
"code": null,
"e": 51,
"s": 35,
"text": "\nW3Schools.com\n"
},
{
"code": null,
"e": 68,
"s": 51,
"text": "\nHow to library\n"
},
{
"code": null,
"e": 91,
"s": 68,
"text": ... |
How to Get Unique Values from ArrayList using Java 8? - GeeksforGeeks | 08 Dec, 2020
ArrayList in Java do not prevent the list from having duplicate values. But there are ways if you want to get unique values from the ArrayList and each way is explained with an example.
Method 1(Using Stream API’s distinct() Method): For Java 8, You can use Java 8 Stream API. To get distinct values, the ... | [
{
"code": null,
"e": 24414,
"s": 24386,
"text": "\n08 Dec, 2020"
},
{
"code": null,
"e": 24602,
"s": 24414,
"text": "ArrayList in Java do not prevent the list from having duplicate values. But there are ways if you want to get unique values from the ArrayList and each way is expl... |
Partition Equal Subset Sum in C++ | Suppose we have a non-empty array containing only positive numbers, we have to find if the array can be partitioned into two subsets such that the sum of elements in both subsets is the same. So if the input is like [1,5,11,5], the output will be true. As this array can be partitioned as [1, 5, 5] and [11]
To solve thi... | [
{
"code": null,
"e": 1370,
"s": 1062,
"text": "Suppose we have a non-empty array containing only positive numbers, we have to find if the array can be partitioned into two subsets such that the sum of elements in both subsets is the same. So if the input is like [1,5,11,5], the output will be true. ... |
Bakery Algorithm in Process Synchronization - GeeksforGeeks | 16 Aug, 2019
Prerequisite – Critical Section, Process Synchronization, Inter Process Communication
The Bakery algorithm is one of the simplest known solutions to the mutual exclusion problem for the general case of N process. Bakery Algorithm is a critical section solution for N processes. The algorithm preserves the f... | [
{
"code": null,
"e": 24510,
"s": 24482,
"text": "\n16 Aug, 2019"
},
{
"code": null,
"e": 24596,
"s": 24510,
"text": "Prerequisite – Critical Section, Process Synchronization, Inter Process Communication"
},
{
"code": null,
"e": 24849,
"s": 24596,
"text": "The ... |
Elm - Operators | An operator defines some function that will be performed on the data. The values on which the operators work are called operands. Consider the following expression
7 + 5 = 12
Here, the values 7, 5, and 12 are operands, while + and = are operators.
The major operators in Elm can be classified as −
Arithmetic
Relational
... | [
{
"code": null,
"e": 2044,
"s": 1880,
"text": "An operator defines some function that will be performed on the data. The values on which the operators work are called operands. Consider the following expression"
},
{
"code": null,
"e": 2055,
"s": 2044,
"text": "7 + 5 = 12"
},
... |
Creating Media Dependent Style Sheets using CSS | Media dependent stylesheets are basic stylesheets only but apply to html document only when mediatype matches device type on which document is visible.
We can create media dependent stylesheets by following methods −
Using @media At-rules
Using @import At-rules
Using HTML <link> element with media attribute
Let’s see a... | [
{
"code": null,
"e": 1214,
"s": 1062,
"text": "Media dependent stylesheets are basic stylesheets only but apply to html document only when mediatype matches device type on which document is visible."
},
{
"code": null,
"e": 1279,
"s": 1214,
"text": "We can create media dependent ... |
Value Iteration for Q-function. and THE END of this introductory series... | by Jordi TORRES.AI | Towards Data Science | In the previous post, we presented how to implement the Value Iteration method for computing the state value, V-function, by solving the Frozen-Lake Environment. In this post, we will review the Q-function and present the Value Iteration method that learns the values of the actions to create a policy.
As we will see la... | [
{
"code": null,
"e": 475,
"s": 172,
"text": "In the previous post, we presented how to implement the Value Iteration method for computing the state value, V-function, by solving the Frozen-Lake Environment. In this post, we will review the Q-function and present the Value Iteration method that learn... |
How To Use Matplotlib For Plotting Samples From An Object Detection Dataset | by Varun Dutt | Towards Data Science | Visualizing samples from the dataset is essential for efficiently exploring machine learning tasks. It provides key insights to help you narrow down your choices out of the several options available in the model architecture, data augmentation, etc. Plotting samples from an object detection dataset is trickier compared... | [
{
"code": null,
"e": 532,
"s": 172,
"text": "Visualizing samples from the dataset is essential for efficiently exploring machine learning tasks. It provides key insights to help you narrow down your choices out of the several options available in the model architecture, data augmentation, etc. Plott... |
How to get a particular anchor in a document in JavaScript? | Javascript anchor tags follow an array-like structure. When we try to display a particular anchor tag we have to use document.anchors.innerHTML method. This method works the same as array methods which are used to display a particular element.
element = document.anchors[i].innerHTML;
In the following example, the first... | [
{
"code": null,
"e": 1306,
"s": 1062,
"text": "Javascript anchor tags follow an array-like structure. When we try to display a particular anchor tag we have to use document.anchors.innerHTML method. This method works the same as array methods which are used to display a particular element."
},
{... |
How to calculate weighted mean in R? | Weighted mean is the average which is determined by finding the sum of the products of weights and the values then dividing this sum by the sum of total weights. If the weights are in proportion then the total sum of the weights should be 1. In base R, we have a function weighted.mean to find the weighted mean in which... | [
{
"code": null,
"e": 1452,
"s": 1062,
"text": "Weighted mean is the average which is determined by finding the sum of the products of weights and the values then dividing this sum by the sum of total weights. If the weights are in proportion then the total sum of the weights should be 1. In base R, ... |
CSS | overscroll-behavior-x Property - GeeksforGeeks | 21 Nov, 2019
The overscroll-behavior-x property is used to set the behavior of the browser when the horizontal boundary of a scrolling area is reached. This can be used in websites where there are multiple scrolling areas and scrolling one area does not affect the page as a whole.
Syntax:
overscroll-behavior-x: auto | ... | [
{
"code": null,
"e": 24985,
"s": 24957,
"text": "\n21 Nov, 2019"
},
{
"code": null,
"e": 25254,
"s": 24985,
"text": "The overscroll-behavior-x property is used to set the behavior of the browser when the horizontal boundary of a scrolling area is reached. This can be used in webs... |
Deploying a TensorFlow 2.1 CNN model on the web with Flask - GeeksforGeeks | 11 May, 2020
When starting to learn Machine Learning, one of the biggest issues people face is deploying whatever they make to the web for easier demonstration/use. This article will help those beginners bridge the gap between creating a TensorFlow model and deploying it on the web with Flask and hopefully gain some in... | [
{
"code": null,
"e": 23977,
"s": 23949,
"text": "\n11 May, 2020"
},
{
"code": null,
"e": 24331,
"s": 23977,
"text": "When starting to learn Machine Learning, one of the biggest issues people face is deploying whatever they make to the web for easier demonstration/use. This articl... |
How to remove a character from string in JavaScript ? - GeeksforGeeks | 18 Apr, 2022
Given a string and the task is to remove a character from the given string.
Method 1: Using replace() method: The replace method is used to replace a specific character/string with other character/string. It takes two parameters, first is the string to be replaced and the second is the string which is to b... | [
{
"code": null,
"e": 24663,
"s": 24635,
"text": "\n18 Apr, 2022"
},
{
"code": null,
"e": 24739,
"s": 24663,
"text": "Given a string and the task is to remove a character from the given string."
},
{
"code": null,
"e": 25223,
"s": 24739,
"text": "Method 1: Usin... |
How to dismount the ISO file using PowerShell? | To dismount the ISO file on the Windows Server using PowerShell, we need to use the Dismount−DiskImage command. When you use this command, you need to use the same path used for mounting the disk image.
In this example, we have a disk mounted on E: on the local server, that we can check using the windows explorer or cm... | [
{
"code": null,
"e": 1265,
"s": 1062,
"text": "To dismount the ISO file on the Windows Server using PowerShell, we need to use the Dismount−DiskImage command. When you use this command, you need to use the same path used for mounting the disk image."
},
{
"code": null,
"e": 1389,
"s"... |
How to Display a PySpark DataFrame in Table Format | Towards Data Science | In the big data era, it is quite common to have dataframes that consist of hundreds or even thousands of columns. And in such cases, even printing them out can sometimes be tricky as you somehow need to ensure that the data is presented in a clear but also efficient way.
In this article, I am going to explore the three... | [
{
"code": null,
"e": 444,
"s": 172,
"text": "In the big data era, it is quite common to have dataframes that consist of hundreds or even thousands of columns. And in such cases, even printing them out can sometimes be tricky as you somehow need to ensure that the data is presented in a clear but als... |
Difference between two strings JavaScript | We are given two strings, say s and t. String t is generated by random shuffling string s and then add one more letter at a random position.
We are required to write a JavaScript function that takes both these strings and returns the letter that was added to t.
For example −
If the input stings are −
const s = "abcd", ... | [
{
"code": null,
"e": 1203,
"s": 1062,
"text": "We are given two strings, say s and t. String t is generated by random shuffling string s and then add one more letter at a random position."
},
{
"code": null,
"e": 1324,
"s": 1203,
"text": "We are required to write a JavaScript fun... |
Divide array into two sub-arrays such that their averages are equal - GeeksforGeeks | 19 Apr, 2022
Given an integer array, the task is to divide an integer array into two sub-arrays to make their averages equal if possible.Examples :
Input : arr[] = {1, 5, 7, 2, 0};
Output : (0 1) and (2 4)
Subarrays arr[0..1] and arr[2..4] have
same average.
Input : arr[] = {4, 3, 5, 9, 11};
Output : Not poss... | [
{
"code": null,
"e": 24639,
"s": 24611,
"text": "\n19 Apr, 2022"
},
{
"code": null,
"e": 24776,
"s": 24639,
"text": "Given an integer array, the task is to divide an integer array into two sub-arrays to make their averages equal if possible.Examples : "
},
{
"code": null... |
Sentiment Analysis with Pretrained Transformers Using Pytorch | by Raymond Cheng | Towards Data Science | Sentiment Analysis has been a very popular task since the dawn of Natural Language Processing (NLP). It belongs to a subtask or application of text classification, where sentiments or subjective information from different texts are extracted and identified. Today, many businesses around the world use sentiment analysis... | [
{
"code": null,
"e": 615,
"s": 47,
"text": "Sentiment Analysis has been a very popular task since the dawn of Natural Language Processing (NLP). It belongs to a subtask or application of text classification, where sentiments or subjective information from different texts are extracted and identified... |
Check if Linked List is Palindrome | Practice | GeeksforGeeks | Given a singly linked list of size N of integers. The task is to check if the given linked list is palindrome or not.
Example 1:
Input:
N = 3
value[] = {1,2,1}
Output: 1
Explanation: The given linked list is
1 2 1 , which is a palindrome and
Hence, the output is 1.
Example 2:
Input:
N = 4
value[] = {1,2,3,4}
Output: 0... | [
{
"code": null,
"e": 356,
"s": 238,
"text": "Given a singly linked list of size N of integers. The task is to check if the given linked list is palindrome or not."
},
{
"code": null,
"e": 367,
"s": 356,
"text": "Example 1:"
},
{
"code": null,
"e": 505,
"s": 367,
... |
What is Overloading in Java? | When a class has two or more methods by the same name but different parameters, at the time of calling based on the parameters passed respective method is called (or respective method body will be bonded with the calling line dynamically). This mechanism is known as method overloading.
Live Demo
public class Sample{
... | [
{
"code": null,
"e": 1349,
"s": 1062,
"text": "When a class has two or more methods by the same name but different parameters, at the time of calling based on the parameters passed respective method is called (or respective method body will be bonded with the calling line dynamically). This mechanis... |
Building and visualizing Sudoku Game Using Pygame - GeeksforGeeks | 04 Sep, 2021
Sudoku is a logic-based, combinatorial number-placement puzzle. The objective is to fill a 9×9 grid with digits so that each column, each row, and each of the nine 3×3 subgrids that compose the grid contain all of the digits from 1 to 9.
We will be building the Sudoku Game in python using pygame library a... | [
{
"code": null,
"e": 24432,
"s": 24404,
"text": "\n04 Sep, 2021"
},
{
"code": null,
"e": 24671,
"s": 24432,
"text": "Sudoku is a logic-based, combinatorial number-placement puzzle. The objective is to fill a 9×9 grid with digits so that each column, each row, and each of the nine... |
How to exclude specific file names using Get-ChildItem in PowerShell? | To exclude specific file(s) from being displayed in the output of Get- ChildItem, you need to specify the file name(s).
Get-ChildItem D:\Temp\ -Recurse -Exclude style.css, LGPO.exe
Directory: D:\Temp\LGPO
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- ... | [
{
"code": null,
"e": 1182,
"s": 1062,
"text": "To exclude specific file(s) from being displayed in the output of Get- ChildItem, you need to specify the file name(s)."
},
{
"code": null,
"e": 1243,
"s": 1182,
"text": "Get-ChildItem D:\\Temp\\ -Recurse -Exclude style.css, LGPO.exe... |
Pyspark – Feature engineering (P1) | by Alexandre Wrg | Towards Data Science | In this article, we will see how to calculate new variables via joins, window functions, UDFs and vector manipulations.
As a reminder, here is the table we use :
to create a new column on Spark just pass the function .withColumn and add sql functions
df = (df .withColumn('dayofyear', F.dayofyear(F.col("ID_DAY"))) .with... | [
{
"code": null,
"e": 292,
"s": 172,
"text": "In this article, we will see how to calculate new variables via joins, window functions, UDFs and vector manipulations."
},
{
"code": null,
"e": 334,
"s": 292,
"text": "As a reminder, here is the table we use :"
},
{
"code": nu... |
Exploratory Data Analysis(EDA): Python | by Kaushik Katari | Towards Data Science | If we want to explain EDA in simple terms, it means trying to understand the given data much better, so that we can make some sense out of it.
We can find a more formal definition in Wikipedia.
In statistics, exploratory data analysis is an approach to analyzing data sets to summarize their main characteristics, often ... | [
{
"code": null,
"e": 315,
"s": 172,
"text": "If we want to explain EDA in simple terms, it means trying to understand the given data much better, so that we can make some sense out of it."
},
{
"code": null,
"e": 366,
"s": 315,
"text": "We can find a more formal definition in Wik... |
Python | Making an object jump in PyGame - GeeksforGeeks | 19 Feb, 2020
Pygame is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the Python programming language. Now, it’s up to the imagination or necessity of developer, what type of game he/she wants to develop using this tool... | [
{
"code": null,
"e": 24592,
"s": 24564,
"text": "\n19 Feb, 2020"
},
{
"code": null,
"e": 24997,
"s": 24592,
"text": "Pygame is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the P... |
Convert.FromBase64String(String) Method in C# | The Convert.FromBase64String(String) method in C# converts the specified string, which encodes binary data as base-64 digits, to an equivalent 8-bit unsigned integer array.
Following is the syntax −
public static byte[] FromBase64String (string str);
Above, the parameter str is the string to convert.
Let us now see an ... | [
{
"code": null,
"e": 1235,
"s": 1062,
"text": "The Convert.FromBase64String(String) method in C# converts the specified string, which encodes binary data as base-64 digits, to an equivalent 8-bit unsigned integer array."
},
{
"code": null,
"e": 1261,
"s": 1235,
"text": "Following... |
How to use if/else condition in select in MySQL? | Let us first create a table −
mysql> create table DemoTable1966
(
UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
UserName varchar(20),
PhotoLiked int
);
Query OK, 0 rows affected (0.00 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1966(UserName,PhotoLiked) valu... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1268,
"s": 1092,
"text": "mysql> create table DemoTable1966\n (\n UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n UserName varchar(20),\n PhotoLiked int\n );\nQuery O... |
Weibull Plot | 16 Aug, 2021
Weibull plot is a graphical technique to determining if the dataset comes from a population that is logically be fit by a 2-parameter Weibull distribution. Before, discussing the Weibull plot in detail, we first need to know about Weibull distribution.
The formula for probability density distribution for W... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Aug, 2021"
},
{
"code": null,
"e": 281,
"s": 28,
"text": "Weibull plot is a graphical technique to determining if the dataset comes from a population that is logically be fit by a 2-parameter Weibull distribution. Before, discussing ... |
Dependency Inversion Principle (SOLID) | 27 Mar, 2018
Let’s understand one of the key principles of SOLID principles group namely, Dependency inversion principle.
Dependency inversion principle is one of the principles on which most of the design patterns are build upon. Dependency inversion talks about the coupling between the different classes or modules. I... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n27 Mar, 2018"
},
{
"code": null,
"e": 163,
"s": 54,
"text": "Let’s understand one of the key principles of SOLID principles group namely, Dependency inversion principle."
},
{
"code": null,
"e": 653,
"s": 163,
"text... |
Python – Substituting patterns in text using regex | 29 Dec, 2020
Regular Expression (regex) is meant for pulling out the required information from any text which is based on patterns. They are also widely used for manipulating the pattern-based texts which leads to text preprocessing and are very helpful in implementing digital skills like Natural Language Processing(NL... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Dec, 2020"
},
{
"code": null,
"e": 363,
"s": 52,
"text": "Regular Expression (regex) is meant for pulling out the required information from any text which is based on patterns. They are also widely used for manipulating the pattern-... |
Variables in Java Do Not Follow Polymorphism and Overriding | 23 Sep, 2021
Variables in Java do not follow polymorphism. Overriding is only applicable to methods but not to variables. In Java, if the child and parent class both have a variable with the same name, Child class’s variable hides the parent class’s variable, even if their types are different. This concept is known as ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 666,
"s": 28,
"text": "Variables in Java do not follow polymorphism. Overriding is only applicable to methods but not to variables. In Java, if the child and parent class both have a variable with t... |
List group in bootstrap with examples | 29 Apr, 2022
List Groups are used to display a series of content. We can modify them to support any content as per our needs. The use of List-Groups is just to display a series or list of content in an organized way.
Below is a basic List Group created using unordered_lists in HTML, and appropriate Bootstrap classes:
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Apr, 2022"
},
{
"code": null,
"e": 233,
"s": 28,
"text": "List Groups are used to display a series of content. We can modify them to support any content as per our needs. The use of List-Groups is just to display a series or list of ... |
Weather app using Vanilla JavaScript | 03 Aug, 2021
The following approach covers how to create a Weather Application in Vanilla JavaScript using Open Weather Map API. Using this API, we can get weather data for each coordinate.
Project Setup:
Step 1: Now go to https://openweathermap.org/ and create an account and get your API KEY.
Step 2: After that, you c... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 205,
"s": 28,
"text": "The following approach covers how to create a Weather Application in Vanilla JavaScript using Open Weather Map API. Using this API, we can get weather data for each coordinate... |
How to Install and Run Apache Kafka on Windows? | 28 Jun, 2022
Apache Kafka is an open-source application used for real-time streams for data in huge amount. Apache Kafka is a publish-subscribe messaging system. A messaging system lets you send messages between processes, applications, and servers. Broadly Speaking, Apache Kafka is software where topics can be defined... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jun, 2022"
},
{
"code": null,
"e": 359,
"s": 28,
"text": "Apache Kafka is an open-source application used for real-time streams for data in huge amount. Apache Kafka is a publish-subscribe messaging system. A messaging system lets yo... |
Leveraging Value from Postal Codes, NAICS Codes, Area Codes and Other Funky-Arse Categorical Variables in Machine Learning Models | by Shad Griffin | Towards Data Science | github.com
The zip (postal) code you live in says a tremendous amount about you. (At least in North America). Where you live suggests: your annual income, whether you have children, the TV shows you watch and your political leanings.
In the United States, there are over 41,000 unique zip codes. Zip codes are largely ca... | [
{
"code": null,
"e": 182,
"s": 171,
"text": "github.com"
},
{
"code": null,
"e": 405,
"s": 182,
"text": "The zip (postal) code you live in says a tremendous amount about you. (At least in North America). Where you live suggests: your annual income, whether you have children, the ... |
How to create a horizontal bar graph using ggplot2 in R? | Making comparisons is bit easier through horizontal bar graphs as compared to the vertical bar graphs in cases where the labels for the categories have large names. Because a large name for the labels of a vertical bar graph is likely to mix with the other labels and therefore, the reading of these labels become diffic... | [
{
"code": null,
"e": 1491,
"s": 1062,
"text": "Making comparisons is bit easier through horizontal bar graphs as compared to the vertical bar graphs in cases where the labels for the categories have large names. Because a large name for the labels of a vertical bar graph is likely to mix with the ot... |
How to define the naming conventions for JSON field names in Java? | The FieldNamingPolicy can be used to define a few standard naming conventions for JSON field names and it can be used in conjunction with GsonBuilder to configure a Gson instance to properly translate Java field names into the desired JSON field names. We can use the setFieldNamingPolicy() method of GsonBuilder to conf... | [
{
"code": null,
"e": 1485,
"s": 1062,
"text": "The FieldNamingPolicy can be used to define a few standard naming conventions for JSON field names and it can be used in conjunction with GsonBuilder to configure a Gson instance to properly translate Java field names into the desired JSON field names. ... |
How to set Line Border color and width with Java? | To set Line Border color and width, use the LineBorder. At first, set a panel wherein we need to set the line border −
JPanel panel = new JPanel();
Now, create a border and set on the panel created above −
Border border = new LineBorder(Color.ORANGE, 4, true);
panel.setBorder(border);
The following is an example to set... | [
{
"code": null,
"e": 1181,
"s": 1062,
"text": "To set Line Border color and width, use the LineBorder. At first, set a panel wherein we need to set the line border −"
},
{
"code": null,
"e": 1210,
"s": 1181,
"text": "JPanel panel = new JPanel();"
},
{
"code": null,
"e... |
Redeclaration of global variable in C | Here we will see what is re-declaration of global variables in C. Does C supports this or not. Let us see the following code to get the idea about it.
#include <stdio.h>
int main(){
int a;
int a = 50;
printf("a is : %d\n", a);
}
[Error] redeclaration of 'a' with no linkage
So we can see that we cannot re-decla... | [
{
"code": null,
"e": 1213,
"s": 1062,
"text": "Here we will see what is re-declaration of global variables in C. Does C supports this or not. Let us see the following code to get the idea about it."
},
{
"code": null,
"e": 1300,
"s": 1213,
"text": "#include <stdio.h>\nint main(){... |
How to set the type of cursor to display for the mouse pointer with JavaScript? | To set the type of cursor, use the cursor property in JavaScript. It allows you to change the cursor on button click.
You can try to run the following code to set the type of cursor to display for the mouse pointer with JavaScript −
Live Demo
<!DOCTYPE html>
<html>
<body>
<h1 id="myID">Heading 1</h1>
<p>... | [
{
"code": null,
"e": 1180,
"s": 1062,
"text": "To set the type of cursor, use the cursor property in JavaScript. It allows you to change the cursor on button click."
},
{
"code": null,
"e": 1295,
"s": 1180,
"text": "You can try to run the following code to set the type of cursor ... |
Fibonacci series program in Java using recursion. | Following is the required program.
Live Demo
public class Tester {
static int n1 = 0, n2 = 1, n3 = 0;
static void fibbonacci(int count) {
if (count > 0) {
n3 = n1 + n2;
n1 = n2;
n2 = n3;
System.out.print(" " + n3);
fibbonacci(count - 1);
}
}
public st... | [
{
"code": null,
"e": 1097,
"s": 1062,
"text": "Following is the required program."
},
{
"code": null,
"e": 1107,
"s": 1097,
"text": "Live Demo"
},
{
"code": null,
"e": 1510,
"s": 1107,
"text": "public class Tester {\n static int n1 = 0, n2 = 1, n3 = 0;\n s... |
Python - Convert Strings to Uppercase in Dictionary value lists - GeeksforGeeks | 01 Aug, 2020
Given dictionary with values list, convert all the strings to upper case.
Input : {“Gfg” : [“ab”, “cd”], “Best” : [“gh”], “is” : [“kl”]}Output : {‘Gfg’: [‘AB’, ‘CD’], ‘Best’: [‘GH’], ‘is’: [‘KL’]}Explanation : All value lists strings are converted to upper case.
Input : {“Gfg” : [“ab”, “cd”, “Ef”]}Output :... | [
{
"code": null,
"e": 24848,
"s": 24820,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 24922,
"s": 24848,
"text": "Given dictionary with values list, convert all the strings to upper case."
},
{
"code": null,
"e": 25111,
"s": 24922,
"text": "Input : {“Gfg” :... |
MoviePy – Setting FPS of the Clip - GeeksforGeeks | 30 Aug, 2020
In this article we will see how we can set fps of the video file clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operations on videos and GIF’s. Frame rate is the frequency at which consecutive images called frames appear on a display. The term applies equally to ... | [
{
"code": null,
"e": 24494,
"s": 24466,
"text": "\n30 Aug, 2020"
},
{
"code": null,
"e": 24950,
"s": 24494,
"text": "In this article we will see how we can set fps of the video file clip in MoviePy. MoviePy is a Python module for video editing, which can be used for basic operati... |
Python Script to Monitor Network Connection and saving into Log File - GeeksforGeeks | 23 Feb, 2022
In this article, we are going to see how to monitor the network connection and save the log file in Python.
The basic ideology of this script is to give real-time information about if the system the script is being run on is connected to an internet connection or not, and save that information into a log ... | [
{
"code": null,
"e": 26231,
"s": 26203,
"text": "\n23 Feb, 2022"
},
{
"code": null,
"e": 26340,
"s": 26231,
"text": "In this article, we are going to see how to monitor the network connection and save the log file in Python. "
},
{
"code": null,
"e": 26696,
"s": 2... |
How to Install Java Applet Viewer on Linux? - GeeksforGeeks | 17 Dec, 2021
Applet viewer is a command-line program to run a java applet. It helps you to test an applet before you run it in the browser. The applet’s code gets transferred to the system & then the Java Virtual Machine (JVM) of the browser & executes that code.
In this article, we will look into the process of instal... | [
{
"code": null,
"e": 26307,
"s": 26279,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 26558,
"s": 26307,
"text": "Applet viewer is a command-line program to run a java applet. It helps you to test an applet before you run it in the browser. The applet’s code gets transferred t... |
Ruby | Access Control - GeeksforGeeks | 04 Sep, 2018
Access control is a very important part of the object-oriented programming language which is used to restrict the visibility of methods and member fields to protect data from the accidental modification. In terms of access control, Ruby is different from all other Object Oriented Programming languages.
Imp... | [
{
"code": null,
"e": 23619,
"s": 23591,
"text": "\n04 Sep, 2018"
},
{
"code": null,
"e": 23923,
"s": 23619,
"text": "Access control is a very important part of the object-oriented programming language which is used to restrict the visibility of methods and member fields to protec... |
How to count the number of occurrences of a particular text inside a table in a page in Selenium with python? | We can count the number of occurrences of a particular text inside a table
in Selenium. First of all we need to locate the element by xpath. In xpath, we have
a particular text() function that identifies elements based on the visible text on the
screen.
Then we have to use find_elements method to get the list of matchi... | [
{
"code": null,
"e": 1316,
"s": 1062,
"text": "We can count the number of occurrences of a particular text inside a table\nin Selenium. First of all we need to locate the element by xpath. In xpath, we have\na particular text() function that identifies elements based on the visible text on the\nscre... |
LISP - Dolist Construct | The dolist construct allows iteration through each element of a list.
For example, Create a new source code file named main.lisp and type the following code in it −
(dolist (n '(1 2 3 4 5 6 7 8 9))
(format t "~% Number: ~d Square: ~d" n (* n n))
)
When you click the Execute button, or type Ctrl+E, LISP executes it i... | [
{
"code": null,
"e": 2130,
"s": 2060,
"text": "The dolist construct allows iteration through each element of a list."
},
{
"code": null,
"e": 2225,
"s": 2130,
"text": "For example, Create a new source code file named main.lisp and type the following code in it −"
},
{
"co... |
CSS - Text | This chapter teaches you how to manipulate text using CSS properties. You can set following text properties of an element −
The color property is used to set the color of a text.
The color property is used to set the color of a text.
The direction property is used to set the text direction.
The direction property is us... | [
{
"code": null,
"e": 2750,
"s": 2626,
"text": "This chapter teaches you how to manipulate text using CSS properties. You can set following text properties of an element −"
},
{
"code": null,
"e": 2805,
"s": 2750,
"text": "The color property is used to set the color of a text."
... |
Geocode with Python. How to Convert physical addresses to... | by Abdishakur | Towards Data Science | Datasets are rarely complete and often require pre-processing. Imagine some datasets have only an address column without latitude and longitude columns to represent your data geographically. In that case, you need to convert your data into a geographic format. The process of converting addresses to geographic informati... | [
{
"code": null,
"e": 566,
"s": 172,
"text": "Datasets are rarely complete and often require pre-processing. Imagine some datasets have only an address column without latitude and longitude columns to represent your data geographically. In that case, you need to convert your data into a geographic fo... |
How to increase the size of a division when you click it using jQuery ? - GeeksforGeeks | 24 Apr, 2021
In this article, we will learn how to increase the size of a division when you click on it using jQuery.
Approach 1: Using the height() and width() method.
All the divisions on the page are first selected using a common selector and a click binding is applied to trigger the function to increase the size us... | [
{
"code": null,
"e": 25675,
"s": 25647,
"text": "\n24 Apr, 2021"
},
{
"code": null,
"e": 25780,
"s": 25675,
"text": "In this article, we will learn how to increase the size of a division when you click on it using jQuery."
},
{
"code": null,
"e": 25831,
"s": 25780... |
How to install pandas using miniconda? | The popular approach of installing pandas is using Anaconda distributions. Anaconda provides pre-installed libraries and applications by default, and we no need to install any packages externally.
However, this approach means we are installing two many packages by default, Due to this anaconda costs more system storage... | [
{
"code": null,
"e": 1259,
"s": 1062,
"text": "The popular approach of installing pandas is using Anaconda distributions. Anaconda provides pre-installed libraries and applications by default, and we no need to install any packages externally."
},
{
"code": null,
"e": 1384,
"s": 1259... |
Get first index values in tuple of strings in Python | We have a tuple of strings. We are required to create a list of elements which are the first character of these strings in the tuple.
We design a for loop to take each element and extract the first character by applying the index condition as 0. Then the list function converts it to a list.
Live Demo
tupA = ('Mon', 'T... | [
{
"code": null,
"e": 1196,
"s": 1062,
"text": "We have a tuple of strings. We are required to create a list of elements which are the first character of these strings in the tuple."
},
{
"code": null,
"e": 1354,
"s": 1196,
"text": "We design a for loop to take each element and ex... |
Tryit Editor v3.7 | CSS 2D Transforms
Tryit: The scaleX() method | [
{
"code": null,
"e": 27,
"s": 9,
"text": "CSS 2D Transforms"
}
] |
Function Overriding | When the base class and derived class have member functions with exactly the same name, same return-type, and same arguments list, then it is said to be function overriding.
The following example shows how function overriding is done in C++, which is an objectoriented programming language −
#include <iostream>
using n... | [
{
"code": null,
"e": 1995,
"s": 1821,
"text": "When the base class and derived class have member functions with exactly the same name, same return-type, and same arguments list, then it is said to be function overriding."
},
{
"code": null,
"e": 2113,
"s": 1995,
"text": "The foll... |
Unity - Basic Movement Scripting | In this lesson, we will write code that makes a gameObject move up, down, left and right based on the user’s input. This should help us understand the workflow of Unity scripting more easily.
Remember that every GameObject has at least one component − Transform. What is special is that the Transform of a gameObject als... | [
{
"code": null,
"e": 2407,
"s": 2215,
"text": "In this lesson, we will write code that makes a gameObject move up, down, left and right based on the user’s input. This should help us understand the workflow of Unity scripting more easily."
},
{
"code": null,
"e": 2762,
"s": 2407,
... |
Program to evaluate one mathematical expression without built-in functions in python | Suppose we have a string that represents a mathematical expression with (+, -, *, /) Here / is representing integer division, we have to evaluate and return the result without using any built-in function.
So, if the input is like s = "2+3*5/7", then the output will be 4, as 2 + ((3 * 5) / 7) = 4
To solve this, we will ... | [
{
"code": null,
"e": 1267,
"s": 1062,
"text": "Suppose we have a string that represents a mathematical expression with (+, -, *, /) Here / is representing integer division, we have to evaluate and return the result without using any built-in function."
},
{
"code": null,
"e": 1359,
"... |
Using word2vec to Analyze News Headlines and Predict Article Success | by Charlene Chambliss | Towards Data Science | Word embeddings are a powerful way to represent the latent information contained within words, as well as within documents (collections of words). Using a dataset of news article titles, which included features on source, sentiment, topic, and popularity (# shares), I set out to see what we could learn about articles’ ... | [
{
"code": null,
"e": 432,
"s": 46,
"text": "Word embeddings are a powerful way to represent the latent information contained within words, as well as within documents (collections of words). Using a dataset of news article titles, which included features on source, sentiment, topic, and popularity (... |
How to print a factor vector without levels in R? | To print a factor vector without levels in R, we can follow the below steps −
First of all, create a factor vector.
Then, use as.character function to read the vector.
Create a factor vector
Let’s create a vector called f1 as shown below −
Live Demo
f1<-factor(sample(LETTERS[1:3],20,replace=TRUE))
f1
On executing, the... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "To print a factor vector without levels in R, we can follow the below steps −"
},
{
"code": null,
"e": 1178,
"s": 1140,
"text": "First of all, create a factor vector."
},
{
"code": null,
"e": 1230,
"s": 1178,
"tex... |
How to get first N characters from a MySQL column? | Use SUBSTRING() to get first N characters from a MySQL column. Let us first create a table −
mysql>create table DemoTable
(
Information text
);
Query OK, 0 rows affected (2.63 sec)
Insert records in the table using insert command −
mysql>insert into DemoTable values('MySQL is a structured query language');
Query OK,... | [
{
"code": null,
"e": 1155,
"s": 1062,
"text": "Use SUBSTRING() to get first N characters from a MySQL column. Let us first create a table −"
},
{
"code": null,
"e": 1246,
"s": 1155,
"text": "mysql>create table DemoTable\n(\n Information text\n);\nQuery OK, 0 rows affected (2.63... |
Python - Tkinter tkMessageBox | The tkMessageBox module is used to display message boxes in your applications. This module provides a number of functions that you can use to display an appropriate message.
Some of these functions are showinfo, showwarning, showerror, askquestion, askokcancel, askyesno, and askretryignore.
Here is the simple syntax to... | [
{
"code": null,
"e": 2418,
"s": 2244,
"text": "The tkMessageBox module is used to display message boxes in your applications. This module provides a number of functions that you can use to display an appropriate message."
},
{
"code": null,
"e": 2536,
"s": 2418,
"text": "Some of ... |
BabylonJS - Emissive | You can apply color and texture using this property. With emissive, it will radiate the texture or the color used.
Consider the following syntax related to the Emissive property.
materialforbox.emissiveColor = new BABYLON.Color3(1, .2, .7);
materialforbox.emissiveTexture = new BABYLON.Texture("images/nature.jpg", scene... | [
{
"code": null,
"e": 2298,
"s": 2183,
"text": "You can apply color and texture using this property. With emissive, it will radiate the texture or the color used."
},
{
"code": null,
"e": 2362,
"s": 2298,
"text": "Consider the following syntax related to the Emissive property."
... |
iText - Setting Font | In this chapter, we will see how to set color and font to text in a PDF document using the iText library.
You can create an empty PDF Document by instantiating the Document class. While instantiating this class, you need to pass a PdfDocument object as a parameter to its constructor.
To add a paragraph to the document,... | [
{
"code": null,
"e": 2474,
"s": 2368,
"text": "In this chapter, we will see how to set color and font to text in a PDF document using the iText library."
},
{
"code": null,
"e": 2653,
"s": 2474,
"text": "You can create an empty PDF Document by instantiating the Document class. Wh... |
How to Generate Time Series Considering Holidays of Any Country in Pandas | by Rashida Nasrin Sucky | Towards Data Science | In time-series data analysis, generating dates could be necessary on many occasions in real life. Sometimes we have data but time is not recorded, sometimes we may have to use one countries data for another country’s research or last year’s data this year. The holidays will be different this year than last or this coun... | [
{
"code": null,
"e": 538,
"s": 172,
"text": "In time-series data analysis, generating dates could be necessary on many occasions in real life. Sometimes we have data but time is not recorded, sometimes we may have to use one countries data for another country’s research or last year’s data this year... |
Shift command in Linux with examples | 21 Apr, 2020
Shift is a builtin command in bash which after getting executed, shifts/move the command line arguments to one position left. The first argument is lost after using shift command. This command takes only one integer as an argument. This command is useful when you want to get rid of the command line argumen... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n21 Apr, 2020"
},
{
"code": null,
"e": 404,
"s": 53,
"text": "Shift is a builtin command in bash which after getting executed, shifts/move the command line arguments to one position left. The first argument is lost after using shift com... |
C library macro - va_end() | The C library macro void va_end(va_list ap) allows a function with variable arguments which used the va_start macro to return. If va_end is not called before returning from the function, the result is undefined.
Following is the declaration for va_end() macro.
void va_end(va_list ap)
ap − This is the va_list object pre... | [
{
"code": null,
"e": 2219,
"s": 2007,
"text": "The C library macro void va_end(va_list ap) allows a function with variable arguments which used the va_start macro to return. If va_end is not called before returning from the function, the result is undefined."
},
{
"code": null,
"e": 2268... |
Aptitude - Co-ordinate Geometry | In coordinate geometry, points are placed on the "coordinate plane" as shown below. It has two scales - one running across the plane called the "x axis" and another right angle to it called the y axis. (These can be thought of as similar to the column and row in the paragraph above.) The point where the axes cross is c... | [
{
"code": null,
"e": 4265,
"s": 3892,
"text": "In coordinate geometry, points are placed on the \"coordinate plane\" as shown below. It has two scales - one running across the plane called the \"x axis\" and another right angle to it called the y axis. (These can be thought of as similar to the colu... |
Chefboost — an alternative Python library for tree-based models | by Eryk Lewinson | Towards Data Science | I randomly encountered chefboost in my Twitter feed and given that I never heard about it before, I decided to have a quick look into it and test it out. In this article, I will briefly present the library, mention the key differences from the go-to library which is scikit-learn, and show a quick example of chefboost i... | [
{
"code": null,
"e": 504,
"s": 172,
"text": "I randomly encountered chefboost in my Twitter feed and given that I never heard about it before, I decided to have a quick look into it and test it out. In this article, I will briefly present the library, mention the key differences from the go-to libra... |
PySpark - Select columns by type - GeeksforGeeks | 19 Dec, 2021
In this article, we will discuss how to select columns by type in PySpark using Python.
Python3
# importing moduleimport pyspark # importing sparksession from pyspark.sql modulefrom pyspark.sql import SparkSession # import data field typesfrom pyspark.sql.types import StringType, DoubleType, IntegerType,... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n19 Dec, 2021"
},
{
"code": null,
"e": 24380,
"s": 24292,
"text": "In this article, we will discuss how to select columns by type in PySpark using Python."
},
{
"code": null,
"e": 24388,
"s": 24380,
"text": "Py... |
Find maximum in stack in O(1) without using additional stack in C++ | Suppose we want to make a stack that can store the maximum element in the stack. And we can get it in O(1) time. The constraint is that, it should not use any additional space, so O(1) extra space.
We can make one user-defined stack, that will store the max value, when one operation is performed, like pop or peek, then... | [
{
"code": null,
"e": 1260,
"s": 1062,
"text": "Suppose we want to make a stack that can store the maximum element in the stack. And we can get it in O(1) time. The constraint is that, it should not use any additional space, so O(1) extra space."
},
{
"code": null,
"e": 1696,
"s": 126... |
Java Program For Converting Array Into Zig-Zag Fashion - GeeksforGeeks | 28 Dec, 2021
Given an array of DISTINCT elements, rearrange the elements of array in zig-zag fashion in O(n) time. The converted array should be in form a < b > c < d > e < f.
Example:
Input: arr[] = {4, 3, 7, 8, 6, 2, 1} Output: arr[] = {3, 7, 4, 8, 2, 6, 1}
Input: arr[] = {1, 4, 3, 2} Output: arr[] = {1, 4, 2, 3}
A ... | [
{
"code": null,
"e": 24796,
"s": 24768,
"text": "\n28 Dec, 2021"
},
{
"code": null,
"e": 24960,
"s": 24796,
"text": "Given an array of DISTINCT elements, rearrange the elements of array in zig-zag fashion in O(n) time. The converted array should be in form a < b > c < d > e < f. ... |
Using Github Pages for creating global APIs | by Gaurav Ghati | Towards Data Science | So, I accidentally figured out that we can return JSON responses instead of the standard HTML when we access any GitHub Pages site. So, I thought instead of creating a static website why not do some dev fun ;) and create a REST API for the data that I need.
For example, if you type this on terminal
curl https://gauravg... | [
{
"code": null,
"e": 429,
"s": 171,
"text": "So, I accidentally figured out that we can return JSON responses instead of the standard HTML when we access any GitHub Pages site. So, I thought instead of creating a static website why not do some dev fun ;) and create a REST API for the data that I nee... |
C library function - fopen() | The C library function FILE *fopen(const char *filename, const char *mode) opens the filename pointed to, by filename using the given mode.
Following is the declaration for fopen() function.
FILE *fopen(const char *filename, const char *mode)
filename − This is the C string containing the name of the file to be opened.... | [
{
"code": null,
"e": 2147,
"s": 2007,
"text": "The C library function FILE *fopen(const char *filename, const char *mode) opens the filename pointed to, by filename using the given mode."
},
{
"code": null,
"e": 2198,
"s": 2147,
"text": "Following is the declaration for fopen() f... |
How can we encode a JSON object in Java? | A JSONObject is a subclass of java.util.HashMap where no order is provided. We can also use the strict ordering of elements as well with the help of the JSONValue.toJSONString(map) method i.e. by the implementation of java.util.LinkedHashMap.
We can encode a JSON object in the below two examples.
import java.util.*;
im... | [
{
"code": null,
"e": 1305,
"s": 1062,
"text": "A JSONObject is a subclass of java.util.HashMap where no order is provided. We can also use the strict ordering of elements as well with the help of the JSONValue.toJSONString(map) method i.e. by the implementation of java.util.LinkedHashMap."
},
{
... |
Perl chdir Function | This function changes the current working directory to EXPR, or to the user's home directory if none is specified. This function call is equivalent to Unix command cd EXPR.
Following is the simple syntax for this function −
chdir EXPR
chdir
This function returns 0 on failure and 1 on success.
Following is the example... | [
{
"code": null,
"e": 2393,
"s": 2220,
"text": "This function changes the current working directory to EXPR, or to the user's home directory if none is specified. This function call is equivalent to Unix command cd EXPR."
},
{
"code": null,
"e": 2444,
"s": 2393,
"text": "Following... |
Matplotlib - Multiplots | In this chapter, we will learn how to create multiple subplots on same canvas.
The subplot() function returns the axes object at a given grid position. The Call signature of this function is −
plt.subplot(subplot(nrows, ncols, index)
In the current figure, the function creates and returns an Axes object, at position in... | [
{
"code": null,
"e": 2595,
"s": 2516,
"text": "In this chapter, we will learn how to create multiple subplots on same canvas."
},
{
"code": null,
"e": 2709,
"s": 2595,
"text": "The subplot() function returns the axes object at a given grid position. The Call signature of this fun... |
How to draw a circle with arc() in HTML5? | The arc() method is used to create a circle in HTML5 with the canvas element. For a circle with arc() method, use the start angle as 0 and end angle to 2*Math.PI.
Here are the parameter values of the arc() method −
You can try to run the following code to draw a circle with arc() method in HTML5 −
<!DOCTYPE html>
<html... | [
{
"code": null,
"e": 1225,
"s": 1062,
"text": "The arc() method is used to create a circle in HTML5 with the canvas element. For a circle with arc() method, use the start angle as 0 and end angle to 2*Math.PI."
},
{
"code": null,
"e": 1277,
"s": 1225,
"text": "Here are the parame... |
How can I define duplicate items in a Python tuple? | You can directly enter duplicate items in a Python tuple as it doesn't behave like a set(which takes only unique items).
myTpl = (1, 2, 2, 2, 3, 5, 5, 4)
You can also use operators on tuples to compose large tuples.For Example
myTpl = (1,) * 5
print(myTpl)
This will give the output
(1,1,1,1,1)
You can also join tuples... | [
{
"code": null,
"e": 1184,
"s": 1062,
"text": "You can directly enter duplicate items in a Python tuple as it doesn't behave like a set(which takes only unique items). "
},
{
"code": null,
"e": 1217,
"s": 1184,
"text": "myTpl = (1, 2, 2, 2, 3, 5, 5, 4)"
},
{
"code": null,... |
Best Practices for Bucketing in Spark SQL | by David Vrba | Towards Data Science | Bucketing is a feature supported by Spark since version 2.0. It is a way how to organize data in the filesystem and leverage that in the subsequent queries.
There are many resources that explain the basic idea of bucketing, in this article, we will go one step further and describe bucketing more in detail, we will see ... | [
{
"code": null,
"e": 329,
"s": 172,
"text": "Bucketing is a feature supported by Spark since version 2.0. It is a way how to organize data in the filesystem and leverage that in the subsequent queries."
},
{
"code": null,
"e": 648,
"s": 329,
"text": "There are many resources that... |
Search an element in the given singly Linked List using C++ | Given a singly linked list, the task is to search a particular element in the linked list. If the element is found, then print “present” otherwise “Not present”. For example,
Input-1 −
1→ 2→ 3→ 4→ 5→ 6
Searching for ‘7’
Output −
Not Present
Explanation − In the given singly linked list the element ‘7’ is not present, h... | [
{
"code": null,
"e": 1237,
"s": 1062,
"text": "Given a singly linked list, the task is to search a particular element in the linked list. If the element is found, then print “present” otherwise “Not present”. For example,"
},
{
"code": null,
"e": 1247,
"s": 1237,
"text": "Input-1... |
BitConverter Class in C# | The BitConverter class converts base data types to an array of bytes, and an array of bytes to base data types.
Following are the methods −
Let us see some examples −
The BitConverter.ToBoolean() method in C# returns a Boolean value converted from the byte at a specified position in a byte array.
Following is the synta... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "The BitConverter class converts base data types to an array of bytes, and an array of bytes to base data types."
},
{
"code": null,
"e": 1202,
"s": 1174,
"text": "Following are the methods −"
},
{
"code": null,
"e": 1229,... |
Generating Word Cloud in Python | Set 2 - GeeksforGeeks | 08 Jun, 2021
Prerequisite: Generating Word Cloud in Python | Set – 1Word Cloud is a data visualization technique used for representing text data in which the size of each word indicates its frequency or importance. Significant textual data points can be highlighted using a word cloud. Word clouds are widely used for an... | [
{
"code": null,
"e": 24440,
"s": 24412,
"text": "\n08 Jun, 2021"
},
{
"code": null,
"e": 24938,
"s": 24440,
"text": "Prerequisite: Generating Word Cloud in Python | Set – 1Word Cloud is a data visualization technique used for representing text data in which the size of each word ... |
What is the session Object in JSP? | The session object is used to track a client session between client requests.
JSP makes use of the servlet provided HttpSession Interface. This interface provides a way to identify a user across.
a one-page request or
visit to a website or
store information about that user
By default, JSPs have session tracking enabled... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "The session object is used to track a client session between client requests."
},
{
"code": null,
"e": 1258,
"s": 1140,
"text": "JSP makes use of the servlet provided HttpSession Interface. This interface provides a way to identify a... |
How to detect a route change in AngularJS ? - GeeksforGeeks | 30 Nov, 2019
Approach: To detect route change at any moment in AngularJS this can be achieved by using $on() method. The $on() method is an event handler, the event which will handle $routeChangeSuccess which gets triggered when route/view change is done.
Syntax:
$rootScope.$on('$routeChangeSuccess', function () {
... | [
{
"code": null,
"e": 25087,
"s": 25059,
"text": "\n30 Nov, 2019"
},
{
"code": null,
"e": 25330,
"s": 25087,
"text": "Approach: To detect route change at any moment in AngularJS this can be achieved by using $on() method. The $on() method is an event handler, the event which will ... |
How to Install Ulauncher in Ubuntu? - GeeksforGeeks | 06 Oct, 2021
Ulauncher is a fast app launcher which allows searching app and files by pressing hotkeys. Ulauncher is written in Python with GTK+. Below are some Ulauncher app launcher features:
Fuzzy search (type in app name without worrying about spelling)
built-in themes
customizable shortcuts
Search Google, Wikiepdi... | [
{
"code": null,
"e": 24952,
"s": 24924,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 25133,
"s": 24952,
"text": "Ulauncher is a fast app launcher which allows searching app and files by pressing hotkeys. Ulauncher is written in Python with GTK+. Below are some Ulauncher app l... |
JAXB XML to Java Object Conversion | OnlineTutorialsPoint % | 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
JAXB (Java Architecture for XML Binding) is a... | [
{
"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,
... |
Data Hazards and its Handling Methods - GeeksforGeeks | 14 Dec, 2020
Data Hazards occur when an instruction depends on the result of previous instruction and that result of instruction has not yet been computed. whenever two different instructions use the same storage. the location must appear as if it is executed in sequential order.
There are four types of data dependenc... | [
{
"code": null,
"e": 24804,
"s": 24776,
"text": "\n14 Dec, 2020"
},
{
"code": null,
"e": 25073,
"s": 24804,
"text": "Data Hazards occur when an instruction depends on the result of previous instruction and that result of instruction has not yet been computed. whenever two differe... |
Implementing Moving Averages in Python | by Posey | Towards Data Science | Moving averages are used and discussed quite commonly by technical analysts and traders alike. If you’ve never heard of a moving average, it is likely you have at least seen one in practice. A moving average can help an analyst filter noise and create a smooth curve from an otherwise noisy curve. It is important to not... | [
{
"code": null,
"e": 576,
"s": 172,
"text": "Moving averages are used and discussed quite commonly by technical analysts and traders alike. If you’ve never heard of a moving average, it is likely you have at least seen one in practice. A moving average can help an analyst filter noise and create a s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.