Workaround for using type parameter in attribute for using ProducesResponseType with a generic type argument?
I have a generic ASP.NET Core WebApi controller like: ``` public abstract class EntityController<TEntity> { public IActionResult Get(string id) { var entity = ... //load from databas...
How to add SHA-1 to android application
I'm trying to create a dynamic link in Firebase, when I'm selecting the android app, it shows an error saying "Add SHA-1 to this android app", I've already added a credential, but I'm not sure how exa...
- Modified
- 25 Aug at 14:45
How to determine the language of a piece of text?
I want to get this: ``` Input text: "ру́сский язы́к" Output text: "Russian" Input text: "中文" Output text: "Chinese" Input text: "にほんご" Output text: "Japanese" Input text: "العَرَبِيَّة" Output t...
IEnumerable.Take(0) on File.ReadLines seems not to dispose/close the File handle
I have a function which Skips `n` lines of code and Takes `y` lines from a given file using `File.ReadLines` with `Skip` and `Take` combination. When I try to open the file given by `filePath` the nex...
- Modified
- 24 Sep at 03:1
Running PowerShell from .NET Core
Is there a way to run PowerShell scripts from .net-core ? I'm trying to run a PowerShell script in a new .net core 'website\api'. From what I can tell in order to run PowerShell on .net we need to a...
- Modified
- 16 Feb at 06:10
How to connect to database from Unity
I am trying to connect to a MS SQL database through Unity. However, when I try to open a connection, I get an IOException: Connection lost. I have imported System.Data.dll from Unity\Editor\Data\Mono...
- Modified
- 11 Jan at 07:42
The type appears in two structurally incompatible initializations within a single LINQ to Entities query
I'm trying to build something like conditional queries to get only needed data from the underlying database. Currently I have the following query (which works fine) ``` var eventData = dbContext.Eve...
- Modified
- 25 Aug at 07:52
Windows.UI.Notifications is missing
I want to create simple toast notification to action center in windows 10 from [this example](https://blogs.msdn.microsoft.com/tiles_and_toasts/2015/07/08/quickstart-sending-a-local-toast-notification...
What does "The following object is masked from 'package:xxx'" mean?
When I load a package, I get a message stating that: ``` "The following object is masked from 'package:xxx' ``` For example, if I load [testthat](http://www.rdocumentation.org/packages/testthat) th...
You have to be inside an angular-cli project in order to use the build command after reinstall of angular-cli
I had the latest angular-cli installed globally and my project was building successfully. While reading a suggested solution for another issue, ([https://github.com/angular/angular-cli/issues/917](...
- Modified
- 24 Aug at 22:10
Localization in ASP.Net core MVC not working - unable to locate resource file
In trying to localize my application, I've followed the steps here: [https://docs.asp.net/en/latest/fundamentals/localization.html](https://docs.asp.net/en/latest/fundamentals/localization.html) Here...
- Modified
- 2 Feb at 17:39
Groupby value counts on the dataframe pandas
I have the following dataframe: ``` df = pd.DataFrame([ (1, 1, 'term1'), (1, 2, 'term2'), (1, 1, 'term1'), (1, 1, 'term2'), (2, 2, 'term3'), (2, 3, 'term1'), (2, 2, 'term1...
- Modified
- 4 Nov at 07:50
Write to EventLog in .Net Core
I need a way to write to Windows' event viewer in my app that's using dnx. But, the `EventLog` class isn't available in the `System.Diagnostics` namespace so I'm stuck. Is there any other way to write...
Query the two cities in STATION with the shortest and longest CITY names,
Query: Query the 2 cities contained in STATION table with the shortest and longest CITY names, as well as their respective lengths (i.e.: number of characters in the name). If there is more than one s...
What is the equivalent of Type.GetGenericArguments() in .NETStandard 1.0 / .NET Core?
The method `System.Type.GetGenericArguments()` is 'missing' from .NETStandard 1.0, and I thought that the `TypeInfo.GenericTypeArguments` was the replacement for `GetGenericArguments()`, but unfortunt...
- Modified
- 10 Jan at 13:42
CMD (command prompt) can't go to the desktop
when I open the commend prompt the default line is this ``` C:\Windows\system32> ``` and I'm using SASS to convert a .scss file located located on my desktop. I know the default line should be saying...
How to get the name of <T> from generic type and pass it into JsonProperty()?
I get the following error with the code below: > "An object reference is required for the non-static field, method, or property 'Response.PropName'" Code: ``` public class Response<T> : Response...
There was an error running the selected code generator: 'Object reference not set to an instance of an object.' Error?
[](https://i.stack.imgur.com/SNj5M.png) I have tried all the solution like repairing the VS 2013 but no use. when you create a controller by right clicking on the Controller folder and you add the co...
- Modified
- 24 Aug at 16:29
ngModel cannot be used to register form controls with a parent formGroup directive
After upgrading to RC5 we began getting this error: ``` ngModel cannot be used to register form controls with a parent formGroup directive. Try using formGroup's partner directive "formControlName" ...
- Modified
- 11 Aug at 22:17
TypeScript - Append HTML to container element in Angular 2
What I want to do is simply to append some html on an element. I checked some links and found different confusing, non-working, non-recommended solutions. Using JavaScript, I'll do something like this...
- Modified
- 25 Aug at 15:34
Copy filtered data to another sheet using VBA
I have two sheets. One has the complete data and the other is based on the filter applied on the first sheet. Name of the data sheet : `Data` Name of the filtered Sheet : `Hoky` I am just taking a ...
Merge two objects with ES6
I'm sure this question has been asked before but I can't quite find the answer I'm looking for, so here goes: I have two objects, as follows: ``` const response = { lat: -51.3303, lng: 0.39440 }...
- Modified
- 24 Aug at 11:20
ReactJS - Call One Component Method From Another Component
I have two components. I want to call a method of the first component from the second component. How can I do it? Here is my code. ``` class Header extends React.Component{ constructor(){ ...
How to change base url of Swagger in ASP.NET core
By default when you enable swagger in ASP.NET Core project it's available on url: ``` http://localhost:<random_port>/swagger/ui ``` I would like to use a different base url instead of `/swagger/ui`...
- Modified
- 24 Aug at 06:37