ORMLite Save does not update model with the autoincrement identity

I'm using servicestack, ormlite, and mysql and Have linked table that are created within a transaction. Using the connection Save method, it should (according to documentation) update the model with t...

How to resolve Unneccessary Stubbing exception

My Code is as below, ``` @RunWith(MockitoJUnitRunner.class) public class MyClass { private static final String code ="Test"; @Mock private MyClassDAO dao; @InjectMocks priva...

29 May at 23:32

ValueError: cannot reshape array of size 30470400 into shape (50,1104,104)

I am trying to run threw this Tutorial [http://emmanuelle.github.io/segmentation-of-3-d-tomography-images-with-python-and-scikit-image.html](http://emmanuelle.github.io/segmentation-of-3-d-tomography...

22 Mar at 12:1

Remove a service in ASP.Net Core Dependency Injection

In an Asp.Net MVC Core (early versions, versions 1.0 or 1.1), dependency injection bindings are configured as follow in the Startup.cs class : ``` public class Startup { public void ConfigureServ...

How to prevent _t and _v when inserting into MongoDB?

I'm utilizing Dictionary. After there are "_t" and "_v". Two posts here talked about [serialization](https://stackoverflow.com/questions/24199862/how-do-i-prevent-t-field-from-appearing-when-upsertin...

23 May at 12:2

Python - AttributeError: 'numpy.ndarray' object has no attribute 'append'

This is related to my question, [here](https://stackoverflow.com/questions/42941668/valueerror-could-not-broadcast-input-array-from-shape-22500-3-into-shape-1). I now have the updated code as follows...

3 Apr at 08:46

What is the difference between .NET Core and .NET Standard Class Library project types?

In Visual Studio, there are at least three different types of class libraries you can create: - - - While the first is what we've been using for years, a major point of confusion I've been having is ...

Communication between Python and C#

I have a Python backend running machine learning algorithms. I want to use the same backend for both an Excel plugin (C#) and a website. I want both interfaces to send my training data (thousands of l...

26 Mar at 14:35

ServiceStack TypeSerializer: ISO8601 and culture with dot as TimeSeparator

This is my first question, handle with care. On .Net 4.5.2 using c#, I found a strange behaviour on [ServiceStack.Text 4.5.6](https://github.com/ServiceStack/ServiceStack.Text) serializing `DateTime`:...

How Can I Parse YAML Into a Derived Collection Using YamlDotNet?

Using [YamlDotNet](http://aaubry.net/pages/yamldotnet.html), I am attempting to deserialize the following YAML: ``` Collection: - Type: TypeA TypeAProperty: value1 - Type: TypeB TypeBProp...

21 Mar at 22:0

Dapper with .NET Core - injected SqlConnection lifetime/scope

I'm using .NET Core Dependency Injection to instantiate a `SqlConnection` object during the application startup, which I'm then planning to inject in my repository. This `SqlConnection` will be used b...

Azure Table Storage CreateQuery in .NET Core

I'm porting my existing class library that targets .NET Framework 4.6.2 to .NET Core 1.1. Looks like some of the methods that are available in .NET Framework version are not there in .NET Core. Two s...

"Unable to find main class" with Maven on spring-boot project in Eclipse

I am pretty desperate since I no longer can compile my Maven projects. I have one logical project split into 7 maven modules which so far compiled fine, but today I introduced a feature, whereby I acc...

21 Mar at 21:0

Which command do I use to generate the build of a Vue app?

What should I do after developing a app with `vue-cli`? In there was some command that bundle all the scripts into one single script. Is there something the same in ?

5 Sep at 08:19

How to get IOptions in ConfigureServices method?

I have asp.net core application. I want to use `IOptions` pattern to inject values from appsettings.json. So I have a class `SecurityHeaderOptions`, and also have target class `SecurityHeadersBuilder`...

Error CS1056: Unexpected character '$' running the msbuild on a tfs continuous integration process

I have a project that the framework is targeting `.NET Framework 4.6.1`, as part of the continuous integration process on the tfs we created a Build Solution task to ensure that the code compiles corr...

Bind query parameters to a model in ASP.NET Core

I am trying to use model binding from query parameters to an object for searching. My search object is ``` [DataContract] public class Criteria { [DataMember(Name = "first_name")] public string...

How to encapsulate .NET Stateless state machine

I have a project where there is a mostly linear workflow. I'm attempting to use the .NET Stateless [library](https://github.com/dotnet-state-machine/stateless) to act as workflow engine/state machine...

21 Mar at 13:51

Is it safe to use a static `Serilog.ILogger`

I am using [Serilog](https://serilog.net/). I want to write log entries with a `SourceContext` of the containing class. Is it safe (including thread safe) to do this: ``` using Serilog; ... class ...

21 Mar at 13:50

convert:not authorized `aaaa` @ error/constitute.c/ReadImage/453

I want to create a captcha pic by use `convert` from ImageMagick. And I follow [this](http://www.grant-trebbin.com/2014/02/generating-captcha-from-linux-command.html), but there are some problem . I...

11 Oct at 11:33

How to return multiple values in C# 7?

Is it is possible to return multiple values from a method natively?

12 Aug at 14:11

ServiceStack.Net: Difference between IRedisNativeClient.Eval and EvalCommand

i am new to the ServiceStack.Net Framework and I would like to understand the differences between the following methods: ``` public byte[][] Eval(string luaBody, int numberKeysInArgs, params byte[][]...

21 Mar at 11:39

Convert list to params C#

I have this following list: ``` var myList = new List<KeyValuePair<string, object>>(); ``` And this function: ``` public void Test(params KeyValuePair<string, object>[] list) ``` How can I do a ...

21 Mar at 09:50

Custom TFS Check-In Policy in Visual Studio 2017

A while ago I developed a custom TFS check-in policy that was . Now I installed Visual Studio 2017 and wanted to register the check-in policy assembly the same way as I did with VS2015 before. But thi...

What’s the purpose of the HTML "nonce" attribute for script and style elements?

W3C says there is a new attribute in HTML5.1 called `nonce` for `style` and `script` that can be used by the Content Security Policy of a website. I googled about it but finally didn't get it what ac...