Is there a difference between `x is int?` and `x is int` in C#?
``` class C<T> where T : struct { bool M1(object o) => o is T; bool M2(object o) => o is T?; } ``` The two methods above seems to behave equally, both when passing `null` reference or boxed ...
asp.net core defaultProxy
In net 4.5 we are working with proxy like this: ``` <system.net> <!-- --> <defaultProxy enabled="true" useDefaultCredentials="false"> <proxy usesystemdefault="True" proxyaddress="http...
- Modified
- 6 Mar at 23:35
remove kernel on jupyter notebook
How can I remove a kernel from jupyter notebook? I have R kernel on my jupyter notebook. Recently kernel always dies right after I open a new notebook.
- Modified
- 14 Oct at 16:0
SQL Query Where Date = Today Minus 7 Days
I have a SQL table of hits to my website called ExternalHits. I track the URL as URLx and the date the page was accessed as Datex. I run this query every week to get the count of total hits from the w...
- Modified
- 6 Mar at 21:0
Why are entity framework entities partial classes?
I recently began using entity framework, and I noticed that generated entities are partial classes. What are the uses of that? I googled a bit and people mostly speak of validation, but I can add vali...
- Modified
- 6 Mar at 19:41
How to determine csv data causing exception?
I'm having trouble debugging a ServiceStack.Text string FromCsv call. I am parsing several csv documents but one document keeps throwing an exception. I can't determine the root cause. The exception i...
- Modified
- 6 Mar at 18:56
How to call function on child component on parent events
## Context In Vue 2.0 the documentation and [others](http://taha-sh.com/blog/understanding-components-communication-in-vue-20) clearly indicate that communication from parent to child happens via ...
- Modified
- 5 Apr at 18:57
Why use async when I have to use await?
I've been stuck on this question for a while and haven't really found any useful clarification as to why this is. If I have an `async` method like: ``` public async Task<bool> MyMethod() { // So...
- Modified
- 6 Mar at 11:37
Laravel Password & Password_Confirmation Validation
I've been using this in order to edit the User Account Info: ``` $this->validate($request, [ 'password' => 'min:6', 'password_confirmation' => 'required_with:password|same:password|min:6' ]);...
- Modified
- 12 Apr at 13:2
Difference between Microsoft.VisualStudio.TestPlatform.TestFramework and Microsoft.VisualStudio.QualityTools.UnitTestFramework
I noticed a change in one of our solutions in VS 2015 today. It seems the test projects that are generated for the solution use a different namespace than the existing test projects in the same soluti...
- Modified
- 6 Mar at 09:14
C# complex type initializer compiles without new keyword
I was recently working on some code, that has changed from using decimal to use a complex type that has the decimal number and a type to represent a fraction. I had to update some tests, and while typ...
- Modified
- 6 Mar at 08:58
Switch php versions on commandline ubuntu 16.04
I have installed php 5.6 and and php 7.1 on my Ubuntu 16.04 I know with Apache as my web server, I can do ``` a2enmod php5.6 #to enable php5 a2enmod php7.1 #to enable php7 ``` When I disable php7.1 i...
- Modified
- 23 Jul at 00:10
Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK - Android
I know there are lots of questions similiar to this one, but i couldn't find a solution for my problem in any of those. Besides, I'll provide details for my specific case. I coded an Ionic project in...
- Modified
- 6 Mar at 20:38
How to solve SyntaxError on autogenerated manage.py?
I'm following the Django tutorial [https://docs.djangoproject.com/es/1.10/intro/tutorial01/](https://docs.djangoproject.com/es/1.10/intro/tutorial01/) I've created a "mysite" dummy project (my very fi...
- Modified
- 5 Aug at 13:39
Border for some cells of a grid in WPF
I have a data grid. I want to create several borders - not for the entire grid, but for some of the cells. For example: 1. column 2 row 2 and 3 2. column 4 row 3 and 4. Attaching my XAML code. ...
What are the practical scenarios to use IServiceCollection.AddTransient, IServiceCollection.AddSingleton and IServiceCollectionAddScoped Methods?
After reading [this](https://stackoverflow.com/questions/38138100/what-is-the-difference-between-services-addtransient-service-addscope-and-servi) post I can understand the differences between `AddTra...
- Modified
- 13 Aug at 08:38
Custom NLog target with async writing
NLog allows me to write a [custom target](http://github.com/NLog/NLog/wiki/How%20to%20write%20a%20custom%20target). I want to log to my database using Entity Framework Core. In `NLog.Targets.Target` t...
Unity Scripts edited in Visual studio don't provide autocomplete
When I want to edit C# Unity scripts, they open in Visual Studio. It is supposed to provide auto complete for all Unity related code, but it doesn't work. Here you can see the missing functionality: !...
- Modified
- 12 Aug at 23:25
How to write custom actionResult in asp.net core
In webApi2 i could write a custom ActionResult by inheriting IHttpActionResult. Sample : ``` public class MenivaActionResult : IHttpActionResult { private readonly HttpRequestMessage _r...
- Modified
- 4 Mar at 09:28
Crazy Deep Path Length in .Net Core 1.1
Has anyone seen a problem in .NET Core 1.1 where beneath the netcoreapp1.1\publish folder they end up with a bin folder that seems to loop on itself and eventually causes a path too long message to ap...
- Modified
- 10 Mar at 14:4
How to renew only one domain with certbot?
I have multiple domains with multiple certificates: ``` $ ll /etc/letsencrypt/live/ > domain1.com > domain2.com > domain3.com > ... ``` I need to renew only `domain1.com`, but the command `certbot ...
- Modified
- 2 May at 10:3
HttpClient reading entire file before upload. UWP
I'm making an UWP app that uploads files to facebook, I'm using a custom HttpContent to upload the files in 4k blocks to minimize the memory usage for big files (>100mb) and to report progress. My cu...
- Modified
- 8 Mar at 18:15
Error when Building Project: Error building Player because scripts have compile errors in the editor
I have the Tiled2Unity plugin. When I begin to build a version of my game in Unity, be it standalone version or anything else,i get the following error, "Error building Player because scripts have co...
Get image from wwwroot/images in ASP.Net Core
I have an image in wwwroot/img folder and want to use it in my server side code. How can I get the path to this image in code? The code is like this: ``` Graphics graphics = Graphics.FromImage(pat...
- Modified
- 15 Sep at 11:51
How can I change the Bootstrap 4 navbar button icon color?
I have a Bootstrap website where the hamburger toggler is added when the screen size is less than 992px. The code is like so: ``` <button class="navbar-toggler navbar-toggler-right" type="but...
- Modified
- 21 Jun at 13:55