Sometimes the attributes of an operator can change quite dratically the output for the end user.  is there a way to make the description of this operator adaptive to the attribute ?   exemple in the script below:  class SCATTER_OT_print(bpy.types.Operator):     bl_idname      = "scatter.print"     bl_label       = ""      pref : bpy.props.StringProperty()     bl_description = "print: " + pref #Adaptive desctiption ?       def execute(self, context):         print(self.pref)
I'd like to update the label of an operator when it's called. But this :  def execute(self,context):     self.bl_label = "good night"   ... apparently doesn't work if the bl_label property has already been defined. Am I wrong ?
How to make 'python' program command execute Python 3? The python program command executes Python 2. Python 3 can be executed using the python3 command.  How can Python 3 be executed using the python command? The gluing lemma for closed sets states:     Given a finite closed cover $\{A_i\}$ of a topological space $X$, together with continuous maps $\{f_i : A_i \to Y\}$ into some other topological space $Y$, there exists a unique continuous map $f : X \to Y$ whose restriction to each $A_i$ is equal to $f_i$.   Question: What is a good and simple counter-example when the gluing lemma fails in the case that $\{A_i\}$ is infinite, but countably so.  My attempt: I have only been able find a silly counter-example: let $\{A_\alpha\}$ be the collection of all points of $X = [0,1] \subset \mathbb{R}$, and let $f_\alpha = 0$ for all $\alpha$ except for $\alpha = \alpha_0$, for which $A_{\alpha_0} = \{0\}$ and $f_{\alpha_0} = 1$. Let $f(x)\in C^2:[0,1]\rightarrow\mathbb{R}$ satisfy $f(0)=0,f(1)=1,f'(0)=f'(1)=0$, prove that: $$\max_{x\in[0,1]}|f''(x)|\ge4$$  By using Taylor series I can prove that $\max_{x\in[0,1]}|f''(x)|\ge2$, but I cannot go further. If $X,Y$ are equivalence relations, so is $X \times Y$ Difference between the i386 download and the amd64? What is the difference between standard i386 download and the amd64 download of Ubuntu 11.04? I am currently running the i386 on an amd machine, would my system work better with the amd64 download instead? (my machine was running Windows 7 64bit, but I neglected to look at that prior to installing Ubuntu). How do we pass the field api name in lwc for a lightning data table? Has 'Ubuntu Software' been renamed to 'Snap Store'? Number of surjections from $\{1,...,m\}$ to $\{1,...,n\}$ Let $m,n$ be two integers such that, $m\ge n$. Compute the number of surjections from $\{1,...,m\}$ to $\{1,...,n\}$   There are $n^m$ functions (total).  we subtract from $n^m$ the number of non-surjective functions.  There are $\binom{n}{1}(n-1)^m$ functions missing one element.  There are $\binom{n}{2}(n-2)^m$ functions missing two elements, but how many times did we count this in the previous count ?  Then we have to add this again by inclusion-exclusion but why is the difference always 1? How can I remove duplicate values from a multi-dimensional array in PHP?  Example array:  Array (     [0] =&gt; Array     (         [0] =&gt; abc         [1] =&gt; def     )      [1] =&gt; Array     (         [0] =&gt; ghi         [1] =&gt; jkl     )      [2] =&gt; Array     (         [0] =&gt; mno         [1] =&gt; pql     )      [3] =&gt; Array     (         [0] =&gt; abc         [1] =&gt; def     )      [4] =&gt; Array     (         [0] =&gt; ghi         [1] =&gt; jkl     )      [5] =&gt; Array     (         [0] =&gt; mno         [1] =&gt; pql     )  ) Drop Table and recreate Permissions So we followed an best practice by Andreas de Ruiter ()  The Idea behind it is, that you write SQL Views which are easy to maintain and deploy. You use stored procedures to use these views and create tables from it. He suggests dropping or truncating the tables to maintain consistency over the data. I think it's the easiest approach without writing any complex update logic.  On these tables we have the need to set specific user permissions. By dropping the table we would lose them. So for us the question is, how could we drop the table and recreate the existing permissions on the newly created table? I'm arriving from New Delhi, India (Indian passport) with JAL at Narita on 11th July at 07:30 and departing for San Francisco with JAL at 00:05 on 12th July from Haneda. Do I need a transit visa as I'll be switching airports and spending a few hours at JAL City Haneda Airport Hotel?  Previously I had connecting flights from Narita to San Francisco and obtained shore passes to relax at Narita Nikko Hotel. Now I'm travelling with my elderly Mom and do not want complications at Narita immigration or later in the day while going from Narita Airport to Haneda airport. Please advise. Meaning of 'const' last in a function declaration of a class? How to verify $H\otimes K \cong \bigoplus\limits_{i\in I}H$ Let $H,~K$ be the Hilbert space. if $\{v_{j}\}_{j\in J}\subset H$ and $\{w_{i}\}_{i\in I}\subset K$ are the orthonormal bases, then how to construct the isomorphic mapping: $H\otimes K \rightarrow \bigoplus\limits_{i\in I}H$. Here, the $H \otimes K$ is the tensor product of two Hilbert space. What is the relationship between a chi squared test and test of equal proportions? Suppose that I have three populations with four, mutually exclusive characteristics.  I take random samples from each population and construct a crosstab or frequency table for the characteristics that I am measuring.  Am I correct in saying that:   If I wanted to test whether there is any relationship between the populations and the characteristics (e.g. whether one population has a higher frequency of one of the characteristics), I should run a chi-squared test and see whether the result is significant. If the chi-squared test is significant, it only shows me that there is some relationship between the populations and characteristics, but not how they are related. Furthermore, not all of the characteristics need to be related to the population.  For example, if the different populations have significantly different distributions of characteristics A and B, but not of C and D, then the chi-squared test may still come back as significant. If I wanted to measure whether or not a specific characteristic is affected by the population, then I can run a test for equal proportions (I have seen this called a z-test, or as prop.test() in R) on just that characteristic.   In other words, is it appropriate to use the prop.test() to more accurately determine the nature of a relationship between two sets of categories when the chi-squared test says that there is a significant relationship? Came across the following exercise in Bartle's Elements of Real Analysis. This is the solution I came up with. Would be grateful if someone could verify it for me and maybe suggest better/alternate solutions.  I also looked up these related questions - , ,  - but was not happy with proofs given there. I seem to need some help understanding these. Any such help is appreciated.      Show that every sequence in $\Bbb R$ either has a monotone increasing sub-sequence or a monotone decreasing sub-sequence.   Let $(x_n)$ be a sequence in $\Bbb R$. Suppose $(x_n)$ is not bounded. Without loss of generality we may assume that $(x_n)$ is not bounded above. Therefore given any real number there is a member of the sequence which is greater. Let $x_{n_1}$ be any member of the sequence.   There is $x_{n_2} \gt \sup\{x_1, x_2, ..., x_{n_1} \}$. For $i \gt 1$ let $x_{n_i} = \{x_1, x_2, ..., x_{n_{i - 1}}\}$ then $(x_{n_k})$ forms a monotone subsequence of $(x_n)$.   Now suppose instead that $(x_n)$ is bounded. By the Bolzano-Weierstrass Theorem there is a subsequence $(y_n)$ of $(x_n)$ which converges to a limit $y$. Without loss of generality there are infinitely many distinct values in $(y_n)$ that are unequal to $y$. Let $y_{k1}$ be the first such element. Let $y_{k2}$ be any element in $\{ y' \in (y_n) \ \ | \ \ |y' - y | \lt |y - y_{k1}|  \}$.   For $i \gt 1$ let $y_{ki} \in \{ y' \in (y_n)  \ \ | \ \ |y' - y | \lt |y - y_{k \ i - 1}|  \}$. Such $y_{ki}$ exists for every $i \in  \Bbb N$ since $ \lim (y_n) = y $. Now let $(y_{kn})$ be the sub-sequence of $(y_n)$ thus formed. At least one of the two following sets must contain infinitely many elements.    $\{ y \in (y_{kn}) \ \ | \ \ y \gt x\}$ $\{ y \in (y_{kn}) \ \ | \ \ y \lt x\}$   The one which does forms a monotone subsequence. I have just started studying implication in mathematics. So, you'll probably have an idea of where my confusion lies right from the get go.  In the truth table, where $A \implies B$ we obtain this result:  A   B   T/F ___________ T | T | T T | F | F F | T | T F | F | T   Now, my confusion here is regarding why $A\implies B$ given A is false, and B true. The others I understand. The first and last one are obvious, the second one implies, to me anyway, that given A implies B, the truth of B rests upon the truth of A, B is false, A is True, which cannot be, thus not B given A is false.  Now... then, why is B true despite the fact that A is false? Or rather, why is the statement B given not A, True. The truth of B is implied from the truth of A, but A is a false statement. So it's very contradictory that this may be, and in fact, if you go through a real life example, you would find that the third statement seems to be false.  Say $A$ is the statement that it is dark outside, and $B$ the statement that the sun is not on our side of the earth. If it is not dark outside, than stating that the sun is on the other side of the planet must be wrong (in my example i'm going to claim that the sun is the only light source).  Side note:  I just had a thought, if A is false, does that mean you can conclude... mmm, whatever? I mean, B is implied via the truth of A, if A is false, B is NOT implied, but then B could be EITHER true or false, I suppose. Is this correct?  However, would that not mean that A does not imply anything when false. Would that not set the 3rd and 4th statement to be undefined? Im asked to prove that a polynomial of an odd degree has a root. Im going to use IVT to prove this, but I'm wondering if I can use the assumption that an odd degree polynomial has either two cases:  $$ \lim_{x\to\infty}h(x)=+\infty \\ \lim_{x\to-\infty}h(x)=-\infty \\ $$ $$and$$ $$ \lim_{x\to\infty}h(x)=-\infty \\ \lim_{x\to-\infty}h(x)=+\infty \\ $$ Then by this there exists numbers $a,b$ such that $$ h(a)&lt;0&lt;h(b) $$ $$or$$ $$ h(b)&lt;0&lt;h(a) $$ Which I think would prove that odd degreed $h(x)$ has at least a root. Or is there a more convincing way to show that there are numbers in $h(X)$ greater than zero and less than zero?  edit: (sorry about the bad limit notation) What formula should be used to determine "hot" questions? Right now  is fairly broken -- it's a simple descending sort by views. As Joel said , it is &quot;a self-fulfilling prophecy.&quot; But this is not intentional, it's only because we haven't had time to improve it yet! As I sit down to write a better algorithm, I thought you guys might have some insight into what would make a good formula to determine the &quot;hot&quot; questions -- over the last 24 hours, the last week, the last month, and all time. Here are the variables we have to work with:  Votes [aka Score] Views Answers Answer Votes [aka Score] Whether the question has an accepted answer or not Time question was originally asked Time of last activity on question Reputation of asker Reputation(s) of answerers  Joel cited the reddit formula as an example, but I think our site is a little different than just a basic link submission site. Plus, we have more variables and data to work with. I found a  describing a few formulas: Y Combinator Hacker News  (p - 1) / (t + 2)^1.5 p = votes (points) from users t = time since submission in hours  Reddit  t = (time of entry post) - (Dec 8, 2005) x = upvotes - downvotes y = {1 if x &gt; 0, 0 if x = 0, -1 if x &lt; 0) z = {1 if x &lt; 0, otherwise x} log(z) + (y * t)/45000  Thoughts? Ideas? I don't want to overthink this; I just want the &quot;hot&quot; questions to be relevant and useful to us. So the simpler the algorithm the better! Based on my analysis of the above and the comments so far, here's the second version of what I have implemented so far. This might suck. I don't know:  (log(Qviews)*4) + ((Qanswers * Qscore)/5) + sum(Ascores) -------------------------------------------------------- ((QageInHours+1) - ((QageInHours - Qupdated)/2)) ^ 1.5  Note that accepted answers weight not at all in hotness. This is intentional, as I feel accepted answers are a fine social contract, but not a good data point for question or answer quality. This algorithm will heavily favor questions with LOTS of answers, as the sum(Ascores) are now included -- one assumes if there are lots of answers, there will be a lot more voting on the answers, too. Update: Note that this formula is what is used on the  linked from the homepage of each site. It is not the formula used to determine the  list. See . Is it possible to construct a multi-colored double-bladed lightsaber? I was just watching  video of some SW dueling at the 2015 World Fencing Championship, and wondered if it's actually possible in the SW universe to construct a multi-colored double-bladed lightsaber?   Are there any accounts of such a thing? If not, would it at least be theoretically possible to make one, or, are there obvious limitations? Before you disagree with me with a downvote, or just want to be funny, please hear me out. From the :  The upvote privilege comes first because that's what you should focus on: pushing great content to the top. Downvoting should be reserved for extreme cases. It's not meant as a substitute for communication and editing.  I have honestly never seen a downvote reserved for an extreme case. The process is usually 1) downvote post if it's bad and don't comment. (Not much of a process, is it?) As you stay on the site longer and longer, you develop a carelessness towards downvotes (as I have), but for new users, it's really discouraging.  question inspired me to [ask balpha to] make , which is a list of users with 1 rep who have the  badge. That's the closest I could get to new users who deleted their own posts after downvotes came in. Don't get me wrong, I know the argument about being nice to new users very well, but I still believe it to be an issue. And since , users are much more inclined to go the lazy route and downvote bad questions. No alternative measures (see below) are taken, for the most part. Personally, I leave a comment and don't downvote until the asker shows no interest in fixing their post. The only other measure taken to discourage downvotes (on answers) is the -1 rep punishment to the downvoter, which is absolutely meaningless and inconsequential anyways. How are we supposed to educate new users when we don't teach them what to do, don't direct them to the FAQ, and discourage them with downvotes right off the bat?  Instead of voting down: If the post is spammy or offensive — flag it. If the question is duplicate or off-topic — flag it for moderator attention. If something is wrong, please leave a comment or edit the post to correct it.  We claim to discourage downvoting, yet I see answers like  that encourage us to downvote first and ask questions later when a question is simply unclear or effortless. It's just an awful chain reaction. A new user comes to the site asking a question, but that doesn't work out too well, so they get downvotes, delete the question in shame, and don't get the help they deserve as a fellow writer of code and programmer. Strip away the quality of the site for a moment: the core functionality of this site, and the only reason I and a lot of other users are (still) on it, is to receive and give help to/from others. I enjoy making sure fellow programmers get the answer they need, because this site has helped me get mine when I needed them. Quality can still be maintained if content is fixed rather than downvoted more often. So can we stop discouraging new users from continuing to use this site and actually start to discourage downvoting? I think we need to encourage effort towards teaching and helping new users understand the system and why their post is bad rather than slapping them in the face with downvotes that they don't know how to interpret anyways. I'm leaving ways we can do this up to others. My first thought was to increase the punishment for downvoting answers and to no longer make question downvotes free, but those wouldn't be well-received, judging by the history of similar suggestions. .