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 »

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

Advanced Search Options

To further refine your search, you can use additional qualifiers such as score:>0.5. For example, the search score:>=0.5 created:<1y grammar would return only posts mentioning "grammar" that have a score >= 0.5 and were created less than a year ago.

Further help with searching is available in the help center.

Quick hints: tag:tagname, user:xxx, "exact phrase", post_type:xxx, created:<N{d,w,mo,y}, score:>=0.5

Filters
2.6k posts
 
75%
+4 −0
Q&A How to protect the git respository for a public_html folder on a Linux server?

The best practice here is, Don't deploy your .git folder to your web server. Then there's nothing to protect.

posted 4y ago by ShowMeBillyJo‭

Answer
75%
+4 −0
Q&A Count the number of occurrences in a text string

Although spreadsheets were never really intended for text processing, I think a formula solution is possible (LibreOffice 5.4.3.2): For the first example above: =(LEN(A1)-LEN(SUBSTITUTE(A1,"XYZ",""...

posted 4y ago by pnuts‭  ·  last activity 3y ago by Alexei‭

Answer
75%
+7 −1
Meta Strategy to migrate meaningful content from Stack Overflow

I was thinking about meaningful content that can be migrated (+ improved) from Stack Overflow. These categories pop into my mind: closed questions: we know Stack Overflow is very picky when it co...

2 answers  ·  posted 4y ago by Alexei‭  ·  last activity 4y ago by Mithical‭

75%
+4 −0
Meta Long code lines are not wrapped

As Lundin points out, there are quite a few whitespace-sensitive programming languages out there, where automatic wrapping would change the apparent meaning of the code, such as Phython or JavaScri...

posted 4y ago by meriton‭

Answer
75%
+4 −0
Meta Long code lines are not wrapped

Code blocks that are wider than the column they're trying to fit in now get horizontal scrollbars. As noted in another answer, it's not safe to assume that line-wrapping won't change the correctne...

posted 4y ago by Monica Cellio‭

Answer
75%
+4 −0
Q&A Is concatenation a logical AND?

tl;dr: No. From an engineering perspective, you might be asking if a concatenation operator can be used in place of a logical ‘and’ operator. This is obviously specific to a particular language, bu...

posted 4y ago by r~~‭  ·  edited 4y ago by r~~‭

Answer
75%
+4 −0
Q&A What is the difference between a hook and a code injection?

I believe the term "hook" comes from the Windows API where you can register "hooks" - callback functions - to respond to certain events, optionally replacing the original behavior. Not necessarily ...

posted 4y ago by Lundin‭  ·  last activity 4y ago by Lundin‭

Answer
75%
+4 −0
Q&A Is there a way to estimate the execution time of a statement in MySQL?

The best way to estimate this is to measure it, for instance by importing a backup of the production database into a new instance and run your scripts there. Short of that, you could consult the ex...

posted 4y ago by meriton‭

Answer
75%
+4 −0
Q&A Is there an equivalent way of returning early in a MySQL stored procedure?

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

1 answer  ·  posted 4y ago by Charlie Brumbaugh‭  ·  edited 4y ago by Moshi‭

75%
+4 −0
Meta Give actionable feedback when closing questions

This is a current limitation of the software. Right now, there is simply no way to add detailed feedback to the close reason. There is a list of pre-written close reasons (which can be set per site...

posted 4y ago by Moshi‭

Answer
75%
+4 −0
Q&A How to store credentials for PHP scripts on a Windows machine?

Solution 1: Honestly, it is a best practice used by current frameworks (symfony, laravel) to use an .env file that you will have into the .gitignore. On the otherside, you will commit a .env.dist o...

posted 4y ago by davidbonachera‭  ·  edited 4y ago by davidbonachera‭

Answer
75%
+4 −0
Q&A Would a MySQL database run more efficiently with smaller varchar lengths?

I have a database with quite a few VARCHAR fields. When the database was first built the lengths of the columns were set a bit larger than absolutely necessary. Now after, having used the DB for a ...

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

75%
+4 −0
Q&A How do I get IIS UrlRewrite to handle CSS-delivered woff files appropriately?

Context: Azure; Windows Server 2012; IIS 8 First up, here's the (redacted) web.config for reference <rewrite> <rules> <rule name="ReverseProxyInboundRule1" stopProcessing="false"&...

0 answers  ·  posted 4y ago by bugmagnet‭  ·  edited 4y ago by Alexei‭

75%
+7 −1
Meta Importing Selected Q&A?

Just mass-importing from elsewhere is generally bad. Look at the mess this has made of the Outdoors and Scientific Speculation sites, for example. Bringing over your own content is a bit different...

posted 4y ago by Olin Lathrop‭  ·  edited 4y ago by Olin Lathrop‭

Answer
75%
+4 −0
Q&A Why would excluding records by creating a temporary table of their primary keys be faster than simply excluding by value?

is_excluded = 1 is very different from do_not_touch != 1. Whenever possible, try to structure your data and queries so that you can do an equi-join - that is, compare things using an = comparison. ...

posted 4y ago by BobJarvis‭

Answer
75%
+10 −2
Q&A What are the pros and cons of a composite primary key versus a unique constraint?

Let's say we have two tables A and B and a join table C that has foreign keys to both A and B and the combination of those foreign keys is unique. One could either do a unique constraint or a comp...

2 answers  ·  posted 4y ago by Charlie Brumbaugh‭  ·  edited 4y ago by Alexei‭

75%
+4 −0
Q&A What is a standard definition (or a CS theory based formal definition) for Escaping?

The term escape sequence apparently dates back to the telegraph and pre-computer technology, according to wikipedia: https://en.wikipedia.org/wiki/Escape_sequence. So I doubt there's an universally...

posted 4y ago by Lundin‭

Answer
75%
+4 −0
Q&A What is a standard definition (or a CS theory based formal definition) for Escaping?

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

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

Question string escaping
75%
+4 −0
Q&A Is it possible in MySQL to require each row in a table have at least one foreign key record in a join table?

If I understand your question correctly, i.e. Is it possible to enforce that constraint at the database level? Then the short answer is: No. In the business logic for the program, every re...

posted 4y ago by ghost-in-the-zsh‭

Answer
75%
+4 −0
Q&A Is omitting braces for single statements bad practice?

I'm in the "Use the braces. Just use them every time" camp [1]. As others have suggested you or your tooling will catch a lot of cases where you screw up on this, but the ones that slip through can...

posted 4y ago by dmckee‭  ·  edited 4y ago by dmckee‭

Answer
75%
+4 −0
Q&A 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 4y ago by ghost-in-the-zsh‭  ·  last activity 4y ago by ghost-in-the-zsh‭

Question linux bash docker lxc zfs
75%
+4 −0
Q&A Why would an unique index get moved to the primary key after the underlying column is dropped?

I can't say that I fully understood what you did, but I think I got the explanation: removed 1+ columns that were part of the index. The index will be updated to not include that column. If...

posted 4y ago by Alexei‭  ·  edited 4y ago by Alexei‭

Answer
75%
+4 −0
Q&A Iterating through a MySQL table with a LIMIT clause and PHP gets progressively slower

LIMIT/OFFSET, fundamentally, is slow for large datasets. With a clause like LIMIT 10000 OFFSET 150000, you're asking the query engine to find 160,000 rows, then throw away 150,000 of them. Hardly e...

posted 4y ago by ArtOfCode‭

Answer
75%
+4 −0
Q&A 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 4y ago by Charlie Brumbaugh‭  ·  last activity 4y ago by Alexei‭

75%
+4 −0
Q&A 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 4y ago by Estela‭  ·  edited 4y ago by Alexei‭