HTML | basic concept

Hypertext Markup Language (HTML) code is the foundational language for creating and structuring content on the web. It defines and presents elements, like headings, paragraphs, images, etc. When one enters a URL or open an HTML file in a web browser, the browser processes the HTML code, applies CSS for styling, and executes any JavaScript. This results in a visual representation of the web page that one can see and interact with....

August 24, 2024

resize image with HTML code

When working with images in blog, one might need to adjust image size to fit different layouts and screen sizes. Here’s the hack: (delete the space at after double {{) {{ <figure align="center" src="/path/pic_name.jpeg" caption="caption_text" width="50%">}} Or, by pixel size: {{ <figure align="center" src="/path/pic_name.jpeg" caption="caption_text" width="300px">}}

August 21, 2024

.json file | what is it and how to load them

A .json file is a text file formatted in JSON (JavaScript Object Notation). It is a lightweight data-interchange format, that is easy enough for human to read and write, but also easy for machine to parse and generate. JSON is frequently used to transmit data between a server and web applications, or using to store lightweight data. In Python, one can load JSON file using json library: import json with open('data....

July 25, 2024

course checker

The wild world of course registration heats up during the last round of selection, where occasionally seats are released due to dropouts and the remaining dash for the vacancy. But what if I told you there’s a clever way to outsmart the system? No more frantic refreshing, here’s nifty little program I concocted that plays the waiting game for you. It keeps an eagle eye on course availability and sends you an email the moment a spot opens up....

March 13, 2024

the code that can send email in linux server

I often encounter a recurring issue when running projects on a remote server and trying to collect data afterward. The setup in my run_script.sh usually includes a line for sending emails once the job is done. #!/bin/bash #BSUB -J StockTraderTestRun # Set the job name to StockTraderTestRun #BSUB -q gpu # Submit to the long queue #BSUB -o /nfsshare/home/tang/StockTrader/%J.out # Standard output file #BSUB -e /nfsshare/home/tang/StockTrader/%J.err # Standard error file #BSUB -N # Send email at job finish #BSUB -u ariana_tang@outlook....

November 5, 2023