Questions

Can I safely use Rx in ServiceStack?

We've used Rx successfully in a number of projects previously and love how the Reactive patterns compartmentalize responsibilities and dependencies. We feel that there's a strong correlation between ...

18 May at 13:24

Add Favicon with React and Webpack

I am attempting to add a favicon to a React-based website that I made using webpack. It has been a total nightmare to add a favicon and I have tried many solutions to no avail. The latest solution tha...

Run Individual Test from Nunit3-console.exe

when i run ``` nunit3-console.exe (myfilepath)\dll file ``` The Console Runner Runs all my tests. what command do i need to run in order to run individual tests? i tried ``` nunit3-console.exe /...

18 May at 11:9

how to navigate from one page to another in react js?

I have two components. In first component I have one button. On click of button I want to navigate to another component or another page. here is my code [http://codepen.io/naveennsit/pen/pymqPa?edito...

9 Dec at 19:58

C# lambda query using generic type

I have three classes, they all have a property Date. I would like to write a generic class to return all the records for one date. Now the problem is: how can I write the lambda expression using gener...

18 May at 08:51

How can I one hot encode in Python?

I have a machine learning classification problem with 80% categorical variables. Must I use one hot encoding if I want to use some classifier for the classification? Can i pass the data to a classifie...

#1292 - Incorrect date value: '0000-00-00'

I referenced many questions which have the same title as mine, but they have a different approach and different issue so this question is not a duplicate. I have a table in which `column` `fm_sctrdat...

11 Jan at 21:39

Creating a service to determine the string format based on user's session

I have a need to format a bank account number based on the user's country. So rather than passing the location for each time I need the value, e.g: ``` Account.FormatBankAccountNumber("AU", bsb, acco...

18 May at 06:6

Getting a specific field from a JSON string without deserializing in C#

I currently have a REST app which returns a JSON string something like: `[{error: "Account with that email exists"}]` For when an error is thrown. I don't want to deserialize it into a custom "error" ...

5 May at 12:51

How to write to a CSV line by line?

I have data which is being accessed via http request and is sent back by the server in a comma separated format, I have the following code : ``` site= 'www.example.com' hdr = {'User-Agent': 'Mozilla/...

15 Dec at 22:36

Moq.netcore failing for .Net Core RC2

So I had a solution working on .Net RC1 with Moq, and I've upgraded to RC2 which I found that Moq.netcore was created to run on the new platform. I added aspnet-contrib to my NuGet.config ``` <?xml ...

18 May at 00:39

How to get images in Bootstrap's card to be the same height/width?

So here is my code, it displays 6 cards, three across and two rows. I would like for the images to all be the same size without having to manually resize the images. The responsiveness does work, I us...

7 Nov at 04:46

How do I raise an event when a method is called using Moq?

I've got an interface like this: ``` public interface IMyInterface { event EventHandler<bool> Triggered; void Trigger(); } ``` And I've got a mocked object in my unit test like this: ``` p...

27 Jan at 13:22

ActionContext gone in Microsoft.AspNetCore.Mvc.Controller

I cant find ActionContext in Microsoft.AspNetCore.Mvc.Controller after i changed my Version to AspNetCore 1.0.0-preview1 this is Controller class (after Change): [](https://i.stack.imgur.com/C6IeR.pn...

6 Dec at 03:23

ServiceStack DTO Mapping Issue

We are seeing an issue in 4.0.56 that we've seen before (see UPDATE 3 of [ServiceStack - [Reference] or [Ignore]?](https://stackoverflow.com/questions/36133236/servicestack-reference-or-ignore)) - nam...

23 May at 12:24

Combine a character constant and a string literal to create another constant

I code in C# primarily these days, but I coded for years in VB.NET. In VB, I could combine a character constant and a string literal to create other constants, which is very handy: ``` Const FileExt...

17 May at 19:41

IntelliJ cannot find any declarations

I completely uninstalled IntelliJ and have now reinstalled and imported my project. I imported using gradle and can see all of the files in my project present. However, when I open a file I can't find...

Default property value in React component using TypeScript

I can't figure out how to set default property values for my components using Typescript. This is the source code: ``` class PageState { } export class PageProps { foo: string = "bar"; } expor...

17 May at 16:52

Using Func delegate with Async method

I am trying to use Func with Async Method. And I am getting an error. > Cannot convert async lambda expression to delegate type `'Func<HttpResponseMesage>'`. An async lambda expression may return voi...

17 May at 17:38

Why does the variance of a class type parameter have to match the variance of its methods' return/argument type parameters?

The following raises complaints: ``` interface IInvariant<TInv> {} interface ICovariant<out TCov> { IInvariant<TCov> M(); // The covariant type parameter `TCov' // must ...

23 May at 10:28

Suppress warning without code

I am trying to suppress some warnings in Visual Studio, but the problem is that they don't have a code or anything I could use to identify them(or I can't find it). Most of these errors look like "Th...

Async await and threads

I am working with `async-await` and tasks, but I can't understand the one thing: **Is async task executes in separate thread?** As msdn says ([Asynchronous programming][1]): > The async and await keyw...

Service Fabric include additional files

I have a Visual Studios solution containing the following: - - The stateless service project uses configuration-based dependency injection, meaning the dependencies are loosly coupled with the proj...

Null-conditional operator evaluates to bool not to bool? as expected

I've just upgraded from VS 2010 to 2015. I like the new [null-conditional operator](https://msdn.microsoft.com/en-GB/library/dn986595.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1) which is also k...

18 May at 07:37

How to setup single Nuget packages folder for multiple solutions and projects in Visual Studio 2015

We are developing multiple solutions in Visual Studio 2015. The solutions share some core projects that need nuget packages. The nuget references cannot be resolved when the nuget package is added fro...