Opt out of getting notifications about binding edits to some or all community wiki answers
Can we have an option to disable notifications on community wiki posts?
Maven project with native dependency and copying files Proving a direct product of groups is a group $n$-th digit in the sequence of natural numbers Unbiased Estimator for a Uniform Variable Support Let $ x_i $ be iid observations in a sample from a uniform distribution over $ \left[ 0, \theta \right] $.  Now I need to estimate $ \theta $ based on $N$ observations and I want the estimator to be unbiased.  I thought about simple estimator $ \hat{\theta} = \max \left( x_i \right) $.  Based on simulation it is not biased, yet I couldn't show it analytically.  Could anyone, please, show it is unbiased?  BTW, I could easily find another, easy to prove, unbiased estimator, $ \hat{\theta} = 2 \mathrm{mean} \left( {x}_{i} \right) $ The canonical way to return multiple values in languages that support it is often . Option: Using a tuple Consider this trivial example: def f(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return (y0, y1, y2)  However, this quickly gets problematic as the number of values returned increases. What if you want to return four or five values? Sure, you could keep tupling them, but it gets easy to forget which value is where. It's also rather ugly to unpack them wherever you want to receive them. Option: Using a dictionary The next logical step seems to be to introduce some sort of 'record notation'. In Python, the obvious way to do this is by means of a dict. Consider the following: def g(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return {'y0': y0, 'y1': y1 ,'y2': y2}  (Just to be clear, y0, y1, and y2 are just meant as abstract identifiers. As pointed out, in practice you'd use meaningful identifiers.) Now, we have a mechanism whereby we can project out a particular member of the returned object. For example, result['y0']  Option: Using a class However, there is another option. We could instead return a specialized structure. I've framed this in the context of Python, but I'm sure it applies to other languages as well. Indeed, if you were working in C this might very well be your only option. Here goes: class ReturnValue:   def __init__(self, y0, y1, y2):      self.y0 = y0      self.y1 = y1      self.y2 = y2  def g(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return ReturnValue(y0, y1, y2)  In Python the previous two are perhaps very similar in terms of plumbing - after all { y0, y1, y2 } just end up being entries in the internal __dict__ of the ReturnValue. There is one additional feature provided by Python though for tiny objects, the __slots__ attribute. The class could be expressed as: class ReturnValue(object):   __slots__ = [&quot;y0&quot;, &quot;y1&quot;, &quot;y2&quot;]   def __init__(self, y0, y1, y2):      self.y0 = y0      self.y1 = y1      self.y2 = y2  From the :  The __slots__ declaration takes a sequence of instance variables and reserves just enough space in each instance to hold a value for each variable. Space is saved because __dict__ is not created for each instance.  Option: Using a  (Python 3.7+) Using Python 3.7's new dataclasses, return a class with automatically added special methods, typing and other useful tools: @dataclass class Returnvalue:     y0: int     y1: float     y3: int  def total_cost(x):     y0 = x + 1     y1 = x * 3     y2 = y0 ** y3     return ReturnValue(y0, y1, y2)  Option: Using a list Another suggestion which I'd overlooked comes from Bill the Lizard: def h(x):   result = [x + 1]   result.append(x * 3)   result.append(y0 ** y3)   return result  This is my least favorite method though. I suppose I'm tainted by exposure to Haskell, but the idea of mixed-type lists has always felt uncomfortable to me. In this particular example the list is -not- mixed type, but it conceivably could be. A list used in this way really doesn't gain anything with respect to the tuple as far as I can tell. The only real difference between lists and tuples in Python is that lists are , whereas tuples are not. I personally tend to carry over the conventions from functional programming: use lists for any number of elements of the same type, and tuples for a fixed number of elements of predetermined types. Question After the lengthy preamble, comes the inevitable question. Which method (do you think) is best? Interior of cartesian product is cartesian product of interiors I have to prove that:  $$Int(A\times B) = Int(A)\times Int(B)$$  Where $A\subset M$ and $B\subset N$, both $M$ and $N$ metric spaces.  The problem is that the exercise does not specify the metric, so I need to try to prove it using a generic metric.  If $x\in Int(A\times B)$, then an open ball can be centered at $(x,y)$ such that it is contained in $A\times B$. Therefore, this open ball, $B((x,y),r)\subset A\times B$. It means that $d((x,y),a)&lt;r$ for any $a\in A\times B$ for some $r&gt;0$. I guess that if I can take from here that $d(x,a)&lt;r$ and $d(y,a)&lt;r$ I can prove thhat $Int(A\times B)\subset Int(A)\times Int(B)$, but I still have to prove the other way around.   Any ideas? How to write “ä” and other umlauts and accented letters in bibliography? How to write in bibliography (package natbib) letter "a" with two dots above? Specially, I mean the word Birkhäuser.  Is there a general rule or way how to write such umlauts or other accented letters in bibliographies? case insensitive find in mongodb for usernames in php I'll be at my uncle's house just in case you need to reach me.      I'll be at my uncle's house should you need to reach me.   Could you tell me what is the difference between those? I'd like to output a list of all installed packages into a text file so that I can review it and bulk-install on another system.  How would I do this? Highlighting or coloring certain words / substrings appearing in a larger string It seems that Geometric Complexity Theory requires much knowledge of pure maths such as algebraic geometry, representation theory.   While I am a CS student and do NOT have classes of very abstract and pure mathematics, I am interested in this program.  Is there a list of "minimum knowledge" for learning this theory ?     This list includes lecture notes of CS or math departments, surveys of any journal or conferences, and text books of pure math.  [EDIT: Added later] Thank you for your comments.  General theory of computing: I read Sipser's book with the title "Introduction to the Theory of Computation"  Complexity Theory :In particular, I am interested in concrete models for lower bounds of complexity. Thus I read the part of the "concrete lower bounds" in Arora-Barak's text book. I also have basic knowlede in the several chapers of the communication complexity book written by Nisan.  Basic Mathematics : I have learnt about proof-based linear algebra such as general definition of the vector space etc and precicely argument of calculas based on epsilon-delta argument.   Algebra: I have learned about definition and examples of group, ring, and field. I had a class for cs students, and have not learned about general thoery of this algebraic systems. I am using the book documentclass and have a list of figures. After  I noticed that there is a blank line to separate figures that are in different chapters, but not if they are within the same chapter. Since I changed the numbering of my figures to be {1, 2, 3, etc.} instead of {2.1, 2.2, 3.1, etc.} this looks silly and I'd rather have a blank line between each figure, no matter what.  How do I do that?  Similar: How can I recover photo files from a memory card with a corrupt filesystem? Propose Newbie-Overflow site or section Because the perl section is looking like that right now. I believe that Stack Overflow is going out of it's charter in becoming a newbie FAQ when as far as the original reasoning it was meant to be something along the lines of an expert site.   is a good example of what I mean in Perl. It probably could be closed because it's a duplicate, or some other reason.   I would also like to indicate that I don't hold back answering newbie questions. It's just when I think of an obscure "stack overflow" error that's beating you some 3 am close to deadline, that's not "Howcum Perl print ..." and follows with something that causes a vast majority of Perl programmers to say oops, because they know exactly what's going on.   So the proposal is   A new site. "Move to Newbieville" A new "section" A new status somewhat similar to Closed ("Newbied") but still can be updated all the same as an open question.   I'm not against giving some newbies an assist, but I feel a FAQ for rank newbieism is not something that SO started out to be, based on the original concept of a Expert Site.   Including comment to Gnoupi:   I said nothing about making newbies unwelcome. Like I said. I answer them--heck, I think I've even answer homework questions. I've answered on the vague impressions that I can glean from posts that have 4 close votes. It can even lead to avoiding downvoting or yelling at newbies by more established curmudgeons if there is a special action you can do to gently inform newbies that this is a real newbie question.  However, you have to know that to some people newbies are already unwelcome. There is a site ethic, but the individual is also going to decide how much they welcome newbies. And people do post RTFM answers already.   Anyway, I'm one vote away from a peer pressure badge it seems. (Nope, nailed it.)    EDIT  For somebody jumping to the conclusion that I'm hostile to newbies:  just earlier What is the definition of textbook or "raw" RSA?  What are some of the properties of textbook RSA?  How does it differ from other schemes based on RSA? Polygamma function series: $\sum_{k=1}^{\infty }\left(\Psi^{(1)}(k)\right)^2$ Applying the , I found: $$S=\displaystyle\sum_{k=1}^{\infty }\left(\Psi^{(1)}(k)\right)^2\lt\dfrac{2}{3}\pi^2$$ where $\Psi^{(1)}(k)$ is the polygamma function. Is it known any sharper bound for the sum $S$? Thanks. idempotents acting as local identities Let $R$ be a ring with unity (not necessarily commutative) and $I$ an ideal of $R$.  Suppose that for every element $a \in I$ there exists an element $c\in I$ such that $ac=a$. Note that $c$ is related to $a$. Now we have the following question:  Can we say that  for every element  $a\in I$ there exists an idempotent element $c\in I$ such that $ac=a$?    Of course we have many examples such that the answer is true for them but in general  we don't know. Convert XML/HTML Entities into Unicode String in Python I'm doing some web scraping and sites frequently use HTML entities to represent non ascii characters. Does Python have a utility that takes a string with HTML entities and returns a unicode type?  For example:  I get back:  &amp;#x01ce;   which represents an "ǎ" with a tone mark.  In binary, this is represented as the 16 bit 01ce.  I want to convert the html entity into the value  u'\u01ce' I'm having some trouble with the following sentence:     Since he had arrived, he had seen the rule broken more than once.   For some context, the text itself is a short story and I'm writing it in past tense. Does this mean that the presence of a past simple verb is "implicit", in a way, to the text itself? Does using the word "since" change anything (I know that it is usually supposed to be followed by a past simple verb, but I'm not sure of any exceptions to this)?