Alex Frost
❔ Change datatype during program execution
I have following two properties:
private ContextType ExportContext = 0;
private List<T> SelectedItems { get; set; } = new();
During execution, value of ContextType can be changed by user only if SelectedItems is empty.
Based on value of ExportContext, I want to change the datatype T. Is that possible?
10 replies
❔ Delayed call to a function
I am writing search in Blazor and the search needs to happen without enter or tab press.
What I want is for a timer to be incremented on each key-press and once typing stops and delay is achieved, it should call the function.
Few of the methods I tried call the search many times.
5 replies
❔ Adding OCR text to PDF file
I have PDF files with scanned pages. I want to keep source image without resizing it, performing OCR and adding OCR text to the file.
What I have for now is, I use PdfSplitter which converts pages to images, upscaling them, then tesseract to OCR the images and construct a PDF file.
Due to upscaling, the resulting file gains significant size and if OCR is performed multiple times due to un-desired results, the file keeps gaining size.
2 replies
Help with Implicit Explicit operators
This is my operator definition
I've not been able to find the exacts. With this definition, will it convert from Entry to ViewModel or ViewModel to Entry? Because, with the said implementation, following conversion doesn't work:
EventData = Context.Entries.Where(e => e.UserId == UserId);
The error is Can't convert from IQueryable<Entry> to IQueryable<ViewModel>12 replies
Pass DateTime.Add function as parameter
I have a switch statement that will call a generation function so I don't have to loop for every scenario:
The function needs to be something like this:
However I'm not able to pass the function being non-static. Is there a way to achieve this or a better approach?
8 replies