# Thanaton

 Apr 18 awarded Nice Answer Aug 29 comment Fun ideas for project on Encoding@JyrkiLahtonen: I will add the tag the next time, thanks for the suggestion! In the end, we split up the group in pairs. Each pair had to pick a song (in WAV format) and 'invent' a generator matrix. We picked some good generator matrices and encoded all the music with one of these matrices. The pair were given back their music and the generator matrix, they had to find the parity check matrix and syndrome list (is that the right English term?), eather manually or with the computer. Some students liked the assignment, others didn't. Overall, I think it was a success. Aug 4 revised Write a formula expressing $z=\langle \langle x,y\rangle, \langle u,v\rangle \rangle$added 31 characters in body Aug 4 comment Write a formula expressing $z=\langle \langle x,y\rangle, \langle u,v\rangle \rangle$@AsafKaragila: You are right. I am used to quantified quantors (eg. $\forall y \in x$; is that the correct term?), and therefore I didn't see we were 'looping' over 'all' possible elements. I will remove my edit, sorry Asaf! Aug 4 comment Write a formula expressing $z=\langle \langle x,y\rangle, \langle u,v\rangle \rangle$@ArthurFischer: I am still not convinced. Let's assume $z = \{ \{ u \}, \{ v \} \}$. If $x = \{ u \}$, then $(\forall y)(y \in x \leftrightarrow (y = u \vee y = v))$ is true. If $x = \{ v \}$, then also $(\forall y)(y \in x \leftrightarrow (y = u \vee y = v))$ is true. Thus the formula $(\forall x)(x \in z \leftrightarrow (\forall y)(y \in x \leftrightarrow (y = u \vee y = v)) \vee (\forall y)(y \in x \leftrightarrow y = u))$ is true. Therefore $z = \{ \{ u \}, \{ v \} \}$ satisfies $\phi(u, v, z)$. Aug 4 revised Write a formula expressing $z=\langle \langle x,y\rangle, \langle u,v\rangle \rangle$added 591 characters in body Aug 4 comment Write a formula expressing $z=\langle \langle x,y\rangle, \langle u,v\rangle \rangle$@AmitKumarGupta: True. I have edited my answer to reflect your comments. Aug 4 revised Write a formula expressing $z=\langle \langle x,y\rangle, \langle u,v\rangle \rangle$added 24 characters in body Aug 4 awarded Teacher Aug 3 awarded Editor Aug 3 revised Write a formula expressing $z=\langle \langle x,y\rangle, \langle u,v\rangle \rangle$added 225 characters in body Aug 3 answered Write a formula expressing $z=\langle \langle x,y\rangle, \langle u,v\rangle \rangle$ Jun 22 comment Fun ideas for project on EncodingThanks for your suggestions. Although the project has already passed, we will take these ideas in consideration for next years project! Jun 21 awarded Student Jun 12 revised Composition ( through Dependency Injection ) vs Inheritance. What to use and when?added 3166 characters in body Jun 12 comment Composition ( through Dependency Injection ) vs Inheritance. What to use and when?@Gordon You're right. Based on the question by bot, I assumed that he ment a domain object with database access and not just database access. Jun 12 comment Composition ( through Dependency Injection ) vs Inheritance. What to use and when?If you like the answer and think it answers you question in the best way, please click the checkmark at the left of this answer ;-) Thanks! Jun 12 revised Composition ( through Dependency Injection ) vs Inheritance. What to use and when?added 65 characters in body Jun 12 comment Composition ( through Dependency Injection ) vs Inheritance. What to use and when?@bot See the second edit on my main post. Ofcourse you can use the active record pattern, especially if the objects aren't very complicated. To inject the database dependency into User and Location, you will have to have a current database connection open somewhere. At the start of your script (bootstrap?) you can initiate the connection, and pass it on as a parameter. Or you can use a (singleton) registry, although this is not really accepted as general best practice. One you create a new User, you can then inject it in the constructor. Jun 12 revised Composition ( through Dependency Injection ) vs Inheritance. What to use and when?added 5259 characters in body