The following:  bpy.data.objects['Cube'].select = True  bpy.context.scene.objects.active = bpy.data.objects['Sphere.017']   don't work in Blender 2.8, they did in 2.79 though. How should I select (multiple) objects with Python in Blender 2.8?

I'm new at scripting.  I know that it's a basic question but I tried everything I could and nothing works.  So here's my problem:  I want to create a shortcut that automatically sets up a mirror modifier to an empty and then my custom pie menu opens with extra modifier options.  The only problem is that the menu will show me the option only of the selected object, and in my series of code I'm stuck at selecting the empty. I just want to select the object I defined as "OB" and it's done.  Here is the code:   import bpy  OB = bpy.context.selected_objects[0] bpy.ops.object.modifier_add(type='MIRROR') bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.empty_add(type='PLAIN_AXES', view_align=False, location=(bpy.context.scene.cursor_location)) bpy.context.object.name = "Mirror Axes" OB.modifiers["Mirror"].mirror_object = bpy.data.objects["Mirror Axes"]  # HERE I NEED THE CODE THAT SELECTS "OB"  open_menu("D Mirror Menu")   I tried:    bpy.context.scene.objects.active = OB  OB.select = True  bpy.context.selected_objects[0] = OB   bpy.context.object = OB    And many other methods, but nothing works, the empty is still selected !! and I dont know why.  thanks


Consider $b$ - set of the upper triangular matrices, and $n \subset b$ $n$ - of strictly triangular upper matrices (zero diagonal) What form of $b / n$? We already know that $b$ is a subalgebra of $gl (n, F)$ and that n is ideal for b, so: $b / n = \{x + n | x \in b \} $, but, $ x = n_1 + d_1 $ with $ n_1 \in n $ and $ d_1 \in d $, hence $ b / n = \{x + n | x \in b \} = \{(n_1 + d_1) + n  |  n_1 \in n , d_1 \in d \} = \{d_1 + n |  d_1 \in d \} $ is correct?

Please help me to identify the Quotient Ring of $T/I$, since $T$ is set of all triangular matrices, and $I$ is set of all strictly triangular matrices and $I$ is ideal in $T$.  For your help I am really appreciate. thanks


I am familiar with the fact that $\displaystyle{\frac{dx}{dt}}=v$, $\displaystyle{\frac{dv}{dt} =a}$, and $\displaystyle{\frac{da}{dt}=J}$ where $J$ denotes the 'jolt', or jerk. Are further derivatives of position named, or is that basically as far as it goes, insofar as special names are concerned? Is there a name for the 4th derivative of position w.r.t time, for example?   Analogous to that question, we have that $\displaystyle{p=mv}$, $\displaystyle{F=ma}$, and $\displaystyle{Y=mJ}$, where $Y$ is the "yank." (I just found out about the 3rd derivative names today, which is the primary motivation for this question.)  $Mx$, mass times position, seems kind of meaningless and arbitrary, but maybe I'm wrong about that.

Could somebody give me an intuitive physical interpretation of higher order derivatives (from 2 and so on), that is not related to position - velocity - acceleration - jerk - etc?


Let $f: \mathbb C \to \mathbb C$ be holomorphic such that there exist $a,b \in \mathbb C$ , linearly independent over $\mathbb R$ such that $f(z)=f(z+a)=f(z+b) , \forall z \in \mathbb C$ . Then is it true that $f$ is constant ?

Let $f: \Bbb C \to \Bbb C$ be an entire (analytic on the whole plane) function such that exists $\omega_1,\omega_2 \in \mathbb{S}^1$, linearly independent over $\Bbb R$ such that: $$f(z+\omega_1)=f(z)=f(z+\omega_2), \quad \forall\,z\in \Bbb C.$$Prove that $f$ is constant.   The intuition seems clear to me, we have the three vertices of a triangle given by $0$, $\omega_1$ and $\omega_2$. All points in the plane are one of the vertices of that triangle under a suitable parallel translation. The constant value will be $f(0)$, fine. Throwing values for $z$ there, I have found that $$f(n\omega_1) = f(\omega_1) = f(0)=f(\omega_2) = f(n\omega_2), \quad \forall\, n \in \Bbb Z.$$  I don't know how to improve the above for, say, rationals (at least). Some another ideas would be:   Checking that $f' \equiv 0$. I don't have a clue of how to do that. Write $w = a\omega_1+b\omega_2$, with $a,b \in \Bbb R$, do stuff and conclude that $f(w) = f(0)$. This approach doesn't seem good, because I only have a weak result with integers above. Finding that $f$ coincides with $f(0)$ on a set with an accumulation point. This seems also bad: the set on with $f$ coincides with $f(0)$ by which I found above is discrete.    Nothing works and this is getting annoying... And I don't see how analyticity comes in there. I'll be very thankful if someone can give me an idea.  (On a side note.. I know that this title is not informative at all. Feel free to edit if you come up with something better.)


Transform the following differential equation using new coordinates $y = x$ and $s = \log(t)$ $$2t^2\ddot x + 3t\dot x + xe^{-t} = 2/t $$  Now I understand $\tau(s) = t$ and $s = \sigma(t)$ as well as $\eta(t,x) = y$  but I have only performed a coordinate transformation for first order equations. How is this extended to 2nd order?  I am looking simply for the transformed function, not the solution  I assume you start with taking the second partial derivatives of the coordinates transformations, but any clarity would be great!

If someone could help me with the proposed change of variables, it would be greatly appreciated. Consider Euler's equation:  $$z^2w'' + \alpha zw' + \beta w = 0$$  where $w$ is a function of $z$ and $\alpha, \beta$ are constants. How would the change of variables $t =\ln(z)$ transform this equation?


Hello there,  I search for a way to play audio files in Python in real time and with as less code as possible. I tried to use a gstreamer-command to play a pre-recorded sinewave:  os.system('gst-play-1.0 sine_wave.mp3')   But this solution is trash, as it must first load the media file and therefore has a 2 seconds latency before playing the sound. In this time, the program run stops. I search for a solution that can play sounds right away when called in the program and does not have an impact to the fluid run of it. So it should be capable of playing the sound multiple times in a second. Any ideas?  Thanks for the answers in advance!

How can I play audio (it would be like a 1 second sound) from a Python script?  It would be best if it was platform independent, but firstly it needs to work on a Mac.  I know I could just execute the afplay file.mp3 command from within Python, but is it possible to do it in raw Python? I would also be better if it didn't rely on external libraries.


Let $(x_n)$ be a sequence of reals. Show that if every subsequence $(x_{n_k})$ of $(x_n)$ has a further subsequence $(x_{n_{k_r}})$ that converge to $l$, then $(x_n)$ converge to $l$.   I know the fact that subsequence of $(x_n)$ converge to the limit same as $(x_n)$ does, but I'm not sure if I can apply this.  Thank you.

Is the following true? Let $x_n$ be a sequence with the following property: Every subsequence of $x_n$ has a further subsequence which converges to $x$. Then the sequence $x_n$ converges to $x$.  I guess that it is true but I am not sure how to prove this.


I am writing/reading from serial port with my java fx application. All is fine until I read the data from port. Once I received the data I pass it to the method thats located in my controller for processing. After passing the data to the method in controller I am trying to assign it into my textboxes but it throws NPE exception. I even tried with  Platform.runLater() but still gives me the same NPE message. Any help please?  //Serial data reader @Override public void serialEvent(SerialPortEvent event) {     if (event.getEventType() != SerialPort.LISTENING_EVENT_DATA_RECEIVED)         return;     packet = event.getReceivedData();     // Also tried this myController.processData(packet); Still NPE     Platform.runLater(()->     {         settingsController.processData(packet);     }); }   //The method in myController  @FXML private JFXTextField dataTextField;  public void processData(int[] packet) {              dataTextField.textProperty().setValue(String.valueOf(packet[2]));  //Here it throws NPE due to dataTextField             //dataTextField.textProperty().setValue(String.valueOf(5)); Also tried  a dummy value to find out if it is text field or the packet data. I confirmed it is NPE of dataTextField             //I also tried this .Still the NPE. Also tried with combobox. so no hope              Platform.runLater(()->             {                 dataTextField.textProperty().setValue(String.valueOf(packet[2]));               });  }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I've been reading , and I'm wondering if there is a way to generate an RSA private/public key-pair based on some cryptographically secure input, so that if the input stays the same we keep getting the same key pair on the output.  The linked web-site uses elliptic curve cryptography to achieve this property.  Is it not possible with RSA?

I see a lot of Q/A where persons are trying to generate a specific key pair using static data such as a password. Now say we use a known PRNG (dangerous assumption), seeded with a the data as a static seed, would this always generate the same key pair?  I presume it would generate the same key pair if you would use the exact same generation method - the application would be deterministic. I would however expect differences between implementations. The random data could be used differently, the sizes of p and q could differ and there may be subtle differences when choosing the prime numbers themselves.


Suppose that a particle is in uniform circular motion and the magnitude of the centripetal component of the net force increases. Does this increase the tangential speed or decrease the radius of the circular path? One case that comes to mind is moving a ball attached to a string, moving in a circle. In that case, the radius cannot decrease as centripetal force would disappear. But what if the source is the gravitational or electrostatic force?

Will an object be pulled towards the centre linearly if the net force provided for a circular motion is larger than the required centripetal force? And why?  For example, if the object in a circular motion which is connected by a string is pulled towards the centre by hand.


I'm trying to prove that Euler's $\phi$ function is multiplicative i.e. $\phi(mn) = \phi(m)\phi(n)$ when m and n are coprime. A key step in the proof is this: $A = \{a \mid 1 ≤ a < m, \gcd(a, m) = 1\}$ $B = \{b\mid  1 ≤ b < n, \gcd(b, n) = 1\}$ $C = \{c \mid 1 ≤ c < mn, \gcd(c, mn) = 1\}.$ Then we have that |A| = φ(m), |B| = φ(n), and |C| = φ(m × n). I need to show that C has equally many elements as the set A × B = {(a, b) | a ∈ A, b ∈ B}, from which the claim follows. By using the Chinese remainder theorem by which the mapping $\mathbb{Z}_{mn} → \mathbb{Z}_m × \mathbb{Z}_n$, is bijective in case of m and n coprime. Now it should be enough to prove that $A ⊂ \mathbb{Z}_{m}$, $B ⊂ \mathbb{Z}_n$, and $C ⊂ \mathbb{Z}_{mn}$. I'm not able to prove it. Could you clarify what's the relation between the sets A,B, and C and the quotient set $\mathbb{Z}_{x}$?

