One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
var tvShows = new PriorityQueue<string, ShowRating>(); | |
tvShows.Enqueue("Modern Family", ShowRating.Good); | |
tvShows.Enqueue("Ted Lasso", ShowRating.Amazing); | |
tvShows.Enqueue("MasterChef", ShowRating.Good); | |
tvShows.Enqueue("Breaking Bad", ShowRating.Transcendant); | |
tvShows.Enqueue("Happy Endings", ShowRating.Amazing); | |
tvShows.Enqueue("Game of Thrones (Seasons 1-6)", ShowRating.Amazing); | |
tvShows.Enqueue("Game of Thrones (Seasons 7-8)", ShowRating.OK); | |
tvShows.Enqueue("How to Get Away with Murder", ShowRating.Good); |
git stash | |
git stash branch <new-branch> stash@{0} | |
If the other branch already exists, you can just switch to it with checkout, then git stash apply | |
//via https://stackoverflow.com/a/30927991/119109 |
git push origin --delete feature/login |
install homebrew on linux: | |
https://brew.sh/ | |
brew install gh | |
gh auth login # Follow steps. | |
gh gist create myfile.txt # Creates a private gist. | |
gh core commands | |
gist: Manage gists |
#include <iostream> | |
#include <vector> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
vector<string> msg {"Hello", "C++", "World", "from", "VS Code", "and the C++ extension!"}; |
#include<stdio.h> | |
int main() { | |
printf("Hello Mario C World from VS Code and the C/C++ extension!\n"); | |
return 0; | |
} |
$('a[data-toggle="tab"]').on('show.bs.tab', function(e) { | |
localStorage.setItem('activeTab', $(e.target).attr('href')); | |
}); | |
var activeTab = localStorage.getItem('activeTab'); | |
if(activeTab){ | |
$('#myTab a[href="' + activeTab + '"]').tab('show'); | |
} |
var sql = "USE <DBNAME>;" + | |
"create user [domain\\user] from login [domain\\user];" + | |
"ALTER ROLE db_datareader ADD MEMBER [domain\\user] ;"; | |
try | |
{ | |
using (var ctx = new MyContext()) | |
{ | |
Info($"Start Grant Acess to xx: {DateTime.Now}"); | |
ctx.Database.ExecuteSqlCommand(sql); |
DECLARE @SQL varchar(max) | |
SELECT @SQL = COALESCE(@SQL,'') + 'kill ' + Convert(varchar, SPId) + ';' | |
FROM MASTER..SysProcesses | |
WHERE DBId = DB_ID(<DBNAME>) AND SPId <> @@SPId | |
--SELECT @SQL | |
--EXEC(@SQL) |