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

General Q&A about programming, scripting, software design & architecture, process, tools, testing, and more.

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 2y ago by Kami‭  ·  edited 2y ago by Monica Cellio‭

80%
+6 −0
How do I customize merge behavior for a shared git repo?

I often find it useful to arrange things so that each commit on master's first-parent is a discrete change. It allows git log --first-parent --oneline to be used as a concise, automatically-generat...

0 answers  ·  posted 2y ago by ajv‭  ·  last activity 2y ago by Alexei‭

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 2y ago by Charlie Brumbaugh‭  ·  edited 2y ago by Charlie Brumbaugh‭

80%
+6 −0
How to store credentials for PHP scripts on a Windows machine?

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

1 answer  ·  posted 2y ago by Charlie Brumbaugh‭  ·  edited 2y ago by Charlie Brumbaugh‭

75%
+4 −0
Generate SIGSEGV without undefined behaviour.

In order to test that coredumps are generated and that they contain useful information which can be retreived with gdb I need to generate a SIGSEGV. Or anything else which causes a coredump. The co...

1 answer  ·  posted 2y ago by Estela‭  ·  last activity 2y ago by Lundin‭

60%
+1 −0
Access TypeScript class outside bundled code

I'm developing the design framework for a certain Q&amp;A site. We are currently using an external dependency for the tag selector on the post editor, but it has some disadvantages (not fitting int...

1 answer  ·  posted 2y ago by luap42‭  ·  last activity 2y ago by ArtOfCode‭

83%
+8 −0
Why don't format specifiers work with lists, dictionaries and other objects?

When I want to print a number or a string, I can use f-strings (Python &gt;= 3.6) or str.format, and I can use just the variable between braces, or use format specifiers. Ex: num, text = 10, 'abc' ...

1 answer  ·  posted 2y ago by hkotsubo‭  ·  edited 2y ago by sth‭

86%
+11 −0
What is undefined behavior and how does it work?

I have created this sensational program: #include &lt;stdio.h&gt; int* func (void) { int local=5; return &amp;local; } int main (void) { printf("%d\n", *func()); } This prints 5 even thoug...

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

71%
+3 −0
Can renaming a MySQL column be sped up by dropping indexes or foreign keys?

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

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

60%
+1 −0
How to upgrade a recent (>= 8) Angular CLI?

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.

1 answer  ·  posted 2y ago by Alexei‭  ·  last activity 2y 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 2y ago by Welz‭  ·  last activity 2y ago by .                                                .‭

80%
+6 −0
Is it undefined behaviour to just make a pointer point outside boundaries of an array without dereferencing it?

I have heard that it is undefined behaviour to make a pointer point outside boundaries of an array even without dereferencing it. Can that really be true? Consider this code: int main(void) { ...

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

86%
+11 −0
Different behavior with relative imports when using flask vs py

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

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