Why is code behavior different in release & debug mode?
Consider the following code: ``` private static void Main(string[] args) { var ar = new double[] { 100 }; FillTo(ref ar, 5); Console.WriteLine(string.Join(",", ar.Select(...
Is ConfigurationManager.AppSettings available in .NET Core 2.0?
I've got a method that reads settings from my config file like this: ``` var value = ConfigurationManager.AppSettings[key]; ``` It compiles fine when targeting .NET Standard 2.0 only. Now I need mult...
- Modified
- 1 Aug at 13:16
Exception : AAPT2 error: check logs for details
``` Task :processDebugResources Failed to execute aapt com.android.ide.common.process.ProcessException: Failed to execute aapt at com.android.builder.core.AndroidBuilder.processResources(AndroidBu...
- Modified
- 30 Jul at 08:48
Error message "CS5001 Program does not contain a static 'Main' method suitable for an entry point"
Unable to execute the following code error CS5001 Program does not contain a static 'Main' method suitable for an entry point What does this error message mean? ``` class Program { static asy...
- Modified
- 1 Dec at 09:2
how to use JwtAuthProvider in ServiceStack?
Could you please explain how to use JwtAuthProvider in ServiceStack authentication and consume the service in .net client?
- Modified
- 1 Dec at 06:43
C# ASP.NET Core Serilog add class name and method to log
I recently added logging to my ASP.Net Core project. Currently the log writes to a .txt file in this format: > {Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] {Message}{NewLine}{Exception} For exa...
- Modified
- 1 Dec at 10:19
addControl to FormGroup dynamically in Angular
How can I add a FormControl to a FormGroup dynamically in Angular? For example, I would like to add a mandatory control which name is "new" and its default value is ''.
- Modified
- 2 Mar at 11:53
Scale down Kubernetes pods
I am using `kubectl scale --replicas=0 -f deployment.yaml` to stop all my running pods. Please let me know if there are better ways to bring down all running pods to Zero keeping configuration, de...
- Modified
- 30 Nov at 11:38
OverrideAuthorization attribute in .NETCore
In the controller code below, only users who are in the "Administrator" role can access the `GetData()` action method, because of the controller-level `AuthorizeAttribute`. But I also want users who o...
- Modified
- 13 Nov at 15:51
To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. in Angular 4
I created a new project with angular-cli (`ng new my-project-name`) When I run `npm run test` it run without any failures. I added font-awsome module([https://www.npmjs.com/package/angular-font-awes...
- Modified
- 30 Nov at 05:55
Why is this loop intentionally not optimized?
[https://github.com/ASP-NET-MVC/aspnetwebstack/blob/master/src/System.Web.Helpers/Crypto.cs#L159](https://github.com/ASP-NET-MVC/aspnetwebstack/blob/master/src/System.Web.Helpers/Crypto.cs#L159) ``` ...
- Modified
- 30 Nov at 00:3
Property 'value' does not exist on type 'Readonly<{}>'
I need to create a form that will display something based on the return value of an API. I'm working with the following code: ``` class App extends React.Component { constructor(props) { super(...
- Modified
- 16 May at 18:5
How to create a menu in WPF that has Microsoft Web Application styling
We have been tasked with designing an enterprise application in WPF that will replace a battleship grey Winforms application with a modern look and feel. We like the look and feel that Microsoft web a...
Angular 5 Checking the value of a variable on and *ngIf statement
I am using angular 5 and I'm trying to check the value of a variable in the html template of the component. So it looks something like this: ``` <div *ngIf="item='somevalue'"> ``` I'm getting this er...
- Modified
- 14 Nov at 20:48
Set ApartmentState for async void main
I have a Windows Forms app. Now I want to use an `async` method. Since C# 7.1 I can use an `async Main` method: [https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-1](https://learn.m...
- Modified
- 29 Nov at 13:21
The type WebMvcConfigurerAdapter is deprecated
I just migrate to spring mvc version `5.0.1.RELEASE` but suddenly in eclipse STS WebMvcConfigurerAdapter is marked as deprecated ``` public class MvcConfig extends WebMvcConfigurerAdapter { @Overri...
- Modified
- 7 Mar at 10:22
WebSocketException (0x80004005): The remote party closed the WebSocket connection without completing the close handshake
I have a Xamarin app that communicates using WebSocket. On the client side, I am referencing the `ClientWebSocket`. code: ``` using (var client = new ClientWebSocket() { Options = { KeepAliveInterva...
- Modified
- 14 Feb at 07:21
When I run `npm install`, it returns with `ERR! code EINTEGRITY` (npm 5.3.0)
I am getting this error while running `sudo npm install`. On my server, npm was installed earlier. I've tried to delete the `package-lock.json` file, and ran `npm cache clean --force`, but it didn't w...
Regex match any single character (one character only)
How do you match any one character with a regular expression? A number of other questions on Stack Overflow sound like they promise a quick answer, but they are actually asking something more specific...
- Modified
- 2 Jul at 13:20
servicestack 4.5.14 & .Net Core 2.0
I was excited to read that the latest release version of ServiceStack (4.5.14) supports .Net Core 2.0 (see [release notes](http://docs.servicestack.net/releases/v4.5.14)). I tried adding ServiceStack...
- Modified
- 28 Nov at 19:13
Webpack: "there are multiple modules with names that only differ in casing" but modules referenced are identical
I'm using webpack 3.8.1 and am receiving several instances of the following build warning: ``` WARNING in ./src/Components/NavBar/MainMenuItemMobile.js There are multiple modules with names that onl...
- Modified
- 28 Nov at 14:42
How to extract table as text from the PDF using Python?
I have a PDF which contains Tables, text and some images. I want to extract the table wherever tables are there in the PDF. Right now am doing manually to find the Table from the page. From there I a...
- Modified
- 30 Sep at 06:58
aspnet core jwt token as get param
I'm working an an aspnet core 2 web api project, which main consumer is a vue web app. Api uses jwt tokens as authentication method, and everything works fine. Now i've put up all code to manage ima...
- Modified
- 28 Nov at 21:23
startForeground fail after upgrade to Android 8.1
After upgrading my phone to 8.1 Developer Preview my background service no longer starts up properly. In my long-running service I've implemented a `startForeground` method to start the ongoing notifi...
- Modified
- 23 Jul at 21:14
No module named 'tqdm'
I am running the following pixel recurrent neural network (RNN) code using Python 3.6 ``` import os import logging import numpy as np from tqdm import trange import tensorflow as tf from utils impo...
- Modified
- 28 Nov at 10:54