I am declaring global variables before i run the user defined function.  global x x=2   Now I want to change the value of the global variable based on some conditions with in the function it throws UnboundLocalError.  UnboundLocalError: local variable 'x' referenced before assignment   i am changing the value of  global variable as follows.  if pd.isnull(x):    x=1   The above code i used in user defined function.  Anyone can help me to tackle this.  Thanks in advance.
How can I create or use a global variable in a function?  If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?
Why won't my villagers breed Is spacetime discrete or continuous? I'm trying to include Arabic text in an English document (I'm a new latex user), but I can't seem to get any Arabic text to render at all, using xelatex or any kind of tex. I'm using texshop 3.51 on a mac. I can't get this basic example to work, it just displays question marks in the output pdf.  \documentclass[12pt]{article} \usepackage[utf]{arabxetex} \newfontfamily\arabicfont[Script=Arabic]{Amiri} \begin{document} \begin{arab}[voc] وَهَذِهِ فِقرَةٌ بِالعَرَبِيَة مَعَ كَلِمَة اِنكلِيزِيَة \end{arab} \end{document}     I've downloaded Amiri (and also Scheherazade and Lateef) into Fontbook, and they show up if I go Source->Font->Show Fonts in texshop. If I remove the Amiri part it still doesn't work.   Is there anything I can do? I've looked at other links here, like  and  but I can't even render any of those examples.   Thank you so much for any help! I'll love you forever if I can get this to work. How do I split a forest tree into two trees with proper vertical alignment? \documentclass[oneside,12pt]{article} \usepackage{geometry} \usepackage{microtype} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern}  \usepackage{enumitem} \setlist[enumerate,1]{label=\bfseries\Alph*,align=left,leftmargin=*,   labelsep=1.5em} \setlist[enumerate,2]{label=\arabic*.,labelindent=1em,labelsep=1.5em,   leftmargin=*}  \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsthm} \theoremstyle{definition} \newtheorem*{sol}{Solution}  \usepackage{forest} \forestset{   ass/.append style={     before computing xy={l=\baselineskip},     no edge   },   prooftree/.style={     for tree={       child anchor=north,       parent anchor=south     }   } }  \begin{document} \subsection*{Exercises 29} \begin{enumerate} \item Use QL trees to evaluate the entailment claims (1) to (10) in Exercises   28A.   \begin{enumerate}   \item $\forall x(Fx\supset Gx)\vDash\forall x(Gx\supset Fx)$      \begin{forest}       prooftree       [$\forall x(Fx\supset Gx)$       [$\neg\forall x(Gx\supset Fx)\checkmark$,ass       [$\exists x\neg(Gx\supset Fx)\checkmark$,ass       [$\neg(Ga\supset Fa)\checkmark$,ass       [$Ga$,ass       [$\neg Fa$,ass       [$(Fa\supset Ga)\checkmark$,ass       [$\neg Fa$] [$Ga$]]]]]]]]     \end{forest}      $\neg Fa$ and $Ga$ make the premisses and the negation of conclusion true.     Thus, the entailment is invalid.   \item $\forall x(Fx\supset Gx)\vDash\forall x(\neg Gx\supset\neg Fx)$      \begin{forest}       prooftree       [$\forall x(Fx\supset Gx)$       [$\neg\forall x(\neg Gx\supset\neg Fx)\checkmark$,ass       [$\exists x\neg(\neg Gx\supset\neg Fx)\checkmark$,ass       [$\neg(\neg Ga\supset\neg Fa)\checkmark$,ass       [$\neg Ga$,ass       [$\neg\neg Fa$,ass       [$(Fa\supset Ga)\checkmark$,ass       [$\neg Fa$ [*,ass]] [$Ga$ [*,ass]]]]]]]]]     \end{forest}      Since the tree closes, the entailment is valid.   \item $\forall x\exists yLxy\vDash\forall y\exists xLyx$      \begin{forest}       prooftree       [$\forall x\exists yLxy$       [$\neg\forall y\exists xLyx\checkmark$,ass       [$\exists y\neg\exists xLyx\checkmark$,ass       [$\neg\exists xLax\checkmark$,ass       [$\forall x\neg Lax$,ass       [$\exists yLay\checkmark$,ass       [$Lab$,ass]]]]]]]     \end{forest}      \begin{forest}       prooftree       [$\neg Lab$,ass [*,ass]]     \end{forest}   \item $\forall x((Fx\wedge Gx)\supset Hx)\vDash\forall     x(Fx\supset(Gx\supset Hx))$   \item $(\forall xFx\vee\forall xGx)\vDash\forall(Fx\vee Gx)$   \item $\forall x(Fx\supset Gx),\forall x(\neg Gx\supset Hx)\vDash     \forall x(Fx\supset\neg Hx)$   \item $\exists x(Fx\wedge Gx),\forall x(\neg Hx\supset\neg Gx)\vDash     \exists x(Fx\wedge Hx)$   \item $\forall x\exists y(Fy\supset Gx)\vDash\forall y\exists x(Gx\supset     Fy)$   \item $\forall x\forall y(Lxy\supset Lyx)\vDash\forall xLxx$   \item $\forall x(\exists yLxy\supset\forall zLzx)\vDash\forall x\forall y     (Lxy\supset Lyx)$   \end{enumerate} \end{enumerate} \end{document}   Usually, I have to manually split a forest tree into two to emulate page breaking in a forest tree. However, the second tree doesn't vertically align with the first as in the picture below. How can I vertically align them together? @cfr How can I install Minecraft? I have tried many tutorials but none of them are clear enough. I have also tried installing it using Wine but it won't update and Wine goes gray and stops working.  Does anybody know an easy way to install Minecraft though the Java file without using Wine? What's the deal with the phrase "could care less"?  Whilst growing up, I've always known people (parents etc) to use the phrase "couldn't care less", but I've also come across people who use the phrase "could care less" to mean the same thing (that is, "I do not care at all about that").  To me "couldn't care less" seems a lot more logical. If I couldn't care less about something, that implies I do not care about it at all. In contrast to this, to my mind the phrase "could care less" seems to indicate "I do care about this to some degree at least", but that's definitely not the meaning intended.  What's going on here? Is my (logical) analysis correct or in error? New users who have less than 125 reputation are subject to a , network-wide.  Today, however,  was able to post two questions within 8 minutes of each other, bypassing this rate limit: , and  today. (Both links are 10k-only.)  How was this user able to bypass the network-wide question asking rate limit? (I'd imagine one easy hack would be to exploit a race condition, but if that were the case, the two questions would be posted at exactly the same time, not 8 minutes later.)  Is it because the rate limit only considers the IP address, and not the account, so if the same account makes the post from a different IP address, it's allowed?  This is not a duplicate of , as back when that was asked, the rate limit worked quite differently, and wasn't even enabled on some sites; today, according to the very first link, it is now enabled network-wide. Give each site a parallel site for polling, recommendations and subjective-ish stuff Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com. set css border to end in a 90 instead of a 45 degree angle how to fix ioctl permissions denied error? I searched in lots of websites/forums but did not find a solution for this problem, and this site is last chance, this is problem: This problem have several other users too. my phone is Galaxy S7 Edge , exynos, Oreo 8.0 (Stock ROM), rooted with magisk latest version. root works well in other applications. In pentesting applications like csploit, Network Spoofer, WifiKill and others  root works well(grants permission)  but when start using options of app(for example, arp spoofing, network sniffer, MITM, etc) drops same error: [ERROR] Unable to retrieve local hardware address libnet ( ioctl: Permission denied ) what to do? Can this issue fixed? or exactly which permission is it?  Also one interesting thing, when I installed old version of WifiKill app it worked - killed wifi connection. I've been working on the Android SDK platform, and it is a little unclear how to save an application's state. So given this minor re-tooling of the 'Hello, Android' example:  package com.android.hello;  import android.app.Activity; import android.os.Bundle; import android.widget.TextView;  public class HelloAndroid extends Activity {    private TextView mTextView = null;    /** Called when the activity is first created. */   @Override   public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);      mTextView = new TextView(this);      if (savedInstanceState == null) {        mTextView.setText("Welcome to HelloAndroid!");     } else {        mTextView.setText("Welcome back.");     }      setContentView(mTextView);   } }   I thought it would be enough for the simplest case, but it always responds with the first message, no matter how I navigate away from the app.  I'm sure the solution is as simple as overriding onPause or something like that, but I've been poking away in the documentation for 30 minutes or so and haven't found anything obvious. Why is the ##UserID## parameter not populated in Data Explorer anymore? Environment I'm logging in using the OpenID from  and using Chrome 31.0.1650.57 m if that matters. Steps to reproduce: Log in to  and , for example, like: DECLARE @MyUserID INT = ##UserID:int##  SELECT TOP 1     Id AS [Post Link],     Score AS [Score],     CreationDate AS [Creation Date] FROM     Posts WHERE     OwnerUserId = @MyUserID AND     PostTypeId IN (2, 3) ORDER BY     CreationDate DESC  Then press the Run Query button and see if the UserID field is filled with your own user ID like shown in the below screenshot:  Question: Did something changed on the ##UserID## parameter (for example, that it's not supported anymore)?  If so, then there is an outdated  paragraph about it (What's the point of logging in). If not, it is a bug which is there about three days (I've been waiting since I noticed that you were going to do some changes to Data Explorer, but it remains there, hence my question). I'm assuming that the answer to the question in the title is a resounding yes. Since Baryonic matter and dark matter interact via gravitational forces.  If this is the case how is information not lost if, as is presumed, dark matter does not interact via the electromagnetic force? What happens if Superman is near a white dwarf star? With the Superman lore, we know that light from a yellow star gives him his powers, light from blue stars makes him stronger, and light from red stars weakens him.  However, what happens if he is near a white dwarf, or a neutron star?  Has there been any evidence of Superman visiting a star system that wasn't red/yellow/blue? What do you call a person who started something that is later followed by everyone? For example, someone started to stay late at night till 8 p.m. and later everyone started to stay till 8 p.m.. Math symbol question: Vertical bar for ''evaluated at ...'' Groups of order $pq$ without using Sylow theorems Intuituive reason why Fermats last theorem holds I am unsure of whether it is normal, but to me, intuitively Fermats last theorem should not hold.  If anyone intuitively believed it to be correct, why?     Can someone explain so I understand somewhat why FLT holds without reading a massive and complex proof? Transparent model when exporting fbx file to Unity So I have this shark model which I animated and ready to export it on fbx and transport it to Unity.  But When I put it on Unity, It looks transparent like this.    Many of the solutions online say that the problem is because of my faces, and they told me to recalculate it or something, but normals are just fine. Is there any other solution?  here's the blend file: Prove that for any piecewise smooth curve it is possible to find the parametrisation