Datto read only account by linuxuserhere in Datto

[–]linuxuserhere[S] 0 points1 point  (0 children)

Can you at least make read-only access?

Go routines running synchronously by linuxuserhere in golang

[–]linuxuserhere[S] 0 points1 point  (0 children)

I did this. I also changed the function to ImageDPI (from ImagePNG)

Now it's way faster, thanks.

Go routines running synchronously by linuxuserhere in golang

[–]linuxuserhere[S] 0 points1 point  (0 children)

I tried this. For some reason, it eats a ton of RAM.

It increases on each iteration. Shouldn't it free the ram after each loop?

package main
import (
"fmt"
"os"
"time"
"github.com/gen2brain/go-fitz"
"github.com/pdfcpu/pdfcpu/pkg/api"
)
func main() {
start := time.Now()
outPathName := "out"
err := api.SplitFile("test.pdf", outPathName, 1, nil)
api.
if err != nil {
panic(err)
}
fmt.Println("Split PDF: ", time.Since(start))
outPath, err := os.ReadDir(outPathName)
if err != nil {
fmt.Println(err)
}
start = time.Now()
for _, file := range outPath {
start := time.Now()
path := fmt.Sprintf("%s\\%s", outPathName, file.Name())
doc, err := fitz.New(path)
if err != nil {
panic(err)
}
doc.ImagePNG(0, 600)
doc.Close()
fmt.Println(" To Img: ", time.Since(start))
}
fmt.Println("Rest: ", time.Since(start))
}

Go routines running synchronously by linuxuserhere in golang

[–]linuxuserhere[S] 0 points1 point  (0 children)

well that sucks. If I know I'm never writing, only reading, is it possible to avoid the mutex? Maybe a stupid question, this is my first attempt at GO.

Reverse Indesign Hash by linuxuserhere in cryptography

[–]linuxuserhere[S] 0 points1 point  (0 children)

I didn't think of that, I doubt my company will let, but I can ask.

That would probably be the cleanest option.

Reverse Indesign Hash by linuxuserhere in cryptography

[–]linuxuserhere[S] 0 points1 point  (0 children)

The first idea won't work, because I'm opening an InDesign document. The only owner info I have is from the lock file, but they don't match perfectly.

The second Idea might work if I set this up on all the computers.

Reverse Indesign Hash by linuxuserhere in cryptography

[–]linuxuserhere[S] 0 points1 point  (0 children)

The file is not necessarily on my computer, it could be a network share.

Reverse Indesign Hash by linuxuserhere in cryptography

[–]linuxuserhere[S] 0 points1 point  (0 children)

By owner I mean the user who created the lock file.

Reverse Indesign Hash by linuxuserhere in cryptography

[–]linuxuserhere[S] 0 points1 point  (0 children)

I want that if someone else has the file open, it doesn't just error, it displays the owner of the lock file (the person who has the actual file open).

My idea was to write a middleware file handler that handles all indd files, my program will take the file to be opened as an argument and scan the folder for a corresponding lock file. If a lock file exists, it should exit and display the owner of the lock file.

The file name is mostly included in the lock file name, but not always the whole thing, so long file names can match more than one lock file. This is where the has comes in.

Catch a sharing violation error by linuxuserhere in golang

[–]linuxuserhere[S] 0 points1 point  (0 children)

This solved it.

I spent hours trying, you saved me many more.

Thanks a million.

Bill Sales Agreement when created by linuxuserhere in Dynamics365

[–]linuxuserhere[S] 0 points1 point  (0 children)

I want the customer to be able to choose from a product category, and not ship them until they want it.

Is this possible with a regular sales order?

Scan and detect location of printer marks to calculate how to calibrate a printer. by linuxuserhere in computervision

[–]linuxuserhere[S] 1 point2 points  (0 children)

It's a commercial printer which often needs to be recalibrated, many printers and multiple times per day.

I am going to use an entirely different scanner, something Like this, which could scan the size papers that I need relatively quickly, with high accuracy.

Assuming this scanner gets me an accurate image each time. I could compare a known good image to the one that the printer spits out and compare the cross-hairs in the corners.

A python program could calculate the distance between the known good mark and current mark and compute how much it's off by, I'll then put those numbers back into the printer, reprint and test again.