How to empty the Trash can in Rasperry PI OS
As in any Linux based distribution you need this command: rm -rf ~/.local/share/Trash/*
As in any Linux based distribution you need this command: rm -rf ~/.local/share/Trash/*
Dim char_array_end = "<br />".ToCharArray Dim char_array_start = "I ".ToCharArray Dim my_string = "I love pizza, beer, sambuca<br />" Dim my_string_trimmed = my_string.TrimEnd(char_array_end) Console.WriteLine(my_string_trimmed) ‘I love pizza, beer, sambuca’ my_string_trimmed = my_string.TrimStart(char_array_start) Console.WriteLine(my_string_trimmed) ‘love pizza,…
From the command line run the following command: for file in directory1/*; do diff “$file” “directory2/${file##*/}”; done or for specific file types (example for txt files): for file in directory1/*.txt; do diff “$file” “directory2/${file##*/}”; done
In our case the problem was that we installed the Microsoft.EntityFrameworkCore package and not EntityFramework. To solve the problem just add the namespace to the commands to run in the PM console. So to create…
enable-migrations -contexttypename MyAspnetCoreApp.Models.MyDbContext
var IS_SESSION_STORAGE_SUPPORTED; try { if (window.sessionStorage) { IS_SESSION_STORAGE_SUPPORTED = true; } else { IS_SESSION_STORAGE_SUPPORTED = false; } } catch (e) { IS_SESSION_STORAGE_SUPPORTED = false; } if (console) console.log(IS_SESSION_STORAGE_SUPPORTED);
SELECT client_net_address, COUNT(*) FROM sys.dm_exec_connections GROUP BY client_net_address
using (var netClient = new System.Net.Http.HttpClient()) { var response = netClient.GetAsync(“https://example.com”).Result; if (response.IsSuccessStatusCode) { var responseContent = response.Content; string responseAsString = responseContent.ReadAsStringAsync().Result; Console.WriteLine(responseAsString); } }
$mbox = imap_open(“{mail.example.com:143/novalidate-cert}”, “foo@example.com”, “password”) or die(“can’t connect: ” . imap_last_error()); $folders = imap_list($mbox, “{mail.example.com:143/novalidate-cert}”, “*”); if ($folders === false) { echo “Failed to list folders in mailbox”; } else { print_r($folders); } imap_close($mbox);
using System; public class Program { public static void Main() { var e0 = (Food)Enum.ToObject(typeof(Food), 0); Console.WriteLine(e0); // or simply var e2 = (Food)2; Console.WriteLine(e2); } public enum Food { Pizza, Pasta, Tofu } }