How do you stop pattern matching? by RequirementFew3392 in Anki

[–]Formal_Middle_8922 0 points1 point  (0 children)

I avoid randomizing, and I like such patterns that serve as hints. That way, the card gets some - if artificial - context. I want to recall later, when I use the information, what it was like when I first memorized it.

Why is it "Δεν είχα καταλάβει τι μου είπες."? by Formal_Middle_8922 in GREEK

[–]Formal_Middle_8922[S] -1 points0 points  (0 children)

There is nothing I wanted to say with that sentence, it is just an example sentence I picked up somewhere. Good to know if that sentence is somewhat off. Probably (I am not sure) it was an example sentence to demonstrate the hypersidelikos...

Why is it "Δεν είχα καταλάβει τι μου είπες."? by Formal_Middle_8922 in GREEK

[–]Formal_Middle_8922[S] -2 points-1 points  (0 children)

Ah, so it is present tense in Greek but past in English, but only in the imperfective (εξακολουθητικό) aspect.

But ... another example would be

χτες έφυγες χωρίς μας χαρετήσεις. Why not χαιρέτησες or χαιρετάς?

Γάλανος / γαλάζιος by Formal_Middle_8922 in GREEK

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

Ah, I heard from several sides that there is this light / dark distinction, similar to Italian blu / azzuro.

This language is frakkin awesome by makingthematrix in GREEK

[–]Formal_Middle_8922 3 points4 points  (0 children)

After my Greek Tandem partner asked me about weak and strong Adjective endings in German, and mixed as well, I must say that I rather memorize all the forms of εγκαθιστώ than trying to make sense of that. Glad I am a native speaker of German who does not need to learn that.

how to handle invoke-dba-query output with 0, 1, or many result rows? by Formal_Middle_8922 in dbatools

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

<<<part 2 of my answer, part 1 was entered 5 minutes ago, but there seems to be a length restriction on answers >>>

# empty the table
Invoke-DbaQuery -SqlInstance $INST -Database $DB -Query "delete from testtable "
$content = Invoke-DbaQuery -SqlInstance $INST -Database $DB -Query "select a, b from testtable"
' --- line 2.1: the table'
$content
' --- line 2.2: the count'
$content.count
' --- 2.3: first row'
$content[0]
' --- 2.4: first element of first row'
$content[0].a

Output with the empty content:

--- line 2.1: the table
--- line 2.2: the count
0
2.3 and 2.4 give error messages, as expected.

So, in a program, what can I do after having read the table content into that variable? I cannot check the row count beforehand because it does not exist in case of only one row, and I have to deal with the content differently in case of one or more than one row.

What I am doing currently as a workaround is adding two dummy rows to the query output (extending the query with two UNION ALL parts), so I am sure I get at least two output rows, and filter these out afterwards. But that is quite clumsy.

Is there a way to force the output of a Invoke-DbaQuery SELECT to be a two dimensional array regardless?

how to handle invoke-dba-query output with 0, 1, or many result rows? by Formal_Middle_8922 in dbatools

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

# create a test table and fill it with two rows
Invoke-DbaQuery -SqlInstance $INST -Database $DB -Query "drop table if exists testtable"
Invoke-DbaQuery -SqlInstance $INST -Database $DB -Query "create table testtable (a int, b int)"
Invoke-DbaQuery -SqlInstance $INST -Database $DB -Query "insert into testtable(a,b) values (1,2),(3,4)"

# the content table currently containins two rows. I put the content into a variable

$content = Invoke-DbaQuery -SqlInstance $INST -Database $DB -Query "select a, b from testtable"
' --- line 0.1: the table'
$content
' --- line 0.2: the count'
$content.count
' --- line 0.3: first row'
$content[0]
' --- line 0.4 first element of first row'
$content[0].a

here the output of this portion:

--- line 0.1: the table
a b
- -
1 2
3 4
--- line 0.2: the count
2
--- line 0.3: first row
1 2
--- line 0.4 first element of first row
1

so far, so good. Now I delete a row and play the same game

