Why to use thread class when we have runnable interface in java?

We can create a thread in Java either by implementing Runnable interface or by extending Thread class and implementing Runnable interface is preferred because  multiple inheritance is not supported in case of classes,then why would one go for extending Thread class as it seems that implementing Runnable is more beneficial? Can anybody please tell me some practical application where thread class is extended for the creation of thread.  Thanks in advance for the help.


console.log("1,2,3".split(",").map(parseInt))   prints  [1, NaN, NaN]   why?


java. i have known "A float is generally subject to round-offs in its 8th significant digit",and using double will avoid that problem.  can anyone tell me  why it will round-offs in its 8th significant digit.


At what time of day does time value fall off of a call option?

As days tick off of call options, time value decays. My question is does that happen automatically at 9:30AM at market open or does it get continuously deducted as the day ticks on?


Beta regression where fractional response adds up to 100%?

I have a data set of people switching brands. Say #people switching from Brand A to Brand B, C or D.  My data looks like this Week   | Brand   | %Switchers | Price  Week 1 | Brand B | 10%        | 10  Week 1 | Brand C | 50%        | 8  Week 1 | Brand D | 40%        | 9  I have such data for 104 weeks. Note that sum of switcher to Brand B & C & D will always sum to 100. I want to model the influence of Brand & Price on switching behavior.   Since this is a proportion data, I am applying beta regression model on to it. My equation is   betareg(%Switchers ~ Brand + Price)  The model coefficients are significant & model fit is decent. However, the while I predict switching behavior across brands I am finding that sum(%Switchers) along Brand B Brand C Brand D are beyond 100% (which doesn't make logical sense).   While I can see where this is coming from (the model doesn't know that sum(%Switchers) is 100% in a given week), I am stumped as to how to interpret such scenarios? Also, is there some other model with will allow me to model proportions and limit their sum to 100% in a given week.    Edit: My problem is not that some proportions are zero or one. It is that sum of proportions in a given week are 1. Hence, IMHO, zero-one inflated beta regression doesn't particularly help.  Edit: I don't know why it is marked duplicate of another question. I am specifically mentioning that the linked questions doesn't help answers my key question viz What if switching probaility across brands come out to be greater than 100%


I am curious to know how much having high rep helps in getting a good job. Does it even play a role or it's just only for one's own satisfaction?  I joined Stack Exchange 2 months back and am only active on SharePoint Stack Exchange, I did realize that having High Rep there is quite difficult but to be honest it doesn't matter because while solving a problem you learn 10 more things.  Does gaining reputation plays any role getting a better job?


Open browser window at specified screen / coordinates

A customer has a 6-screen setup for each workstation and would like various pages of a web app to be opened automatically in each of the screens on startup or invoking a shortcut. (The target web browser is likely to be Chrome).  I wondered whether it would be possible to use Javascript window.open to do this but one possible snag is the customer may wish to have tabbed browsing with popup blocker turned on. (OK, these could be overridden but such config is currently out of our control...)  So the question is: Could a script (e.g. batch file) be written to open multiple instances of the browser at specified coordinates within the 6 screens (each pointing to different URLs)?  [This is basically the same question as  but for Windows instead of Ubuntu.]


Sci-fi novel series with older people transferring their minds into younger bodies

All I remember is that the premise is that these old people put their consciousness into younger bodies, and they all have different symbols on their bodies denoting their role in society. I think the main character is a girl who has the "empty" symbol. At some point they all wake up from their pods (they're in space but they don't find out until later in the book). I wanna say that there's one character named O'Malley who is the politician/diplomat role. The kids take over the ship at some point and land it on some planet (I think this is where the first book ends and the second begins?) It is a series and sorry that this is all I remember, it's bits and pieces but hopefully someone knows what it is...


Why does the vacuum even have permeability and permittivity?

The vacuum is empty, yet it seems to have 2 properties: it's absolute permeability and absolute permittivity, which have specific, finite, non-zero values.  Why?  Why are the vacuum permeability and permittivity non-zero and non-infinite?  What would a universe in which the vacuum permeability and permittivity were zero look like?  What would a universe in which the vacuum permeability and permittivity were infinite look like?


How to run bash script on ssh authentication failed?

How to run a bash script on ssh authentication failed? I need to notify end user that someone tries to login in his machine?  Something like : $RHOST + $(date)  Where should I put my bash script and how can I get values as IP, USERNAME from where request comes?


What is a good complex analysis textbook, barring Ahlfors's?

I'm out of college, and trying to self-learn complex analysis. I'm finding  text difficult. Any recommendations? I'm probably at an intermediate sophistication level for an undergrad. (Bonus points if the text has a section on the Riemann Zeta function and the Prime Number Theorem.)


How can I stretch the spacing between consecutive lines in an align* environment? I have a few lines with \fracs in which both the numerator and the denominator consist of textual phrases, not math symbols, and the result looks too cluttered.  \begin{align*} X &= \frac{\textit{Some text here}}{\textit{And some text here}}\\ Y &= \frac{\textit{Will make everything}}{\textit{Look too close together}} \end{align*}


Intermediate certificate not sent to clients?

I have installed intermediate certificate on server according to all tutorials for IIS, that is: "Certificates MMC snap-in, you choose computer store, you'll have the option to place the intermediate certificates"  When I access the service on server machine the certificate chain is correct (root cert -> intermediate cert -> my cert). However when I'm trying to access this page from client site I see only my cert in certificate chain (meaning there's no intermediate cert).  If I understand correctly (from what I've read in different topics here) I should install intermediate cert only on server machine and it should be sent to clients, no need to install intermediate cert on client machines? Is this right?


Math.sin(30*Math.PI/180) returns 0.49999999999999994 in Javascript

I tried to calculate the sine of 30 degrees, just for testing and JS returns 0.49999999999999994. The correct answer is 0.5. Can someone explain why sometimes the calculation in JS going in such way?


I want to create a sports simulation game, something along the lines of Championship Manager (if you're not familiar, you can check out ). It's essentially a 2D game with top-down view, with the exception that the ball seems to behave as if it was 3D.  Given that the game is almost entirely 2D and only the ball is 3D, is there a good way to deal with that without making an entirely 3D game just because of the ball? Can the ball be hooked into a 3D physics engine, the rest to a 2D engine and somehow reconcile the two, then when rendering, just make the ball grow the higher it goes and show a shadow, or something along those lines?


How to make a gradient for text from color to color?    .gradient {      background: linear-gradient(to right, blue, green 100%);      -webkit-background-clip: text;      -webkit-text-fill-color: transparent;      font-size: 300%;   }
COUNTRY


I downloaded Minecraft and downloaded 2 resource packs. When I went to the .minecraft folder, there was no \resourcepacks folder. Is this a bug, or because I'm running Windows 8, or what?


I've just had a  and failed it. I wanted to downvote it and then comment, since I had seen that exact question awhile ago, and the answer I had to review was mentioning the exact same approach as what I clearly remembered as the top answer, if not top answers, except it was way less complete than the answer I clearly remembered. I wanted to downvote it for lack of originality (using the same tactic as all the other answers) and I wanted to comment explaining that. I also made sure to check the timestamp, and it said 10 minutes ago.  I'd like to know, is it bad if you don't pass an audit? Also, has anyone else ever been in a situation like this at all?


Eigenvalues of symmetric matrices are real without (!) complex numbers

Is there any proof of the fact that the eigenvalues of symmetric matrices (i.e. $A\in\mathbb{R}^{n\times n}$ with $A^t=A$) are real without the use of the concept of complex numbers?


Entering a black hole, jumping into another universe---with questions

I'm quite familiar with SR, but I have very limited understanding in GR, singularities, and black holes. My friend, which is well-read and is interested in general physics, said that we can "jump" into another universe by entering a black hole.  Suppose that we and our equipments can withstand the tidal forces near black holes. We jumped from our spaceship into a black hole. As we had passed the event horizon, we couldn't send any information to the outside anymore.   Can this situation be interpreted as that we were in another universe separate from our previous universe? Is there corrections or anything else to be added to above statement?


Apparently, when it was in the cop compound, it was able to turn off the lights and pretty much nail every cop on first shot. Pretty neat that the T-800 series could see in night vision, probably something that Kyle Reese should have mentioned!


how to stop 20.04 LTS from managing moz firefox updates

I just upgraded a workstation from 18.04 LTS to 20.04 LTS over the web.  I use Mozilla Firefox production download tar.bz2, not a .deb from an Ubuntu repository.  The upgrade automatically installed the Ubuntu version of Firefox.  I manually removed this Ubuntu-automatically installed version with apt purge and the like, although before doing so I did, as root, mv /usr/lib/firefox /usr/lib/firefox-distro so that the Ubuntu version can be accessed.  In the Mozilla production version, when I select within Mozilla Help -> About Firefox, the "check for updates" box appears, but cannot be activated, and the usual check with "Firefox up to date" (after an automatic checking by Firefox and unless an update is needed) does NOT appear.  From   Note: If you use your Linux distribution's packaged version of Firefox, you will need to wait for an updated package to be released to its package repository. This article only applies if you installed Firefox manually (without using your distribution's package manager).  End excerpt. How to I get Firefox NOT to be under the update control of the "distribution's package manager"?


I would like to redirect users to my home page when the requested page or post cannot be found, but don't know how to go about with that.  How do I proceed with such and action?


This question is from Book of Proof by Richard H. Hammack. This is exercise number 13 of chapter 3 section 6. This is exercise I think is related to Pascal identity, but I'm struggling to understand it.


Every closed set in a separable metric space is the union of a perfect set and a set which is at most countable

Prove that every closed set in a separable metric space is the union of a (possibly empty) perfect set and a set which is at most countable.    (Rudin's Principles of Mathematical Analysis, 3rd ed., Chapter 2, Problem 28)  Now I've managed to hit upon a proof using the preceding problem (which can be generalised) as follows:   Let $X$ be a separable metric space, $E \subset X$, $E$ is uncountable, and let $P$ be the set of all condensation points of $E$. Prove that $P$ is perfect and that at most countably many points of $E$ are not in $P$. In other words, show that $P^c \cap E$ is at most countable.   Now what bothers me is what Rudin states as the corollary to the result he asks us to prove in Problem 28. Here's what he states:   Every countable closed set in $\mathbb{R}^k$ has isolated points.   How to prove this from the original result?   Can we also state the following?   Every countable closed set in a separable metric space has isolated points.


Where does all the energy in the universe come from?

The principle of conservation of energy says that all energy in a system will remain the same. It can just be transformed.  The universe contains a huge amount of energy, but where did it come from?  I know there isn't that ONE answer, but I'm curious as to what the thoughts and theories about this question are.


Showing that $\int_{0}^{\infty} \frac{dx}{1 + x^2} = 2 \int_0^1 \frac{dx}{1 + x^2}$

I was reading an article in which it was stated that, with a change of variable, one could show that:  $$\int_{0}^{\infty} \frac{dx}{1 + x^2} = 2 \int_0^1 \frac{dx}{1 + x^2}$$  I tried with $t = 1 + \frac{1}{x}$ but that doesn't work out, especially because the lower bound doesn't become $0$.


Amount of energy required to keep 1 kg object above the ground?

Imagine that I lifted 100 kg object 1 cm above the ground and keep it there. I would like to know how much energy do I need to spend to keep this object there? I understand that in basic sense energy required is 0.  But in reality, I spend energy to keep say my hand rigid to keep the object lifted. Or I can attach a drone to the object and burn gasoline to keep it afloat. Any formulas?


What does the idiom "for good" come from?

I'd like to know why this means forever. As a foreign English speaker, when I heard this idiom I thought it meant like for something good.  What was the origin of "for good" ?


Macbook Pro 16" Clamshell Mode Power Delivery with 2 USB-C PD Monitors

I wanted to know if there is difference in terms of charging the battery when a MacBook Pro 16" is connected to two monitors via USB-C, both with Power Delivery capability.   In this specific case I am talking about the LG 27UK850-W monitors. The MacBook Pro 16" will be connected via USB-C to both of them and use them as external monitors. Since both can charge it as well, will the MacBook Pro  charge faster while being connected to both or will just one monitor be able to deliver the charge at a time?


How could Ronan use the power of the Infinity Stone without having physical contact with it?

In Guardians of the Galaxy, Ronan the Accuser possesses the Infinity Stone of Power and smooshes installs it into a large hammer he uses as a weapon.    Once it's in the hammer, he doesn't have physical contact with the stone, so how does he harness its power and use it as a weapon?


If $n>1$, can $2^n-1$ be a power of $n$? I have tried some modular arithmetic but there is probably an easy solution that I am missing.


I have a home server which has Wake On Lan configured and I am able to wake the server using a simple program on Windows 7. My question is if I have a router with WOL support will this allow me to wake the server from any device or program when they try to access the server?  Example: A Raspberry Pi with XBMC attempts to access a shared drive on the server to watch a video, will the router then wake the server?


I have only one minute system monitoring in my current setting.  I would like to have longer scale.   How can you have longer timeline of network history in 14.04?


Auto-increment ids with multiple inserts in mysql/mariadb

Suppose I have a table with an auto_increment column, and then insert multiple values in a single statement:  insert into foo (bar) values ('a'), ('b'), ('c');  From the documentation, last_insert_id() returns the first generated ID for the query, the ID for a in this case.  Does mysql give any guarantees that a b and c will then be assigned sequential values?  In other words, if last_insert_id() returns 1 for a, is there any guarantee that b = 2 and c = 3? Or could there be a scenario where due to multiple concurrent inserts, I could end up with something like "a = 1, b = 5, c = 9"?


I have given the same font size(2em) to all divs. But the font size in #left and #right is obviously bigger. I have no idea why the browser gives this result.  Here's a code snippet:    div {   color: white;   font-size: 2em; }  #header {   width: 100%;   height: 120px;   background: #99ff00; }  #main {   width: 100%;   height: 400px;   background: #99ff99; }  #left {   width: 30%;   height: 100%;   float: left;   background: #999999; }  #right {   width: 70%;   height: 100%;   float: left;   background: #553344; }  #footer {   clear: both;   width: 100%;   height: 80px;   background: #66ff66; }
header

left

right

footer


What should I do when relative comparison of two equal doubles doesn't work?

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?


I want a utility that does something like this:  email --subject="xxx" --body=body.txt --to=to_address@hostname.com   (using pre-configured sender information for e.g. gmail). Note that body.txt is plain text and should be the body of the message, not an attachment. If the body is omitted it should pop up an editor and let me type in my message that way.  I could hack together a quick script that does this, but I was wondering if there's an easy way to do this with common unix tools?


Question solve in $C$ :   $P(z)=z^4+2z^3+5z^2+4z+1=0$  where $P(i+-\frac{1}{2}+i\frac{\sqrt 3}{2})=0$   My attempt :   Let $\lambda=i-\frac{1}{2}+i\frac{\sqrt 3}{2}$  $(2\lambda+1)^2=(i(2+\sqrt 3))^2$  $(2\lambda+1)^2+7)^2=(-4\sqrt 3)^2$  $({\lambda}^2+\lambda+2)^2=3$  So we find :   $\lambda^2++2\lambda^3+5\lambda^2+4\lambda+1=0$  But which step !?  can be find  all root of P(z) !!


STM32F105 stop executing after 16 seconds

I'm facing an issue with an STM32F105 microcontroller which with a simple code executing in a while loop it stops after 16 second here is code which I don't think there is a problem with the code since it runs fine on STM32F103 while (1)   {       uint8_t frame[8] = {'H','E','L','L','O','W','O','R'};       CAN1_TX(0x110110,8,frame);       HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_1);       HAL_Delay(500);       CAN1_TX(0x110110,8,frame);       HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_2);       HAL_Delay(500);   }  void CAN1_TX(uint32_t id,uint32_t dlc,uint8_t frame[8]){     char msg[50];     CAN_TxHeaderTypeDef TxHeader;     uint32_t TxMailbox;     TxHeader.DLC = dlc;     TxHeader.ExtId = id;     TxHeader.IDE = CAN_ID_EXT;     TxHeader.RTR = CAN_RTR_DATA;     if(HAL_CAN_AddTxMessage(&hcan1, &TxHeader, frame,&TxMailbox) != HAL_OK){         Error_Handler();     }      while(HAL_CAN_IsTxMessagePending(&hcan1, TxMailbox)); }  The two leds blinks for 16 seconds and then they stop. When I changed the delay to 500 it blinks now for 8 seconds only. The problem is from the CAN_TX functions the problem only happens when CAN1_TX or CAN2_TX added Debugging didn't help after that 8 seconds the debugger don't show any problem or where it is hanging EDITED** Now after more digging.I changed the CAN mode to LOOPBACK and the problem disapeared it seems that the problem only happens on normal mode but why ?  when I switch back to normal mode the problem came back please note that the CAN_TX does not work now while it was sending frames yesterday here is the clock config in case it has anything to do with this issue


