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
Copy Files from Windows to Windows Subsystem for Linux (WSL)
I have enabled developer mode and installed `Bash on Ubuntu on Windows`. My home directory can be found under `%localappdata%\Lxss\home\<ubuntu.username>\`, i have created a sub-directory called Pict...
- Modified
- 28 Apr at 18:6
Cannot find module '@angular/compiler'
I run the command npm install -g @angular/cli and after i tried to run my app it says, Cannot find module '@angular/compiler' in the terminal. How can i install the compiler in my package.json in orde...
- Modified
- 27 Nov at 14:41
Should I use a C# Dictionary if I only need fast lookup of keys, and values are irrelevant?
I am in need of a data type that is able to insert entries and then be able to quickly determine if an entry has already been inserted. A `Dictionary` seems to suit this need (see example). However, I...
- Modified
- 3 Mar at 17:14
ASP.NET Core middleware vs filters
After reading about ASP.NET Core middleware, I am confused about when I should use filters and when I should use middleware as they seem to achieve the same goal. When should middleware be used instea...
- Modified
- 5 Jul at 23:8
UWP SendToAsync from Socket results in AddressFamilyNotSupported
I am using the class from UWP to send data via UDP to a specific device. The problem is that after a few send forth and back, my for Sending gets stuck and in SocketError i got AddressFamilyNotSup...
- Modified
- 23 Apr at 07:16
Get object data and target element from onClick event in react js
This is my code. I want to get both data in object & target element using onClick event. Can anyone help me. ``` handleClick = (data) => { console.log(data); } <input type="checkbox" value={...
- Modified
- 3 Mar at 10:18