What exceptions should be thrown for invalid or unexpected parameters in .NET?
What types of exceptions should be thrown for invalid or unexpected parameters in .NET? When would I choose one instead of another? ## Follow-up: Which exception would you use if you have a func...
What's the difference between an object initializer and a constructor?
What are the differences between the two and when would you use an "object initializer" over a "constructor" and vice-versa? I'm working with C#, if that matters. Also, is the object initializer met...
- Modified
- 31 May at 05:53
C# DLL config file
Im trying to add an app.config file to my DLL, but all attempts have failed. According to MusicGenesis in '[Putting configuration information in a DLL](https://stackoverflow.com/questions/161763/put...
- Modified
- 23 May at 12:26
How can I run a program from a batch file without leaving the console open after the program starts?
For the moment my batch file look like this: ``` myprogram.exe param1 ``` The program starts but the DOS Window remains open. How can I close it?
- Modified
- 4 May at 11:5
Tips for using Vim as a Java IDE?
I'm addicted to Vim, it's now my de facto way of editing text files. Being that it's mainly a text editor and not an IDE, has anyone got tricks for me to make it easier when developing Java apps? So...
How can I use an array of function pointers?
How should I use array of function pointers in C? How can I initialize them?
- Modified
- 21 May at 21:43
How do I create a copy of an object in PHP?
It appears that in PHP objects are passed by reference. Even assignment operators do not appear to be creating a copy of the Object. Here's a simple, contrived proof: ``` <?php class A { public...
- Modified
- 12 Jul at 07:52
Delete all but the most recent X files in bash
Is there a simple way, in a pretty standard UNIX environment with bash, to run a command to delete all but the most recent X files from a directory? To give a bit more of a concrete example, imagine ...
Execute script after specific delay using JavaScript
Is there any JavaScript method similar to the jQuery `delay()` or `wait()` (to delay the execution of a script for a specific amount of time)?
- Modified
- 12 Jan at 03:22
ASP.NET Core 6 how to access Configuration during startup
In earlier versions, we had Startup.cs class and we get configuration object as follows in the file. ``` public class Startup { private readonly IHostEnvironment environment; private readonl...
- Modified
- 26 Nov at 09:56
docker.errors.DockerException: Error while fetching server API version
I want to install this module but there is something wrong when I try the step `docker-compose build ...` I tried to update the Docker version and restart Docker many times. But it didn't work. ``` gi...
- Modified
- 8 Feb at 01:48
Sort a list of objects in Flutter (Dart) by property value
How to sort a list of objects by the alphabetical order of one of its properties (Not the name but the actual value the property holds)?
Cannot resolve scoped service from root provider .Net Core 2
When I try to run my app I get the error ``` InvalidOperationException: Cannot resolve 'API.Domain.Data.Repositories.IEmailRepository' from root provider because it requires scoped service 'API.Doma...
- Modified
- 3 Feb at 00:41
forEach() in React JSX does not output any HTML
I have a object that I want to output via React: ``` question = { text: "Is this a good question?", answers: [ "Yes", "No", "I don't know" ] } ``` and my react compon...
- Modified
- 26 Feb at 13:34
Sharing secret across namespaces
Is there a way to share secrets across namespaces in Kubernetes? My use case is: I have the same private registry for all my namespaces and I want to avoid creating the same secret for each.
- Modified
- 9 Jun at 06:34
Await is a reserved word error inside async function
I am struggling to figure out the issue with the following syntax: ``` export const sendVerificationEmail = async () => (dispatch) => { try { dispatch({ type: EMAIL_FETCHING, payload: tru...
- Modified
- 17 Jul at 10:25
NSPhotoLibraryUsageDescription key must be present in Info.plist to use camera roll
Recently I started to get this error: > NSPhotoLibraryUsageDescription key must be present in Info.plist to use camera roll. I am using React Native to build my app (I am not familiar with ios na...
- Modified
- 18 Nov at 10:42
CUSTOM_ELEMENTS_SCHEMA added to NgModule.schemas still showing Error
I just upgraded from Angular 2 rc4 to rc6 and having troubles doing so. I see the following error on my console: ``` Unhandled Promise rejection: Template parse errors: 'cl-header' is not a known ...
- Modified
- 13 Oct at 16:14
git ignore .env files not working
I have a laravel project. In the root directory are these 4 files: > .env .env.example .env.local .env.staging I have a .gitignore file, and I'm listing these 4 files in the .gitignore, one after an...
Is Google Play Store supported in avd emulators?
After googling quite a bit I am unable to find the answer to this question. Is google play store officially support in avd emulators. I know it was once stopped , then I hear that it was brought bac...
- Modified
- 25 Dec at 03:35
Cannot redeclare block scoped variable
I'm building a node app, and inside each file in .js used to doing this to require in various packages. ``` let co = require("co"); ``` But getting [](https://i.stack.imgur.com/Dgrz2.png) etc. S...
- Modified
- 19 Apr at 23:9
Javascript ES6 export const vs export let
Let's say I have a variable that I want to export. What's the difference between ``` export const a = 1; ``` vs ``` export let a = 1; ``` I understand the difference between `const` and `let`, b...
- Modified
- 2 Sep at 09:9
Change tab bar item selected color in a storyboard
I want to change my tab bar items to be pink when selected instead of the default blue. How can i accomplish this using the storyboard editor in Xcode 6? Here are my current setting which are not wo...
- Modified
- 13 Jun at 11:31
How to convert an ISO date to the date format yyyy-mm-dd?
How can I get a date having the format yyyy-mm-dd from an [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) date? My 8601 date is ``` 2013-03-10T02:00:00Z ``` How can I get the following? ``` 2...
- Modified
- 16 Jun at 12:21