That is,     why is $\varphi(AB)=\varphi(A)\varphi(B)$, if $A$ and $B$ are two coprime positive integers?   It's not just a technical trouble—I can't see why this should be, intuitively: I bellyfeel that its multiplicativity should be an approximation at most. And why the minimum value for $\varphi (n)$ should be $ \frac{4n}{15} $ completely passes me by.


I was wondering if someone could please explain how a Gee-haw whammy diddle works. I have linked the Wikipedia page that does include an explanation that I don't completely understand, i.e. could you please give a fairly layman explanation as to how it works.  Also, I would appreciate if you could explain why you can change the direction of the spinning ect.

In the  the person cuts 6 grooves on a wooden pencil and mounts a paper propeller using a pin on the soft eraser side.  As he starts rubbing the groves vigorously, the paper propeller starts spinning clockwise.  The mysterious thing is this: torque is generated on the paper from just translational motion (the rubbing of the grooves)! Where does this torque come from?! My current hypothesis is that the pencil traces a small circle if you hold it with your hand while rubbing the grooves, but I've disproved this theory when I mounted a replicated device on a clamp and performed the rubbing - the rotations still happens! I've ran computer simulations on this and have yet to determine the origins of the torque, which means the torque generation lies in non-ideality. An ideal system will dissipate the vibrational energy perfectly, generating no torque.  How can sound waves in a wooden media generate any torque as it leaves through a pivoted rigid body (the paper propeller)?  Can anyone shed some insights to a theory of how this motor works, and provide quantative/numerical solutions to this problem?  A numerical solution that quantizes all relevant parameters would be extremely helpful to explain this mysterious phenomena!  P.S. IMPT: Please provide numerical solutions to back your theory up! Please do not just provide qualitative solutions!  My current sentiments: It has something to do with acoustics which may tell us the efficiency of energy transfer to propeller and an non-ideality which generates torque, however the latter mechanism of origin of the torque remains shrouded in mystery.


I have the following Python script (in Jupyter) which is supposed to extract address information using regex (unit numbers are already cleaned up and street types are abbreviated before this step):  type_opts = r"Terrace|Way|Walk|St|Rd|Ave|Cl|Ct|Cres|Blvd|Dr|Ln|Pl|Sq|Pde" road_attrs_pattern = r"(?P<rd_no>\w?\d+(\-\d+)?\w?\s+)(?P<rd_nm>[a-zA-z \-]+)(?#\s+(?P<rd_tp>" + type_opts + ")" print("Road Attr Pattern: ", road_attrs_pattern) road_attrs = re.match(road_attrs_pattern, proc_addr) road_num = road_attrs.group('rd_no').strip() print("Road number: ", road_num) road_name = road_attrs.group('rd_nm').strip() print("Road name: ", road_name) road_type = road_attrs.group('rd_tp').strip() print("Road type: ", road_type)   I'm using this address:  Burrah lodge, 15 Anne Jameson Pl   This results in the following print-out:  Road Attr Pattern:  (?P<rd_no>\w?\d+(\-\d+)?\w?\s+)(?P<rd_nm>[a-zA-z \-]+)(?#\s+(?P<rd_tp>Terrace|Way|Walk|St|Rd|Ave|Cl|Ct|Cres|Blvd|Dr|Ln|Pl|Sq|Pde)   But then throws an error saying the street number is not available AttributeError: 'NoneType' object has no attribute 'group'.  However a copy-paste in Regex101  says it should work, and looking over the Regex it's my view that it should work also...  It should print-out the following:  Road Attr Pattern:  (?P<rd_no>\w?\d+(\-\d+)?\w?\s+)(?P<rd_nm>[a-zA-z \-]+)(?#\s+(?P<rd_tp>Terrace|Way|Walk|St|Rd|Ave|Cl|Ct|Cres|Blvd|Dr|Ln|Pl|Sq|Pde) Road number: 15 Road name: Anne Jameson Road type: Pl

What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.


Everytime I use my terminal, I am always put into the dash shell instead of bash. Is there any way to change this even just for my user only? Tried apt-alternatives but setting the default shell can't be found.   I am using Debian Jessie testing btw.

I was surprised that I didn't find this question already on the site. So, today $ came up after I logged in as a new user. This was unexpected because my main user's prompt starts with username@computername:~$.  So, how do I switch from this other shell to bash?


I bought a laptop and now I received an hard drive failure message. It still works for now but I think it wont last very long. What do I have to do in order to install windows 8 on another hard drive since I don't have any install disk ?

I obtained a licence key for Windows 8 through DreamSpark. Is there a way to download a Windows 8 ISO image like you could for Windows 7? I am on a non-Windows machine, so I cannot use the Secure Download Manager to download Windows 8 directly using DreamSpark.


My husband was laid off from his job and he had an FSA healthcare account.  The account shows there is over $600 available.  What happens to that money now that he's laid off and no longer worker for the employer?

I am about to decide how much money to set aside for my 2013 Flexible Spending Account (FSA). (The max this year is $2500.) But I am wondering what happens if I switch employers during the year. Does the FSA from one employer somehow roll over to the new employer? Is it completely separate? Consider a couple possible scenarios. Scenario A Separate FSAs. I spent my entire election. I elect to put $2000 in my FSA. I spend all $2000 in the first four months of 2013. In July I start a new job for a new employer. It's midway through the year so they have only taken $1000 out of my weekly paychecks. Q1: Do they take $1000 out of my final paycheck? Q2: How much can I elect to put in the FSA at the new employer? (Can I bump it up to the $2500 limit?) Scenario B Separate FSAs. I underspent all my election. I elect to put $2000 in my FSA. I spend $600 in the first four months of 2013. In July I start a new job for a new employer. It's midway through the year so they have only taken $1000 out of my weekly paychecks. Q1: Do they take $1000 out of my final paycheck? Q2: Do I lose any of the unspent $1400? Q3: How much can I elect to put in the FSA at the new employer? (Can I bump it up to the $2500 limit?) Scenario C Coupled FSAs. I elect to put $2000 in my FSA. I spend $600. They have taken $1000 out of my paychecks. All that info somehow makes it to my new employer so they give me credit for having $400 in my FSA. Over the rest of the year they plan to take the remaining $1000 out of my paycheck. Q1: Am I allowed to make an upward/downward adjustment in my election amount?  (Can I bump it up to $2500? Can I bring it down to say $1500?) So many possibilities! Can anyone shed some light on how this works?


Does a HDD lying in my desk degrade with age (or is its service life driven only by usage)?  If yes, are there publicly available statistics relating to any drive degradation when inactive for long periods, or engineering principles from which reliable estimates could be derived?

Do you guys know how much time needs to pass until the data stored on a hard drive starts to degrade?   To keep the data intact for long periods of time, I heard you need to periodically rewrite it on the hard drive, like every 5 years or so. Is it true?


Is this sentence gramatically correct?     We think it's time everyone had access to the means of media production so we have developed a set of tools for it.   Or should I use has instead?     We think it's time everyone has access to the means of media production so we have developed a set of tools for it.   Does it affect the meaning?

Why do we use the simple past but not the present or future in the following expressions:  Don't you think it's time we went a little further Don't you think it's time we ate Don't you think it's time we went home


We define the functions $\sin{x}$ and $\cos{x}$ as follows: $ \sin{x} = \sum_{k=0}^{\infty}{\frac{(-1)^kx^{2k+1}}{(2k+1)!}}$ $ \cos{x} = \sum_{k=0}^{\infty}{\frac{(-1)^kx^{2k}}{(2k)!}}$ Using this fact show that: (i) $(\cos{x})^\prime = -\sin{x}$ (ii) $\sin^2{x} + \cos^2{x} = 1$ I've seen proofs on these using other methods but not sure how to arrive at the same conclusion using the definition of the functions stated above. I managed to proof $(\sin{x})^\prime = \cos{x}$ by: $ \sin{x}^\prime = \frac{d}{dx}\sum_{k=0}^{\infty}{\frac{(-1)^kx^{2k+1}}{(2k+1)!}}$  = $\sum_{k=0}^{\infty}{\frac{(-1)^kx^{2k}}{(2k)!}}$ = $\cos{x}$ But when I tried to differentiate $\cos{x}$, I got stuck here: $ \cos{x}^\prime = \frac{d}{dx}\sum_{k=0}^{\infty}{\frac{(-1)^kx^{2k}}{(2k)!}}$ = $\sum_{k=0}^{\infty}{\frac{(-1)^kx^{2k-1}}{(2k-1)!}}$, which is not exactly $-\sin{x}$

We all know that the following (hopefully):  $$\sin(x)=\sum^{\infty}_{n=0}(-1)^n \frac{x^{2n+1}}{(2n+1)!}\ , \ x\in \mathbb{R}$$  $$\cos(x)=\sum^{\infty}_{n=0}(-1)^n \frac{x^{2n}}{(2n)!}\ , \ x\in \mathbb{R}$$  But how do we find the derivates of $\sin(x)$ and $\cos(x)$ by using the definition of a derivative and the those definition above?  Like I should start by doing:  $$\lim_{h\to\infty}\frac{\sin(x+h)-\sin(x)}{h}$$  But after that no clue at all.  Help appreciated!


I do understand and am able to reproduce the steps to proove that $$1+2+3+...=-\frac{1}{12}$$ as, for example, shown in the .  I can proove it, but I can't understand it. My brain is unwilling to accept that a series $a = \sum_{i = 1}^{n}i$ with $n \rightarrow \infty$ evaluates to $-\frac{1}{12}$.  So what does it mean? I have two ideas:   Human logic and math is not coherent, so this is an edge case that is not covered. The logic of the universe is not coherent, e.g. a bug / incomplete feature of reality. $-\frac1{12}$ has some deeper meaning we do not know yet.   None of these points seem believable, so I am thinking that my understanding of this kind of Math might be too limited. Maybe you can enlight me?  Also please edit this question if you see mistakes, I am fairly new and definitley not a mathematician. I only know LaTex, that's all.

This is not a duplicate question because I am looking for an explanation directed to a general audience as to the mistakes (if any) in  (reproduced below). (Numberphile is a YouTube channel devoted to pop-math and this particular video has garnered over 3m views.)   By general audience, I mean the same sort of audience as the millions who watch Numberphile. (Which would mean, ideally, making little or no mention of things that a general audience will never have heard of - e.g. Riemann zeta functions, analytic continuations, Casimir forces; and avoiding tactics like appealing to the fact that physicists and other clever people use it in string theory, so therefore it must be correct.)  Numberphile's Proof.  The proof proceeds by evaluating each of the following:  $S_1 = 1 - 1 + 1 - 1 + 1 - 1 + \ldots$   $S_2 = 1 - 2 + 3 - 4 + \ldots $   $S = 1 + 2 + 3 + 4 + \ldots $   "Now the first one is really easy to evaluate ... You stop this at any point. If you stop it at an odd point, you're going to get the answer $1$. If you stop it at an even point, you get the answer $0$. Clearly, that's obvious, right? ... So what number are we going to attach to this infinite sum? Do we stop at an odd or an even point? We don't know, so we take the average of the two. So the answer's a half."   Next:  $S_2 \ \ = 1 - 2 + 3 - 4 + \cdots$  $S_2 \ \ = \ \ \ \ \ \ \ 1 - 2 + 3 - 4 + \cdots$  Adding the above two lines, we get:  $2S_2 = 1 - 1 + 1 - 1 + \cdots$  Therefore, $2S_2=S_1=\frac{1}{2}$ and so $S_2=\frac{1}{4}$.  Finally, take  \begin{align} S - S_2 & = 1 + 2 + 3 + 4 + \cdots           \\ & - (1 - 2 + 3 - 4 + \cdots)          \\ & =   0 + 4 + 0 + 8 + \cdots           \\ & = 4 + 8 + 12 + \cdots           \\ & = 4S \end{align}  Hence $-S_2=3S$ or $-\frac{1}{4}=3S$.  And so $S=-\frac{1}{12}$. $\blacksquare$


Find the $n^{th}$ derivative of $$f(x) = e^x\cdot x^m$$  If i am not wrong i have following  $1^{st}$ Derivative: $e^x\cdot m \cdot x^{m-1} + x^m\cdot e^x$  $2^\text{nd}$ Derivative: $e^x\cdot m \cdot (m-1)\cdot x^{m-2} + 2 \cdot e^x\cdot m \cdot x^{m-1} + x^m\cdot e^x$  $3^\text{rd}$ Derivative: $e^x\cdot m \cdot (m-1) \cdot (m-2)\cdot x^{m-3} + 3 \cdot e^x \cdot m \cdot (m-1) \cdot x^{m-2} + 3 \cdot e^x \cdot m \cdot x^{m-1} + \cdot x^m \cdot e^x$  From here how do I calculate the $n^{th}$ derivative?  Thanks. :)

