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
My vote is also for moving such Qs. Main arguments: PU already contains some Qs related to office suite and they're OnTopic there. This kind of Qs doesn't fit well to software development. So i...
I don't think this is possible in MySQL due to its computed columns limitations: Literals, deterministic built-in functions, and operators are permitted. A function is deterministic if, given th...
I would like to maintain a log that is available to several modules in my Angular 8 system. So I created the following service: @Injectable({ providedIn: 'root' }) export class LogService { ...
I have reached OpenAI's support and one way to generate more accurate multiline responses is to use a clear separator between each question and answer block of text. My final working code is the fo...
Besides what Olin already said, I guess too many people were taught C using K&R book, which was great at the time, but it completely neglects modern SW engineering best practices (encapsulation...
Create a hash map and precalculate the sort key in it: // Set up: Create mock input let u = ['4', '16', '8', '2', '6']; function expensive_key_fn(x) { console.log("Doing expensive operation...
There is no infinite loop. If the dictionary is a string, it is simply skipped. If all dictionaries are strings, than all elements of the finite list are skipped, and the function returns without...
The quick fix is: map (subtract 1) . take n $ l When I put your function in my own Haskell compiler, I get: Possible cause: ‘take’ is applied to too many arguments Remember that in Haskell,...
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, ...
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...
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, ...
There are some reasons why a function would intentionally not be declared static. (In the following I use the term 'module', but in contrast to others, I use it not to describe a file or translati...
Using the write method The write method of a file offers a much more limited interface. It only accepts one argument - a string, for a file opened in text mode - and outputs just what it's given. ...
It seems like what you want to do can be achieved by using data.assign_coords(t=[0.123]) The error message is extremely confusing in this respect, but it seems like the new value for the coordi...
I have the following code: use serde::{Deserialize, Serialize}; #[derive(Sereialize, Deserialize)] struct Container<const SIZE: usize> { contents: [String; SIZE] } But I'm getti...
I know that 1 is sometimes called a pure function - although apparently a pure function must also not vary when the input is constant. By negation, the other kind are called impure functions, alth...
I know that I can display a single string in the terminal window like print("example") (or similarly with a string in a variable), and I know how to open text files and write to them. I also know ...
A compromise exists between automatically inferring package names (unreliable and potentially dangerous) and writing out an explicit separate requirements.txt file: script-running tools such as pip...
Figured it out. It should be a List. The data type of the list should be object, but the individual objects in the list should be compatible with the data type of the fields of the struct. For ex...
If my struct column has the data type of struct<string, integer> then what should be the equivalent java object that should be inserted into that struct column? I'm trying the following code...
This response is about closure in general, not any specific question. (A moderator has already addressed the specific case.) The close notice also includes the following text (emphasis mine): ...
I am currently working on an Angular SPA that supports multiple languages and relies on ngRx for state management. Although the application state is handled by ngRx, the current language is stored...
Eq is a type class, and type class names are capitalized (like types and constructors). Changing eq to Eq should get you past that error. Conversely, in SimpleEnigma = SimpleEnigma rotor1 rotor...
Highlight.js version: 11.6.0 Node version: v18.12.0 npm version: 8.19.12 When I provide a plugin with the following code to highlightjs (full code is at github): /* Language: BQN Requires: A...
I noticed when attempting to generate random booleans that t and f are not treated in the same way: t random ! Error f random ! returns a value In the factor 0.98 and 0.99 documentation, t is ...