4.34.1 Top new questions this week

4.34.1.1 Finding $n^\text th $ largest/smallest element
4.34.1.2 Fast pairwise SameQ test of an ordered list
4.34.1.3 Given an ordered set S, find the points in S corresponding to another list
4.34.1.4 Geolocate multiple IP addresses
4.34.1.5 How to connect two images
4.34.1.6 Filter elements in descending order
4.34.1.7 Changing numbers inside list to a list
4.34.1.1 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)

4.34.1.2 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)

4.34.1.3 Given an ordered set S, find the points in S corresponding to another list

https://mathematica.stackexchange.com/questions/154893/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)

4.34.1.4 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)

4.34.1.5 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)

4.34.1.6 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)

4.34.1.7 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)