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)
77%
+5 −0
How to match standard email addresses with regex?

I want to match standard email syntax (lowercased English, numbers and perhaps also some hyphens and underscores) with regex for a sed operation that matches and changes a single email address insi...

1 answer  ·  posted 3y ago by deleted user  ·  last activity 3y ago by hkotsubo‭

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‭

57%
+2 −1
How can I reduce the size of .svn folder?

Note: This question and its answer are an aggregate of the most up to date information about this topic from here. I have noticed that .svn folder has grown a lot and I want to reduce it. How can ...

1 answer  ·  posted 3y ago by Alexei‭  ·  edited 3y ago by r~~‭

71%
+3 −0
Include a Blazor Webassembly project into an existing ASP.NET Core project

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

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

57%
+2 −1
What's the minimum API level for activity transition?

I was trying to show transition on activity changes. I had followed two method from SO. I lost those link so I can't add them here. My first method was I had used overridePendingTransition on onCr...

1 answer  ·  posted 2y ago by Anonymous‭  ·  last activity 2y ago by Anonymous‭

70%
+5 −1
What does a variable followed by parentheses ("ptr()") mean?

What does ptr() mean in this code? #include<stdio.h> #include<stdlib.h> void PrintHello() { printf("Hello\n"); } int Add(int a, int b) { return a+b; } int main...

2 answers  ·  posted 2y ago by dumplings‭  ·  last activity 2y ago by Martin Bonner‭

84%
+14 −1
What's the correct way to merge a branch and its dependent branch back to master?

In git I branched feature-A from master. To reduce eventual merge conflicts later, I branched feature-B, which heavily overlaps and depends on A, from feature-A. A build of the feature-B branch s...

2 answers  ·  posted 3y ago by Monica Cellio‭  ·  edited 2y ago by hkotsubo‭

50%
+1 −1
Nannou model requires a function pointer: How to return a function pointer

Trying to make a nannou app from the template but with a customizable model() function. The template has this main(): fn main() { nannou::app(model).update(update).run(); } The model t...

0 answers  ·  posted 2y ago by telefza‭  ·  edited 2y ago by Alexei‭

42%
+1 −2
&lrm; character jumbles text and this can be confusing when working with many articles

I often work bidirectional text in content management systems and often that text has parenthesis (()) or other textual wrappers flipping after an English text which is preceded in itself by some R...

0 answers  ·  posted 2y ago by deleted user

60%
+1 −0
Data validation applied to tickboxes

Given ColumnA contains a Text header (A1), an allowed maximum number (A2), fifty tickboxes (A3:A62) and a formula in A63 of: =countif(A3:A62,TRUE) how can I block application of more than the a...

0 answers  ·  posted 3y ago by pnuts‭  ·  last activity 3y ago by pnuts‭

60%
+1 −0
Find image for contact list in Android Java

How to get image of contact list? I was using cursor to get contact list. Here how it looks like. ArrayList<HashMap<String, String>> contactList = new ArrayList<>(); Has...

1 answer  ·  posted 2y ago by Anonymous‭  ·  last activity 2y ago by Anonymous‭

80%
+6 −0
Is migrating emails from one hosting provider to another a trouble?

I rent a shared-hosting environment with CentOS-Bash, Apache, PHP, MySQL and a web-based IMAP email client (Roundcube) and some more tools, on which I host my personal website; I don't have Cpanel...

1 answer  ·  posted 3y ago by deleted user  ·  edited 25d ago by Alexei‭

80%
+6 −0
Is there a naming convention for table aliases?

Sometimes, either to reduce the amount of typing big table names or when joining a table to itself one will need to alias a table. Personally I find SQL statements with aliases harder to read and a...

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

60%
+1 −0
Permutations of an array - APL

In Dyalog APL, there's a predefined function in the dfns library to generate a matrix of permutations for a list of the numbers from 1 to n. I want to create the same functionality, except that it...

1 answer  ·  posted 3y ago by Razetime‭  ·  edited 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‭

84%
+9 −0
Is it dangerous to use json.loads on untrusted data?

