Personally for me, this code gives strange output, I don't understand why.  Input:  matrix = [[0] * 5] * 5  for i in range(5):     matrix[i][0] = i  matrix   Output:  [[4, 0, 0, 0, 0],  [4, 0, 0, 0, 0],  [4, 0, 0, 0, 0],  [4, 0, 0, 0, 0],  [4, 0, 0, 0, 0]]   Expected output:  [[0, 0, 0, 0, 0],  [1, 0, 0, 0, 0],  [2, 0, 0, 0, 0],  [3, 0, 0, 0, 0],  [4, 0, 0, 0, 0]]
I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?
Cannot translate vertice/edge will duplicate How do you clean a seasoned cast iron skillet? I have a seasoned cast iron skillet, and I don't want to mess up the seasoning when I'm cleaning it.  What do I use and what don't I use to get it back to clean?  I've heard not to use soap and to make sure it is dry, but nothing beyond that. How to import a jar in Eclipse Let $D$ be a , and let $a,b,x \in D \setminus \{0\}$. Then is it true that $\gcd (ax,bx)=x \cdot \gcd (a,b)$ ?    Let $c=\gcd (a,b)$ and $d=\gcd(ax,bx)$, then as $cx|ax$ and $cx|bx$ so $cx|d$. We would be done if we could show $d|cx$, but I am unable to show that. Please help me to solve this problem. If $f$ is integrable then $|f|$ is also integrable Show that if $f$ is integrable on $[a, b]$ then $\lvert f \rvert$ is also integrable. Hint: Show that $$U (P , \lvert f \rvert) − L(P , \lvert f \rvert) ≤ U (P , f ) − L(P , f ).$$ I have: $$U (P , \lvert f \rvert) \ge U (P , f )$$ and $$ L(P , \lvert f \rvert) \ge L(P,f)$$ Thus, $$U (P , \lvert f \rvert) − L(P , \lvert f \rvert) ≤ U (P , f ) − L(P , f ).$$ I would like to show that the function $\frac{1}{x}$ is not uniformly continuous on $(0,1)$ using two approaches.   First Approach:   We have the fact that if a function $f$ is uniformly continuous on an open interval $(a,b)$, then the function $f$ is bounded on $(a,b)$. By using its contrapositive, since $\frac{1}{x}$ is not bounded on $(0,1)$, it is not uniformly continuous.  Second Approach:  Proof by definition. Note that the definition of non-uniform continuity is:  There exists an $\epsilon_0&gt;0$ such that for all $\delta&gt;0$, there exists $x,y \in (0,1)$ such that $|x-y|&lt;\delta$ but $|\frac{1}{x} - \frac{1}{y}| \geq \epsilon_0$.  Assume that $\delta &lt; 1$. Let $x = y + \frac{\delta}{2} \in (0,1), y &lt; \frac{\delta}{2} \in (0,1), \epsilon_0 = 1$. Then we have   $$|\frac{1}{x} - \frac{1}{y}| = |\frac{1}{y + \frac{\delta}{2}} - \frac{1}{y}| = \frac{\frac{\delta}{2}}{|y(y + \frac{\delta}{2})|} &gt; \frac{\frac{\delta}{2}}{(\frac{\delta}{2})(\delta)} = \frac{1}{\delta} &gt; 1 = \epsilon_0 $$  If $\delta \geq 1$, then let $\delta^{\prime} = \frac{1}{\delta}$ so that $\delta^{\prime} \leq 1$. The rest proceeds the same as above.   Question: Are my two approaches correct? How long can a temporary suspension be? I ran into a user profile that states:  This account is  to cool down. The suspension period ends on Apr 27 '24 at 7:54  At first, it seemed like a somewhat longish suspension period.  Referring to  reveals:  Depending on the severity of the problem behavior — and at the complete discretion of the moderator — your account will be placed in timed suspension for anywhere from 1 to 365 days.  This indicates that temporary suspensions can last upto a year.  Additionally, the  doesn't give any other information about the timed suspension other than the link to the wiki above. I am keen to know whether the example above (wherein the account has been suspended until 2024) is a one-off case or is it a case of documentation being obsolete? I accidentally discovered () that a closing square bracket within an optional argument delimited by [ ] can cause problems.  Here is example code illustrating the issue:  \documentclass{article}   \begin{document}  \tableofcontents  \section[Square brackets ([ and ])]{Square brackets: [ and ]} % bad: the TOC now has "Square brackets ([ and", and the actual title is a mere ")".  Some text.  \section[{Square brackets ([ and ])}]{Square brackets: [ and ]} % good (works as originally intended)  Some text.  \end{document}   The text to be used as the optional (as well as the non-optional) argument contains a ], and this character is not supposed to function as the optional argument terminator but as a matching square bracket/parenthesis. Perhaps this is as it should be, but the question is how to best circumvent any potential problems. Enclosing this in a group works, but I don't know whether doing this has other side effects (perhaps not here in the case of \section but hopefully someone else has a better example of where grouping could lead to a problem). There is no (obvious) way other than writing [{ }] because [ and ] are not normally escaped. That [ and ] are normal characters and bear syntactic function (as optional argument delimiters) creates this potentially problematic situation.  Is simply enclosing the entire optional argument in a group ({ }) a good solution? Are there other/better ways? iBooks preview not working? I recently converted one of my books into an iBooks format using Author. However when I connected to my iPad and went into 'preview', I saw my device, clicked it, but the 'preview' button to enable the previewing process was faded and I could not click it. Has anyone actually used the preview feature enough to give me some help? Thanks! If $f(x)=x+\int_{0}^{1}[xy^2+x^2y]f(y)dy$ where $x$ and$y$ are independent variable.Find $f(x).$ How to choose a good research problem? I am working to get a PhD, maybe next year this time around. Currently, this is my second year. I have published 3 papers. All of them are not about one problem but consider different problems. My strategy to find a research idea/problem is given below.  1 - Read papers whose titles are either interesting or I have some apriori understanding of those titles.  2 - Understand those papers as best as I can. That is, I try to understand each detail presented in the paper except the simulation results (this is because I think simulation results are hard to reproduce).  3 - I analyze the paper and try to find a very small problem which can be addressed (i.e. I can solve it) by the methodology of the paper.  4 - If I am successful at step 3 I start working on that problem otherwise I repeat the process from step 1.  By applying this strategy I have been able to write 3 papers and I have submitted a fourth (I am not satisfied with those papers because at very best they can be considered average papers). But my concern is that the problems addressed in those papers do not belong to one area. As far as I have seen, for the profiles of some of the renowned researchers in my field their PhD work is focused on one area. One main thing I console myself with is that almost all of those researchers had good supervisors. My supervisor does not even read the draft/reviews of my papers and the suggestions that he provides during the meetings are so broad that the problem becomes intractable. Under these circumstances what are your opinions: Is there any better strategy to do research?   I will be very thankful to you for providing me suggestions or commenting on my dilemma. What ability should be used when resisting Intimidation? During our last play session (it was our second session, so everyone is first level) my fighter dwarf had a conflict with another player's human fighter. My dwarf became annoyed at the human's dismissive reaction to a roar outside the village that sounded like ogres (my dwarf has a bad history with ogres).   So, in order to emphasize the seriousness of this situation, my dwarf grabbed the human by shirtfront and pulled him closer (done with a successful roll). Still bent double, the human drew his sword and pointed it at my dwarf's belly (dwarf wearing chainmail). At this point the DM made the other player roll an Intimidation (Charisma) check, and me a Wisdom check to resist. I lost and my dwarf, chastened, let the human go.  That was pretty funny situation, but one thing is bothering me. By using a Wisdom check against Intimidation (Charisma), my dwarf (who has &minus;1 Wisdom modifier) was at a disadvantage (literally, not in the D&amp;D disadvantage mechanic sense) against the threats. Although he is a strong and capable warrior, he is not that wise.  But I have to wonder: is willpower really represented by Wisdom in 5e? I think that many not-so-wise creatures/characters can stand bravely against threats.  What ability/skill should be used in a contest to resist intimidation? Recall the following relevant definitions. We say that   $b$ is divisible by $a$ in $R$, or $a\mid b$ in $R$, if $b = r a$ for some $r\in R$. $a$ and $b$ are associates  in $R$ if $a\mid b$ and $b\mid a$, (or, equivalently, if $aR = bR$). $u\in R$ is a unit if it has a multiplicative inverse (a $v\in R$ such that $uv=vu=1$). $a$ and $b$ are unit multiples in $R$  if $a = ub$ for some unit $u\in R$.   Given these definitions, my question is,     If $R$ is a commutative ring with unity and $a,b\in R$ are associates in $R$, are $a$ and $b$ unit multiples in $R$?   I was told that this not always true. But I encountered some difficulties in finding a counterexample. Where can the viewport clipping parameters be changed? BAV99 forward voltage I am reading the  From the table on ELECTRICAL CHARACTERISTICS (page 2) (TA = 25°C unless otherwise noted) (Each Diode)     Forward Voltage mVdc     IF = 1 mAdc 715mV   IF = 10 mAdc 855mV   IF = 50 mAdc 1.0V   IF = 150 mAdc 1.25V     On page 3 there is the following VI curve graph:  Clearly at 25°C - 100mA is Vf = 0.9V. There is huge difference between the table and the IV curve.  Which source of information I should trust? Is this (typical) and (maximum) where the table guarantees the diode won't exceed Vf 1.0v at 50mA while the graph is just typical values? Accidently deleted boot option on Dell laptop Self-deletion and un-deletion without any changes should reinstate the original close/delete votes Pretty much every application I use in full-screen (including Firefox, MacVim and the Terminal) have tabs on the top of the screen.  The problem is, when I move my mouse to reach the tabs I'll often accidentally touch the top of the screen, bringing in the OS menu OVER the tabs:    Is there any way to change this behavior? I'd prefer it if the menu bar would stay hidden when I'm using a full-screen app, even if my mouse does touch the top of the screen. $f$ holomorphic on $D\setminus \{0\}$ and takes no values in $(-\infty,0],$ then $0$ removable If $f$ is holomorphic on $D\setminus \{0\}$ and takes no values in $(-\infty,0]$ then $0$ is a removable singularity.   I thought to prove this by elimination, but I can't really tell anything about the behavior of $f$ around $0$. How can one translate the information about the definition of $f$ in semi-open interval $(-\infty,0]$. JSF 2.1 ViewScopedBean @PreDestroy method is not called