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
My initial approach would be to increase n by 1 (thus shifting the original range from -1..+1 to 0..+2), turn that range into 0..+1, and then simply map from that to your 0..+319 output range. flo...
You could trivially create a view that wraps the media table and includes a column that indicates if the media entry has more than one file associated with it. CREATE VIEW IF NOT EXISTS "media_rea...
This is a good question. It depends on how much this site is about getting language X to do Y versus the higher level concepts of software design and computer science that should largely transcend...
Since the Vector3 constructor accepts separate X, Y and Z coordinates, if you want to randomise each one individually, you would need to call the Random.Range for each coordinate, e.g. Vector3 spa...
Mathematically, the purpose of a function is to return an output. However, in a programming context functions often have side effects. It is even common to call functions for the side effects alone...
To add to the excellent explanation by FractionalRadix, it's worth mentioning that sometimes the line between expressions and statements can seem a little blurry (at least to the observer — the lan...
The map operation is a typical concept from the functional programming paradigm. However, side-effects are a typical example of something that does not fit functional programming well. As a resul...
I think the framing of this question (and the prior discussion) is wrong, and I think that conditions have evolved since it was originally asked - in particular, we can now see how articles have tu...
From your description ... I have text (xml actually) files. Some files contain 'foo', some contain 'bar', some contain neither and some contain both. It's the both I'm interested in. ... I co...
I asked this trivial question recently: DocuSign eSignature API SDK: java.lang.NoClassDefFoundError errors. It turns out, my problem was because I did not do enough research before asking a quest...
The best approach is probably to just check the script beforehand, something like the following grep import script.py should list all imports and you can then evaluate and install them. If you...
The reason to put tests in a separate module is so they are grouped. Another advantage is that you can put helper functions that are only needed for tests, but are not themselves tests in the modu...
Context I have started working on an Angular upgrade for a medium-sized project (from v. 10 to v. 15) and this is a rather long activity that is interrupted by other changes that need to be perfor...
When I run pip install foo, pip looks for foo in PyPi. I want it to look for it first in a private repo, let's say pypi.bar.com. Only if foo cannot be found in pypi.bar.com, should pip then look f...
I think the main reason to do this is when the interfaces fail to account for some subtlety of the contract between caller and implementation. For example, let's pretend for a moment that your use...
Perl is by far the language I have the most experience with, and I have (big) parts of the functionality I want in the new program in existing programs. So I'm looking for a way to do this in perl,...
I get an error page with server error 500 when clicking the link to view my suggested edit activity on my activity page. The suggested edit has the status helpful. Error ID 6ca4f8c8-4a0d-425d-8e09...
If you are planning to share the application with individual users (rather than deploying it to a server), declaring your module dependencies explicitly allows jlink to create a stripped-down Java ...
Context Using the lemmy API, I'm trying to get a list of sublemmies (lemmy communities) that a user is following. Reading the documentation, I using the /site endpoint, I should be able to get a ...
I am looking for a way to programmatically edit and save .dbc files that are meant for J1939 CAN communication. I have a few large files that need to be compared/edited. Being able to import, edit...
You are a thoughtful person, aren't you? /me bows in thanks I for one think it would be valuable, even if you were to port it as is. In other words: it's valuable. Period. I like what Stephen s...
Yes Quick starting with an API is definitely ontopic and especially helpful for newbies who struggle to understand the "spirit" of that API. Even if nobody else from the community is into Google ...
Credit go to @Lundin for pointing me in the right direction. Kvaser has a CAN SDK free of charge. I added this to my VS22 C# project by adding "...\Kvaser\Canlib\dotnet\x64\netstandard2.0\Kvaser...
I have created a tag in my project, using git tag v2023 However, I forgot to commit a few changes. Now I would like to move this tag to the current point (after having committed the changes I had...
You can (forcibly) replace a tag with the -f, --force flag: git tag -f v2023 (assuming the current HEAD is where you want the tag to end up)