Get class labels from Keras functional model
I have a functional model in Keras (Resnet50 from repo examples). I trained it with `ImageDataGenerator` and `flow_from_directory` data and saved model to `.h5` file. When I call `model.predict` I get...
Is there a speed different between servicestack.redis GetAll().where() and GetByIds()
I was using servicestack.redis recently, and I need query from `IRedisTypedClient`. I know all data is in memory, but still want to know, is there a speed different between `GetAll().Where()` and `Get...
- Modified
- 3 Jul at 13:47
Could not find Microsoft.DiaSymReader.Native.x86.dll
I'm trying to build a project in Rider using Mono and I can keep on getting this error: > Error CS0041: Unexpected error writing debug information -- 'Windows PDB writer is not available -- could n...
Authorization has been denied for this request - New Web API Project
I just created new Web API project (using MVC) in visual studio 2015 and for the testing purpose, I ran that project but ended up below error. After running the project, it brings up Home Page correc...
- Modified
- 15 Aug at 21:50
Adding an image in UWP?
I have been looking online for hours trying to find a way to insert a simple image into my Universal Windows Application. All the tutorials I have found so far have been too confusing or just don't wo...
"Build failed" on Database First Scaffold-DbContext
I'm trying to generate classes from a database (EntityFramework's database first approach). For convenience, I'm more or less walking along with this tutorial: [https://docs.efproject.net/en/latest/p...
- Modified
- 15 Aug at 18:49
ServiceStack doesn't auto-wire and register AppSettings
ServiceStack (4.0.62) doesn't register and auto-wire AppSettings property. I even don't know how to debug this situation, maybe somebody can explain it. So, I have ServiceStack-based self-hosted con...
- Modified
- 15 Aug at 18:34
sequence contains no elements Error Max()
I am Getting: > sequence contains no elements ``` private int? GetPrecedingSibling(int? contentid,int? templateid) { var value = _sequenceTemplateItemService.Query(e => e.templateId == templatei...
- Modified
- 15 Aug at 13:51
What is a proper way of writing entity POCO classes in Entity Framework Core?
EF Core has a "code first mentality" by default, i.e. it is supposed to be used in a code-first manner, and even though database-first approach is supported, it is described as nothing more than rever...
- Modified
- 15 Aug at 11:20
Model-bind interface property with Web API
I have a command looking like: ``` public interface ICommand { // Just a marker interface } public interface IUserAware { Guid UserId { get; set; } } public class CreateSomething : ICommand...
- Modified
- 18 Aug at 09:44
How to Setup a readonly property with Moq?
I am trying to unit test using Moq. Here is the example code: ``` public class ConcreteClass { private readonly FirstPropery firstProperty; private readonly SecondProperty secondProperty; ...
- Modified
- 20 Apr at 09:53
Google Sheets API returns "The caller does not have permission" when using server key
I've generated a server key in the API Manager and attempted to execute the following on my Mac: ``` curl 'https://sheets.googleapis.com/v4/spreadsheets/MySheetID?ranges=A1:B5&key=TheServerKeyIGenera...
- Modified
- 15 Aug at 04:27
Using Ormlite to Group query conditions
I'm trying to generate the SQL query which looks something like this: ``` SELECT * FROM Contact Where UserId = @UserId AND (FirstName = 'John' OR Surname = 'Smith') ``` This is what I can do: ``` ...
- Modified
- 16 Aug at 23:34
debugger is looking for executioncontext.cs, how to fix?
I am debugging this code and getting a strange "source not found" page that is looking for this class called ExecutionContext.cs when the debugger lands on the Jtoken line. > `ExecutionContext.cs` no...
- Modified
- 19 Jul at 20:55
Fetching distinct values on a column using Spark DataFrame
Using Spark 1.6.1 version I need to fetch distinct values on a column and then perform some specific transformation on top of it. The column contains more than 50 million records and can grow larger. ...
- Modified
- 15 Sep at 10:11
access cookie in _Layout.cshtml in ASP.NET Core
I'm trying to store an authentication-key into my cookies when login succeeded: ``` HttpContext.Response.Cookies.Append("Bearer", accessToken, cookieMonsterOptions); ``` So in the controller-class ...
- Modified
- 14 Aug at 19:58
How to get `DOM Element` in Angular 2?
I have a component that has a `<p>` element. It's `(click)` event will change it into a `<textarea>`. So, the user can edit the data. My question is: - `textarea`- `.focus()`- `document.getElemenntByI...
How do I return JSON from an Azure Function
I am playing with [Azure Functions](https://azure.microsoft.com/en-us/services/functions/). However, I feel like I'm stumped on something pretty simple. I'm trying to figure out how to return some bas...
- Modified
- 12 Jan at 13:27
Xpath: select div that contains class AND whose specific child element contains text
With the help of [this SO question](https://stackoverflow.com/questions/19503721/xpath-find-a-node-whose-class-attribute-matches-a-value-and-whose-text-contains) I have an almost working xpath: ``` /...
- Modified
- 23 May at 12:10
Does it make sense to use MetadataType to enforce validations in case of Code First?
I seem to understand the reason behind taking help of `MetadataTypeAttribute` to [Add Validation to the Model](http://www.asp.net/mvc/overview/getting-started/database-first-development/enhancing-data...
- Modified
- 3 Oct at 10:44
Verify host key with pysftp
I am writing a program using pysftp, and it wants to verify the SSH host Key against `C:\Users\JohnCalvin\.ssh\known_hosts`. Using PuTTY, the terminal program is saving it to the Registry `[HKEY_CURRE...
- Modified
- 13 Apr at 19:55
How to open Visual Studio Code with admin privileges to make effect of the installed extensions
I have Ubuntu 16.04 and I have to download the C# extension for Visual Studio Code, once I installed it, It doesn't make effect. Then, vscode give me and advice that I should open vscode with admin pr...
- Modified
- 23 Apr at 15:0
ServiceStack Razor Intellisense not working in SelfHost
I have ServiceStack.Razor referenced. Following razor file works great: ``` @model ServiceStack.Host.Operation @Model.Name ``` but IntelliSense (and R# code analysis) shows error: Referencing M...
- Modified
- 23 May at 12:0
Chrome dev tools fails to show response even the content returned has header Content-Type:text/html; charset=UTF-8
Why does my Chrome developer tools show > Failed to show response data in response when the content returned is of type text/html? What is the alternative to see the returned response in developer too...
- Modified
- 16 Oct at 08:53
Add property to an array of objects
I have an array of objects as shown below ``` Object {Results:Array[2]} Results:Array[2] [0-1] 0:Object id=1 name: "Rick" 1:Object id=2 name:'david' ``` I...
- Modified
- 4 Dec at 06:25