How do I include a JavaScript script file in Angular and call a function from that script?
I have a JavaScript file called `abc.js` that has a 'public' function called `xyz()`. I want to call that function in my Angular project. How do I do that?
- Modified
- 9 Aug at 17:47
ServiceStack JSON serializing to lower case on dotnet core?
I'm using ServiceStack to run a REST API and am running into issues serializing the response object. More specifically, when I call `JsonSerializer.SerializeToString(.)` on the response object all pro...
- Modified
- 29 Jun at 02:16
FluentAssertions: Assert Collection contains Element that "IsEquivalentTo"
I'm stuck with what I thought was an easy example. I want to assert that a collection of objects contains an object that is to a given object. like: `col.ShouldContainEquivalentTo(obj)` ``` var obje...
- Modified
- 28 Jun at 22:24
How Do I Manually Validate a JWT Asp.Net Core?
There are millions of guides out there, and none of them seem to do what I need. I am creating an Authentication Server, that simply just needs to issue, and validate/reissue tokens. So I can't create...
- Modified
- 30 Oct at 22:1
AutoMapper unable to cast TestDbAsyncEnumerable to IQueryable
I've implemented the TestDbAsync fakes from [https://msdn.microsoft.com/en-us/library/dn314429(v=vs.113).aspx](https://msdn.microsoft.com/en-us/library/dn314429(v=vs.113).aspx) and I want to be able t...
- Modified
- 28 Jun at 16:7
Configure Json.NET serialization settings on a class level
I want my class to be serialized and deserialized using camel case naming convention. I know I can use the `JsonConvert.SerializeObject(object, settings)` overload as stated [here](https://stackoverfl...
- Modified
- 5 May at 15:51
Can JsonServiceClient's OnUploadProgress be combined with .WithCache()?
In ServiceStack, you can create a JsonServiceClient and listen to the upload progress like this: ``` var client = new JsonServiceClient("http://api.example.org"); client.OnUploadProgress += (done, to...
- Modified
- 28 Jun at 10:0
Trouble understanding yield in C#
I'm hoping to get some clarification on a snippet that I've recently stepped through in the debugger, but simply cannot really understand. I'm taking a course on and the current topic is on `yield`...
- Modified
- 28 Jun at 09:42
generate swagger spec from servicestack api
I am using servicestack as REST framework. The swagger UI plugin is very help full for manual testing and debugging. Now I want to do more automatic testing, performance testing, with a tool like So...
- Modified
- 28 Jun at 08:41
How to set a background image in reactjs?
I have a reactjs/webpack app and trying to set a background image for the `body` tag: ``` body{ background: url("../images/some-background.jpg"); background-size:contain; background-positi...
- Modified
- 1 Jul at 15:34
Null-conditional operator and !=
With the introduction of [Null-Conditional Operators](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/null-conditional-operators) in C#, for the following evaluation, ```...
- Modified
- 28 Jun at 08:57
Cannot install Microsoft Power Bi Postgre SQL connector
I am trying to use Microsoft Power Bi to connect to a PostgreSQL database. When I go to it just says that 1. I have installed Microsoft Power Bi version: 2.47.4766.801 64-bit (June 2017). 2. I ha...
- Modified
- 18 Aug at 19:25
VS 17 breaking on all exceptions
Visual Studio 2017 is (kind of suddenly) breaking on exceptions. That means, if I deactivate them in the exceptions settings (pressing CTRL + ALT + E while debugging), the debugger still breaks on th...
- Modified
- 9 Sep at 16:47
Is there a better way to pass dynamic inputs in-line to a DataTestMethod? I.e. How to programmatically create test inputs for a data-driven test
I've been looking for this for years and years, and I think I've finally found a real way in "MSTest V2" (meaning the one that comes with .netcore, and is only really handled correctly in Visual Studi...
- Modified
- 27 Jun at 20:55
Scaffold new tables and keep the existed ones?
I've scaffolded a few tables in a C# project. Now I need to scaffold a new table. I don't want to re-scaffold the existed ones because there were some changes. ``` Scaffold-DbContext "Server=...;Dat...
- Modified
- 27 Jun at 20:54
c# convert datetime object to iso 8601 string
I'm trying to convert a DateTime object to a ISO8601 string but keep getting wrong results. I've looked around on stackoverflow, but couldn't find the right solution. I start with a date time strin...
Warning: Use the 'defaultValue' or 'value' props on <select> instead of setting 'selected' on <option>
A user has a dropdown and he selects an option. I want to display that dropdown and make that option a default value which was selected by that user last time. I am using attribute on option but Re...
net core web api json serialization - need fields prefixed with $
I'm using net core web api and need to return a payload with property name "$skip". I tried using the DataAnnotations: ``` public class ApiResponseMessage { [Display(Name ="$skip", ShortName = "$...
- Modified
- 27 Jun at 17:19
How can I delete all local Docker images?
I recently started using Docker and never realized that I should use `docker-compose down` instead of `ctrl-c` or `docker-compose stop` to get rid of my experiments. I now have a large number of unnee...
- Modified
- 31 Aug at 12:52
EF Core add-migration Build Failed
I have a developer that is getting "Build failed." when running add-migration in a .NET Core EF project, with no explanation of why the build failed. How do you troubleshoot this error? This is what ...
- Modified
- 9 Apr at 00:47
ServiceStack AutoQuery into custom DTO
So, I'm working with ServiceStack, and know my way around a bit with it. I've used AutoQuery and find it indispensable when calling for straight 'GET' messages. I'm having an issue though, and I hav...
- Modified
- 27 Jun at 16:28
Retrieving exceptions when ReplyTo is a temp queue
Our application uses temporary queues to direct service bus responses to the originating caller. We use the built-in `ServiceStack.RabbitMq.RabbitMqServer` to publish and handle messages. ``` Message...
- Modified
- 27 Jun at 13:50
Split batch of messages to be sent to Azure Service Bus
Let's say I have a collection `List<BrokeredMessage>` of messages that I want to batch-send to Azure Service Bus. The collection size is arbitrary, so the total size of all messages combined might b...
- Modified
- 27 Jun at 11:57
Enable both Windows authentication and Anonymous authentication in an ASP.NET Core app
I know that this has been asked many times before, but unfortunately not about ASP.NET Core web apps, just the classic ASP.NET web apps. All the answers i've found on the internet don't help me, becau...
- Modified
- 27 Jun at 14:41
Angular CLI - Please add a @NgModule annotation when using latest
I'm new to Angular, so please excuse any new comer stupidity here. - - - - - > compiler.es5.js:1689 Uncaught Error: Unexpected directive 'ProjectsListComponent' imported by the module 'Proje...
- Modified
- 20 Jan at 11:46