If You are an iOS Developer , you must take a look here . You will find this article very helpfull .
The time when I was exploring about AVFoundation , for a good examples and documentation , there was literally no such explanations and documentation . There are some but very poorly written .
We are going to understand the AVFoundation and Implement that in an SwiftUI app project . We will follow the MVVM pattern . And Line by Line Understanding of Code .
Below is the repository for this project , just give it a star and…
In this article, we will take a very short look at the implementation of MVVM architecture with an example project.
Source Code: GitHub
Here you will learn about how UI logic is separated from core application logic by taking your first look at the MVVM architecture pattern. MVVM is a widely used design pattern that allows us to separate core application logic from UI logic.
Model: This is your core model, which will contain all data that you may have consumed from a database or via an external API.
ViewModel: A stripped-down or UI-tailored representation of your Model that contains…
Some basic things about BITs and its Manipulation
To play with Bits , you must be familiar with binary numbers , and their operations like addition , subtraction etc .
Bitwise NOT is an unary operator that flips the bits of the number i.e., if the ith bit is 0, it will change it to 1 and vice versa. Bitwise NOT is nothing but simply the one’s complement of a number. Lets take an example.
In this article you will see how to solve knapsack problem by memoization .
You have given a bag of capacity ‘W’ . And also you have ’n’ items with ‘w’ weights and ‘v’ values . You need to fill the bag with maximum values without crossing the capacity weight .
In this approach , we will try to find all the possibilities using recursion .
def knapSack(W, wt, val, n): if n == 0 or W == 0 : return 0 if (wt[n-1] > W): return knapSack(W, wt, val, n-1) else: return max(val[n-1] + knapSack(W-wt[n-1], wt, val, n-1),knapSack(W…
In this article , we will look on how we can use dynamic programming to come up with a solution of polynomial instead of exponential .
This is the one of the best example to implement DP . And it is quite famous .
Lets begin
Given two strings: string X of length m [X(1..m)], and string Y of length n [Y(1..n)], find the longest common subsequence: the longest sequence of characters that appear left-to-right (but not necessarily in a contiguous block) in both strings. For example, if X = “ABCBDAB” and Y = “BDCABA”, the LCS(X, Y) = {“BCBA”…
Explanation with examples . Just take a look and let me know your thought about it !
Dynamic programming and memoization work together. The main difference between dynamic programming and divide and conquer is that in the case of the latter, sub problems are independent, whereas in DP there can be an overlap of sub problems.
By using memoization [maintaining a table of sub problems already solved], dynamic programming reduces the exponential complexity to polynomial complexity (O(n 2 ), O(n 3 ), etc.) for many problems .
Generally Dynamic Programming has two components :
Dynamic Programming = Recursion + Memoization
…
In This Article I have Covered 40 Questions | Swift Programming
In short its an ability of swift . You dont always need to write types of variables and constant you making in your code . For example :
// swift know its Int type
var age = 40 // Int
// You dont need to tell them always like below
var age : Int = 40
Generic code enables you to write flexible, reusable functions and types that can work with any type, subject to requirements that you define.
Suppose you want to swap to values of type Int…
Enjoy the Article 😇 , its short and clean !
The path I was following to look up the backend , includes the following :
Note : This Article will Only Include some Basic Overviews only !
Starting from Node JS , Node.js is an open-source, cross-platform, back-end, JavaScript runtime environment .
Now we will create a HTTP server listening on port 3000 , which sends Hello, World! to the browser. …
We will try to create our own array that is custom and powerful !
Here we will creating a type of array that take elements and sort on their own . Both the integers and strings .
You only need to give them elements , and they will store in sorted form , even if it is a string !
My LinkedIn : linkedin.com/in/my-pro-file
Check This : https://bit.ly/38k4w7l
In order to Get Connected and Read those useful articles , Follow me Here .
Thank You !
Mohammad Yasir
Here are some basics and important knowledge about OS that every developer should know !
An operating system provides an interface to user to interact with the computers hardware .
To write directly machine level language is really difficult for any programmer , since in early 60s people use to write machine level language directly . Now we have OS to avoid writing those MLL instead we use OS interface to interact with hardware .
Some OS are convenient and some are efficient and some are…