I updated to High Sierra on my Macbook Pro when it was released. Since I have updated, a lot of my applications show the attached icon when I open them. Does anyone know a fix to this?


How come Snape and Lily have the same patronus?

Why is Severus Snape's Patronus the same as Lily Potter's? Are Snape and Lily related somehow? Are Snape and Harry related?


How to interpret a negative linear regression coefficient for a logged outcome variable?

I have a linear regression model where the dependent variable is logged and an independent variable is linear. The slope coefficient for a key independent variable is negative: $-.0564$. Not sure how to interpret.   Do I use the absolute value then turn it into a negative like this: $(\exp(0.0564)-1) \cdot 100 = 5.80$  or  Do I plug in the negative coefficient like this: $(\exp(-0.0564)-1) \cdot 100 = -5.48$  In other words, do I use the absolute figure and then turn that into a negative or do I plug in the negative coefficient? How would I phrase my findings in terms of a one-unit increase in X is associated with a __ percent decrease in Y? As you can see, these two formulas produce 2 different answers.


A permanent magnet produces lines of magnet flux that we call a "magnetic field".  Those lines come from inside the magnet, come out of the N pole, loop outside the magnet, & return back into the S pole to complete a magnetic circuit.  Using ferromagnetic materials, other magnets, &/or test equipment, we feel & measure forces that are caused by a magnet/s when other materials are placed within close enough proximity to the magnet/s (i.e. within their magnetic field/s).  We therefore conclude that the magnetic lines flow in a specific direction & exert definite forces (i.e. magnitudes/strength) on some materials (ferromagnetic & other magnets), depending on where those materials are placed within the magnetic field of a magnet/s.    We label those forces as "H Field" & "B Field". We measure H in terms of Amperes/meter. We measure B in terms of Newtons/meter/Ampere (or Tesla). We also commonly defined B in terms of the force that it exerts on moving electric charges (i.e. the Lorentz force).  An "Ampere" is basic unit of electrical current in the SI system, which = 1 Coulomb per second--which is formally defined to be the constant current which if maintained in two straight parallel conductors of infinite length, of negligible circular cross section, and placed one meter apart in vacuum, would produce between these conductors a force equal to 2 × 10 −7 newton per meter of length.  A "Coulomb" is the standard unit of quantity of electricity in the SI system, which = the quantity of charge transferred across a conductor in which there is a constant current of 1 Ampere/Second.  Consequently, those "magnetic lines" are currents (or flows) of charges that don't appear to need any external source of energy to continue generating their currents.  We also know those magnetic lines exist inside a vacuum, so they are independent of air molecules to flow outside of a magnet.  So now my questions:   Exactly what charged particles are flowing outside (and inside) a permanent magnet that create the magnetic "lines"?   Do those particles come from something inside the magnet or does the magnet do something outside of it to affect unknown particles to make the lines? If there is a current (i.e. a continuous flow of charged particles), then why don't we harness that current like a water wheel (instead of 'using energy' to rapidly move copper wires through magnetic fields--like we do with electricity generators?)  Shouldn't we be able to get the line currents to charge a capacitor (or or other device) & then later discharge the capacitor for the energy that we want?


Taylor's polynomial uniqueness proof - why are these limits inferable?

So I'm viewing a short proof on the uniqueness of Taylor polynomials.     Uniqueness of Taylor polynomial:   Let $f:]a,b,[ \rightarrow \mathbb{R}$ $n$ times continuously   differentiable and $x_0 \in ]a,b,[$. If $p$ is $n$th degree polynomial   function for which       $$f(x)-p(x)=o(|x-x_0|^n), \space \text{when} \space x \rightarrow x_0$$  then      $$p(x)=T_{n, x_0} f(x)$$   Proof starts like:  $$\frac{p(x)-T_{n, x_0}f(x)}{(x-x_0)^n} = \frac{p(x)-f(x)}{(x-x_0)^n}+\frac{f(x)-T_{n, x_0}f(x)}{(x-x_0)^n}$$  then   $$\frac{p(x)-f(x)}{(x-x_0)^n} \rightarrow 0 \space, when \space x-x_0 \rightarrow 0$$  $$\frac{f(x)-T_{n, x_0}f(x)}{(x-x_0)^n} \rightarrow 0 \space, when \space x-x_0 \rightarrow 0$$  Now my problem is, how can one actually say that the above approach $0$ if the denominator approaches $0$?


What are the advantages of the Unix file system structure

If I install an application in Linux for example Debian/Gnu Linux, the files of the applications are copied to many different directories in the file system.  Some scripts goes into /usr/share .. /usr/local some other files into /var .. /log .. etc/ and so on.  For me this is o.k because I learned something about the file system and most of the directories are there to hold files for a specific purpose. This fits very nice in the Unix philosophy "do one thing and do it well"  But my question is what are the advantages of such a directory structure? Or is it simply the heritage of the old unix days. (e.g in comparison with the one windows use, where all files for an application are in one specific "folder")


Find the leading order uniform approximation when the conditions are not $0<x<1$

$$\epsilon y''+y'\sin x+y\sin 2x = 0$$ with boundary conditions $y(0)=\pi$ and $y(\pi)=0$ as $\epsilon \rightarrow 0$. I don't know how to find out where the boundary layer is? I thought initially it was at $x=0$, but this just leads to the outer solution of $$y=Ae^{-2\sin x}$$ if I've done it correctly and applying the boundary conditions means $A=0$ or $A=\pi$. Am I right so far? What do I do now? I'm so lost. Any hints? Thanks!


