Attended a really inspirational talk, perhaps HTML/CSS will now be about design rather than weighed down by JavaScript libraries and polyfills?
Attended a really inspirational talk, perhaps HTML/CSS will now be about design rather than weighed down by JavaScript libraries and polyfills?
When you are developing a SQL Server database you might want to use External Storage devices. Beware of a couple of slight gotchas. When you restart your machine SQL Server may start before the drives become available. If this happens SQL Server will mark the database as ‘pending recovery’. To get out of this situation just restart the SQL Server instance and select ‘refresh’ the database node in SQL Management Studio. A second, related problem, is that the drives may not be assigned the same drive letter, this will again result in ‘pending recovery’. If you cannot remember the drive letter you assigned you can run the following against the system database;
select [name], physical_name from sys.master_files
If you now have an incorrectly assigned drive letter, the best solution is to open the disk management tool where you can right-click and assign the original drive letter back.
…is CTRL ALT END
Outlook 2016 has an all to frequent problem where it gets stuck on the splash screen saying, ‘processing’. The simplest solution is to stop outlook and Start->Run; Outlook /safe
Then after it starts, close it down and reopen and it should be fine. Seriously…I know.
I was about to leap into sp_foreach or even uglier SQL Execute when I discovered that you can right-click on the database->generate scripts. Then in the advanced options you can select DROP only. Easy.
Sometimes you want to create a task that you want to start as async but you want to track its status at a later date. The problem is that a task created this way will appear to have completed, and you’ll never know if it faulted or not. One solution is use a Func and Unwrap the resulting task.
t = Task.Factory.StartNew(new Func(async () =>
{
while (true)
{
await Task.Delay(1000);
throw new ArgumentNullException();
}
value = 1;
})).Unwrap();
Edit – Whilst the above does have its uses, it’s better to use;
t = Task.Run(async () =>
Task.Run accepts Func and does the unwrapping for you.
While variations on select (xyz) from table all work, they all suffer from searching/scanning data and the overheads that incurs. The best mechanism I have found is;
EXEC sp_spaceused N'<schema>.<table name>’;
Another in my series of, “oh how do you do that again?”
Every time I want to set this I can never remember what it’s called, so I’m posting it.
ServicePointManager.DefaultConnectionLimit
Just a quick note that you can use a Powershell cmdlet to test a network connection;
Test-NetConnection -ComputerName <name> -Port <port>