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 »
Q&A

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)
85%
+10 −0
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 3y ago by dmckee‭  ·  last activity 3y ago by Someone‭

75%
+4 −0
Resize HTML canvas with respect to inner content

I am currently making an esoteric language which requires a theoretically infinite canvas. Basically, it should be able to resize and fit the contents of the drawing in and outside it's existing bo...

0 answers  ·  posted 3y ago by Razetime‭

50%
+2 −2
Mocking tempnam() with vfsstream

How do I mock tempnam() with vfsStream for code that uses it to create temporary files (for example, in a PHPUnit test)?

1 answer  ·  posted 3y ago by tyteen4a03‭  ·  last activity 3y ago by summea‭

75%
+4 −0
How to define custom configurations in new-style .csproj?

Problem I'm trying to update some projects from old-style .csproj: <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.mi...

1 answer  ·  posted 3y ago by Peter Taylor‭  ·  last activity 2y ago by Peter Taylor‭

81%
+7 −0
.elf file - What contributes to the resulting .bin file size?

I have found this nice library for parsing/writing .elf files as output by e.g. the GCC toolchain: ELFIO I have a bare metal embedded project with an ARM Cortex M target. My goal is to overwrite...

0 answers  ·  posted 3y ago by sktpin‭  ·  edited 3y ago by sktpin‭

20%
+0 −6
What do smaller cloud companies offer that Big Tech clouds don't? [closed]

I don't understand why American Virtual Cloud Technologies, Inc and other similar teeny cloud computing platforms still exist, and haven't either gone bankrupt, or been acquired by one of Big Tech...

0 answers  ·  posted 3y ago by TextKit‭  ·  closed 3y ago by Alexei‭

75%
+4 −0
Capture args from repeatable flags in Golang pflags package

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...

1 answer  ·  posted 3y ago by qohelet‭  ·  edited 3y ago by Alexei‭

81%
+7 −0
How to choose backend technology for my project?

I am planning to build a "Customer Management Portal" as a hobby project using technologies like HTML,CSS,JavaScript,JAVA,JDBC,Oracle Database.The description of the portal is: 1)Customer details ...

3 answers  ·  posted 3y ago by aditya98‭  ·  last activity 3y ago by Matthewericfisher‭

84%
+9 −0
How to override default string formatter?

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...

1 answer  ·  posted 3y ago by luser‭  ·  edited 3y ago by Alexei‭

30%
+1 −5
How can software track [1] how many subscribers to subreddits, [2] if subreddit is private, [3] if submissions are restricted?

Master lists like 82 food subreddits and 128 tech subreddits don't indicate each's subscribers. if it's private. Sometimes moderators can make the sub private for several days, to clean i...

1 answer  ·  posted 3y ago by TextKit‭  ·  last activity 3y ago by r~~‭

71%
+3 −0
How to manage views and stored procedures in an ASP.NET Core project?

I am slowly modernizing an older ASP.NET Core Web API and one of the steps involved migrating from database first to code first. Now, all schema changes and seeding is covered by migrations which ...

0 answers  ·  posted 3y ago by Alexei‭

66%
+2 −0
Confusion about using std::async with class member function

So,I'm having a doubt when I call std:async() on a member function of a class. The book I'm reading says (emphasis mine) You can also pass a pointer to a member function to async(). In that case...

1 answer  ·  posted 3y ago by hamsasimon‭  ·  last activity 3y ago by Chris Jester-Young‭

60%
+1 −0
Is it necessary for a build server to remove node_modules before an AOT build?

I am currently dealing with an Angular application that is being deployed using an CI orchestrator and Jenkins. Jenkins job is configured to do the following (relevant steps only): fetch source...

2 answers  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by Derek Elkins‭

42%
+1 −2
Resources for learning Julia [closed]

I have decide to try out Julia. Is anyone aware of some good resources to get started with the language?

0 answers  ·  posted 3y ago by Guilherme Costa‭  ·  closed 3y ago by Alexei‭

66%
+2 −0
Tampermonkey userscript prevents pages from loading

I am currently making a userscript to interpret the APL programming language in a Stackexchange chat window. This is the code I have come up with: // ==UserScript== // @name APL chat // @ver...

1 answer  ·  posted 3y ago by Razetime‭  ·  last activity 3y ago by Razetime‭

77%
+5 −0
When should I use wait() instead of get() when using C++ threads

I'm trying to understand the purpose of the wait() function in Class future<> for C++. At the moment I don't see any purpose for calling wait() instead of get(). What I have tried in code: i...