how to set the AUTO_INCREMENT on Oracle?

I have a table with a Trigger that make a Auto_increment.   CREATE TABLE Auto     (    Auto_id NUMBER(*,0),          model_id NUMBER(*,0)    );   --Trigger   CREATE OR REPLACE TRIGGER  tr_Auto_autoident    BEFORE INSERT ON  Auto    FOR EACH ROW     BEGIN        IF inserting THEN         IF :NEW.Auto_id IS NULL THEN             SELECT seq_auto__id.NEXTVAL INTO :NEW.Auto_id FROM dual;         END IF;      END IF;  END;    ALTER TRIGGER  tr_Auto_autoident ENABLE;  I create the sequence too.   -- Sequence      CREATE SEQUENCE seq_auto__id ;   I would like to set the autoident to a fix value to start , because my table had previos values before the trigger Auto_incremente were set.   Thanks , any help is apreciated.


Suppose $\sum\limits_{n=1}^\infty b_n$ diverges and $b_n\gt 0$, show that the series $\sum\limits_{n=1}^\infty \frac{b_n}{1+b_n}$ also diverges

As the title says, given a series $b_n > 0$, where $\sum_{n=1}^\infty b_n$ is divergent:  Show that the series $$\sum_{n=1}^\infty \frac{b_n}{1+b_n}$$ is also divergent.  So I've defined the series as $\sum_{n=1}^\infty u_n v_n$ where $u_n = b_n$ and $v_n = \frac {1}{1+b_n}$.   I'm sure there was some sort of convergence test which stipulated that for a product of two series, if one diverges the entire thing does, however I might be mistaken. If so, how do I properly prove this?


How to install a list of packages using apt-get?

I have a fresh install of Lubuntu and would like to install packages from a given list, without having to type sudo apt-get install package_name. Is it possible?  I'm not talking about the post-install scripts, that is something entirely different.


Limit point of set $A=\{1/n:n\in\mathbb{N}\}$

Consider set $$A=\{1/n:n\in\mathbb{N}\}$$ show that 0 is only limit point. Though I prove that but to prove 1 is not a limit point. For this  consider neighborhood  $(1/2,3/2)$ of 1, so if we delete 1 from it we get points like 0.6 , 0.7, 0. 8 but the set $A$ also contains it as it is between 0 to 1. Please let me know where I am incorrect.


How to make rig that reacts to gravity or seem to behave physically correct?

Here's a nice, strangely familiar hat. It's rigged with three bones.    Let's say I want the hat to fall like a real hat would, and bounce around when the character which it's attached to moves. I could always do it manually, but that's no fun.    Is there any way to do this using Blender's physics system? I've seen some pretty clever jiggle-bone stuff using Bézier curves, Spline IK, and soft-body physics, but I've not found any way to make the curves act like a hat would, even after hours of playing with the settings.


Past Simple/Present Perfect. Result or fact?

The Oxford English Dictionary chose/has chosen the neologism 'omnishambles' as its Word Of The Year for 2012.  It's a result. It was chosen. And is true now. In my opinion it's better with Present Perfect. But my private tutor says it's a fact about the past, so it should be Past Simple. I need opinions of English gurus.


How to prove the convergence $\lim_{n\to \infty}\sqrt[n]{\frac{n!}{n^n}}=\frac{1}{e}$?

I played with the natural logarithm (injectivity) and ended with a Riemann sum. When n is converging against infinity, the sum converges against -1: $$\int_{0}^1 \log(x) \, \mathrm{d} x = \lim_{x\to 0} 1 \cdot \log(1)-1 -\left( x \log(x)-x\right)$$ I do not know if that is correct. Please help!


Subsection starting in same line as subsection name

Many articles are structured in the following way: 1. [Title of section 1] 1.1.[title of subsection 1.1].text of subsection 1.1 1.2.[title of subsection 1.2].text of subsection 1.2. 2. [Title os section 2] 2.1.[title of subsection 2.1].text of subsection 2.1 2.2.[title of subsection 2.2].text of subsection 2.2. How can I do that (in a proper way)? Thanks.


Inserting image in a two column word page

I am writing a report in a 2 column page format. Now I want to insert a rather large picture that requires to use full width of the page and cut the columns horizontally. How can I achiveve this? Please see the images below for what I mean :


Alternatives App Stores (iOS) : Security risks  Hi, I recently downloaded an iOS app from an unofficial store (GBA4iOS, from Builds.io website).  Before installing any application, you have to install the developper profile on your device.  Is there any security risks by using those apps?  I mean, can they bypass Apple restrictions? Access to Photos, Camera, GPS... without user authorization.


Play video from SAMBA share on Android--Any shared volume from Linux or Windows

I use Ubuntu12.10 with Gnomeshell.  Installed latest version of samba share, configured to share my Video folder, access restricted via login (uid and password needed).  SMB share accessed via Solid explorer when I tried to open the video file (size 600MB, type MKV) the player used BS Player MX Player were not able to play the file.. it says buffering and stops...  Any one has a solution to play video from Shared drive on Android?


Why is bash 'not always' showing the 'Terminated' message after killing a process?

Why does this difference matter? The two blocks in the code below differ by the last line:  #!/bin/bash if [[ -n "$1" ]]; then     sleep 1 &     p=$!     kill $p &> /dev/null else     sleep 1 &     p=$!     kill $p &> /dev/null     /bin/true # This line is the sole difference. fi   Name it a.sh, and I get (on my Linux box)  $ ./a.sh /a.sh: line 16: 18103 Terminated              sleep 1 $ ./a.sh foo $ # no "Terminated" message   Why no message in the second case? Bash's basic behavior is to print "Terminated" ().  (NB I use p=$! in my true code, but in the above case you can use kill $!.)  EDIT:  kindly referred to the question "" in a comment. (It's rather a digression, but fun reading.) Unfortunately, the answer that comment belonged to was deleted, so I here record it. Thanks Sergiy.


Help to interpret the ACF and PACF plots

I just exploring the sequential analysis with ARIMA (2-month data, period = 15 minutes, lags=360)   I struggle with understanding the charts I receive after applying acf and pcf operations.  My suggestion: As ACF is a measure of the correlation between the timeseries with a lagged version of itself, so it seems like each observation is correlated to its adjacent observations. Also I can see the downwards trend but that indicated the correlation decreasing after certain period.    Any help and thoughts are appriciated Data available


I am travelling to the USA with KLM and my routing is as follows:  BOM - CDG - AMS - ORD.  Do I require a Schengen visa (Airport Transit etc)?  My ticket is a single ticket and all connections are within 2 hours.  Please help.


Chinese remainder theorem problem application

Let A = $a_1a_2 \cdots a_n$ and let $c_i$ be inverse of $(\frac{A}{a_i})$(mod $a_i$). Now, let k = $\sum_{i=1}^n\frac{A}{a_i} \cdot c_i \cdot b_i$ (mod A). Using this, answer the following: Find the smallest natural n such that it leaves remainder 0,1,2,3 respectively divided by 2,3,5,7 respectively. Answer: We ignore the divisibility by 2 for now, and use Chinese Remainder Theorem on the numbers. We get n = 3$\cdot$5$\cdot$3 + 3$\cdot$7$\cdot$2 + 5$\cdot$7$\cdot$2 (mod 105) $\equiv$ 157 $\equiv$ 52 (mod 105) and we also have 2|52 so that 52 is the answer. Approach: First take 3$\cdot$5 as take 7 equal to $a_1$ now want to find the inverse of this mod 7 which is just 1 and wanted the congruence mod 7 as 3 (want it congruent to 3 mod 7) and have $\frac{A}{a_i}$ which is 3$\cdot$5 into its inverse $c_i$ which is 1 and then $\cdot$ $b_i$ equal to 3 so have 3$\cdot$5$\cdot$3 + now check for 5, 3$\cdot$7 is already congruent to 1 mod 5 so don't have to add any inverse here to make this 1 and want the congruence to be 2 so + 3$\cdot$7$\cdot$2, and 5$\cdot$7 is congruent to 2 mod 3 and want to find its inverse which is 2 so + 5$\cdot$7$\cdot$2 Question: I don't really know how to get the whole n = 3$\cdot$5$\cdot$3 + 3$\cdot$7$\cdot$2 + 5$\cdot$7$\cdot$2 (mod 105) reasonably by using the definition for k. Could someone please help explain how exactly to come up with it


What question tag should go with the following sentence:     That should be easy.   Will it be shouldn't that or shouldn't it or something else, and why?


How do you choose a PWM Frequency to drive a DC motor?

I can clock the PWM to drive motors at most any reasonable frequency, but is there a "best" PWM frequency for motor control?  What must be considered when choosing a PWM Hz? Is there a most efficient Hz per motor?  If so, is there a way to calculate that based on measured motor characteristics such as L, C, and R?    (This is the  we are using to drive an antenna rotor.)


Suppose 2 particles are placed at the origin of the real line.Every second they move one unit right or left with probability $0.5$ independent of the other particle and previous moves.I know how to compute the probability that they both be at the same place after $N$ seconds.I want to compute an analogue probability in the plane.This time 2 particles are placed at the origin of the real plane and every second they move one unit up or right or down or left with probability $0.25$ independent of the other particle and previous moves.I want to compute the probability that they both be at the same place after $N$ seconds. I don't know how to compute it.Any hint would be appreciated.


Run bash script at login stored in the home folder?

When I try to load a LaunchAgent plist from launchctl I can't find out how to run a script in the home directory.  My code is:  <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict>     <key>ProgramArguments</key>     <array>         <string>bash</string>         <string>~/script.sh</string>     </array>     <key>RunAtLoad</key>     <true/>     <key>Label</key>     <string>com.tyilo.test</string> </dict> </plist>   I have tried both with and without bash and also replacing ~ with $HOME. I have also tried using bash -c without it working.  The error code is:   `com.tyilo.test: bash: ~/script.sh: No such file or directory`


On Scribblenauts Remix level 4-3, how do I get the psychologist/psychiatrist to enter the cell?

On level 4-3 of Scribblenauts Remix, you need to get all the cells open by causing the specialists to enter them.  Three are easy, but the fourth cell, which has a Psychiatrist outside, is just baffling me.  There's actually an in-game hint that says "The Pyschiatrist will calm a panicked prisoner" but no matter what potions I apply to my prisoner (like "insane" or "depressed" or "panicky") the dude ignores him.  Trying to literally make a "panicked potion" doesn't work, giving me a plain potion.  How in the word do I get this psychiatrist's attention?!  P.S. Giving the prisoner a "suicidal potion" will just kill him, heh.


How to prove $1$,$\sqrt{2},\sqrt{3}$ and $\sqrt{6}$ are linearly independent over $\mathbb{Q}$?

How do I prove that $1$,$\sqrt{2},\sqrt{3}$ and $\sqrt{6}$ are linearly independent over $\mathbb{Q}$? $\mathbb{Q}$ is the rational field.  I want to know the detail about the proof. Thanks in advance.  Actually I know any two of them and three of them are linearly independent.


How to keep column headers with attribute table join

I successfully joined an attribute table to a shapefile using the method below.    But the new attribute table does not include the original column headers from the joined table. They've been replaced with something generic. See below.    Is there a way to keep the original column headers from the table that was joined?


