mirror of
				https://github.com/ItsDrike/itsdrike.com.git
				synced 2025-11-03 19:56:36 +00:00 
			
		
		
		
	Don't globally override table style, use shortcode
This commit is contained in:
		
							parent
							
								
									35d891b9b3
								
							
						
					
					
						commit
						c02b9e6498
					
				
					 4 changed files with 26 additions and 16 deletions
				
			
		| 
						 | 
				
			
			@ -44,6 +44,7 @@ current one, to avoid data repetition. This would be an example of the data tabl
 | 
			
		|||
 | 
			
		||||
Table of students:
 | 
			
		||||
 | 
			
		||||
{{< table >}}
 | 
			
		||||
| Student ID | Date of birth | Name           | Permanent residence address | Field of study       |
 | 
			
		||||
|------------|---------------|----------------|-----------------------------|----------------------|
 | 
			
		||||
| 0          | 1999-02-22    | John Doe       | Leander, Texas(TX), 78641   | Software Engineering |
 | 
			
		||||
| 
						 | 
				
			
			@ -51,9 +52,11 @@ Table of students:
 | 
			
		|||
| 2          | 2000-11-14    | Samantha Jones | Dayton, Kentucky(KY), 41074 | Graphics Design      |
 | 
			
		||||
| 3          | 1998-04-12    | Michael Carter | Macomb, Michigan(MI), 48044 | Software Engineering |
 | 
			
		||||
| ...        | ...           | ...            | ...                         | ...                  |
 | 
			
		||||
{{< /table >}}
 | 
			
		||||
 | 
			
		||||
Student Grades:
 | 
			
		||||
 | 
			
		||||
{{< table >}}
 | 
			
		||||
| Student | Subject           | Grade | Year |
 | 
			
		||||
|---------|-------------------|-------|------|
 | 
			
		||||
| 0       | Mathematics       | B     | 2020 |
 | 
			
		||||
| 
						 | 
				
			
			@ -63,6 +66,7 @@ Student Grades:
 | 
			
		|||
| 2       | Web Design        | A     | 2021 |
 | 
			
		||||
| 2       | Web Design        | B     | 2020 |
 | 
			
		||||
| ...     | ...               | ...   | ...  |
 | 
			
		||||
{{< /table >}}
 | 
			
		||||
 | 
			
		||||
Here we can see that the *Student Grades* table doesn't have a standalone unique primary key, like the Students table
 | 
			
		||||
has, but rather it has a composite primary key, in this case, it's made of 3 columns: *Student*, *Subject* and *Year*.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -153,6 +153,7 @@ of the keys and second is the type of the values: `dict[str, int]` would be a di
 | 
			
		|||
 | 
			
		||||
Here's a list of some definable generic types that are currently present in python 3.9:
 | 
			
		||||
 | 
			
		||||
{{< table >}}
 | 
			
		||||
| Type              | Description                                         |
 | 
			
		||||
|-------------------|-----------------------------------------------------|
 | 
			
		||||
| list[str]         | List of `str` objects                               |
 | 
			
		||||
| 
						 | 
				
			
			@ -162,6 +163,7 @@ Here's a list of some definable generic types that are currently present in pyth
 | 
			
		|||
| Iterable[int]     | Iterable object containing ints                     |
 | 
			
		||||
| Sequence[bool]    | Sequence of booleans (immutable)                    |
 | 
			
		||||
| Mapping[str, int] | Mapping from `str` keys to `int` values (immutable) |
 | 
			
		||||
{{< /table >}}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
In python, we can even make up our own generics with the help of `typing.Generic`:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue