How to make a default value for the struct in C#?
I'm trying to make default value for my struct. For example default value for Int - 0, for DateTime - 1/1/0001 12:00:00 AM. As known we can't define parameterless constructor in structure. ``` struc...
How to add the text "ON" and "OFF" to toggle button
On my project I wanted to add a text on my existing toggle code.So I wanted like this, When toggles ON it should display the text "ON" and display the "OFF" text if toggles off. I can't change it to o...
C# 6 Auto Initialization Property and the use of backing fields
Prior to C# 6, the initialization of properties did not use backing fields to initialize default values. In C#6, it uses the backing fields to initialize with new [Auto initialization properties](http...
- Modified
- 4 Oct at 11:21
How to add js and css files in ASP.net Core?
I've been assigned to migrate an application from MVC into ASP.net Core, I'm new to ASP.net Core. In MVC we have `BundleConfig.cs` and in there we add references to our css and js files, how does it w...
- Modified
- 3 Oct at 19:35
How do I pass a dependency to a Serilog Enricher?
I'm using Serilog in my application for logging. When I'm configuring the logger, I have code like this: ``` var log = new LoggerConfiguration() .Enrich.With<MySerilogEnricher>() .ReadAppSet...
- Modified
- 3 Oct at 18:53
Fluent NHibernate - Dialect does not support DbType.Xml (SQLite)
I have a custom NHibernate XMLtype (Converts POCO to XML on the fly) so i can save objects in the DB. This works with SQL Server 2014 without any issues. However, when trying to run our unit tests wh...
- Modified
- 23 May at 12:25
Eager Loading using UserManager with EF Core
Currently have `ApplicationUser` class with some custom properties, like: ``` public class ApplicationUser : IdentityUser { public string Name { get; set; } public List<Content> Content { get...
- Modified
- 3 Oct at 20:19
SQL Server® 2016, 2017 and 2019 Express full download
All previous version of SQL Server Express were available in both web and full downloads. But I cannot find full download of SQL Server® 2016 Express. Does it exist? Asked the same question on MSDN f...
- Modified
- 3 Apr at 09:53
Displaying data in a SelectList in ASP.NET Core
I've tried a few different approaches. I'm not sure why but my SelectList/DropDown is empty. It shows no data. I'm not sure where I am going wrong. I have an ASP.NET Core App. Entity Framework Core. ...
- Modified
- 26 Oct at 22:42
OpenCV NoneType object has no attribute shape
Hello I'm working on Raspberry Pi with OpenCV. I want to try a tutorial which is ball tracking in link [http://www.pyimagesearch.com/2015/09/14/ball-tracking-with-opencv/](http://www.pyimagesearch.com...
- Modified
- 3 Oct at 14:16
Cannot define variable in pipeline stage
I'm trying to create a declarative Jenkins pipeline script but having issues with simple variable declaration. Here is my script: ``` pipeline { agent none stages { stage("first") { ...
- Modified
- 27 Oct at 20:16
pip not working in Python Installation in Windows 10
I downloaded and installed Python 3.5 from [https://www.python.org/downloads/](https://www.python.org/downloads/) on my Windows 10 machine with IDLE I want to install other packages using pip using ...
- Modified
- 5 Jan at 04:3
ServiceStack session handling in a Load balanced environment
I am using ServiceStack as base library in one of my project. I have structured my application in two part API and WEB application which are separate project and repository. Authentication should h...
- Modified
- 3 Oct at 14:6
How can I set a cookie in react?
Orginally, I use the following ajax to set cookie. ``` function setCookieAjax(){ $.ajax({ url: `${Web_Servlet}/setCookie`, contentType: 'application/x-www-form-urlencoded;charset=utf-8', ...
How override ASP.NET Core Identity's password policy
By default, ASP.NET Core Identity's password policy require at least one special character, one uppercase letter, one number, ... How can I change this restrictions ? There is nothing about that in th...
- Modified
- 3 Dec at 12:47
Read the current full URL with React?
How do I get the full URL from within a ReactJS component? I'm thinking it should be something like `this.props.location` but it is `undefined`
- Modified
- 3 Oct at 02:5
How to convert DateTime to TimeSpan in Entity Framework query
I have this LINQ query with Entity Framework 6: ``` var timeCapturesQuery = Context.TimeCaptures .Where(t => && t.StartDateTime.TimeOfDay < endTime && t.EndDateTime.TimeOfDay > st...
- Modified
- 3 Oct at 00:33
Serilog - RollingFile Sink does not roll files based on date and size
I am using Serilog - RollingFile Sink, but it stores all data in a single file for a day. In my application, 1 GB log is written in a day. So I want to roll log file on the basis of date and size. Ho...
- Modified
- 2 Oct at 20:48
Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays
I looked at similar questions, but none of them helped me. I am going to receive an object like the following: ``` [ { "id": 1, "name": "Safa", "email": "neerupeeru@mail.ee", "purpo...
- Modified
- 23 Apr at 12:10
Ansible: get current target host's IP address
How do you get the current host's IP address in a role? I know you can get the list of groups the host is a member of and the hostname of the host but I am unable to find a solution to getting the IP...
- Modified
- 29 Nov at 04:12
EF Core: Scaffold DbContext keeps failing
The official ASP.Net Core says that the following error can be fixed by restarting visual studio: ``` Scaffold-DbContext : The term 'Scaffold-DbContext' is not recognized as the name of a cmdlet, fu...
- Modified
- 2 Oct at 12:58
How do I do a patch request using HttpClient in dotnet core?
I am trying to create a `Patch` request with the`HttpClient` in dotnet core. I have found the other methods, ``` using (var client = new HttpClient()) { client.GetAsync("/posts"); client.Post...
- Modified
- 8 Jan at 02:35
Pandas: append dataframe to another df
I have a problem with appending of dataframe. I try to execute this code ``` df_all = pd.read_csv('data.csv', error_bad_lines=False, chunksize=1000000) urls = pd.read_excel('url_june.xlsx') substr = ...
How to get element's width/height within directives and component?
``` @Component({ selector: '.donation', template: ` <figure id="donation" move> <img src="image/qrcode.png"/> <figcaption> Buy me a cup of coffee. </figcapt...
- Modified
- 10 Aug at 09:34
How to use existing Firefox profile in Selenium C#?
I need to use an existing Firefox profile in Selenium using C#. That profile has a configured add-on that i need. I found some code googling but those were for Java, I tried the following code but it...