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.

Search

Advanced Search Options

To further refine your search, you can use additional qualifiers such as score:>0.5. For example, the search score:>=0.5 created:<1y grammar would return only posts mentioning "grammar" that have a score >= 0.5 and were created less than a year ago.

Further help with searching is available in the help center.

Quick hints: tag:tagname, user:xxx, "exact phrase", post_type:xxx, created:<N{d,w,mo,y}, score:>=0.5

Filters
 
85%
+10 −0
Meta Unfair accusation in a comment and consequent loss of *actual* reputation

I looked at your answer and those comments, skimmed the Wikipedia page, and I do not see direct copies. OOP is a fundamental topic, widely taught and widely written about. It's not surprising to ...

posted 4y ago by Monica Cellio‭

Answer
85%
+10 −0
Q&A Where did my proper divisor sum program went wrong?

When you do x=y=z=[], you're making x, y and z point to the same list. Example: x=y=z=[] # add element to x x.append(1) # add element to y y.append(2) # but x, y and z all point to the same l...

posted 4y ago by hkotsubo‭  ·  edited 4y ago by hkotsubo‭

Answer
85%
+10 −0
Q&A What does the "\s" shorthand match?

I've seen some regular expressions (regex) using \s when they want to match a space, but I noticed that it also matches line breaks. Example: the regex [a-z]\s[0-9] (lowercase ASCII letter, follow...

1 answer  ·  posted 4y ago by hkotsubo‭  ·  last activity 3y ago by hkotsubo‭

Question regex whitespace
85%
+10 −0
Q&A Separation of password cookies from all other types of cookies

There is a fundamental misunderstanding at the root of this question. Websites do not store your password client-side When you login to a website, the website does NOT store your password in a co...

posted 4y ago by JDB‭  ·  edited 4y ago by JDB‭

Answer
85%
+10 −0
Q&A Is *nix a formal term?

The term is cultural, not technical. From Wikipedia: There is no standard for defining the term, and some difference of opinion is possible as to the degree to which a given operating system or ...

posted 4y ago by r~~‭

Answer
85%
+10 −0
Q&A How to properly use malloc?

