LinkedList
[toc]
Linked ListOverview
Definition: A linked list is a linear data structure consisting of a sequence of elements where each element points to the next element in the sequence.
Types of Linked Lists:
Singly Linked List: Each node contains data and a pointer to the next node.
Doubly Linked List: Each node contains data, a pointer to the next node, and a pointer to the previous node.
Circular Linked List: The last node points back to the first node, forming a circular structure.
In a linked li ...
Array
[toc]
Array
The memory addresses of array elements are contiguous.
Contiguous Memory Addresses of 2D Arrays
Memory management differs across programming languages.
C++ 2D Array:
Contiguous memory allocation.
Efficient for accessing elements in row-major order.
Java 2D Array:
像Java是没有指针的,同时也不对程序员暴露其元素的地址,寻址操作完全交给虚拟机。
所以看不到每个元素的地址情况
Non-contiguous memory allocation.
Each row is a distinct array object, leading to potential memory fragmentation.
Offers flexibility in handling rows of vary ...
HTMLreview
HTML REVIEWThe title AttributeThe title attribute defines some extra information about an element.
The value of the title attribute will be displayed as a tooltip when you mouse over the element:
1234567891011<!DOCTYPE html><html><body><h2 title="I'm a header">The title Attribute</h2><p title="I'm a tooltip">Mouse over this paragraph, to display the title attribute as a tooltip.</p></body></html>
Single or Doub ...
💐PHP💐
PHP12345678910111213141516<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title></head><body> <?php echo("<p style= 'color: red'>hello world</p>"); ?></body></html><?php echo("hello world");?>
In PHP, the echo st ...
Frontend review
CSSHow to add CSS
inline: for specific section/ testing/ want it in one single element
internal: useful for applying it only to one HTML document
external: most used , styles.css
1. Inline CSS:In this method, CSS rules are directly added to the HTML elements using the style attribute.
123456789101112<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initia ...
Frontend review
HTMLHeading elements1<h1> Hello World </h1>
Don’t have more than one h1 element.
Don’t jump between different levels , like don’t do h1 -> h3 directly, do h1 -> h2
Paragraph elements1<p>this is a paragraph</p>
you can see them being separated with a line in between
Void elementsa void element is an element where you are forbidden from putting any content inside the tag.
123<p>this is a paragraph</p><hr /> <!-- this is a void element --> ...
Frontend review
Responsive web windowGrid is “usually” used to define your skeleton structure and flexbox “usually” for the smaller edits of content.
flex inside of grid
grid inside of a flex box
media query
123456789101112/* Default styles for all screen sizes */p { font-size: 16px;}/* Media query for screens with a maximum width of 600 pixels */@media (max-width: 600px) { p { font-size: 14px; }}
Flexbox (display)flex is a value for the display property.
overvi ...
Frontend review
HTMLHeading elements1<h1> Hello World </h1>
Don’t have more than one h1 element.
Don’t jump between different levels , like don’t do h1 -> h3 directly, do h1 -> h2
Paragraph elements1<p>this is a paragraph</p>
you can see them being separated with a line in between
Void elementsa void element is an element where you are forbidden from putting any content inside the tag.
123<p>this is a paragraph</p><hr /> <!-- this is a void element --> ...
Data pipeline
Data pipelinewhat’s ETL?ETL stands for Extract, Transform, Load.
It’s a process of gathering data from different sources,
transforming it into a usable format,
and loading it into a target database for analysis.
Docker
Dockererror [internal] load metadata for docker.io/library/ubuntu:latesthttps://stackoverflow.com/questions/66912085/why-is-docker-compose-failing-with-error-internal-load-metadata-suddenly