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)
66%
+2 −0
Get list of all variables from Jinja template

Suppose you have a jinja template like this: I am going to {{ foo }} to get some {{ bar }}. I hope I can find: {% for i in baz %} - {{i}} {% endfor %} This template will require you to pass ...

0 answers  ·  posted 6mo ago by matthewsnyder‭  ·  edited 6mo ago by Karl Knechtel‭

71%
+3 −0
Is it possible to obtain the unlock code from an unlocked Android device via the Android API or the developer command line tools?

I have an Android 10 device where the OS is unlocked but the bootloader is not. I can't obtain the unlock code through the normal channels because of bureaucratic incompetence. Given that the devi...

0 answers  ·  posted 3mo ago by Kevin Krumwiede‭  ·  edited 3mo ago by Alexei‭

71%
+3 −0
What guarantees does Bash make about order of :- Parameter Expansion when it is not in POSIX mode?

I tried to check info bash but only got a copy of the man page. This is when I learned that I could apt install bash-doc to get the "full" Bash manual. After checking both the info pages and the m...

1 answer  ·  posted 2mo ago by aghast‭  ·  last activity 2mo ago by Quasímodo‭

71%
+3 −0
How to resolve the mypy error "Returning Any from function declared to return 'Dict[str, Any]'" in Python?

I have a function that loads JSON data and is declared to return a dictionary with string keys and values of any type (Dict[str, Any]). However, mypy is raising an error stating that I am returning...

1 answer  ·  posted 9mo ago by ShadowsRanger‭  ·  last activity 9mo ago by Moshi‭

71%
+3 −0
Where is the `.fsproj` project file documented?

More specifically: Is there a dedicated docs page listing "properties" that are idiosyncratic to F# .fsproj project files? Why am I asking? Started learning F# a couple of days ago, but just now ...

1 answer  ·  posted 5mo ago by toraritte‭  ·  edited 5mo ago by toraritte‭

77%
+5 −0
What is the purpose of having underscored names and then defining a non-underscored alias to it?

In a C implementation in <stdio.h> on Linux I saw something like: extern FILE *__stdinp; extern FILE *__stdoutp; extern FILE *__stderrp; And then: #define stdin __stdinp #define stdou...

1 answer  ·  posted 5mo ago by 90 98‭  ·  last activity 5mo ago by aghast‭

60%
+1 −0
How to set the cell color to a user defined value using NPOI from F#?