I have seen this construct quite a lot: int *p = (int*) malloc(n * sizeof(int)); Is this how it should be? What is the proper way to use malloc? I have also seen this: int *p = malloc(n * size...

3 answers  ·  posted 3y ago by klutt‭  ·  last activity 2y ago by Lundin‭

Question c malloc dynamic-allocation
85%
+10 −0
Meta How can we grow this community?

As a (for now at least) casual user, I can report that a bad first impression is that there are way too many "500 server errors". Within a few tens of minutes I ran into two, one for some profile ...

posted 3y ago by Peter Mortensen‭  ·  edited 3y ago by Peter Mortensen‭

Answer
85%
+10 −0
Q&A Open file in script's own folder

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 3y ago by Moshi‭

Answer
85%
+10 −0
Q&A Is it possible to undo a git reset?

For some reason, I just wanted to undo a commit on my git repository, which I've done with the following command: git reset --soft HEAD~1 So far, so good. However, by mistake I issued the comma...

2 answers  ·  posted 3y ago by celtschk‭  ·  edited 3y ago by Alexei‭

Question git git-reset
85%
+10 −0
Q&A Vim: how to search for all instances of a string, except for those that are between two specific strings

Using Vim, I am trying to search for all instances of a specific string, except for those that fall somewhere in between two other specific strings. For example, I want to determine all instances ...

2 answers  ·  posted 3y ago by Trevor‭  ·  last activity 3y ago by Dirk Herrmann‭

Question regex string-search vim
85%
+10 −0
Q&A Is it possible to undo a git reset?

If you've committed, then the commit is in the git repo regardless. All git reset does is change what commit the HEAD references. If you find the hash corresponding to the commit you'd like HEAD to...

posted 3y ago by Derek Elkins‭

Answer
85%
+10 −0
Q&A Scheme for cross-platform warning control?

tl;dr I'd like to learn a compact, cross-compiler way of selectively suppressing compiler warnings. Consider the case where you really mean to make an exact floating-point comparison using ==, o...

1 answer  ·  posted 4y ago by dmckee‭  ·  last activity 4y ago by Someone‭

Question c++ cross-platform compiler-warnings
85%
+10 −0
Q&A What is CPU endianness?

I was fooling around with the following C code on my trusty old x86 PC: #include <stdint.h> #include <stdio.h> int main (void) { uint32_t u32 = 0xAABBCCDD; uint8_t* ptr = (u...

1 answer  ·  posted 4y ago by Lundin‭  ·  last activity 4y ago by Lundin‭

Question big-endian litte-endian endianness
85%
+10 −0
Q&A How to override default string formatter?

Python doesn't support extending the mechanics of how f-strings are parsed; the reference doesn't give the specific mechanism, but it doesn't say that there's any connection between the parsing of ...

posted 4y ago by r~~‭  ·  edited 4y ago by r~~‭

Answer
85%
+10 −0
Q&A Destroy std::mutex referenced but not owned by std::unique_lock?

Is it correct to destroy a mutex which is referenced but not owned by an unique_lock as in this code? { std::unique_ptr<std::mutex> mutex = std::make_unique<std::mutex>(); std::u...

1 answer  ·  posted 4y ago by Estela‭  ·  last activity 4y ago by Angew‭

Question c++
85%
+16 −1
Meta The size of the code format window is much too small.

When posting a lot of code on the site, the "code format window" is much too small: 1 I'm talking about this thing 2 3 4 5 6 7 8 9 10 11 12 13 14 15 The scroll bar appears after...

3 answers  ·  posted 4y ago by Lundin‭  ·  last activity 2y ago by trichoplax‭

Question support feature-request status-completed code-formatting
85%
+10 −0
Q&A Can regex be used to check if input conforms to a very strict subset of HTML?

tl;dr Although it can be done with regex (and work for "most" cases), I still prefer to use a parser. Long answer I'd use something such as DOMParser to do the job: let validTags = ['p', 'span', 'b...

posted 4y ago by hkotsubo‭  ·  edited 4y ago by hkotsubo‭

Answer
85%
+10 −0
Meta Should we have a Code Review Section / category?

As discussed on Meta, should Software.codidact allow reviewing working code as a question? Traffic is probably not high enough to warrant it's own Codereview community. The existing communities out...

3 answers  ·  posted 4y ago by dustytrash‭  ·  edited 4y ago by Monica Cellio‭

Question discussion feature-request status-completed
85%
+10 −0
Q&A Why can't we mix increment operators like i++ with other operators?

These examples have undefined behavior and unspecified behavior all at once! Operator precedence has nothing to do with the order of execution, see What is the difference between operator precedenc...

posted 4y ago by Lundin‭  ·  edited 4y ago by Lundin‭

Answer
85%
+10 −0
Q&A Is it undefined behaviour to just make a pointer point outside boundaries of an array without dereferencing it?

Yes, the second line invokes undefined behavior. First of all, according to C17 6.5.2.1 regarding array subscripting, an expression E1[E2] is just "syntactic sugar" for *((E1)+(E2))). So what appli...

posted 5y ago by Lundin‭  ·  edited 4y ago by Lundin‭

Answer
85%
+10 −0
Meta "Software Development" to the exclusion of other programming and scripting?

It's meant to include all programming and scripting. By calling it Software Development we wanted to convey that it's not just code but also those other things. I'll adjust the description of the...

posted 5y ago by Monica Cellio‭  ·  edited 5y ago by Monica Cellio‭

Answer
85%
+10 −0
Q&A Different behavior with relative imports when using flask vs py

I don't have a py command on my system; for purposes of this answer I assume it's an alias to the python executable. Running a script from a file is not quite the same as importing it. A script giv...

posted 5y ago by ajv‭  ·  edited 5y ago by ajv‭

Answer
85%
+10 −0
Q&A How to proportionally convert a number in the range of -1 and 1 to a number in the range of 0 and 319

There is one thing to clarify when mapping a float interval to an integer interval, namely how the boundaries of the float interval shall be mapped to the boundaries of the integer interval. Takin...

posted 2y ago by Dirk Herrmann‭  ·  edited 2y ago by Dirk Herrmann‭

Answer
85%
+10 −0
Q&A How to manage user-specific application data on Linux?

I am developing an application that targets Linux-based OS, and I need to store the user's configuration, metadata and other things in a persistent way (i.e. on the file system). I know that one c...

3 answers  ·  posted 3y ago by Björn‭  ·  last activity 3y ago by celtschk‭

Question GNU/Linux user-configuration dotfiles
85%
+10 −0
Q&A How to define an object with different subclasses in an if-statement?

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 2y ago by Moshi‭

Answer