Moshi
The best Codidactyl!
Posts
It's not a matter of order; Python simply does not directly allow else clauses as part of list comprehensions (docs). When we use [num if num != 11 else 22 for num in hand] We are actually usin...
posted 1y ago by Moshi
Here I used asterisk after Node. Actually, why asterisk used for? What if I don't put any asterisk after Node (Both Node are structure). It's a pointer. A pointer, like its name implies, poin...
posted 1y ago by Moshi
You cannot set text-align on a column element (Well, you can, but it won't have any effect) There are only a couple of properties that have an effect, namely border, background, width, and visibi...
posted 2y ago by Moshi
What's going on is that the compiler is deciding on what function to call at compile time rather than runtime. Since the type of vh is Vehicle *, it is essentially creating this call: vh->Vehic...
posted 2mo ago by Moshi
You can use the pathlib standard module with __file__ to make things simple. from pathlib import Path scriptFolder = Path(__file__).parent with open(scriptFolder / 'data.txt') as file: dat...
posted 1y ago by Moshi
I've heard that in modern C++, smart pointers are preferred to raw pointers for ownership (the so-called RAII principle, as I understand it). This makes sense, and since then I've always used them...
1 answer · posted 7mo ago by Moshi · last activity 7mo ago by InfiniteDissent
I was inspired by the contests on Outdoors and Writing, and thought that having some challenges over here would be fun as well. What do you all think about adding a new category where people can po...
1 answer · posted 2y ago by Moshi · last activity 1y ago by Trilarion
I'm rather new to using git, so I'm not sure about the best practices regarding it. I have a feature branch branched off, and periodically when the feature needs to be updated I will add some commi...
3 answers · posted 1y ago by Moshi · last activity 1y ago by Hyperlynx
The important part here is the #[cfg(test)] annotation. The #[cfg(test)] annotation on the tests module tells Rust to compile and run the test code only when you run cargo test, not when you run...
posted 3mo ago by Moshi
Reputation | 1826 | |
Number of top-level posts | 14 | |
Number of answers | 30 | |
Sum of received votes (up minus down) | 214 | |
Number of edits made | 52 |
Earned Abilities
Statistics
Posts | ||
---|---|---|
Count | 44 | |
Questions | 14 | |
Answers | 30 | |
Articles | 0 |
Votes cast | ||
---|---|---|
Count | 207 |
Flags raised | ||
---|---|---|
Count | 4 |