.net core 2.0 logging inside Kubernetes pod console
I wrote few web APIs in .net core 2.0 and deployed it using a docker container inside a Kubernetes cluster. I am using the below logging configuration but can't see any logs inside the Kubernetes pod ...
- Modified
- 9 Jul at 16:41
how to update npm on macOS
For reasons unknown to me, I haven't been able to update to the latest version of npm on macOS (it works fine on Windows). Using Node.js 8.11.1 ``` node -v v8.11.1 ``` What version of npm do I ha...
Why is IIS Worker Process locking a file?
My website is setup in the `D:\RW_System\RW_Webroot\BrokerOffice.Admin` folder (screenshot below). It's a .NET, C# WebForms application. For whatever reason, when I want to deploy changes to the s...
- Modified
- 4 Apr at 21:43
If two WiFi networks exist with similar SSIDs, how can you distinguish between the two in code?
I'm writing a small network management tool. In order to pull out the details for various WiFi networks, I'm making calls to the `wlanapi.dll, WlanGetProfile(...)` API method to get the profile infor...
- Modified
- 6 Apr at 19:0
Cannot compile simple dynamic code after migration on .netstandard 2.0 (CodeDom throws System.PlatformNotSupportedException)
Trying to compile this sample of code: ``` var c = new CSharpCodeProvider(); var cp = new CompilerParameters(); var className = $"CodeEvaler_{Guid.NewGuid().ToString("N")}"; // doesn't work with or w...
- Modified
- 4 Apr at 15:55
Spring Security 5 : There is no PasswordEncoder mapped for the id "null"
I am migrating from Spring Boot 1.4.9 to Spring Boot 2.0 and also to Spring Security 5 and I am trying to do authenticate via OAuth 2. But I am getting this error: > java.lang.IllegalArgumentExcepti...
- Modified
- 5 Apr at 09:7
Span<T> does not require local variable assignment. Is that a feature?
I notice that the following will compile and execute even though the local variables are not initialized. Is this a feature of Span? ``` void Uninitialized() { Span<char> s1; var l1 = s1.Length; ...
- Modified
- 4 Apr at 14:5
ImageGalleryControl not triggering
I'm attempting to download an image in bytes from a server, but the image won't display. I get a proper byte array and resize it. It works adding picture from the camera but doesn't work when adding t...
- Modified
- 11 Apr at 16:13
Deconstruct tuple for pattern matching
Given a function `async Task<(Boolean result, MyObject value)> TryGetAsync()`, I can do ``` if((await TryGetAsync()) is var ret && ret.result) { //use ret.value } ``` But if I try to use declar...
- Modified
- 4 Apr at 09:8
Deserialize JSON to 2 different models
Does Newtonsoft.JSON library have a simple way I can automatically deserialize JSON into 2 different Models/classes? For example I get the JSON: ``` [{ "guardian_id": "1453", "guardian_name": "F...
The command "npm run build -- --prod" exited with code 1 error
I'm developing an Asp.Net Core 2 and Angular 5 project in visual studio 2017. When I'm going to publish my project then the error '' show in error list window. I created the project with [Angular C...
- Modified
- 4 Apr at 05:37
Missing compiler required member 'microsoft.csharp.runtimebinder.binder.convert'
I first time using Excel to reading data in c# with Selenium WebDriver, but when I build this code, it pops up an error: > "Missing compiler required member 'microsoft.csharp.runtimebinder.binder.con...
Why doesn't the C# compiler throw for logical comparisons of null?
I was eating lunch with a friend yesterday and they were complaining about `null` in C#. He stated that `null` was illogical. I decided to test his claims, so I tested some simple logical propositions...
How to use ValueGeneratedOnUpdate() correctly?
I'm using with a and want to set on-update a time stamp in one column automatically. I already use `ValueGeneratedOnAdd` without any issues. When I insert a new record into my database the `InsertDa...
- Modified
- 3 Apr at 16:19
Unable to get the global Keyboard and Mouse Hook events
I am using the global keyboard and mouse hook for tacking the keyboard and mouse activity. I am facing the issue like when user uses team viewer or Remote desktop (connects to remote machine) then we ...
- Modified
- 4 Apr at 07:26
Local Functions in C# - to capture or not to capture when passing parameters down?
When using [Local Functions](https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/local-functions) in C# 7 you have two options when you want to pass parameters (or ot...
What happens to the previous "new" operator?
``` DispatcherTimer dt = new DispatcherTimer(); dt.Interval = new TimeSpan(0, 0, 0, 0, 100); dt.Tick += new EventHandler(dt_dt); ``` I have a question about the `new` keyword. I have a DispatcherTim...
- Modified
- 3 Apr at 18:54
Understanding "corrupted size vs. prev_size" glibc error
I have implemented a JNA bridge to FDK-AAC. Source code can be found in [here](https://github.com/sheinbergon/jna-aac-encoder) When bench-marking my code, I can get hundreds of successful runs on the...
What is the default encoding for source files in Visual Studio 2017?
It seems Visual Studio 2017 always saves new files as UTF8-BOM. It also seems this was not the case with earlier versions of Visual Studio, but I could not find any documentation. Also there has been ...
- Modified
- 7 Jan at 01:0
.NET Core Web API for Video Streaming from FileStream
I have found a bunch of examples that use objects not available to me within my application and don't seem to match up to my version of .NET Core web API. In essence I am working on a project that wil...
- Modified
- 7 May at 05:49
How to use lifecycle method getDerivedStateFromProps as opposed to componentWillReceiveProps
It looks like `componentWillReceiveProps` is going to be completely phased out in coming releases, in favor of a new lifecycle method `getDerivedStateFromProps`:[static getDerivedStateFromProps()](htt...
- Modified
- 17 Aug at 12:4
How can I export all functions from a file in JS?
I'm creating a unit converter, and I want to put all of the conversion functions into their own file. Using ES6 `export`, is there any way to export all of the functions in the file with their default...
- Modified
- 2 Apr at 18:33
Download Objects from S3 Bucket using c#
Im trying to download object from S3 bucket facing below issue Please check and correct where is the mistake. Below is my code 1. Get Temporary credentails: ``` main() { string path = "ht...
Runtime errors when using multiple versions of ServiceStack assemblies in a same solution
Following is the exact scenario in my application. - - ServiceStack.Interfaces.dll (4.5.4), ServiceStack.Text.dll (4.5.4), ServiceStack.Common.dll (4.5.4) - ServiceStack.Interfaces.dll (3.9.48)...
- Modified
- 2 Apr at 13:13
EF Core / DbContext > Map custom type as primary key
Using EF Core I'm trying to build a model for the follow entity. ``` public class Account { public AccountId AccountId { get; } public string Name { get; set; } private Account() ...
- Modified
- 2 Apr at 07:50