- win + R -> gpedit.>
- 本地计算机策略 > 计算机配置 > 管理模板 > 系统 > Device Guard/设备防护 > 启用基于虚拟化的安全性: 已禁用
- 控制面板 > 卸载程序 > 打开或关闭 Windows 功能 -> 关闭 Hyper-V -> 不重启
- win + X + A -> powershell
- bcdedit /set hypervisorlaunchtype off
curl -L https://get.daocloud.io/docker/compose/releases/download/1.23.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose |
# switch to root | |
su root | |
# show access | |
ls -l /etc/sudoers | |
# change access | |
chmod 777 /etc/sudoers | |
vim /etc/sudoers | |
# find root ALL=(ALL) ALL | |
# add user ALL=(ALL) ALL | |
# :wq |
# check permission | |
sudo -u www-data stat /username/test/ | |
# add to user group | |
gpasswd -a www-data username | |
# give access to username group | |
chmod g+x /username && chmod g+x /username/test && chmod g+x /username/test/# | |
# restart nginx |
scp username@host:/remote/path/to/download /local/path/to/save/ |
// Reference: https://stackoverflow.com/questions/152188/can-i-create-a-desktop-icon-for-a-clickonce-application | |
// Program Class | |
private void CreateDesktopIcon () { | |
ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment; | |
// create desktop shortcut at first time application run | |
if (ad.IsFirstRun) { | |
Assembly assembly = Assembly.GetEntryAssembly (); | |
// NOTE: Get assembly information and to get Program shortcut in Program File(Generated By OneClick) | |
string product = string.Empty; |
// reference: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/how-to-write-a-copy-constructor | |
class Person | |
{ | |
// Copy constructor. | |
public Person(Person previousPerson) { | |
Name = previousPerson.Name; | |
Age = previousPerson.Age; | |
} | |
//// Alternate copy constructor calls the instance constructor. |
Team Explorer/Home/Settings/Global Settings[Repository Settings]/Rebase local branch when pulling
sudo chown -R $USER /path/to/directory |
db.Store.update({}, {$pull: {vegetables: {$in: ['v1', 'v2']}, fruits: 'f1'}}, {multi: true}) |