Please i want to understand this code, according to my understanding of super in class base programming i know its being used on the base class to access methods and attributes of the base class but here like in this code below   class Base:    def __init__(self,name, age):        self.name = name         self.age = age  class Sub(Base):         def __init__(self,name, age, first_name):         super().__init__(name, age)         self.first_name = first_name   But i cannot understand this code below seeing the super being called on the same class with the init function, what does this mean and how does it affect the program   class MyClass(object): def __init__(self):     super(MyClass, self).__init__()     self.numeric_var = 1
What's the difference between:  class Child(SomeBaseClass):     def __init__(self):         super(Child, self).__init__()   and:  class Child(SomeBaseClass):     def __init__(self):         SomeBaseClass.__init__(self)   I've seen super being used quite a lot in classes with only single inheritance. I can see why you'd use it in multiple inheritance but am unclear as to what the advantages are of using it in this kind of situation.
Can I move Xcode and Android Studio to SD card I'm planning to buy a 64GB SD card to supplement the storage on my MacBook Air 128GB (early 2015)  I wanted to know if I can move my Xcode and android studio to it as both have them take a significant part of the memory.  If this can happen, I wanted to know how can I move these two to the SD card. I'm fairly new to macOS and have no idea how to do this. Deep confusion with conventions and signs in geometric optics This is an equation given in my book.     The question is why have they used a negative sign on the LHS?   Now, if you try to derive the mirror equation with simple geometry, you get  1/v +1/u =1/f . I got that equation without applying any signs there!  So what is the need to apply the signs ‘here'?   If i try to derive this equation ( the one in the photo ) i get the exact answer, but with the positive sign in the LHS. WHY we use the negative sign in the derivation, and then  again we use conventions while solving the questions? If I see an answer that involves some illegal activity, such as breaking license agreements, should I then mark this as Offensive or should I simply down-vote it? do I only get a limited number of at-will powers? Most of the time one or the other feels better, but every so often, "which" vs. "what" trips me up.   So, what's the exact difference and when should you use one or the other? Let $P,Q$ real $n\times n$ matrices  such that $P^2=P$ , $Q^2=Q$ and $I-P-Q$ is an invertible matrix.  Prove that $P$ and $Q$ have the same rank.  Some help with this please , happy year and thanks. How to perform case-insensitive sorting in JavaScript? I would like to take control of my app on an iOS device (mostly an iPhone) from my MacBook Pro or Windows, doesn't matter which one.  I know that it can be accomplished via Veency, and that's exactly what I need - but I do NOT want to jailbreak my iPhone.  Is there a similar legal alternative?  If not - is it something I could develop perhaps, or will I run into some SDK limitations for such a thing? I often cook fries in a skillet. I put about 1/4 cup vegetable oil into a large skillet and heat on high, then I toss in some frozen fries.   As soon as I toss them in there is an explosion of grease that makes a huge mess. After it simmers down though, I can cook the fries without spilling anymore grease.  Is there anyway to avoid the initial uproar? Going through the spells, I see the phrase "Willing creature" used to determine who you can cast some spells on. I don't ever see a proper definition of what a willing creature is, but I would assume that it would go something like if you asked them "Can I perform this spell on you" they would answer yes. Is there a more formal definition of what makes a target willing in 5e?  What are the ways I could make an otherwise unwilling creature willing? Suggestion spells, for instance, should probably work but what other options do I have? I just signed up, a day or two ago, and I've received a notification that there's something in my inbox.  Unfortunately, my email client isn't able to show me a link to my Inbox, or the message, because of the format of the email.  I normally use the email address that I gave when I signed up, just with MailWasher, which is intended to safely preview emails, as plain text, to decide whether or not to open them in a normal HTML email client.  I would be nice if that email contained a link to my inbox, which could be shown in MailWasher.  In order to collect that email in a normal email client, I'd also have to collect or delete all the other emails sent to that address.  I'm not entirely clear what's been done in that email to stop MailWasher seeing the link.  I can see a link to leave feedback, and one to unsubscribe, but not one to check my inbox.  Sure, I can live without one, but those emails would be a lot more useful to me if I could just click a link to go to my Inbox. Headers Including Each Other in C++ I'm a C++ newbie, but I wasn't able to find the answer to this (most likely trivial) question online.  I am having some trouble compiling some code where two classes include each other.  To begin, should my #include statements go inside or outside of my macros?  In practice, this hasn't seemed to matter.  However, in this particular case, I am having trouble.  Putting the #include statements outside of the macros causes the compiler to recurse and gives me "#include nested too deeply" errors.  This seems to makes sense to me since neither class has been fully defined before #include has been invoked.  However, strangely, when I try to put them inside, I am unable to declare a type of one of the classes, for it is not recognized.  Here is, in essence, what I'm trying to compile:  A.h  #ifndef A_H_ #define A_H_  #include "B.h"  class A {     private:         B b;      public:         A() : b(*this) {} };  #endif /*A_H_*/   B.h  #ifndef B_H_ #define B_H_  #include "A.h"  class B {     private:             A&amp; a;      public:         B(A&amp; a) : a(a) {}  };  #endif /*B_H_*/   main.cpp  #include "A.h"  int main() {     A a; }   If it makes a difference, I am using g++ 4.3.2.  And just to be clear, in general, where should #include statements go?  I have always seen them go outside of the macros, but the scenario I described clearly seems to break this principle.  Thanks to any helpers in advance!  Please allow me to clarify my intent if I have made any silly mistakes! WPF textblock binding with List does anyone know if there is a simple way to bind a textblock to a List. What I've done so far is create a listview and bind it to the List and then I have a template within the listview that uses a single textblock.  what I'd really like to do is just bind the List to a textblock and have it display all the lines.  In Winforms there was a "Lines" property that I could just throw the List into, but I'm not seeing it on the WPF textblock, or TextBox.  Any ideas?  did I miss something simple?  Here's the code  &lt;UserControl x:Class="QSTClient.Infrastructure.Library.Views.WorkItemLogView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"          Width="500" Height="400"&gt; &lt;StackPanel&gt;     &lt;ListView ItemsSource="{Binding Path=Logs}" &gt;         &lt;ListView.View&gt;             &lt;GridView&gt;                 &lt;GridViewColumn Header="Log Message"&gt;                     &lt;GridViewColumn.CellTemplate&gt;                         &lt;DataTemplate&gt;                             &lt;TextBlock Text="{Binding}"/&gt;                         &lt;/DataTemplate&gt;                     &lt;/GridViewColumn.CellTemplate&gt;                 &lt;/GridViewColumn&gt;             &lt;/GridView&gt;         &lt;/ListView.View&gt;     &lt;/ListView&gt; &lt;/StackPanel&gt;     and the WorkItem Class  public class WorkItem {     public string Name { get; set; }     public string Description { get; set; }     public string CurrentLog { get; private set; }     public string CurrentStatus { get; private set; }     public WorkItemStatus Status { get; set; }     public ThreadSafeObservableCollection&lt;string&gt; Logs{get;private set;}   I'm using Prism to create the control and put it into a WindowRegion          WorkItemLogView newView = container.Resolve&lt;WorkItemLogView&gt;();         newView.DataContext = workItem;         regionManager.Regions["ShellWindowRegion"].Add(newView);   thanks Edges on an even number of Hamilton cycles Suppose $f(x)$ is an irreducible polynomial over $\mathbb Z$ of degree $n$. Is it always the case that there exist distinct $x_1,\ldots,x_{2n+1}\in \mathbb Z$ such that $f(x_1),\ldots,f(x_{2n+1})$ are all prime?  So far I've tested a few irreducible polynomials using mathematica, and this has held. The motivation is to use this as a test for irreducibility, as if $f(x)$ is not irreducible then it takes on at most $2n$ prime values, as either factor takes on $1$ or $-1$ at most $2n$ times. (I'd also be interested in learning if this bound can be improved).  This could potentially be expended to other rings of integers, i.e. $\mathbb Z[i]$, but in that case the minimal number of primes needed to certify that $f(x)$ is irreducible would increase as more units appear. I'm new here. Can anyone give me a hint in this problem? Please.  Let $X$ be a topological space. If $f,g$ are continuous function of $f,g\colon X\to S^n$  which $f(x)\neq -g(x)$ for all $x$ in $X$, show $f$ and $g$ are homotopics. I try to show a homotopy using $$q(x) = \frac{f(x)+g(x)}{\|f(x)+g(x)\|}$$ it's well defined, but i'm stuck. “...than I am” vs. “...than me” I read an English grammar article in which the author talked about the correct use of pronouns.  He writes:     If the extended sentence is “She’s more likely to ask him than I am,” in which the comparison is between the subject and the writer, I is correct. However, if the intent is to convey that the man referred to as him is more likely to be asked something by the subject than the writer is, the correct pronoun form is me, but that distinction should be clarified with a revision like “She’s more likely to ask him than ask me.”   Before reading this piece, I thought that the two sentences had the same meaning. While the second example is quite clear for me (“She’s more likely to ask him than ask me”), I don't think that I have correctly understood the first one. Could anyone explain it to me, please? Why is it true that $\mathrm{adj}(A)A = \det(A) \cdot I$? What is the relationship between the focal length and field of view for an equal-area ("equisolid") projection fisheye lens?  Alternatively, what is the relationship between the 180-degree image circle size and the focal length for such a lens?  Ultimately I want to find the field of view of a Tokina 10-17 mm fisheye zoom at focal lengths other than 10 mm on APS-C (). How do you test that a Python function throws an exception? How does one write a unittest that fails only if a function doesn't throw an expected exception?