Why does the Finalize/Destructor example not work in .NET Core?
I'm trying to learn how finalization and destructor works in C#, I tried to run the code in the [System.Object.Finalize](https://learn.microsoft.com/en-us/dotnet/api/system.object.finalize?view=netfra...
- Modified
- 24 Jun at 04:54
ActionExecutingContext ActionDescriptor doesn't contain ActionName and MethodInfo
As you below can see, in my ActionFilter, I try to get the ActionName and the MethodInfo of the ActionExecutingContext.ActionDescriptor. But the compiler says that ActionDescriptor doesn't contain a d...
- Modified
- 28 Jul at 23:31
How to convert emoticons to its UTF-32/escaped unicode?
I am working on a chatting application in WPF and I want to use emoticons in it. I am working on WPF app. I want to read emoticons which are coming from Android/iOS devices and show respective images....
How to autosize the height of a list view in XAML
My list view object receives an image, an ID number and a synopsis. The synopsis varies in size because some have whitespace returns. I notice that ListView has a row height that I can set (which I ha...
- Modified
- 5 May at 14:15
Enabling Microsoft's Code Analysis on .NET Core Projects
Our team uses the Code Analysis feature with a custom ruleset to cause our build to fail if we forget to do things like null checks on method arguments. However, now as we create a new .NET Core proj...
- Modified
- 23 Jun at 16:47
Set value to an entire column of a pandas dataframe
I'm trying to set the entire column of a dataframe to a specific value. ``` In [1]: df Out [1]: issueid industry 0 001 xxx 1 002 xxx 2 003 xxx 3 ...
Pass data to startup.cs
How do you pass data into startup.cs ? This is for integration testing using `WebHostBuilder` and `TestServer` I need to pass different data depending on the Test Fixture. So dont want to pull it in...
Boolean field rendered with different cases
Bit of a weird one for anyone with thoughts on it…I’m rendering a hidden Boolean field on a particular page. However, I get two slightly different markups for the same field depending on whether a par...
- Modified
- 30 Jun at 09:15
How to prevent the click event using CSS?
How to prevent the click event using CSS ? I have created the form page , then i need to prevent the click event using only CSS? I have tried this css property, but not worked. ``` <div>Content<...
Querying a MariaDB database with C#
I have XAMPP installed on Windows, and MySQL setup. I was wondering how I could query my database from C#. I can already connect using `MySql.Data.MySqlClient.MySqlConnection`. I am looking for a stri...
How to install PHP GD in Ubuntu
I want to convert the image in low resolution with GD. I'm working on IBM Server under these speces Version: PHP 7.0.15-0ubuntu0.16.04.4 (cli) ( NTS ) and I have also comment out the extension from p...
Java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/InvalidDefinitionException
I have updated my dependecies like you said in your comment and i have this now : ``` org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is ...
Different behavior async/await in almost the same methods
Let's say I have two async methods ``` public async static Task RunAsync1() { await Task.Delay(2000); await Task.Delay(2000); } ``` and ``` public async static Task RunAsync2() { var t...
- Modified
- 23 Jun at 09:44
Unable to import svg files in typescript
In `typescript(*.tsx)` files I cannot import svg file with this statement: ``` import logo from './logo.svg'; ``` Transpiler says:`[ts] cannot find module './logo.svg'.` My svg file is just `<svg>....
- Modified
- 23 Jun at 08:54
Install .NET Framework 3.5 on Windows Server Core Docker
I am struggling to install .NET Framework 3.5 on docker container. I have 4.5 installed already, but need 3.5 to run one Service. Here is my Dockerfile: ``` FROM microsoft/windowsservercore SHELL ["p...
- Modified
- 23 Jun at 09:1
Mock HttpClient using Moq
I would like to unit test a class that uses `HttpClient`. We injected the `HttpClient` object in the class constructor. ``` public class ClassA : IClassA { private readonly HttpClient _httpClient;...
- Modified
- 6 Apr at 17:52
Replace the string of special characters in C#
My requirement is: > I have to replace some special characters like * ' " , _ & # ^ @ with `string.Empty`, and I have to replace blank spaces with `-`. This is my code: ``` Charseparated = Charsepa...
A good folder structure for Xamarin form projects
Since I'm new to Xamarin forms, I'm not quite aware of For eg. I have a project which contains following files : 1. Network calling 2. Database handling 3. Views creations 4. Model-View bindings 5...
- Modified
- 25 Jun at 03:52
Jenkins: 403 No valid crumb was included in the request
I configured Jenkins in [Spinnaker](https://en.wikipedia.org/wiki/Spinnaker_(software)) as follows and setup the Spinnaker pipeline. ``` jenkins: # If you are integrating Jenkins, set its location...
dotnet core get a list of loaded assemblies for dependency injection
I'm using AutoFac to automatically register dependencies based on their interface implementations like so: ``` builder.RegisterAssemblyTypes(Assembly.GetEntryAssembly()).AsImplementedInterfaces(); ``...
- Modified
- 22 Jun at 19:48
ServiceStack.OrmLite Using Limit in SQL.In filter
I have a parent/child table setup - Items/ItemDetails. This part works: ``` var q = db.From<Item>(); //various where clauses based on request items = db.Select<Item>(q); q = q.Select(a => a....
- Modified
- 22 Jun at 19:41
Populate the IdentityServer redirect_uri with parameters using ServiceStack
I am trying to use ServiceStack with IdentityServer4 to do the user logon authentication. However, I need to pass back some parameters to the URL after redirecting from the logon. e.g. When the fol...
- Modified
- 22 Jun at 18:57
C# 7 Pattern Match with a tuple
Is it possible to use tuples with pattern matching in switch statements using c# 7 like so: ``` switch (parameter) { case ((object, object)) tObj when tObj.Item1 == "ABC": break; } ``` I...
- Modified
- 17 Oct at 11:9
Allow Multiple Downloads in ChromeDriver
I need to download multiple files in Chrome using ChromeDriver ( C# ), first file is downloaded successfully, but the anothers not download, appeared a window asking "Download Multiple Files - Allow |...
- Modified
- 27 Jun at 09:39
Generic method with HttpMethod as a parameter
I am trying to create a method that will invoke other methods based on the HttpMethod. My method looks like this: ``` public async Task<string> CreateAsync<T>(HttpClient client, string url, HttpMetho...
- Modified
- 22 Jun at 15:32