Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Activity for celtschk
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Comment | Post #287289 |
First, immediate feedback: `README.md` is missing. (more) |
— | over 1 year ago |
Comment | Post #287122 |
It solves the same problem that any strong typing system solves: Catching errors. (more) |
— | over 1 year ago |
Comment | Post #286940 |
The first vector isn't shown completely in your screenshot. So it cannot show what it is intended to show according to the text.
You should have copy-pasted the output instead of posting a meaningless (and data wasting) screenshot.
Even better, post the actual length of the vectors instead of... (more) |
— | over 1 year ago |
Comment | Post #286685 |
Well, as I had mentioned in the Github thread, starting a new thread is what I had expected to happen, so that would be a point for option 2. Obviously someone who understands the code will have to say what is practical to do. (more) |
— | almost 2 years ago |
Comment | Post #286773 |
You're welcome. (more) |
— | almost 2 years ago |
Comment | Post #286727 |
It is a slash, followed by an asterisk. From the man page:
> The slash / is used as the directory separator. Separators may occur at the beginning, middle or end of the .gitignore search pattern.
And:
> If there is a separator at the beginning or middle (or both) of the pattern, then the pat... (more) |
— | almost 2 years ago |
Comment | Post #286588 |
In principle, there's also the option to write a command line tool accepting sendmail-compatible options which does the signing before passing it on to whatever you use for sending mail, and instruct git to use that as sendmail executable. Maybe there already exists such an executable somewhere. (more) |
— | almost 2 years ago |
Comment | Post #286575 |
Sorry, I misread. But then, `r->s` is *not* `const char*`. It is `char* const`. And while it does have a top-level const, that doesn't matter because you are just returning the value anyway.
Indeed, your code compiles just fine. And it does so even if you remove `discard_const` completely, changin... (more) |
— | almost 2 years ago |
Comment | Post #286575 |
Note that `const struct t*` is *not* a const type, but a *non-const* pointer to a const type. Therefore there's no top-level `const` to discard. You can easily see the non-constness by adding the statement `r = 0;` to the function. If `r` were of a const type, that wouldn't compile.
(more) |
— | almost 2 years ago |
Comment | Post #286552 |
Thank you for your answer; while the other answer gave me the understanding I needed to do it, the information in your answer made actually correcting my mistake far more easy than it would have been otherwise. (more) |
— | almost 2 years ago |
Comment | Post #286551 |
Thank you for the very helpful and informative explanation. (more) |
— | almost 2 years ago |
Comment | Post #286529 |
Thank you for your feedback. You've got a few good points. I didn't actually think of double-registering observers, and I don't think in my actual use the order would matter. I would have expected bound member functions not to be allowed in a set (because, after all, you can change the object afterwa... (more) |
— | almost 2 years ago |
Comment | Post #286530 |
Thank you for your feedback. However I don't see how you get from the term "actions" to "imperative commands". "Actions" here are actions *on* the state machine, not actions *of* the state machine. "Event" may be a better name here, but then, in the code I plan to use it, the term is already used for... (more) |
— | almost 2 years ago |
Comment | Post #286511 |
The goal is to use it for my game, but not as game AI, but to manage different phases. I started out with just values for the current state, which originally were only used to report a result (was the level won, lost, saved or quit, was the menu quit or terminates, etc.), then moved on to also encode... (more) |
— | almost 2 years ago |
Comment | Post #286440 |
As far as I can tell, you fork exactly one child process, and the function you call for the child process only calculates and outputs the area exactly once. After return from that function, you exit the child process. No matter what the parent process does, I see absolutely no way to get more than on... (more) |
— | almost 2 years ago |
Comment | Post #286433 |
@#53196 Thank you. (more) |
— | almost 2 years ago |
Comment | Post #285801 |
A workaround could be to start your python script with a custom shell script, e.g.
```
#!/bin/bash
source ~/.env
exec python3 yourprogram.py "$@"
```
(more) |
— | about 2 years ago |
Comment | Post #285801 |
Note that with `getenv` you need to use parentheses `()` instead of square brackets `[]`. Doing so should solve the TypeError. (more) |
— | about 2 years ago |
Comment | Post #285580 |
@#53629 A program consists of several translation units. As far as the C standard is concerned, a program consists of nothing but translation units written in C and the standard library supplied by the implementation. It doesn't say there needs to be a separate linking step; a compiler that required ... (more) |
— | over 2 years ago |
Comment | Post #285566 |
Actually given that vim is an editor, I doubt it is possible at all. To allow this, the developers would have to define what it means to edit a file while you're still reading it, and that seems to me something that isn't worth the effort.
However there is a tool called [less.vim](https://github.c... (more) |
— | over 2 years ago |
Comment | Post #285351 |
@#8176 The alignment requirement just tells you where the allocated memory has to start, the end of the allocation does not need to be aligned. The implementation would be allowed to use the very next byte after the allocation for its own purposes, independent of its alignment. Or if the platform all... (more) |
— | over 2 years ago |
Comment | Post #285243 |
You don't even need memory-mapped registers to get such effects. Even on a conventional stack layout, an out of bounds access might go to the stored address of the parent stack frame, or to the return address. Changing the first one may cause the stack pointer being changed to a wrong value later(!),... (more) |
— | over 2 years ago |
Comment | Post #284552 |
Obvious to a reasonable person with the knowledge level of the OP. (more) |
— | over 2 years ago |
Comment | Post #284552 |
On the other hand, if it isn't obvious what the OP should have searched, then IMHO the downvote is not justified. (more) |
— | over 2 years ago |
Comment | Post #277341 |
Another point: Compilers are also allowed to give diagnostics on correct programs, as long as they generate working code otherwise. A compiler that always outputs the diagnostic “This program might contain errors” is completely conforming as long as it correctly compiles correct code.
In other wor... (more) |
— | over 2 years ago |
Comment | Post #284510 |
Well, the extra information you added spells out the crucial bit (closing of file handles that weren't closed before; thanks to that now I have an idea what went wrong before), therefore have my +1.
Links are not that relevant (except when not using them would violate a license or result in plagia... (more) |
— | over 2 years ago |
Comment | Post #284510 |
Can you please be explicit on how that version differs from the original one? And what that crucial hint was? (more) |
— | over 2 years ago |
Comment | Post #284444 |
Well, for each dictionary *that you want to access this way.* And an instance is cheap, isn't it? However thinking of it, one useful addition would be to recursively treat dictionary values (possibly controlled by a constructor option), by automatically wrapping them as well if accessed as attributes... (more) |
— | over 2 years ago |
Comment | Post #284444 |
An additional class for each dictionary? You didn't actually read my code, did you?
But yes, the goal is syntactic sugar. Being able to use `proxy.foo` instead of `dictionary["foo"]`.
(more) |
— | over 2 years ago |
Comment | Post #282566 |
The reason for the `-ansi` misunderstanding is history (and IMHO a bad choice by the compiler developers). Originally (at a time where only one version of the C standard and one version of the C++ standard existed), `-ansi` was indeed the correct way to enforce standards conformance; the `-std` optio... (more) |
— | over 2 years ago |
Comment | Post #284343 |
I notice that your Java installation line contains the word “headless”. “Headless” basically means “without screen”. Therefore I'd guess that the remaining problem is that you installed the wrong version of jdk. From a bit of internet search, I suspect that you'll get what you want with `sudo apt ins... (more) |
— | over 2 years ago |
Comment | Post #284343 |
On Linux (and generally, on Unix systems using the X11 window system), the DISPLAY environment variable tells how to connect to the X server, which manages the graphical display. Apparently something tried to open a window. I don't know anything about netbeans, but I see two possibilites:
* Eith... (more) |
— | over 2 years ago |
Comment | Post #284265 |
Yes, submarines can “collide” with each other (they just move through each other). If I were not distinguishing between bombs and submarines, then each such collision would cause a collision detection. While the submarines disappearing wouldn't be *that* bad (well, the submarines collided, after all)... (more) |
— | over 2 years ago |
Comment | Post #284265 |
I just noticed that I forgot replying to your remark on the movement code.
Actually when I started writing the code, I first went with the increments version, but given the various movement directions, I quickly realised that testing the end condition would be quite complex; therefore I decided to... (more) |
— | over 2 years ago |
Comment | Post #284265 |
Thank you very much for the analysis.
On the two line separation, I didn't now that convention, but it makes a lot of sense. I'll definitely do that.
On the 80 character line length, my Emacs opens up at that width, and I like to have space for a terminal (and occasionally other windows) beside... (more) |
— | over 2 years ago |
Comment | Post #284178 |
@#53185 4.3 billion cents is 43 million dollars. (more) |
— | over 2 years ago |
Comment | Post #284232 |
I may be wrong, but the way I interpret the text you quoted, it is deprecated because the corresponding functionality isn't there anymore. If so, you won't find a replacement. (more) |
— | over 2 years ago |
Comment | Post #284192 |
Thank you. I'm going to post soon.
(more) |
— | over 2 years ago |
Comment | Post #284178 |
Actually the correct way to deal with the rounding issue is to calculate not in cents (or whatever the minimum value is), but in units of e.g. a thousandth of a cent, and then explicitly round to cents only at the end of your calculation. This is mainly because of double-rounding errors. Of course th... (more) |
— | over 2 years ago |