-
Download the Docker for Windows https://store.docker.com/editions/community/docker-ce-desktop-windows
-
Search for 'Turn Windows features on or off' and launch it. In the list of features you will find Hyper-V. Check the box next to it and click OK.
-
Check if Virtualization is shown as enabled by going to Task Manager > Performance.
-
If Virtualization is not enabled, restart your PC, go to BIOS setting at startup. Search for Virtualization setting at the BIOS settings. Toggle from 'Disabled' to 'Enabled'. Save the BIOS settings and restart.
-
After restarting, check if Virtualization is enabled at Task Manager > Performance. It should be enabled.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe -i C:\MyService.exe | |
C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe -u C:\MyService.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dns.GetHostEntry(Dns.GetHostName()).AddressList.FirstOrDefault(ip => ip.AddressFamily == AddressFamily.InterNetwork); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Item { | |
public int Id { get; set; } | |
public string Name { get; set; } | |
} | |
public class ItemListEqualityComparer : IEqualityComparer<List<Item>> { | |
public bool Equals(List<Item> x, List<Item> y) { | |
if (ReferenceEquals(x, y)) | |
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void BulkDelete<T>(DbContext dbContext, IEnumerable<int> idList) where T : class { | |
var tableName = dbContext.GetTableName<T>(); | |
foreach (var i in idList) { | |
dbContext.Database.ExecuteSqlCommand("DELETE FROM " + tableName + " WHERE Id=@ID", new SqlParameter("ID", i)); | |
} | |
} | |
public static string GetTableName<T>(this DbContext context) where T : class { | |
ObjectContext objectContext = ((IObjectContextAdapter)context).ObjectContext; | |
return objectContext.GetTableName<T>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Main() | |
{ | |
Invoke<List<string>>(Test1, new List<string>()); | |
Invoke<string, int>(Test2, string.Empty, 1); | |
Invoke<string, int, object>(Test3, string.Empty, 1, null); | |
} | |
private static void Invoke<T1>(Action<T1> a, T1 p) | |
{ | |
InvokeMyMethod(a, p); | |
} |
sudo apt install curl
curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
sudo apt install nodejs
node --version
npm version
sudo apt-get -f install
sudo dpkg -i <package-name>.deb
chmod +x /<path>/yourscript.sh
/<path>/yourscript.sh
See Details How do I run .sh files?
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
OlderNewer