I manage a wsgi application that accepts JSON data via POST from potentially untrusted sources. Normally it is treated as a text blob and never parsed, but there is a value in the expected input th...

1 answer  ·  posted 2y ago by ajv‭  ·  last activity 2y ago by hkotsubo‭

80%
+6 −0
Strange change of object lightness and colour in Nannou application

Building a Nannou App from their template. I want a circle to slowly fade in color and randomly change color when hitting the boundary of the window. But there is something strange going on when ...

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

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‭

57%
+2 −1
How to convert an RFC822 timestamp to a date index number?

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,"^...

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

83%
+8 −0
Should I cast to (void) when I do not use the return value

I saw at least one compiler (Codewarrior for HC12) warn me if I use a function without using it's return value. Other compilers (clang/gcc) do not issue a warning though, even when using the std=90...

3 answers  ·  posted 3y ago by Kami‭  ·  edited 3y ago by Monica Cellio‭

37%
+1 −3
What's the better way to deal with deprecated feature?

It's a very old question came to my mind. Whenever I start building some applications for Android using Android Studio. In every update, lots of tools get deprecated. I know I can use deprecated "t...

0 answers  ·  posted 2y ago by Anonymous‭  ·  edited 2y ago by Anonymous‭

18%
+0 −7
How can I crop white margins, when I print a 1 column Word document as 2 pages per sheet? [closed]

My Word document has just 1 column, and I don't want to convert it into 2 columns. When you command Word to print 2 pages per sheet, Word doesn't let you shrink the white margins. How can I improv...

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

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‭

75%
+4 −0
What are the disadvantages of using SQL Server Replication - Transactional Replication type?

The context A reports related process is directly reading the production operational database once about two hours. This involves reading all the data from some 70 tables which takes a couple minu...

0 answers  ·  posted 2y 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‭

82%
+12 −1
Why is it considered bad practice to use float for representing currency?

This is intended to be a canonical post for this problem which is pretty common. Especially among beginners. I've heard that I should avoid using floating point variables for representing curren...

2 answers  ·  posted 2y ago by klutt‭  ·  last activity 2y ago by klutt‭

22%
+0 −5
What are the types of contact forms?

