In the build gallery of http://image.weather.com/images/maps/fo ... map_wkpln_[period([0-1])][1-10;1]_3uswc_enus_600x405.jpg with
var words=["day","night"];
return words[arguments[0]];
Is there an easy way to sequence the function period before the variable [1-10;1] so that I receive
day1.jpg
night1.jpg
day2.jpg
night2.jpg
day3.jpg
night3.jpg
...
day10.jpg
night10.jpg
instead of the current output:
day1.jpg
day2.jpg
day3.jpg
...
day10.jpg
then
night1.jpg
night2.jpg
night3.jpg
...
night10.jpg
Thank you for your help!
Change precedence of variable ranges
Change precedence of variable ranges
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.18) Gecko/20110614 Firefox/3.6.18 ( .NET CLR 3.5.30729; .NET4.0C)
- Giorgio Maone
- Site Admin
- Posts: 9524
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: Change precedence of variable ranges
No, because order usually does not matter if you aim to download everything.
However you could try something like
where period() would be
and halve() would be
Notice that [$n] is a backreference to the nth range expression.
However you could try something like
Code: Select all
[period([0-39])][halve([$0])]
Code: Select all
return ["day", "night"][arguments[0] % 2]
Code: Select all
return Math.floor(arguments[0] / 2);
Mozilla/5.0 (Windows NT 5.2; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0