Is it correct to write 'an'in the sentence "proud of being 'an' LSRite", where LSR is an acronym?


Prove that the expression cannot be a power of 2

I have been boggled by this question for a while as well. Prove that $$(2a+b)(2b+a)=2^c$$  Is impossible.  I know that if a and b do exist then they must be even. I am trying to use this fact to contradict the statement. I haven also tried rewriting a and b as products of powers of twos and a odd factor


This is a follow up question to     Recently I decide to stop ignoring LaTeX warnings :), and start trying to discover what's behind them and how to avoid them in future (or solve the problems informed when they are real).   One of those warnings, which I thought I had already understood, was pdfTeX warning (ext4): destination with the same identifier. Now I know that it is related to a  hyperref package confusion regarding subequations (at least).  Why are these warnings displayed? Are they unimportant? How can avoid them or at least silent if they don't afect my texts? What are the known incopatible packages with hyperref?  Below is a MWE. Compiling it just like it is showed will result five warnings of the same type. More and more warnings show up using subnumcases and empheq packages for creating subequations in the same project (to test them uncomment \usepackage{empheq}, \usepackage{cases}, and the three final equations).  \documentclass{article}  %\usepackage{silence}  \usepackage{hyperref}    \usepackage{mathtools} %loads amsmath %\usepackage{empheq}  %\usepackage{cases}  \begin{document} \section{\LaTeX~MWE}  hyperref + subequations problem:  \begin{subequations}\label{group1} \begin{align} a1 \label{a1} \\ a2 \label{a2} \\ a3 \label{a3} \end{align} \end{subequations}  \begin{subequations}\label{group2} \begin{align} b1 \label{b1} \\ b2 \label{b2} \\ b3 \label{b3} \end{align} \end{subequations}  %\begin{subnumcases}{}   %X \label{X} \\   %Y \label{Y} \\   %Z \label{Z} %\end{subnumcases}  %\begin{subequations}{}   %\begin{empheq}{align}   %A  \label{A} \\    %B  \label{B} \\   %C  \label{C}  %\end{empheq}  %\end{subequations}  %\begin{subequations}  %\begin{empheq}{align}          %l \label{l} \\      %q \label{q} \\      %x \label{x}   %\end{empheq} %\end{subequations} \end{document}   I found many topics topics that may be related but in none of them I found a definitive answer to my questions. In the post  a workaround that can be usefull in my case was suggested (but I don't know the cleveref package yet).


Does a spell cast using a 10th-level spell slot count as a 10th-level spell?

The Enlightened Magic feature of the  (DMG, p. 222) allows for 10th-level spell slots per .  Nothing seems to disallow level 10 spell slots, but would the spells cast with these slots assume level 10? There are two relevant rules as far as I'm aware. The section on  says:     When a spellcaster casts a spell using a slot that is of a higher level than the spell, the spell assumes the higher level for that casting.    However, the section  says:     Every spell has a level from 0 to 9.    These seem to contradict if the case of a 10th-level spell slot with Enlightened Magic would allow for level 10 spells considering the definition of spell level.  Since Spell Level is defined between 0 and 9, what happens to a spell's level if you cast a spell with a 10th-level spell slot?


Why we need the SD line(magenta) and how does it help us,  besides just passing through all standard units of x and standard units of y pair points on the xy plot?  The SD line goes through the point of averages, and has slope equal to SDY/SDX if the correlation coefficient r is greater than or equal to zero. The SD line has slope −SDY/SDX if r is negative.


Transferred hosting and website not online during transition for 2 weeks - will this affect search results?

If a website's hosting is being transferred and is not online in between for approx. 14 days - would this affect the organic search positions when it's finally transferred? When they've since disappeared entirely from the search results?  NOT A DUPLICATE.


I want to show that on a geodesic we have for a particle   $$\nabla_mT^{mn}=0$$   where   $$T^{mn}=\frac{m}{\sqrt{-g}}\int d\tau~ u^mu^n\delta^4(x-x(\tau)).$$   So I found  $$\nabla_mT^{mn} =\partial_mT^{mn}+\Gamma^m_{ml}T^{ln}+\Gamma^m_{ml}T^{ln}\\ \partial_m\left(\frac{m}{\sqrt{-g}}\int d\tau ~u^mu^n\delta^4(x-x(\tau))\right) =\frac{m}{\sqrt{-g}} \times \\ \int d\tau \left[(\partial_mu^m)u^n\delta^4(x-x(\tau))+ u^m(\partial_mu^n)\delta^4(x-x(\tau))+u^m u^n \partial_m\delta^4(x-x(\tau))\right]$$  How do I continue from here? I know that I will eventually need to use the geodesic equation and the $\delta^4(x-x(\tau))$ term will cancel stuff. But how do I use these things here?


What is the difference between Disk and Disc?

I have come across both, but find it difficult to distinguish the difference.


Proving $\cos A \cdot \cos 2 A \cdot \cos 4 A \cdots \cos 2^{n-1} A = \frac{\sin 2^n A}{2^n \sin A}$

Just a bit of background on the question: When proving:  $$\cos\frac{\pi}{15}\cdot \cos\frac{2\pi}{15} \cdot \cos\frac{3\pi}{15}\cdot \cos\frac{4\pi}{15} \cdot \cos\frac{5\pi}{15} \cdot \cos\frac{6\pi}{15}\cdot \cos\frac{7\pi}{15} = \frac{1}{128}$$  The following formula was used:     $$\cos A \cdot \cos 2A \cdot \cos 2^2A \cdot \cos 2^3A\cdot \cdots \cdot \cos2^{n-1}A = \frac{\sin 2^n A}{2^n \sin A}$$   I'm just interested to see how this is derived. The question assumes that this formula is memorised and known beforehand, but it looked interesting to me since I'd actually never come across it before.  If anyone's interested, I'll link full proof for the question   Cheers in advance!


Reinstall commercial software (e.g. oil rush, steelstorm etc.)

After a reinstall of Ubuntu 12.04 ,it's impossible to install commercial games, e.g Oil Rush. It gives this error:  Failed to fetch https://private-ppa.launchpad.net/commercial-ppa-uploaders/oilrush/ubuntu/dists/oneiric/main/binary-amd64/Packages  The requested URL returned error: 401 Failed to fetch https://private-ppa.launchpad.net/commercial-ppa-uploaders/oilrush/ubuntu/dists/oneiric/main/binary-i386/Packages  The requested URL returned error: 401 Some index files failed to download. They have been ignored, or old ones used instead.   I bought these games in 11.10, but I installed these games in 12.04 before... How can I solve this problem?


I have an enum construct like this:  public enum EnumDisplayStatus {     None    = 1,     Visible = 2,     Hidden  = 3,     MarkedForDeletion = 4 }   In my database, the enumerations are referenced by value. My question is, how can I turn the number representation of the enum back to the string name.   For example, given 2 the result should be Visible.


I have a subset $B = \{(x,y) : x^2 + y^2 \leq 1 \} \subseteq \mathbb{R}^2$.  I am trying to prove that function   $g(x,y) = (\frac{x^2 + y^2}{x^2 + y^2 + 1}x, \frac{x^2 + y^2}{x^2 + y^2 + 1}y)$  is an injective function $g: \mathbb{R}^2 \rightarrow B$.  I attempted to prove this by directly applying the definition of injection.  Suppose we have $(a,b),(c,d) \in \mathbb{R}^2$ such that   $g(a,b) = g(c,d)$.   If I can prove $g(a,b) = g(c,d) \implies (a,b) = (c,d)$,  then $g$ is an injective function.   $g(a,b) = (\frac{a^2 + b^2}{a^2 + b^2 + 1}a, \frac{a^2 + b^2}{a^2 + b^2 + 1}b)$, $g(c,d) = (\frac{c^2 + d^2}{c^2 + d^2 + 1}c, \frac{c^2 + d^2}{c^2 + d^2 + 1}d)$  Since $g(a,b) = g(c,d)$, $\frac{a^2 + b^2}{a^2 + b^2 + 1}a = \frac{c^2 + d^2}{c^2 + d^2 + 1}c$.  Furthermore, $0 \leq \frac{a^2 + b^2}{a^2 + b^2 + 1} < 1$ and $0 \leq \frac{c^2 + d^2}{c^2 + d^2 + 1} < 1$.  I want to have $\frac{a^2 + b^2}{a^2 + b^2 + 1} = \frac{c^2 + d^2}{c^2 + d^2 + 1}$,  and for that I need  $\frac{a^2 + b^2}{a^2 + b^2 + 1} \leq \frac{c^2 + d^2}{c^2 + d^2 + 1}$ and $\frac{c^2 + d^2}{c^2 + d^2 + 1} \leq \frac{a^2 + b^2}{a^2 + b^2 + 1}$.  which I am not so sure how to get.  Is this a valid approach to reaching the conclusion $a = c$?  Thank you for reading.


If you want to inform someone in advance to do something early enough so the person won't be in trouble later, do you say on time or in time? It's not a specified time, like order it today between 12 and 2, it's more of a better do it now than later suggestion?  What's right here?


i am working on assignment where i define following dictionary  Dictionary<string, List<fileInfo>> myDic = new Dictionary<string, List<fileInfo>>();   where  public class fileInfo     {         public string fileFullName;         public double tf;         public double idf;         public double tf_idf;         public double cosineSim;          public fileInfo()         {             fileFullName = null;             tf = 0.0;             idf = 0.0;             tf_idf = 0.0;             cosineSim = 0.0;         }     }   now i want to sort the list with respect to COSINESIM


When refilling toner, why only to half capacity?

I am refilling my laser printer Samsung CLP 365. Toner supplier attached some not very impressive instructions paper that looks like just copied off google frankly. (Not in english)  It says toner cartridge should be refilled with a pre-measured amount to only half the cartridge capacity. Is this really necessary? I cannot find any instructions on the internet that also say that. There are many videos on YouTube showing how refilling is done, neither mentions it.  The instructions:


"Synyster Gates/Gates' being left handed"

I texted a friend "I was wrong about Synyster Gates being left handed" earlier this morning, and I realized that I don't know if the word "being" here is something Gates possesses, or if it is a verb. I am leaning toward it being something Gates possesses.  Which sentence is correct? "I was wrong about Synyster Gates being left handed." Or "I was wrong about Synyster Gates' being left handed?"  Also, I couldn't find a previously asked question about this topic, but please point me to it by providing a link if there is one.


How can code (reliably) detect a change in itself?

Supposed I have written a program, and I want to make sure that its code will not be changed (for now, let's assume we are using an interpreted / scripting language, so "just compile it" is not a valid answer).  So I would like to detect if someone changes the code. How can I do this reliably?  The most obvious way is to hash the code, put the hash into the code, and verify it - but of course this does not work, as it is pretty easy to simply rehash the code. You would have to know the hash in advance and put it into it while calculating the hash, but this is a chicken-egg problem, obviously.  Are there any other options that are reliable?


What is the reason to quote executable code with `.........'?

I was reading through the  and noticed an expression inside a comment was quoted this way:  /* `stakbot' is preserved by this routine */    ^^^^^^^^   also the       The command `bye' is identical to `exit'   and IIRC the zsh man pages use this same notation. Why?    Is it to prevent the code from being accidentally being interpreted as a backtick expression and executed ? or is it simply a convention?


How much can I get from only one datapoint?

I will be soon ending my bachelors degree and choosing masters major. In my interest is newly opened major and I managed to get information about last years recruitment process, namely how many people actually went for recruitment process. Knowing this fact I started to wonder how much can I actually infer from that information. After all this is minimal dataset of just one entry. However I also thought that it is not a totally random process and there shouldn't be much variation in such a case. My question is then - how would you draw a conclusion and how sure would you be about it in the case of process that is rather known (recruitment), but you have only small piece of information about it?


Centos 6 Server Hacked - File being generated

I have 3 servers working as a proxy load balance. Someone has gained access to them and is somehow creating an index.html in my webroot containing advertisement and an iframe on my main index.php file.  I'm not sure how they are doing this because even if I delete the index.html file across all of the server I can return half a day later to see that it has been done again.  I noticed that there was a web shell script on the server and deleted it. I also changed sshd_config so that only one user is able to login and all other accounts can't. Somehow they are still accessing the servers and making these changes. History doesn't show anything.  I need to get this resolved ASAP.  Can anyone make any suggestions?  Thanks!


I set all about encoding to utf8. but browser show me '???????'. My settings are below.    MySQL "show variables like 'c%'"  character_set_client     | utf8 character_set_connection | utf8 character_set_database   | utf8 .... (all utf8)   MySQL my.cnf  [client] default-character-set = utf8 [mysqld] init_connect="SET collation_connection = utf8_general_ci" init_connect="SET names utf8" character-set-server = utf8 collation-server = utf8_general_ci [mysql] default-character-set = utf8   In all my PHP file included:  <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />   Apache2 httpd.conf  AddDefaultCharset Off (if utf-8, show me '???' ,too)   In MySQL console, (database is dumped)  SELECT name from campagin LIMIT 1     => print in working order, not '????'       I don't know what is problem.  For reference, I test this case.. in test.php  <?php     mysql_connect('localhost','root',ROOT_PW);     mysql_select_db(TEST_DB_NAME);     mysql_query("INSERT INTO a SET msg='안녕하세요'"); // char is KOREAN, meaning 'Hi'     $res = mysql_query("SELECT msg FROM a LIMIT 1");     $row = mysql_fetch_assoc($res);     echo $row['msg']; ?>     => this print '안녕하세요' in working order not '????'   but in MySQL console   "SELECT msg FROM a LIMIT 1"      => print not '안녕하세요' but abnormally 'ì•ˆë…•í•˜ì„¸ìš”'   ADDED : in mysql console   "SHOW CREATE TABLE a"     => Table | Create Table        a     | CREATE TABLE `a` ( 'msg' varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8


Traveling to Prague for a university exchange as a student from Canada (for 4 months) although I hold dual citizenship as an Italian citizen

I will be traveling to Prague in September for a university exchange as a student from Canada (for 4 months) although I hold dual citizenship as an Italian citizen (EU citizen). Due to my European citizenship (and passport), I understand that I do not need to get a student visa from the Czech embassy for my stay. Should I worry about not having a student visa? Can any one confirm this?  Also, if this is okay, what would be the best way to travel with my two passports?  Thanks.


S-123-P Bash Pocket Ref.        2010    Cengage Learning    $55 E-P234  Python Pocket Ref.      2012    Cengage Learning    $45 55-MNP  Unix System Programming 2001    Sybex               $230  I need to replace the numbers after the $ not including the $ with *, so the output need to be: S-123-P Bash Pocket Ref.        2010    Cengage Learning    $** E-P234  Python Pocket Ref.      2012    Cengage Learning    $** 55-MNP  Unix System Programming 2001    Sybex               $***  I've been able to replace the last digit or last 2, but not every digit after the $. I've tried sed and awk gsub but nothing I try seems to work.


Is it possible for a punch traveling at relativistic speeds to miss the target because of length contraction (from both reference frames)?

This question is probably some variant of (or loosely related to) the pole-in-the-barn problem.   Simply stated, if I punch at relativistic speeds, would it experience Lorentz contractions so as to not reach the target? Or would it result in a paradox that the there is a hit from target's frame of reference but falling short from the puncher's frame of reference?  Below are the rules/notes -   Both the body and the target are stationary / at rest in relation to each other. Only the punching arm is moving.  The punch travels in a straight line towards the target.  The punch is being observed by both the target and the puncher.  We're not concerned about the mechanism and strength of muscles etc. The body can punch very close to the speed of light without breaking. It can be thought of as a spear thrust into a stationary target or  even a piston between two walls.  For simplicity, let's say that the length of the arm (or spear or piston) is same as the distance that the punch has to travel from the initial position to the target.    It might sound like an outlandish/comical problem but the core of the question is how it'll work from the reference frames of the target and the puncher.    EDIT 1: The punch stops after the arm has been fully extended but not because of it. In other words, let's say the length of the arm is 1m (and the distance to be traveled to make contact is also 1m), the punch knows to stop after traveling exactly 1m. The information/instruction that it has to stop after 1m is available to the punch (and every other part of the arm) before it is thrown. Deceleration happens instantaneously.


Can anything be done to reduce the shutter sound on my SLR?

I know there's lots of talk around here about 'noise' levels in photographs, but what about the actual sound that the shutter makes on an SLR? Is there anyway to silence it a bit, or is it just a reality that we have to deal with?  I currently have a Nikon D90 and find that in quieter settings (like a church) the noise from the shutter can be a bit distracting to people around me (i haven't had anyone mention it, but I'm guessing it's apparent).  Do higher-end models have quieter functioning modes, perhaps?


Difference between reference and pointer

I’ve read a lot of articles about how “pass-by-reference” doesn’t exist in Java since a copy of the value of the reference is passed, hence “pass-by-copy-of-reference-value”.  The articles also say a reference value is a pointer. (So pointers do exist in Java.)  Some other articles say: Java has no pointers.  So what is the correct solution?  How does a pointer differ from a reference (or reference value), and do they exist in Java?


I want to call a webservice from jQuery. How can I do that?


If $A$ is an invertible $3\times 3$ real matrix, then $\det A^\star = \det^2A$

How do I show that if a matrix $A \in \mathcal{M_{3}}(\mathbb{R})$ has a inverse, then $\det A^{\star}=\det^2A$?   I was trying to use that $A^{\star}= \det(A)\cdot A^{-1}$. Then what and why? If I go to det in that equality why should I get $(\det(A))^3\cdot \det(A^{-1})$?


Comparison of Gravitation pull on moon due to sun and earth

Gravitational pull on moon due to sun is almost twice than that of earth on moon.  Then why doesn't moon escape towards sun like on solar eclipse?


Consider a $2 \times 1$ rectangle split by a diagonal.  Then the two angles at a corner are ArcTan(2) and ArcTan(1/2), which are about $63.4^\circ$ and $26.6^\circ$. Of course the sum of these angles is $90^\circ = \pi/2$.  I would like to know if these angles are rational multiples of $\pi$. It doesn't appear that they are, e.g., $(\tan^{-1} 2 )/\pi$ is computed as     0.35241638234956672582459892377525947404886547611308210540007768713728\   85232139736632682857010522101960   to 100 decimal places by Mathematica.  But is there a theorem that could be applied here to prove that these angles are irrational multiples of $\pi$?  Thanks for ideas and/or pointers!  (This question arose thinking about Dehn invariants.)


I currently have a command in linux terminal that I run a lot which is  pyclewn ==window=none .....   My question is if there is a way for me to assign a shortcut to this command I am using Fedora 20


Would you please help me to prove this problem.  Let $G=\mathrm{Hol}(C_8)$. And let $f(x)\in \mathbb{Q}[x]$ be an irreducible polynomial of degree $8$, $L$ a splitting field of $f(x)$ over $\mathbb{Q}$ and suppose that $\mathrm{Gal}(L/\mathbb{Q})\cong G$.     Show that there is a subgroup of $S_8$ isomorphic to $G$.   I am reviewing for my test and i find this good exercice    Thanks.


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


Changing geometry types from kml points Z to just points in QGIS

How do I change geometry types from pointZ to point in QGIS from a kmz file?


I'm using Window 10 Japanese OS. I would like to change the settings (menus etc.) of QGIS 3.0.1 from the default Japanese into English. I tried below but it wouldn't work.


How to create custom pages for http 500 and 410 status errors?

In the site information section in the configuration, there is an option for setting the 404 page. But How will I set a custom page for http 500 and 410 error pages?  Is there any specific module for this? OR I have to create a custom tpl file in some pattern? Any idea?


Does the temperature coefficient of a material depend on temperature?

In my textbook, a relationship is plotted between the resistance of the material and the temperature, and the temperature coefficient is defined as the slope of that graph divided by an arbitrary resistance $R_1$ on the graph. Does that mean that the coefficient varies depending on the temperature I choose to divide the slope by?  If so, how does it stand as a valid reference to the material’s resistance growth rate with temperature?  If not, then where did I go wrong with this train of thought?


How to make a list of abbreviations, acronyms, symbols, glossary and index with the glossaries package?

I would like to make a list of abbreviation, list of acronyms, list of symbols, glossary and index using the glossaries package as following order:   \documentclass[a4paper]{memoir} \usepackage{fouriernc} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[margin=2cm]{geometry} \usepackage{indentfirst} \usepackage{dsfont} \usepackage[linkcolor=true]{hyperref} \usepackage[symbols,acronym,abbreviations]{glossaries-extra} \setabbreviationstyle[acronym]{long-short} %Abreviations \newabbreviation{p}{p.}{page} \newabbreviation{s}{s.}{sheet} \newabbreviation{jan}{jan.}{January} \newabbreviation{etal}{et al.}{et al} \newabbreviation{v}{v.}{volume} %Acronyms \newacronym{MPE}{MPE}{Modelo Padrão Estendido} \newacronym{UFMA}{UFMA}{Universidade Federal do Maranhão} \newacronym{BPS}{BPS}{Bogomol'ny-Prassad-Somefeld} \newacronym{MCS}{MSC}{Maxwell-Chern-Simons} %Symbols \glsxtrnewsymbol[description={the set that does not contain any element}]{emptyset}{\ensuremath{\emptyset}} \glsxtrnewsymbol[description={set of natural numbers}]{N}{\ensuremath{\mathds{N}}}     \glsxtrnewsymbol[description={set of integer numbers}]{Z}{\ensuremath{\mathds{Z}}} %Glossary \newglossaryentry{ex}{name={example},description={an example}} \newglossaryentry{cow}{name={cow},plural={cows},description={an adult female of any bovine animal.}}  \newglossaryentry{par}{name={paragraph},description={distinct section of a piece of writing}} %index \index{BPS} \index{MCS} \index{Natural numbers} \index{cow} \makeglossaries \makeindex \begin{document} \frontmatter% % \printglossary[type=acronym,title=List of Acronyms] \printglossary[type=abbreviations,title=List of Abreviation] \printglossary[type=symbols,title=List of Symbols]% % \tableofcontents% % \mainmatter% % \chapter{Acronyms}  First use: \gls{MPE}. Second use: \gls{MPE}.   First use: \gls{UFMA}. Second use: \gls{UFMA}.   First use: \gls{BPS}. Second use: \gls{BPS}.   First use: \gls{MCS}. Second use: \gls{MCS}.   \gls{ex}, \gls{cow} and \gls{par}.  \index{BPS}, \index{MCS}, \index{N} and \index{cow} \chapter{Abreviations} First use: \gls{p}. Second use: \gls{p}.  First use: \gls{s}. Second use: \gls{s}.  First use: \gls{jan}. Second use: \gls{jan}.  First use: \gls{etal}. Second use: \gls{etal}.  First use: \gls{v}. Second use: \gls{v}.  \gls{ex}, \gls{cow} and \gls{par} \chapter{Symbols} \gls{emptyset}  \gls{N}  \gls{Z}  \gls{ex}, \gls{cow} and \gls{par}  \backmatter \printglossary[type=main,title=Glossary] \printindex \end{document}


Coefficient growth in the power series $\sum u_n z^n = e^{1/(1-z)}$?

Let $\sum u_n z^n$ denote the power series of $e^{1/(1-z)}$.  As our radius of convergence is $1$, it follows that $u_n$ exhibits sub-exponential growth.  On the other hand, $\{u_n\}$ must grow supra-polynomially, else transfer theorems like those found in  would then imply that the singularity at $z=1$ is regular.  Heuristically, it would appear that $$u_n \sim \alpha n^{-3/4} e^{2\sqrt{n}},$$ for some $\alpha \approx .162982$.  This opinion is echoed, without support, as a comment on the OEIS page for . Note: The sequence considered therein is the generating function of $e^{z/(1-z)}$, which has $\mathbb{Z}$ coefficients after scaling $u_n$ by $n!$  How would one derive asymptotic results such as these?  (Edited for spelling.)  Note: I've posted my own solution in the answers below.  In short, the saddle-point method applies.


Let $A_1, A_2, A_3,\ldots$ be pairwise disjoint denumerable sets.  Prove that $$\bigcup_{i=1}^\infty A_i\text{ is denumerable.}$$  This question comes from exercise $10.11$ of Mathematical Proofs: A Transition to Advanced Mathematics (Second Edition) by chartrand, polimeni, and zhang. I'm using this book for self study. I used induction in this  attempt. Sorry for the messy handwriting. I figured that the natural numbers were equivalent to integers from 1 to infinity, but a buddy pointed out that infinity was not an element of the natural numbers, so induction might not be possible. So, was it possible to use induction on this problem? Or should I just redo the proof by constructing a table of the denumerable sets and coming up with some diagonal arrows to order them like my book suggests.


Looking for title of a fantasy fiction with huge war, invader on airship with warlock, island fortress with sorcerer, mnemonic storyteller and dragon

This was a thick book that I read over fifteen years ago that I never finished reading because someone borrowed it and didn't return it to the school library. I want to find its title.  The story takes place in a kingdom that is preparing for the a cycle of war, where every time the winds changes (50 or 100 years), invaders will try to cross the sea from another continent using airships with air balloons, filled with soldiers and warlocks. The kingdom has made several man-made island fortress along their coastline, filled with soldiers with war machines, sorcerers, and enchanters who act as the main guard/defence for the kingdom, calling lightning and fireballs, and using machines to stop and destroy and bring down as many of the invader airships as possible while countering the warlocks on board.  The book involved a man and a girl whose journey brought them apart in preparing for the imminent war.   The women found herself adept in magic and went to the academy in the capital to learn to be a sorceress.   The man found a different calling. With a good memory, he was sent to learn to become a mnemonic storyteller (to train with battle staff and fighting skill and mnēmonikos skill) who carried the history, literature of the entire culture in their heads. They used their knowledge to convey the kingdom's literature, poetry, history and stories to the people from generation to generation.  Both eventually "graduate". Sadly, and with great emotion, both have to part ways. She was sent to a fortress island and began her role as a sorcerer who will stand guard there. He, as a storyteller, began his own journey without her, going from town to town, village and soldier barrack, across the kingdom, telling stories of great men and their deeds, and courageous heroes who fought the war, to uplift the spirit of the people and bring valor to the soldiers stationed at the border and people in the coming war.   In brief, he meets a dragon (who used to be involved in the war in ages past), long thought to be extinct. He finds himself able to communicate with it and has a "born" friendship with it. The dragon teaches him to become a "dragon rider", a long-lost ability of his people (due to the "extinction" of dragons.)   The wind changes with the dread of war hanging on the kingdom.  Airships start to blacken the sky again with soldiers and war machines battling each other.


Dense sets in Hilbert space of square summable sequences?

Let $l^2 = \{x = (x_n)| x_n \in \mathbb{R}, \sum_{n=1}^{\infty} x_n^2 < \infty\}$  be the Hilbert space of square summable sequences and let $e_k$ denote the $k^{th}$ co-ordinate vector (with $1$ in $k^{th}$ place, $0$ elsewhere). Which of the following subspaces is NOT dense in $l^2$?   span$\{e_1-e_2, e_2-e_3, \ldots\}$ span$\{2e_1-e_2, 2e_2-e_3, \ldots\}$ span$\{e_1-2e_2, e_2-2e_3, \ldots\}$  span$\{e_2, e_3, \ldots\}$   By definition, we have to prove that for any $x \in l^2$ and for any $\epsilon > 0$, there exists $y$ in the respective sets such that $\|x-y\| < \epsilon$. How to proceed further?


Understanding causality violation of tachyons in space-time diagrams

I have a hard time understanding how the world lines of tachyons in a space-time diagram imply the violation of causality. Can you explain why that is?


For any odd prime $p≥5$, $(-3/p) = 1$ if $p ≡ 1,-5\pmod{12}$ and $(-3/p) = -1$ if $p ≡ -1,5 \pmod{12}$. My solution so far: if $p ≡ 1\pmod{4}$ then $(-3/p) = 1$ exactly when $p ≡ ±1\pmod{12}$ when $p ≡ 1\pmod{12}$. And if $p ≡ -1\pmod{4}$ then $(-3/p) = 1$ exactly when $p ≡ ±5\pmod{12}$ whence $p ≡ -5\pmod{12}$. So $(-3/p) = 1$ exactly when $p ≡ 1\pmod{12}$ or $p ≡ -5\pmod{12}$. I'm not very confident in my work. Is this correct and if it's not, how do you solve this problem?


I am a bit new to javascript, i was just trying the below snippet:  _getUniqueID = (function () {          var i = 1;         return function () {             return i++;         };      }());   s = _getUniqueID(); console.log(s); // 1 console.log(_getUniqueID()); // 2   I was under the impression that i would have to do s() to get 1 as the result and i was thinking that _getUniqueID() returns a function rather than execute the funtion inside it. Can somebody explain the exact execution of this function please ?


As far as I know, the time dilation at the event horizon of a black hole is infinite, so everything falls asymptotically towards, but never reaching, the horizon for an outside observer. How then can a black hole gain in mass for this observer?


How can I locate and repair a break in a circuit?

After some effort, I have determined that there is a discontinuity between the wire from the breaker (hot wire) and the receptacle (socket).  The breaker is okay because couple of other sockets in the same circuit are working.  However, several sockets downstream from this socket are not working, i.e., are dead.  The wiring in question comes from attic, through the  wall (stud) and finally to the receptacle.  Before I fix anything, how do I make sure that my diagnosis is 100% correct.  If correct, how do I fix this wire or replace the wiring without breaking the sheet rock of the bedroom wall?


Why there is no d'Alembert solution in 2D?

In 1D the wave equation $$\frac{\partial^2 u}{\partial t^2} = c^2 \frac{\partial^2 u}{\partial r^2}$$ can be satisfied with a wave $$u(r,t) = f(r-ct).$$  In 3D the wave equation $$\frac{\partial^2 u}{\partial t^2} = c^2 \frac{1}{r^2}\frac{\partial}{\partial r}\biggl(r^2 \frac{\partial u}{\partial r}\biggr)$$ can be satisfied with a wave $$u(r,t) = \frac{1}{r}\,f(r-ct)$$ whose amplitude fades to comply with conservation of energy.  One might expect that in 2D the wave equation $$\frac{\partial^2 u}{\partial t^2} = c^2 \frac{1}{r}\frac{\partial}{\partial r}\biggl(r \frac{\partial u}{\partial r}\biggr)$$ could be satisfied with a wave $$u(r,t) = \frac{1}{\sqrt r}\,f(r-ct),$$ but that's not the case. What is the reason for it?


I want to monitor a file. So I have tailed a file using below command, to execute a script per line.  tail -3f logfile.log | grep "action.*add" | sed -u -e "s/^/'/" -e "s/$/'/" | xargs -L 1 -P 5 bash testscript.sh   But it seems that script is not getting executed.  I observed that grep is not giving any input for next pipe.  When I tried,  tail -3f logfile.log | grep "action.*add"   it worked. But when given next filter like sed, grep, xargs etc. It didn't worke like the one shown below.  tail -3f /var/tmp/rabbitmq-tracing/logfile.log | grep "action.*add" | grep add    Please help me to know why this is happening and how to overcome this.    Edit 1: Basically anything like below should work and it was working previously. Confused why it is not working now.  tail -f file.txt | grep something | grep something | grep something     EDIT 2: Output line after first grep will be a json string like below. And I want to give this line as input( enclosed in single quotes) to bash script.  {"twNotif": {"originator": "api", "chain": "test", "txId": "08640-0050568a5514", "version": "1.0", "msgType": "api", "twData": {"api": {"hostId": "007bdcc5", "user": "test", "cmdTxt": "100599"}}, "action": "add", "store": "test", "msgTime": 1467280648.971042}}


How to calculate the variance of a partition of variables

I'm running an experiment where I'm gathering (independent) samples in parallel, I compute the variance of each group of samples and now I want to combine then all to find the total variance of all the samples.   I'm having a hard time finding a derivation for this as I'm not sure of terminology. I think of it as a partition of one RV.   So I want to find $Var(X)$ from $Var(X_1)$, $Var(X_2)$, ..., and $Var(X_n)$, where $X$ = $[X_1, X_2, \dots, X_n]$.  EDIT: The partitions are not the same size/cardinality, but the sum of the partition sizes equal the number of samples in the overall sample set.  EDIT 2: There is a formula for a , but it only covers the case of a partition into two sets, not $n$ sets.


Highly unbalanced test data set and balanced training data in classification

I have a training set with about 3000 positive instances and 3000 negative instances. But my test data set is pretty much un-balanced. The positive set only has 50 instances and negative has 1500 instances.This causes the precision very low. Are there any approaches to solve this problem? I use SVM to build classifier.


Alternating binomial sum with intervals of two

Fix integer $n\geq 1$. Consider the number $$1-\binom{n}{2}+\binom{n}{4}-\binom{n}{6}+\cdots$$where the sum continues as long as the lower number in the binomial is $\leq n$. Is there a way to simplify this sum?   The first few values are $1, 0, -2, -4, -4$.


How to display Custom taxonomy on custom post listing page

I want to show the custom taxonomy name on the listing of custom post type on my front end


I'm creating a shell script that will allow a back functionality on my shell. What would be a good way to change the terminal's directory in the script.  Just running something like this in my back.sh file doesn't work:  cd /   Even when I run the file like  source ./back.sh   A sample file that is not working properly:  #!/bin/bash  cd ~/Movies/   when I run source ./back.sh or source back.sh


Why does creating a list of lists produce unexpected behavior?

EDIT: This question is about why the behavior is what it is, not how to get around it, which is what the alleged duplicate is about.    I've used the following notation to create lists of a certain size in different cases. For example:  >>> [None] * 5 [None, None, None, None, None] >>>   This appears to work as expected and is shorter than:  >>> [None for _ in range(5)] [None, None, None, None, None] >>>   I then tried to create an list of lists using the same approach:  >>> [[]] * 5 [[], [], [], [], []] >>>   Fair enough. It seems to work as expected.  However, while going through the debugger, I noticed that all the sub-list buckets had the same value, even though I had added only a single item. For example:  >>> t = [[]] * 5 >>> t [[], [], [], [], []] >>> t[1].append(4) >>> t [[4], [4], [4], [4], [4]] >>> t[0] is t[1] True >>>   I was not expecting all top-level array elements to be references to a single sub-list; I expected 5 independent sub-lists.  For that, I had to write code like so:  >>> t = [[] for _ in range(5)] >>> t [[], [], [], [], []] >>> t[2].append(4) >>> t [[], [], [4], [], []] >>> t[0] is t[1] False >>>   I'm clearly missing something, probably a historical fact or simply a different way in which the consistency here is viewed.  Can someone explain why two different code snippets that one would reasonably expect to be equivalent to each other actually end up implicitly producing different and non-obvious (IMO) results, especially given Python's zen of always being explicit and obvious?  Please note that I'm already aware of , which is different to what I'm asking.  I'm simply looking for a detailed explanation/justification. If there're historical, technical, and/or theoretical reasons for this behavior, then please be sure to include a reference or two.


Interpretation of glm function output in R

I have the following model: glm(Yi~Xi,Di, data=data, family=binomial(link="logit") )  where Di is a dummy variable the output of this function gives me the estimates for Beta0, Beta1 and Beta2. Lest's suppose Beta1 is >0 and Beta2 is <0 Which is the correct way to interpret this result? I can say that X1 (the variable associated to Beta1) determines an increment of the logit(pi). Di the opposite. Is it right? Then, if I calculate the exponential of these coefficients, what should I day? "Beta1 determines an increment of the odds" or "Beta1 determines an increment of the odds ratio"?


Using comments to chat with other OS user and also off-topic

Update:   Here I have shwon some examples of such a comments but they were already deleted after I have flagged it  How can we avoid such a comments? How can we delete it?  Is it correct?   Update:  Moderators have deleted such a comment after I flagged it with      using comments to chat with other SO users. Off-topic comment    and not  declined it


Which one is right: Prepare 'the project specification' or 'a project specification'?

Recently I've encountered a problem with articles' usage in one specific case. (Articles aren't the strongest part of my English proficiency)  Which one should I use?     Prepare the project specification      Prepare a project specification   (Consider examples to be a task name)  I'm not sure which article to use because of the fact that the project I'm talking about is known (for me and for those who may read the task) but the specification is not written yet (and at the moment of creating task even unknown what should be in it).  Probably I have to use the last one? Or If the project is defined does it make the specification to be defined too (i.e. the specification of the project) or not (i.e. there may be occasions when a project have a few different specifications)?  Sorry for any grammar mistake I've made. It would be my pleasure to get your guidance or remarks to improve my English. Many thanks!)


$f:\mathbb{R}^3\to\mathbb{R}, f(rx)=r^{\alpha}f(x)$ for some $\alpha>0$, $\forall x\in\mathbb{R}$, for any $r\in\mathbb{R}$, could any one tell me which of the following is true?  $1.$ If $f(x)=f(y)$ whenever $||x||=||y||=\beta>0$, then $f(x)=\beta ||x||^{\alpha}$  $2.$ If $f(x)=f(y)$ whenever $||x||=||y||=1$, then $f(x)= ||x||^{\alpha}$  $3.$ If $f(x)=f(y)$ whenever $||x||=||y||=1$, then $f(x)=c||x||^{\alpha}$ for some constant $c$  $4.$ If $f(x)=f(y)$ whenever $||x||=||y||$, then $f(x)$ must be a constant function. Thank you.


Scope of variables for a class inside a method in python

I am not able to understand the scope of few variables and why python is throwing an error while trying to do few things inside a class that is defined a method  Let me start with a basic example which works and then move on to few examples which work and which doesn't. I have an idea about what is working and sometimes what is not. But I feel that I lack an understanding the scope in this case (class inside a method)  First an example which works  Case 1:  def foo_method(a, b, c):     return b, c, a  def bar_method(a=1, b=2, c=3):     class BarClass:          a_ = a + 1         b_ = b + 1         c_ = c + 1          b_, c_, a_ = foo_method(a, b, c)      return BarClass()   When I try to run the above code it works i.e  temp = bar_method() works with out any issue  Case 2:  def foo_method(a, b, c):     return b, c, a  def bar_method(a=1, b=2, c=3):     class BarClass:          a_ = a + 1         b_ = b + 1         c_ = c + 1          b, c, a = foo_method(a, b, c)      return BarClass()   Case 2 doesnt work i.e temp = bar_method() throws the error NameError: name 'a' is not defined  Case 3:  def foo_method(a, b, c):     return b, c, a  def bar_method(a=1, b=2, c=3):     class BarClass:          a = a + 1         b = b + 1         c = c + 1      return BarClass()   Case 3 doesnt work i.e temp = bar_method() throws the error NameError: name 'a' is not defined  Case 4  def foo_method(a, b, c):     return b, c, a  def bar_method(a=1, b=2, c=3):     class BarClass:          a_ = a + 1         b_ = b + 1         c_ = c + 1          a_ = a_ + 1          b_, c_, a_ = foo_method(a_, b_, c_)      return BarClass()   Case 4 works.  I got confused as to why certain operations are working and why others aren't. Can anyone shed some explanation on what I am not able to comprehend here. It seems like I can't make any modifications to the variables defined in the bar_method


Add equation name besides equation number (so that \eqref inserts only the number)

I am trying to add equation names besides the equation numbers but, in addition, in such a way that \eqref inserts just the number.  Inspired by the top answer in , I tried the following solution:   \documentclass{article} \usepackage{amsmath} \newcommand\mylabel[2]{\label{#1} \\[-\baselineskip] \tag*{#2\ \hphantom{(\ref{#1})}}}  \begin{document}  \begin{align} f(x) = a \mylabel{eq:a}{Constant} \\ h(x) = ax^2+bx+c \mylabel{eq:b}{Quadratic} \end{align}  Equations \eqref{eq:a} and \eqref{eq:b} look OK\dots   \begin{align} j(x) = \varinjlim_{C_j} \mylabel{eq:c}{Way too low!} \end{align}  \dots but the method fails in style for Equation \eqref{eq:c}.  \end{document}      As you can see, the trick I used is to write the equation name in a new line and then lift it by -\baselineskip. For simple equations as (1) or (2) I get exactly what I want. But indeed, this is shoddy work and it fails as soon as the equation gets a little more complicated, e.g. for (3).   I don't know whether I could use another length instead of -\baselineskip so that I always get the correct lift, or whether there is a more elegant (and not too complicated) way to achieve what I want.


How to add multiple file extensions to the search inside feature in WIndows 7?

I know how to , but I'd like to add a bunch of different extensions and avoid the tedious job of adding every single one. Is there a command line tool or registry key I can use to accomplish this?


Calculating the confidence of probability estimates of binary outcome given small sample size?

Suppose every day an agent randomly exhibits one of two behaviours (behaviourA or behaviourB), and the probabilities of exhibiting behaviourA and behaviourB are unknown.  After n days, we will have a sample of n days' data.   Suppose n = 1000, and we have witnessed behaviourA 800 times and behaviourB 200 times, we could estimate the probability of behaviourA as 80% and probability of behaviourB as 20%.   Question  How do we measure how confident we are of these probabilities, and does that change when the sample size is small?   Example with small sample size  Suppose n = 10 with 8 x behaviourA and 2 x behaviourB, then the probabilities would be identical, but we couldn't be as confident in our estimations of those probabilities as we could with n=1000. My guess is that we need some way of penalising the small sample size, but I am not sure how to accomplish that.


kworker blocked for more than 120 seconds Ubuntu 17.10

I decided to upgrade to 17.10 on my Thinkpad.  Now every time I try to shut it down via console or menu) or reboot it, it takes ages.  TTY gives me several errors connected to hung_task_timeout_secs, reaching from kworker, over networkmanager down to wpa_supplicant.  I tried reinstalling with different ISOs (daily-build from 2 days ago, beta2, and the rc one from today) and still get the same error every time.  Any ideas what could cause that issue? Right now I'm running 17.10 on two other, different PCs without any problems whatsoever.  EDIT: deborphan doesn't return any orphaned packages. I think I might have found something though. I decided to completely wipe the disc, including my dualboot windows. Reinstalled, and everything worked fine. Today in university the problem reappeared.  Now the interesting part is: I think it is related to my wifi. At home, during installation and after, I had it plugged in via cable, and had no problems at all. But with only wifi in university it reappeared. So I gave it a try and plugged in the cable again at home, and it works again. Removed cable, restarted, and the problem reappears. Wifi-Card is a Qualcomm Atheros.


I have a DrawerLayout, but when I add any view to the  content_View.xml I get this error:  java.lang.NullPointerException: Attempt to invoke interface method  'void android.support.v7.widget.DecorContentParent. setWindowCallback(android.view.Window$Callback)' on a null object reference  Can anyone explain why is this error happening and how to fix it?


Are ubuntu 20.10 packages compatible with ubuntu 20.04

I have installed Ubuntu 20.10, since it is non LTS, I'd like to have 20.04. Problem is I have already installed lots of apt packages in my 20.10. So is it possible to reuse the apt cache in my newly installed 20.04? I really don't wanna download them all again as I have a limited internet connection.


bone heat weighting failed to find solution for one or more bones

I am guessing you guys get this a lot, but I've tried everything to fix the Bone Heat Weighting Failed error. I have no idea what to do, so if you guys can somehow fix this, then you're amazing.  .blend file below:


How to tell egrep which characters not to accept

I want to accept string that begins with s than the next character (whatever it is) must be conatined in script two more times (but not less, not more) and before this char cannot be a backslash. So:  s(.)[now some chars except (.) and not ending with \]\1[some chars but not (.) and not ending with \]\1[some chars but not (.)]   \1 and (.) and s are real part of regex


Deleted File, Available Space Did Not Return

On CentOS linux, I just deleted a large log file over 3gb on XFS file system. After deleting the file, the available file space did not return to the drive seen via df -h. Is there anything I can do to find the missing free space?


The command diskutil eraseDisk is not what I want because that wipes the entire disk. I have a partition already allocated and it is blank. All I need to do is format it with VFAT/FAT32. How can this be done from Terminal? It must the same effect as using mkfs.vfat on Linux.


what does the dash `-` before `bash` on 'command not found' errors mean?

When you enter an invalid command at a bash prompt you get the message  -bash: {command}: command not found   What does the - at the very beginning signify?


What is the name of this effect, and what is a good way to replicate it?

See how the image background fades with the black menu bar? I see this effect very often and I like it a lot. I would love a tutorial (either Photoshop or Illustrator) or how-to article but I don´t even know how to search for it.


Why do identical folders on two different hard drives of the same file count and file sizes, take up a different size on disk?

Both have  216,540 files 52,103 folders Size: 278 GB (299,363,715,785 bytes)  But for one hard drive the size on disk is 278 GB (299,672,182,784 bytes)  and for another it's 278 GB (299,672,211,456 bytes) bytes). That's a difference of 28,672 bytes or 28.67KB. Why?


I am trying to convert the following code which is in c# to java. And I am facing difficulty in converting it. Please can anyone suggest me a simple way to do it in Java.   if (Password.Length <= 8)             Password = Password.PadRight(8);         else             Password = Password.PadRight(20);


12.10 error after login -Evolution calendar

Why do I, after having installed Ubuntu 12.10 for nearly 3 months, still every second log-in have this evolution epiphany calendar error. I know more people have this issue.   All upgrades applied, 3 months passed, I'm sending reports every time errors appear and no one can do anything with it there at Canonical?  PS. i read the log that being send to Canonical and theres the following written "no upgrades applied, probably fresh install" Which isn't true, because i apply all upgrades available, since fresh install was like 250MB or so. Why isn't this fixed yet?


Terminal not running after change command

I tried to costumize my terminal from Edit>Profile Prefences>Title and Command. I check the Run a custom command instead of my shell and i think i write wrong command so the terminal won't run anymore. I have try reinstall the terminal from Software Center, search on google, but not solving.  How to return my terminal?


I was attempting to create a bash script to run a backup of my Raspberry Pi to my Box account via FTP. Most of it works, but for some reason it won't convert variables to the text they stand for. When I run this script:  #!/bin/bash  FILENAME=backup-$(date +%Y-%m-%d).tar.gz  tar -czvf /tmp/$FILENAME /home/pi/  lftp -c 'open -e "set ftps:initial-prot ""; \    set ftp:ssl-force true; \    set ftp:ssl-protect-data true; \    put /tmp/$FILENAME; " \    -u "USERNAME", "PASSWORD" \    ftps://ftp.box.com:990/Automation/RPI/Backups   It creates the archive and connects to the server fine, but it gives me this error:  put: /tmp/$FILENAME: No such file or directory   I have tried replacing $FILENAME with "backup-$(date +%Y-%m-%d).tar.gz", but that still returns  put: /home/pi/+%Y-%m-%d).tar.gz: No such file or directory   and using "backup*.tar.gz" returns similar. I can only get it to work if I use the specific file name in place of any variables or wildcards, but this doesn't work for me since I want to set up a cron job to back up automatically.  So, does anybody know how to get around this, or a better alternative? Thanks!


Complex Number Equation: $z^2+(1+i)\overline z+4i=0$

I am having a hard time solving this equation. A know the solution from WolframAlpha, but the setp-by-step solution is not available.  $$z^2+(1+i)\,\overline z+4i=0$$    How can I solve this?


I am trying to append a list into another list however I cannot seem to make it work. Here is the code. When I run it and print Q for each iteration of the while loop I get something like [2,3] [2] [3,4] etc. And I want to append these lists into the list my_Q by doing my_Q.append(Q). However, this returns me this: my_Q = [0, [], [], [] ] import random  #Matrix Input M = 10**3  G = [   [M, 5, 9, M],         [M, M, 1, 10],         [M, M, M, 4],         [M, M ,M, M]    ]  #Initialize Q = [1] l = [0, M, M, M] A = [1, 2, 3, 4] iter = 0  #For display my_v = [0] my_Q = [1]  #Algorithm while Q:        #Stop conditions          iter += 1      #Step 2:     v = random.choice(Q)     Q.remove(v)      #Step 3:     for w in A:         l_new = min(l[w-1], l[v-1] + G[v-1][w-1])         if l_new != l[w-1]:             if w not in Q:                 Q.append(w)             l[w-1] = l_new      #Save for display     my_v.append(v)          print(Q)     my_Q.append(Q)  print(my_Q)


scala regex match up to a specific string but whole string if the specific word doesn't exist

I have a question about scala regex  The thing I need to do is given a string, I need to find a sub-string up to a specific word given. For example, my regular expression looks like following  val x= "(?s)^(.*)(?=(foo|bar)".r   Then given a string, I need to find the longest sub-string until before foo or bar. This works perfectly but I would like to get the whole string if the string does not contain foo or bar at all.  Right now if I do  x.findAllIn("hello nice to meet you").toArray   it gives me an empty string but I would like to get "hello nice to meet you" when I do that.  Does anyone have an idea how to implement that?


We have a bottle of saki that I use for cooking occasionally, but I haven't used it in about 6 months, and the bottle has been in the fridge for over a year. Is this still good or can I reclaim that space in my fridge?


how to get natural exponential equation with points?

Here are my points  $x = 0, y = 10000 \\ x = 1, y = 10421.716 \\ x = 2, y = 10882.302  \\ x = 3, y = 11385.341\\ x = 4, y = 11934.746 \\x = 5, y = 12534.791 \\x = 6, y = 13190.142 \\ x = 7, y = 13905.899\\ x = 8, y = 14687.628$  Here are my values.   The initial value for $y$ is $10000$. As $x$ value increase by $1$, $y$ is multiplied by $1.8^{0.15}$ and subtracted by $500$.  How can I make natural exponential equation with these points? or is it impossible to make natural exponential equation with this?


Proof that $26$ is the one and only number between square and cube

$x^2 + 1 = z = y^3 - 1$  Why $z = 26 $ and only $26$ ? Is there an elementary proof of that ?


Is there an old, rarely used word which means "an archaic word"?

I seem to recall from my youth, when my vocabulary was many times what it is today, learning a word (started with an 'a' I think) whose meaning was "an old, unused, or archaic word" or something roughly to that effect.  I believe it was an adjective though it might have been a noun. This would be quite fun as an  term.  Does anyone recall such a word, or am I deceiving myself?


I am writing a comparator class that compares the file size of one file to another file in the same directory. I am having trouble finding the right documentation to get the file size of a file.  Right now I am looking at the documentation here for getObjectSize:    Here is my code, however it does not seem to be working.  public class FileComparator implements Comparator {      private static Instrumentation instrumentation;      @Override     public int compare(Object o1, Object o2) {          throw new UnsupportedOperationException("Not supported yet.");      }      static long getObjectSize(Object objectToSize) {          return instrumentation.getObjectSize(objectToSize);      }  }  public class Comparison {      public static void main(String[] args) {          File file = new File("src/Dummy1.pdf");          System.out.println(FileComparator.getObjectSize(file));      }  }   I get a NullPointerException thrown.


Can I transfer games bought on ps3 to my ps4?

I recently got a new ps4 and when I logged into my account, the games I bought on my ps3 did not show up. Is there any way I can transfer them?


I have a basic cube mesh that i currently use as a wall   And a basic ball mesh deforming itself on it as my animation  How can make the cube invisible BUT keeping the interactions between the two objects as i render in cycles?


Data Explorer page keeps freezing Chrome and Firefox

On Firefox 29.0 when I visit , the browser comes to a grinding halt and does not recover. On Chrome 35.0.1916.153 when I visit the same page the tab also grinds to a halt permanently until closed. In both case the page loads, then the syntax highlighting loads, then at some point after that it freezes, pegging the CPU at 100%. This problem is 100% reproducible, for me at least. I was working on the query and it was fine with an occasional unresponsive script. Then I created a permalink and the problem has been happening since. Ubuntu 12.04 LTS 64-bit I have no plugins or add-ons for either browser.


How to prove that there exists two distinct points $c$ and $d$ such that $f'(c)f'(d)=1$ where $f$ is continuous on [a,b]

Let $f:[a,b]\to[a,b]$ be a continuous function which is differentiable  on $(a,b)$ and $f(a)=a$ and $f(b)=b$. Prove that there exists two distinct points $c$ and $d$ such that $f'(c)f'(d)=1$.   Since the function is continuous on closed interval and differentiable on open interval therefore by mean value theorem there exists $c$ such that      $f(b)-f(a)=f'(c)(b-a)$.  From there I got $f'(c)=-1$ but I am unable to find $c$ and $d$ such that $f'(c)=-1$ and $f'(d)=-1$ so that I could say $f'(c)f'(d)=1$.   And by fixed point theorem I got $f'(x)$ is greater than $1$ since $f$ does not have unique fixed point, but how to continue further?


Given a box that contains 90% fair coins and 10% loaded coins, (a loaded coin gives heads 90% of the time), what is the probability for a randomly drawn coin to give 5 heads in a row?  P(HHHHH | random coin from box of mixed coins) = ?   I used Bayes Theorem to calculate the probability I got .219 or 21.9% probability for the random coin to give 5 heads in a row!    But I am still doubting if my answer is correct !!!  Any help appreciated :)


JPG background removal without losing tranparency in Photoshop

I have a JPG with a black background, and I want to remove the background without losing the transparency of the image. This is the image:


Adding luggage during a layover without exiting the secure area

This is a generalization of:    Suppose I'm flying with a certain airline from point A to point C via point B. The maximum luggage allowance on this flight is, say, 2 pieces (never mind the exact weight and dimension limits). At A, I check in 1 piece of such luggage. The plane takes off and puts me in B, where I disembark and go into the airport.  At this point, one of the following happens:   I purchase a bunch of items in the duty free shops, including, say, a suitcase into which I put them. A mysterious stranger somehow hands me a suitcase. The airport has a luggage holding service past its security check and passport control area (I'm not sure there are such airports at all in the world), and I have deposited a piece of luggage there at an earlier time. A friend of mine on the other side of the security, passport and customs checks walks up to the airline's counter, with a duly signed and notarized letter from me asking that they carry a second piece of luggage.   Let's assume my new suitcase is under the weight & dimension limits, but is too large and/or heavy to be carried on board. Assume also that I don't cross into the sovereign territory, i.e. don't pass passports, security and customs control.  Will I be able to have the airline carry my second piece of luggage from B to C? Or rather, are there combinations of airline, airport and scenarios from the above list for which I'll be able to have my second piece of luggage carried to C?


Recently I had installed Pantheon (Elementary OS desktop environment). I didn't like it, so I uninstalled it, but Elementary OS Desktop still appear in the title bar. And in the shutdown button menu, Ubuntu Help is replaced by Elementary OS Help.    I want that it says Ubuntu Desktop and Ubuntu Help. How do I fix it?  The output of lsb_release -a is:  No LSB modules are available. Distributor ID: elementary Description:    elementary OS 0.4 Loki Release:        0.4 Codename:       loki   For installation, I use:  sudo add-apt-repository ppa:elementary-os/daily  sudo add-apt-repository ppa:elementary-os/os-patches sudo add-apt-repository ppa:elementary-os/testing  sudo add-apt-repository ppa:mpstark/elementary-tweaks-daily  sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install elementary-theme elementary-icon-theme elementary-default-settings elementary-desktop   For uninstallation, I remove each repository manually, then sudo apt-get autoremove. And the rest with Synaptic Package Manager.