« first day (2517 days earlier)      last day (892 days later) » 

1:33 AM
7
Q: Two equivalent commands give different returns in r

Dave TwickenhamWhy do the following two commands not return the same output? x <- sample(0:1, 50, replace = TRUE, prob = c(0.5, 0.5)) sum(x==1) sample(0:1, 50, replace = TRUE, prob = c(0.5, 0.5)) %>% sum(.==1) The first of the 2 command always gives me the right answer (something around 25) and the 2nd co...

 
 
1 hour later…
2:45 AM
2
Q: Embedding quadric bundles

ArtyLet $\pi:X\rightarrow W$ be a morphism of smooth projective varieties over a field $k$ whose generic fiber is a smooth quadric, and let $r$ be the dimension of the fibers of $\pi$. Does there always exists a rank $r+2$ vector bundle $f:\mathcal{E}\rightarrow W$ on $W$ such that $X$ can be embedd...

 
 
8 hours later…
10:34 AM
4
Q: Orthogonality of characters for powers of a character

BagggggggsSuppose $G$ is a finite cyclic group, and let $\chi: G \to \mathbb{C}^*$ be a character of order $n$. That is, $\chi^n$ is the identity homomorphism. I came across the following relation in a paper but I cant quite prove it for myself: $$ \frac{1}{n}\sum_{i=1}^n\chi^i(a)\overline{\chi}^i(b) = \...

 
 
7 hours later…
5:51 PM
6
Q: Could not GET 'play-services-location/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

Alaeddine BouhajjaI have a project which was running well yesterday, but today I find this problem: Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not resolve com.google.android.gms:play-services-location:16.+. Required by: project :app > project :location > Failed to list versi...

 
 
1 hour later…
6:51 PM
7
Q: Conversion operator: gcc vs clang

HenkConsider the following code (https://godbolt.org/z/s17aoczj6): template<class T> class Wrapper { public: explicit Wrapper(T t): _value(t) {} template<class S = T> operator T() { return _value; } private: T _value; }; auto main() -> int { auto i = int{0}; auto x =...

 
 
2 hours later…
8:42 PM
Nobody here?
 
9:33 PM
13
Q: When is memset to 0 nonportable?

Felix DombekFrom this comment in GCC bug #53119: In C, {0} is the universal zero initializer equivalent to C++'s {} (the latter being invalid in C). It is necessary to use whenever you want a zero-initialized object of a complete but conceptually-opaque or implementation-defined type. The classic example in...

 

« first day (2517 days earlier)      last day (892 days later) »