Finding $n^\text th $ largest/smallest element
Fast pairwise SameQ test of an ordered list
Given an ordered set S, find the points in S corresponding to another list
Geolocate multiple IP addresses
How to connect two images
Filter elements in descending order
Changing numbers inside list to a list
Finding $n^\text th $ largest/smallest element https://mathematica.stackexchange.com/questions/154944/finding-n-textth-largest-smallest-element
Ordering can quickly find the position of the largest/smallest element in a list, but finding the position of the $n^\text{th}$ largest/smallest element is much slower: data = RandomReal[10, 10^7]; ...
- asked by Carl Woll (13 votes), answered by Carl Woll (12 votes)
Fast pairwise SameQ test of an ordered list https://mathematica.stackexchange.com/questions/155017/fast-pairwise-sameq-test-of-an-ordered-list
I have an ordered list of $N$ numbers, and I want to find out whether adjacent numbers are SameQ or not, returning a list of 0s and 1s of length $N-1$. One approach is something like: ...
- asked by Carl Woll (11 votes), answered by jkuczm (8 votes)
Given an ordered set S, find the points in S corresponding to another list
Given a sorted list of numbers $S$, I want to create a function that accepts a list of numbers $L$ and for each number $l \in L$ it returns the index of the largest number $s \in S$ such that ...
- asked by Carl Woll (11 votes), answered by nikie (13 votes)
Geolocate multiple IP addresses https://mathematica.stackexchange.com/questions/155076/geolocate-multiple-ip-addresses
I would like to geolocate a few hundred IP addresses (as part of analysing server logs). What is the best way to do this using Mathematica? Does Mathematica have any builtin functionality for this? ...
- asked by Szabolcs (9 votes), answered by Szabolcs (9 votes)
How to connect two images https://mathematica.stackexchange.com/questions/155093/how-to-connect-two-images
I have talk about how to catenate two images whose have same part totally in my this post. But in this case two images have similar information, not totally same. img1 = Import @ ...
- asked by yode (9 votes), answered by Kuba (8 votes)
Filter elements in descending order https://mathematica.stackexchange.com/questions/154761/filter-elements-in-descending-order
I want to solve the following problem efficiently: Given a list of pairs (value, data), I want to remove all the pairs so that the resulting list has the value property of its elements sorted. That ...
- asked by José D. (9 votes), answered by Mathe172 (9 votes)
Changing numbers inside list to a list https://mathematica.stackexchange.com/questions/154911/changing-numbers-inside-list-to-a-list
I have a list wich contains numbers and other lists, and what I want is to change every number x to {x,0}. So if the function I'm seeking is called f, then a = {1,Pi,2+3I,{1,2},{3,4},-2} f[a] ...
- asked by Garmekain (8 votes), answered by John Joseph M. Carrasco (10 votes)