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)
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 2mo ago by Julius H.‭  ·  last activity 2mo ago by matthewsnyder‭

75%
+4 −0
Why does `Zip` require `Semialign`

The Zip class from Data.Zip requires an implementation of Semialign: class Semialign f => Zip f In my mind: Zip takes the intersection of two shapes. Semialign takes the union of two sha...

1 answer  ·  posted 2mo ago by WheatWizard‭  ·  last activity 2mo ago by r~~‭

62%
+3 −1
What happens when you “Sign in with Google”?

I believe when you sign in with Google, the web application running in your browser calls a command to request the Google Sign In page, and includes a “callback URL” as a parameter in that HTTP req...

0 answers  ·  posted 2mo ago by Julius H.‭  ·  edited 2mo ago by Julius H.‭

75%
+4 −0
How do you add "Sign In with Google" to a Ruby on Rails web application that is using the Devise authentication framework?

I want to add the ability to "Sign in with Google" into a Ruby on Rails web application, that is using Devise to handle authentication. How do I do that?

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

60%
+1 −0
Can Swashbuckle.AspNetCore generate exclusiveMinimum validation?

Is there a way to make Swashbuckle.AspNetCore generate a Swagger exclusiveMinimum range validation for a model property? There doesn't seem to be any way to do this with the attributes recognized ...

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

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 2mo ago by propatience‭  ·  edited 2mo ago by propatience‭

66%
+2 −0
What is the purpose of having a wrapper class for JarFile in Spring-boot-loader?

My question relates to Spring-boot-loader v2.6.15. For the purposes of this question, I will refer to Spring's custom JarFile class as CustomJarFile to avoid confusion. Context I am reusing so...

1 answer  ·  posted 3mo ago by Miss Skooter‭  ·  last activity 2mo ago by Miss Skooter‭

91%
+19 −0
Should a salt be stored in the same database as the hash?

To protect against dictionary and rainbow table attacks it is well known that passwords should be salted before hashing. The salt (unique to each password) gets stored with the hash, often in the s...

5 answers  ·  posted 3y ago by jla‭  ·  last activity 2mo ago by bencurthoys‭

75%
+4 −0
Is there any rationale for the lack of local constants in PHP?

The last few years, PHP has basically exploded with lots of modern language constructs that makes the life easier. But local constants are still missing, and I find that very strange. I have found...

0 answers  ·  posted 2mo ago by klutt‭

php
80%
+6 −0
Git apply vs git am

What are the differences between git apply and git am commands? Both seem to be used for applying patches to repositories. When should one be used over the other?

1 answer  ·  posted 3mo ago by Iizuki‭  ·  last activity 3mo ago by Michael‭

git
75%
+7 −1
How can I provide additional information when raising an exception?

Suppose I have some code like: filename = "bad_dir" print(f"File not found: {filename}.") raise(FileNotFoundError) When the exception isn't caught, the stack trace is printed at the end of ...

2 answers  ·  posted 1y ago by mcp‭  ·  edited 3mo ago by Karl Knechtel‭

84%
+9 −0
Open file in script's own folder

I have a Python script that needs to access some data (or configuration) file in its very own folder. For example, say script.py does something like this: with open('data.txt') as file: data ...

2 answers  ·  posted 2y ago by J-hen‭  ·  last activity 3mo ago by Karl Knechtel‭

66%
+2 −0
How to write a function that only accepts a list of `Error string` `Results` in F# on the level of types?

For example, given a mergeErrors function where input is always a list of Error strings, let es = [ Error 1; Error 2; Error 3 ] let mergeErrors<'a> (errors: Result<'a,int> list) : R...

1 answer  ·  posted 3mo ago by toraritte‭  ·  last activity 3mo ago by Derek Elkins‭

f#
50%
+0 −0
Why is inter-VLAN communication not working in my bus topology network set-up in Cisco Packet Tracer?

I have created a simple bus topology connecting 2 switches and a router, with each switch connected to their respective end devices through ordinary star topology. The switch model used was 3560-24...

0 answers  ·  posted 3mo ago by Phoenix‭  ·  edited 3mo ago by Alexei‭

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‭

85%
+10 −0
Are "strong passwords" at all meaningful?

Whenever registering to diverse sites on the net, you are often forced to enter a so called "strong password", which would ideally contain both upper case letters, lower case letters, digits, and s...