Find the $n^{th}$ derivative of $$f(x) = e^x\cdot x^n$$  If i am not wrong i have following  $1^{st}$ Derivative: $e^x\cdot n\cdot x^{n-1} + x^n\cdot e^x$  $2^\text{nd}$ Derivative: $e^x\cdot n\cdot (n-1)\cdot x^{n-2} + 2 \cdot e^x\cdot n\cdot x^{n-1} + x^n\cdot e^x$  $3^\text{rd}$ Derivative: $e^x\cdot n\cdot (n-1)\cdot (n-2)\cdot x^{n-3} + 3 \cdot e^x\cdot n \cdot (n-1)\cdot x^{n-2} + 4 \cdot e^x \cdot n \cdot x^{n-1} + 2 \cdot x^n\cdot e^x$  From here how do I calculate the $n^{th}$ derivative?  Thanks. :)


Edit: I think the issue is not with concatenation itself but the special character in the id of the element I am trying to select. Original: I am having problem with concatenating two strings. It seems the problem is because one of the strings contains '!'. Sadly, I have no control over what that string can contain. I tried using '+' to make single string of the two before I tried concat(). But the error remains the same. The relevant code is $('#id_online_status_'.concat(msg.id)).removeClass('text-success').addClass('text-muted'); Error is this: Uncaught Error: Syntax error, unrecognized expression: #id_online_status_specific.YqzvRnpU!OPMxkuoFQILY Please help with fixing this. I am not much familiar with JS in general.

When creating the id attributes for HTML elements, what rules are there for the value?


I have Ubuntu 14.10 thats dual booted (with windows 7) with 6 GB of RAM and i want to delete the swap partition without having any errors when booting into Ubuntu if its possible how?  BTW my Linux swap is taking about 5 GB and thats a lot.

I am running Ubuntu 12.04 on a 64-bit HP laptop with a 16 GB flash drive. I do not have a working hard drive right now. When I installed Ubuntu, I created a 2 GB swap partition on sdb1. I have since learned that swap partitions are generally a bad idea on flash drives, so I would like to use my swap space for my other partitions. You can see my partition scheme in the link below.    I have read that I just have to comment sdb1 out of the fstab file, boot from a GParted live CD, select swapoff for sdb1, delete/merge with other partition, and everything's good.  But, I've also read that messing with sdb1 can change the UUID of sdb2 or sdb3 and cause problems. Is this true? Does initramfs use swap at all?  Also, when I get Ubuntu running on my laptop with an internal hard drive, does the swap partition help that much? I have 6 GB of DDR3. Does the rule of 1.5xActual RAM still apply? It seems like quite a bit to me.  Thanks for the help!  UPDATE: I have removed swap. The process I followed is:   Right click swap partition in GParted and selected swapoff. Used # to comment the swap partition out of fstab. I tried to boot from a live GParted CD, but I kept getting an error, so I ran GParted in Ubuntu. Deleted swap partition in GParted. Unmounted /windows. Expanded /windows to take the remaining space. Mounted /windows.   The / and /windows partitions each kept their own names and UUIDs, and everything is running fine. I have never seen any swap space being used before, and I don't intend to use the hibernate function, so I think removing swap was a good idea.


I have spent a while trying to track this shot. I am very new to blender camera tracking, though. Even though most of my trackers are doing a good job of staying on target, I am still getting large reprojection errors. I'm getting a solve error of around six, and it's getting to be pretty frustrating. I just don't know how to make my track better, and I'm tired of wasting time. I have attached the .blend file (I am using version 2.93) as well as the video file. If you could take a look and give me some feedback, that would be really helpful! I just want to get better at motion tracking! Let me know if I need to provide any more information. Thanks!

Whenever I do camera tracking in Blender the reconstruction is always zooming out or not on the axis. I have a great quality camera, but the end results of the camera tracking always has the model sliding. If you have a solution please tell me.


Is there a way to declare first and then initialize an array in C?  So far I have been initializing an array like this:  int myArray[SIZE] = {1,2,3,4....};   But I need to do something like this  int myArray[SIZE];  myArray = {1,2,3,4....};

I have a large array in C (not C++ if that makes a difference). I want to initialize all members of the same value.  I could swear I once knew a simple way to do this. I could use memset() in my case, but isn't there a way to do this that is built right into the C syntax?


I have a list of commands in a file called cmds, one command per line.  I want to grab the last command, set it in a variable last_command and run it later. with $last_command or "$last_command", or whatever is more appropriate.  I start by getting the last command:  $ last_command="$(cat cmds | tail -1)" $ echo $last_command cat file1 file2 file\ 3   The last line of cmds was cat cat file1 file2 file\ 3.  The problem is, when I run "$last_command", it will not know that the space between file and 3 is part of the file name and give me an error.

$ ls -l /tmp/test/my\ dir/ total 0   I was wondering why the following ways to run the above command fail or succeed?  $ abc='ls -l "/tmp/test/my dir"'  $ $abc ls: cannot access '"/tmp/test/my': No such file or directory ls: cannot access 'dir"': No such file or directory  $ "$abc" bash: ls -l "/tmp/test/my dir": No such file or directory  $ bash -c $abc 'my dir'  $ bash -c "$abc" total 0  $ eval $abc total 0  $ eval "$abc" total 0


Some explanations:  A set S is  if there exists an injective function $f$ from $S$ to the natural numbers ($f:S \rightarrow \mathbb{N}$).  $\{1,2,3,4\}, \mathbb{N},\mathbb{Z}, \mathbb{Q}$ are all countable.  $\mathbb{R}$ is not countable.  The  $\mathcal P(A) $ is defined as a set of all possible subsets of A, including the empty set and the whole set.  $\mathcal P (\{\})=\{\{\}\}, \mathcal P (\mathcal P(\{\}))=\{\{\}, \{\{\}\}\} $  $\mathcal P(\{1,2\})=\{\{\}, \{1\},\{2\},\{1,2\}\}$  My question is:  Is $\mathcal P(\mathbb{N})$ countable? How would an injective function $f:S \rightarrow \mathbb{N}$ look like?


So I'm about halfway through my Sophomore year of college at LSU and on my way to a major in Mathematics with about a 4.05 GPA so far. My main objective is to be a desirable candidate for a good grad program. It doesn't really have to be a super top-tier school, but I wouldn't like to do a grad program in Mathematics at a school like LSU; I would like it to be a higher tier than that. I understand that my GPA and internships/work experience in my field are the two most important things for my major. So far, I haven't done any extracurriculars at all during the semester and worked at a summer camp the summer after my Freshman year. I plan on doing a math-related internship this summer. So, how important are extracurriculars during the semester? I find myself not having as much free time as I'd like when school is in session, so I held off on them. Is it important that I do something such as a community service group (which would be my main extracurricular interest) in order to make myself more desirable as a grad candidate? Thanks

And if they should, I assume that these things should go on a resume under something like "Activities and Community Service". I mean I consider being able to sight read music to play at my Church as a significant feat (how many people can do that?) and might sway one person on an admissions committee if he or she enjoys music and understands how hard one must have worked to accomplish this.   Badminton?.... perhaps not so much


I've found .  New items are in my comments ....  I have got amd-driver-installer-catalyst-15-20.1046-x86.x86_64.run in my Downloads folder ready to run, but when I'm trying to issue the command sh amd-driver-installer-catalyst-13-4-x86.x86_64.run --buildpkg Ubuntu/trusty, it does not want to run it. I have the error message:  sh: 0: Can't open amd-driver-installer-catalyst-15-20.1046-x86.x86_64.run   Can someone explain me what to do?

I am planning on doing a fresh install of Ubuntu and want to know what is the correct way to install ATI Catalyst Video Driver?      There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience an index of each below:


Why does telecommunications equipment in the field (e.g. a BTS site) run on -48V? What is the advantage of running it at a voltage lower than ground rather than using a positive voltage?

It seems common that PBX and other telephone hardware use a positive-ground power supply, where the "hot" line is at -48v.  What's the reason for that?


I use relative comparison as it described . I have two doubles. The first of them is result of computation:  double d1(callComputation() );   The second is defined as following:  double d2(0.009);   My realization of approximatelyEqual returns false and it is right because:        std::printf("d1 = %25.20f\n", d1);   prints:  d1 =    0.00900000000000011902   and         std::printf("d2 = %25.20f\n", d2);   prints:  d2 =    0.00899999999999999932   I expected the d2 will be represented approximately as follows:  0.00900000000000011239 or 0.00900000000000000000 etc    and the result of comparison of d1 and d2  will be true. But even approximatelyEqual doesn't work proper. How should I compare in such cases? I don't need high precision of computations but obviously I'm interested in the stability of computation results. Maybe fixed amount of digits after point (for instance two) will help to fix this problem?

