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.
General Q&A about programming, scripting, software design & architecture, process, tools, testing, and more.
Filters (None)
I personally would define "escaping" in software development in general and coding in particular as follows: Making an exception to match data which otherwise would not be allowed to be matched: I...
For holding ordered sets of keys, there are well-known data structures (the red-black tree, for example) that support O(log(n)) lookup and insertion algorithms. Of course this means that there triv...
I have a small new Python 3.8 Flask project with some relative import quirks. For the DB I use SQLAlchemy with Flask-Migrate. My project has the following general structure: controllers/ static/ te...
I have a number of command line PHP scripts that are either run by a user or by Windows Task Scheduler. These scripts use DB and API credentials and I am wondering if there is a better way of stori...
I have a bunch of stored procedures that look like something this CREATE PROCEDURE example() BEGIN UPDATE STATEMENT A; UPDATE STATEMENT B; UPDATE STATEMENT C; END// When I run them thr...
The problem I am working on a simple drawing app for Android. I have a custom view on which the user can draw. This means that a lot of data (a list of points) is generated in this View. I want t...
How do I create a flag that can be used multiple times in a command using the pflag package? For example, let's say I wanted to select multiple fields and did not want to have to use comma-separati...
My work tasks have recently started requiring me to use the type_traits header to restrict the classes that may be used in template functions, methods, and classes. And while I used it for a long t...
A Q on Stack Overflow asks how to merge two columns where each row has only one populated cell. The example was from (on the left) to (on the right): a|b a 0| ...
An as yet unanswered Q from Stack Overflow [SO] enquired: how to stop looping this formula where the formulae were: in B9 =16,50 in B10 =B9-B11 in B11 =B10/2 without changing ...
I have tables A and B and then I have a many to many join table with foreign keys to both called a_b. Neither foreign key can be null and the combinations for the foreign keys to A and B are unique...
In programming instead of arrowcode where one has many layers of indented if statements, you can return a result as soon as possible. So instead of, if if end if end if It looks like if ret...
I'm trying to create an encrypted¹ zip archive using bsdtar. Here's where I got stuck: bsdtar -c --options='zip:encryption' --passphrase "secret" -f test.zip test This is the error I get: bs...
A presently unanswered question on Stack Overflow asks: Does there exist a popcount function in libreoffice calc? and clarifies that "I often use BASE(A1;2;8) to show a number in binary".
I'm using Doxygen to help me figure out some library code. There's an enum I know I need to use, but I don't know which file it's declared in. Searching for that identifier in Doxygen yields the p...
I have created this sensational program: #include <stdio.h> int* func (void) { int local=5; return &local; } int main (void) { printf("%d\n", *func()); } This prints 5 even thoug...
Its possible to execute a MySQL file from the command line like so, mysql -u USER -pPASSWORD < FILENAME which triggers a warning, mysql: [Warning] Using a password on the command line int...
I do a lot of rebasing and amending of my topic branches. I don't think it's especially useful for me or my colleagues to see in the logs what date it was when I first started working on the partic...
We are using Jenkins to run our system tests on a regular schedule. The Jenkins job downloads some python scripts from Perforce, runs them and compares the outputs with known-good results. The pro...
Summary I'm building an internal system (hardware simulator, using Rust) to help test some Python-based services that talk to hardware. (The services talk to hardware via TTYs.) To trick the Pytho...
It is possible to create a new formatter class by subclassing string.Formatter class and then to use it like myformatter.format("{foo:customformat}", foo=foo). It's not super-convenient though, and...
When writing Python-based apps (e.g. Django, Flask, etc.), it's often the case that import statements can be found all over the place, often more than once for the same module. For example, you can...
When discussing best or safest C programming practices with various C gurus on the Internet, the "MISRA-C guidelines for the use of C language in critical systems" often pops up as a source. This ...
Using the below graph as an example: I am trying to determine all Persons which are_sons of Persons all born in the same country. Is there an elegant way to achieve this with Cypher?
The Problem I have a path optimization problem that in some ways reminds me of the Traveling Salesman Problem, but differs in some key respects. I have a group of items that need to be used by a m...
In a stored procedure let's say I have a VARCHAR variable, DECLARE example_variable VARCHAR(100); how much memory is allocated to it and is that independent of the length of the data in the var...
For use in connection with conditional formatting with alternating coloured fills in OpenOffice Calc, several years ago a user of Super User was applying this Ruby script: f = File.readlines("sha...
I need to rename one column in 170 tables in a MySQL database and its going really slow. The columns all have an index plus a foreign key on them, would dropping the index/temporarily removing the...
Microsoft.Build.Evaluation.Project seems to have some rather odd ideas of what values to use when loading projects. In particular, I have a number of projects with the following dependency: <Pa...
When creating a new Blazor Webassembly project, there is a checkbox ASP.NET Core hosted where if selected will create three projects at once, a blazor webassembly project, an ASP.NET Core project, ...
Background I can see the need to use { } when implementing a function-like macro such as this one: #define HCF(code) fprintf(stderr, "halt and catch fire"); exit(code); Because if we use the f...
I have a function that which does some calculations. I would like to assign the result of the function to the global environment from within the function, how do I proceed? A minimal example: meanF...
I have a very large table that I need to iterate through with a PHP script and I can't do all of the results at once so I do it in sections with a LIMIT like for ($x = 0; $x < 10000000; $x += 1...
A couple of year ago a user of Super User reported difficulties with summing values purporting to be Euros imported to LibreOffice Calc in CSV format. In the Q the user does not mention the locale...
A self-answered question - How to get DATEVALUE to recognize RSS 2 pubDate (RFC822)? - written by spcsLrg on Web Applications Stack Exchange offers this formula: =DATEVALUE(TRIM(REGEXREPLACE(A1,"^...
Almost every table in my DB has triggers that fire on INSERT, UPDATE, DELETE and write the changes to a separate read only DB. This makes it possible to track changes and undo things well after the...
An as yet unanswered question on Web Applications, INDIRECT cell reference - Can't copy cell as reference cell pattern remains same, from @Daniel Klose is: I have an Overview Sheet where I want ...
From time to time I will have large structural changes to make on my MySQL DB, things like adding columns, changing datatypes, adding indexes etc. These types of changes result in downtime and what...
Say I want to implement a very basic group chat application. I use the H2 database, a user class, a controller, and a text file in the Resources folder that stores the chat texts. All texts would b...
As a person with no significant background in mathematics and computer science I thought that concatenation and AND are logically identical if not very similar because both add something to somethi...
Someone told me that I shouldn't write "NULL pointer" with capital letters, because a null pointer and NULL are different terms. And that NULL is a "null pointer constant". What's the meaning of th...
A Q on Stack Exchange from a very long time ago included: I have first names in one column and second names in another, I want to create a third column that contains the first character from the...
Note: This is basically a question from Stack Overflow that was closed for a very long period of time and I fear it might get closed again as primarily opinion based. I am wondering if my ASP.NET C...
I have a number of MySQL stored procedures that use a cursor to go through a select and then pass the results to other stored procedures one row at a time. This can take a while to run, what is hap...
I'm working on an API to respond some data about a bunch of orders and items. The order and item numbers are always an integer (it's the order.id and item.id value, respectively). Originally the re...
Angular CLI official page indicated how to install the CLI, but provides no information about how to upgrade it. I am interested in how to upgrade the CLI.
I've got this sample regex: Pattern p = Pattern.compile("(?:([aeiou]+)[0-9]+|([123]+)[a-z]+)\\W+"); It basically has the following parts: one or more lowercase vowels ([aeiou]+), followed by one ...