5 answers  ·  posted 4mo ago by Lundin‭  ·  last activity 3mo ago by Kattensen‭

66%
+2 −0
Do the elements of 'required' array need to be defined in 'properties' dictionary in JSON schema?

In a JSON schema, do the required properties need to be a subset of properties? E.g. is this a valid schema, even though cookies isn't mentioned in properties? { "type": "object", "properti...

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

60%
+1 −0
Command to format code from repo into single markdown file

I'm trying to flatten a repository of Python code into a Markdown file where each file is formatted like: relative/path/to/file1.py # contents of file1.py I'm using this command: find . -name...

2 answers  ·  posted 6mo ago by ShadowsRanger‭  ·  last activity 3mo ago by Michael‭

71%
+3 −0
What does F#'s `box` keyword do and where is it documented?

The Null Values article in the F# Language Reference show an example that uses it, but it does not explain what it does exactly. You can use the following code to check if an arbitrary value is ...

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

f#
50%
+0 −0
What is a "sealed" type in F# and why doesn't the type test pattern operator (:?) work on it out of the `box`?

The F# language guide (see Signatures article) has a very sparse definition of what a "sealed" type is: Attribute Description [<Sealed>] For a type that has no abstract me...

0 answers  ·  posted 3mo ago by toraritte‭  ·  edited 3mo ago by toraritte‭

f#
75%
+4 −0
How to troubleshoot ModuleNotFoundError?

I ran some Python code and it crashed with ModuleNotFoundError. What is the general approach for dealing with these situations?

2 answers  ·  posted 3mo ago by matthewsnyder‭  ·  last activity 3mo ago by Karl Knechtel‭

77%
+5 −0
Best practices for company internal Swagger Docs in production

The current project I am working on consists of a bunch of microservices (Web APIs) accessible only internally using Entra ID (formerly Azure ID). To simplify the development, all services expose ...

1 answer  ·  posted 4mo ago by Alexei‭  ·  edited 3mo ago by Alexei‭

50%
+0 −0
How to change the color of a cell to a user defined value while keeping its existing style using NPOI from F#?

The answer provided in the How to set the cell color to a user defined value using NPOI from F#? thread solves the problem of how to set the right properties using F#, but it uses a new ICellStyle ...

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

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 3mo ago by toraritte‭  ·  last activity 3mo ago by toraritte‭

60%
+1 −0
What is the difference between `static let` and `static member` in F#?

Taking the example from this Stackoverflow question: type Vector2D(dx : float, dy : float) = static let zero = Vector2D(0.0, 0.0) static let onex = Vector2D(1.0, 0.0) static let ...

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

f#
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 3mo ago by Kevin Krumwiede‭  ·  last activity 3mo ago by Alexei‭

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 3mo ago by KunningFox‭  ·  closed 3mo ago by Alexei‭

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 3mo ago by KunningFox‭  ·  closed 3mo ago by Alexei‭

25%
+0 −4
Having problems with my php script [closed]

The exam checking for the backend is working perfectly well but the front end keeps saying an error occurred. Am like ok then tried the demo version replaced the javascript and everything i can rep...

0 answers  ·  posted 4mo ago by zick853‭  ·  closed 4mo ago by Mithical‭

75%
+4 −0
Wikidata: How do I ask for the start date of a property in SPARQL?

I have a SPARQL query to Wikidata that returns the names and handles and parties of politicians for whom a Mastodon address is stored at Wikidata. Filtered by nationality and with an output of the ...

0 answers  ·  posted 4mo ago by wasuko‭

50%
+0 −0
How to display overlapped content in an e-mail

I do need to create an email template using components where the wrapped text left side (td - 50%) is overlapping with the image ( td - 50%) like Venn Diagrams... Not exactly but somehow... I came...

2 answers  ·  posted 4mo ago by hackerindio‭  ·  last activity 4mo ago by gbjbaanb‭

66%
+2 −0
CS8032 analyzer warnings in empty EF Core project in Rider

I'm evaluating JetBrains Rider 2023.3 on Linux and almost immediately ran into a compiler warning that I don't understand. Attempting to isolate it, I created a new solution containing a .NET 6 cla...

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

88%
+14 −0
How does Zalgo Text work, and how can I prevent my application from accepting it?

