|
|
Yuppers wrote: Do I need to compile 3 separate packages,...
What you actually need to do specifically is test it in all of the environments you are going to claim to support. If it works (when tested) then you do not need to do anything differently. If it fails testing then you will need to decide what changes are needed.
|
|
|
|
|
You might consider whether .NET 7 is appropriate versus .NET 6. The pattern has generally been for every other .NET release to be an LTS (long-term service~3yrs) release versus an STS (~1.5yrs) release.
.NET 7 will hit end of support May 14, 2024.
.NET 6 will hit end of support November 12, 2024.
Meanwhile, we should see an LTS of .NET 8 in November.
|
|
|
|
|
Free code for Convert image pdf to text in c#
|
|
|
|
|
Are you looking for this, or offering it for others?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
"me too" means what? What EXACTLY are you looking for?
|
|
|
|
|
I suspect this might be an attempt to get enough rep points to display the link to his "cryptocurrency" site in his profile.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Ah, yet another yahoo who calls himself "CEO".
|
|
|
|
|
There is no difference in type of PDF between a PDF with all text and a PDF with all images and a PDF with both text and images. I assume image PDF means image in a PDF. When an image is extracted from a PDF it is the same as if the image was not in the PDF.
|
|
|
|
|
Here's a working API using Tesseract. Not pretty but it works.
GitHub - LeeKirkHawley/KOCR_Web[^]
Recursion is for programmers who haven't blown enough stacks yet.
|
|
|
|
|
Message Removed
modified 24-Nov-22 2:41am.
|
|
|
|
|
Message Removed
modified 24-Nov-22 2:41am.
|
|
|
|
|
Has anyone found that?
Just tried upgrading a hand-rolled ML console application from .NET 6 to .NET 7 and found it was slower. In my example it went from 0.55s to 0.7s. Tried this several times in each case.
Previously, the time had almost halved in going from .NET 4.8 to 6.0.
I'm not using any packages.
Kevin
|
|
|
|
|
If you want to learn more, add stopwatches to see which "parts" are slower. Startup? Shutdown? Something else? What's the footprint? Debug versus release?
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Gerry Schmitz wrote: What's the footprint? Debug versus release?
Release vs Release vs Release. No code changes apart from using top-level statements when I went from .NET 4.8 to .NET 6.
This is just a sample from a book. Not important, but just curious as it defied my expectations.
Kevin
|
|
|
|
|
It shouldn't be slower. I'd suggest reporting the problem on the .NET GitHub repo[^], along with the simplest reproduction of the problem you can get, and the relevant benchmarks from .NET 6 and 7.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Reported issue. They suggested running from console with DOTNET_TC_QuickJitForLoops=0 env var defined.
That speeds it up slightly, although 6.0 is still a bit faster. I read somewhere that in 6.0, setting that to 0 speeds things up but that in .NET 7 there's no difference. Though to me it looks like it might be the other way round!
So for 6.0 I get 0.53/0.54s (two successive runs). For 7.0 it is 0.57/0.58s.
Still, nothing worth bothering about.
Kevin
|
|
|
|
|
Just out of curiosity:
What is the reason, that the following code doesn't compile under Visual Studio:
int main(array<System::String ^> ^args)
{
array<int>^ l = {1,2,3};
for each (int a in l)
if (a % 2 == 1)
Console::WriteLine ("even");
else
Console::WriteLine ("odd");
return 0;
}
This results in the error "else without if".
One needs to use a compound statements around the if-else-statement.
Using a standard for-loop this works as expected, of course:
int main(array<System::String ^> ^args)
{
array<int>^ l = {1,2,3};
for (int i = 0; i < l->Length; ++i)
if (l[i] % 2 == 1)
Console::WriteLine ("even");
else
Console::WriteLine ("odd");
return 0;
}
|
|
|
|
|
Dunno, but odd/even appear to be transposed (or the if(%) incorrect).
%2 == 0 would be even?
|
|
|
|
|
Yeah, right, typo.
But this is not the point of the question!
|
|
|
|
|
Hi,
RollBack method; Roll back whatever changes have been made to the database.
Following example I didn't use Commit(), what will RollBack() do?
What exactly did transaction.Rollback() do?
using (var context = new AppDbContext())
{
using (var transaction = context.Database.BeginTransaction())
{
try
{
var myObjectOne = new MyObjectOne() { Name = "Book" };
context.MyObjectOnes.Add(myObjectOne);
context.SaveChanges();
var myVal = myObjectOne.Id * 3.14;
var myObjectTwo = new MyObjectTwo() { Name = "Notebook", Price = 100, ReferenceId = myVal };
context.MyObjectTwos.Add(myObjectTwo);
context.SaveChanges();
transaction.Commit();
}
catch (Exception ex)
{
transaction.Rollback();
}
}
}
thanks...
|
|
|
|
|
|
Thanks for the answer @Richard-MacCutchan
I read the article, but I didn't get the exact answer to my question. The EF Core working structure is different. Each process is primarily tracked on the memory.
Makes my question a little clearer. What is the difference in effect between the two codes below?
FIRST CODE:
using (var context = new AppDbContext())
{
using (var transaction = context.Database.BeginTransaction())
{
try
{
var myObjectOne = new MyObjectOne() { Name = "Book" };
context.MyObjectOnes.Add(myObjectOne);
context.SaveChanges();
var myVal = myObjectOne.Id * 3.14;
var myObjectTwo = new MyObjectTwo() { Name = "Notebook", Price = 100, ReferenceId = myVal };
context.MyObjectTwos.Add(myObjectTwo);
context.SaveChanges();
transaction.Commit();
}
catch (Exception ex)
{
transaction.Rollback();
}
}
}
SECOND CODE:
using (var context = new AppDbContext())
{
using (var transaction = context.Database.BeginTransaction())
{
try
{
var myObjectOne = new MyObjectOne() { Name = "Book" };
context.MyObjectOnes.Add(myObjectOne);
context.SaveChanges();
var myVal = myObjectOne.Id * 3.14;
var myObjectTwo = new MyObjectTwo() { Name = "Notebook", Price = 100, ReferenceId = myVal };
context.MyObjectTwos.Add(myObjectTwo);
context.SaveChanges();
transaction.Commit();
}
catch (Exception ex)
{
}
}
}
|
|
|
|
|
Probably not much, but pay attention to the documentation:
Dispose should rollback the transaction. However, the behavior of Dispose is provider specific, and should not replace calling Rollback .
In other words, the using block should roll-back the transaction if you haven't called Commit ; but different database providers might not implement that correctly, and might require you to explicitly call Rollback .
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|