What would be the most efficient way to compare two double or two float values?  Simply doing this is not correct:  bool CompareDoubles1 (double A, double B) {    return A == B; }   But something like:  bool CompareDoubles2 (double A, double B)  {    diff = A - B;    return (diff < EPSILON) && (-diff < EPSILON); }   Seems to waste processing.  Does anyone know a smarter float comparer?


I am working on a server Ubuntu 16.04 in which is installed MySQL 5.7.31. I have a trouble about paste a unicode character like ù or à in the console of MySQL. What kind of check I can do to solve this issue? Many thanks.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


Hello StackOverflow users. This is related to the Java instead of the robot itself. What i was trying to do is to seperate the sensors from the movement methods to make the code easily readable, but I've ran into one problem.  Sensor.java  package sensors;  import lejos.hardware.sensor.EV3ColorSensor; import lejos.hardware.sensor.EV3GyroSensor; import lejos.hardware.sensor.EV3TouchSensor; import lejos.hardware.sensor.EV3UltrasonicSensor;  public class Sensors {      EV3TouchSensor touchSensor;     EV3ColorSensor colorSensor;     EV3GyroSensor gyroSensor;     EV3UltrasonicSensor ultrasonicSensor;      public Sensors(EV3TouchSensor t, EV3ColorSensor c, EV3GyroSensor g, EV3UltrasonicSensor u) {         touchSensor = t;         colorSensor = c;         gyroSensor = g;         ultrasonicSensor = u;     }      public int getColorSample(){         int sample = colorSensor.getColorID();         return sample;     }  }   Movement.java  public class Movement {      RegulatedMotor left;     RegulatedMotor right;     EV3TouchSensor touchSensor;     EV3ColorSensor colorSensor;     EV3GyroSensor gyroSensor;     EV3UltrasonicSensor ultrasonicSensor;      public Movement(RegulatedMotor l, RegulatedMotor r, EV3TouchSensor t,  EV3ColorSensor c, EV3GyroSensor g,             EV3UltrasonicSensor u) {         left = l;         right = r;         touchSensor = t;         colorSensor = c;         gyroSensor = g;         ultrasonicSensor = u;     }      //initialize sensors      Sensors sensors = new Sensors(touchSensor, colorSensor, gyroSensor, ultrasonicSensor);      public void moveForward() {         // get the color sample of the ground         //int sample = colorSensor.getColorID();         int sample = sensors.getColorSample();          // while machine is on the ground color         while (sample != 7) {              // get new sample             //sample = colorSensor.getColorID();             sample = sensors.getColorSample();              // move forward             syncForward();         }         // if on black, stop motors.         syncStop();     }   Don't look at the other methods, because these work fluently, but the error comes at the line 30, where it tries to get the sample from the sensors class. I have no idea, I've given the commented out lines as well, which work fluently. The error comes from accessing the sensors class and i can' think out a solution.  I'll be in your debt!

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


#include<iostream> using namespace std; class A {    int x;    int *ptr;    int *ptr2;    public:    A(int y)    {      cout<<"para const"<<endl;      x=y;      ptr=&x;           //Static allocation      ptr2=new int;     //Dynamic allocation      (*ptr2)=y;      cout<<"ptr "<<&ptr<<"--"<<ptr<<"--"<<*ptr<<endl;      cout<<"ptr2 "<<&ptr2<<"--"<<ptr2<<"--"<<*ptr2<<endl;    }    void show()    {      cout<<x<<"--"<<(*ptr)<<"--"<<(*ptr2)<<endl;    }    ~A()    {      cout<<"dest"<<endl;      //delete ptr;    //will leads to segmentation fault      delete ptr2;    } }; int main() {    A obj1(10);    obj1.show();    A obj2(20);    obj2.show();    cout<<&obj1<<endl;    cout<<&obj2<<endl; }   OutPut:  para const ptr 0x7ffe27dedbc8--0x7ffe27dedbc0--10 ptr2 0x7ffe27dedbd0--0x2132010--10 10--10--10 para const ptr 0x7ffe27dedba8--0x7ffe27dedba0--20 ptr2 0x7ffe27dedbb0--0x2132030--20 20--20--20 0x7ffe27dedbc0 0x7ffe27dedba0 dest dest   I can see for both the object, the pointers (1. statically allocated stored in stack and 2. dynamically allocated stored in heap) are created in separate memory & holding also separate memory . Then why deletion of ptr leads to segmentation fault and not for ptr2. I believe swallow copy & deep copy is not making any impact here as I am not copying the objects to one another. And also one more thing I am observing is the address of obj1 & obj2 is same as address of ptr & ptr2 , why so ?   Can someone explain me this behavior please ?

Ignoring programming style and design, is it "safe" to call delete on a variable allocated on the stack?  For example:     int nAmount;    delete &nAmount;   or  class sample { public:     sample();     ~sample() { delete &nAmount;}     int nAmount; }


Let $R$ be a UFD ring, $S$ a nonempty subset of $R$, $S$ closed under $R$ multiplication. Considering  fractional ring $S^{-1}R$, why is $S^{-1}R$ a UFD ring?

I was wondering, is the localization of a UFD also a UFD?    How would one go about proving this? It seems like it would be kind of messy to prove if it is true.  If it is not true, what about localizing at a prime? Or what if the UFD is Noetherian?


In response to the users that flagged this as a potential duplicate, it is not. I have a SSH hardening solution, which I got off Canonical's ubuntu tutorials and is commonly repeated, but it isn't working, as I outlined below.  On my Ubuntu 18.04 box I've attempted to setup two-factor authentication for SSH per , however when I attempt to login via SSH it fails. I'm prompted for my username as normal, then my password. No matter what it returns "Access denied" when I've entered my password. If I comment out   auth required pam_google_authenticator.so   from /etc/pam.d/sshd then SSH works again, but obviously without two-factor. What is stopping my password from being accepted?

I use Ubuntu 16.04 and seek to harden my SSH authentication in a special manner.  The current situation:  I have a machine with a minimal Ubuntu server I use mainly to transfer files to via its local OpenSSH server. Now, I don't have a firewall on that machine from a few reasons and I also avoid using a key pair hence I use only a password. One of the only ways I have left to defend from brute force attacks, and the one I most desire at the moment, is using a mechanism that blocks a user for X amount of hours, after Y amount of connection tries.  The desired situation:  I wish to have a standalone mechanism (that is, not as part of a firewall) that blocks a user for X amount of hours, after Y amount of connection tries as a way to defend from brute force attacks.  My Question:  Do you know a utility (and specific configuration) that will let me achieve the desired situation?


There is known to be a lower limit on space, which can be derived from the Planck units. It can describe the minimum distance resolvable between two points; but what then would the structure of space look like?  Would it be a lattice, where each point of space, planck length apart on each axis, forms the 3 dimensional space, and space is absolute? Or is it literally just the limiting distance between two arbitrary points? Thoughts?

Is the spacetime continuous or discrete? Or better, is the 4-dimensional spacetime of general-relativity discrete or continuous? What if we consider additional dimensions like string theory hypothesizes? Are those compact additional dimensions discrete or continuous?   Are there experimental evidences of continuity/discreteness?  When particles move inside space do they occupy spacetime by little chunks? What would imply if spacetime is discrete on continuous theories?  I've found little information on the web and books.  Probably my question is ill-posed and I apologize for this.


I know that rm -rf \deletes everything in the root. How does it work? To be more specific, when the files are getting deleted, won't the files associated with the 'deleting process' or the core files that execute the command get affected and crash?

If you are root, and you issue   rm -rf /    Then how far can the command go? Can you recover data from this kind of an action? Even after the binaries are gone, would the running processes still be active? What would it take to make the same physical machine boot again? What files would you need to restore to make this happen?  I could try this on a VM and see, but I want to know the rationale behind what to expect if I do this.


What is the difference between the density and probability?  I have tried R in which I can use both pnorm and dnorm for the normal distribution and pbinom and dbinom for the binomial distribution, etc.  I have tried reading the documentation but I don't think it's quite clear what the difference is between those two functions. I know that pnorm(x) gives me $P(X \leq x)$.  My guess is that the density is the value of $f(x)$ while the probability is $\int_\infty^x f(x) \, \mathrm{d}x$. If this is correct, I don't understand what the value of $f(x)$ gives me of information since only the area under the function gives me the probability.  I know that the interesting values are pdf=probability density function and cdf=cumulative density function. So maybe the pdf is the value from dnorm and is the area at a specific x while cdf is the value from pnorm and is the area from $\infty$ to the specific x. But I have learned that you cannot get the probability at a specific $x$ in continuous distributions so that explanation does not make sense.

On the , there is this line:      $p(\mathrm{height}|\mathrm{male}) = 1.5789$ (A probability distribution over 1 is OK. It is the area under the bell curve that is equal to 1.)    How can a value $>1$ be OK? I thought all probability values were expressed in the range $0 \leq p \leq 1$. Furthermore, given that it is possible to have such a value, how is that value obtained in the example shown on the page?


I'm looking for a more dynamic way to write the following statement.  data = [r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9], r[10], r[11], r[12], r[13]]    r represents my response data coming in, to which I take that and enumerate the items into a dictionary. This works, but its too static. If data is added or removed, the API code then needs to be adjusted to account for it.  What is an intuitive way to handle this? Below is a sample of the full class for reference.  class Pots(Resource):     def get(self, store):         print('USAGE: Received a request at POTS for Store ' + store )         conn = sqlite3.connect('store-db.db')         cur = conn.cursor()         cur.execute('SELECT * FROM Pots WHERE StoreNumber like ' + store)          res = cur.fetchall()         if not res:             print("RESPONSE: No data was found for this request.")             return('No data was found', 404)         else:             for r in res:                 column_names = ["StoreNumber", "ForwardOnFail", "HuntLine","FirePrimary","FireSecondary", "BurglarPrimary", "BurglarSecondary","BurglarTertiary", "DNR", "PassengerElevator", "FreightElevator", "Escalator1", "Escalator2","ShopperTrak"]                 data = [r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9], r[10], r[11], r[12], r[13]]                          datadict = {column_names[itemindex]:item for itemindex, item in enumerate(data)}                 return(datadict, 200)   Edit: Please ignore any SQL inefficiencies. While I appreciate the advice, I am aware and do not intend to use this in production. Just for testing. :)

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I saw some  using the following way to output content of a file as the stdin of another command(in this case, it is sha256sum): echo "$(<sha256_file01) file01" | sha256sum --check  The intention is to output the content of file sha256_file01, together with another argument 'file01', and pipe to command sha256sum. My questions are:  Is this the ideal/efficient/correct way of using 'echo $(<filename)' ? any concern using $(<filename) this way ? Will it be better if we use  echo "$(cat sha256_file01) file01" |sha256sum --check   instead ?  Any specific scenario where using 'echo $(<somefile)' is necessary ?  This question is only to learn more on how to use bash in more efficient way, thanks for any sharing!

