@RolfMertig Thanks, that indeed helps. I had the idea that TextCell did it via options and not by applying Pane. Likely I have been mistaken. Spelunking the definition of TextCell now...
Anyone has idea what is the option that controls character bounding box extension in `TextCell`? I struggle figuring out. See example: `row = Row[Style[#, Background -> Green] & /@ {"ooo", "fff", "ggg"}]` versus `TextCell[row]`.
How do I set up Mathematica to use the commercial Gurobi optimizer? Mathematica should be able to use it, as the Method -> "Gurobi" option exists for various optimization functions. I do have an academic license for Gurobi, and the Gurobi shell recognizes it correctly on my machine. However, Math...
How to calculate union, intersection and complement of integer intervals without actually generating all integers in the range and perform set-arithmetic (Union, Intersection, Complement) on them?
For simplicity, I define an integer interval as a list of disjoint {min, max} subintervals, each co...
@rhermans Unfortunately, I wouldn't call the result convenient, as it lists all valid integers as solutions, instead of a range (or disjoint ranges). I'd then have to use Split or similar to identify consecutive ranges, perhaps even Sort results before. I am not sure this is faster than simply doing Union on the explicit list of integers of the intervals.
@halirutan Unless.... unless I do piecemeal AppendTo[myDataset["myKey"], key_i -> value_i] for each i of a thousand. It does in-place mutation. Can it be made faster?
@LeonidShifrin Ok, good to know it from a reliable source! But how should I know when my copied Association reuses previous instances under the hood and when it doesn't? Is this documented?
@halirutan Yes, I forgot to specify that the association is part of a larger association, so AssociateTo would not work. Or does it work on Datasets as well? Oh heck, this is getting out of hand...
Hi @Szabolcs, @b3m2a1, @halirutan Do you have an idea about what is the fastest way to append thousands of likely new key-value pairs to an association?
@Szabolcs Yes, I have the same long term goal of course, but for the development phase, it would be useful for me to be able to put one or more files there. Since I do not know what I will put there during development, I cannot reference them by explicit names, hence I'd prefer a lookup on startup. I can live with $InputFileName or similar, but it just seems unnecessary given that relative locations should be easy to handle.
@ChrisK I have a complex package with multiple files in multiple directories. There is a subdirectory with variable content: it is initially empty, but if the user puts something here, I want the package to load those files. So I cannot refer to a specific filename but I have to read the directory contents on kernel stratup.
FindFile does not work on directories, just files. And a FindFile["MyPackage"] refers to the init.m within the Kernel subdirectory, so I'd have to dissect the found path to refer to the root.
@JasonB. But how do you refer to a directory dir, so that in my package, I can call FileNames["*.dat",dir] without either spelling out the absolute path of dir or using FindPaclet or $InputFileName?
Not necessarily: if the PacletInfo is set up correctly, one cen refer to local directories and files from within the package files like "MyPackage/Images/test.png". At least that's what the documentation states. However, I failed to refer to either a file or a directory without using FindFile or $InputFileName (respectively).
@JasonB. Considering that the system should already now the location of my paclet (given all the relevant info in the PacletInfo.m) I do not want to perform extra calculations to get the location again. Due to the extension system, it should be straightforward to use local paths within the package, without calling back to PacletFind or related.
It is a wealth of information. However, I am confused about paths, resources and extensions. E.g. how do you refer to a subdirectory of your package (within a package file and not in PacletInfo.wl) without actually using $InputFileName?
@ChrisK Thanks, that helped! I didn't know how to refer to the file id with the download request. Actually, URLDownload[url, file] is enough, no need to use RenameFile.
@CATrevillian I did try to use the sharing link, but whatever is downloaded via e.g. URLDownload is a <!DOCTYPE html> instead of a paclety file (which it is) and resulting file size does not matter either.
How does one download a file (e.g. a paclet file) from Google Drive via Mathematica? File sits at my Drive account. I understand that the Google Drive url-s do not contain the file name - how does one automatically get that?
And, as a user, I've also realized that robustly extending Mathematica to my needs would mean that I actually develop at WRI. Otherwise, everything I code would be something half-baked, half-integrated superficial package.
@Szabolcs I agree with most of your statements. I think a consistent, centrally designed, unified framework that can uniformly interpret input and evaluate calculation is a very badly scaling design. The more subfields you try to integrate the harder it is to make them compatible with each and every other aspect of the language, and ultimately there will be dead-ends and abdondoned parts where making it fully compatible is just too much work and too little benefit.
I have a Gramps family tree file of version AIO64-5.1.5-1 but cannot import into GrampsAIO64 5.1.6. When I import, Gramps tells me: "Error extracting into c:\users[...][familytree-file].gpkg.media" What could cause this?