Skip to content

Instantly share code, notes, and snippets.

General Point of SQL

  1. judge null with is (not) null, !=/<> null will not work

Tips

This post is used to record the usage of Confluence

How table create content table

you can finish this by insert -> select 'table of contents' or just type '{' and it will give you auto complete advice and select 'table of contents'

@jack-zheng
jack-zheng / Writing in Pythonic way.md
Last active August 10, 2025 13:56
pythonic, python

Writing in Pythonic way

This postion is a notebook to collect the pythonic code I fetch when do code research.

Generate random int list, or just a requirement of loop N times

it's a common requirement and some guys achieve this goal by using Numpy lib, but it's too heavy. you can do in this way:

import random
@jack-zheng
jack-zheng / Annotation in Java.md
Last active June 20, 2019 06:51
annotation, java

Annotation in Java

  1. Annotation are only metadata and do not contains any business logic
  2. Consumer is a piece of code which reads this information and then performs necessary logic

Sample

new an annotation called ToDo, we give it some value like value="reading", day=1 which means reading on Monday and print it to console.

declare annotation class - ToDo.java

Outer Join

  1. left join = left outer join
  2. for Orcle only, there is a special syntax for outer join (+), the table column with (+) is the extend one, with means the one value be null when on record matched
  3. a left join b on a.id = b.id, show all record of a and if no record in b, fill with null

e.g. local table for testing

tmp.db> .schema

第二部分 实战篇

留言板

一个简单的sayhello案例,学完后你可以学到一下这些:

  1. 简单程序的包组织形式
  2. 在flask中使用bootstrap
  3. 使用统一的时间戳 flask-moment
  4. 怎么为站点快速生成模拟数据
  5. debug工具debugtoolbar

Union in SQL

通过使用 union 可以对所选的列结果做并集

例:

准备两个表 user, person 并插入实验数据

tmp.sql> .schema

Plugin list of VSCode

Frontend

  1. open in browser
  • 右键文件可以看到快捷键
  1. live server
  • start a local server easily for develop
  1. IntelliSense for CSS class names in HTML
  • 自动补全css

Git Merge Tool: kdiff3

The list of supported tools git mergetool --tool-help

Setting kdiff3 as mergetool tool git config --global merge.tool kdiff3

How to install kdiff3 on Mac using Brew

brew update
brew install kdiff3