« first day (2574 days earlier)      last day (814 days later) » 

12:32 AM
7
Q: Ambiguous overload error when using conversion function

AnyaI am trying to understand overloading resolution in C++ through the books listed here. One such example that i wrote to clear my concepts whose output i am unable to understand is given below. #include <iostream> struct Name { operator int() { std::cout<<"Name's int version called"<<...

 
 
6 hours later…
6:50 AM
3
Q: What conditions are sufficient for the Leray-Hirsch theorem to be a Künneth formula?

Paul CussonThis was originally posted on MSE, and since it didn't receive much attention, I'll try here. Let me know if this is not the appropriate place. Given a fiber bundle $F \to E \to B$ over a paracompact base $B$, assume its cohomology satisfies all the required properties for the Leray-Hirsch theore...

 
 
2 hours later…
8:50 AM
10
Q: Unable to load class AndroidComponentsExtension after upgrading the Android Gradle Plugin 7.1

ianhanniballakeI recently downloaded Android Studio Bumblebee and it helpfully asked whether I wanted to upgrade to Android Gradle Plugin 7.1.0, the version that shipped alongside Android Studio Bumblebee. After upgrading, I get a build error: Unable to load class 'com.android.build.api.extension.AndroidCompone...

 
 
6 hours later…
2:56 PM
6
Q: What is the idiomatic way to do something when an Option is either None, or the inner value meets some condition?

thisisrandyIs there a more idiomatic way to express something like the following? fn main() { let mut foo: Option<u8> = None; match foo { Some(foo_val) if ! foo_val < 5 /* i.e. the negation of my acceptance condition */ => {} _ => { foo.replace(5); } } } It seems like most of th...

 
 
2 hours later…
4:56 PM
7
Q: Group numeric vector by predefined maximal group sum

stats.and.rI have a numeric vector like this x <- c(1, 23, 7, 10, 9, 2, 4) and I want to group the elements from left to right with the constrain that each group sum must not exceed 25. Thus, here the first group is c(1, 23), the second is c(7, 10) and the last c(9, 2, 4). the expected output is a data...

 
5:52 PM
4
Q: Does the circle group given by drawing a parallel chord through the identity match the complex multiplicative unit circle group?

samerivertwiceI've been learning about homeomorphisms on the circle and was watching this excellent algebraic topology video covering some basics of projective geometry, and describing a group structure on the circle which is underpinned by Pascal's theorem. The group product $X\star Y=Z$ is arrived at by draw...

 
 
3 hours later…
8:26 PM
2
Q: Polygamma function in mathematical physics

Alessandro Della CorteAre there situations in which the polygamma pops up naturally in a mathematical physics context? In particular: are there examples of potentials having some interest for which the dependence on the distance is expressed in terms of $\psi^{(n)}$? Update: While Carlo Beenakker's answer is clearly u...

 
 
2 hours later…
10:20 PM
0
Q: Strange buffering behavior in termios/stdlib

commodorejohnI am quite new to deep-dive I/O finaglery, and I'm having some trouble understanding where I'm going wrong here. In brief, what I'm trying to do is disable buffering on my program's input/output so that characters are transmitted and received ASAP, but I'm not seeing the results I'd expect based ...

 
 
1 hour later…
11:40 PM
2
Q: How to Display the Page Number Only (No Header) for Chapter Pages; Header Only, Elsewhere

mlchristiansConsider the code \documentclass[openany]{book} \usepackage{lipsum} \usepackage{fancyhdr} \usepackage{pgfpages} \pgfpagesuselayout{2 on 1} \begin{document} \LARGE \thispagestyle{empty} \pagestyle{fancyplain} \renewcommand{\headrulewidth}{0pt} % Removes line under header. \lhead[{\emph{{\Large{...

 

« first day (2574 days earlier)      last day (814 days later) »