Extract a page from a pdf as a jpeg
In python code, how can I efficiently save a certain page of a PDF as a JPEG file? Use case: I have a Python flask web server where PDFs will be uploaded and JPEGs corresponding to each page are store...
How to add custom header to ASP.NET Core Web API response
I am porting my API from Web API 2 to ASP.NET Core Web API. I used to be able to add a custom header in the following manner: ``` HttpResponseMessage response = new HttpResponseMessage(HttpStatusCod...
- Modified
- 12 Sep at 18:25
HTTP Request in Android with Kotlin
I want to do a login validation using POST method and to get some information using GET method. I've URL, server Username and Password already of my previous project.
Docker - Bind for 0.0.0.0:4000 failed: port is already allocated
I am using docker for the first time and I was trying to implement this - [https://docs.docker.com/get-started/part2/#tag-the-image](https://docs.docker.com/get-started/part2/#tag-the-image) At one st...
Error: More than one module matches. Use skip-import option to skip importing the component into the closest module
When I try to create a component in the angular cli, it's showing me this error. How do I get rid of it ? > Error: More than one module matches. Use skip-import option to skip importing the component...
- Modified
- 23 Nov at 09:36
Disambiguate between two constructors, when two type parameters are the same
Given ``` class Either<A, B> { public Either(A x) {} public Either(B x) {} } ``` How to disambiguate between the two constructors when the two type parameters are the same? For example,...
- Modified
- 12 Sep at 08:33
.NET - c# - Cross partition query is required but disabled trouble on DocumentDB data access
I have written the following code to fetch a record from the DocumentDB ``` private static void QueryDocuments1(DocumentClient client) { IQueryable<SearchInput> queryable = client.CreateDocument...
- Modified
- 25 Sep at 18:17
How to use log4net in Asp.net core 2.0
I configure `log4net` in my asp.net core 2.0 application as mentioned in this article [LINK](https://stackify.com/making-log4net-net-core-work/) program.cs ``` public static void Main(string[] args...
- Modified
- 13 Jun at 08:15
ReactJS - .JS vs .JSX
There is something I find very confusing when working in `React.js`. There are plenty of examples available on internet which use `.js` files with `React` but many others use `.jsx` files. I have read...
- Modified
- 12 Oct at 05:11
.net core 2.0 ConfigureLogging xunit test
In my xUnit integration test in my .NET Core 2.0 project I cannot see log messages in the terminal that also prints the test results. When the code is run in WebHost environment, the logs are printed ...
- Modified
- 12 Sep at 11:1
Authorization based on assigned Permission function
I have three `dbo.PermissionFunc`, `dbo.Roles`, `dbo.Permissions` for my `asp.net MVC web application`. `dbo.PermissionFunc` contains all the function name in my project. `dbo.Roles` contains the ...
- Modified
- 21 Sep at 05:18
How to use protobuff in the serviceStack framework
Do you have a corresponding example? I want to convert the transport format to protolbuff now. Thank you.
- Modified
- 12 Sep at 05:34
How to access TempData in my own utility class? Or TempData is null in constructor
I use TempData in some of my Views/Actions but I'd like to extract that into some class. The problem is if I try to create my class in Controller's constructor, the TempDate there is null. Better yet,...
- Modified
- 11 Sep at 22:16
Getting "The connection does not support MultipleActiveResultSets" in a ForEach with async-await
I have the following code using Dapper.SimpleCRUD : ``` var test = new FallEnvironmentalCondition[] { new FallEnvironmentalCondition {Id=40,FallId=3,EnvironmentalConditionId=1}, new FallEnvir...
- Modified
- 3 Dec at 10:11
How to get scalar value from a SQL statement in a .Net core application?
The following code in a .Net core console application (EF core 2.0/Sql server). ``` var sql = _context.Set<string>() .FromSql("select dbo.FunctionReturnVarchar({0});", id); ``` got the fo...
- Modified
- 5 Nov at 23:11
SignalR - Works when deployed to Server, but stops after a few hours (MVC)
EDIT: Look at the bottom of this post for updates. My SignalR implementation works perfectly on my local system. But when I deployed it out to my server it doesnt seem to work. Its an MVC project. M...
- Modified
- 14 Sep at 11:50
Asp.Net Core 2.0-2.2 Kestrel not serving static content
When running a Asp.Net Core 2.0 (or 2.2) app using IIS express, static files (css, js) are served as expected. However when using command line/Kestrel via "dotnet publish -o [targetDirectory]" and do...
- Modified
- 17 Jul at 08:56
Map category parent id self referencing table structure to EF Core entity
Database Table: [](https://i.stack.imgur.com/MX0Qc.png) I tried this approach to map the category table to EF core: ``` protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBu...
- Modified
- 12 Oct at 17:30
Attach to running process inside docker from VS2017
Is there an easy way to debug a process running inside a Linux container on a remote host from Visual Studio? Imagine a scenario where we have multiple services deployed on some remote machine, runni...
- Modified
- 13 Sep at 03:15
kafka broker not available at starting
I set on a ubuntu node of a cluster a kafka 0.11.0.0 instance. Until some weeks ago everything worked fine, today I'm trying to starting it and I obtain this error after the boot: ``` [2017-09-11 16:...
- Modified
- 11 Sep at 14:36
ASP.Net Core register Controller at runtime
I am asking myself if it is possible to load a DLL with `Controller`s in it at runtime and use it. The only solution I've found is to add an assembly via `ApplicationPart` on the `StartUp`: ``` var ...
- Modified
- 11 Sep at 13:33
How to POST via a link in ASP.NET Core
I try to POST to the SetLanguage action via a link, but not sure how to finalize the following code: ``` <form id="selectLanguage" asp-controller="Home" asp-action="SetLanguage" asp-route-returnUrl=...
- Modified
- 11 Sep at 12:44
laravel 5.5 The page has expired due to inactivity. Please refresh and try again
I'm new with Laravel and I have a problem which I don't understand. I have а log form in my project and my method is . When I try a request the result is: > 'The page has expired due to inactivity. ...
Prevent pushing to master on GitHub?
GitHub allows you to configure your repository so that [users can't force push to master](https://github.com/blog/2051-protected-branches-and-required-status-checks), but is there a way to prevent pus...
- Modified
- 10 Sep at 23:34
ServiceStack request POST body as query string
I am trying to implement an IPN handler in C# and I am using ServiceStack as my backend framework. I am facing the following issue however; I am trying to find a way to take the POST body of a reques...
- Modified
- 10 Sep at 22:34