This file contains hidden or 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 List<T> GetAllInstances<T>(object value) where T : class | |
{ | |
var exploredObjects = new HashSet<object>(); | |
var found = new List<T>(); | |
FindAllInstances(value, exploredObjects, found); | |
return found; | |
} |
This file contains hidden or 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
gcloud kms encrypt --location global \ | |
--keyring test --key quickstart \ | |
--plaintext-file mysecret.txt \ | |
--ciphertext-file mysecret.txt.encrypted | |
gcloud kms decrypt --location global \ | |
--keyring test --key quickstart \ | |
--ciphertext-file mysecret.txt.encrypted \ | |
--plaintext-file mysecret.txt.decrypted |
This file contains hidden or 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
package main | |
import "fmt" | |
func main() { | |
slc := []int{1,2} | |
adjustSlice(slc) | |
fmt.Println(slc) | |
map1 := make(map[int]int) | |
adjustMap(map1) |
This file contains hidden or 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
DECLARE @login NVARCHAR(256), @user NVARCHAR(256); | |
SELECT @login = login_name FROM sys.dm_exec_sessions WHERE session_id = @@SPID; | |
SELECT @user = d.name | |
FROM sys.database_principals AS d | |
INNER JOIN sys.server_principals AS s | |
ON d.sid = s.sid | |
WHERE s.name = @login; |
This file contains hidden or 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
net stop /y was | |
net start w3svc |
OlderNewer