Specific JSON settings per controller on ASP.NET MVC 6

I need specific JSON settings per controller in my ASP.NET MVC 6 webApi. I found this sample that works (I hope !) for MVC 5 : [Force CamelCase on ASP.NET WebAPI Per Controller](https://stackoverflow...

Is FxCop Dead? Can it be used with VS2015?

I was browsing through Stack Overflow and Google for information about automatic coding style practice tools and found FxCop. But I haven't found recent articles from Microsoft about FxCop. So, I was...

11 Jul at 19:17

Settings plugin not working properly with DateTime property

I am using the [settings plugin](https://github.com/jamesmontemagno/Xamarin.Plugins/tree/master/Settings) and I have it working to store some booleans. Now I wanted to add managing a DateTime object. ...

20 Jun at 09:12

C# Char from Int used as String - the real equivalent of VB Chr()

I am trying to find a clear answer to my question and it is a duplicate of any other questions on the site. I have read many posts and related questions on this on SO and several other sites. For exa...

25 Feb at 00:26

How to call a REST web service API from JavaScript?

I have an HTML page with a button on it. When I click on that button, I need to call a REST Web Service API. I tried searching online everywhere. No clue whatsoever. Can someone give me a lead/Headsta...

6 Oct at 21:8

AutoQuery: join tables via a middle table and define which FK to join on

We started using ServiceStack AutoQuery recently. It's a nice feature and we really enjoyed it. We have a table structure like this (minified version to make it easy to read): ``` Salary [Id (PK), Ma...

Json.NET Custom JsonConverter with data types

I stumbled upon a service that outputs JSON in the following format: ``` { "Author": "me", "Version": "1.0.0", "data.Type1": { "Children": [ { "data.Ty...

2 May at 23:30

How to upgrade AWS CLI to the latest version?

I recently noticed that I am running an old version of AWS CLI that is lacking some functionality I need: ``` $aws --version aws-cli/1.2.9 Python/3.4.3 Linux/3.13.0-85-generic ``` How can I upgrade...

How to configure CORS in a Spring Boot + Spring Security application?

I use Spring Boot with Spring Security and Cors Support. If I execute following code ``` url = 'http://localhost:5000/api/token' xmlhttp = new XMLHttpRequest xmlhttp.onreadystatechange = -> if...

vue.js reference div id on v-on:click

Using `v-on:click` I'd like to set a variable with the id of the div in Vue.JS - how do I reference this? ``` <div id="foo" v-on:click="select">...</div> <script> new Vue({ el: '#app', ...

1 May at 15:7

How do I inject all implementations for a given service?

How do I inject a list of all of the registered implementations for a given service interface? ``` public class Thing { public Thing(IList<IService> services) { } } public class ServiceA ...

30 Jun at 15:7

How to get the dimensions of a tensor (in TensorFlow) at graph construction time?

I am trying an Op that is not behaving as expected. ``` graph = tf.Graph() with graph.as_default(): train_dataset = tf.placeholder(tf.int32, shape=[128, 2]) embeddings = tf.Variable( tf.rando...

WooCommerce: Finding the products in database

I'm creating a website using WooCommerce and I want to restrict the available products to users depending on the postcode that they enter in the search form on my home page. To be able to achieve th...

System.Speech.Recognition alternative matches and confidence values

I am using the `System.Speech.Recognition` namespace to recognize a spoken sentence. I am interested in the alternative sentences the recognizer provides, alongside with their confidence scores. From ...

10 May at 08:50

Visual Studio Code: Take Input From User

Currently, I'm trying to write C/C++ program in Visual Studio code. For this I've installed two extensions: [C/C++](https://blogs.msdn.microsoft.com/vcblog/2016/03/31/cc-extension-for-visual-studio-co...

1 May at 09:7

What's the difference between the new netstandardapp and netcoreapp TFMs?

I noticed that NuGet has recently added support for several new TFMs related to .NET Core, including: - `netstandard`- `netstandardapp`- `netcoreapp` To the best of my knowledge, `netstandard` is th...

Can I use ServiceStack routes with method parameters instead of a DTO class for every request?

I love the capability of ASP.NET MVC controllers, in terms of being able to add a route attribute that maps a certain part of the URL to a method parameter, i.e.: ``` [Route("there/are/{howManyDucks}...

1 May at 02:1

How to create a form in a pop-up using xamarin.forms?

I'm using Xamarin.forms and I need to have a login form in a popup view like in the following image: [](https://i.stack.imgur.com/zkS8X.png) Right now I'm using PushModalAsync, however this makes th...

Where should I put Database.EnsureCreated?

I have an Entity Framework Core + ASP.NET Core application and when my application starts up I want to ensure that the database is created, and eventually (once I have migrations) I want to ensure tha...

30 Apr at 17:58

SignalR 2.2 clients not receiving any messages

I have a self-hosted SignalR application running in the context of a console app. I'm connecting to the hubs within it through the use of a wrapper class to prevent me from having to reference the Sig...

2 May at 17:34

How to return history of validation loss in Keras

Using Anaconda Python 2.7 Windows 10. I am training a language model using the Keras exmaple: ``` print('Build model...') model = Sequential() model.add(GRU(512, return_sequences=True, input_shape=(...

Make video fit 100% with any screen resolution

I have a video with the following properties, Frame width: 1920 and Frame Height: 1080. I need its width and height to be 100% thus filling up the whole screen. And it needs to be responsive too. So f...

Set RabbitMq .outq as durable with ServiceStack

Our queues are automatically created when calling mqServer.CreateMessageQueueClient().Publish(). Recently we had an issue with a RabbitMq server going down and since ServiceStack does not create the o...

30 Apr at 00:29

How to generate range of numbers from 0 to n in ES2015 only?

I have always found the `range` function missing from JavaScript as it is available in python and others? Is there any concise way to generate range of numbers in ES2015 ? EDIT: MY question is differ...

17 Jun at 08:17

Validating an email string in .net using EmailAddressAttribute, but not on an attribute

I want to be able to do this: ``` string email = "some@email.com"; bool isValid = IsValidEmail(email); //returns true ``` ...but use the logic Microsoft has already given us in . There are hundred...

29 Apr at 22:39