Should I use a C# Dictionary if I only need fast lookup of keys, and values are irrelevant?

I am in need of a data type that is able to insert entries and then be able to quickly determine if an entry has already been inserted. A `Dictionary` seems to suit this need (see example). However, I...

3 Mar at 17:14

XmlWriter encoding UTF-8 using StringWriter in C#

I'm using C# to output an xml file and Im trying to set the xml encoding value to UTF-8 but its currently outputting: ``` <?xml version="1.0"?> ``` This is my code: ``` public sealed class StringW...

4 Mar at 12:22

ASP.NET Core middleware vs filters

After reading about ASP.NET Core middleware, I am confused about when I should use filters and when I should use middleware as they seem to achieve the same goal. When should middleware be used instea...

5 Jul at 23:8

UWP SendToAsync from Socket results in AddressFamilyNotSupported

I am using the class from UWP to send data via UDP to a specific device. The problem is that after a few send forth and back, my for Sending gets stuck and in SocketError i got AddressFamilyNotSup...

23 Apr at 07:16

Get object data and target element from onClick event in react js

This is my code. I want to get both data in object & target element using onClick event. Can anyone help me. ``` handleClick = (data) => { console.log(data); } <input type="checkbox" value={...

3 Mar at 10:18

Update TensorFlow

I'm working with `Ubuntu 14.04` , I had a `TensorFlow V0.10` but I want to update this version. if i do: ``` $ pip install --upgrade $TF_BINARY_URL ``` but it prints: ``` Exception: Traceback (m...

Purpose of package "Microsoft.EntityFrameworkCore.Design"

All tutorials agree that `project.json` should include: ``` "Microsoft.EntityFrameworkCore.Design": { "type":"build", "version":"1.0.0-preview2-final" } ``` I have never included it, an...

ServiceStack OrmLite mapping with references not working

I'm trying out OrmLite to see if I can replace Entity Framework in my projects. The speed is quite significant on simple queries. But I tried to map/reference a [1 to many- relation and read the docum...

why to have private setter in entity

Still getting used to Entity framework but I have seen code like below where they have private setter for id in Entity. Why should some have private setter. This Id field is anyway auto-generated in d...

WinError 2 The system cannot find the file specified (Python)

I have a Fortran program and want to execute it in python for multiple files. I have 2000 input files but in my Fortran code I am able to run only one file at a time. How should I call the Fortran pro...

appSettings.json for .NET Core app in Docker?

I am running a .net core app in a docker container. Here is my docker file (just to build a dev environment): ``` FROM microsoft/dotnet:1.0.1-sdk-projectjson ENV ASPNET_ENV Development COPY bin/Debu...

URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs) in applicationContext.xml

I created an application Context.xml at the `WEB-INF/classes` directory. and I have added the `<!DOCTYPE>` in the xml. I am getting the below error: > URI is not registered (Settings | Languages & Fr...

27 Apr at 10:39

warning: Kotlin runtime JAR files in the classpath should have the same version

I get the following warning, but I'm not sure where v1.0.6 resides. Is it possible this error comes from a Kotlin library somehow including an old Kotlin version? Any ideas how to fix it or at least...

3 Mar at 02:15

ServiceStack Javascript JsonServiceClient missing properties

I am trying to connect to a JWT authenticated service using the Servicestack JsonServiceClient, however the Docs only describe how to do this using the C# client: [http://docs.servicestack.net/jwt-au...

3 Mar at 01:33

Docker-compose check if mysql connection is ready

I am trying to make sure that my app container does not run migrations / start until the db container is started and READY TO accept connections. So I decided to use the healthcheck and depends on op...

Aurelia-Authentication using Self Hosted Servicestack

Perhaps I'm using the wrong search terms but I can't find any information about how to get Aurelia-Authentication to play nice with ServiceStack. I am very unfamiliar with the super complicated authe...

23 May at 12:9

What is a console application naming convention for Visual Studio?

When I develop Visual Studio solutions I like to use naming conventions for the projects based on the project type. For example: MyProject.UI.Windows, MyProject.UI.Mobile, MyProject.Library I am...

6 May at 06:13

Google API authentication: Not valid origin for the client

When making an auth request to the Google API (gapi), it's returning false on the checkOrigin. I have removed any client id's or anything that would link directly to my account and replaced it with a...

Return JSON object (ASP.NET WebAPI)

I have ASP.NET Web API It returns me JSON like this `[{"CompanyID":1,"CompanyName":"Тест"},{"CompanyID":5,"CompanyName":"Фокстрот"}]` As I understood this is Json array, but I need to return JSOn O...

2 Mar at 21:26

How to remove a default service from the .net core IoC container?

One of the beautiful things about .NET Core is that it is very modular and configurable. A key aspect of that flexibility is that it leverages an IoC for registering services, often via interfaces. Th...

conda update CondaHTTPError: HTTP None

Midway through running `Conda Update --all`, the update stalled. Multiple packages had been updated. Now, when I run `conda update --all` or `conda update conda`, I get this response: ``` (C:\Users\*...

12 Jun at 19:58

Read JSON post data in ASP.Net Core MVC

I've tried to find a solution for this, but all the ones coming up are for previous versions of ASP.Net. I'm working with the JWT authentication middleware and have the following method: ``` private...

ServiceStack AutoQuery and Field Term Or

I am trying to change a few fields on an autoquery to query using or (it is a search box that is searching many fields). This doesn't seem to work although according to the documentation it should. ...

ServiceStack OrmLite AutoQuery Filter

Should the following work: `?OpensContains=Something` by querying the Name column on the db? It doesn't and I'm not sure why not? ``` [QueryDbField(Field = "Name")] public string OpensContains { g...

Laravel: PDOException: could not find driver

I am developing a website on a server I only have access to MySQL and FTP, so all commands I run are through the b374k php shell . I am experiencing a Laravel problem with SQL driver. I tried switchin...

2 Mar at 14:11