How to achieve remove_if functionality in .NET ConcurrentDictionary
I have a scenario where I have to keep reference counted object for given key in the `ConcurrentDictionary`, if reference count reaches `0`, I want to delete the key. This has to be thread safe hence ...
- Modified
- 24 Sep at 19:54
Angular 2 Form "Cannot find control with path"
I try to make a dynamic form (so you can limitless add items to a list), but somehow the content of my list is not getting send because it can't find the control with path: > Cannot find control with ...
- Modified
- 22 Dec at 09:47
Average value of list
I want to make code that will on the first click start `rotorSpeed` stopwatch then on the second click add `rotorSpeed.ElapsedMilliseconds` to `list`. On the second click resets stopwatch and starts t...
Is ServiceStack ORMLite available for .NET Core
I saw some commits for ServiceStakck ORMLite for .NET Core specifically [this](https://github.com/ServiceStack/ServiceStack.OrmLite/commit/707e85a1558a8e049bed57e4cf62092e225260d9) Can we try it righ...
- Modified
- 25 Sep at 11:25
How to update TypeScript to latest version with npm?
Currently I have TypeScript 1.0.3.0 version installed on my machine. I want to update it to latest one i.e. 2.0. How to do this with npm?
- Modified
- 29 Aug at 14:51
How does String substring work in Swift
I've been updating some of my old code and answers with Swift 3 but when I got to Swift Strings and Indexing with substrings things got confusing. Specifically I was trying the following: ``` let s...
How does String.Index work in Swift
I've been updating some of my old code and answers with Swift 3 but when I got to Swift Strings and Indexing it has been a pain to understand things. Specifically I was trying the following: ``` le...
How to call a generic async method using reflection
``` public interface IBar { } public class Bar : IBar { } public class Bar2 : IBar { } public interface IFoo { Task<T> Get<T>(T o) where T : IBar; } public class Foo : IFoo { public async Task<T> ...
- Modified
- 24 Sep at 14:40
How to recursively populate a TreeView with JSON data
I have a winforms treeview, I can read data automatically, (a node that is equal to key, and a node inside that is equal to value), but when reading object type, the values inside it are not going to ...
- Modified
- 24 Sep at 11:10
How to use Apple's new .p8 certificate for APNs in firebase console
With the recent up gradation of the Apple developer accounts, I am facing a difficulty that while trying to create the push notification certificates, it is providing me with (.p8) certificate instead...
- Modified
- 1 Jun at 13:19
Compiler Error: "error CS0307: The variable 'int' cannot be used with type arguments"
If I have the following code: ``` private void Check(bool a, bool b) { } private void Check(int a, int b, int c, bool flag) { Check(a < b, a > (flag ? c : b - 10)); } ``` I get a compile-time ...
- Modified
- 23 Sep at 22:17
What TypeScript version is Visual Studio Code using? How to update it?
How can I tell what version of TypeScript is being used in Visual Studio Code? In particular, I had been using TypeScript 1.8.10 and VSCode 1.4.0. I first updated VSCode to the latest version, which...
- Modified
- 24 Sep at 16:49
How to deploy ASP.NET Core UserSecrets to production
I followed the [Safe storage of app secrets during development](https://docs.asp.net/en/latest/security/app-secrets.html) guide over on the asp.net docs during development but it does not describe how...
- Modified
- 11 May at 11:36
How to post string array using POSTMAN?
I am using Postman to send an array of string to a web API. The web API method looks like: ``` [HttpPost] public async Task<IEnumerable<DocumentDTO>> GetDocuments([FromBody]IEnumerable<string> docume...
- Modified
- 19 Mar at 19:26
How restart a stopped docker container
I launch a docker container from an image with the following command: ``` $ docker run -d myimage /bin/bash -c "mycommand" ``` When `"mycommand"` is finished, the container is stopped (I suppose it...
- Modified
- 21 Feb at 16:12
How do you send images to node js with Axios?
Is there a way to send an array of images (or a single image) to node using axios? The axios code I'm using(I'm using react js on the front end): ``` onFormSubmit(event){ event.preventDefault();...
- Modified
- 10 Apr at 07:22
pandas: extract date and time from timestamp
I have a `timestamp` column where the timestamp is in the following format ``` 2016-06-16T21:35:17.098+01:00 ``` I want to extract date and time from it. I have done the following: ``` import date...
- Modified
- 7 Jun at 06:35
Error CS1703: Multiple assemblies with equivalent identity have been imported - Xamarin + VSTS
I upgraded to the latest Xamarin for Visual Studio 2015 (Community Edition), recompiled my projects, checked in a few small code changes and my VSTS build server fails with this error message: > [err...
- Modified
- 23 Sep at 12:5
How to inherit from an abstract base class written in C#
I’m trying to inherit from an abstract .NET base class in Python (2.7) using Python.NET (2.1.0). I’m a Python n00b but from what I understood… Here’s what I managed to do in Python only and which wor...
- Modified
- 23 Sep at 20:5
'T' does not contain a definition
Is it possible to do the following (If so I can't seem to get it working.. forgoing constraints for the moment)... If the type (because it's ommitted) is inferred, what's the problem? ``` private vo...
Roslyn Analyzer Rule does not fail the build
Following on from [this](https://msdn.microsoft.com/en-us/magazine/dn879356.aspx) tutorial from MS, I have created an analyzer for Roslyn. According to the page, you can mark the rule as `DiagnosticS...
- Modified
- 23 Sep at 10:1
How to handle async Start() errors in TopShelf
I have a TopShelf service that uses async code to connect to web services and other application servers. If it's unable to initialize its connections on startup, the service should log some errors an...
- Modified
- 23 May at 10:29
Entity Framework update/insert multiple entities
Just a bit of an outline of what i am trying to accomplish. We keep a local copy of a remote database (3rd party) within our application. To download the information we use an api. We currently downlo...
- Modified
- 23 Sep at 09:1
What happened to the .pull-left and .pull-right classes in Bootstrap 4?
In the newest version the pull-left and pull-right have been replaced by .pull-{xs,sm,md,lg,xl}-{left,right,none} That means that instead of writing a simple `class="pull-right"`, I will have now to ...
- Modified
- 6 Dec at 20:38