86,292 questions
-1
votes
1
answer
106
views
How can I update values in a nested JSON file using Python?
I have a JSON file with nested objects, and I want to update specific values inside it using Python.
The structure can vary, but it usually looks something like this:
{
"user": {
"...
0
votes
2
answers
44
views
Nested dictionary, for yaml style markup
I couldn't figure out the way to process nested leafs/branches/parents, not sure what the actual best terminology is.
I've got the reading of the data happening correctly, far as i can tell.
Its in ...
0
votes
0
answers
50
views
Can Ghostscript control the threshold when converting dot maps? [closed]
During the process of converting test.ps files to halftone dots using the tiffsep1 driver in Ghostscript, are there any parameters that can control the threshold? Because the edges of some fine black ...
2
votes
2
answers
145
views
Convert from iferror vlookup to VBA's dictionary array
I need help with a repetitive task that I use vlookup for huge dataset, a bunch of tables of >1 million rows from multiple columns, multiple sheets of another workbook.
ID
TA
ISRC
Result
ID1
TA1
...
2
votes
1
answer
87
views
Typescript infer real entries from object literal dictionary
I have a dictionary object, very simple:
const mydict = {
key1: "value1",
key2: "value2"
}
how do I make a type that automatically converts an object like this into entries?
...
2
votes
2
answers
162
views
terra R package: problem with plet(col=…). It seems no longer admits leaflet::colorNumeric output (map becomes flat color)
I’m trying to draw a SpatRaster on a dynamic map using terra::plet() and a standard palette. The example code used to work in older terra versions (the raster showed a proper yellow/orange gradient), ...
1
vote
1
answer
126
views
Why doesn’t this f-string with double quotes raise a SyntaxError in Python 3.13.3?
I'm currently following this Python course course from Harvard.
At the point in the video, the instructor shows that the following code should raise a SyntaxError because of the conflicting double ...
1
vote
1
answer
190
views
Implementing LRU cache using std::map and std::list in C++. Can't get required output
I am trying to write C++ code to implement a cache. The cache uses Least Recently Used policy explained by the behaviour:
If the cache has a capacity to store 5 keys like 5 3 2 1 4 then if next key=1 ...
0
votes
1
answer
125
views
entrySet vs sequencedEntrySet
I want to know the difference between entrySet and sequencedEntrySet methods in LinkedHashMap in Java 21+.
I am not sure why we have sequencedEntrySet since LinkedHashMap guarantees the insertion ...
-1
votes
1
answer
80
views
Why does `Array(3).map(x => 42)` return an empty array instead of `[42, 42, 42]` in JavaScript? [duplicate]
I was brushing up on Array for an implementation and I stumbled on this discovery, I expected the following code to give me an array filled with the number 42:
Array(3).map(x => 42)
But instead, ...
0
votes
1
answer
116
views
How to rename a dictionary key and keep the order in python? [duplicate]
I have a json file to store the data for an app. This json file has this dict in it:
{
"Survival": {
"text": "Survival",
"directory": "...
0
votes
0
answers
48
views
.NET MAUI Maps Not Loading - Android
I have a .NET MAUI solution with multiple projects sharing a common library ( General). Maps were working fine previously, but now they're not loading properly in my offline project,
Problem Details
...
0
votes
2
answers
153
views
How do I access specific keys and values from CSV files?
I have a CSV file keeping track of people's score in a game. I read it with csv.DictReader().
How do I create a dictionary with the keys being the names and the value being the scores?
CSV file ...
-4
votes
1
answer
57
views
JSON DIctionary saved to S3 using S3FileSystem saved with "/ in data
I am working on a project and trying to convert a csv into JSON Dictionary and saving that JSON data file to S3 bucket via S3FileSystem. If I save this JSON DIctionary to local machine, formate is ...
-5
votes
1
answer
172
views
Convert JavaScript objects to Java objects [closed]
I want to create an object in Java, converting code from JavaScript, but I cannot find how to do so.
It's a really simple problem in JavaScript:
MINI_KEYS = ["1", "2", "3"...