I am trying to understand how exactly Bash treats the following line:  $(< "$FILE")   According to the Bash man page, this is equivalent to:  $(cat "$FILE")   and I can follow the line of reasoning for this second line. Bash performs variable expansion on $FILE, enters command substitution, passes the value of $FILE to cat, cat outputs the contents of $FILE to standard output, command substitution finishes by replacing the entire line with the standard output resulting from the command inside, and Bash attempts to execute it like a simple command.  However, for the first line I mentioned above, I understand it as: Bash performs variable substitution on $FILE, Bash opens $FILE for reading on standard input, somehow standard input is copied to standard output, command substitution finishes, and Bash attempts to execute the resulting standard output.  Can someone please explain to me how the contents of $FILE goes from stdin to stdout?


There appear to be some unlockable game modes and some locked content (most namely noted by "Dadlockable content" and [LOCKED] in the main menu). What is it and how do you unlock it?

In the main game mode, you can unlock items such as a Razor and Soap. What other items can you unlock, how do you unlock them, and what do they do?


I have seen in american workplaces (especially software companies) the teams who work on related projects or work on some complimentary projects are called sister teams. why do we call them sister teams and not brother teams?

The term  is often  used figuratively  to refer, for instance,  to a “sister company” for a company  within the same group, or to a “sister  site” for  sites that belong to the same family. This connotation as explained by the   means:         belonging to a pair or group of similar and related things, such as businesses, usually owned or operated by the same person or organization:         our sister company in Australia.          also, from :        You can use sister to describe something that is of the same type or is connected in some way to another thing you have mentioned.    ⇒ ...the International Monetary Fund and its sister organisation, the World Bank.   ⇒ ...Voyager 2 and its sister ship, Voyager 1.       This usage appears to be common with things that are  regarded as feminine and are associated, as if by kinship,  with other similar things that belong to the same group. An early  usage example of this is the "sister" referred to  ships:         the US battleship Missouri and her sister ship, the Wisconsin.      In other instances,  the "feminine" issue is less explicit as in the case of internet sites, so I guess this usage has to do with the fact that English is less gender specific when it comes to things or abstract entities.   Questions:    Does “sister” apply to whatever entity that belongs to the same group irrespective of its real or perceived gender? or could "brother" be used instead?  Where does this usage come from?


Suppose if there's a web site which was out of service yesterday. And it's still down today. Which sentence below should I tell the web master?   The web site is down/(out of service) since yesterday. The web site has been down/(out of service) since yesterday.

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


I am trying to make a query on my GUI through a database, adding to the database is fine, but making a query through the GUI gives me a      "Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException" error   and I cannot figure out why. 4th line here is the first error it is giving me.  String category=categories[searchCategory];      try {         PreparedStatement stmnt = null;         stmnt = con.prepareStatement("SELECT * FROM Jobs WHERE " +category +  " LIKE '%?%')");         stmnt.setString(1,searchingFor);         System.out.println(stmnt.toString());         ResultSet result = stmnt.executeQuery();         while (result.next()) {             for (int i=0; i<categories.length; i++){                 String field=categories[i];                 System.out.println(result.getString(field));             }            }     } catch (SQLException e) {          System.out.println("Error during select query " + e);         e.printStackTrace();     }   }   This is the createSearchTab code that it is saying  i have an error at.  excelReader.search(category, searchingFor);   where is the NullPointerException?

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


Help please formulate a formula for calculating the number of all possible combinations for these conditions:   The string must contain the a certain number of characters (no more, no less )!  Symbol A - 2 count Symbol B - 3 count Note: characters and their count can be more than two (for example, C-1, D-2, E-32, etc)   I sketched all the combinations manually for an example:  aabbb abbba bbbaa bbaab baabb abbab ababb babba babab bbaba

There are 11 letters in the word.   M - 1 I - 4 S - 4 P - 2  so the number of different permutations is $\dfrac{11!}{1! 4 !4!2!}$  Is this correct solution?


I am looking for a few "non-intuitive" counterexamples in the theory of coherent sheaves. In particular:  A ringed space $(X,\mathcal{O}_{X})$ so that $\mathcal{O}_{X}$ is not coherent over itself.  A sheaf $M$ that is finitely generated over $\mathcal{O}_{X}$ but not coherent.  I have read somewhere, but forgotten where, that if $\mathcal{O}_{X}$ is coherent over itself, then coherent and finitely generated are the same for sheaves over $\mathcal{O}_{X}$. Can anyone give me a reference or explain it to me?   Thanks.

This is related to a remark in Iitaka's algebraic geometry sec 1.12.  "...It should be noted that sheaves of germs of differentiable functions are by no means coherent. These facts seem to suggest coherence is linked with the property of being algebraic or analytic."   $\textbf{Q1:}$ What is the example of non-coherence for the differentiable case? First what is the sheaf of rings in the context? Is it ring of smooth functions?  $\textbf{Q2:}$ If I recall correctly, there are analytic sheaves which are not coherent.(I do not think I will recall this correctly.) Coherence is related notion to algebraic for sure but I have to use GAGA to say it is analytic. However, in analytic setting, there are non-coherent sheaves as well. Should I naively interpret coherence is subcase of analytic or algebraic?(But not the reverse in general?)


I am trying to generate pseudocode in both presentation slides and handout using beamer.  I can use the listings package in the slides by adding [fragile] to the frame environment. However, how can I use the lstlistings environment when in article mode? Below is a minimal example.  File: slides.tex  \documentclass{beamer} \input{mwe-body.tex}   File: notes.tex  \documentclass{article} \usepackage{beamerarticle} \input{mwe-body.tex}   File: mwe-body.tex  \usepackage{listings} \begin{document}  \begin{frame}[fragile]   \frametitle{Frame 1}   test 1   \begin{lstlisting}     int sum = 0;   \end{lstlisting} \end{frame}  \mode<article>{   test 2    \begin{lstlisting}     int sum = 1;   \end{lstlisting} } \end{document}   pdflatex slides.tex works to generate the presentation.  pdflatex notes.tex has the following error:  Runaway argument? ! Paragraph ended before \lst@next was complete. <to be read again>                \par l.18 }   Any solutions?  Note, this is cross-posted to , but may get more responses here :)

I am trying to generate pseudocode in both presentation slides and handout using Beamer.  I can use the listings package in the slides by adding [fragile] to the frame environment.  However, how can I use the lstlistings environment when in article mode?  Below is a minimal example.   File: slides.tex   \documentclass{beamer} \input{mwe-body.tex}   File: notes.tex  \documentclass{article} \usepackage{beamerarticle} \input{mwe-body.tex}   File: mwe-body.tex  \usepackage{listings} \begin{document}  \begin{frame}[fragile] \frametitle{Frame 1} test 1 \begin{lstlisting}     int sum = 0; \end{lstlisting} \end{frame}  \mode<article>{ test 2  \begin{lstlisting}     int sum = 1; \end{lstlisting} } \end{document}   pdflatex slides.tex works to generate the presentation.   pdflatex notes.tex has the following error:   Runaway argument? ! Paragraph ended before \lst@next was complete. <to be read again>                \par l.18 }   Any solutions?


I am trying to write an algorithm to rotate a bitmap image of $n$ by $n$ size by an angle $\alpha$.   I know that I have to find a rotation matrix, then perform matrix multiplication of the rotation matrix by the image matrix data input.  I know that the $2\times 2$ rotation matrix  is  $$T_\alpha=\left(\begin{array}{cc}\cos\alpha & -\sin\alpha \\ \sin \alpha & \cos \alpha \end{array}\right)$$  However, I am not sure how to find the appropriate $n \times n$ matrix.

There is a 2d rotation matrix around point $(0, 0)$ with angle $\theta$.  $$ \left[ \begin{array}{ccc} \cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{array} \right] $$  Next, there is a 3d rotation matrix around point $(0, 0, 0)$ and unit axis $(u_x, u_y, u_z)$ with angle $\theta$ ().  \begin{bmatrix} \cos \theta +u_x^2 \left(1-\cos \theta\right) & u_x u_y \left(1-\cos \theta\right) - u_z \sin \theta & u_x u_z \left(1-\cos \theta\right) + u_y \sin \theta \\ u_y u_x \left(1-\cos \theta\right) + u_z \sin \theta & \cos \theta + u_y^2\left(1-\cos \theta\right) & u_y u_z \left(1-\cos \theta\right) - u_x \sin \theta \\ u_z u_x \left(1-\cos \theta\right) - u_y \sin \theta & u_z u_y \left(1-\cos \theta\right) + u_x \sin \theta & \cos \theta + u_z^2\left(1-\cos \theta\right)  \end{bmatrix}  How it is possible to generalize rotation matrix on $N$ dimension around zero point and $N-2$ dimensional unit axis with angle $\theta$?


Just a question out of curiosity, what would happen if the event horizons of 2 black holes of the same mass were to come into contact? Would both gravitational accelerations be canceled where the event horizons overlap?

Suppose we have a spacecraft just inside the event horizon of a black hole, struggling to escape, but slowly receding into it. Another (bigger) black hole expands until its event horizon includes the spacecraft as well. This pulls both the black hole and space-craft into itself. As the spacecraft is closer to the second black hole, it receives more force, perhaps just enough to pull it out.  Is it possible that the spacecraft, even momentarily, is pulled out of the event horizon of the original black hole (although it is now trapped inside the event horizon of the new one)?


I have an application with LED with given optical power. I found on ebay some LEDs but it appears just intensity [mcd] How can I determine optical power of LEDs in mW ?? Please, mention some clues. link with characteristics of LEDs, below :

I chose an LED for my application but I need optical power, in mW.  In the , luminous intensity is shown in mcd but I did not find formulas for calculation although there are graphs, etc.  Where luminous intensity is 180 mcd and viewing angle 120°, etc.  Please provide any necessary formulae for my case.  I could not find the exact formula on this website.


I like to play tennis on Tuesdays. I like playing tennis on Tuesdays.  Having taken into account the following, would you please throw a light on what is the difference between the sentences above? This question was inspired by a comment left on a similar question I asked , where a user said:  Like playing vs. like to play is the question of gerund vs. infinitive. Both of those are correct, but I don't think there's a general rule.  So, is there some general rule? Or was the comment correct?

