|
Παρουσίαση με Ετικέτες
Όλες οι Ετικέτε... » Numbers » Posts (RSS)
-
I recently needed to extract a numeric suffix from a string value in Python. Initially I did the following: import re def extractNumSuffix(value): return (None if (search:=re.search(‘^\D*(\d+)$’, value, re.IGNORECASE)) is None else search.group(1)) Note that return has a single-line expression. So ...
-
Was just trying to round-off some Google Maps coordinates for display in Javascript up to 3 decimal digits and that was a bit like a blast from the past (the end of the ‘90s to be more accurate)… So here’s my contributed answer at: https://stackoverflow.com/questions/2221167/javascript-formatting-a-rounded-number-to-n-decimals This works for ...
-
http://io9.com/5819325/the-bizarre-mathematical-conundrum-of-ulams-spiral http://scienceblogs.com/goodmath/2010/06/the_surprises_never_eend_the_u.php http://img529.imageshack.us/img529/615/ulam3.png http://imprompt.us/2010/ulam-spiral-take-2/ http://home.manhattan.edu/~peter.boothe/ulam.pdf http://mathworld.wolfram.com/PrimeSpiral.html ...
|
|
|