Skip to content
Blog cá nhân của PhongTV

Blog cá nhân của PhongTV

  • Home
  • About
  • Skills
  • Resume
  • Contact
  • Bài viết
pbk14 Tháng 8, 202414 Tháng 8, 2024 No Comments

How to get the SHA1 hash of a string in SQL Server

To get SHA1 hash, SQL Server provides HASHBYTE function: To convert HEX to string, we need to use CONVERT: We need to use 40 as parametter for NVARCHAR because the length of SHA1 is 40, otherwise the output will be cut. The last parametter of CONVERT is 2, you can read Microsoft’s documentation here: https://learn.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms187928(v=sql.105)?redirectedfrom=MSDN […]

Continue Reading
pbk15 Tháng 5, 202415 Tháng 5, 2024 No Comments

How to fix error “Uncaught TypeError: ftp_fget(): Argument #1 ($ftp) must be of type FTP\Connection, null given in class-wp-filesystem-ftpext.php” in WordPress

If you get a critial error message when access your WordPress website, firstly enable the DEBUG mode. You can see detail error message like this: Fatal error: Uncaught TypeError: ftp_fget(): Argument #1 ($ftp) must be of type FTP\Connection, null given in /var/www/your-website.com/wp/wp-admin/includes/class-wp-filesystem-ftpext.php:146 Stack trace: #0 /var/www/YOUR-WEBSITE.COM/wp-admin/includes/class-wp-filesystem-ftpext.php(146): ftp_fget() #1 /var/www/YOUR-WEBSITE.COM/wp-content/themes/pixova-lite/inc/libraries/epsilon-framework/classes/class-epsilon-color-scheme.php(268): WP_Filesystem_FTPext->get_contents() #2 /var/www/YOUR-WEBSITE.COM/wp-content/themes/pixova-lite/functions.php(704): Epsilon_Color_Scheme::load_css_overrides() #3 /var/www/YOUR-WEBSITE.COM/wp-settings.php(663): […]

Continue Reading
pbk8 Tháng 4, 2024 No Comments

How to fix error “Duplicate key value violates unique constraint PK_xxx” when insert data into Postgres table

Firstly, run these 2 commands, be aware of Capitalize: For unknown reason, the result of the first query is greater then the second one. That cause the next inserted record will be duplicate with the exist value. To fix that, just need to re-generate the auto increment value by this command:

Continue Reading
pbk17 Tháng 1, 2024 No Comments

Sửa lỗi System.PlatformNotSupportedException : System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information trên Ubuntu

Khi chạy .NET 6 API trên Ubuntu, ta có thể gặp lỗi này khi thực hiện convert file xlsx sang file pdf nếu sử dụng thư viện Spire.XLS. Để khắc phục, tại thư mục gốc của API, tạo file runtimeconfig.template.json với nội dung sau và lưu lại là xong:

Continue Reading
pbk17 Tháng 1, 2024 No Comments

Cách cài các font Calibri và Wingdings trên Ubuntu

Với Wingdings, ta chỉ có thể copy thủ công từ máy Windows vào. Nếu thấy Wingdings trong danh sách trả về là thành công.

Continue Reading
  • 1
  • 2
  • 3
  • 4
Trang sau »
Proudly powered by WordPress | Theme: Smart Portfolio by Code Work Web.
Contact Us

    This form is powered by: Sticky Floating Forms Lite