Do you like getting up early?  (1) Do you like to get up early?   (2) (Essential Grammar in Use)  What is the difference between the two? I guess, in (1) I ask you whether you’re currently enjoying of getting up early. But (2) is rather difficult. It can present asking either about your futural / intentional getting up or repetition of enjoying ( says to-infinitval has the meaning of ‘repetition’ but I don’t know why –– I want to get some explanation about this in CGEL, p1241).


In the movie we see       Starkiller Base fire upon and destroy five planets (or a mixture of 5 planets and moons) within a single solar-system.   This event appears to be observed simultaneously and instantaneously/in real-time by multiple characters from a variety of very different vantage points.  For instance:   Han, Rey, Finn, et al. from the surface of whatever world they're on (which as I understood it was still some distance away from Republic space). Leia and the other Republic commanders observe from their command center. The troops who fire the weapon appear able to observe its results.   My question is, what is the relative position of all of these vantage points that would allow simultaneous observation like that?  Even from a vantage point within the targeted system it would likely take minutes, at least, to observe the full effects of the weapon.  Was everyone actually in more-or-less the same place (or at least, equidistant from the target zone) when the weapon was fired?  Meaning the First Order was firing on a very nearby target (which would invite the question of why the Republic would allow such a massive and obvious superweapon to be constructed so close to their area of influence?)?  Or is this just a case of the movie not taking practical physics into account?

On Takodana,      the main characters and various bar patrons can see the planet Hosnian Prime being destroyed by Starkiller Base with their (respective) naked eyes. How did they see this? Is the Hosnian system close enough to see? If it's not very close and they could just see the explosion, how did the light from it reach them so quickly?


I've forgotten the password for my MacBook Pro, which uses OS X 10.9.1. How can I reset my password?

I need to factory reset my Macbook but cannot recall the password. So I used Cmd+R during startup and go to terminal and typed 'resetpassword' according to this advice    Now 'Reset Password' application appears but there is nothing where I have to select the volume containing the user account. Why does this happen?


If I add Protection 4 to an armour piece,will it reduce the same amount of damage as an armour piece with a "specific" protection such as Fire Protection?

Prior to 1.4.6 it was a well known fact that the protection enchantment on armor was strictly superior to the other enchantments and that simply having a few pieces with protection III/IV would max out this protection, leading to the best possible set of armor.  Now that this has , however, I'm curious to see if anyone has analysed what the optimal armor configurations now are?  Presumably it will be some combination of protection enchantments and other enchantments, going by the description of how enchantments work now on the wiki.  Or, are we forced to choose one or more types of protection to max out?  (This would be the case if there are not enough total enchantments possible to max out all areas).  If this is the case, it would be great to see some analysis of how to optimise that choice as well.  I've looked around but haven't found any good mathcrafting on this question yet.  Furthermore, beyond protection against taking damage, can someone include some explanation of the hidden utility bonuses?  For instance, Blast Protection has been described in wiki sources as reducing the knockback effects from explosions, and Fire Protection is described as reducing burn time.  Do these effects scale and max out at some enchantment level, and does Projectile Protection similarly reduce the knockback effect from projectiles?


How could I get (in a very efficient python way), a group of sub-lists contained in another long list??, I explain with example:  Let's say I have this:  List = [[1,2,3],[4,5,6],[7,8,9],[2,4,3],......long list]   I would like to get an output grouping the sub-list in, let's say, in a groups of 7 sub-lists, then the output would be like:  L1 = [1,2,3] L2 = [4,5,6] L3 = [7,8,9] up to L7 then process those 7 lists separately and then start again.... L1 = [x,x,x] this L1 would be (obviously) the 8th sub-list in the big list "List" L2 = [x,x,x] this would be the 9th sub-list....and so on   I dont know if I should call it like this but, It would be like making "chunks" of 7 sub-lists.  Is it possible in a fast and efficient way?

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


Real world example: when I thaw frozen meat in 5L of warm water vs 20L of cold water, it thaws roughly in the same time for me (note, the warm water is not kept warm) - Which I guess means that the same amount of thermal energy is transferred to the meat over an equal time period. Does it make a difference for the freshness of the meat if I thaw it in warm water vs cold water, if it takes in the same thermal energy over the same time period? And do the bacteria that make it go bad care more about absolute temperature, or thermal energy?

I have found warm water to be a great way to quickly defrost meat and fish as opposed to just letting it sit outside the freezer, which is what my mom does.  But I wonder if there are any negative side effects to the method, as in, for example, compromised taste or compromised food safety.  I do understand that the water shouldn't be too hot as to avoid actually cooking the frozen food.


I have to prove the inequality $\vert \tanh(x)-(x-\frac{x^3}{3})\vert\leq\frac{1}{8}$ for $x\in[-1/4,1/4]$ where $x-\frac{x^3}{3}$ is the 3rd order Taylor expansion at $0$. I know I have to somehow use the Lagrange remainder to show this and the fact that $(\tanh{x})^\prime=1-\tanh^2x$ but am stuck at this point.

I have an assignment, that I cannot seem to find a starting point for. I am not looking for the specific answer, but only where to begin. Any pointers are appreciated.  I have to prove the inequality $\vert \tanh(x)-x+\frac{x^3}{3}\vert\leq\frac{1}{8}$ for $x\in[-1/4,1/4]$ where $x-\frac{x^3}{3}$ is the 3rd order Taylor expansion.  I've tried with the triangle inequalities, Lagrange remainders, and a lot of other stuff, but I am no where near a correct argumentation. Does anyone have any suggestions?


I found a similar question here  but answers in this question also give same result as I have mentioned in my first example  Here is method that I am using      public class iStore     {         public T GetSiteCacheValueByFunc<T>(Func<T> func) where T : class         {             var methodName = func.Method.Name;         }     }   Here I am using iStore.GetSiteCacheValueByFunc by using following code I get methodName <Index>b_2 while I should get GetAllLanguages   public ActionResult Index()     {         var site = BusinessLogic.Caching.iStore;         var languages = site.GetSiteCacheValueByFunc<IEnumerable<Language>>(() =>  LanguageManager.GetAllLanguages());     }   If I use following code I get correct methodName GetAllLanguages but in this way I am not able to pass parameters to GetAllLanguages method  public ActionResult Index() {     var site = BusinessLogic.Caching.iStore;     var languages = site.GetSiteCacheValueByFunc<IEnumerable<Language>>(LanguageManager.GetAllLanguages); }   Where I am doing wrong? and how can I get correct methodName?

When logging in C#, how can I learn the name of the method that called the current method? I know all about System.Reflection.MethodBase.GetCurrentMethod(), but I want to go one step beneath this in the stack trace. I've considered parsing the stack trace, but I am hoping to find a cleaner more explicit way, something like Assembly.GetCallingAssembly() but for methods.


Can anyone help me in fixing my wireless adapter after i have installed ubuntu 16.10. I tried lspci and got the following details:  My network controller is: Broadcom Limited BCM43142 802.11b  Am i supposed to use kdiswrapper can get the wireless driver installed? Did anyone face this issue and has solved it?

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


A very simple circuit consist of a resistor, a battery, and some conducting wires connecting the resistor to the battery(assuming resistance of the conducting wire is $0$). It is always assumed that both the ends of the conducting wire, i.e. one connecting to battery's terminal and other connecting to the terminal of resistor, are at equal potential and hence the potential difference is zero.   If the potential difference is zero inside conducting wire, then it implies that electric field inside the conductor must be zero. If this is the case then why does an electron inside the conducting wire move, and why there is current flowing through the wire?  My Idea  If the electric field inside conducting wire is zero then it only means that electrons inside conducting wire are not accelerating but can move with a constant speed and since current is the rate of flow of charge per unit time, so it is possible for electric current to exist in the conductor.

In an ideal circuit, How can there be a current b/w points a & b, when there is no potential difference and thus no electric field between a & b? If there is no current, then where does current across the resistor come from, because that means no charge is coming from the battery (?).


I am currently learning about fractions, and there is something that I am finding it hard to make sense of. When a fraction it added to the right of the decimal point, the number becomes slightly bigger right? So for example if I add enough fractions to the 0.99999999, will this number eventually become equal to 1?  So will this number eventually become equal to 1 (if I added enough 9): 0.9999999999999999999999999999999999999999999999999999999999999999999999...9

I'm told by smart people that $$0.999999999\ldots=1$$ and I believe them, but is there a proof that explains why this is?


I'm using Btrfs, for better or worse.  It is a plain btrfs partition with no compression or RAID, nor do I have any snapshots; it is a a simple btrfs partition that the OS is reporting with quite a bit of space free, but I am getting out of space errors when running various operations such as updates.  The operating system tools such as df report lots of space free:  $ df -h Filesystem      Size  Used Avail Use% Mounted on udev            7.8G     0  7.8G   0% /dev tmpfs           1.6G   26M  1.6G   2% /run /dev/sda5       354G  313G   41G  89% / tmpfs           7.9G  172M  7.7G   3% /dev/shm tmpfs           5.0M  4.0K  5.0M   1% /run/lock tmpfs           7.9G     0  7.9G   0% /sys/fs/cgroup /dev/sda5       354G  313G   41G  89% /home tmpfs           1.6G  4.0K  1.6G   1% /run/user/139 tmpfs           1.6G   20K  1.6G   1% /run/user/1000   I later found the btrfs tool to show information about the btrfs volumes:  $ btrfs fi show  Label: none  uuid: 76eb29fb-6909-4cc9-9848-f0b5723802b9     Total devices 1 FS bytes used 285.88GiB     devid    1 size 353.90GiB used 349.90GiB path /dev/sda5   Label: none  uuid: 229c7745-144f-4dd0-98c5-476248b308ad     Total devices 1 FS bytes used 384.00KiB     devid    1 size 348.77GiB used 1.02GiB path /dev/sda3   /dev/sda5 is 286GB used with as size of 354GB.  Then says 350GB used.   /dev/sda5 is mounted as /  How do I get access to the ~60GB that it says are free, but are not?

