Alvin Liu

  • Home
  • About
  • Privacy Policy
AI

My Recent Certs from Oracle

Thanks for Oracle.

2026-01-02 0comments 23hotness 0likes Alvin Liu Read all
AI

AI Summary Tool for Chrome

Have you busy to read online posts? Please try my AI Summary plugin for Chrome. You need to have a OpenAI or compatible API key to use this service. The key only stored in your local Chrome browser. The tool proviced built in prompt to guide AI to summary the article on your web page. You can also modify the prompt to optimize result and tone. This is a good way to try AI Agent prompt engineering. It supports multiple languages. https://chromewebstore.google.com/detail/ai-summary/eoajdbhdokdmlcmkobgmbcahkmcebfkh

2026-01-02 0comments 20hotness 0likes Alvin Liu Read all
uncategorized

General Conversion Tool convertt.top

Welcome to try out my new website ConverTT https://www.convertt.top This online toolkit provides a variety of conversion functions for your convenience.

2025-04-24 0comments 626hotness 0likes Alvin Liu Read all
Database

SQL Developer Code Templates Autocomplete

Using the short keyword to fill complex SQL in Oracle SQL Developer to make your work more efficient. Follow those simple steps to complete this setup in 5 minutes: Id Usage Template ss Search keyword in stored procedures SELECT * FROM USER_SOURCE WHERE lower(TEXT) LIKE lower('%[keyword]%'); st Search tables by keyword SELECT table_nameFROM user_tablesWHERE table_name LIKE '%[keyword]%'; sc Search tables by column keyword SELECT table_name, column_nameFROM all_tab_columnsWHERE UPPER(column_name) LIKE UPPER('%item_id%')order by UPPER(column_name), upper(table_name); tochar Convert date to char to_char([column], 'YYYY-MM-DD HH24:MI:SS') todate Convert char to date to_date('[2024-01-30]','yyyy-mm-dd') alter Alter table column ALTER TABLE [table_name] MODIFY (column_name datatype); analyze Analyze table analyze table [table name] compute statistics; datafile List data files SELECT file_name, tablespace_name, bytes/1024/1024||'M'FROM dba_data_files; kill Kill a dead lock query SELECT 'ALTER SYSTEM KILL SESSION '''||sid||','||serial#||''';', s.username, s.program, s.sql_id, s.sql_child_number, s.status, t.sql_textFROM v$session s left join v$sql t on s.sql_id=t.sql_idWHERE s.type != 'BACKGROUND' and users_executing>0; merge Merge into table MERGE INTO [target_table] tUSING () fON (t.item_id = f.item_id and t.loc_id=f.loc_id)WHEN MATCHED THENUPDATE SETt. = f.,t. = f.WHEN NOT MATCHED THENINSERT (item_id,loc_id)VALUES (f.item_id,f.loc_id); space Query table space usage SELECT a.tablespace_name,total,free,(total - free) rest,ROUND((total - free) / total * 100, 2) || '%' usedFROM (SELECT tablespace_name, SUM(bytes) / 1024 / 1024 totalFROM dba_data_filesGROUP BY tablespace_name) a,(SELECT tablespace_name, SUM(bytes) / 1024 / 1024 freeFROM dba_free_spaceGROUP BY tablespace_name) bWHERE a.tablespace_name = b.tablespace_nameORDER BY (total - free) DESC; adddatafile Add a data file to table space ALTER TABLESPACE [name]ADD DATAFILE 'name and path.DBF' SIZE 2000M AUTOEXTEND ON;

2024-02-16 0comments 2675hotness 0likes Alvin Liu Read all
Database

Oracle Database Java Stored Procedure

Oracle database has an user JVM to run Java program on the database server, which is much powerful than normal stored procedure. It can bind with standard stored procedure interface to integrate with other database functions. I will show a quick example here, and full document can be found at Oracle official website: https://docs.oracle.com/en/database/oracle/oracle-database/21/jjdev/lot.html#List-of-Tables 2. Load Java code into Oracle database, use Oracle SQL Developer or loadjava command line tool. Here use SQL developer as example: 3. Define Stored Procedure interface 4. Call Java stored procedure 5. Receive procedure output 6. Receive exception stacktrace With the print stack trace section in my example code, you can output error stack to SQL output window, which is helpful to address issues.

2023-06-16 0comments 2212hotness 0likes Alvin Liu Read all
Misc

Android 13 bypass Restricted Setting without root

Android 13 introduced a new security feature to block user apps to read notifications. I got this issue when I setup Huawei Health app for my band. Android 13 has built in solution for this limitation. Go to Settings -> Apps, open the app setting with this issue. There are 3 dots at top right corner, click it to "Allow restricted settings" If you cannot found this 3 dot menu, please remind only the app already triggered "Restricted Setting" popup will show this menu. Just use the app to request notification and get the error first.

2023-06-10 0comments 2926hotness 0likes Alvin Liu Read all
Misc

Backup your Mac without time machine

