Filter input text only accept number and dot vue.js

I have a text box and only want to accept numbers and a period "." when using VueJS. Can anyone help with code? I'm new to Vue.

1 Apr at 21:13

EF core one-to-many relationships HasOne().WithMany() vs HasMany().WithOne()

Let's say I have the following 2 models: ``` public class Blog { public int BlogId { get; set; } public string Url { get; set; } public List<Post> Posts { get; set; } } public class Pos...

6 Jan at 22:30

How to see if running under service fabric

I sometimes run projects locally out of visual studio is there a better way to detect if I'm hosted by SF rather than the exception. I can see possibly the path or entry assembly but there must be a b...

29 Mar at 21:30

How do I build a dynamic Where clause with Dapper when passing in a model

I have an example model that looks like this: ``` public class PersonModel { public int Id {get; set;} public string FirstName {get; set;} public string Lastname {get; set;} publi...

21 Aug at 15:22

How to get Windows Version - as in "Windows 10, version 1607"?

It seems that the word "version" in reference to Windows is used for different things. For example, the Windows 10 "Anniversary Update" is labeled "Version 1607" by Microsoft ([here](https://support.m...

29 Sep at 19:29

Extract the video ID from youtube url in .net

I am struggling with a regex to extract the video ID from a youtube url. `"(?:.+?)?(?:\\/v\\/|watch\\/|\\?v=|\\&v=|youtu\\.be\\/|\\/v=|^youtu\\.be\\/)([a-zA-Z0-9_-]{11})+";` It's working since it ma...

30 Sep at 05:10

'ng serve' does not work after a double install

I used to have Angular CLI, but I mistakenly installed it again with ``` npm install -g angular-cli ``` And now when I run `ng serve` it complains: > It seems like you're using a project generated us...

14 Jan at 18:50

Misleading SQL Exception Text cannot be compared

I get that exception when OrmLite make the following call : ``` return db.Select<T>(x => x.Name == name && x.PuId == puId).FirstOrDefault(); ``` > Exception :"System.Data.SqlClient.SqlException (0x...

23 Mar at 20:25

Entity Framework Core: many-to-many relationship with same entity

I am trying to map many-to-many relationship with the same entity. The `User` entity has an `IList<User>` data field for `Contacts`, which stores users' contacts/friends information: ``` public class...

How to convert array into comma separated string in javascript

I have an array `a.value = [a,b,c,d,e,f]` How can I convert to comma seperated string like `a.value = "a,b,c,d,e,f"` Thanks for all help.

29 Sep at 13:3

Passing custom parameter in custom attribute - ASP.NET MVC

My goal is to create a custom attribute like System.ComponentModel.DataAnnotations.Display which allows me to pass a parameter. Ex.: In System.ComponentModel.DataAnnotations.Display I can pass a value...

7 May at 06:2

pass test case parameters using nunit console

I am developing tests using and approach. I have test method with 2 parameters: path to xlsx file and worksheet name. It works perfect in Visual Studio when I pass parameters in `TestCase` attribute...

CRUD and Query with ServiceStack - Need to get rid of some confusion

I am a bit confused with ServiceStack 'old' and 'new' API and need some clarification and best practices, especially with Request / Response DTO's and routing. I watched some courses on Pluralsight an...

29 Sep at 10:24

EF Core and big traffic leads to max pool size was reached error

We're using ASP.NET Entity Framework Core for querying our MSSQL database in our Web API app. Sometimes when we have big traffic, querying to DB ends with this error: > Timeout expired. The timeout p...

How to use nested schema in ORMlite

I am using nested schema in my sqlserver database. but encounter exception and Invalid object name. ``` [Schema("sam.tst")] public class Test { } ```

How to use IdentityServer4 with and Javascript client with ClientCredentials ASP.NET Core

I am implementing IdentityServer4 an I am making 3 diferents proyects: - [http://localhost:5000](http://localhost:5000)- [http://localhost:5001](http://localhost:5001)- [http://localhost:5003](http:/...

How to render HTML string as real HTML?

Here's what I tried and how it goes wrong. This works: ``` <div dangerouslySetInnerHTML={{ __html: "<h1>Hi there!</h1>" }} /> ``` This doesn't: ``` <div dangerouslySetInnerHTML={{ __html: this.pr...

29 Jul at 06:52

How to mock imported named function in Jest when module is unmocked

I have the following module I'm trying to test in Jest: ``` // myModule.js export function otherFn() { console.log('do something'); } export function testFn() { otherFn(); // do other things...

28 Sep at 18:48

Angular2: Cannot read property 'name' of undefined

I am beginning to learn Angular2. I've been following the Heroes Tutorial provided at angular.io. All was working fine until, being annoyed by the clutter of HTML using the template, I used template ...

20 Sep at 13:11

ServiceStack 4.5 configure log4net programmatically

I am starting a new project with ServiceStack 4.5. Is there any way to configure log4net programmatically? In the documentation I found ``` LogManager.LogFactory = new Log4NetFactory(configureLog4Net...

28 Sep at 16:40

System.TypeLoadException: Could not resolve type with token 01000019

I have a Xamarin.Forms solution which contains in each project (Android, iOS and Windows 8.1) a lib called Plugin.SecureStorage from here: [https://github.com/sameerkapps/SecureStorage](https://github...

28 Sep at 17:51

Increase timeout limit in Google Chrome

Internet speed at work is very limited, and because of this I can't load several useful pages, like Trello, Bitbucket, Slack and so on. Chrome console shows me a long list timeout errors like `GET ht...

28 Sep at 14:58

Calling ServiceStack v3 and v4 services from the same upstream code

I am facing the following scenario and would appreciate some advice on how best to iterate forward: My team is responsible for a Web Service written on ServiceStack v3. This service is responsible fo...

28 Sep at 14:53

How to log complex object using Serilog in valid json format?

I have this structure: ``` public class LogRequestParameters { public string RequestID { get; set; } public string Type { get; set; } public string Level { get; set; } public strin...

28 Sep at 13:49

How to get name of dataframe column in PySpark?

In pandas, this can be done by `column.name`. But how to do the same when it's a column of Spark dataframe? E.g. the calling program has a Spark dataframe: `spark_df` ``` >>> spark_df.columns ['admit'...