$ cat /etc/fstab # <file system> <mount point>   <type>  <options>       <dump>  <pass> UUID=a168d1ac-4e13-4643-976d-6e47ea1732b1 /boot        ext2  defaults                                                                   0 1 /dev/mapper/sda4_crypt                    /            btrfs defaults,autodefrag,compress=lzo,inode_cache,space_cache,subvol=@          0 2 /dev/mapper/sda4_crypt                    /tmp         btrfs defaults,autodefrag,compress=lzo,inode_cache,space_cache,subvol=@tmp       0 2 /dev/mapper/sda4_crypt                    /run         btrfs defaults,autodefrag,compress=lzo,inode_cache,space_cache,subvol=@run       0 2 /dev/mapper/sda4_crypt                    /var/crash   btrfs defaults,autodefrag,compress=lzo,inode_cache,space_cache,subvol=@var-crash 0 2 /dev/mapper/sda4_crypt                    /var/tmp     btrfs defaults,autodefrag,compress=lzo,inode_cache,space_cache,subvol=@var-tmp   0 2 /dev/mapper/sda4_crypt                    /var/log     btrfs defaults,autodefrag,compress=lzo,inode_cache,space_cache,subvol=@var-log   0 2 /dev/mapper/sda4_crypt                    /var/spool   btrfs defaults,autodefrag,compress=lzo,inode_cache,space_cache,subvol=@var-spool 0 2 /dev/mapper/sda5_crypt                    /home        btrfs defaults,autodefrag,compress=lzo,inode_cache,space_cache,subvol=@home      0 3 /dev/mapper/750er                         /media/750er ext4  defaults                                                                   0 4 /dev/mapper/cswap                         none         swap  defaults                                                                   0 5 ➜  ~  df -h          Filesystem              Size  Used Avail Use% Mounted on /dev/mapper/sda4_crypt   38G   12G   13M 100% / none                    4,0K     0  4,0K   0% /sys/fs/cgroup udev                    2,0G  4,0K  2,0G   1% /dev tmpfs                   396M  1,3M  394M   1% /run none                    5,0M     0  5,0M   0% /run/lock none                    2,0G  208K  2,0G   1% /run/shm none                    100M   36K  100M   1% /run/user /dev/mapper/sda4_crypt   38G   12G   13M 100% /tmp /dev/sda2               231M   44M  175M  21% /boot /dev/mapper/sda4_crypt   38G   12G   13M 100% /var/crash /dev/mapper/sda4_crypt   38G   12G   13M 100% /var/tmp /dev/mapper/sda4_crypt   38G   12G   13M 100% /var/log /dev/mapper/sda4_crypt   38G   12G   13M 100% /var/spool /dev/mapper/sda5_crypt  3,7T  2,4T  1,2T  67% /home /dev/mapper/750er       688G  276G  377G  43% /media/750er /dev/mapper/2tb         1,8T  1,7T  141G  93% /media/2tb ➜  ~  sudo btrfs fi df / Data, single: total=9.47GiB, used=9.46GiB System, DUP: total=8.00MiB, used=16.00KiB System, single: total=4.00MiB, used=0.00 Metadata, DUP: total=13.88GiB, used=1.13GiB Metadata, single: total=8.00MiB, used=0.00 ➜  ~     It's a 40GB partition with quite some snapshots on it. But it's compressed so I think the 9,46GB/40GB is accurate. But my Ubuntu fails because it says it has no disk space. I had apt-errors, cant install programs and my mysql server failed to start because of it.  And I know about not to rely on df I just included it for completeness.  I think Ubuntu uses df which is known to report wrongly with Btrfs internally and fails for that reason. That would make sense for APT when it does checks for space. But it actually fails to write to disk.  $ sudo time dd if=/dev/zero of=large bs=2G count=1 dd: error writing ‘large’: No space left on device 0+1 records in 0+0 records out 11747328 bytes (12 MB) copied, 1,29706 s, 9,1 MB/s Command exited with non-zero status 1 0.00user 1.40system 0:01.44elapsed 97%CPU (0avgtext+0avgdata 2098028maxresident)k 160inputs+23104outputs (0major+383008minor)pagefaults 0swaps


Suppose $A$ and $B$ are $n\times n$ matrices which satisfy   $$ A=\big(B-\frac{1}{110}E\big)'\big(B+\frac{1}{110}E\big). $$   Prove that for each $n$-dimensional column vector $\xi$, the equation $A'(A^2+A)X=A'\xi$ has a nonzero solution.    It suffices to prove that the column space of $A'$ is contained in the column space of $A'(A^2+A)$, and the column rank of $A'(A^2+A)$ must not be full rank, since $A'(A^2+A)X=0$ should admit a nonzero solution. But I don't know how to prove it rigorously.

let $A_{n\times n},B_{n\times n} $ real matrix ,and such $$A=\left(B-\dfrac{1}{110}I\right)^T\left(B+\dfrac{1}{110}I\right)$$ show that:  For any n-dimensional column vector $\xi\neq 0$,then the equation exsit $$A^T(A^2+A)X=A^T\xi$$  nonzero root.  My try: since $$A=\left(B-\dfrac{1}{110}I\right)^T\left(B+\dfrac{1}{110}I\right)=B^TB-\dfrac{1}{12100}E+\dfrac{B^T}{110}-\dfrac{B}{110}$$ so $$A+E=B^TB+\dfrac{12099}{12100}E+\dfrac{1}{110}(B^T-B)$$ then I can't,Thank you


EDIT:  I am not asking about the creation of a staging environment.  I need to rephrase my question for clarity:  Is there a reason why I wouldn't want to change the document root for the domain of our website to point to the document root on the staging website during a site upgrade, and leave it there permanently, with the production site now becoming the staging site?  Will it affect search engine traffic or the way that Google crawls the website if the document root folder changes entirely?  Sorry, if there is a duplicate question with answers on this already, but I am not seeing answers addressing the change of the document root specifically, or how it could affect traffic, seo, etc.  OLD QUESTION text to follow:  My company's website needs to undergo some big upgrades.  We want to avoid downtime for our users if at all possible.  Are there reasons why we wouldn't want to create a duplicate site, and during maintenance simply change the document root for our domain name to this site's folder?  This way, we could create a duplicate site, perform the upgrade, ensure everything is working, and when it is, change the document root folder.  I have been scouring the web for information about how this could affect our site, such as whether this would change anything in the eyes of Google, etc. and so far, I've found nothing about it.  I'm worried I'm missing something big.

Considering upgrade of CMS to latest version- the process may take anywhere from 2 to 4 weeks.  May suggest - we need to work on live server, what we have planned:   take exact replica of site and move to a test domain, but on live server Block Google, Bing, Yahoo - User-agent: Google Disallow: /, User-agent: Bing Disallow: /, User-agent: Yahoo Disallow: / in robots.txt Will upgrade CMS and add functionality - will test the entire structure, check URLusing xenu and move on to configure the site on original domain   The process upgradation and new tools may take 2 to 4 weeks....  Concern is that despite blocking Google, Bing & Yahoo through      User agent disallow    can still the URLof test site can be crawled by the search engines - if yes - it may hurt the original site as will read on as entire duplicate or is there any alternate way around.


I have a Dell Latitude E5450. On the original power supply it says output: 19.5V - 3.34A  Can I use a battery pack that provides 19V - 3A?  Hopefully somebody can explain this to me and what I need to be careful for. Is it OK to be below the numbers? Is it OK to be over? What is the range?

I'm using a common charger for both of my laptops.  The charger is specified at 20 Volts and 3.25 Amperes. My other laptop has a specification of 19 V and 3.42 A.  Is it safe to charge my laptop with chargers whose specifications exceed or are not equal to the mentioned specifications?  I have read somewhere that it may cause some damage if the voltage or amperage is not matching the specs.


I have Virtualbox 4.3.6 running on Windows 7 Pro. I have various Linux VMs, I'd like to know if there is any way I can configure virtualbox not to use the default internet access the laptop has (work network, home network, public wifi) and route traffic securely through a linux server I have with a static IP.  Can anyone advise how to do this? I have searched and searched and can't find any advice

I'm currently trying to run Chrome OS in VirtualBox 3.0.1. Windows XP Pro is the host system.  The actual behavior is Chrome OS starts up fine, reaches the login screen.  Once so, when trying to log using my Google account, I have the network indicator (at the bottom of Virtual Box window) briefly flashing, showing a connection attempt. Nothing happens then, the display stays on the login screen.  The fact that the network indicator flashes makes me think this may be a proxy configuration issue. Indeed, I'm using a proxy to access the Internet from Windows. I guess such a proxy should be configured for Virtual Box as well, but couldn't find anything on the Internet not implying an actual modification of the guest system (for instance,  kind of solution isn't working for me, as it implies accessing to the guest system, what I can't)...  Does anyone have any clues or ideas on how to configure Virtual Box (and maybe Windows XP) to have this working?  Chrome OS version: 999.999.32409.000656, Developer Build Fri Nov 20 00:07:42 UTC


Let's say I have a 1/1 with first strike that's attacking and blocked by a vanilla 4/4.  It deals first strike damage, but that's not enough to kill the defending creature. Right now, the attacking creature will have to take damage from the blocking creature.  Before the attacking creature takes that damage, can I “finish off” the blocking creature by casting  and avoid it taking damage?  I am unsure whether,and when,a player gains priority during that step.  What, in my opinion, distinguishes this question from the others with which it can be associated, is the exact moment in which the players have the priority to cast spells again, which I believe should be placed exactly between the conclusion of the "first strike damage assignment phase" - in which first strike creatures assign their damage - and  the "ordinary combat phase" - in which other creatures without first strike assign their damage.     It should be specified when players gain priority and it is possible to cast spells able to damage creatures during combat, and if it is possible to do so; and, above all, if these damages due to spells are assigned without the possibility,for creatures without first strike, to respond to them.    I don't think these are trivial things ...