1 answer  ·  posted 3y ago by hamsasimon‭  ·  last activity 3y ago by Derek Elkins‭

75%
+4 −0
List what file(s) an identifier was declared in?

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...

1 answer  ·  posted 3y ago by Hyperlynx‭  ·  last activity 3y ago by summea‭

80%
+6 −0
How to do "out-of-source" build properly with cmake?

There are two broad types of build environments - in-source and out-of-source. "In-source" means the compiled files will appear in the same directory as source files. "Out-of-source" means there is...

2 answers  ·  posted 3y ago by anatolyg‭  ·  last activity 3y ago by alex‭

80%
+6 −0
Fail to send DICOM C-Echo, although DICOM Association seems successful.

I am building an Android app to perform a DICOM C-Echo. (DICOM is a standard for storing and transferring medical images; the specification is at dicom.nema.org). My purpose is to learn more about ...

0 answers  ·  posted 3y ago by FractionalRadix‭  ·  edited 3y ago by FractionalRadix‭

83%
+8 −0
How do I find the order that yields the shortest path?

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...

1 answer  ·  posted 3y ago by matthewb‭  ·  edited 3y ago by matthewb‭

80%
+6 −0
Why is this symlink() call returning successfully while apparently failing to create the sym-link?

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...

1 answer  ·  posted 3y ago by ghost-in-the-zsh‭  ·  last activity 2y ago by ghost-in-the-zsh‭

71%
+3 −0
Union of queries depending on variable in list

I have a big Cypher query that is depending on a variable. Example: With REGION = 'Canada' query I want to execute this query several times based on different values on a list and return the UN...

1 answer  ·  posted 3y ago by Guilherme Costa‭  ·  edited 3y ago by Alexei‭

62%
+3 −1
How do I choose the correct Perl module from these variations?

When looking for Perl modules to handle JSON strings and/or documents, I found JSON::PP and JSON::XS. The documentation of JSON::PP says it is compatible with JSON::XS. What do these suffixes me...

1 answer  ·  posted 3y ago by ghost-in-the-zsh‭  ·  edited 3y ago by ghost-in-the-zsh‭

72%
+6 −1
What are the pros and cons of using objects vs associative arrays for JSON results of a CURL request in PHP?

I have a PHP script that uses CURL to return a JSON result that looks //Curl set up code $result = curl_exec($ch); //Error checking code $json = json_decode($result, true); //Code to process r...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by Yaskur‭

66%
+2 −0
What are the cons of directly mocking Entity Framework DbSets instead of working with an in-memory database when unit testing the application?

