blob: 7df307da4070969ae2b718e130daac7fc527fe7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
+++
title = "Test Code Syntax Highlighting"
date = 2025-01-27
draft = false
[taxonomies]
tags = ["test-formatting"]
[extra]
disable_comments = false
permalink = "https://alphara.art/posts/code-syntax-highlighting/"
toc = false
[extra.earlier]
title = "Test Typography"
permalink = "https://alphara.art/posts/typography/"
[extra.later]
title = "Test YouTube"
permalink = "https://alphara.art/posts/youtube/"
+++
```rust
fn factorial(n: u64) -> u64 {
match n {
0 => 1,
_ => n * factorial(n-1)
}
}
```
```typescript
const sum = (n: number) => n * (n + 1) / 2
```
```python
import os ; n_cores = os.cpu_count() // 2 ;
from concurrent.futures import ThreadPoolExecutor
with ThreadPoolExecutor(max_workers=n_cores) as executor:
executor.map(render, range(0, len(image_array)))
```
```zig
const std = @import("std");
pub fn main() void {
const user = User{
.power = 9001,
.name = "Goku",
};
std.debug.print("{s}'s power is {d}\n", .{ user.name, user.power });
}
pub const User = struct {
power: u64,
name: []const u8,
};
```
|