Web Development CS JS Python JavaScript Hacking ReactJs Python django Flask CSS Frontend Backend Full Stack Java Node Pdf Books
3.99K subscribers
878 photos
11 videos
995 files
354 links
One place for the latest in JavaScript, Python, Django, React, and more. Get top-notch tutorials, tips, and downloadable resources. Join us to elevate your tech skills!
Download Telegram
β–ͺ️ Favicon is a small image that appears beside the website name.
β–ͺ️ It is known by many names like tab icon, bookmark icon because it is displayed on a browser's tab, bookmark bar etc.
β–ͺ️ Most famous & widely used format for favicon is .ico
1. How to create a Favicon?

β–ͺ️ Any image can work but it should be small & simple with high contrast
β–ͺ️ Normally preferred sizes are 16 x 16 and 32 x 32.
β–ͺ️ You can also create & download a favicon using these sites β†’
β€’ favicon.cc
β€’ favicon.io
2. Adding Favicon to Website

β–ͺ️ a favicon is added via <link> tag
β–ͺ️ Just add the <link> tag inside <head> with the path to the favicon.

⬇️
Undefined.

This is due to hoisting. The code behaves like this πŸ‘‡

var a; //the variable got hoisted
console.log(a); // Outputs: undefined
a = 5;

[We know when a declare a variable the initial value is "undefined" until we assign a value]
πŸ‘1
Answer: Exception

Solution:
class TV:
pass
creates a new data type called TV.

pass is just a no-operation statement, it doesn't add any data or functionality to the class.

Hence, this data type does not contain any attributes or functionality

obj = TV()
creates a new object named obj, of the data type TV.

obj.price = 200
creates a new variable named price, within obj.
The value of this variable is set to 200.

Finally, we have
print(self.price)

But there is no object named self here!

Hence, we get an Exception stating that there is nothing called self.

But you'd have seen self in other programs elsewhere.

self is not a keyword or pre-defined variable in Python.

It is simply a convention to use self WITHIN methods to denote

the first parameter of the method.

The first parameter of a method is is the object through which the method was invoked.

Eg.
a = [1,2,3]
then
a.append(5)
is equivalent to
list.append(a, 5)

So here, a is implicitly passed to the method append.

The name self is

conventionally used to refer to the implicit argument passed in methods.

Otherwise, the word self has no special meaning in Python.

Hence, the code in the question gives an error, because self is not defined before use.

I hope this helped!

@python_assets
@javascript_resources
❀4πŸ‘2
Practice these 125+ Algorithms in
@javascript_resources
@python_assets
❍ C++
❍ Java
❍ Python
❍ JavaScript
Or, any language of your choice

Stay in top 5% of programmers.
⇩
➊ Array - Algorithms

βž€ Creating an Array
➁ Iterate through Array
βž‚ Get an Element
βžƒ Search an Element
βž„ Insert Element(s)
βž… Delete Element(s)
βž† Filter an Array
βž‡ Fetch a Sub-Array
➈ Merging Arrays
βž‰ Reverse Array
βž€βž€ Rotate Array
βž‹ Linked List - Algorithms [1]

βž€ Creating a Linked List
➁ Iterate through Linked List
βž‚ Get an Element
βžƒ Find an Element

➀ Insert Element(s)
βž„ At Start
βž… At End
βž† At Anywhere
βž‹ Linked List - Algorithms [2]

➀ Delete Element(s)
βž‡ From Start
➈ From End
βž‰ From Anywhere

βž€βž€ IsEmpty
βž€βž Merging Linked Lists
βž€βž‚ Reverse Linked List
βž€βžƒ Check for Cycles
➌ Stack - Algorithms

βž€ Push
➁ Pop
βž‚ IsEmpty
βžƒ IsFull
βž„ Peek

➍ Queue - Algorithms

βž€ Enqueue
➁ Dequeue
βž‚ IsEmpty
βžƒ IsFull
βž„ Peek
➎ Hash Table - Algorithms

➀ Hash Function
βž€ Division Method
➁ Multiplication Method
βž‚ Universal Hashing
➀ Hash Collision
βžƒ Collision Resolution
➀ Open Addressing
βž„ Linear Probing
βž… Quadratic Probing
βž† Double Hashing
➏ Tree - Algorithms

βž€ Traversal
➁ Height of a Node/Tree
βž‚ Depth of a Node
βžƒ Degree of a Node
➀ Traversal
βž„ In Order
βž… Pre Order
βž† Post Order
βž‡ Level Order
➈ Insert
βž‰ Delete
➐ Heap - Algorithms
@javascript_resources
@python_assets
βž€ Heapify
➁ Insert Element
βž‚ Delete Element
βžƒ Peek (Max/Min Element)
βž„ Extract (Max/Min Element)
βž‘ Graph - Algorithms [1]

➀ Adjacency Matrix
βž€ Add Edge
➁ Remove Edge

➀ Adjacency List
βž‚ Add Edge
βžƒ Remove Edge

➀ Traverse Nodes
βž„ Depth First Search
βž… Breadth First Search
βž‘ Graph - Algorithms [2]

➀ Shortest Path
βž† Dijkstra's Algorithm
βž‡ Floyd-Warshall Algorithm
➈ Bellman Ford Algorithm

➀ Minimum Spanning Tree
βž‰ Kruskal's Algorithm
βž€βž€ Prim's Algorithm
βž‘ Graph - Algorithms [3]

➀ Connectivity
βž€βž Check connectivity b/w nodes
βž€βž‚ Find all paths
βž€βžƒ Articulation points
βž€βž„ Bridges
βž€βž… Hamiltonian Path
βž€βž† Hamiltonian Cycle
βž€βž‡ Eulerian Path
βž€βžˆ Eulerian Cycle
20. Find # of islands
βžβž€ Transitive Closure
βž‘ Graph - Algorithms [4]
@javascript_resources
@python_assets
➁➁ Graph Cycle

➀ Topological Sorting
βžβž‚ Find all topological sorting
βžβžƒ Kahn's Algorithm
βžβž„ Longest Path

➀ Flow Network
βžβž… Ford-Fulkerson Algorithm
βžβž† Edmonds–Karp algorithm
βžβž‡ Dinic's Algorithm
βž’ Search Algorithms

βž€ Linear Search
➁ Jump Search
βž‚ Binary Search
βžƒ Interpolation Search
βž„ Exponential Search
βž… Ternary Search
βž“ Sorting Algorithms [1]

βž€ Bubble Sort
➁ Selection Sort
βž‚ Insertion Sort
βžƒ Merge Sort
βž„ Quick Sort

And, a few advanced ones,

βž… Binary Insertion Sort
βž† 3-way Merge Sort
βž‡ 3-way Quick Sort
➈ Counting Sort
βž‰ Radix Sort
βž€βž€ Bucket Sort
βž€βž Heap Sort
βž€βž‚ Shell Sort
βž“ Sorting Algorithms [2]

βž€βžƒ Tim Sort
βž€βž„ Odd-Even Sort
βž€βž… Comb Sort
βž€βž† Cocktail Sort
βž€βž‡ Tree Sort
βž€βžˆ Cartesian Sort
20. Pigeonhole Sort
βžβž€ Cycle Sort
➁➁ Strand Sort
βžβž‚ Pancake Sort
βžβžƒ Permutation Sort
βžβž„ Gnome Sort
βžβž… Bitonic Sort
βžβž† Sleep Sort
@javascript_resources
@python_assets
πŸ‘2❀1πŸ”₯1😁1