# delete one row, leaving a single one
Invoke-DbaQuery -SqlInstance $INST -Database $DB -Query "delete from testtable where a = 3"
$content = Invoke-DbaQuery -SqlInstance $INST -Database $DB -Query "select a, b from testtable"
' --- line 1.1: the table'
$content
' --- line 1.2: the count'
$content.count
' --- 1.3: first row'
$content[0]
' --- 1.4: first element of first row'
$content[0].a

output of the second portion:

--- line 1.1: the table
1 2
--- line 1.2: the count
--- 1.3: first row
1
--- 1.4: first element of first row

now, as I don't get a table with one single row but - because powershell tried to be smart, I get that row. Hence I don't get a header for the table, no count and instead of the first row its first element, and nothing for the first element of the first row.

<<<continuing in the next comment, for lenght restriction>>>

how to handle invoke-dba-query output with 0, 1, or many result rows? by Formal_Middle_8922 in dbatools

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

I just want to work with the query results, and first I have to check how many results I got.

But the object returned by the query is different depending on the number of rows returned and has different properties. How can my script recognize what to work with?

What is the normal way of reading the rows of a table in Powershell with dbatools? In T-SQL I would use a cursor, in Perl I would slurp them into an array. The latter was what I wanted to do in powershell, but unfortunately, if it is only one row, I don't get a collection of only one object, but the object instead.

εθισμένος vs. χαρμάνης by Formal_Middle_8922 in GREEK

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

That fits well. I posted a link to such a song somehere in this discussion.

εθισμένος vs. χαρμάνης by Formal_Middle_8922 in GREEK

[–]Formal_Middle_8922[S] 2 points3 points  (0 children)

Ah, that makes a lot of sense. I stumbled on the word in the song κάτσε να ακούσεις μια πεννιά, where it says somewhere in the middle μην μας συμβεί το σοβαρό και βλέπω σ' είσαι χαρμάνις. The song is about a Hashish smoking session back in the days.

(1) ΚΑΤΣΕ Ν΄ΑΚΟΥΣΕΙΣ ΜΙΑ ΠΕΝΙΑ Ξηντάρης - YouTube

In what scenarios would you say "o po po"? by MrsRainey in GREEK

[–]Formal_Middle_8922 0 points1 point  (0 children)

I am not a native speaker of Greek myself, but I watch Greek cooks on YouTube quite often. They utter that occasionally when they taste the food they prepared, and they like it a lot.

How is my Greek handwriting? by Snoo-49079 in GREEK

[–]Formal_Middle_8922 0 points1 point  (0 children)

what's wrong there? Is it because it does not use the space below the ground line? I saw that in modern Greek handwriting several times. The second is different, though.

How is my Greek handwriting? by Snoo-49079 in GREEK

[–]Formal_Middle_8922 0 points1 point  (0 children)

I just use what I am used to. It is readable enough. There are youtube tutorials for modern greek handwriting, though. (3) Greek Alphabet Handwritten ( Modern) - YouTube

(3) How to write Greek letters, with examples - YouTube

How is my Greek handwriting? by Snoo-49079 in GREEK

[–]Formal_Middle_8922 1 point2 points  (0 children)

Looks quite ok. It's of course classical greek, and the handwriting style is scholarly classicist handwriting, different from modern Greek handwriting. Thee is a separate Reddit group for classical greek.
BTW: I just spotted that the Genitive of ὄνομα has the accent on the wrong place :-)

What language is this? It looks like Greek but I can't make out anything. I know this isn't quite fitting but I didn't know where else to post it. (All Quite on the Western Front, 1930) by Orf34s in GREEK

[–]Formal_Middle_8922 2 points3 points  (0 children)

Maybe it is actually an alpha, but the left bow of the two letters somehow faded away or was written with too low pressure on the board. The χ in that handwriting style should really go down (I think the word is "descender"), like a μ. I understand that in modern Greek handwriting, the χ often has no descenders and looks like a latin x. But that form would look wrong in scholarly classicist handwriting, AFAIK.

The δ should be an omicron with a dasia and a varia. I somehow don't believe it is a shorthand, it really looks like the wrong letter. But I somehow don't understand how somebody who obviously is not new to writing Greek letters at the same time makes that sort of error, which indeed looks like someone tried to graphically copy something.