Time machine is a powerful tool to protect all files on Mac, but maybe sometime you only need a simple alternative way. Here I want to share a way to use build-in rsync command backup a folder to antoher place. You only need one command line: Here work/AU is source folder and bak is target folder. They are on different hard disk. Let me explain some parameters: -a copy files with original create time and attributes. -v show detail progress --delete remove files not at source folder --exclude skip backup some files -c compare files to optimize network transmission. I do not need it since I only copy it at local. You can use build-in crontab command to schedule it, for example I want it run every 4 hours. Use crontab -e to configure crontab job, input following configuration and press escape and input :wq enter to save changes. If you want to backup to iCloud Drive, please use the following folder: /Users/alvin/Library/Mobile\ Documents/com~apple~CloudDocs

2023-05-31 0comments 2158hotness 0likes Alvin Liu Read all
Database

Remote Debug Oracle Procedure by SQL Developer

Here introduce the process to remote debug Oracle procedure. Will also solve common issues as well. Debug Procedure 1. Firstly, you need to download and install latest Oracle SQL Developer from: https://www.oracle.com/database/sqldeveloper/technologies/download/ 2. Then need to specify a port for remote Oracle database to callback. Use a fixed port is easier for your firewall configuration. 3. Launch SQL Developer, choose Settings at menu. Go to Debugger setting and config as below, you can choose other ports below 60000. Please follow all settings in red box, except the port you can customize. 4. Redirect traffic from the port to your machine. Configure the port forwarding at your home router: 5. Now you can use SQL developer connect to remote database and open a procedure for debug. Before start, you need to recompile this procedure for debug, right click on procedure and choose "Compile for Debug". It will show a bug logo on the name. 6. Then add some break point in your procedure by double click at the left of code line. 7. Use "Debug..." function to run the procedure. It will promp you to input your IP, use your public IP. 8. You will see some connect progress in debug log 9. Once it hit the break point, your code will stop and highlight the current line. You can find regular control buttons at top and there are some useful panels at below. This is the happy ending of the story, if you have any issue, below section may helps. Trouble shooting Debug Hung ORA-30683, ORA-12535, ORA-06512 DBMS_DEBUG_JDWP If SQL…

2023-04-28 0comments 3114hotness 0likes Alvin Liu Read all
Distributed System

分布式服务框架设计

列了一些设计分布式系统时需要考虑的问题,欢迎讨论。

2023-03-02 0comments 1962hotness 0likes Alvin Liu Read all
Golang

Golang知识汇总

Golang简介 环境安装 源码下载 http://golang.org/dl 安装 直接解压后放在 /usr/local/编译器是 /usr/local/go/bin/go源码在 /usr/local/go/src 配置环境变量 编辑 .bashrc 运行go version 检查安装是否成功GOPATH 代表开发代码的默认路径, 后面有其他管理工具 IDE Golang的优势 Golang适用产品 云原生 docker, k8s, etcd, consul, cloudflare 数据库 tidb, influxdb, cockroachdb 微服务 go-kit, micro, typhon 区块链 以太坊, hyperledger Golang的不足 Golang 特色语法 Hello World src就是workspace, 里面的每一个文件夹就是一个工程mkdir firstGolang Golang定义变量 多返回值 导入包 包搜索路径 $GOPATH函数名首字母大写代表公有函数, 首字母小写代表私有函数导入包必须使用 指针 (不常用) 就是直接传实参的内存引用, 接收函数通过指针对参数的修改在函数外部也生效 defer(finalizer) defer类似类的finalizer和try里面的finally函数, 在声明代码体的最后执行defer在return之后执行, 这一点是和Java不同的多条defer后添加的先执行 数组 数组的定义 定长数组 缺点 动态数组(切片) 长度不限引用传递, 函数内直接修改 数组遍历 切片 声明方式 切片的长度len表示切片可用长度切片的容量cap表示内存中保留的总空间 切片追加元素 截取切片 切片截取的是引用, 修改会影响原始数据 深copy Map 声明Map 遍历Map Struct结构体 结构体对象是值传递的, 如果想在函数内修改结构体对象的值, 需要使用指针赋值 继承 Interface 接口本身是一个指针, 接收对象实例时只能传入指针& 元类/类型判断 interface{} (Object类, 万能接口, instanceof) 变量的内部结构 变量 类型转换 反射 反射解析结构体标签Tag 使用结构体Tag解析json文件实例 Golang 高级内容 Goroutine 总结自刘丹冰的视频 https://www.bilibili.com/video/BV1gf4y1r79E

2023-02-28 0comments 1870hotness 0likes Alvin Liu Read all
123
Post
  • My Recent Certs from Oracle
  • AI Summary Tool for Chrome
  • General Conversion Tool convertt.top
  • SQL Developer Code Templates Autocomplete
  • Oracle Database Java Stored Procedure
Category
  • AI
  • Architect
  • Database
  • Distributed System
  • Frontend
  • Golang
  • High Performance
  • JVM
  • Linux
  • Management
  • Misc
  • uncategorized

Android Babel Blog Cache Database Distributed System Dynamo Golang HA Heap JCS JVM Kubernetes Lens Linux Management Memory OCI Oracle Performance Planning Traefik Typescript Ubuntu Webpack WordPress

Comments
  1. martine on Use Lens to connect Kubernetes through SSH Tunnel
  2. kjstart on ES6 - ES13 新特性列表

COPYRIGHT © 2024 Alvin Liu. alvingoodliu@[email protected] ALL RIGHTS RESERVED.

Theme Made By Seaton Jiang