« first day (2570 days earlier)      last day (817 days later) » 

2:14 AM
7
Q: Resolution of built-in operator == overloads

FedorIn the following code struct A has two implicit conversion operators to char and int, and an instance of the struct is compared for equality against integer constant 2: struct A { constexpr operator char() { return 1; } constexpr operator int() { return 2; } }; static_assert( A{} == 2 ); ...

 
 
2 hours later…
4:14 AM
6
Q: Create new column based on existing columns whose names are stored in another column (dplyr)

conflictcoderConsider the following dataset: df <- tibble(v1 = 1:5, v2= 101:105, v3 = c("v1", "v2", "v1", "v2", "v1")) # A tibble: 5 × 3 v1 v2 v3 <int> <int> <chr> 1 1 101 v1 2 2 102 v2 3 3 103 v1 4 4 104 v2 5 5 105 v1 I would like to generate a new c...

 
4:33 AM
4
Q: Compact/short number range representation

JanderI googled, but couln't find a package to make number ranges in a compact/short form. In siunitx there's is a \numrange command, but this feature seems not to exist. Explaining: I'd like something like a \numberrange macro with following example results: \numberrange{10}{20} % result: 10--20 \...

 
 
1 hour later…
5:36 AM
tumbleweed
 
6:32 AM
1
Q: A "too good to be true" claim about separable processes

ECLI am reading the paper [1]. At page 18, eq 115, it is claimed the following: Given a separable process $(X_t)_{t\in T}$, we have $\lim_{n\to\infty}\mathbb E[\sup_{t\in T}(X_t-X_{\pi_n(t)})]=0$. Here the only hypothesis on the labelling space $T$ is that it is a bounded metric space. $(X_t)$ is ...

 
 
4 hours later…
10:15 AM
1
Q: Why do we use plural suffix in sentence with singular subject?

bridgemncI have a question about Singular/Plural. Having these two sentences: 1.Wann wird das funktionieren? 2.Um wie viel Uhr wirst du kommen? 1.Why do we have plural ending 'en' even though we use singular 'das'? 2.Why do we use plural ending 'en' instead of kommst even though we use 'du'?

 
 
4 hours later…
2:44 PM
4
Q: Is it possible to realize the Moebius strip as a linear group orbit?

Ian Gershon TeixeiraOn MSE this got 5 upvotes but no answers not even a comment so I figured it was time to cross-post it on MO: Is the Moebius strip a linear group orbit? In other words: Does there exists a Lie group $ G $ a representation $ \pi: G \to \operatorname{Aut}(V) $ and a vector $ v \in V $ such that the ...

 
 
1 hour later…
3:44 PM
6
Q: split geometric progression efficiently in Python (Pythonic way)

Sudipto GhoshI am trying to achieve a calculation involving geometric progression (split). Is there any effective/efficient way of doing it. The data set has millions of rows. I need the column "Traded_quantity" Marker Action Traded_quantity 2019-11-05 09:25 0 0 09:35 2 BUY 3 09:45 0 0 09...

 
3:56 PM
0
Q: Gradient of a Neuronal Network

SumnyI have a trained neural network, that predicts the noise of a given image. Now, I want to use it, to calculate a subgradient of my NN (wrt the norm of the output). I want to use this in a larger algorithm, but since I do not get it to work as expected, I created this minimal example. model = load...

 
 
4 hours later…
8:14 PM
0
Q: Shellcode not running if declared as vector of unsigned chars

loadoed_dypperWhy isn't the shellcode running in this example example 1 std::vector<unsigned char> decrypted(encrypted.size()); void *exec = VirtualAlloc(0, decrypted.size(), MEM_COMMIT, PAGE_EXECUTE_READWRITE); memcpy(exec, &decrypted.front(), decrypted.size()); ((void(*)())exec)(); when I ty...

 
9:14 PM
6
Q: What is the point of diverging functions in Rust?

Aleksandr NovikI have read several answers on SO already, and gathered these use-cases: When a function panic!s When a function has an infinite loop in it But it is still unclear to me why we need to define the function like this: fn func() -> ! { panic!("Error!"); } if it will work the same way as this ...

 
10:08 PM
0
Q: How do you use pytorch to solve strictly constrained optimization problems?

Paul SiegelI am trying to solve the following problem using pytorch: given a six sided die whose average roll is known to be 4.5, what is the maximum entropy distribution for the faces? (Note: I know a bunch of non-pytorch techniques for solving problems of this sort - my goal here is really to be better un...

 

« first day (2570 days earlier)      last day (817 days later) »