A Zalgo Text is something like this: T̃͟͏̧̟͓̯̘͓͙͔o̤̫͋ͯͫ̂ ̥͍̫̻͚̦͖͇̌ͪ̇ͤ̑̐͋̾̕i̢͖̩͙͐͑ͬ̄̿̍̚ͅn̵̢̼̙̳̒̄ͥ̋̐v̡̟̗̹̻̜͕̲ͣ̐ͤͤ͒́oͫ͂̆͑ͩ҉͇̰͚̹̠̫͔̗k̷̭̬̭͙̹̺̯ͩ̌̾̒̋̓ͤ͛͘͠e̥͙̓̄̕ ̵̫͈ͪţ̱̺̺̑̿̉̌͛̂̇h͙̣̬̓̂͞ę̡̲̟͎͉̟͛̓̉̆̉͘ ͬ̒...

1 answer  ·  posted 3y ago by hkotsubo‭  ·  last activity 5mo ago by hkotsubo‭

71%
+3 −0
PEP20 on namespaces: What exactly is it saying to do?

PEP20 aka the Zen of Python has a statement: Namespaces are one honking great idea -- let's do more of those! What exactly are we supposed to "do" according to this? Is it saying we should h...

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

81%
+7 −0
What is the point of triggering CI/CD with an empty git commit?

I read posts (e.g., 1, 2, 3) that recommend triggering a CI build process by pushing an empty git commit. I don't understand how this is a good idea as the commit history will be peppered with mea...

3 answers  ·  posted 5mo ago by toraritte‭  ·  last activity 5mo ago by matthewsnyder‭

66%
+4 −1
Does Python have a "ternary operator" (conditional evaluation operator like "?:" in other languages)?

Sometimes code needs to assign (or otherwise use) a value that depends on some condition. The naive approach is to use explicit branching, which in Python would look like: if some_condition(): ...

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

84%
+9 −0
Understanding mutable default arguments in Python

Consider this code example: def example(param=[]): param.append('value') print(param) When example is repeatedly called with an existing list, it repeatedly appends to the list, as ...

4 answers  ·  posted 7mo ago by Karl Knechtel‭  ·  last activity 5mo ago by matthewsnyder‭

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‭

88%
+14 −0
Why are list comprehensions written differently if you use `else`?

The following list comprehension worked when I tried it: [num for num in hand if num != 11] But this doesn't work: [num for num in hand if num != 11 else 22] It gives a SyntaxError, highlightin...

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

62%
+3 −1
How does a client verify a server's SSL certificate? What are the specific steps?

I have little to no idea what happens after a client obtains the server's certificate. It has to make sure that it (somehow) valid, but how?

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

77%
+5 −0
Can GitHub rewrite authorship of commits?

GitHub has a setting wherein they offer to "anonymize" your user email from, say, somebody@example.com to somebody@users.noreply.github.com. I presume this is to prevent you from getting spam from ...

1 answer  ·  posted 5mo ago by Michael‭  ·  edited 5mo ago by matthewsnyder‭

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 5mo ago by nteodosio‭  ·  edited 5mo ago by Alexei‭

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‭

50%
+2 −2
What is the default port number of MariaDB?

What is the default port number of MariaDB database server? (Remembering defaults is surprisingly hard since usually you don't need to specify them..)

1 answer  ·  posted 5mo ago by Iizuki‭  ·  last activity 5mo ago by manassehkatz‭

60%
+4 −2
How to speed up MySQL query?

I have a website about vacation villa rentals. Around 800 properties are listed. When i start a search, i get properties with my first query which filters type, style, area, no. of rooms, capacity ...

2 answers  ·  posted 5mo ago by erenlerhakan‭  ·  last activity 5mo ago by ArtOfCode‭

66%
+2 −0
How to programmatically evaluate Excel data validations using .NET?

What I would like to do: Set a cell value. Check with a program if cell values conform to data validation rules. I could extract all the information needed to create a validation function, b...

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

66%
+2 −0
Which .NET project can programmatically validate a cell's value out of the box based on Excel data validation constraints?

Are any of the popular Excel .NET projects have a functionality similar to Apache POI's DataValidationEvaluator class?

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

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‭

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‭

83%
+8 −0
Git-ignoring files with special characters in their names, especially newlines

My actual motivation is to understand the semantics of the .gitignore file syntax in precise detail, for a program which is expected to emulate them as accurately as possible. However, while coming...

1 answer  ·  posted 5mo ago by Karl Knechtel‭  ·  last activity 5mo ago by Peter Taylor‭