Vue.JS - how to use localStorage with Vue.JS

I am working on Markdown editor with Vue.JS, and I tried to use localStorage with it to save data but I don't know how to save new value to data variables in Vue.JS whenever the user types!

9 Jan at 08:2

Suggest data structure suitable for key range lookup

I am looking for data structure similar to SCG.Dictionary but having number ranges as keys. Main operation where the most of performance is required would be lookup for keys overlapping with the spec...

2 Jan at 09:5

How does Facebook Graph API Pagination works and how to iterate facebook user feed with it?

I have a facebook Graph API call to get a facebook users feed: ``` dynamic myFeed = await fb.GetTaskAsync( ("me/feed?fields=id,from {{id, name, picture{{url}} }},story,picture,lin...

Application and User Authentication using ASP.NET Core

Can anyone point me to some good documentation or provide good information on the best way to implement authentication and authorisation for an ASP.NET Core REST API.I need to authenticating and autho...

RestSharp get full URL of a request

Is there a way to get the full url of a RestSharp request including its resource and querystring parameters? I.E for this request: ``` RestClient client = new RestClient("http://www.some_domain.com"...

1 Jan at 14:55

How to list all versions of an npm module?

In order to see all the versions of a node module [webpack], I have executed below command in windows command prompt ``` npm view webpack versions ``` This command only displays first 100 versions ...

4 Dec at 16:44

ImportError: No module named 'tensorflow.python'

here i wanna run this code for try neural network with python : ``` from __future__ import print_function from keras.datasets import mnist from keras.models import Sequential from keras.layers imp...

Get random items with fixed length of different types

I have a `List<Fruit>`, ``` public class Fruit { public string Name { get; set; } public string Type { get; set; } } ``` and the list above contains 30 Fruit objects of two types: `Apple` a...

1 Jan at 21:18

How to get Microsoft.Extensions.Logging<T> in console application using Serilog and AutoFac?

We have common BL classes in a ASP.NET Core application that get in the ctor: `Microsoft.Extensions.Logging.ILogger<Foo>` In ASP.NET Core, the internal infrastructure of ASP.NET handles getting the ...

Does bootstrap 4 have a built in horizontal divider?

Does bootstrap 4 have a built in horizontal divider? I can do this, ``` <style type="text/css"> .h-divider{ margin-top:5px; margin-bottom:5px; height:1px; width:100%; border-top:1px solid gray; ...

Startup.cs in a self-hosted .NET Core Console Application

I have a self-hosted . The web shows examples for but I do not have a web server. Just a simple command line application. Is it possible to do something like this for console applications? ``` public...

7 Jun at 04:22

Why is tail call optimization not occurring here?

We are using recursion to find factors and are receiving a StackOverflow exception. We've read that [the C# compiler on x64 computers performs tail call optimizations](https://github.com/dotnet/roslyn...

Can't enable migrations for Entity Framework on VS 2017 .NET Core

I just installed VS 2017 and created a new Core project. Inside it, I added: - - I also created a folder called Models with a class in it. Then, I went to the Package Manager Console and executed ...

Mock HttpContext for unit testing a .NET core MVC controller?

I have a function in a controller that I am unit testing that expects values in the header of the http request. I can't initialize the HttpContext because it is readonly. My controller function expe...

How to initialize IOption<AppSettings> for unit testing a .NET core MVC service?

I have a .NET core MVC rest service. I have a controller I wish to test. This controller has a constructor argument of IOptions where AppSettings is my class for config settings ( I store my database...

Package 'Microsoft.EntityFrameworkCore.Tools.DotNet 1.0.0-msbuild2-final' has a package type 'DotnetCliTool' that is not supported by project

When I use Visual Studio 2017 RC to create netcore project and Nuget Microsoft.EntityFrameworkCore.Tools.DotNet, but I get an error. > Package 'Microsoft.EntityFrameworkCore.Tools.DotNet 1.0.0-msb...

How to iterate object keys using *ngFor

I want to iterate [object object] using *ngFor in Angular 2. The problem is the object is not array of object but object of object which contains further objects. ``` { "data": { "id": 834, ...

18 Dec at 10:56

Visual Studio .net core tag helpers not working

Well, lets get down to it. I'm using Visual Studio 2015 and ASP.NET core tag helpers have completely stopped working, no idea why as I've not changed anything. I was in work one day, they worked fine,...

SlidingExpiration and MemoryCache

Looking at the documentation for [MemoryCache](https://msdn.microsoft.com/en-us/library/system.runtime.caching.cacheitempolicy.slidingexpiration.aspx) I expected that if an object was accessed within ...

6 Jan at 17:8

How to detect click/touch events on UI and GameObjects

How to detect UI object on Canvas on Touch in android? For example, I have a canvas that have 5 objects such as `Image`, `RawImage`, `Buttons`, `InputField` and so on. When I touch on Button UI obje...

30 Jul at 13:57

How to use RestSharp.NetCore in asp.net core

I have gone through the [http://restsharp.org/](http://restsharp.org/) code which work greats. Below is the code of RestSharp with out asp.net core . ``` public GenericResponseObject<T> GetGeneric<T>...

Performance of == vs Equals in generic C# class

For some reason C# does not allow == operator use in generic classes like here: If I replace == with val.Equals(value) I have code that works as expected but if I look at bytecode it looks much more c...

23 May at 12:32

Identity Server 4: adding claims to access token

I am using Identity Server 4 and Implicit Flow and want to add some claims to the access token, the new claims or attributes are "tenantId" and "langId". I have added langId as one of my scopes as be...

Replace, Insert, Delete operations on IEnumerable

I have a library that only accepts a proprietary immutable collection type. I would like to have a function that accepts one of these collections and performs some changes to this collection by return...

29 Dec at 16:58

AppSettings.json for Integration Test in ASP.NET Core

I am following this [guide](https://learn.microsoft.com/en-us/aspnet/core/testing/integration-testing). I have a `Startup` in the API project that uses an `appsettings.json` configuration file. ``` pu...