« first day (2308 days earlier)      last day (1033 days later) » 

5:32 AM
using namespace std;

char *c[] = {"ENTER", "NEW", "POINT", "FIRST"};
char **cp[] = {c + 3, c + 2, c + 1, c};
char ***cpp = cp;

main()
{
    printf("%s", **++cpp);

    return 0;
}
C++ puzzle.
The advantage of using complicated pointer arithmetic is that it trains us to be meticulous in life.
 
this is the Python room though
 
5:52 AM
I found someone also discussing ++C here.
 
 
3 hours later…
8:26 AM
5 messages moved from Python
 
 
2 hours later…
10:38 AM
I have two arrays A & B of floats of size (10000000, 3) and (1000000, 3). B is part of A. Now I need to find indices of A corresponding to B values. Since it involves float comparision. I don't know how to do. I had posted this as a question. I got nice and optimised answer but it works only if elemets of B exactly match with A.
Solution given for my question is as follows
table = dict()
for i in range(A.shape[0]):
key = tuple(A[i])
if key not in table:
table[key] = i
extract_BinA = np.ones(B.shape[0], dtype=int)*-1
 
 
3 hours later…
1:44 PM
1 message moved from Python
 

« first day (2308 days earlier)      last day (1033 days later) »