In object-oriented programming, you have classes and objects, unlike functional programming. There are 4 main pillars in OOP Paradigm.
- Abstraction
- Encapsulation
- Polymorphism
- Inheritance
| var rows = Array.from(document.querySelectorAll('.myTableProxy tr')); | |
| var output = ''; | |
| rows.slice(1).forEach((row, index) => { | |
| var value = row.querySelector('td:first-child'); | |
| if (value) { | |
| output += `${value.textContent.trim()}\n`; | |
| } | |
| }); | |
| console.log(output); |
| from typing import Union | |
| import requests | |
| import sys | |
| import re | |
| import subprocess | |
| GOOGLE_FILE_ID_REGEX = r"file/d/(.*)/" | |
| GOOGLE_DRIVE_API_URL = "https://www.googleapis.com/drive/v3" | |
| API_KEY = "" |
| interface Queue { | |
| void enqueue(int data); | |
| void dequeue(); | |
| int front(); | |
| int rear(); | |
| int size(); |
| interface Stack { | |
| void pop(); | |
| void push(int data); | |
| int top(); | |
| void print(); | |
| int size(); |
| interface LinkedList { | |
| void add(int data); | |
| void remove(int index); | |
| int get(int index); | |
| int length(); | |
| boolean isEmpty(); |
| const magnetLinksXPath = document.evaluate( | |
| "//tr[@class='default']/td[@class='text-center'][1]/a[2]/@href", | |
| document, | |
| null, | |
| XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, | |
| null | |
| ); | |
| const magnetLinks = []; |
| [ | |
| "ac31aa35a76d4b4718e68281226ce51d", | |
| "3e4cb71cf6a2f28613595cad4b75691e" | |
| ] |
| from typing import Any, List | |
| import re | |
| import pymongo | |
| import urllib.parse | |
| class MongoDb: |
| from typing import Dict, Callable | |
| import feedparser | |
| import threading | |
| import time | |
| class RssReader: | |
| def __init__( | |
| self, |