This shortcut disappeared from my windows search. The executable is here: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe
BlackJack
Old school BlackJack game for Windows. Need to move this to the web/mobile next! https://github.com/mcullinan44/BlackJackNet4.5 0 forks. 0 stars. 0 open issues. Recent commits: cleanup, Matt fix color, matt@mattcullinan.com test, matt@mattcullinan.com sfsfffd, matt@mattcullinan.com refactor, matt@mattcullinan.com
Package libicu60 is not available => solved
I keep getting this when trying to get dotnetcore running on linux: Package libicu60 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package ‘libicu60’ has no installation candidate To solve this, I’ve done the… Continue reading Package libicu60 is not available => solved
ASP.NET WebForms – Use ICallbackEventHandler to lighten the load of PostBacks
Much has been written over the years regarding the drawbacks of ASP.NET and how MVC/SPAs solve many of these problems, so there’s not much to rehash there. However, if you’re stuck working with older technology, there is a handy tool to make your ASP.NET WebForms site more responsive. Implementing the ICallbackEventHandler interface in your WebForms… Continue reading ASP.NET WebForms – Use ICallbackEventHandler to lighten the load of PostBacks
CAUTION: This SQL will DELETE all rows in your table
I came across this gem the other day. Fortunately, I ran it locally first. There are two tables. Person and AlienPerson. Lets create the tables and seed with some data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
IF(OBJECT_ID('Person')) IS NOT NULL DROP TABLE Person GO CREATE TABLE Person ( PersonID INT IDENTITY(1,1) PRIMARY KEY, Name VARCHAR(MAX), Age INT null ) INSERT INTO Person (Name, Age) VALUES ('john', 11) INSERT INTO Person (Name, Age) VALUES ('Susy', 54) INSERT INTO Person (Name, Age) VALUES ('QBert', 23) INSERT INTO Person (Name, Age) VALUES ('Bernie', 75) INSERT INTO Person (Name, Age) VALUES ('Frank', 34) INSERT INTO Person (Name, Age) VALUES ('Julie', 66) INSERT INTO Person (Name, Age) VALUES ('tom', null) GO IF(OBJECT_ID('AlienPerson')) IS NOT NULL DROP TABLE AlienPerson GO CREATE TABLE AlienPerson ( AlienPersonID INT IDENTITY(1, 1) PRIMARY KEY, Age INT null ) INSERT INTO AlienPerson (Age) VALUES (12) |
Try to run a bad select statement:
1 2 3 4 5 6 7 |
--This will not be interpreted SELECT PersonID FROM AlienPerson WHERE age = 12 /* Msg 207, Level 16, State 1, Line 1 Invalid column name 'PersonID'. */ |
Here’s the baddie. This will delete all data in the Person table:
1 2 3 4 |
DELETE FROM Person WHERE PersonID IN ( --same as above query that was not interpreted!!!!! SELECT PersonID FROM AlienPerson WHERE age = 12 ) |
1 |
(7 row(s) affected) |
To get… Continue reading CAUTION: This SQL will DELETE all rows in your table
Nullable booleans reconsidered
If you’re about to use a Nullable<bool>, I would consider using an Enum or other data structure instead. It may help you avoid mistakes when the meaning of NULL is not known. Recently, I mishandled a Nullable<bool>. I won’t go into the details of the mistake, but lets just say it was bad enough to require… Continue reading Nullable booleans reconsidered
XML to Key Value Pairs (Works well for exporting data to Excel)
On a recent project, I had to provide export functionality for a web grid’s data source that contained wildly varying data structures. The XML structure contained anywhere between 1 to 10 levels of nesting and we needed to be able to export this data into an Excel or comma separate values file. This code will show… Continue reading XML to Key Value Pairs (Works well for exporting data to Excel)