What are functional interfaces used for in Java 8?

I came across a new term in Java 8: "functional interface". I could only find one use of it while working with . Java 8 provides some built-in functional interfaces and if we want to define any functi...

How do you implement a response filter in ServiceStack to filter out unwanted DTO's

I'm having trouble finding any complete tutorials on how to implement a Response Filter in ServiceStack. The best I've found is a portion of code: [https://github.com/ServiceStack/ServiceStack/wiki/R...

27 Apr at 04:42

How to add a list of objects as a value for a key in redis using c#?

I have a `Model class -Person` with respective properties. I want to add a list of person (object) inside a list and set the list as value for a key. I am using `servicestack.redis` driver. I saw few ...

27 Apr at 04:47

Can I use Entity Framework Version 6 or 7 to update an object and its children automatically?

I have three tables. Word -> WordForm -> SampleSentence. Each `Word` has different `WordForms` and then each form can have one or more `SampleSentence` ``` CREATE TABLE [dbo].[Word] ( [WordId] ...

13 May at 10:18

Allow Access-Control-Allow-Origin header using HTML5 fetch API

I am using HTML5 fetch API. ``` var request = new Request('https://davidwalsh.name/demo/arsenal.json'); fetch(request).then(function(response) { // Convert to JSON return response.json(); })...

29 Jun at 15:23

In C# What's the difference between Int64 and long?

In C#, what is the difference between Int64 and long? Example: ``` long x = 123; Int64 x = 123; ```

26 Apr at 22:9

Close dialog window on webpage

I need to trigger some actions inside someone else's webpage. I have this code so far: ``` IHTMLElementCollection DeleteCollection = (IHTMLElementCollection)myDoc.getElementsByTagName("a"); for...

6 May at 14:31

How to integrate Luis into bot builder

I'm trying to use the `FormBuilder` in combination with my intents as I created them in . I just can't find the documentation to do this. I would like to do the following things: 1. A user would en...

Running stages in parallel with Jenkins workflow / pipeline

> the question is based on the old, now called "scripted" pipeline format. When using "declarative pipelines", parallel blocks can be nested inside of stage blocks (see [Parallel stages with Declarat...

1 Jul at 17:24

Can ASP.NET MVC + EF scaffolding be used after implementing EntityTypeConfiguration classes?

Visual Studio scaffolding for new ASP.NET MVC Controllers bound to Entity Framework work well when the models use or the direct lines within `OnModelCreating(DbModelBuilder)` to describe their char...

ServiceStack OAuth2 provider implementation

I have application developed with ServiceStack that used credential authentication for login. Now I need services of application to be consumed by other app. OAuth2 provider seems best to allow api a...

7 May at 09:22

What is the impact of the `PersistKeySet`-StorageFlag when importing a Certificate in C#

In my application, a Certificate for Client-Authentication is programatically added to the `MY`-Store using the following code: ``` //certData is a byte[] //password is a SecureString X509Certificate...

26 Apr at 14:2

Get viewport/window height in ReactJS

How do I get the viewport height in ReactJS? In normal JavaScript I use ``` window.innerHeight() ``` but using ReactJS, I'm not sure how to get this information. My understanding is that ``` React...

24 Jan at 19:12

How to get ,update all keys and its values from redis database in c#?

I am using servicestack C# driver for connecting redis database which runs in 6379. I want to retrieve(GET/READ) all keys and its values from redis database(which is actually cached). I have to update...

Convert string to date in Swift

How can I convert this string `"2016-04-14T10:44:00+0000"` into an `NSDate` and keep only the year, month, day, hour? The `T` in the middle of it really throws off what I am used to when working with...

29 Dec at 07:48

How to mock an IFormFile for a unit/integration test in ASP.NET Core?

I want to write tests for uploading of files in ASP.NET Core but can't seem to find a nice way to mock/instantiate an object derived from `IFormFile`. Any suggestions on how to do this?

Write / add data in JSON file using Node.js

I am trying to write JSON file using node from loop data, e.g.: ``` let jsonFile = require('jsonfile'); for (i = 0; i < 11; i++) { jsonFile.writeFile('loop.json', "id :" + i + " square :" + i * ...

24 Sep at 14:6

The instance of entity type cannot be tracked because another instance of this type with the same key is already being tracked

I have a Service Object `Update` ``` public bool Update(object original, object modified) { var originalClient = (Client)original; var modifiedClient = (Client)modified; _context.Clients...

26 Apr at 06:2

In MVC 6, how to code checkbox list in view and pass the checked values to the controller?

Sorry but most of my searches take me to old MVC codes. Any help will be appreciated. In MVC 6 with tag helpers, how do you code a set of checkboxes: - Use tag helper for label so clicking it will tog...

Show a Jenkins pipeline stage as failed without failing the whole job

Here's the code I'm playing with ``` node { stage 'build' echo 'build' stage 'tests' echo 'tests' stage 'end-to-end-tests' def e2e = build job:'end-to-end-tests', propagate:...

Jupyter Notebook 500 : Internal Server Error

I want to learn how to use Jupyter Notebook. So far, I have managed to download and install it (using pip), but I'm having trouble opening it. I am opening it by typing: ``` jupyter notebook ``` i...

26 Apr at 11:35

Deserialize CSV with CustomHeaders using ServiceStack.Text

I'm trying to use ServiceStack.Text for deserializing a csv file containing custom headers. ``` var csv = "Col-1,Col-2" + Environment.NewLine + "Val1,Val2" + Environment.NewLine + "Val3,Val3" + Envir...

28 Apr at 06:24

How can you store lists of objects in SQLite.net?

Let us assume I have these two objects ``` class Customer { [PrimaryKey] public string id; [??????] public List<int> addresses; } ``` and ``` class Address { [PrimaryKey, AutoIncr...

25 Apr at 21:17

Analytics Reporting API V4 Client Library for .NET

I'm trying to get some data from our google analytics instance and I'd like to use the Analytics Reporting API V4 Client Library for .NET ([https://developers.google.com/api-client-library/dotnet/apis...

ServiceStack.Redis connection issues with Azure Redis

I am having issues across several environments (ie different Azure Redis instances) similar to this post: [ServiceStack.Redis: Unable to Connect: sPort:](https://stackoverflow.com/questions/20384052/s...

23 May at 11:59