a user is trying to update their info. I have been reading this line of code but I still do not understand what does the bio in front of the if statement does.  the varaible bio is actually from an input  bio = data.get('bio', '')  user.bio = bio if bio else user.bio  P.S.  I just realised, could this be like a shorthand for if bio exist return bio else return user.bio? Then in this way, if user try to empty their input field, it actually wouldn't work?
If Python does not have a ternary conditional operator, is it possible to simulate one using other language constructs?
I'm a student who uses the laptop all the time and I have a problem with Wifi on the laptop. I don't really know what it is. I can describe the problem tho. For example, i closed my laptop last night, so it goes in suspend mode. I turn it on this morning and my wifi doesn't want to connect until I restart the laptop. It says that it's connecting and in Wifi settings the circle animation is spinning, turning Wifi off and on doesn't do anything. Here's what happens when I check to see my network info: sudo lshw -C network   *-network                         description: Wireless interface        product: Wireless 3160        vendor: Intel Corporation        physical id: 0        bus info: pci@0000:02:00.0        logical name: wlp2s0        version: 83        serial: 00:1e:64:e6:1c:93        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless        configuration: broadcast=yes driver=iwlwifi driverversion=5.4.0-52-generic firmware=17.3216344376.0 ip=192.168.0.14 latency=0 link=yes multicast=yes wireless=IEEE 802.11        resources: irq:129 memory:df100000-df101fff   *-network        description: Ethernet interface        product: RTL810xE PCI Express Fast Ethernet controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:03:00.0        logical name: enp3s0        version: 07        serial: f8:ca:b8:52:72:49        capacity: 100Mbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 firmware=rtl8106e-1_0.0.1 06/29/12 latency=0 link=no multicast=yes port=MII        resources: irq:17 ioport:d000(size=256) memory:df000000-df000fff memory:d0000000-d0003fff  Also I have to mention that my Linux is doublebooted alongside Windows 10, but I don't think that makes any difference. Help would be much appreciated, I wouldn't want to miss my classes because of this hahah Thanks! I want to show that $$\log N&lt;\sum_{n=1}^{N}\frac{1}{n}&lt;1+\log N.$$ But I don't know how to show this. Let $f\in C^{\infty}(\mathbb{R},\mathbb{R})$ such that $f(x)=0$ on $\mathbb{R}$\ $(-1,1)$. Prove that there exists $n\in\mathbb{N}$ such that $f^{(n)}$ has at least n+1 zeros on $(-1,1)$  My attempt :   Assume $f$ is strictly positive  (if not n=0 works). Let $Z(f^{(n)})$ the number of zeros of $f^{(n)}$ on $(-1,1)$. Then we have: $$ \forall n\in\mathbb{N}:\;f^{(n)}(-1)=f^{(n)}(1)=0 $$ so that iterating the Rolle theorem to the successive derivatives of f we have  $$  \;Z(f^{(k+1)}) \geq Z(f^{(k)}) +1 $$ thus, by induction : $$ \forall n\in\mathbb{N}: \;Z(f^{(n+1)}) \geq Z(f^{(n)}) +1 $$ Therefore, $$ Z(f^{(n)}) \geq n $$ How can I find an another zero ?   I'm still looking for an another proof which does not use the lemma ..,  Thank you in advance. Access parent's parent from javascript object Why did they make another prequel? Star Trek: Discovery, the first new Star Trek television series in 12 years, debuted last week.  As with a number of recent Star Trek efforts, this is a prequel to the Original Series, occurring roughly one decade prior chronologically.    The Original Series, the Next Generation, Deep Space Nine, and Voyager occur in a chronological sequence that, generally speaking, moves forward (although TNG, DS9, and Voyager overlap to various degrees).  The linear trajectory of Star Trek productions took a sudden shift with the television series Enterprise, which was set just over 100 years before TOS. This was followed by J.J. Abrams' 2009 film Star Trek, which created a new timeline and which followed the characters from TOS, but at a time that is also chronologically one decade before TOS.  Given that the last few interpretations of Star Trek were prequels in one sense or another, I was disappointed that Discovery was yet another prequel.  I'd like to know why the showrunners decided to take this direction.  I haven't been able to find any statements about the rationale.    That being said, I find it interesting that Star Trek (2009) was set in 2255-2258 and Discovery is currently set in 2256, even though they are ostensibly in different timelines &mdash; the former in the reboot timeline and the latter supposedly in the original timeline.  Also, one of the showrunners for Discovery, Alex Kurtzman, was one of the principal members of the creative team behind the Abrams films.  Why did the creative staff behind Discovery decide to make another prequel?  Does it have anything to do with the fact that Star Trek (2009) and Discovery are set in roughly the same years? How to draw line through group plots in pgfplots? This issue has been driving me crazy for the past 10-20h. I have a group plot (pgfplots) where I have 2 plots one under another. I'd like to draw a vertical line (e.g. a helpline at x=150e-6) that would go through all of them.  When drawing inside the axis or rather nextgroupplot environment I can use something like this: \draw[thin] (axis cs:150e-6,\pgfkeysvalueof{/pgfplots/ymin}) -- (axis cs:150e-6,\pgfkeysvalueof{/pgfplots/ymax}); but this allows me to draw only on one of the subplots. If I go outside the axis environment I am able to draw on the entire {tikzpicture}, but I can't use the axis reference.  \begin{figure*}[h] \centering \begin{tikzpicture}  \begin{groupplot}[       group style = {group size=1 by 2, x descriptions at=edge bottom, vertical sep=0.2cm},       ytick={0, 1.8},       ymin=0,       ymax=3,       xmin=0,       xmax=550e-6,       change x base=true,       x SI prefix=micro]  \nextgroupplot \addplot table [x index = {0}, y index = {1}, col sep=comma] {plots/plot1reduced.csv};  \nextgroupplot[x unit=s] \addplot table [x index = {0}, y index = {3}, col sep=comma] {plots/plot1reduced.csv};  \draw[thin] (axis cs:150e-6,\pgfkeysvalueof{/pgfplots/ymin}) -- (axis cs:150e-6,\pgfkeysvalueof{/pgfplots/ymax});  \end{groupplot} \end{tikzpicture} \caption{Case 1} \label{fig:case1plot} \end{figure*} I recently had somebody tell me that a mutual friend of ours who is  prefers that people refer to him/her using the gender-indefinite pronoun they.   In some cases, this almost seems okay:   Kris left their umbrella at our house.  On the other hand, if Kris is sitting right next to you, it feels very odd to say       They (meaning just Kris) would like more cake.   Or even odder,      Kris would like some more cake, can you please pass it to they/them?"   Are these usages grammatically correct? Are they in the process of becoming grammatically correct? Are there more correct alternatives? What is the best way to add a user to the sudoer group? I've noticed this a few times on the Feed activity on the Android app, but never thought anything of it.  Why does this question (How To auto enable checkbox?) appear as "Unanswered" when there is an icon which denotes there are 5 answers, one of which has been marked as the answer?  Dragging down to refresh doesn't seem to clear the unanswered flag either.  Device: Nexus 5 I recently switched from Windows to Mac. Steam says I have fewer Mac specific games than total games and it should be an equal amount unless you can only download, install, and play once from your account. I thought I bought it so that it would work across all operating systems. If this is true, is there a work around or a discount for re-purchasing for the other OSes? I am wondering what sudo apt-get update does?  What does it update? How can I mount the /system directory rewritable or read-only on my Android phone? Sum of the series $1+\frac{1\cdot 3}{6}+\frac{1\cdot3\cdot5}{6\cdot8}+\cdots$ iMessage doesn't say "delivered" or "not delivered" I sent an iMessage from my iPod touch to my friends iphone on Monday. It didn't say delivered or not delivered. It was just nothing. His phone is on (I know because my other friends are iMessaging him) and my friend said her messages don't say "delivered" at the bottom but they still talk. Mine always say delivered at the bottom. So is this an error, like it didn't go through, or is he just ignoring me? Suppose I have some large datafile, which overflow the screen in both vertical and horizontal direction. How can I browse this file, while the header-lines stay on the screen?  For the moment, I am using less -S, so that I can nicely scroll my file horizontally and vertically. However, when scrolling down, the header lines obviously disappear. Is there a way to keep these using less?  An alternative is using vim in split-screen mode with :set nowrap. However, now if I scroll horizontally, the top window doesn't scroll in the same way (:windo set scrollbind only works for vertical scrolling as far as I know). Should I always use a comma before a quote? I have a string "1112224444' it is a telephone number. I want to format as 111-222-4444 before I store it in a file. It is on a datarecord and I would prefer to be able to do this without assigning a new variable.  I was thinking:  String.Format("{0:###-###-####}", i["MyPhone"].ToString() );   but that does not seem to do the trick.  ** UPDATE **  Ok. I went with this solution  Convert.ToInt64(i["Customer Phone"]).ToString("###-###-#### ####")   Now its gets messed up when the extension is less than 4 digits. It will fill in the numbers from the right. so  1112224444 333  becomes  11-221-244 3334   Any ideas? Do superheroes/villains like Quicksilver or Flash with super speed get tired due to running? In several different contexts we invoke the  to justify whatever statistical method we want to adopt (e.g., approximate the binomial distribution by a normal distribution). I understand the technical details as to why the theorem is true but it just now occurred to me that I do not really understand the intuition behind the central limit theorem.  So, what is the intuition behind the central limit theorem?   Layman explanations would be ideal. If some technical detail is needed please assume that I understand the concepts of a pdf, cdf, random variable etc but have no knowledge of convergence concepts, characteristic functions or anything to do with measure theory. I have a Category entity which has a Nullable ParentId field. When the method below is executing and the categoryId is null, the result seems null however there are categories which has null ParentId value.  What is the problem in here, what am I missing?  public IEnumerable&lt;ICategory&gt; GetSubCategories(long? categoryId) {     var subCategories = this.Repository.Categories.Where(c =&gt; c.ParentId == categoryId)         .ToList().Cast&lt;ICategory&gt;();      return subCategories; }   By the way, when I change the condition to (c.ParentId == null),  result seems normal.