Newtonsoft.Json customize date serialization

I am using `Newtonsoft.Json` for serializing my dates from C# to JSON. What I want to do is have the json serializer use the current culture for formatting dates into string. Here is what I am getting...

23 Feb at 06:50

ServiceStack v4.0.60 does not have IRedisClientFactory

After upgrading ServiceStack from version 4.0.23 to 4.0.60 I got following error: > The type or namespace name 'IRedisClientFactory' could not be found I searched release notes for 2015 and 2016 and...

8 Jul at 20:49

Impersonate user in Windows Service

I am trying to impersonate a domain user in a windows service with the service logged in as the Local System Account. So far, I am only able to get this to work by logging the service and set the pro...

The type 'IEnumerable<>' is defined in an assembly that is not referenced

I have added the following nuget package to my MVC 5 application X.PagedList.Mvc I return the results in my controller/view as follows: ``` // Repo public IPagedList<Post> GetPagedPosts(int pageNum...

8 Jul at 21:4

Chart.js axes label font size

In chart.js how can I set the set the font size for just the x axis labels without touching global config? I've already tried setting the 'scaleFontSize' option my options object. I've also tried set...

8 Jul at 17:33

CS0103 C# The name 'Json' does not exist in the current context

Well, I have written JsonResult funtion. But i get the following error: > CS0103 C# The name 'Json' does not exist in the current context I cant find solution to it... plzz help? ``` public JsonRe...

8 Jul at 23:5

Experimental decorators warning in TypeScript compilation

I receive the warning... > Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option `to remove this warning. ... even t...

System.ObjectModel Warning Xamarin does not run on Android

We are running the 'Welcome to Xamarin` example on Visual Studio Enterprise, using the latest Xamarin, in a Windows 8.1 environment. We are managing to build and run on both Windows and Apple, but we...

Could not load file or assembly tools\EntityFramework .PowerShell.Utility.dll'

When try to Install Entity Framework 6.1.3 From Package Manager console. I get following output. ``` Install-Package EntityFramework Attempting to gather dependency information for package 'EntityFr...

Check if a value is in an array or not with Excel VBA

I've got some code below, that is supposed to be checking if a value is in an Array or not. ``` Sub test() vars1 = Array("Examples") vars2 = Array("Example") If IsInArray(Range("A1").Valu...

8 Oct at 09:23

ServiceStack Redis client : remove all objects

I want to remove all objects that are stored in Redis via the ServiceStack Redis client. I tried to use the Remove method with "*" as a key but it is not ok. Thanks.

8 Jul at 13:17

Is there a shorthand way to return values that might be null?

How can I write a shorthand of the following scenario? ``` get { if (_rows == null) { _rows = new List<Row>(); } return _rows; } ```

How to implement a custom ResponseStatus using ServiceStack in combination with a custom REST Api

I've been using the new ServiceStack API like this: ``` [Route("/me/login/")] public class LoginRequest : IReturn<LoginResponse> { public string password { get; internal set; } public string ...

8 Jul at 09:15

Azure AD API request 401 Unauthorized

I have a standard Web API running on an Azure website with Azure AD authentication enabled, when browsing to the API in a browser I am able to login via the browser and gain access to the API. The W...

Ninject in .NET Core

I am trying to install Ninject 3.3.2 in .NET Core, Released in May 2016. I got an error: The dependency Ninject 3.2.2 does not support framework .NETCoreApp, Version=v1.0. Does anybody had similar pr...

8 Jul at 12:12

Can C# nameof operator reference instance property without instance?

I regularly want to get the name of an instance property of a type, when I have no instance. Currently to do this, I use the following inhouse function which interprets the `Expression[Func[T, object]...

8 Jul at 07:23

Trying to pull files from my Github repository: "refusing to merge unrelated histories"

I'm learning git, and I'm following the Git community book. Previously (long time ago) I made a public repository on Github, with some files. Now I set up a local Git repository on my current comput...

7 Jul at 21:33

c# service: how to get user profile folder path

I need to get the user directory from within a C# windows service like: C:\Users\myusername\ Ideally, I'd like to have the roaming path like: C:\Users\myusername\AppData\Roaming\ When I used the...

7 May at 07:20

Moment.js - How to convert date string into date?

Following up from my previous post: [Javascript Safari: new Date() with strings returns invalid date when typed](https://stackoverflow.com/questions/38154441/javascript-safari-new-date-with-strings-re...

6 Jun at 19:38

Docker & Postgres: Failed to bind tcp 0.0.0.0:5432 address already in use

## Problem I'm trying to start postgres in a docker container on my Mac, but I keep getting the following error message > docker: Error response from daemon: driver failed programming external conn...

20 Jun at 09:12

Web API optional parameters

I have a controller with the following signature: ``` [Route("products/filter/{apc=apc}/{xpc=xpc}/{sku=sku}")] public IHttpActionResult Get(string apc, string xpc, int? sku) { ... } ``` I call this...

How to get time (hour, minute, second) in Swift 3 using NSDate?

How can you determine the hour, minute and second from NSDate class in Swift 3? In Swift 2: ``` let date = NSDate() let calendar = NSCalendar.currentCalendar() let components = calendar.components(....

1 Oct at 19:52

firebase.database is not a function

I am trying to upgrade from earlier firebase version to the latest in my [ionic project](http://ionicframework.com/). I followed [this](https://firebase.google.com/support/guides/firebase-web) tutoria...

NuGet Package Manager: 'AutoMapper' already has a dependency defined for 'Microsoft.CSharp'

I'm trying to add AutoMapper as a dependency to a project using NuGet on Visual Studio Premium 2012, but it fails. It says: > Operation failed 'AutoMapper' already has a dependency defined for ...

Using Razor outside of MVC in .NET Core

I would like to use Razor as a templating engine in a .NET console application that I'm writing in .NET Core. The standalone Razor engines I've come across (RazorEngine, RazorTemplates) all require f...

7 Jul at 19:5