István Zachar

 Wolfram Mathematica

Welcome! This is the main Mathematica chat room for mathematic...
Jan 30 20:13
And Pane is not optimal: it breaks text entirely differently than TextCell.
Jan 30 19:51
@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...
Jan 30 13:59
Jan 30 13:58
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]`.
Dec 11, 2023 08:44
@Tim Care to elaborate?
Dec 7, 2023 13:44
@user21 Tech support is for service subscribers. Mine has expired.
Dec 6, 2023 16:25
1
Q: Gurobi optimizer license error

István ZacharHow 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...

Dec 6, 2023 12:14
Anyone had success setting up the Gurobi optimizer with Mathematica? I have a license, but Mathematica does not recognize it.
Apr 29, 2023 14:55
Any idea if one can run a free Wolfram Engine of a higher version number in a Mathematica of lower version number as the kernel?
Jan 6, 2023 14:19
0
Q: How to do integer interval arithmetic?

István ZacharHow 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...

Jan 5, 2023 18:07
@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.
Jan 5, 2023 16:54
@rhermans Thanks, let me test it.
Jan 5, 2023 15:50
@rhermans Union should join {-2, 3} and {4, 6} to {-2, 6}, as there is no integer defined between 3 and 4.
Jan 5, 2023 15:47
@rhermans Yes, but explicitly for integer intervals, where any interval can be defined as a set of disjoint subintervals.
Jan 5, 2023 13:26
Is there any domestic method in Mathematica for doing set-arithmetic on integer intervals? I mean union, intersection, complement?
Feb 20, 2022 16:31
Anyone knows what are the changes in version 13.0.1? No info on the Wolfram website.
May 25, 2021 13:56
Could anyone install/upgrade Mathematica 12.3 on a Windows 7 machine?
Apr 8, 2021 05:42
Anyone knows how to access via URLDownload a file in my private GitHub repo? The Authentication option does not seem to work.
Apr 7, 2020 12:03
@Szabolcs Thanks.
Apr 6, 2020 13:19
@Szabolcs I haven't heard about it. Do you have a link perhaps?
Apr 2, 2020 22:53
@halirutan Good night for now!
Apr 2, 2020 22:53
@halirutan Hmmm, yes, this should work. Thanks, I am going to test it out in the more complex actual case.
Apr 2, 2020 22:42
So perhaps my structure is not a Dataset, but rather a nested, ragged, irregular association.
Apr 2, 2020 22:41
@halirutan No, only to e.g. a2["h"], assuming that it has an association as value and not {1}.
Apr 2, 2020 22:40
@LeonidShifrin Ok, thanks, gonna check it tomorrow!
Apr 2, 2020 22:37
@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?
Apr 2, 2020 22:32
@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?
Apr 2, 2020 22:30
@halirutan Business as usual, isn't it? :) Anyway, do you perhaps know of a post with benchmarked (timing and scaling) Association/Dataset operations?
Apr 2, 2020 22:28
@LeonidShifrin Even if said association is part of a Dataset?
Apr 2, 2020 22:27
@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...
Apr 2, 2020 22:19
I assume that copying a huge association around in memory is slow and memory-consuming.
Apr 2, 2020 22:18
@halirutan I prefer not to copy it but to change it in place as it is supposed to be even bigger (millions of keys).
Apr 2, 2020 22:15
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?
Mar 30, 2020 21:46
@ChrisK Unfortunately, I cannot disclose that as per company policies. Unfortunately, this won't be public :/
Mar 30, 2020 21:39
@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.
Mar 30, 2020 20:11
@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.
Mar 30, 2020 15:12
btw: PacletResource is an obsolete symbol; use paclet[\"AssetLocation\", \"assetname\"] instead.
Mar 30, 2020 15:10
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.
Mar 30, 2020 15:08
@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?
Mar 30, 2020 14:56
Mar 30, 2020 14:54
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).
Mar 30, 2020 14:52
@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.
Mar 30, 2020 12:32
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?
Mar 30, 2020 12:29
@Szabolcs Thanks for the link to Todd Gaylay's explanation on paclets!
Jul 2, 2019 09:08
@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.
Jul 1, 2019 21:15
@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.
Jul 1, 2019 18:59
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?
Apr 3, 2019 06:49
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.
2
Apr 3, 2019 06:49
@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.
 

 Roots

General discussion for genealogy.stackexchange.com
Dec 29, 2023 12:14
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?