add Shadow on UIView using swift 3
prior swift 3 i was adding shadow in my UIView like this : ``` //toolbar is an UIToolbar (UIView) toolbar.layer.masksToBounds = false toolbar.layer.shadowOffset = CGSize(width: -1, height: 1) toolbar...
How does Find method of Entity Framework work?
I am learning Entity Framework and faced some moment with method I can't understand. ``` public class Destination { public int DestinationId { get; set; } public string Name { get; set; } ...
- Modified
- 21 Sep at 18:27
OData Exception The limit of '0' for Top query has been exceeded
I am using OData Web API for Version 4, when I try to query OData web Api using `$top` parameter, it return me following exception message. > The query specified in the URI is not valid. The limit of...
- Modified
- 29 Sep at 22:5
Understanding the use of Task.Run + Wait() + async + await used in one line
I'm a C# newbie, so I'm struggling to understand some concepts, and I run into a piece of code that I'm not quite understanding: ``` static void Main(string[] args) { Task.Run(async () => { await So...
- Modified
- 21 Sep at 17:4
Multiple routes assigned to one method, how to determine which route was called?
I am working on a small ASP.NET MVC project at the moment. The project was released a few month ago. But changes should be implemented for usability and SEO reasons now. I decided to use attribute rou...
- Modified
- 16 Aug at 21:21
Jenkins fails when running "service start jenkins"
I installed jenkins on Centos 7 using the following: ``` sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import http://pkg.jenkins.io/redhat-stab...
- Modified
- 22 Feb at 06:58
implicit operator with generic not working for interface
I basically have the following class (example found on [C# creating an implicit conversion for generic class?](https://stackoverflow.com/questions/6946412/c-sharp-creating-an-implicit-conversion-for-g...
- Modified
- 23 May at 11:46
Programmatically open On-Screen Keyboard in UWP
Is it possible in UWP to force it to open the On Screen Keyboard (osk.exe)? For example, in C# it is possible using Doing the above in UWP results in compile error saying there is no Process namesp...
- Modified
- 22 Jan at 08:25
Failed - network error when downloading excel file made by EPPlus.dll
I try to download an excel file made by `EPPlus.dll` from an asp.net c# web form application. but i get Failed - network error. It should be noted that mentioned error just occurs in chrome and the jo...
swift 3.0 Data to String?
``` func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {} ``` I want `deviceToken` to string but: ``` let str = String.init(data: de...
In C# specify access modifier for a method is equivalent to get and set
I'm learning for the Microsoft Exam 70-483. In this exercise the correct answers are A and F. In my opinion E is correct too. I think E is fully equivalent to A + F. Is it true? You are creating a c...
- Modified
- 21 Sep at 12:28
System.TypeLoadException: Method 'get_xxx' does not have an implementation
There are a lot of questions floating around with this problem and i've worked through them ll with no joy. I am receiving this error: > Method 'get_UserImageCDNUrl' in type 'App.Web.WebConfig' from...
- Modified
- 21 Sep at 11:59
Class constructor type in typescript?
How can I declare a `class` type, so that I ensure the object is a constructor of a general class? In the following example, I want to know which type should I give to `AnimalClass` so that it could...
- Modified
- 21 Sep at 10:44
Add Multiple Contract Resolver in Newtonsoft.Json
Blueprint for data structure: ``` public class Movie { public string Name { get; set; } } ``` Using Newtonsoft.Json, I have the following configuration for Json serialization. ``` var settings...
Troubleshooting Identity Server 4
I am using Identity Server 4 for authentication. I have MVC client. Few days ago i was able to authenticate successfully. But recently i made some changes in Identity Server project which broke someth...
- Modified
- 21 Sep at 08:23
Visual Studio shows warning in vctmp file
I have a C# project opened in visual studio. We are using TFS to manage our projects. In one source code file of the project I have configured a warning in the following way: ``` #warning expand for ...
- Modified
- 21 Sep at 07:24
How to avoid "Sorry, my bot code is having an issue" in Microsoft Bot Framework
I have a bot that runs on Azure + Bot Framework + LUIS (via LuisDialog). If the user happens to send two messages in a quick succession (before the bot has a chance to answer), they see this error m...
- Modified
- 16 Nov at 11:0
How to test asp.net core built-in Ilogger
I want to verify some logs logged. I am using the asp.net core built-in ILogger, and inject it with the asp.net core built-in DI: ``` private readonly ILogger<InvoiceApi> _logger; public InvoiceA...
- Modified
- 21 Sep at 01:28
Not supported by Swagger 2.0: Multiple operations with path
I have integrated swagger in WebApi 2 application. It works fine when application has single controller. When I added second controller in the application. I got following error : > An error has oc...
- Modified
- 24 Jan at 00:37
How can I get my dapper result to be a List?
Why I can't add a `.ToList()` on this? The only thing Intellisense is allowing is `.ToString()`. ``` //.. string sqlQuery = "SELECT sum(SellingPrice) as SellingPrice, sum(MarkupPercent) as MarkupPerc...
How to properly link libraries with cmake?
I can't get the additional libraries I am working with to link into my project properly. I am using CLion, which uses cmake to build it's projects. I am trying to use several libraries in conjunction...
- Modified
- 5 Jan at 15:34
How do I set environment variables during the build in docker
I'm trying to set environment variables in docker container during the build but without success. Setting them when using run command works but I need to set them during the build. #### Dockerfile ...
- Modified
- 27 Jan at 03:0
Building SqlExpression throws InvalidOperationException when not using anonymous type in Select() clause
This is my database POCO : ``` public class MyPoco1 { public int Id { get; set; } public string Name { get; set; } } ``` I want to select and map results into a custom POCO with different p...
- Modified
- 20 Sep at 15:25
Using Linq to sum up to a number (and skip the rest)
If we have a class that contains a number like this: ``` class Person { public string Name {get; set;} public int Amount {get; set;} } ``` and then a collection of people: ``` IList<Person> p...