Static classes can be used as type arguments via reflection

When trying to use a static class as a type parameter, the C# compiler will throw an error: `var test = new List<Math>();` > error CS0718: `System.Math': static classes cannot be used as generic arg...

23 May at 12:10

Laravel Mix "sh: 1: cross-env: not found error"

I have been trying to set up Laravel Mix in my project and followed the install guide on the Laravel website however keep getting errors. ``` { "private": true, "scripts": { "dev": "cross-env...

4 May at 16:16

Using protobuf in servicestack, why order can only start from 1 not 0?

Using servicestack with protobuf, I found an interesting issue. if I have the following class defined in both serverside and client side, it works ``` [DataContract] public class Test : IReturn<Test...

28 Apr at 14:59

How to parse a soap message loaded from a file?

I need to parse a SOAP message I load from the disk, to the type of the generated proxy. WCF does it when it receives the message from the http server, so I should be able to do it from the disk. I c...

2 May at 09:2

Disable code analysis when using MSBuild 14

I have a .NET solution containing several C# 6.0 projects. Every project references the [StyleCop Analyzer via NuGet](https://www.nuget.org/packages/StyleCop.Analyzers/). Within Visual Studio, I have ...

Expression bodied get / set accessors feature in c# 7.0

I'm having this code in a class ``` private string test; public string Test { get => test; set => test = value; } ``` But the compiler won't let me compile. It says ``` CS1043 { or ; exp...

28 Apr at 17:8

Issue saving TIFF file with IStreamWriter under ServiceStack

I am using the ServiceStack framework to stream a TIFF file. When I use an IStreamWriter interface, it saves only the first page using an image object. I am looking for an example of how to use the sa...

15 Sep at 06:25

Entity Framework Core: Log queries for a single db context instance

Using EF Core (or any ORM for that matter) I want to keep track of the number of queries the ORM makes to the database during some operation in my software. I've used SQLAlchemy under Python earlier,...

Send and receive large file over streams in ASP.NET Web Api C#

I'm working on a project where I need to send large audio files via streams from a client to a server. I'm using the ASP.NET Web Api to communicate between client and server. My client has a "SendFile...

29 Oct at 08:22

How to change a header value of HttpRequestMessage

In a validation setup I want to change the value of a header of a `HttpRequestMessage`. In a `HttpClientHandler` I have the following code: ``` protected override async Task<HttpResponseMessage> ...

1 Oct at 06:48

"Invalid Host header" when running Angular/cli development server c9.io

Current command: `ng serve --host --public $IP:$PORT` Results on my website: > Invalid Host header

29 Oct at 14:28

InitializationException in Unity Firebase

I have a problem with Firebase in my Unity project. Firebase SDK was imported in the project, builded, no errors during this process. SHA-1 key was generated with a keytool and added to Firebase proje...

Debug both javascript and c# in ASP.NET Core MVC using VS Code

Is there a way to set breakpoints and debug javascript and c# at the same time in VS Code (on macOS)? I have installed the [chrome debugger extension](https://code.visualstudio.com/blogs/2016/02/23/i...

Encrypting configurations in app.config

I need to encrypt data in my app.config file. I am looking at Protected Configuration as described on [MSDN here](https://msdn.microsoft.com/en-us/library/ms254494(v=vs.110).aspx). I have to encrypt p...

28 Apr at 08:3

.Net Core Client for EventStore - Connection was closed

I've recently started trying out the [EventStore](https://geteventstore.com/) Client API for .net-core ([nuget package](https://www.nuget.org/packages/EventStore.ClientAPI.NetCore/)). However, I'm str...

27 Oct at 12:10

How to run docker-compose up -d at system start up?

To let the containers autostart at startup point, I tried to add the command: `cd directory_has_docker-compose.yml && docker-compose up -d` in /etc/rc.local. but then after I reboot the machi...

15 May at 07:55

Why is TestServer not able to find controllers when controller is in separate assembly for asp.net core app?

For some reason, when ASP.NET core controllers are created in separate assembly, the TestServer is not able to find controller actions when the client makes a request.(results in 404 response) Why is ...

how to send a http patch request with ServiceStack Android Client

Is it possible to send a patch request using servicestack android client? if not, can I get the android client cookie to use other HttpClient in android? ``` PatchRequest = new JsonPatchRequest { ne...

27 Apr at 21:43

Amazon AWSClientFactory does not exists

I created an empty .Net Core application and installed nuget packages for Both Amazon.Core and Amazon.S3. Then I tried to use S3 to get an object but I'm stuck at the very first moment... Amazon.AWS...

react-native run-android command failed, but gradlew installDebug work

I'm using react-native 0.43.3 on OSX. I tried to running app on Android and get message ``` react-native run-android Scanning 568 folders for symlinks in /Users/ruci.k/project/mayacrew/supermembers/...

27 Apr at 20:55

How do I format all files in a Visual Studio Code project?

Is there a way to format all files in a project without formatting each one individually?

18 May at 13:19

Invalid self signed SSL cert - "Subject Alternative Name Missing"

Recently, Chrome has stopped working with my self signed SSL certs, and thinks they're insecure. When I look at the cert in the `DevTools | Security` tab, I can see that it says > Subject Alternative...

28 Dec at 17:47

React Native: View onPress does not work

I'm facing a weird problem. In my react native app, if I set `onPress` event to `View` it is not triggered but if I set the same to `Text` inside `View`, it fires. What am I missing here? ``` <View s...

27 Apr at 18:14

How can l uninstall PyTorch with Anaconda?

I installed PyTorch with: ``` conda install pytorch torchvision cuda80 -c soumith ``` How do I uninstall and remove all PyTorch dependencies?

30 Mar at 04:47

Custom UITableViewCell: First Row Has No Content

I am trying to create a two-level UITableView implementation for a comment and reply panel. The first level contains all top-level comments and if there are replies to that comment, there will be an ...

3 Jul at 13:26