I get the impression that there are two general types of contact forms: A regular contact form where all fields are in one webpage ; such form might be very long for a potential customer ("too m...

1 answer  ·  posted 3y ago by deleted user  ·  last activity 3y ago by manassehkatz‭

50%
+1 −1
How to temporarily disable a MySQL user?

Sometimes I will need to temporarily lock out other MySQL users when I am making large structure changes and want to make sure that nobody else is inputting or changing the data. The other use case...

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Charlie Brumbaugh‭

81%
+7 −0
How can I find git branches where all branch-local commits are from specific people?

We have a bunch of dead branches in our git repository, and I'd like to clean them up. Ones that were merged (but not deleted at the time) are easy; we can see those in the branch list on Bitbucke...

2 answers  ·  posted 3y ago by Monica Cellio‭  ·  edited 3y ago by Alexei‭

50%
+2 −2
How to show XML in browser?

Is there possible way to run XML like as HTML? Suppose, I have following code. <?xml version="1.0" encoding="UTF-8"?> <breakfast_menu> <food> <name>Belgian Waffles&l...

2 answers  ·  posted 2y ago by Anonymous‭  ·  last activity 2y ago by desbest‭

77%
+5 −0
Handling JSON files in Rust without manually creating mapping classes

I have JSON that looks something like this: {"id":"n-fsdf-6b6", "name":"JohnSmith", "revisionDate":1591072274000} The JSON data is named CharacterInfo. It comes from a static external URL. The str...

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

22%
+0 −5
Why I am unable to find a class after implementing library also?

I had found a better way to plot in Java. int n = Integer.parseInt(args[0]); // the function y = sin(4x) + sin(20x), sampled at n+1 points // between x = 0 and x = pi ...

0 answers  ·  posted 2y ago by Anonymous‭  ·  edited 2y ago by Anonymous‭

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‭

50%
+0 −0
Loss of precision when concatenating an exchange rate with a string

In response to a Q on Web Applications [WA] the asker self-answered with: =CONCATENATE("@ £/€ rate: ",text(J21,"0.00000")) The issue was that, with "in a cell J21 I have a set value 1.10000":. ...

0 answers  ·  posted 3y ago by pnuts‭  ·  last activity 3y ago by pnuts‭

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‭

33%
+1 −4
Convert .npy files in a directory to images (.png)

I have around 20,000 .npy files in a directory. That main directory has no subfolders:- Main_dir | |--1.npy |--2.npy |--3.npy |--........ The absolute file paths are stored ...

2 answers  ·  posted 3y ago by Neel_Gupta‭  ·  last activity 3y ago by hoverhell‭

53%
+5 −4
What's the difference between Inheritance and Polymorphism?

I'm using Java code as an example, but this can be answered if you don't know Java. class Bird{ public void sing(){ System.out.println("Testing"); } } class anClass ex...

2 answers  ·  posted 3y ago by deleted user  ·  edited 2y ago by Alexei‭

80%
+6 −0
Is it recommended for ASP.NET Web API actions to always include a CancellationToken?

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

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

71%
+3 −0
Error: 18456, Severity: 14, State: 5; SSMS > Network sever from PC

I just completed my first install of SQL as a server-based, Enterprise Edition. I wanted to check it out using SSMS on PC using my Admin Access. But could not connect. For security reasons my adm...

1 answer  ·  posted 3y ago by James Jenkins‭  ·  edited 3y ago by Alexei‭

75%
+4 −0
How to generate multi-line completions (code generation) with OpenAI?

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

1 answer  ·  posted 3y ago by Alexei‭  ·  edited 3y ago by deleted user

70%
+5 −1
How allocated memory is calculated?

int arr[] = {10,123,14,14,15,16}; cout<<sizeof(arr)/sizeof(arr[0]); I was reading the article. When sizeof() is used with the data types such as int, float, char… etc it simply ret...

1 answer  ·  posted 2y ago by Anonymous‭  ·  last activity 2y ago by Canina‭

71%
+3 −0
What are the factors to consider when deciding to split ORM queries or use eager loading?

I have extensive working experience with Entity Framework ORM and have noticed two major ways of writing LINQ (LINQ2SQL): lot of eager loading: the most prevalent, uses (lots) of Includes to eag...

0 answers  ·  posted 3y ago by Alexei‭

86%
+11 −0
Does using an Integer have any speed/performance benefits over a string in JSON

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

3 answers  ·  posted 3y ago by Welz‭  ·  last activity 3y ago by .                                                .‭

66%
+2 −0
Are hyphens and/or underscores valid in golang package names?

Can a Go package name validly contain a hyphen and/or an underscore? The godocs say that By convention, packages are given lower case, single-word names; there should be no need for underscores or...

1 answer  ·  posted 3y ago by qohelet‭  ·  last activity 3y ago by Moshi‭

42%
+1 −2
How to add to the value of one cell an amount that depends upon the range of a different cell?

A user of Web Applications asked how to: +1 when the value is >=5, +2 when the value is >=10, +3 when the value is >=15, +4 when the value is >=20, +5 when the value is >=25...

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

64%
+9 −4
Is omitting braces for single statements bad practice?

Consider this code: while(arr[index] != 0) index++; vs while(arr[index] != 0) { index++; } Personally, I prefer the first. The fact that the braces are not needed makes them -- u...

6 answers  ·  posted 3y ago by klutt‭  ·  last activity 8mo ago by H_H‭

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‭

71%
+3 −0
How to create a MySQL generated column that uses a join in a concat?

I have a column that is a concatenation of 5 other columns plus a join to a different table. UPDATE db.a JOIN db.b ON fk_b = b.pk SET concat_field = CONCAT(field1,field2,field3,b.field,field4,fi...

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

44%
+2 −3
Why often times data compression causes data loss?

I understand data compression as making data structures nearer (if they are mere machine code without any abstract representation) or representing them in less and less abstract computer languages ...

2 answers  ·  posted 3y ago by deleted user  ·  edited 3y ago by deleted user

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‭