Skip to content

Instantly share code, notes, and snippets.

148 Programming Questions

The following is a list of all the programming questions that I had solved through middle school and high school.

I programmed these questions in Java, but with slight modifications, these can also be done in Python or any other language. These are meant to improve your concepts and build a programming logic, and thereby strengthen your foundations.

These were lying in a .docx file on my system. I have compiled them into a more readable and widely accepted format. Some formatting issues might still be present, which I intend to fix as I find them. On the same note, if any question does not make sense, feel free to post a comment and I will cross-check with the .docx file.

@zjeaton
zjeaton / _Google Analytics 4 with Hugo.md
Last active May 23, 2024 01:13
Google Analytics 4 (with Measurement ID) in Hugo

Google Analytics 4 in Hugo

Blog post with slightly more detail can be found here. If you want to just get to it, read on.

I (very) recently decided to reimplement GA in my site, and found that existing implementation in Hugo was not compatible with GA4's new Measurement ID. This is an easy way to drop your Measurement ID into your site. I'm not going to go into how to sign up for GA.

This implementation requires that you create a site parameter for analytics, create a partial, and call the partial. I tweaked the names of the parameters and files so they didn't collide with the built-in hugo code.

Place the GoogleAnalyicsID (Measurement ID) in config.toml within [params].

@lisez
lisez / hugo-auto-deoply.yml
Last active October 10, 2024 11:41
如何使用 Github Actions 自動部署 Hugo
# link: https://sujingjhong.com/posts/how-to-deploy-hugo-automatically-with-github-actions/
# author: lisez <[email protected]>
name: Auto publish to public site
# 只有推送到 master 才自動化
on:
push:
branches:
- master
area_data = {
'臺北市': [
'中正區', '大同區', '中山區', '萬華區', '信義區', '松山區', '大安區', '南港區', '北投區', '內湖區', '士林區', '文山區'
],
'新北市': [
'板橋區', '新莊區', '泰山區', '林口區', '淡水區', '金山區', '八里區', '萬里區', '石門區', '三芝區', '瑞芳區', '汐止區', '平溪區', '貢寮區', '雙溪區', '深坑區', '石碇區', '新店區', '坪林區', '烏來區', '中和區', '永和區', '土城區', '三峽區', '樹林區', '鶯歌區', '三重區', '蘆洲區', '五股區'
],
'基隆市': [
'仁愛區', '中正區', '信義區', '中山區', '安樂區', '暖暖區', '七堵區'
],
@addyosmani
addyosmani / README.md
Last active March 4, 2025 06:13 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version