Tauren

Oregon

blog.tauren.com

Age: 45

Web application developer
1d
awarded Nice Question
Jul
15
awarded Popular Question
Jul
8
awarded Notable Question
Jul
2
awarded Inquisitive
Jul
2
awarded Curious
Jul
2
awarded Curious
Jun
20
awarded Famous Question
Jun
1
awarded Good Question
May
15
awarded Yearling
Apr
29
awarded Self-Learner
Apr
18
comment Javascript algorithm to find elements in array that are not in another array
Thanks, this is a good solution.
Apr
18
comment Problem with qTip - Tips not showing because elements load after the script
@KJW - I answered this 4 years ago and many things have changed. I no longer use qtip, so unfortunately I can't really help. I do know that jquery's .live() function has been deprecated and you should use .on() instead. Maybe this will help you: api.jquery.com/live
Apr
14
awarded Enlightened
Apr
14
awarded Nice Answer
Apr
8
awarded Guru
Apr
3
accepted Javascript random number with weighted probability
Mar
28
comment Javascript random number with weighted probability
@PhilH: I've updated the jsfiddle to indicate percentage of results within 1 of the target, percentage within 2 of target, and percentage outside of that range (outliers): jsfiddle.net/tauren/9EFkV/1
Mar
28
comment Javascript random number with weighted probability
@PhilH: I've used your code to implement this: jsfiddle.net/tauren/9EFkV It looks like this approach may work well, but I'm unclear how to adjust the clustering. Right now, the results are highly clustered around the target with only a few outliers. I'd like to be able to adjust the clustering with a parameter, so that the results can vary from no clustering at all all the way up to 99% of the results are clustered around the target. For instance, how would I get about 40% of the results within 1.0 of the target? Right now it is around 60-80%.
Mar
28
comment Javascript random number with weighted probability
@PhilH: Thanks for adding an implementation. I thought it was clear in my question that I was looking for implementation help, but maybe it could have been more obvious.
Mar
27
comment Javascript random number with weighted probability
I wish I could give you more than one upvote for such an in-depth and mathematical answer! However, I'm not sure how to convert this into an implementation. If you could you provide some pseudo-code, it would help tremendously. I need some time to process this and try to figure out how to convert all the math into a javascript function that fits the required signature.
1 2 3 4 5