Questions

Git refusing to merge unrelated histories on rebase

During `git rebase origin/development` the following error message is shown from Git: ``` fatal: refusing to merge unrelated histories Error redoing merge 1234deadbeef1234deadbeef ``` My Git versio...

5 Jun at 11:27

Flags and << operation on enums? C#

Ok so I am new to C#, and for the life of me I cannot comprehend what exactly the below code (from a legacy project) is supposed to do: ``` [Flags] public enum EAccountStatus { None = 0, Free...

21 Jun at 05:55

ListView Creator called but no other methods

This is my first time working with a ListView and I have had some trouble. I am sure I have a technique implemented incorrectly. However, after much searching on the internet and watching tutorials on...

21 Jun at 05:15

How to use npm with ASP.NET Core

I'm using npm to manage the jQuery, Bootstrap, Font Awesome and similar client libraries I need for my ASP.NET Core application. The approach that worked for me started by adding a package.json file ...

22 Jun at 02:22

Should I implement IDisposable when class has IDisposable member but no unmanaged resources?

The MSDN documentation and many answers here on StackOverflow go to lengths to disucss correctly implementing `IDisposable`, e.g. [MSDN IDisposable](https://msdn.microsoft.com/en-us/library/system.idi...

23 May at 12:0

How to capture window contents of a Windows Store App in C#

I have a bit of code to capture windows desktop app contents and save to a Bitmap object in .NET. It uses User32.dll and Gdi32.dll (BitBlt) and works just fine. However, the code produces all-black bi...

28 Jun at 20:49

How to use a jQuery plugin inside Vue

I'm building a web application inside VueJS but I encounter a problem. I want to use a jQuery extension (cropit to be specific) but I don't know how to instantiate/require/import it the right way with...

21 Dec at 23:12

HttpClient single instance with different authentication headers

Given that the .net HttpClient has been designed with reuse in mind and is intended to be [long lived](http://chimera.labs.oreilly.com/books/1234000001708/ch14.html) and [memory leaks have been report...

Can ServiceStack run on .net core on Linux?

The documentation about Linux hosting only mentions mono. Can the new .net core and asp.net core (DNX) also be used?

21 Jun at 08:38

<img>: Unsafe value used in a resource URL context

Since upgrading to the latest Angular 2 release candidate, my `img` tags: ``` <img class='photo-img' [hidden]="!showPhoto1" src='{{theMediaItem.photoURL1}}'> ``` are throwing a browser error: > OR...

7 Oct at 16:59

In WPF, how to shift a window onto the screen if it is off the screen?

If I have a window, how can I ensure that the window will never be hidden off the screen? This is important, because sometimes if the user adds or removes a monitor, the window may be permanently hidd...

5 May at 17:47

how to specify new environment location for conda create

the default location for packages is .conda folder in my home directory. however, on the server I am using, there is a very strict limit of how much space I can use, which basically avoids me from put...

20 Jun at 16:0

A call to SSPI failed, see inner exception - The Local Security Authority cannot be contacted

I have an WPF app, which uses SSLStream to connect to server and send/receive some messages. My code is largerly based on this example (SslTcpClient): [https://msdn.microsoft.com/en-us/library/system....

C# ServiceStack JsonSerializer Deserialize

How can I deserialize a string to Json object where the json Object can be a single or an array, right now I have this, which works but its a hack (pseudo): ``` class MyObject{ public string prop1 ...

20 Jun at 14:45

How to use jquery in ASP.​NET Core

I created a ASP.NET core template and wrote a jquery script. When I look at the page I see that jquery is loaded into the page, but the script doesn’t run. I looked at the ASP.NET docs page and my lay...

how to set start value as "0" in chartjs?

here is my code. i need to set initial value as "0" in both x and y axis scales. I have tried latest version scales option. ``` graphOptions = { ///Boolean - Whether gr...

20 Jun at 13:17

Middleware to set response ContentType

In our ASP.NET Core based web application, we want the following: certain requested file types should get custom ContentType's in response. E.g. `.map` should map to `application/json`. In "full" ASP....

Expression-bodied method: Return nothing

I was updating one of our projects to C# 6.0 when I found a method that was literally doing nothing: ``` private void SomeMethod() { return; } ``` Now I was wondering if there is any possibility ...

20 Jun at 09:12

C#: ModernHttpClient, You're referencing the Portable version in your App - you need to reference the platform (iOS/Android) version

I'm using ModernHttpClient library and I'm to trying to get the Cookies from the httpClient's response ``` public static async Task<String> loginUser() { var values = new List<KeyValuePair<string...

8 Sep at 10:50

Newtonsoft JSON dynamic property name

Is there a way to change name of Data property during serialization, so I can reuse this class in my WEB Api. For an example, if i am returning paged list of users, Data property should be serialized...

21 Jun at 09:31

Why was the name 'let' chosen for block-scoped variable declarations in JavaScript?

I understand why `var` takes that name - it is variable, `const` - it is a constant, but what is the meaning behind the name for `let`, which scopes to the current block? Let it be?

10 Jan at 03:48

Kotlin's List missing "add", "remove", Map missing "put", etc?

In Java we could do the following ``` public class TempClass { List<Integer> myList = null; void doSomething() { myList = new ArrayList<>(); myList.add(10); myList.rem...

15 Sep at 21:44

Is this a possible bug in .Net Native compilation and optimization?

I discovered an issue with (what might be) over-optimization in `.Net Native` and `structs`. I'm not sure if the compiler is too aggressive, or I'm too blind to see what I've done wrong. To reproduc...

As of today, what is the right way to work with COM objects?

This is a very common question and I decided to ask it because this question may have a different answer as of today. Hopefully, the answers will help to understand what is the right way to work with ...

3 Jul at 12:40

How can I view the Git history in Visual Studio Code?

I can execute various Git commands from Visual Studio Code, however I couldn't find a way to visualize the history.