Questions

Collection<T> versus List<T> what should you use on your interfaces?

The code looks like below: ``` namespace Test { public interface IMyClass { List<IMyClass> GetList(); } public class MyClass : IMyClass { public List<IMyClass> Ge...

7 Sep at 11:46

Getting the max value of an enum

How do you get the max value of an enum?

15 Oct at 00:59

How do ports work with IPv6?

Conventional IPv4 dotted quad notation separates the address from the port with a colon, as in this example of a webserver on the loopback interface: ``` 127.0.0.1:80 ``` but with IPv6 notation the...

14 Apr at 03:32

Best way to randomize an array with .NET

What is the best way to randomize an array of strings with .NET? My array contains about 500 strings and I'd like to create a new `Array` with the same strings but in a random order. Please include a...

24 Oct at 16:19

Tracking CPU and Memory usage per process

I suspect that one of my applications eats more CPU cycles than I want it to. The problem is - it happens in bursts, and just looking at the task manager doesn't help me as it shows immediate usage on...

1 Jun at 17:56

How do you manage databases in development, test, and production?

I've had a hard time trying to find good examples of how to manage database schemas and data between development, test, and production servers. Here's our setup. Each developer has a virtual machine ...

18 Oct at 13:56

Recommended Fonts for Programming?

What fonts do you use for programming, and for what language/IDE? I use [Consolas](http://www.microsoft.com/downloads/details.aspx?familyid=22e69ae4-7e40-4807-8a86-b3d36fab68d3&displaylang=en) for al...

2 Jan at 23:47

ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly

I'm trying to install scipy via pip on my 64 bit ARMV8 board. I have already installed openblas which is required by scipy. So, no issues with that. When i gave `pip3 install scipy --trusted-host pypi...

How to get build and version number of Flutter app

I am currently developing an application which is currently in beta mode. Due to this, I would like to show them what version they are on. For example, "v1.0b10 - iOS". So far, I have got this code: `...

7 Dec at 15:8

How can I accept all current changes in VSCode at once?

I tried to merge one file with another file, but there are many HEADs with Accept Current Change | Accept Incoming Change | ... Is there a way to accept all current changes at once?

3 Aug at 20:31

How to delete all resources from Kubernetes one time?

Include: - - - - - - - - - If has replicationcontroller, when delete some deployments they will regenerate. Is there a way to make kubenetes back to initialize status?

6 Nov at 02:7

keycloak Invalid parameter: redirect_uri

When I am trying to hit from my api to authenticate user from keycloak, but its giving me error Invalid parameter: redirect_uri on keycloak page. I have created my own realm apart from master. keycloa...

29 May at 09:12

How to display svg icons(.svg files) in UI using React Component?

I have seen a lot of libraries for svg on react but none gave me how to import an svg file in the react component. I have seen code which talk about bring the svg code into react rather than using the...

23 Aug at 07:10

Query LOCAL Bitcoin blockchain with C# .NET

I am trying to check the of a given Bitcoin address by using the locally stored blockchain (downloaded via Bitcoin Core). Something similar to this (by using NBitCoin and/or QBitNinja), but without ...

27 Dec at 18:10

Run react-native application on iOS device directly from command line?

Is it possible to run react-native application on an iOS device directly from the command line like we do on simulator with `react-native run ios --simulator "iPhone 5s"`?

21 Jul at 07:14

Send HTTP POST message in ASP.NET Core using HttpClient PostAsJsonAsync

I want to send dynamic object like ``` new { x = 1, y = 2 }; ``` as body of HTTP POST message. So I try to write ``` var client = new HttpClient(); ``` but I can't find method ``` client.PostA...

10 Jun at 14:12

How to return a specific status code and no contents from Controller?

I want the example controller below to return a status code 418 with no contents. Setting the status code is easy enough but then it seems like there is something that needs to be done to signal the e...

What is dtype('O'), in pandas?

I have a dataframe in pandas and I'm trying to figure out what the types of its values are. I am unsure what the type is of column `'Test'`. However, when I run `myFrame['Test'].dtype`, I get; ``` dt...

8 Jun at 23:47

Getting Access Denied when calling the PutObject operation with bucket-level permission

I followed the example on [http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_examples.html#iam-policy-example-s3](http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_examples...

18 Nov at 18:45

How do you perform Django database migrations when using Docker-Compose?

I have set up a Docker Django/PostgreSQL app closely following the [Django Quick Start instructions on the Docker site](https://docs.docker.com/compose/django/). The first time I run Django's manage...

8 Apr at 22:7

How do I add a new column to a Spark DataFrame (using PySpark)?

I have a Spark DataFrame (using PySpark 1.5.1) and would like to add a new column. I've tried the following without any success: ``` type(randomed_hours) # => list # Create in Python and transform ...

Format date and Subtract days using Moment.js

I would like a variable to hold yesterday's date in the format `DD-MM-YYYY` using Moment.js. So if today is 15-04-2015, I would like to subtract a day and have 14-4-2015. I've tried a few combination...

6 Mar at 07:11

Use Invoke-WebRequest with a username and password for basic authentication on the GitHub API

With cURL, we can pass a username with an HTTP web request as follows: ``` $ curl -u <your_username> https://api.github.com/user ``` The `-u` flag accepts a username for authentication, and then c...

Difference between ${} and $() in Bash

I have two questions and could use some help understanding them. 1. What is the difference between ${} and $()? I understand that () means running command in separate shell and placing $ means passi...

13 Apr at 08:18

Spring Boot Remove Whitelabel Error Page

I'm trying to remove white label error page, so what I've done was created a controller mapping for "/error", ``` @RestController public class IndexController { @RequestMapping(value = "/error")...

18 Aug at 05:49