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 impression is that the regexps behave a little bit odd: >>> import re >>> r=re.compile("test") >>> r.match("test") <re.Match object; span=(0, 4), match='test'&g...
Let's say we have a function void f(int argc, ...); where argc is the number of variadic arguments. Can we write a macro of the form #define F(...) f(CNT(__VA_ARGS__), __VA_ARGS__) which...
How does one parse/decode/extract information stored by a web page in Firefox's browser local storage without the browser? So far, I've worked out that the data lives at ~/.mozilla/firefox/${profi...
I've recently discovered that php curl does not load cookies from a cookie file until after at least one request is made. For instance, assume I already have a cookie file from a previous session ...
For example, how to sort the output below by the values in "Column" in the psql shell itself? my_db=> \d auth_user Table "public.auth_user" Column ...
There are RSS feeds for tags already, linked at the bottom of the tag page. (Yeah, I missed it too; I'll see if we can make that more obvious.) For example, here's the RSS feed for the feature-re...
It's been a while, but the answer is "yes and no," I believe. No: The describe-schema command doesn't (last I heard) allow any modification. Yes: The describe-schema command also doesn't do any...
How can i get a per-tag RSS feed? I only see the general feed at the main pages and i don't want to subscribe to tags via email.
slice(None) will give you a value that's equivalent to a bare : in slice syntax. So you can write, for example, for i in range(4): print(new_array[tuple(slice(None) if i == j else n for j, n ...
I'm using the following syntax match to conceal 2 spaces at the end of a line with a special character. syntax match Normal '\s\{2}$' conceal cchar=⏎ A line with two spaces at the end of it wou...
You can use the functions in the bisect module with a list slicing operator. For example bisect_left finds the index of the insertion point in a sorted list, and if the values are equal, it will fi...
The main difference between Stack Exchange and Codidact is that SE loves to spawn off hundreds of sites with lots of overlapping scopes, whereas Codiact has the category system, which means that co...
Many programming languages either have keywords like or and and used for logic, or equivalent operators such as || or && - which are referred to as "logical or" and "logical and" respective...
We've had discussions before about the site's intended scope (range of permissible topics and questions), but for new users coming from the Stack Exchange network, I think it would be useful to dra...
You could start to track down the problem by using Assembly.LoadFrom() to attempt loading each library individually. I have a routine in a .NET 5 solution that performs some analysis on assemblies...
I've got a HTTP Error 500 when trying to access this post. Here's the quote error ID's: ef4f6ec1-8d0f-4be3-9553-36e01b5f01c4 and bbeb9bf9-2c58-43b1-be05-c9e914bb80bf. I've browsed to another pos...
Thanks to comments by elgonzo the solution was quite easy. hsl expects the first component (hue) to be in [0.0, 1.0] instead of [0.0, 360.0] and the third components (lightness) to be in [0.0, 1...
When working with a qmake subdirs project you may want to share configuration between multiple projects. In a less common case you may including a external project within your own as code and want ...
Sometimes I see bad questions (e.g Off-Topic questions) but I see perfect high quality answers to it but since the question is Off-Topic, so I think that who answered the question is being a victim...
I am not a Java developer, but a C# .NET one, but I guess static concept is very similar between the two. As in many areas, it depends, but for most applications using static should be avoided: ...
If I have a one-dimensional array, I can get the length of it quite easily: var x = moves.Length(). However, if the array is multi-dimensional, .Length() returns the total number of elements. If ...
"Hash Sum mismatch" printed by apt-get on Debian and derivatives means that the file as downloaded had a different cryptographic checksum (hash) than what's listed in the packages list. In this ca...
I think what you are looking for is Array.GetLength which: gets a 32-bit integer that represents the number of elements in the specified dimension of the Array.
I have finally received access to a trial account on OpenAI and I took it for a spin. My interest is with code generation, so first tried something simple using the playground: Q: generate a stand...
There are two issues here. The first is that this code isn't rolling over at 8PM as expected: if (now.getHours() > 20) { now.setDate(now.getDate() + 1); } This change happens at 9PM as...