I have recently contributed to a Clean Code project and had a discussion about how to implement unit tests. The project author argues for using an in-memory database (which easily replaces the rea...

1 answer  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by Goyo‭

66%
+4 −1
How can I write an egrep (grep -E) regexp that matches lines containing two stanzas in arbitrary order?

I have line-based data on the form x1=y2; a3=b4; c5=d6; ... Matching this with a extended regular expression is fairly straightforward; for example, one can do something not entirely dissimilar...

3 answers  ·  posted 3y ago by Canina‭  ·  last activity 3y ago by hkotsubo‭

78%
+9 −1
What is do { } while(0) in macros and should we use it?

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...

2 answers  ·  posted 3y ago by Lundin‭  ·  last activity 5mo ago by Karl Knechtel‭

57%
+2 −1
Jenkins failed to delete a file - why? How to prevent?

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...

2 answers  ·  posted 3y ago by anatolyg‭  ·  last activity 1y ago by anatolyg‭

66%
+2 −0
Search paths where all nodes are in a relationship with same node

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?

1 answer  ·  posted 3y ago by Guilherme Costa‭  ·  last activity 3y ago by r~~‭

90%
+18 −0
Does the location of an import statement affect performance in Python?

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...

1 answer  ·  posted 3y ago by ghost-in-the-zsh‭  ·  last activity 3y ago by ghost-in-the-zsh‭

66%
+2 −0
How to automatically run Entity Framework Core migrations for an application which uses a user with read/write rights on certain tables?

I have decided to convert a legacy database-first ASP.NET Core project to code-first. However, I have noticed that the project used the same database as another bigger project and the Entity Framew...

1 answer  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by Alexei‭

75%
+4 −0
Static and thread_local initialization order

Is there any guarantee regarding initialization of static and thread_local objects? In example, is there any guarantee about the value printed by the following program? #include<iostream> s...

1 answer  ·  posted 3y ago by Estela‭  ·  edited 3y ago by Alexei‭

71%
+3 −0
In PHP what is the use case for include instead of require when including PHP scripts?

In PHP one can either use include or require to include files, the difference is that if the file doesn't exist it will emit a fatal error and halt with a require and only emit a warning with inclu...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by Marijn‭

php
75%
+4 −0
Is there a way to automatically fix MySQL tables where the auto_increment has fallen behind the correct value?

Due to a series of unfortunate events I have some tables where the auto_increment value got behind what it should be. If the auto_increment value is 9 and there are 20 rows in the table the next 1...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by Alexei‭

71%
+3 −0
In MySQL is there a limit to the number of keys in a IN() clause?

I have a PHP program that does a SELECT and then updates some of the values based on an algorithm. Rather than updating one row at a time UPDATE example_table SET COLUMN_A = 1 WHERE primary_k...

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by Alexei‭

87%
+12 −0
Are there best practices for sticking conditions in WHERE clauses vs the JOIN statement?

Lets say I have two tables, A and B and I need to join a subset of them. Is there best practices of sticking the conditions in the WHERE clause like this, SELECT * FROM A JOIN B on a.fk_b = b....

3 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 7mo ago by billkarwin‭

71%
+3 −0
Iterating through a MySQL table with a LIMIT clause and PHP gets progressively slower

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...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by ArtOfCode‭

71%
+3 −0
How to make Microsoft.Build.Evaluation.Project use same base properties as Visual Studio?

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...

1 answer  ·  posted 3y ago by Peter Taylor‭  ·  last activity 3y ago by Peter Taylor‭

83%
+8 −0
Is MISRA-C useful outside safety-critical and embedded programming?

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 ...

1 answer  ·  posted 3y ago by Lundin‭  ·  last activity 3y ago by ghost-in-the-zsh‭

54%
+4 −3
How can I make --reset-author the default?

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...

3 answers  ·  posted 3y ago by Hyperlynx‭  ·  last activity 3y ago by Charlie Brumbaugh‭

git
66%
+2 −0
How to perform LEFT JOIN using LINQ method call notation?

I am interested in performing a LEFT JOIN using LINQ-2-SQL when working with method call notation. This answer suggests a way that relies on GroupJoin but it is more verbose than expected: var le...

1 answer  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by Alexei‭

75%
+4 −0
Unable to `mount` overlayfs in Docker container when inside a LXC with a ZFS pool

Summary/Context I'm currently working to improve performance and throughput of our automation infrastructure, most of which is a combination of Bash/Shell scripts, Python scripts, Docker, Jenkins,...

1 answer  ·  posted 3y ago by ghost-in-the-zsh‭  ·  last activity 3y ago by ghost-in-the-zsh‭

71%
+3 −0
Why would an unique index get moved to the primary key after the underlying column is dropped?

So I had a table with a primary key and a bunch of different columns. Columns A, B, and C were all unsigned ints (like the primary key column) and each column had a unique constraint I dropped the...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Alexei‭

50%
+0 −0
How to drop all stored procedures from a MySQL database

I need to drop all of the stored procedures from my MySQL database before I recreate them. How can I do so?

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Peter Mortensen‭

75%
+4 −0
How can I add "withCredentials:true" for HTTP requests generated by Swagger UI?

I have added Swagger UI for an ASP.NET Core 3.1 application and I have realized that all endpoints requiring Windows Authentication fail. This issue is created by the fact that generated HTTP reque...

1 answer  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by Alexei‭

80%
+6 −0
Proper way of sending large amount of data from View to ViewModel

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...

1 answer  ·  posted 3y ago by FractionalRadix‭  ·  last activity 2y ago by nnlei‭

77%
+5 −0
Is it possible in MySQL to require each row in a table have at least one foreign key record in a join table?

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...

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by Alexei‭

62%
+3 −1
DST disrupting rsync twice a year

I'm facing rsync full syncs every once upon a time, I think it's because DST, notice an hour of difference: $ ls -l tier2/VIDEO-2020-06-17-15-10-27.mp4 /Volumes/KINSTON2/dat/laptop_kinstones/tier2...

1 answer  ·  posted 3y ago by .                                                .‭  ·  last activity 2y ago by .                                                .‭

60%
+1 −0
How can I can I reduce the size of a SQL Server database after being restored and massive embedded files stripped?

My project has the following set up for the production and preproduction ("clone") environment. Production is not accessible at all for the development team, only the preproduction database. Pr...

1 answer  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by Alexei‭

66%
+2 −0
How much memory is allocated for a MySQL VARCHAR variable in a stored procedure?

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...

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by Alexei‭