When writing unit tests for classes / services that contain methods that include NavigationManager
,
then create a simple derived class to "mock" that functionality.
namespace Your.Namespace.Here;
using Microsoft.AspNetCore.Components;
-- from https://gist.github.com/joey-qc/6710702 | |
-- USER SETTABLE | |
declare @tableNameForPOCO varchar(200)--limits POCO class generation to only mentioned table(s) | |
--SET @tableNameForPOCO = 'Table1,Table2,Table3'--@tableNameForPOCO can be null to mean all tables | |
--or it can be set to a comma-delimited list of table names | |
--there should be no space(s) before and after each comma in this list | |
set @tableNameForPOCO = 'TABLE_NAME' | |
-- |
#include <iostream> | |
#include <vector> | |
#include <tuple> | |
#include <typeinfo> | |
template<class... Tp> | |
std::vector<int*> GetData(std::tuple<Tp...>&& t) | |
{ | |
std::vector<int*> accumulator; |
When mocking DbContexts for unit testing that contain async
methods, an exception is thrown with the following verbiage:
System.InvalidOperationException: 'The provider for the source 'IQueryable' doesn't implement 'IAsyncQueryProvider'. Only providers that implement 'IAsyncQueryProvider' can be used for Entity Framework asynchronous operations.'
In order to avoid this exception create the following classes:
The new release of Thunderbird
, codename Supernova
, changes some key elements of the UI to be more "modern".
For those who wish to keep the new release but modify some elements to semi-reflect the old UI, then here are some
steps to accomplish this.
Settings
.General
tab.Config Editor
button.void Main() | |
{ | |
string contract = @" | |
public int keyId { get; set; } | |
public bool error { get; set; } | |
public string changeProposal { get; set; } | |
public string dataCode { get; set; } | |
public string master { get; set; } | |
"; |
Before we begin, make sure that you have a monitor hooked up to the second GPU. In some situations, the video card will fail to properly initialize if one isnt attached. Also it helps with debugging issues that will most assuredly arise.
Ensure that IOMMU is enabled in the BIOS. For me using an Intel system from Dell, it was under Virtualization -> Direct I/O. It should be something along those lines for AMD as well. That was the easy part :).
Before we proceed we're going to need to gather some information. Run the command, lspci -nn|grep NVIDIA
(or AMD if your using that). The output for me was:
using System.ComponentModel.DataAnnotations; | |
using System.Runtime.Serialization; | |
void Main() | |
{ | |
var input = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
var test = Adapter<Test>(input); | |
Console.WriteLine(test); | |
} |
Error while trying to load a compilation database: | |
Could not auto-detect compilation database for file "code/act_comm.c" | |
No compilation database found in /home/sgilliam/src/riftshadow/code or any parent directory | |
fixed-compilation-database: Error while opening fixed database: No such file or directory | |
json-compilation-database: Error while opening JSON database: No such file or directory | |
Running without flags. | |
962 warnings and 1 error generated. | |
Error while processing /home/sgilliam/src/riftshadow/code/act_comm.c. | |
1725 warnings and 21 errors generated. |
$folderExclusionList = @("bin", "obj" ,"packages") | |
... | |
Where-Object { | |
$dir = $_.DirectoryName | |
# return all directories that don't have part of the exclusion list in the name | |
$null -eq ($folderExclusionList | Where-Object { $dir -match $_ }) | |
} | |
... |