long timestamp to LocalDateTime

I have a long timestamp 1499070300 (equivalent to Mon, 03 Jul 2017 16:25:00 +0800) but when I convert it to LocalDateTime I get 1970-01-18T16:24:30.300 Here's my code ``` long test_timestamp = 1499...

3 Jul at 10:52

What is the simplest way to achieve O(n) performance when creating the union of 3 IEnumerables?

Say a, b, c are all `List<t>` and I want to create an unsorted union of them. Although performance isn't super-critical, they might have 10,000 entries in each so I'm keen to avoid O(n^2) solutions. ...

3 Jul at 16:13

Deploy servicestack angular 2 app to elastic beanstalk

I need to deploy app to elastic beanstalk. I tried to use deploy from visual studio (aws plugin) but it seems like does not make webpack related stuff to build. gulp file from solution is meant to dep...

How to navigate on path by button click in react router v4?

I have this paths in react-router-dom: ``` <BrowserRouter> <div> <Route exact path='/(index.html)?' component={Home}/> {/* app = home */} <Route path='/register' component={Registration}/> <...

How can I use a local file on container?

I'm trying create a container to run a program. I'm using a pre configurate image and now I need run the program. However, it's a machine learning program and I need a dataset from my computer to run....

Xamarin Forms Unit Testing

What is the approach to write unit tests for Xamarin Forms application (as opposed to Xamarin Traditional which is Xamarin.Android, Xamarin.IOS, or Xamarin.UWP)? Can anyone provide a good explanation...

render seo meta tags on server with servicestack angular 2 template

Servicestack angular 2 template have only one entry point - inxed.html. Let's say we want to have seo meta tags rendered on server for SEO optimization for route like /product/id. Any ideas how to mak...

2 Jul at 14:19

How do I combine two char's into a string in C#

How do I combine two char's into a single string? It seems as I cannot for the life of me find out how to do it whatsoever.

16 Feb at 10:7

How can I clear the Jest cache?

Jest is picking up an old version of a package and thus my tests fail unless I use `--no-cache`. I can even delete the package folder from folder `node_modules` and Jest is happy to run the tests (alm...

29 Jan at 14:25

Convert.FromBase64String does not work in code but works in online tool

I am writing a C# application to decode this string: > "--W3sic3RhcnRfdGltZSI6IjAiLCJwcm9kdWN0X2lkIjoiODQwMDMzMDQiLCJ1cmwiOiIifSx7InN0YXJ0X3RpbWUiOiI3OSIsInByb2R1Y3RfaWQiOiI4NDAzNjk2MSIsInVybCI6IiJ9L...

28 Jun at 06:52

Angular 4: InvalidPipeArgument: '[object Object]' for pipe 'AsyncPipe'

i need your help, i'm trying to display some datas from my firebase but it trhows me an error like `InvalidPipeArgument: '[object Object]' for pipe 'AsyncPipe'`. --- There is my service: ``` im...

How is a Scoped service instance handled in a .NET Core Console application?

I copied this from `ConfigureServices` in a web application I'm building, where I'm trying to move away from the web and only use a console app or service: ``` serviceCollection.AddScoped<IDbConnecti...

How do I use async Task<IActionResult> ? Or How to run in async way in my Asp.Net Core Web Api

I'am trying to run my Controller Action in async way. How do I use async Task ? Or How to run in async way ``` // Db context public class DeptContext : DbContext { public LagerContext(DbContextOp...

2 Jul at 15:41

How can I send an embed via my Discord bot, w/python?

I've been working a new Discord bot. I've learnt a few stuff,and, now, I'd like to make the things a little more custom. I've been trying to make the bot send embeds, instead, of a common message. ...

2 Jul at 21:30

dotnet restore warning NU1701

I am using .NET Core with C#, and when I did `dotnet restore`, it gave the following error: > PS C:\workspace\Arbitrator> dotnet restoreC:\workspace\Arbitrator\Arbitrator.csproj : warning NU1701: Pack...

27 Nov at 00:19

System.IO.IOException: 'The process cannot access the file '@.txt' because it is being used by another process.'

I am new to programming and I have a question. If I have two functions, one creates a text file and writes into it, while the other opens the same text file and reads from it. The error I get is: >...

1 Jul at 10:13

ServiceStack Redis: given an arbitrary connection string, how do I test for connectivity to a Redis Cache server?

I would like to know given an arbitrary connection string, how do I test if the connection to a Redis Server is established. Thanks!

Where is Visual Studio storing Publish Profiles?

I have a corrupted Publish profile. I need to delete it. My other computer is fine, so I know it is local. I have tried: 1. Clean checkout of codebase from Git (so nothing is local in my code di...

1 Jul at 02:6

Yet another System.Runtime.InteropServices error

Every project we have with MongoDB will, at one point of another, have a problem with the System.Runtime.InteropServices library that doesn't load. This time the error is interesting: [](https://i.s...

18 Oct at 12:34

Access AWS ElasticBeanstalk Custom Environment Variables with .NET Core WebApp

We have set custom environment variables in the Elastic Beanstalk dashboard, under configuration=>software configuration=>"Environment Properties" section. In a C# MVC 5 project, we can just access th...

Angular4 Observable Subscription to ServiceStack Server Events

We have an Angular 1 app that polls a ServiceStack web API every few seconds and as part of the upgrade to Angular 4 I'd like to swap this out for a rxjs observable subscription to ServiceStack's Serv...

CoreCLR/ServiceStack connection pooling

I'm using ServiceStack with coreclr, hosting on the official MS base coreclr image. My connection pool settings don't seem to be being respected. ``` var builder = new SqlConnectionStringBuilder(Co...

30 Jun at 17:6

New servicestack project navigates to localhost/metadata, not localhost/folder/metadata

I'm starting a new servicestack project. I have it set up for local IIS (which works fine for my old ss project). When I navigate to the url, which should be [http://localhost/NewSvc](http://localhost...

30 Jun at 16:57

Are C# anonymous types redundant in C# 7

Since C# 7 introduces value tuples, is there a meaningful scenario where they are better suited than tuples? For example, the following line ``` collection.Select((x, i) => (x, i)).Where(y => arr[y....

IHttpContextAccessor Session GetString

I'm trying to migrate an ASP.NET MVC site to ASP.NET Core with the .NET Core runtime. Previously we could get objects out of the session store, even in different assemblies, with ``` var obj = HttpC...

30 Jun at 16:30