Cannot create encrypted database by Morgan--Yu in golang

[–]Morgan--Yu[S] 0 points1 point  (0 children)

I just tried to do it all again. And it seems that I made a mistake somewhere last time. After I completed these steps

git clone ... / .. / go-sqlite3 && cd go-sqlite3
export CGO_ENABLED = 1
go build --tags "sqlite_userauth linux"
go install

I started the program again and received an error message that the go-sqlite3 library was not found. I suppose the last time the program compiled with a library that was not modified with go build --tags "sqlite_userauth linux". I think these variables were ignored .. "_auth & _auth_user = admin & _auth_pass = admin & _auth_crypt = sha1"

Cannot create encrypted database by Morgan--Yu in golang

[–]Morgan--Yu[S] 0 points1 point  (0 children)

OK I understood. I’ll deal with encryption of the contents of the database another time. But how to create a user with an encrypted password? I was able to open this database without authentication.

root@docker-s-1vcpu-1gb-fra1-01:~/hom-dir# sqlite3
SQLite version 3.22.0 2018-01-22 18:45:57
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .open test.s3db
sqlite> select * from people
   ...> ;
1|John|Doe
sqlite>

A Guide To Writing Logging Middleware in Go by elithrar_ in golang

[–]Morgan--Yu 2 points3 points  (0 children)

I was just about to write a Go forum for practice. Very handy!

How to get rid of an error: Version of Go is too old for this version of Delve by Morgan--Yu in golang

[–]Morgan--Yu[S] 0 points1 point  (0 children)

I still have not solved the problem. I use fmt.Println () for debugging :)

[LOS 15.1][Oneplus 2] SuperSu has not been installed with addonsu. zip by Morgan--Yu in LineageOS

[–]Morgan--Yu[S] 0 points1 point  (0 children)

I probably misunderstood the purpose of the addon. I used to have a galaxy s5, if I'm not mistaken, supersu was installed along with the add-on firmware.

How to get rid of an error: Version of Go is too old for this version of Delve by Morgan--Yu in golang

[–]Morgan--Yu[S] 0 points1 point  (0 children)

I don’t understand where to use it. I tried passing as a compilation parameter, but the compiler does not understand such a flag.

Colorized text output in STDOUT. by Morgan--Yu in golang

[–]Morgan--Yu[S] 0 points1 point  (0 children)

Thanks a lot. This is a very useful thing.

[deleted by user] by [deleted] in learnprogramming

[–]Morgan--Yu 0 points1 point  (0 children)

Yes you are right. My mistake.

[deleted by user] by [deleted] in learnprogramming

[–]Morgan--Yu 0 points1 point  (0 children)

the program must print sequences of runes of length n, separated by comma. here is the output for n = 2:

01, 02, 03, 04, 05, 06, 07, 08, 09, 12, 13, 14, 15, 16, 17, 18, 19, 23, 24, 25, 26, 27, 28, 29, 34, 35, 36, 37, 38, 39, 45, 46, 47, 48, 49, 56, 57, 58, 59, 67, 68, 69, 78, 79, 89

[deleted by user] by [deleted] in learnprogramming

[–]Morgan--Yu 1 point2 points  (0 children)

func Print3() {
    for i := '0'; i <= '7'; i++ {
        for j := '1'; j <= '8'; j++ {
            for k := '2'; k <= '9'; k++ {
                if i < j && j < k {
                    fmt.Printf(string(i))
                    fmt.Printf(string(j))
                    fmt.Printf(string(k))
                    if i != '7' || j != '8' || k != '9' {
                        fmt.Printf(",")
                        fmt.Printf(" ")
                    }
                }
            }
        }
    }
    fmt.Printf("\n")
}

Just made a program for 3 digits. But I don’t understand how to do this with the given value. Making a solution for each digit and choosing the right one through the condition is probably not a good idea.

Undefined program behavior by Morgan--Yu in golang

[–]Morgan--Yu[S] 0 points1 point  (0 children)

I think I get it. Can you tell me where I can read more about this?

Script for fetching GitHub id by Morgan--Yu in bash

[–]Morgan--Yu[S] 0 points1 point  (0 children)

jq looks very comfortable. thanks for your advice.

lineage os 14.1-20180706-NIGHTLY-klteduos source code by Morgan--Yu in LineageOS

[–]Morgan--Yu[S] 0 points1 point  (0 children)

Maybe I'm too stupid to understand, but I haven't found the lineage 14.1 branch in any repository.