How to change port number in vue-cli project
How to change Port number in Vue-cli project so that it run's on another port instead of 8080.
- Modified
- 21 Feb at 18:4
How can I manually return or throw a validation error/exception in Laravel?
Have a method that's importing CSV-data into a Database. I do some basic validation using ``` class CsvImportController extends Controller { public function import(Request $request) { ...
- Modified
- 13 Nov at 09:0
How can I use window size in Vue? (How do I detect the soft keyboard?)
In my mobile web app with Vue, I want to hide my footer when the soft keyboard pops. So I have a little function to test the ratio of window height to window width... ``` showFooter(){ return h /...
- Modified
- 30 Jul at 16:11
How do I use Topshelf to host ServiceStack?
I'm trying to selfhost ServiceStack in Topshelf, but keep getting an error: > Only Uri prefixes ending in '/' are allowed. Using the ServiceStack templates for a Windows service works but not the ...
- Modified
- 10 Nov at 09:57
Deconstruct a C# Tuple
Is it possible to deconstruct a tuple in C#, similar to F#? For example, in F#, I can do this: ``` // in F# let tupleExample = (1234,"ASDF") let (x,y) = tupleExample // x has type int // y has type st...
How to install python in a docker image?
I want to create a docker image with `selenium` and `chrome` correctly installed, so I choose a base image with these properties. Therefore, the first line of the `Dockerfile` is as follows: ``` FROM...
How to handle 401 (Authentication Error) in axios and react?
I have one file request.js which contains wrapper for axios ajax request. I am calling request function from multiple react components and when one of the request fails I want to refresh the token and...
- Modified
- 19 Aug at 07:51
Entity Framework upgrade to 6.2.0 from 6.1.x breaks certain queries unless I enable MARS
I recently upgraded EF 6.1.3 to 6.2.0 on one of our large projects, and it has broken a significant amount of our LINQ queries. Enabling MultipleActiveResultSets causes everything to work as normal ag...
- Modified
- 9 Nov at 17:54
Using Protobuf Client from Java Example
We're trying to interface with our ServiceStack REST Server from a linux Java integration, using Protobuf to increase the speed of transmission. We have found the JsonServiceClient implementation in ...
- Modified
- 9 Nov at 17:10
How can I Deconstruct Value Tuples that are out parameters in C# 7?
Given the following: ``` var dic = new Dictionary<string, (int, int)>() { ["A"] = (1, 2) }; dic.TryGetValue("A", out (int, int) value); ``` I can easily get the `value` out of the dictionary, ...
- Modified
- 9 Nov at 17:16
How to unit test HttpContext.SignInAsync()?
[SignInAsync() Source Code](https://github.com/aspnet/HttpAbstractions/blob/3e3772eecd4cc57399c28a3f899e6b0406ef2e1b/src/Microsoft.AspNetCore.Authentication.Abstractions/AuthenticationHttpContextExten...
- Modified
- 11 Mar at 00:2
Google.Protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero)
I have a problem with my school project, i use Protobuf library but i have the following error: > Google.Protobuf.InvalidProtocolBufferException" Protocol message contained an invalid tag (zero). My...
- Modified
- 9 Nov at 04:36
What does `HTTPContext.SignInAsync` do behind the scenes?
I am interested in building my own login system, which keeps me away from the out of the box `Identity`, which hides a lot of details. I was taking a look at Authentication using cookies. [https://d...
- Modified
- 9 Nov at 14:47
HttpContextAccessor.HttpContext is null on Linux while non-null on Windows in ServiceStack.Core
I have a simple ServiceStack project that runs on .NET Core 2.0. This works fine on Windows but fails on Linux. With the very same code (see below). The service gets injected with an `IHttpContextAc...
- Modified
- 8 Nov at 22:55
Modulus gives wrong outcome?
Could anyone tell me why these two modulus calculations yield two different outcomes? I just need to blame someone or something but me for all those hours I lost finding this bug. ``` public void tes...
Entity Framework lazy loading with AsNoTracking()
We are currently using lazy loading for Entity Framework and running into `out of memory exception`. The reason why we're running into this exception is because the Linq query loads a lot of data and ...
- Modified
- 8 Nov at 21:37
Using Azure Active Directory OAuth with Identity Model in ASP.NET Core 2.0
# The problem statement We are developing a new enterprise level application and want to utilize Azure Active Directory for signing into the application so that we do not have to create another se...
- Modified
- 9 Nov at 00:51
java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex in Android Studio 3.0
This is my app level gradle file: ``` apply plugin: 'com.android.application' android { compileSdkVersion 26 buildToolsVersion '27.0.0' useLibrary 'org.apache.http.legacy' defaultCon...
C# Async Task Method Without Await or Return
I have an Interface I that is implemented in two places like: ``` interface I { Task DoSomething(); } ``` The interface has async Task DoSomething method API that is then implemented in class ...
- Modified
- 8 Nov at 19:28
C# DotNet Core Middleware Wrap Response
I have a simple controller action which looks like: ``` public Task<IEnumerable<Data>> GetData() { IEnumerable<Data> data = new List<Data>(); return data; } ``` I want to be...
- Modified
- 8 Nov at 14:49
How can I point two different projects to the same SQLite db-file?
I have a simple question. I have 2 layers in my application, a front-end and data access layer, in different projects. I am creating a sqlite db in the data access layer by migration in data access la...
- Modified
- 13 Aug at 09:6
SQL: how to specify a date format on creating a table and fill it
I want to save the date in format 'dd.mm.yyyy'. So I read there are different formats for a date in SQL (by the way I use Visual Studio and SQL Server). I tried this code: ``` CREATE TABLE APP( ...
- Modified
- 3 Jun at 14:46
ServiceStack .Net Core fluent validation Not consistent with full .NET 4.6.2
So we have a working ServiceStack service hosted inside a Windows Service using .Net 4.6.2, which uses a bunch of Fluent Validation validators. We would like to port this to .Net Core. So I started t...
- Modified
- 10 Nov at 08:19
A certificate chain could not be built to a trusted root authority
During the installation of .NET Framework 4.6.2, I got an error: > .NET Framework installation failed: -2146762486. A certificate chain could not be built to a trusted root authority A solution to...
- Modified
- 8 Nov at 09:41
C# Add Accept header to HttpClient
What is the difference between these two calls? My end goal is to have `Accept: application/json` sent over the wire, not to append to some default set of other MIME types. ``` HttpClient client = ne...
- Modified
- 26 Nov at 14:7