Thread - Blog Update Log (Old)
This is Post A. Check out Post B.
Heading Level 1
This is a paragraph under a level 1 heading. It contains bold text, italic text, and inline code
.
Heading Level 2
Heading Level 3
Normal text bold text, and really long too, this is italic text and really long too, both at the same time, and really long too.
Heading level 1
Heading level 2
Heading level 3
Heading level 4
Heading level 5
Heading level 6
Here is a list:
- Ordered list item 1
- Ordered list item 2
- Nested ordered list item 1
- Nested ordered list item 2
- Ordered list item 3
- Unordered list item 1
- Unordered list item 2
- Nested unordered list item 1
- Nested unordered list item 2
Heading Level 4
This is a blockquote.
It can contain multiple lines.
- You can include lists too.
Heading Level 5
Here’s a code block:
def hello_world():
print("Hello, World!")
Update Codeblocks (Jan. 10th 2025)
Codeblocks Line Numbers
Codeblocks now have line numbers on the left (no line numbers on mobile)
public class SevenSegmentDisplay {
// Array representation of the 7-segment display for digits 0–9
private static final String[][] DIGITS = {
{ " _ ", "| |", "|_|" }, // 0
{ " ", " |", " |" }, // 1
{ " _ ", " _|", "|_ " }, // 2
{ " _ ", " _|", " _|" }, // 3
{ " ", "|_|", " |" }, // 4
{ " _ ", "|_ ", " _|" }, // 5
{ " _ ", "|_ ", "|_|" }, // 6
{ " _ ", " |", " |" }, // 7
{ " _ ", "|_|", "|_|" }, // 8
{ " _ ", "|_|", " _|" } // 9
};
// Function to display a single digit
public static void displayDigit(int digit) {
if (digit < 0 || digit > 9) {
System.out.println("Invalid digit. Only 0-9 are supported.");
return;
}
for (String row : DIGITS[digit]) {
System.out.println(row);
}
}
// Function to display a multi-digit number
public static void displayNumber(int number) {
String numberStr = String.valueOf(number);
StringBuilder[] rows = { new StringBuilder(), new StringBuilder(), new StringBuilder() };
for (char c : numberStr.toCharArray()) {
int digit = Character.getNumericValue(c);
for (int i = 0; i < 3; i++) {
rows[i].append(DIGITS[digit][i]).append(" ");
}
}
for (StringBuilder row : rows) {
System.out.println(row);
}
}
public static void main(String[] args) {
System.out.println("Displaying single digit (5):");
displayDigit(5);
System.out.println("\nDisplaying number (12345):");
displayNumber(12345);
}
}
# Dictionary representation of the 7-segment display for digits 0–9
DIGITS = {
0: [" _ ", "| |", "|_|"],
1: [" ", " |", " |"],
2: [" _ ", " _|", "|_ "],
3: [" _ ", " _|", " _|"],
4: [" ", "|_|", " |"],
5: [" _ ", "|_ ", " _|"],
6: [" _ ", "|_ ", "|_|"],
7: [" _ ", " |", " |"],
8: [" _ ", "|_|", "|_|"],
9: [" _ ", "|_|", " _|"]
}
def display_digit(digit):
if digit not in DIGITS:
print("Invalid digit. Only 0-9 are supported.")
return
for row in DIGITS[digit]:
print(row)
def display_number(number):
number_str = str(number)
rows = ["", "", ""]
for char in number_str:
digit = int(char)
for i, row in enumerate(DIGITS[digit]):
rows[i] += row + " "
for row in rows:
print(row)
if __name__ == "__main__":
print("Displaying single digit (5):")
display_digit(5)
print("\nDisplaying number (12345):")
display_number(12345)
Two New Web Projects
- Tic Tac Toe
- Game of Life
New Page: Web Project (Jan. 10th 2025)
Added Web Project page. I will post web-related project there, I’m not really into web development so maybe don’t expect frequent uploads there. Best way to experience it is to try it yourself:
(Deprecated)
New Features on Yuk’s Blog (Jan. 9th 2025)
Table of Content
You can click on the entries to jump to the desired section. (On top of this page). Spoilers:
(Deprecated)
Linkage
Table of content and certain headings will now have linkage “🔗” to them (not every post). Clicking on them will copy the link to your clipboard, you may use this link to access the post and immediately jump to the heading section upon loading the page for convenience.
Animation Update
Various elements have been given animations because why not.
Blockquotes Update
Blockquotes are now more consistent with Codeblocks and is now affected by extend / collapse button.
- Blockquotes will look like:
This is a blockquote
Sure! Here’s a long paragraph for you: The rapid advancement of technology in recent decades has brought about profound changes in various aspects of society, from the way we communicate to the way we work and live. With the rise of artificial intelligence, automation, and data analytics, many industries have experienced significant transformations, often leading to increased efficiency and innovation. However, these advancements have also raised important questions about the future of jobs, privacy, and ethical considerations. As automation continues to evolve, it is unclear what the long-term impact will be on the workforce, as many tasks once performed by humans are now being carried out by machines. Additionally, concerns about data privacy have become more prominent, with large-scale data collection and surveillance becoming commonplace in many parts of the world. In response to these concerns, governments, organizations, and individuals are increasingly looking for ways to balance innovation with privacy protection and ethical responsibility, recognizing that the future of technology will likely be shaped by these discussions. Despite the challenges, the potential for technological progress to solve complex global issues, such as climate change and healthcare, remains vast, offering hope for a future where technology serves as a force for good.
\[e \equiv \lim_{n\to\infty} \biggl( 1 + \frac{1}{n} \biggr)^n\]
\[\int_{a}^{b} \left( \sum_{n=1}^{\infty} \frac{(-1)^n}{n!} \cdot \frac{d^n}{dx^n} \left( e^{x^2} \right) \right) \, dx = \lim_{N \to \infty} \sum_{n=0}^{N} \left( \int_{a}^{b} \frac{(-1)^n}{n!} \cdot \frac{d^n}{dx^n} \left( e^{x^2} \right) \, dx \right) = \sum_{n=0}^{\infty} \int_{a}^{b} \frac{(-1)^n}{n!} \cdot \frac{d^n}{dx^n} \left( e^{x^2} \right) \, dx\]
\[\begin{bmatrix} 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 & 62 & 63 \\ 64 & 65 & 66 & 67 & 68 & 69 & 70 & 71 & 72 \\ 73 & 74 & 75 & 76 & 77 & 78 & 79 & 80 & 81 \\ \end{bmatrix}\]
- Codeblocks will look like:
This is a codeblock
public class MinecraftComparator {
private boolean isPowered;
private boolean isInSubtractionMode;
public MinecraftComparator() {
this.isPowered = false; // Comparator initially unpowered
this.isInSubtractionMode = false; // Default mode is comparison mode
}
// Sets whether the comparator is powered (input signal)
public void setPowered(boolean powered) {
this.isPowered = powered;
}
// Sets the mode of the comparator (comparison or subtraction)
public void setSubtractionMode(boolean subtractionMode) {
this.isInSubtractionMode = subtractionMode;
}
// Simulates receiving an input signal and returning the output
public int getOutput(int input1, int input2) {
// If powered, the comparator reacts to the inputs
if (isPowered) {
if (isInSubtractionMode) {
// In subtraction mode, the output is the difference between the inputs
return Math.max(0, input1 - input2);
} else {
// In comparison mode, the output is 15 if input1 is greater than or equal to input2, else 0
return (input1 >= input2) ? 15 : 0;
}
} else {
// If unpowered, the output is 0
return 0;
}
}
public static void main(String[] args) {
MinecraftComparator comparator = new MinecraftComparator();
// Set the comparator to powered and in comparison mode
comparator.setPowered(true);
comparator.setSubtractionMode(false); // Comparison mode
int output1 = comparator.getOutput(10, 5); // Input 1 is 10, Input 2 is 5
System.out.println("Comparison Mode Output: " + output1); // Should print 15 since 10 >= 5
// Set the comparator to powered and in subtraction mode
comparator.setSubtractionMode(true); // Subtraction mode
int output2 = comparator.getOutput(10, 5); // Input 1 is 10, Input 2 is 5
System.out.println("Subtraction Mode Output: " + output2); // Should print 5 (10 - 5)
// Test with comparator unpowered
comparator.setPowered(false);
int output3 = comparator.getOutput(10, 5);
System.out.println("Unpowered Comparator Output: " + output3); // Should print 0
}
}
public class Fibonacci {
// Function to compute the nth Fibonacci number recursively
public static int fibonacci(int n) {
if (n <= 1) {
return n;
} else {
return fibonacci(n - 1) + fibonacci(n - 2);
}
}
public static void main(String[] args) {
int number = 10; // We will compute the 10th Fibonacci number
System.out.println("The 10th Fibonacci number is: " + fibonacci(number));
// Printing the Fibonacci series up to the 10th number
System.out.println("Fibonacci Series up to 10th number:");
for (int i = 0; i < number; i++) {
System.out.print(fibonacci(i) + " ");
}
}
}
Revamp Date Formatting
Dates now formats in something like Jan. 8th 2025 instead of 08/01/2025.
Table Formatting
Tried my best with tables:
Name | Age | Occupation | City |
---|---|---|---|
Alice | 30 | Engineer | New York |
Bob | 25 | Designer | San Francisco |
Charlie | 35 | Developer | Chicago |
Dana | 28 | Data Analyst | Austin |
Eve | 40 | Project Manager | Boston |
ID | First Name | Last Name | Age | Occupation | City | Phone Number | Country | Department | Salary | |
---|---|---|---|---|---|---|---|---|---|---|
001 | Alice | Johnson | 30 | Engineer | New York | alice.johnson@example.com | 123-456-7890 | USA | Engineering | $85,000 |
002 | Bob | Smith | 25 | Designer | San Francisco | bob.smith@example.com | 987-654-3210 | USA | Design | $70,000 |
003 | Charlie | Brown | 35 | Developer | Chicago | charlie.brown@example.com | 555-123-4567 | USA | Development | $95,000 |
004 | Dana | White | 28 | Data Analyst | Austin | dana.white@example.com | 444-555-6666 | USA | Analytics | $80,000 |
005 | Eve | Davis | 40 | Project Manager | Boston | eve.davis@example.com | 333-777-8888 | USA | Management | $105,000 |
Function | Limit as \(x \to 0\) | Limit as \(x \to \infty\) | Remarks |
---|---|---|---|
\(\frac{\sin(x)}{x}\) | \(1\) | \(0\) | Standard limit for small \(x\) |
\(e^x\) | \(1\) | \(\infty\) | Exponential growth |
\(\frac{1}{x}\) | \(\infty\) | \(0\) | Reciprocal function |
\(\ln(x)\) | \(-\infty\) | \(\infty\) | Logarithmic growth |
\(\frac{1}{x^2}\) | \(\infty\) | \(0\) | Parabola in the reciprocal form |
\(\frac{\tan(x)}{x}\) | \(1\) | \(\infty\) | Tangent behavior near \(x = 0\) |
To Top of Page Button
Added a button at the footer of posts to jump to the head of the page.
Vietnamese Support
The blog has support for Vietnamese content now.
New Features on Yuk’s Blog (Oct. 1st 2024)
Since I don’t have time or even a good grasp on the recent development of my blog, I want to quickly summarizes and explain the new features on my blog here.
Light / Dark Mode Support
I’ve added light / dark mode support for the site, simply click the ☀️ / 🌙 button which will usually be located at the top right of the header to toggle between them.
Codeblocks Update
- Collapse / Expand Codeblocks: Codeblocks on this blog can be quite lengthy at times, so I’ve added the 🔼 / 🔽 button at the top right of each of the codeblocks for you to collapse or expand them to your liking. On load, all codeblocks will be expanded by default, you can use the big 🔼 / 🔽 button at the top right of the header to collapse or expand all codeblocks in the current post.
- Copy Code: I’ve added the 📄 button to codeblocks, which will allow you to copy the entire codeblock with the click of a button, below is a dummy codeblock:
def binary_search(arr, x):
low = 0
high = len(arr) - 1
mid = 0
while low <= high:
mid = (high + low) // 2
if arr[mid] < x:
low = mid + 1
elif arr[mid] > x:
high = mid - 1
else:
return mid
return -1
Archive Page
Nav Bar
- Assign.: Where i post assignments of my formal courses at my university.
- Projects: You can find most of my project that i was able to make a post on here.
- Thread: These are running threads for stuff that is not suitable for a blog post, which will be updated occasionally.
- Update: I will post announcements about the blog or about me here.
- Technical: Posts that covers advanced mathematics, CS concepts, and more.
Header Buttons
- The 🖼️ button: To toggle the thumbnail of posts in the archive page, which would allow for faster scrolling.
- The 🔑 button: Lets go gambling.