As far as I can tell (from F# at least), cell can only be colored using predefined NPOI.SS.UserModel.IndexedColors. From the available methods / properties, val it: ICellStyle = NPOI.XSSF.UserM...

1 answer  ·  posted 4mo ago by toraritte‭  ·  last activity 4mo ago by toraritte‭

66%
+2 −0
When to use custom iterators versus pointers

I am working on a toy project where I have a container for which I would like to write an iterator that iterates over the values in the container. Because the values are stored in a (c-style) arra...

0 answers  ·  posted 8d ago by mr Tsjolder‭

50%
+1 −1
How do I properly render a quad in OpenGL using a GL_TRIANGLE_STRIP primitive?

I am currently working with LWJGL and the obstacle I face right now on my project is rendering textures to a cube, e.x a set of 8 vertices with position, color, and UV information. For now, I am st...

1 answer  ·  posted 7mo ago by cuzzo‭  ·  last activity 7mo ago by djm‭

71%
+3 −0
What is a reasonable minimum for making a FOSS project inviting to contributors?

A lot of people who maintain FOSS projects would like to get more contributions. What can the maintainer do to ensure that potential contributors are converted into actual contributors? There are...

2 answers  ·  posted 1mo ago by matthewsnyder‭  ·  last activity 1mo ago by Michael‭

66%
+2 −0
Resolving "fatal: Unable to find remote helper for 'https'" and a warning about templates

On a live boot of Ubuntu 20.04, I was trying to clone into a private GitHub repository. I went through the hassle of installing git, and then gh, and making sure I was signed in through the termina...

0 answers  ·  posted 8mo ago by Mithical‭

git
81%
+7 −0
Git add/stage only part of a file's changes

Say I've made a bunch of changes to a file and would like to split those changes into two or more commits. Normal git add however stages the whole file in one go. So how to add only some of the ch...

1 answer  ·  posted 6mo ago by Iizuki‭  ·  last activity 6mo ago by Iizuki‭

git
66%
+2 −0
Redux Toolkit Issue with Managing States

I am all new with using Redux Toolkit, I followed the official documentation to setup the store: // store.ts import { configureStore, ThunkAction, Action, combineReducers } from '@reduxjs/toolkit...

0 answers  ·  posted 9mo ago by boudagga.ma94‭

50%
+0 −0
Best practices to write functions for both execution modes in Tensorflow, eager and graph mode

I regularly run into the problem that I have a Python function that I want to use in both, eager and graph execution mode. I therefore have to adjust the code so that it can handle both situations....

1 answer  ·  posted 8mo ago by daniel_s‭  ·  edited 8mo ago by daniel_s‭

66%
+2 −0
Can I package a database other than SQLite with a Flutter app?

Flutter supports packaging a SQLite instance with a Flutter app using the Sqflite plugin. I do not like the speed of SQLite or the fact that it does not enforce column datatypes and want to use som...

0 answers  ·  posted 10mo ago by tarhalda‭  ·  edited 10mo ago by tarhalda‭

33%
+0 −2
module not found error, I need this speech directory for this project to work. [closed]

--- Here is the error message. Traceback (most recent call last): File "c:\Users\19185\Documents\GitHub\Chatty\Chatty\one_.py", line 3, in import azure.cognitiveservices.speech as speechsdk Mo...

0 answers  ·  posted 4mo ago by KunningFox‭  ·  closed 4mo ago by Alexei‭

57%
+2 −1
How to write a bash function to sanitize filenames for Linux and Windows

I'm trying to write a bash function that can sanitize filenames to make them compatible with both Linux and Windows file systems. The function should perform the following operations: Replace in...

0 answers  ·  posted 18d ago by ShadowsRanger‭

71%
+3 −0
What is a .gitkeep file?

Sometimes there are empty files named .gitkeep sprinkled around a repository. What are these files?

1 answer  ·  posted 23d ago by Iizuki‭  ·  edited 23d ago by Iizuki‭

git
60%
+1 −0
How to solve the "ReferenceError: service is not defined"?

Temporary notice: this is part of an ongoing project of transferring and splitting my canonical from Stack Overflow on common errors in Google Apps Script. As soon as the Q&As are finalized, ...

1 answer  ·  posted 9mo ago by Oleg Valter‭  ·  last activity 9mo ago by Oleg Valter‭

41%
+3 −5
Building a language model completely from scratch

What I would like to do I would like to try to build a language model 100% from scratch if possible, for a learning experience. That means no external libraries and no pre-curated datasets. It ...

1 answer  ·  posted 3mo ago by Julius H.‭  ·  last activity 2mo ago by matthewsnyder‭

50%
+0 −0
Does Socket.AcceptAsync throw SocketException for any transient reason?

I'm writing exception handling around a call to Socket.AcceptAsync in a loop. One of the exceptions it's documented to throw is SocketException, but the documentation is vague: An error occurred...

1 answer  ·  posted 4mo ago by Kevin Krumwiede‭  ·  last activity 4mo ago by Alexei‭

50%
+3 −3
Regex for simplifying Amazon product URLs

Amazon product URLs are often very long, but on experimentation it is revealed that the following pattern is sufficient: https://www.amazon.com/{dp|gp}/$ID ID is a 10-char string, which I'm gue...

1 answer  ·  posted 7mo ago by matthewsnyder‭  ·  last activity 7mo ago by mr Tsjolder‭

66%
+2 −0
VS code - stop reopening old tabs

When I open VS Code inside a project dir, it reopens all the tabs that were open last time, and re-expands all the folders that were unfolded last time. I find this annoying. Usually, when I close...

0 answers  ·  posted 20d ago by matthewsnyder‭

33%
+0 −2
Help with android studio gradle [closed]

I need help figuring out if my dependencies need upgrading or conflict with each other. I tried using the command prompt to solve problems but it didn't help. Here is my code. Android Studio Iguan...

0 answers  ·  posted 7mo ago by dnmnbg‭  ·  closed 7mo ago by Alexei‭

66%
+2 −0
VS Code: How to open a file and folder in a new window?

I've figured out that code --new-window /foo/bar/baz.txt will open baz.txt in a new window. But when I do this, it says "no folder opened" in the file explorer pane. That makes it hard to work with...

2 answers  ·  posted 7mo ago by matthewsnyder‭  ·  last activity 7mo ago by Moshi‭

77%
+5 −0
Programmatically import, edit and export DBC files

I am looking for a way to programmatically edit and save .dbc files that are meant for J1939 CAN communication. I have a few large files that need to be compared/edited. Being able to import, edit...

1 answer  ·  posted 10mo ago by HinkyDinky‭  ·  last activity 9mo ago by HinkyDinky‭

75%
+4 −0
How can one import two classes with the same name in Java8?

Some development tools provide an error message when a user tries to import two things (classes, packages) with the same name. Some programming languages offer a syntax to import one of those thing...

2 answers  ·  posted 3mo ago by tarhalda‭  ·  last activity 16d ago by Michael‭

60%
+1 −0
`git submodule foreach git pull` in parallel

I use git submodule foreach git pull to update my submodules. There's quite a few and it appears that foreach is updating them one by one, instead of in parallel. How can I do it in parallel?

1 answer  ·  posted 9mo ago by matthewsnyder‭  ·  last activity 8mo ago by GrantMoyer‭

66%
+2 −0
Maven exec:exec fails to see executables

I am stumped at Maven exec plugin. Running mvn exec:exec -Dexec.executable="curl" (or "echo") works. But when running mvn exec:exec or mvn exec:exec@b (or @a) it fails saying The parameter 'exe...

0 answers  ·  posted 9mo ago by LAFK‭

66%
+2 −0
How to automatically add package reference into project file after installing .NET package?

Just getting into F#, finally figured out how to add .NET packages to projects, but the way I managed to get it to work doesn't make sense. Once the package is installed (either with nuget or paket...

2 answers  ·  posted 6mo ago by toraritte‭  ·  last activity 5mo ago by toraritte‭

60%
+1 −0
Issues with receiving WM_INPUTLANGCHANGE etc. messages when language is chosen using hotkeys

I'm currently writing an input and output handling library for the D language, and I'm not getting any kind of input language change messages when the language is being toggled with hotkeys, and on...

1 answer  ·  posted 9mo ago by ZILtoid1991‭  ·  edited 9mo ago by Karl Knechtel‭

71%
+3 −0
Problems with Google Apps Script API JavaScript "How to... Execute function"

As this is the first question about Google Apps Script, here is a very brief description: it is a platform that helps people easily get programmatic access to Google apps data like Gmail messages, ...

1 answer  ·  posted 10mo ago by Wicket‭  ·  last activity 10mo ago by Wicket‭

66%
+2 −0
How can I manage multiple consecutive strings in a buffer (and add more later)?

This question is inspired by If I have a char array containing strings with a null byte (\0) terminating each string, how would I add another string onto the end? on Stack Overflow. Suppose I have...

2 answers  ·  posted 1mo ago by Karl Knechtel‭  ·  last activity 1mo ago by Lundin‭

60%
+1 −0
Drop-down values in Excel cells are not specified in Data Validation rules and global search didn't find them in workbook, so where do they come from?

On top of values seemingly coming from nowhere in multiple columns, they also affect each other's behavior: In the GIF below, if the cells in the left column have no value selected, then there is n...

1 answer  ·  posted 5mo ago by toraritte‭  ·  edited 5mo ago by toraritte‭

60%
+1 −0
How to call static methods in ColdFusion?

How to use static functions in ColdFusion? How to import component? How to call a static function using both tag and script syntaxes? Adobe added support for static functions in ColdFusion...

0 answers  ·  posted 9mo ago by Vanity Slug ❤️‭

66%
+2 −0
How can I return XML from BeforeSendRequest and AfterReceiveReply to the calling method in a thread-safe way?

We have a console application using the Azure WebJob SDK. The WebJob relies on a WCF service using SOAP, which it accesses through a DLL we wrote that wraps the auto-generated WCF types in somethin...

1 answer  ·  posted 11mo ago by Celarix‭  ·  edited 10mo ago by Alexei‭

71%
+3 −0
How do I pass field names containing dashes in dbt source yml file?

Working with dbt version 2 I'm trying to set up source checks but I'm running into an issue where the column names I'm setting tests for have dashes (e.g. my_table.some-field-with-dash). I current...

1 answer  ·  posted 7mo ago by Sigma‭  ·  last activity 7mo ago by Sigma‭

75%
+4 −0
What does "namespace" mean?

A well-known easter egg in Python displays some ideas about writing good Python code, credited to Tim Peters (one of the core developers). This question is about the last: Namespaces are one hon...

2 answers  ·  posted 5mo ago by Karl Knechtel‭  ·  last activity 5mo ago by Olin Lathrop‭

66%
+2 −0
Generating nested repeating values with JSON Generator

Hi, I'm trying to use the JSON Generator to create data with nested repeating values. I want to create 100 objects with an ID, Name, and Code. The Id is incremented from 0 to 99, but the Code (pr...

1 answer  ·  posted 11mo ago by mcalex‭  ·  last activity 11mo ago by __blackjack__‭

60%
+1 −0
MongoDB Java Morphia case insensitive criteria query?

So I googled some on how to make a case insensitive criteria query but could not find the solution very easily. So I basically have code that looks like this: ... query.criteria("fieldName").con...

1 answer  ·  posted 3mo ago by propatience‭  ·  edited 3mo ago by propatience‭

77%
+5 −0
Are there technical reasons to pick one struct coding style over the other?

C offers two different styles when it comes to structs (and union/enum too). Either declare them using a struct tag only ("struct tag style"): struct my_type { ... }; struct my_type x; Or ...

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

60%
+1 −0
Convert Synapse SQL Server hex `sid` to Azure Entra group object ID.

Suppose I have an Azure Synapse Serverless SQL database. I can run the following to get the sid of added groups: select name, type_desc, authentication_type_desc, sid from sys.database_principal...

0 answers  ·  posted 14d ago by daviewales‭

66%
+2 −0
"Move symbol" refactor for Python in Visual Studio Codium

Is there a way to add support for "move symbol" in Python code for VS Codium? PyCharm can do this, but I am looking for a VSC solution. PyLance can do this, but PyLance itself is closed source, a...

0 answers  ·  posted 9mo ago by matthewsnyder‭  ·  edited 9mo ago by matthewsnyder‭

71%
+3 −0
How to open VS code with a particular path expanded?

When you do: cd /some/path code . VS Code opens with that location shown in the "Explorer" sidebar. However, the state of the file tree and the currently open files will be the same as what wa...

0 answers  ·  posted 7mo ago by matthewsnyder‭  ·  edited 7mo ago by matthewsnyder‭

50%
+0 −0
Why does `distutils` seem to be missing or broken? Isn't it part of the standard library?

Sometimes when I try to install a third-party library for Python, I get an error saying that either distutils, or some part of it like distutils.core or distutils.util, could not be found. It's sho...

1 answer  ·  posted 2d ago by Karl Knechtel‭  ·  last activity 1d ago by Karl Knechtel‭

22%
+0 −5
AttributeError: module 'azure.cognitiveservices.speech' has no attribute 'VoiceProfile' [closed]

I need to use azure.cognitiveservices.speech. However I am getting this error: Here is code on replit it produces the same error. https://replit.com/@mystickain420/Chatty main -- https://githu...

0 answers  ·  posted 4mo ago by KunningFox‭  ·  closed 4mo ago by Alexei‭

77%
+5 −0
Terms for types of functions with respect to side effects

Mathematically, the purpose of a function is to return an output. However, in a programming context functions often have side effects. It is even common to call functions for the side effects alone...

2 answers  ·  posted 9mo ago by matthewsnyder‭  ·  last activity 9mo ago by Lundin‭

66%
+2 −0
Filter stashes by pathspec

The documentation for git stash list says list [<log-options>] List the stash entries that you currently have. Each stash entry is listed with its name (e.g. stash@{0} is the latest entry...

0 answers  ·  posted 28d ago by Michael‭  ·  edited 27d ago by Alexei‭

60%
+1 −0
Ghidra decompiler: c_str() used in phantom string?

I loaded a binary into Ghidra for analysis. The decompiler says undefined8 main(void) { basic_ostream *pbVar1; char *pcVar2; [--snip--] pbVar1 = std::operator<<(pbVar1,"PXZ ");...

1 answer  ·  posted 6mo ago by nteodosio‭  ·  edited 5mo ago by Alexei‭

60%
+1 −0
What is lifting state up in Flutter?

What does lifting state up in Flutter mean, and how does it work?

1 answer  ·  posted 10mo ago by tarhalda‭  ·  last activity 10mo ago by tarhalda‭