
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 33676 Articles for Programming

3K+ Views
Density Plot A density plot, also known as a kernel density estimate (KDE) plot, is a graphical display of data that shows the probability density function (PDF) of the data. It is used to visualize the distribution of the data and identify patterns and trends in the data. The purpose of a density plot is to give you a visual representation of the underlying distribution of the data. It can help you understand the shape and spread of the data and identify any unusual values or outliers. It can also be used to compare the distribution of multiple variables or ... Read More

2K+ Views
What is Swarmplot() and Stripplot? In python seaborn, the swarmplot() positions the points using a technique called "beeswarm" that adjusts the points to avoid overlap. This results in a plot where the points are spread out and are easier to distinguish, but the relative positions of the points within a category are not preserved. Whereas, stripplot() positions the points on a categorical axis, with one category per tick. The points are not adjusted to avoid overlap, so they may overlap if many points are in the same category. Feature stripplot() swarmplot() Purpose Display the distribution of ... Read More

2K+ Views
A matplotlib-based Python visualization package is called Seaborn. It offers an advanced drawing interface for beautiful statistics visuals. It is based on Matplotlib and supports the pandas and numpy data structures and the statistical functions from scipy and statsmodels. A connection involving categorical data may be shown in seaborn in various ways. There are two ways to create these charts, which is similar to the relationship between relplot() and either scatterplot() or lineplot(). There are various axes-level methods for charting categorical data in various ways, and the figure-level interface catplot() provides uniform higher-level access to them. What is categorical data? ... Read More

1K+ Views
In Swift, the viewDidAppear method does not call when an application is opened from the background. In that case, you have to use the applicationWillEnterForeground method in the AppDelegate. In this article, you will see an example of how to perform an action when opening an app from the background. Approach If you open an app from the background, it should call the applicationWillEnterForeground method of the app delegate before presenting the view. However, it's possible that the viewDidAppear method of the view controller is not called if the view controller's view is already on the screen or if the ... Read More

1K+ Views
In Swift, an optional escaping closure parameter is a closure that can be executed after the function it is passed to has returned. In this article, we will see how to create escaping closures as parameters with examples. To declare an optional escaping closure parameter, you add the @escaping keyword before the closure type to the function's parameter list. Syntax Here is the syntax. func doSomething(completion: @escaping () -> Void) { // Write code here } In the above code, completion is an optional escaping closure parameter that takes no parameters and returns Void. The @escaping ... Read More

4K+ Views
In Swift, there are many approaches to converting an integer to time components like hours, minutes, and seconds. Every approach depends on the requirement. For example, you can use arithmetic operators to convert. Another approach is using DateComponentsFormatter class to convert an integer into time components easily. In this article, you will see many examples of converting an integer to time components. Example 1 To convert an integer representing a duration in seconds to hours, minutes, and seconds, you can use the following code in Swift − import Foundation let durationInSeconds = 3661 let hours = durationInSeconds / 3600 let ... Read More

4K+ Views
In Swift, the do-try-catch statement is used to handle errors that can be thrown by a function or method. It provides a structured way to catch and handle errors in your code. In your codebase, you cannot handle all runtime errors when they come but using try-catch you can handle them without crashing your application. The do-try-catch Syntax The do block is used to wrap code that could throw an error. Inside the do block, you call the function or method that throws an error. The try keyword is used before calling any function or method that may throw an ... Read More

1K+ Views
In Swift, you can use KVO to observe changes to an object property by registering an observer for that property. When the property value changes, the observer is notified and can take appropriate actions. In this article, you will see an example of how to implement KVO in Swift. To use KVO in Swift, you need to do the following Mark the property that you want to observe with the @objc dynamic attribute. This attribute tells the Swift compiler to generate Objective-C-compatible code for the property. Register an observer for the property using the addObserver(_:forKeyPath:options:context:) method of the observed ... Read More

3K+ Views
In Swift, there are several ways to save local data in an app, depending on the type and size of data you want to save. You can use User Defaults, Property List Serialization, Core Data, etc. In this article, you will learn about User Defaults with some examples. User Defaults In iOS, macOS, and watchOS, a fundamental storage mechanism called UserDefaults enables an app to store relatively small amounts of data, including user preferences or settings. You assign a value to a particular key in a key-value pair system that is used. The value may then be obtained by using ... Read More

2K+ Views
In iOS Swift, you can manually deprecate members (properties, methods, and other members) by using the @available attribute with the deprecated argument. @available The @available attribute in Swift is used to specify the availability of a particular piece of code. It can be used to mark a class, function, method, property, or enumeration as available or unavailable for a particular platform, version, or architecture. Here's an example syntax of the @available attribute @available(platform version, *) The platform argument specifies the platform on which the code is available (e.g. iOS, macOS, watchOS, tvOS). The version argument specifies the version of ... Read More