Search This Blog

Thursday, April 26, 2018

Sự khác biệt giữa Sharing/Advanced Sharing/Permission và Security khi quản lý phân quyền trong Windows

Trong Windows có 2 chỗ "phân quyền", một cái là Sharing/Advanced Sharing/Permission


Chỗ kia là Security

Nhiều lúc, kiểm tra trong Security thì thấy Group hoặc User nào đó đã có quyền edit rồi, nhưng user/group đó cứ báo "không edit được"
Thì cần kiểm tra lại xem trong tab Sharing/Advanced Sharing/Permission user đã có quyền tương tự chưa, vì user đó cần được cấp quyền ở cả 2 chỗ (mà đôi khi cấp quyền từ tab Security thì "nó" không tự động "ăn" vào tab Sharing/Advanced Sharing/Permission)
Nguyên nhân kỹ thuật, thì do cái này:
Sharing permissions are a function of SMB/CIFS, the Security tab controls file system (NTFS) permissions.  The user needs to have access thru both sets.

Friday, April 20, 2018

C#: Thông báo ra màn hình khi đang chạy vòng lặp

When you run a Windows Form, it creates the new form, which then waits for events to handle. Each time the form handles an event, it processes all the code associated with that event. All other events wait in the queue. While your code handles the event, your application does not respond. For example, the window does not repaint if another window is dragged on top.

If you call DoEvents in your code, your application can handle the other events. For example, if you have a form that adds data to a ListBox and add DoEvents to your code, your form repaints when another window is dragged over it. If you remove DoEvents from your code, your form will not repaint until the click event handler of the button is finished executing. For more information on messaging, see User Input in Windows Forms.


Bản chất là nhảy ra khỏi vòng lặp, thực hiện lệnh update Label, xong nhảy vào trong vòng lặp chạy tiếp. Đương nhiên cái giá của nó là làm chậm performance.
Nhưng trong đa số tình huống thì không đáng kể.

Phật giáo vs cúng sao

Nhiều người nói Phật giáo bây giờ biến tướng, cúng sao giải hạng mê tín dị đoan... Nhưng mất đi cái đó rồi, nhóm những con người có ít họ...