Skip to content

Instantly share code, notes, and snippets.

View qndev's full-sized avatar
:octocat:
I may be slow to respond.

Nguyễn Đình Quang qndev

:octocat:
I may be slow to respond.
View GitHub Profile
@qndev
qndev / MANIFEST.java
Last active October 21, 2023 08:18
MANIFEST
public Properties extractManifestInfo(String warFilePath) throws IOException {
ZipInputStream zipInputStream = new ZipInputStream(new FileInputStream(warFilePath));
ZipEntry zipEntry = zipInputStream.getNextEntry();
Properties manifestInfo = new Properties();
while (zipEntry != null) {
String fileName = zipEntry.getName();
if ("META-INF/MANIFEST.MF".equalsIgnoreCase(fileName)) {
manifestInfo.load(zipInputStream);
break;
}
@qndev
qndev / gist:7b5e3a4dc25b86cb61bfff9f0e13272f
Created December 24, 2020 01:56 — forked from sandord/gist:400553
Get property name from lambda expression
using System.Linq.Expressions;
/// <summary>
/// Returns the name of the specified property of the specified type.
/// </summary>
/// <typeparam name="T">The type the property is a member of.</typeparam>
/// <param name="property">The property expression.</param>
/// <returns>The property name.</returns>
public static string GetPropertyName<T>(Expression<Func<T, object>> property)
{

Keybase proof

I hereby claim:

  • I am qndev on github.
  • I am quangnd (https://keybase.io/quangnd) on keybase.
  • I have a public key ASArP-2_zYxBucF5j5vjJjubLJhTpqYIuL2DhHPileMpowo

To claim this, I am signing this object:

Stt Offset Size Description
1 0 3B Nhảy đến đầu chương trình mồi
2 3 8B Tên hệ thống file đã format đĩa
3 11 1W K/thước 1 sector, thường là 512
4 13 1B Số sector cho một cluster (32K-Cluster)
5 14 1W Số scts đứng trước FAT/Số scts để dành
6 16 1B Số bảng FAT
7 17 1W Số phần tử của ROOT. FAT32: 00 00
8 19 1W Tổng sector trên đĩa (< 32M) hoặc 0000
{
"ensure_newline_at_eof_on_save": true,
"font_size": 11,
"highlight_line": true,
"ignored_packages":
[
"Vintage"
],
"rulers":
[
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); // Display the string.
}
}

Keybase proof

I hereby claim:

  • I am qndev on github.
  • I am amaryllis (https://keybase.io/amaryllis) on keybase.
  • I have a public key whose fingerprint is F797 1DD9 CCEB E5DB 0A21 A9E4 3F7F FB7C BC19 4855

To claim this, I am signing this object:

@qndev
qndev / command-line.md
Created June 9, 2019 08:55
The Linux command-line cheat sheet

Restart network

  • sudo service network-manager restart
@qndev
qndev / SQL_Triggers.md
Created June 9, 2019 08:13
SQL Triggers

😊 😃 ☺️ 👍 👋 🌹 🌿 🌴 🍃 🌼 🌵 🍀 🌺 🌲 🌱 🔔 🎁 🐢 ⛄ ⚡ 🎶 ✨ ❤️ 🌁 💙 ✌️ 🎄 🎅 📌 🏀 ⛳ 📚 🎸 🍊 🌽 🍆 🍅 🍓 🍏 🍒 🍋

📌 Các bảng trong CSDL

Để có thể thực hành với triggers trong sql ta tạo các bảng trong cơ sở dữ liệu với cấu trúc các cột và kiểu dữ liệu dưới đây.

1️⃣ Bảng Student