I have two examples of different scenarios that are confusing to me.  First, if I have a 1/1 creature with first strike and deathtouch, and my opponent blocks it with a 2/2 creature, will my creature die? I can see two alternative ways this could play out and I'm not sure which is correct.   My creature deals his first strike damage, immediately killing the opponent's creature before he is able to deal combat damage as a state-based effect. My creature deals his first strike damage, which would normally be lethal due to deathtouch, but state-based effects are not checked, and thus the opposing creature deals his damage and both die.   I'm almost positive in this case that it's the first option above.  What gets trickier is, for example, if a creature has first strike and a triggered ability "Whenever this creature deals combat damage to a creature, return that creature to its owner's hand."  This is not a state-based effect, but rather uses the stack. Similar to above, there are two possibilities.   My creature deals his first strike damage, and his triggered ability is placed on the stack. The stack waits to resolve until after all combat damage is dealt, so the opposing creature still kills mine. My creature deals his first strike damage, and his triggered ability is placed on the stack. Both players now gain priority between first strike and combat damage (which I don't think normally happens, thus my confusion). The stack finishes resolving, and the opponent's creature doesn't have a chance to deal damage.   Can someone clarify this area of the rules?


Lilly loved James whose Patronus was a stag, therefore hers became a doe. Snape hid that he loved Lilly for so long, what if Snape's Patronus was a doe because he loved Harry, whose Patronus was a stag?

During  the crew (now reduced to only Harry and  Hermione) wander through the Forest of Dean when a Patronus in the shape of a doe leads Harry to the frozen lake where he finds the Sword of Godric Gryffindor. Later during the events of  we (and Harry) take a look at the late Prof. Snape's memories and see that it was actually Snape who cast a doe Patronus (supposedly to Harry's aid), much to Dumbledore's surprise, who therefrom deduces a relation to Lily Potter (who Snape was secretly in love with all the years, albeit only unilaterally):     Dumbledore: Lily, after all this time?   Snape: Always.   Which already makes me wonder what Dumbledore was actually surprised about there. Was he simply surprised that Snape still loved Lily or was there anything deeper suggested with this Patronus? Add to this that Harry was a bit confused, too, and asked Dumbledore (or at least his mind-image of him, however you take that scene) about the reason for the related Patronuses, which didn't clear any confusions for me, though:     Harry: Professor, my mother's patronus was a doe, wasn't it? That's the same as professor Snape's. That's curious, don't you think?   Dumbledore: Actually, if I think about it, it doesn't seem curious at all.   So my first question would be, is there any deeper reason why Prof. Snape and Lily Potter both have a doe as Patronus or is it just to express that they've always been what one would call soulmates? And why did the Patronus appear in the Forest of Dean at that moment? Snape's discussion with Dumbledore and his casting of the Patronus occurred way earlier than that (as Dumbledore obviously was still alive, so at maximum during the events of the Half-Blood Prince). If that was implied to have been the same Patronus that appeared at the Forest of Dean (as the montage implies), why/how/where did it wait for so long? Is this just one of those various moments of stuff "magically" appearing when needed (as the Gryffindor Sword and the Room of Requirements use to do) or is there a more elaborate reason the movie just didn't delve into (or am I just too stupid to get it)?


I'm new to latex. It has been now almost one month trying to learn for my thesis. If I had a problem I would just type it here, and finally get the solution. But with this command autocite it is always problematic. It is now been 4 days trying to figure it out. Well I switched from natbib to biblatex and even biber. Everything works fine and I had my bibliography and I used the style verbose. But when I try to use the command autocite it doesn't show them.   On the other hand, I worked with footcite it gives me the citation in footnotes, which I do not understand. But I don't know why this command do not work in my .tex file even though I switch to biblatex and biber.  An example of what i did  \documentclass[12pt,a4paper]{book}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[french]{babel} \frenchbsetup{FrenchFootnotes=false}%more common footnote style \usepackage{fnpct}%just a cool package for nice footnotes \usepackage{csquotes} \usepackage[hang,flushmargin]{footmisc} \usepackage[pdftex]{graphics} \usepackage{enumerate} \usepackage{{\images}} \usepackage{blindtext} \usepackage{tikz} \usepackage{amsmath} \usepackage{amssymb} \usepackage{xcolor} \usepackage{epigraph} \usepackage[nottoc]{tocbibind} %to disply bibliography in the table contents  \usepackage[backend=biber,style=verbose-trad2,natbib=true,sorting=nyt]{biblatex}  \addbibresource{mabib.bib}  \begin{document}  Some texte\cite{cdechow_2017}    some texte\footcite[p.12]{brown_corporat_2016}  \printbibliography  \end{document}

Is there a way to employ auto-completion for Biblatex commands (not entries) in Texmaker without writing all commands in User Customization Auto-Completion manually?


I am studying high school physics and it seems i have memorize the equation and use it mechanically in doing question and memorize lots of physical phenomena.I know a lot of physical phenomena can be explained by Huygen principle  (which i can't figure out the  whys and do not understand).There are so many things I don't understand and get the intuition.I know high school math and basic calculus,but it seems it doesn't help to understand.I am frustrated.I do not want to go along with memorizing and pass the exam as i think it is meaningless.We are not machines.Are there any resources that can help?Are there any books better explain high school physics and explain theories using math?

How do you effectively study physics? How does one read a physics book instead or just staring at it for hours?   (Apologies in advance if the question is ill-posed or too subjective in its current form to meet the requirements of the FAQ; I'd certainly appreciate any suggestions for its modification if need be.)


In most of the cases I've seen that nested classes are static.  Lets take an example of Entry class in HashMap  static class Entry<K,V> implements Map.Entry<K,V> {     final K key;     V value;     Entry<K,V> next;     final int hash;      .....     ..... }   Or Entry class of LinkedList  private static class Entry<E> {     E element;     Entry<E> next;     Entry<E> previous;      .....     ..... }   What I know so far about nested class is:   - A non-static nested class has full access to the members of the class    within which it is nested.  - A static nested class cannot invoke non-static methods or access non-   static fields   My question is, what is the reason for making a nested class static in HashMap or LinkedList?  Update 1:   Following the already answer link I got an answer - Since And since it does not need  access to LinkedList's members, it makes sense for it to be static - it's a much  cleaner approach.  Also as @Kayaman pointed out: A nested static class doesn't require an instance of  the enclosing class. This means that you can create a HashMap.Entry by itself,  without having to create a HashMap first (which you might not need at all).   I think both these points answered my question. Thanks all for your input.

I was looking at the Java code for LinkedList and noticed that it made use of a static nested class, Entry.  public class LinkedList<E> ... { ...   private static class Entry<E> { ... }  }   What is the reason for using a static nested class, rather than an normal inner class?  The only reason I could think of, was that Entry doesn't have access to instance variables, so from an OOP point of view it has better encapsulation.   But I thought there might be other reasons, maybe performance. What might it be?  Note. I hope I have got my terms correct, I would have called it a static inner class, but I think this is wrong:


This was an odd one, I read a while ago in a large collection.  The basic plot was that some time in the past the ability to open a portal through time was created. But the only thing that came of it was that a couple of Velociraptors made it through to the modern day. They were captured and eventually started breeding, and at some point people were like "Lets fry them up KFC style", and it was the most delicious food ever.  I think the whole story was written as obituary, or some other reflection on the recently deceased. Something like "I looked out at the tomb of my father: inventor, philanthropists and hero. Perhaps his greatest discovery was the Velociraptor, the most delectable fried creature ever to exist."  I think it was written by someone quite notable, Asimov, Silverberg, or someone else of that era. But I could be wrong.

I ran across this  and it reminded me of an old short story I read a long time ago.  I read it in a collection of short stories.  It would have been a book because I borrowed it from a school library.   Probably in the 1970s or 1980s.  The book and the story would have been older, though.  Probably from the 1960s or earlier.  In the story, a scientist has a machine that he can use to view the past.  It isn't like a TV or something, though.  It opens a portal into the past that he can look through.  It is very difficult to control, though.  Pointing it at a place and time is likened to working in a hurricane.  The portal jumps and moves about randomly.  The steadier he can hold it, the clearer the past appears.  When it is really steady, he can hear sounds from the past.  It never gets really steady enough to reach through.  They try pushing tools through the portal to pick up things in the past.  The steadier the portal, the easier it is to push tools through.  It never gets steady enough for them to push a tool all the way through, though.  It just gets easier to make progress.  One day, they have the portal open and it is acting really wild.  At some point the workers take a break.  The portal is still open, and while they are loafing the portal settles down by itself and becomes steadier than it has ever been.  So steady that a piece of the past falls through.  The portal scooped a chunk of the ground out of the past.  The chunk of ground contains a nest with dinosaur eggs.  The scientist  rescues the eggs, and they manage to keep them warm enough until they hatch.  The dinosaurs are some kind of harmless things, and become the lab mascots.  Always wandering the grounds, and in and out of the lab.  One day, the have the portal open again and one of the dinosaurs wanders into the lab and walks into some high voltage terminal.  Crash, bang.  Short circuit.  All the equipment to open the portal is destroyed, and the dinosaur is roasted from the flash.  The roasted dinosaur smells good, like chicken, and the scientist's son (who has been telling the story) takes a bite to see what it tastes like.  He says "It resembled chicken the way an asteroid resembles Jupiter."   It tastes fantastic. With all of their work ruined, and the ruins of a fortune in expensive equipment scattered around them, the scientists and the labworkers all chow down on dinosaur.  Half raw, half burned to a crisp from the explosion.  They eat the dinosaur down to the bones.  They start breeding the dinosaurs, and sell them as food.  The guy's father makes a fortune selling dinosaur meat, but remains unhappy.  With money from selling dinosaur meat, he rebuilt his lab but never ever got the portal steady enough to actually visit the past or take samples.  Does anyone know the name of the story and the author, and maybe what collection it might have been in?


How to enable virtualization via PowerShell on Win10, HP laptop? Reason why I am not doing it this way: Go to Windows Settings Click on Update & Security Now click on Recovery Click Restart now under Advanced startup Go to Troubleshoot Click on Advanced Options Now click on UEFI Firmware Settings Click Restart. --> My monitor on the laptop is broken, and thus I use an external monitor, when I go restart, I see the broken monitor "light up", but this restartu modus doesnt switch on the external monitor...

Lately my laptop (HP g42 247sb) screen is damaged, so I hook it up with an external monitor (LG something) and it works fine now.  The only annoying thing is I cannot navigate the BIOS menu for some tweaking because the BIOS not shown on the external monitor, instead, it only shown on the broken laptop screen, and  it only output to my external monitor when Windows/OS is logged-on.  So, is there anyway I can force output during BIOS/BOOT/POST to my external monitor?  Things I have done and didn't work:   Set my LG monitor as primary display on both window properties and Intel Graphics panel  Enter the BIOS (F10 key) and press the Fn+F4 key (change display output). Disable and uninstall my internal screen (broken laptop screen) using device manager and restart, but Windows (BIOS?) install it back on log-on. Closed lid/Magnet on sensor.


Curious what the best way is in Java to get the mime-type of a file. It should actually inspect the file because filenames aren't an accurate indicator.   Currently I'm using the following which seems to be very hit or miss    is = new BufferedInputStream(new FileInputStream(fileName));   String mimeType = URLConnection.guessContentTypeFromStream(is);   if(mimeType == null) {     throw new IOException("can't get mime type of image");   }

How do you get a Media Type (MIME type) from a file using Java?  So far I've tried JMimeMagic & Mime-Util. The first gave me memory exceptions, the second doesn't close its streams properly. How would you probe the file to determine its actual type (not merely based on the extension)?


Which of these is preferable in a formal essay?  He thinks that the King will fall ill. He thinks the King will fall ill.  This can be extended to other words, like knows, predicts, or concludes. But what troubles me is that there seems to be no accepted answer for all words. For example, it sounds more natural to write  He predicts that it will rain today.  than without "that". But it also sounds more natural to write  He thinks it will rain today.  than with "that".

He will understand that I was not joking.   He will understand I was not joking.  Which of the sentences is correct? Are there any specific rules about the use of "that" in the sentences I reported as example?