Python AttributeError: 'dict' object has no attribute 'append'
I am creating a loop in order to append continuously values from user input to a dictionary but i am getting this error: ``` AttributeError: 'dict' object has no attribute 'append' ``` This is my ...
- Modified
- 12 Jan at 22:0
Servicestack 4.5.4 AutoBatch requests failed validation
We are writing an api that imports data from a spreadsheet. We have a create endpoint that we are using the Auto Batched feature, because we want to make one call from the UI rather than one call per ...
- Modified
- 12 Jan at 17:58
ORMLite error on insert with autoincrement key
I have the following `MVC 5` `Model`: ``` [Schema("dbo")] [Alias("map")] public class Map { [PrimaryKey] [Alias("id")] public int Id { get; set; } [Alias("name")] public String N...
- Modified
- 13 Jan at 18:40
Difference between private protected and internal protected
C# 7.2 introduced the `private protected` modifier, whats the difference to `internal protected`? From the doc: > A private protected member is accessible by types derived from the containing class,...
- Modified
- 12 Jan at 13:33
document.getElementById replacement in angular4 / typescript?
I'm working with angular4 in my practice work, and this is new for me. In order to get HTML elements and their values, I used `<HTMLInputElement> document.getElementById` or `<HTMLSelectElement> docum...
- Modified
- 7 May at 21:1
The entity type requires a primary key to be defined
I'm writing an ASP.NET Web API right now and everything works just fine for 2 controllers. Now I try to do exactly the same as before but this time I get a weird error: > System.InvalidOperationExce...
- Modified
- 31 Oct at 20:55
Cannot Change Target Framework?
I came across this problem this morning that I can't change the target framework of an open source project. The Target framework option drop down is inactive/disabled. How to make it to work with .NET...
- Modified
- 20 Jan at 02:41
.NET Standard 2.0 cannot be referenced in .NET Framework 2.0
I received an error: 'c:......\xxxx.csproj' targets '.NETStandard,Version=v2.0'. It cannot be referenced by a project that targets '.NETFramework,Version=v2.0'. WindowsFormsApp1 How to...
- Modified
- 12 Jan at 04:0
Exclude property from type
I'd like to exclude a single property from the type. How can I do that? For example I have ``` interface XYZ { x: number; y: number; z: number; } ``` And I want to exclude property `z` to get `...
- Modified
- 6 Dec at 09:7
ServiceStack, LeftJoin query
I have this SQL code, and I want this converted to ormlite - but I don't know how to do this the best way. ``` SELECT * FROM Job INNER JOIN Emp ON Job.JobAnsvarID = Emp.EmpId LEFT JOIN (SELECT JobI...
- Modified
- 13 Jan at 20:26
Set the precision for Decimal numbers in C#
Is it possible to change the precision for Decimal numbers in C# globally ? In TypeScript I am using the framework [Decimal.js](https://github.com/MikeMcl/decimal.js/), where I can change the precisi...
Import functions from another js file. Javascript
I have a question about including a file in javascript. I have a very simple example: ``` --> index.html --> models --> course.js --> student.js ``` course.js: ``` function Course() ...
- Modified
- 11 Oct at 09:7
Swagger default value for parameter
How do I define default value for property in swagger generated from following API? ``` public class SearchQuery { public string OrderBy { get; set; } [DefaultValue(OrderDirection.De...
- Modified
- 23 Aug at 17:51
How to update/refresh overlays in GMap?
I have this problem: I have a list of points `List<PointLatLng>` and an overlay where a trajectory of the points is shown. I also use `TabPages` and inside one page there is the `gMapcontrol`. Unfort...
Getting an Unauthorized error(401) from vuforia server
I am trying to implement in C# code. I am getting an error from the server. C# Code: ``` ASCIIEncoding Encoding = new ASCIIEncoding(); MD5 md5 = MD5.Create(); string requestPath = "/targets"; str...
- Modified
- 11 Jan at 07:16
Package 'EntityFramework 6.2.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'
I have made .net core 2.0 web app. I have added Entity Framework 6.2.0 using NUGET and then I get this error > Package 'EntityFramework 6.2.0' was restored using '.NETFramework,Version=v4.6.1' instea...
- Modified
- 11 Jan at 06:35
MSB6003 The specified task executable "sgen.exe" could not be run. The filename or extension is too long
Running VS 2017 15.5.3 on windows 10. Getting this generic error "The specified task executable "sgen.exe" could not be run. The filename or extension is too long" When building project in Release co...
- Modified
- 11 Jan at 03:56
C# Verbatim String Line Breaks: CRLF, CR, or LF?
I ran into an interesting problem today where my tests were failing consistently on the build machine when they worked just fine on my machine even using the same configuration. When I looked at the ...
- Modified
- 10 Jan at 22:2
Why isn't Serilog writing Debug messages even when the level is set to Debug?
I wrote the following line to create my logger in a C#/WPF application, but the Debug messages do not show up in the logs. What am I missing? I am using serilog.sinks.file version 4.0.0. The releas...
Generate and Sign Certificate Request using pure .net Framework
I am trying to use pure .net code to create a certificate request and create a certificate from the certificate request against an existing CA certificate I have available (either in the Windows Certi...
- Modified
- 23 Dec at 19:27
How to filter NUnit tests by category using "dotnet test"
I have a project that has a ``` [TestFixture, Category("Oracle")] ``` and a ``` [TestFixture, Category("OracleOdbc")] ``` with a couple of tests which I would like to execute using `dotnet test...
- Modified
- 23 Jan at 16:2
Systemd with multiple execStart
Is it possible to create service with the same script started with different input parameters? Example: ``` [Unit] Description=script description [Service] Type=simple ExecStart=/script.py parameters...
How to get actual request execution time
Given the following middleware: ``` public class RequestDurationMiddleware { private readonly RequestDelegate _next; private readonly ILogger<RequestDurationMiddleware> _logger; public R...
- Modified
- 11 Jan at 13:44
How to get default value of auto property in C# using reflection?
I have this class: How do I get the "Auto-Property Initializer" value `5` using reflection? I am trying to avoid creating an instance of MyClass. It seems un-necessary.
- Modified
- 6 May at 06:11
Mocking a SignInManager
New to unit testing with Moq and xUnit. I am trying to mock a `SignInManager` that is used in a controller constructor to build a unit test. The documentation that I can find for the `SignInManager` c...
- Modified
- 10 Jan at 18:14