Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

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 elgonzo‭

Type On... Excerpt Status Date
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Initial revision over 2 years ago
Answer A: WPF MVVM ListBox not updating
`List` is not observable. In other words, `List` does not offer a mechanism through which it could signal that its content has changed. If it is possible/permissible to modify the Demo class, then use `ObservableCollection`, `BindingList` or something similar instead. As their type names suggests,...
(more)
over 2 years ago
Comment Post #286151 I second hkotsubo's opinion. For additional information about how the javac compiler looks for types (or their respective source files), see the official Java compiler documentation: https://docs.oracle.com/en/java/javase/18/docs/specs/man/javac.html#searching-for-module-package-and-type-declarations...
(more)
over 2 years ago
Comment Post #286017 Personally, i do not find this very readable at all (and i would rather prefer the easily and immediately understandable multi-line version without "[clever](https://www.simplethread.com/dont-be-clever/) [code](https://guifroes.com/clever-code-is-bad/)" like `SutSetup(Foo::new, o -> o.setX(42))` what...
(more)
over 2 years ago
Comment Post #286017 Keep in mind that i am not a Java programmer. The following is based just on some cursory google'ing of Java syntax and might be erroneous, but could hopefully still serve as an illustration of my idea. You possibly would only need one generic _wrapper_ implementation that accepts a factory delega...
(more)
over 2 years ago
Comment Post #286003 And for good measure, here the "horse's mouth": https://docs.microsoft.com/en-us/windows/win32/adschema/a-samaccountname :-) With regard to any library offering functions doing this format check for you, i honestly don't know. But it should be relatively simple and straightforward to implement you...
(more)
over 2 years ago
Comment Post #286003 Okay, if you are interfacing with an AD service, i would suggest to go with what the https://ldapwiki.com/wiki/SamAccountName page says. Although, you could probably simplify the regex by using look-ahead/look-behind assertions (depending on the capabilities of Java's regex engine). If you have a Win...
(more)
over 2 years ago
Comment Post #286005 What exactly do you mean with "_test this separately_"? If the intention is to just test the private function _foo_ in isolation and independently from _bar_, you might want to check whether some of the suggestions given here might work for you: https://softwareengineering.stackexchange.com/questions...
(more)
over 2 years ago
Comment Post #286005 Relocate your server-related I/O into its own service with an API defined through an interface or such. Then use dependency injection (either through a parameterized constructor or through some service provider thingamabob; sorry, i am not a Java programmer, so i don't know typical/popular Java DI fr...
(more)
almost 3 years ago
Comment Post #286005 The question you have to answer yourself is: What do you really want to test here? Do you actually want to test the behavior of the server? If so, why are you trying to test _foo_? Or do you rather want -- as your question states -- to test the behavior of your code? If that's the case, why would you...
(more)
almost 3 years ago
Comment Post #286003 I am right now not having the energy to write a proper clean and self-contained answer. Feel free to look up the mentioned RFCs, and put the information together into a coherent answer, if you or anyone else feels like... ;-) P.S.: The ldapwiki page you linked to is clearly stating that that page ...
(more)
almost 3 years ago
Comment Post #286003 Look at the "LDAP: Schema for User Applications" [RFC-4915](https://datatracker.ietf.org/doc/html/rfc4519#section-2.39). It defines 'uid'/'userid' being a "Directory String" (LDAP syntax identifier 1.3.6.1.4.1.1466.115.121.1.15). ["Directory String"](https://datatracker.ietf.org/doc/html/rfc4517#sect...
(more)
almost 3 years ago
Comment Post #285979 Note that there is both `skip_confirmation!` and `skip_confirmation_notification!`. Thus, i would try calling both (Disclaimer: I have no clue about RoR. I just spotted `skip_confirmation_notification!` in the documentation that you linked to...)
(more)
almost 3 years ago
Comment Post #285956 @#8176 > "Overall the programmer must actually know what they are doing - no way around it. If you change the type of some variable, then you better review every single line in the code base using that variable - simple as that." This naturally goes for changing the variable name too. That's tr...
(more)
almost 3 years ago
Comment Post #285956 @#8176 i guess this could be a matter of refactoring support offered by IDEs. I don't have a good overview over the refactoring capabilities across different popular C/C++ IDEs, but it would probably be much easier to implement and offer a refactoring assistant that can reliably track and variable id...
(more)
almost 3 years ago
Comment Post #285956 @#8196, thanks for adding a footnote to your question text that contextualizes where you see the reduction of code duplication. Otherwise, in a general sense there would still be no reduction in code duplication, because changing the variable name instead of the type identifier would also require thr...
(more)
almost 3 years ago
Comment Post #285956 As an advantage of `malloc(n * sizeof *p)`, i would consider the locality (in terms of location in the source code) of the identifiers used in `p = malloc(n * sizeof *p);`, thus potentially reducing the chance of coding mistakes when a function declares a number of pointers (or a program when global/...
(more)
almost 3 years ago
Comment Post #285956 With ``` int *p; p = malloc(n * sizeof(int)); ``` the type identifier ("int") is being duplicated, thus one duplicated token. With ``` int *p; p = malloc(n * sizeof *p); ``` the variable identifier ("p") is being duplicated, thus one duplicated token. Where exactly is there a reductio...
(more)
almost 3 years ago
Comment Post #285838 > would use a database table in most cases. Yeah. In my comments, i was focusing only on the question which was about switch-case compound statements used as value mapping/translation as part of C# code. Of course, if value translation/mapping needs to be configurable or extensible, or otherwi...
(more)
almost 3 years ago
Comment Post #285839 Then remove the `checked` keyword from the `GetSumChecked` method: ```C# [MethodImpl(MethodImplOptions.NoInlining)] private static int GetSumChecked(int[] numbers) => numbers[0] + numbers[1] + numbers[2]; ``` and run the benchmark again. (Now it should be apparent why i suggest separate Ge...
(more)
almost 3 years ago
Comment Post #285839 To do so, the benchmarks should be altered so that the code for the checked and unchecked case is isolated into separate methods. Keeping as much of your current code base as possible, i would do this (not sure if you need to add `[MethodImpl(MethodImplOptions.NoInlining)]` to prevent inlining, but d...
(more)
almost 3 years ago
Comment Post #285839 Just a stupid idea: What if the observed results are not due to the use of _checked_, but an artifact of the JIT compiler or due to external factors influencing your benchmark run (like, do you have other stuff running on your box that might possibly intermittently load the CPU and chew cycles)? T...
(more)
almost 3 years ago
Comment Post #285838 Generally, if a switch compound statement only serves to translate/map values, replace it with a switch expression. If the case branches feature side-effects (some other code besides returning a value), either keep it a switch compound statement or refactor it into a switch expression with the cas...
(more)
almost 3 years ago
Comment Post #285838 > (i.e. each nonempty case must use break or return) ... or a goto with to a case label or the default label ... <BR> Out of curiosity, i wonder what SonarQube would say about switch expressions. Because, using a dictionary just moves the complexity from a switch compound statement into t...
(more)
almost 3 years ago
Comment Post #285812 I don't have the faintest clue of all the class identifiers you are throwing around there in your Bootstrap example and what possible CSS definitions they might (or might not) be associated with (heck, i don't even have the slightest experience in Bootstrap to begin with), but could it perhaps be a w...
(more)
almost 3 years ago
Comment Post #285620 Just an idea... What happens if you don't put the Hebrew character literal in the javascript code, but instead use its character code, i.e.: ``` event.key === '\u05DA' // final kaf ``` or ``` event.key === '\u05DB' // kaf ``` Not sure if it will work, but might be worth a try i...
(more)
almost 3 years ago
Comment Post #285579 Yes, memory-mapped I/O is the only way to do it with standard-conform C in a freestanding implementation, and typically involving `volatile` -qualified types. (I erroneously mentioned in my previous comment that port-based I/O could be done in a C standard-conforming way as well, but that is obviousl...
(more)
almost 3 years ago
Comment Post #285579 > This would mean that every kernel ever written that has any I/O of any kind is not standards-compliant C. Again incorrect. Memory-mapped I/O can be done entirely in C without needing language extensions nor code modules written in other languages. Depending on the actual architecture or specific...
(more)
almost 3 years ago