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
Python allows for operators to be overloaded (the subject of a separate future Q&A). The / operator doesn't strictly mean division in a mathematical sense; it means whatever the operands define...
Mac/Linux In this environment, Python scripts can be given a shebang line that tells the operating system that the file is a script, and what interpreter (i.e., Python) to use for it. Because # st...
This probably makes for a thoroughly unsatisfying answer, but there's probably far stronger cultural pressure than technical pressure. In European-derived cultures, we mostly group numbers by powe...
You could use fgets to read from STDIN. And to print the message, just use the short tag (<?= whatever, which is a shorthand to <?php echo whatever; ?>): <?='Hello, '.fgets(STDIN).'!'...
I wouldn't. Not unless you intend to keep developing on every branch independently! Presumably you're not doing that. In that case, I think it makes your intent clearer to just use a tag to mark t...
As you're using userscripts, I'm assuming this code is supposed to run in a browser. Hence, you could download the scripts and add its contents to the page's DOM (by using a script element). For t...
I've seen that recently two requests to add syntax highlight to some languages were deferred (this and this). According to the status-deferred tag description: "the requested feature will not be i...
While I tend to agree with @Alexei that reading from the standard input is quite a common issue I also think that console.readline tag is too narrow and therefore it shouldn't exists. On the other...
Proposal: Can Include A link to a chat room related to the question or answer. Even if tangentially. I've always found SO to be too dry. Sure, pleasantries are as helpful in a question o...
Currently, Java 16 is the latest version, and there's no support to branch reset yet. But one - still far from ideal - alternative is to use lookarounds: Pattern pattern = Pattern.compile("([aeiou...
You've got an inefficiency in your code, as you always do replacements 3/2 times the length of the string. That is unnecessarily expensive. By instead testing in each iteration whether the length ...
What's the better way to store base64 in SQLite Database? I was thinking to put base64 as TEXT since base64 has lots of chars. CREATE TABLE name (id INTEGER PRIMARY KEY AUTO_INCREMENT, image TEXT)...
I am guessing a little here. By not preventingdefault, the form will POST the data to the server. If you switch to AJAX you have to provide the body as per documentation. However, I do not rememb...
This is weird: I tried to edit the tags on your post to see if I could reproduce it, and the editor showed the C++ tag there even though the post did not show it. I deleted and re-added it and sav...
I edited the tags of my very first Codidact question: https://software.codidact.com/posts/281486 Someone proposed the "python" tag. Since I am working with C++, I removed the "multithreading" tag...
I am fairly new to working with @ngrx pattern in Angular which is a state management pattern relying on Reactive Extensions. One of the convenient structures is @ngrx/entity which helps with manag...
Actually, TypeScript is perfectly able to type check the code you posted. Here's what the compiler thinks: const functionName = disable ? "disable" : "enable"; // inferred type: "disable" | "enabl...
Estela's answer provides great insight about how to do it also in SQL Server. Unfortunately, there does not seem to be a build-in array functionality, so one way is to rely on strings as shown here...
For small tables you can bound the recursion depth: WITH my_cte(childId, parentId, depth, max_depth) AS ( SELECT r.childId, r.parentId, 1, (SELECT COUNT(*) FROM My_Table) FROM My_Table ...
I was reading the Wiki of Decibel. Unfortunately, I "forgot" there's different between amplitude ratio and dB level. After reading the wiki. When I looked at my source code, I saw sounddB was unuse...
I know I can change the font of each cell individually by overriding getCellRenderer(row, col) in JTable but I want to be able to change the font of an entire column at once and, ideally, have the ...
A shared hosting based Apache PCRE public_html/.htaccess file for a website with the common features: MediaWiki based (most of the website interaction is backendish --- there barely are any fron...
I have an array friends = Array.new friends[0] = "Mad man" friends[1] = "hey" There's two ways to print it (using print or puts). At first I tried print print friends which gave: ["Mad...
but I don't think I can count on that working There really doesn't seem to be a ready-to-use way to get that message (which feels like a good feature-request). While ex.args[0].args[-1] is in...
I had build an application using following source code (following the steps). package com.decibal.level; import androidx.appcompat.app.AppCompatActivity; import android.media.MediaRecorder; ...