Design reasons behind making ToUpper a static method on Char

In C#, we have this non-static method on the type string: ``` "abc".ToUpper() ``` but for char, we need to use a static method: ``` char.ToUpper('a') ``` When introducing c# to beginners, they a...

24 Jul at 04:46

Docker Compose keep container running

I want to start a service with docker-compose and keep the container running so I can get its IP-address via 'docker inspect'. However, the container always exits right after starting up. I tried to ...

31 Dec at 12:13

Could pandas use column as index?

I have a spreadsheet like this: ``` Locality 2005 2006 2007 2008 2009 ABBOTSFORD 427000 448000 602500 600000 638500 ABERFELDIE 534000 600000 735000 710000 775000 AIREYS INLE...

18 Jul at 06:4

Bootstrap close modal not working

I have two button here that are being used to close the modal. The first is the close icon and the other one is cancel button, both use data-dismiss to close the modal. However, both of them are not w...

Why do explicit interface calls on generics always call the base implementation?

Why do explicit C# interface calls within a generic method that has an interface type constraint always call the base implementation? For example, consider the following code: ``` public interface I...

22 Jul at 22:15

Check if a file exists in jenkins pipeline

I am trying to run a block if a directory exists in my jenkins workspace and the pipeline step in workspace doesn't seem to work correctly. I'm using Jenkins v 1.642 and Pipeline v 2.1. and trying t...

23 Dec at 00:52

Set C# console application to Unicode output

I have a C# console application, and I was trying to do some ASCII art within it. However, some of the characters I wanted to use are Unicode. So, I was searching the internet/SO and couldn't find a c...

23 May at 11:47

Bad Dapper performance for parametrized queries

I was researching porting some of our EF6 code to Dapper for better performance when I ran into a weird issue. A single row query was taking **almost 10 times** as much in Dapper than it did in EF. It...

ASP.NET Core Entity Framework Core cannot find IndexAttribute

I receive the following from Visual Studio Code on my Mac, both in IDE and console window after executing "dotnet run": > The type or namespace name 'IndexAttribute' could not be found I have a class ...

Can ServiceStack parse similar routes?

I've got the following routes that i want defined in my app: ``` /s/customers/1234/summary ``` and ``` /s/locations/5767/summary ``` now normally i would define my route like so: ``` Add<Custom...

22 Jul at 15:58

ASP.NET Core 404 Error on IIS 10

I have a problem with ASP.NET Core web application running on IIS 10. I am developing a Single Page Application with AngularJS. The index.html loads perfectly but the backend requests are failing wit...

WPF ListBox vs ComboBox

I'm working on an application with C# and WPF, in which I need to bind to a dictionary and display key-value pairs. How are ListBoxes different from ComboBoxes, and what are some possible advantages/d...

23 May at 12:33

Namespaces for .NET JWT token validation: System vs. Microsoft

I am trying to use JWT to authenticate a Node application to an ASP.NET Web API. In ASP.NET, I am using .NET 4.5.1 and nuget package `System.IdentityModel.Tokens.Jwt` 5.0.0 What I don't understand i...

11 Aug at 21:49

Linux Command History with date and time

I wants to check on my linux system when which command was fired - at which date and time. I fired commands like this: ``` history 50 ``` It shows me the last 50 commands history, but not with dat...

22 Jul at 13:7

visual Unhandled exception in Debugger::HandleIPCEvent when breaking on certain breakpoint

I get the following exception (in Dutch, English translation follows in the text) which breaks my debugger when I press 'OK' it stops the debug session and closes the application: [](https://i.stack....

29 May at 15:20

error APPX3212: SDK root folder for 'Portable 7.0' cannot be located

I'm trying to build my solution using TeamCity / MSBuild. It's a WebAPI project which shares some entities in a PCL with a mobile client. I see there are a few caveats around getting the PCL refere...

Sequelize - update record, and return result

I am using sequelize with MySQL. For example if I do: ``` models.People.update({OwnerId: peopleInfo.newuser}, {where: {id: peopleInfo.scenario.id}}) .then(function (result) { ...

22 Jul at 11:8

Download a file with ServiceStack HttpResult: how to specify a file name for downloaded content?

I am using ServiceStack for a simple web application. The main purpose is to let a user download a file. I am using an HttpResult as follows: ``` public class FileDownloadService : Service { public ...

22 Jul at 11:6

How to unpack an .asar file?

I have packed my Electron application using the following command: ``` asar pack app app.asar ``` Now, I need to unpack it and get the whole code back. Is there any way to do so?

7 Aug at 00:28

How can I prevent bitwise OR combinations of enum values?

I know that you can use `FlagsAttribute` to instruct the compiler to use bitfields for an enumeration. Is there a way to specify that enum values cannot be combined with bitwise OR? Example: ``` en...

22 Jul at 16:34

Change Date Format(DD/MM/YYYY) in SQL SELECT Statement

The Original SQL Statement is: ``` SELECT SA.[RequestStartDate] as 'Service Start Date', SA.[RequestEndDate] as 'Service End Date', FROM (......)SA WHERE...... ``` The output date format ...

22 Jul at 08:10

Set a read only property defined in a interface within a concrete class

I have an interface with a read only property ``` public interface IPerson { string Name { get; } } ``` and a concrete class... ``` public class Person : IPerson { public Person() { ...

22 Jul at 07:38

Multiple relationships to the same table in EF7(Core)

I have such models ``` public class Question { public string Id { get; set; } = Guid.NewGuid().ToString(); public Answer Answer { get; set; } public List<Variant> Variants { get; set; } ...

22 Jul at 08:7

How to convert concurrentbag to list?

I have few task which I can do in parallel. As list is not thread safe i am using `concurrentbag`. Once all the task are completed I want to convert the `concurrentbag` to list. I have [searched in...

23 Jul at 10:25

How to use JQuery with ReactJS

I'm new to ReactJS. Previously I've used jQuery to set any animation or feature that I needed. But now I'm trying to use ReactJS and minimize the use of jQuery. I'm trying to build an accordion wit...

10 May at 20:37