Move Zeroes: Understanding Parameter Behavior in Python

🔔 Prelude: When addressing the “Move Zeroes” problem, it is simple to misinterpret Python’s parameter behavior. Remember: A local variable and a parameter sharing the same name does not mean they refer to the same object. 🖋️ Move Zeroes Given an integer array nums, move all 0’s to the end of it while maintaining the relative order of the non-zero elements. Note that you must do this in-place without making a copy of the array. ...

2026-09-10

CO-STAR Template for ChatGPT

🔔 Prelude: If you use ChatGPT frequently, you’ve probably encountered situations where it provides off-topic answers. Since we can’t modify the model, the better approach is to rely on accurate prompts and additional context. 🖋️ Main Let ChatGPT Answer Your Questions Accurately! First, you need to let ChatGPT know some personal information about you and how it should respond to you. Click on your profile picture at the top right corner. Select “Customize ChatGPT.” Hover over the “Custom Instructions” question mark on the right and fill in the information as guided. Use the specific CO-STAR template in a new session. Interact with ChatGPT. CO-STAR Template The CO-STAR template is a structured method that can help you communicate more clearly and effectively with ChatGPT. By providing context, objectives, style, tone, audience, and response format, you can explain exactly what you need from ChatGPT, and get replies that correspond more closely with your requirements. ...

2026-09-10

Tips for Better Google Searches

💡 Prelude: I collected some common advanced keywords for Google searching. These tips are generally applicable to most search engines. You can also “search” on this page to find what you need. Exact Keywords Use "key words ..." (double quotes) to prevent keywords from being split up during the search. Exclude Keywords Use - to exclude keywords. For example:python usage -w3s Wildcard The * in the search bar works similarly to the wildcard in Linux. ...

2026-09-10

Choose your licenses

🔔 Prelude: I sometimes wonder if adding a license to my campus homework is too serious. Nevertheless, I still will add it. 🖋️ Main License Version Include License Include Source Code Trademark Status Change Commercial Use Distribution Modification Patent Right Private Use License Transfer No Liability No Trademark Apache License 2.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes FreeBSD License Yes Yes Yes Yes Yes Yes Yes 2-Clause BSD License Yes Yes Yes Yes Yes Yes Yes GNU General Public License(GPL) 2.0 Yes Yes Yes Yes Yes Yes Yes No Yes GNU Lesser General Public License 2.1 Yes Yes Yes Yes Yes Yes Yes No Yes GNU General Public License 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes GNU Lesser General Public License 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes MIT License Yes Yes Yes Yes Yes Yes Yes Yes Mozilla Public License(MPL) 2.0 Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Eclipse Public License 1.0 Yes Yes Yes Yes Yes Yes Yes Yes No Yes Affero General Public License 3.0 Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes General Copyright Yes Yes Yes Yes No No Yes No In short? Completely Open Source -> MIT License, BSD License Open Source, But Must Credit the Original Author -> Apache License 2.0 Open Source, Must Use the Same License (Copyleft) -> GPL Allows Commercial Use -> MIT License, BSD License, Apache License 2.0, GPL Allows Closed Source (Can Be Integrated into Proprietary Software) -> MIT License, BSD License, Apache License 2.0 Does Not Allow Closed Source (Must Remain Open Source) -> GPL

2026-09-10

My first post

🔔 Prelude: Hi! This is my first post, which is also a template post. Actually, this blog is built by Notion and Nextjs. I directly write my posts on Notion. So convenient! You can check my references to have a see! Main This is my main block. View 1 This is my citation. And view. Summary This is my main summary. Sometimes I don’t make a summary. 📎 References This is my references. https://github.com/tangly1024/NotionNext

2026-09-10

Building This Blog

This site runs on Hugo with the PaperMod theme, bilingual content, and Algolia for search. None of those choices were difficult. Wiring them together produced four bugs that were, so this post is mostly about those. Why Hugo The decision came down to Hugo against Hexo. Two requirements settled it: content organised by directory, and a tolerable path for Org-mode files. Hugo maps content/ directly onto URL structure. A file at content/tech/foo.md becomes /tech/foo/ and the tech directory becomes a section with its own list page. No plugin, no configuration. Hexo can be pushed into the same shape with permalink rules and a category plugin, but it is a workaround rather than the design. ...

2026-09-09