Reduce Code Length
Best way to handle nested Maps?
Color gradient varying in a path
Offset Partition with only one remainder element
Slot # corresponding to subset of a list in select
Any faster approach than Outer for my computation
How to generate password
Reduce Code Length https://mathematica.stackexchange.com/questions/152003/reduce-code-length
I have the following that works good, and computes in one shot,but the code is so long. Can someone please help me to reduce the size of this? ...
- asked by Bill W. (9 votes), answered by Ali Hashmi (7 votes)
Best way to handle nested Maps? https://mathematica.stackexchange.com/questions/151742/best-way-to-handle-nested-maps
I often find myself working with lists of lists of data, gathering data, performing computations, and producing a variety of different sorts of output. Intuitively, it seems like this should be done ...
- asked by Michael Stern (9 votes), answered by eldo (6 votes)
Color gradient varying in a path https://mathematica.stackexchange.com/questions/151980/color-gradient-varying-in-a-path
The code below is to create something like a logo. I want to apply a color gradient over the polygons of the pattern, but they vary along the path. The image that I want to approach is this: ang = ...
- asked by LCarvalho (8 votes), answered by KennyColnago (9 votes)
Offset Partition with only one remainder element I would like to use a combination of options of Partition in a way that I can't seem to find in the documentation. Given example input {a,b,c,d,e,f,g}, I would like output ...
- asked by George Moore (7 votes), answered by kglr (4 votes)
Slot # corresponding to subset of a list in select Is it possible to use # in the select function preserving the structure of the list? Here an example of what I mean. Let's say I want to select all the pairs where the first element is 1: data1 = ...
- asked by Fraccalo (7 votes), answered by kglr (7 votes)
Any faster approach than Outer for my computation Outer is slowing down considerably when the first argument is Abs[#1 - #2]/Max[#1, #2]& Outer[List, Range[5000], Range[5000]]; // AbsoluteTiming (* {0.120091, Null} *) Outer[Abs[#1 - ...
- asked by Ali Hashmi (6 votes), answered by nikie (9 votes)
How to generate password https://mathematica.stackexchange.com/questions/151864/how-to-generate-password
I would like to generate a random password of a defined length which can easily be typed in with a standard keyboard. As a start I tried the following: SeedRandom["pass"]; ...
- asked by mrz (6 votes), answered by yohbs (11 votes)