LINQ: failed because the materialized value is null
I'm trying to use sum in code below but I get the error: > The cast to value type 'System.Int32' failed because the materialized > value is null. Either the result type's generic parameter or the quer...
"Async All the Way Down": Well, what's all the way at the bottom?
I'm trying to fully understand `async`-`await` and one of the gaps in my understanding is seeing what is "All the Way Down." I create an `async` method, it is called by another `async` method, etc., a...
- Modified
- 3 Jan at 07:52
Why do I get Cannot read property 'toString' of undefined
I use [this](https://github.com/dodo/node-slug) package. I've added these `console.log`'s at the beginning of the slug function. ``` function slug(string, opts) { console.log('log 1: -------'); ...
- Modified
- 3 Jan at 10:2
Azure B2C: How do I get "group" claim in JWT token
In the Azure B2C, I used to be able to get a "groups" claim in my JWT tokens by following [Retrieving Azure AD Group information with JWT](https://stackoverflow.com/questions/26846446/retrieving-azure...
- Modified
- 1 Feb at 14:39
Expression of type T cannot be handled by a pattern of type X
I have upgraded my project to target C# 7 and used Visual Studio 2017 RC to implement pattern matching across my solution. After doing this some errors were introduced relating to pattern matching wit...
- Modified
- 3 Jan at 04:23
Why would I want to use an ExpressionVisitor?
I know from the MSDN's article about [How to: Modify Expression Trees](https://msdn.microsoft.com/en-us/library/mt654266.aspx) what an `ExpressionVisitor` is supposed to do. It should modify expressio...
- Modified
- 2 Jan at 20:35
How to decrease prod bundle size?
I have a simple app, initialized by `angular-cli`. It display some pages relative to 3 routes. I have 3 components. On one of this page I use `lodash` and Angular 2 HTTP modules to get some data (usi...
- Modified
- 22 Aug at 14:23
How to convert FormData (HTML5 object) to JSON
How do I convert the entries from a HTML5 `FormData` object to JSON? The solution should not use jQuery. Also, it should not simply serialize the entire `FormData` object, but only its key/value entri...
- Modified
- 31 Dec at 13:36
Update Entity from ViewModel in MVC using AutoMapper
I have a `Supplier.cs` Entity and its ViewModel `SupplierVm.cs`. I am attempting to update an existing Supplier, but I am getting the Yellow Screen of Death (YSOD) with the error message: > The operat...
- Modified
- 4 Jun at 03:44
ServiceStack client compression
I want to compress the request sent from a client. I've found the Q/A: [ServiceStack - How To Compress Requests From Client](https://stackoverflow.com/questions/34211036/servicestack-how-to-compress-...
- Modified
- 23 May at 12:8
group by using anonymous type in Linq
Let say I have an Employee class, and GetAllEmployees() return a list of employee instance. I want to group employees by Department and Gender, so the answer I have is ``` var employeeGroup = Employ...
Task.WhenAny - What happens with remaining running tasks?
I have the following code: ``` List<Task<bool>> tasks = tasksQuery.ToList(); while (tasks.Any()) { Task<bool> completedTask = await Task.WhenAny(tasks); if (await completedTask) return...
- Modified
- 21 Oct at 13:6
Vue.JS - how to use localStorage with Vue.JS
I am working on Markdown editor with Vue.JS, and I tried to use localStorage with it to save data but I don't know how to save new value to data variables in Vue.JS whenever the user types!
- Modified
- 9 Jan at 08:2
Suggest data structure suitable for key range lookup
I am looking for data structure similar to SCG.Dictionary but having number ranges as keys. Main operation where the most of performance is required would be lookup for keys overlapping with the spec...
- Modified
- 2 Jan at 09:5
How does Facebook Graph API Pagination works and how to iterate facebook user feed with it?
I have a facebook Graph API call to get a facebook users feed: ``` dynamic myFeed = await fb.GetTaskAsync( ("me/feed?fields=id,from {{id, name, picture{{url}} }},story,picture,lin...
- Modified
- 25 Apr at 00:17
Application and User Authentication using ASP.NET Core
Can anyone point me to some good documentation or provide good information on the best way to implement authentication and authorisation for an ASP.NET Core REST API.I need to authenticating and autho...
- Modified
- 1 Jan at 18:18
RestSharp get full URL of a request
Is there a way to get the full url of a RestSharp request including its resource and querystring parameters? I.E for this request: ``` RestClient client = new RestClient("http://www.some_domain.com"...
How to list all versions of an npm module?
In order to see all the versions of a node module [webpack], I have executed below command in windows command prompt ``` npm view webpack versions ``` This command only displays first 100 versions ...
ImportError: No module named 'tensorflow.python'
here i wanna run this code for try neural network with python : ``` from __future__ import print_function from keras.datasets import mnist from keras.models import Sequential from keras.layers imp...
- Modified
- 26 Jun at 12:1
Get random items with fixed length of different types
I have a `List<Fruit>`, ``` public class Fruit { public string Name { get; set; } public string Type { get; set; } } ``` and the list above contains 30 Fruit objects of two types: `Apple` a...
How to get Microsoft.Extensions.Logging<T> in console application using Serilog and AutoFac?
We have common BL classes in a ASP.NET Core application that get in the ctor: `Microsoft.Extensions.Logging.ILogger<Foo>` In ASP.NET Core, the internal infrastructure of ASP.NET handles getting the ...
- Modified
- 1 Jan at 15:11
Does bootstrap 4 have a built in horizontal divider?
Does bootstrap 4 have a built in horizontal divider? I can do this, ``` <style type="text/css"> .h-divider{ margin-top:5px; margin-bottom:5px; height:1px; width:100%; border-top:1px solid gray; ...
- Modified
- 31 Dec at 19:27
Startup.cs in a self-hosted .NET Core Console Application
I have a self-hosted . The web shows examples for but I do not have a web server. Just a simple command line application. Is it possible to do something like this for console applications? ``` public...
- Modified
- 7 Jun at 04:22
Why is tail call optimization not occurring here?
We are using recursion to find factors and are receiving a StackOverflow exception. We've read that [the C# compiler on x64 computers performs tail call optimizations](https://github.com/dotnet/roslyn...
- Modified
- 31 Dec at 04:31