Chuyển đến nội dung chính

Bài đăng

SQL: Tùy biến cách sắp xếp trong câu lệnh ORDER BY

ORDER BY dùng để sắp xếp kết quả trả về bởi câu lệnh SELECT. Thỉnh thoáng, bạn cần tùy biến cách sắp xếp, không phải theo cách thông thường như ABC, 123… VD: Chúng ta có bảng Currency dùng để liệt kê tiền tệ của các nước

Kill nhiều processes trong Windows bằng CMD

Mở CMD bằng quyền Administrator: Start > Run > cmd.exe Trong CMD gõ "taskkill /F /IM <tên process bạn cần kill>" và nhấn enter Nếu bạn thấy dòng:  "SUCCESS:The process xxxx with PID xxxx has been terminated." thì bạn đã thành công

The Best iText Questions on StackOverflow

A couple of years ago, I decided to self-publish new books about iText, as opposed to working with a publisher as I did before for the “iText in Action” books. This led to a book about digital signatures that is available for download¹ on the iText site, and a book called “The ABC of PDF”² published on LeanPub. The goal of “The ABC of PDF” was to start with a book that looks at PDF at the lowest level, examining the syntax of a PDF file and a PDF page, and then to continue writing a series of books that explain how to use iText on a higher level, answering questions such as: How to create a PDF from scratch? How to create PDF from HTML? How to fill out PDF forms? How to parse a PDF file? … However, in spite of the fact that almost 15,000 people downloaded “The ABC of PDF”, it turned out that people really wanted me to write a different kind of book. I’ve received many comments through LeanPub from people who were disappointed that the ABC-book didn’t explain how to use iText. T...

Khắc phục lỗi MS_description khi tạo file bacpac

Thỉnh thoảng khi bạn tạo file bacpac, bạn có thể gặp bảng thông báo lỗi như sau: Nguyên nhân là thuộc tính MS_Description không được hỗ trợ bởi export data-tier application utility.

Hiển thị tất cả extended properties

SELECT major_id, minor_id, t.name AS [Table Name], c.name AS [Column Name], value AS [Extended Property] FROM sys.extended_properties AS ep INNER JOIN sys.tables AS t ON ep.major_id = t.object_id INNER JOIN sys.columns AS c ON ep.major_id = c.object_id AND ep.minor_id = c.column_id WHERE class = 1; GO

Thay đổi URI (URL) cho remote GIT repository

Dự án của bạn cần thay đổi repository, chuyển từ GitHub sang VisualStudio hay Bitbucket. Bạn không muốn phải pull source về từ đầu. Bạn có thể làm theo cách sau để sử dụng lại source cũ. git remote -v # View existing remotes # origin https://github.com/user/repo.git (fetch) # origin https://github.com/user/repo.git (push) git remote set-url origin https://github.com/user/repo2.git # Change the 'origin' remote's URL git remote -v # Verify new remote URL # origin https://github.com/user/repo2.git (fetch) # origin https://github.com/user/repo2.git (push) Chúc các bạn thành công!

[Visual Studio]Tùy chỉnh đường dẫn thư mục packages

Bạn cần tạo 1 project với cấu trúc thư mục như sau: doc: chứa tài liệu liên quan tới codebase. lib: Chứa toàn bộ thư viện third-party và packages được dùng cho chương trình src: Chứa toàn bộ source code, bao gồm Visual Studio và tất cả các folder trong project. Và mặc định, NuGet download toàn bộ packages vào trong 1 folder gọi là packages. Folder này được tạo trong cùng 1 folder mà solution tạo ra. Nếu bạn muốn di chuyển folder packages này ra ngoài, bạn cần tạo file nuget.config (đặt trong folder của solution) với nội dung như sau: <settings> <repositoryPath>..\lib</repositoryPath> </settings> Chúc các bạn thành công! Tham khảo: ASP.NET Web API 2, 2nd Edition