Multiple Object Tracking

Question: I am doing a juggling project and need to track the motion of 3 balls (red, yellow, and white). So far, I've been really liking Blender's UI for motion tracking. I have manually tracked an individual ball for 1800 frames and am wondering if there is a better way of going about this. The balls are regularly occluded and sometimes go out of the camera's view, so is there a way of tracking each ball using one track per ball for the entire duration of the video? I also would like to export the curves from the tracking to a graph so that I can present my data. What are some methods I can use?
Answer: When an object disappears momentarily form the scene (either it goes out of frame and comes back later, or is occluded by other objects) you can track up to the point where it becomes untrackable, then add a new tracker for other sections of the video when the object reappears. Then just select the trackers and merge them with the Join Track button

That way Blender knows that is not dealing with a new object, but the same one.
Once you are done traking your objects go to the solve section/geometry and select "Link Empty to Track".
That will create empties on the 3D environment that follow the movement set by the trackers. From there you should be able to create the graphs you are after.

Multiple Object Tracking


Sims 3: Mad scientist looking for a new job

Question: If a mad scientist in Sims 3 gets a new job, can you still perform experiments on random objects?
Comment: That's a good question. I'm inclined to think the answer is yes, but I can't say for certain.
Comment: Oh come on, the title to this question would be *so* much better without Sims 3: prefixing it
Answer: After finally becoming a mad scientist I promptly quit, and I was still able to perform experiments on my unsuspecting household items.
Answer: you could get into science career.
when you get to level 10 you get some sort of Beam you can make akward things with. For example you could point it towards a refridgenator and maybe the refridgenator starts to float
when you have the amitions expansion pack you could also get inventor because when you reach level 3 or 4 you get a detonator whcih you can sue to block things up.
You can blow up your neightbors bed


Can I be forced to do extra responsibilities?

Question: I have been a stand in for our Quality Specialist for more than a year. It has never been long periods of time but since March I have been doing her work consecutively, with my own work in between.
Due to the high workload my quality dropped for my normal BAU so I requested not to do her work anymore. (She is constantly being pulled out for projects or she doesn't have capacity to do all her work as she has to play catch up.)
My manager doesn't want to accept this and now wants me to take on more of the QA's duties in order for me to be pulled out of my team and just focus on her work so that the quality of my work is not affected anymore.
Her job grade is higher than mine and a promotion for me is not a option.
Comment: You have the same two choices every morning:  Do the work you're assigned, or find another position.  No one is "forcing" you to make either choice, but those are the choices you have.
Comment: What's your contract say?
Answer: If they want you to "drop" your current duties, then demand the promotion that comes along with it.
If they refuse and still want you to do this job, then your only options are to either do it or find a new job.
Comment: You may want to consider the fact that if the OP puts his concerns in the form of a demand, one of those two options may immediately be off the table.


Splitting Audio Files with Matlab

Question: How do you split an audio file into multiple parts using MATLAB ? Like I have an audio file composed of ten-twenty notes of a Piano, I need to split it into individual notes and store each note in a separate variable . Is it possible to do this with MATLAB ,if so how ? Can anyone please help me on this ?
Answer: If you want to do the splitting visually you can try "Simple Audio Editor" available in the file exchange.
http://www.mathworks.com/matlabcentral/fileexchange/19873-simple-audio-editor
I am the author of this program. Let me know if something does not work with that.
You can also try a free audio editor like audacity and export individual pieces to audio files. You can read each piece in MATLAB separately.
If you are looking to achieve this automatically you might need to ask this question in a Signal processing group.

Splitting Audio Files with Matlab


can two dis assemblers produce different dis assembly for the same executable?

Question: I have an executable which I am dis assembling using two different dis assemblers. I am of the knowledge that the instructions may be different but the opcodes have to be same in both the dis assemblies. But I observe that the opcodes are not same. Is there any specific reason for that? Does it depend on dis assemblers?
Answer: There could be many reasons why two disassemblers produces different output.
Wrong opcode parsing, replacing opcodes with macros, anti-disassembly tricks (such as 'jump' or 'call' to middle of opcode), difficulties in parsing swich-case code, wrong recognition of processor architecture version, ignoring "meaningless" opcodes, wrong alignment, wrong identify of procedures beginning, wrong parsing of file holder and there are so many more... Each of those may result in different output.
If you are interested here is another interesting thing but on the other direction:
http://accessomat.wordpress.com/2010/11/08/x86-assembler-is-not-injective/
Comment: There may be much simpler reasons. E.g. `je` and `jz` are two mnemonics for the same opcode.


Is it rude to ask whether a professor will leave by the time you're finished PhD classes if you want to be their PhD student?

Question: Is it rude to ask whether a professor will leave by the time you're in the middle of research as a PhD student and you want to do research witht hem?
Comment: Leave or retire? If planning to retire, they will likely just say they won't take any more students, sorry. Leaving in the next year or so for sure, same thing. Might possibly leave in the next 3-10 years? They really don't know, and neither do you.
Comment: Perhaps this is a controversial opinion, but I am shocked at how much emphasis the answers are placing on being careful and tactful, as if you should be ashamed for wanting to know. This is a very important thing to know. Your advisor is supposed to be committed to supporting you. Please just go ahead and ask. If they are offended by the mere question, then they basically represent part of what is wrong with academia, and you should probably not start your PhD with them.
Comment: Faculty, especially very successful ones, get recruited to other schools and often ask students to come with them. If you're commiting to work with them for many years it is reasonable to ask them how attached they are to the school and community so you can plan accordingly.
Answer: I would say it is not rude per se, but could be rude in implication. Rudeness always has a strong cultural component, though: what is rude in one culture may not be rude in another.
In the US, "you look/seem old" is rather rude. There is also an understanding that a PhD advisor would by ordinarily expected to supervise the entirety of a student's thesis project, and to not take on new students if they do not plan to commit to that. It's possible that the question you pose would appear like one of these accusations if it is not otherwise supported.
Assuming you have good reason to be concerned, though, I would recommend posing a question like this as about yourself and your career rather than the professor, and inquire if there are any time limits on supervision, or ask whether they will be able to supervise you for however many years is the planned duration of your degree. It is certainly suitable to ask about funding availability for the future if you are paid off of a supervisor's grants (e.g.: how many years of your expected PhD term is funding actually secured for), and to ask about any expected gaps in supervision like a planned sabbatical. "Is there likely to be any time during my PhD career that you won't be able to advise me directly, like a planned sabbatical?" might be a diplomatic way to raise the concern, and would be an appropriate question to ask of any professor.
Answer: It's a reasonable thing to want to know, so as long as you phrase the question in an appropriate manner, it should not come across as rude.  Academics may leave a university due to retirement or due to other jobs at alternative institutions.  This is common enough that it is something that should be considered (on both ends) when forming a supervisor/candidate relationship.  I recommend you speak directly to your potential supervisor.  To avoid rudeness, I would try something like this:

"One of the things I've been advised about when searching for a supervisor is to check to see whether you have any plans to leave the university in the next few years.  I'm mindful of the fact that I'd like to have you as a supervisor for my whole candidature, but I don't want to be a burden if you have other life-plans that would make that difficult.  If it's not too personal, would you mind telling me if there's any reason that you might not be able to support me for my whole candidature?"
Answer: No, it's not rude, but have a face to face conversation with them about your future and the possibility of working with them. Include and concerns such as this one in that conversation. Ask for their general advice on preparation and such as well.
Such a conversation can be very valuable for your future, but it isn't something to do by email.
If they are planning on leaving or retiring, they will probably give you hints at least, perhaps suggesting other people. But there are no guarantees as people can also take advantage of opportunities. Some students move along with professors who change institutions.


how can I make my animated robot pick up an object (a pole) during an animation

Question: how can I make my animated robot pick up an object (a pole) without making two separate animated key signatures one for the robot and one for the object?
Answer: The object can be parented to the empty, and the empty can be constrained to the robot's arm. You will need to use keyframes to control the constraint on the empty. That's how I usually do it. Then you can animate the object independently if you want to. It's hard to answer this question without more information about the problem and your current ability with Blender. Are you a beginner? How are you currently animating this and what is giving you trouble?
Anyways, if you're totally averse to using keyframes on anything but your robot rig, add a bone to the rig where the object will be when it is held (Object-Socket). Duplicate the bone (Object-Parent). Now, remove any parents from object-parent by pressing alt-p, and make sure object-socket is parented to the hand bone (or whatever the robot is picking it up with). Create a Copy Transforms constraint by selecting the object-socket bone and then the object-parent bone (order matters) and press shift-ctrl-c --- choose Copy Transforms from the menu. Now, parent the object to the object-parent bone. When the Copy Transforms constraint on  object-parent is enabled, the object will stay in the hand. When it is disabled, the object-parent bone will return to its place, which can be animated as normal (and may look like a jump when you disable the constraint. To fix this, turn the constraint back on, press the I key and set a keyframe for Visual location/rotation/scale, then turn the constraint back off. the object should now be in the position it was in with the constraint, but it no longer follows the hand. This is useful when the object needs to be put back down, thrown, etc.). I wouldn't really reccomend doing it this way unless you have a reason not to use the first method, which I think is cleaner. And of course the visual location/etc. keyframe trick works on any constrained object.
I'll add more detailed explanation if you need me to, but if you're unsure about rigs/armatures, constraints, parenting, etc. the first thing you should do is study those features of Blender, since they're essential to animation. There's no need to be a superstar rigger, but an animator should understand the basics.
I hope this is helpful.
Comment: I like your answer and I would be interested in a more detailed explanation as I am encounting difficulties with using the Child Of constraint doing a similar type of animation, and I am new at using Blender. Thanks for any extra info.
Answer: You can do it with a Child Of constraint:

Move your robot hand (whether it's a bone or an object).
Give your pole a Child Of constraint with the hand as Target.
The frame before the hand picks the pole, give the constraint an Influence of 0 and create a keyframe on this value.
The very next frame, rise the influence at 1 and create a keyframe. Now the pole follows the hand.
The frame before the hand drops the pole, create keyframe LocRotScale on the pole and create a keyframe on its constraint Influence at 1.
The very next frame, create a keyframe Visual LocRotScale and create a keyframe on its constraint Influence at 0.

Why Visual LocRotScale keyframe? If you didn't do that, the child object would go back to the location it got before its parenting, because a child always keeps its original location (i.e. the location it got before it was parented) as reference. For example if you move a parent, the child will visually follow, but if you unparent the child with a simple Clear Parent and not Clear and Keep Transformation, it will jump back to its original location, the one before you parented. On the contrary, if you give it a Visual LocRotScale keyframe, it means you consider its visual position, the one it got while parented and moved by its parent, as its new location, so if you unparent it it won't jump back to its previous location.


What are the differences between Bayesian filters and adaptive filters?

Question: I am learning about state estimation and I am having difficulty understanding the difference between Bayesian filters such as Kalman filter and particle filters compared to adaptive filters. According to this tutorial, adaptive filters are stochastic approximators such as LMS and RLS and they assume that state varies very slowly with unknown dynamics. Could you please explain the main differences between these state estimation categories?
Answer: I don't know what "adaptive filters" are, but from a statistical standpoint

recursive least squares is a special case of the Kalman filter for models with state dynamics that are noiseless, and
particle filters are simulation-based approximations to the filtering recursions. Instead of keeping track of several numbers that change from time point to time point (the Kalman filter keeps track of a mean vector and a covariance matrix), they keep track of a large collection of weighted samples. They are much slower, more difficult to program, and harder to justify mathematically than closed-form filters, so they should really only be used for models where, say, the Kalman filter isn't suitable. This might happen, for instance, when either the state transition and/or the observation equation aren't normal, or one of them isn't "linear".


building entity data source control from code behind

Question: if i have an entitydatasource control in my aspx (which looks like so
and was created by the configure wizard in the designer and works)
<asp:EntityDataSource ID="edsFuelPrices" runat="server"
                        ConnectionString="name=enerEntities" DefaultContainerName="enerEntities"
                        EnableFlattening="False" EntitySetName="dieselprices" Select="it.[date], it.[NYMarineDiesel]">
                </asp:EntityDataSource>

I want to build that in the code behind and remove all the attributes from the aspx markup.
Why doesnt the following work? I get errors on the load "The query syntax is not valid. Near escaped identifier '[NYMarineDiesel]', line 1, column 21" even though NYMarineDiesel is a valid column in the table
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
    If Not Page.IsPostBack Then
        ' when page loads for the first time just show the Marine diesel prices
        Try
            edsFuelPrices.ConnectionString = "name=enerteckEntities"
            edsFuelPrices.DefaultContainerName = "enerteckEntities"
            edsFuelPrices.EnableFlattening = False
            edsFuelPrices.EntitySetName = "dieselprices"
            'edsFuelPrices.Include = "Date,NYMarineDiesel"
            edsFuelPrices.Select = "it.[Date], it[NYMarineDiesel]"
        Catch ex As Exception
            MsgBox("An error occurred while loading this page: " & ex.Message.ToString())
        End Try
    Else
        'need to add the code on postbacks, the data returned for the chart is  determined by what checkboxes are checked in the checkboxlist

    End If
                'FormatXAxisLabels(chtFuelPrices, "MainChartArea", 9)
                FormatYAxisLabels(chtFuelPrices, "MainChartArea", 9)
                FormatLineCharts(chtFuelPrices, True, "MainLegend", "Fuel Types")
End Sub

Answer: Aren't you missing a dot between 'it' and the property name? - you have it[NYMarineDiesel] and I believe you should have it.[NYMarineDiesel]"


Prove Estimated Regression Coefficients are the same with or without an intercept term

Question: I am mostly having trouble with this question in that I don't think I know where to start and I am not confident in my answer that I have at the moment. The answer I have currently is mostly just intuitive and I would have to type an essay to explain it. I am looking for something that is more mathematically based.
The question is: Prove that the estimated regression coefficients for a linear regression with an intercept term are identical to those obtained for
the same linear regression equation without an intercept term, but for
which all variables are replaced by deviation from their mean values.
Comment: self-study tag maybe?
Comment: Please add the `self-study` tag, and read its [tag-wiki](http://stats.stackexchange.com/tags/self-study/info), modifying your question as explained there (including the answer you're not confident in, and explaining where you think you need help with it). Please also use a more informative title. Every question here is a "statistics question".
Comment: The result follows straightforwardly from the observations that $$\operatorname{cov}(X-a,Y-b) = \operatorname{cov}(X,Y)$$ and $$\operatorname{var}(X-a) = \operatorname{var}(X),$$ that is, _translation_ of the variables in general (centering is a specific case) does not change variances and covariances, and so has no effect on the regression coefficients. What _does_ change is the _intercept_ which becomes $0$ if all the variables are translated to have zero mean.
Comment: This is much straightforward.
Answer: all variables are replaced by deviation from their mean values
I think the question is about the centering independent variables. To make our life easier, we just use  linear regression with one predictor variable and intercept.
Suppose the simple linear regression is:
$Y_i=\beta_0 +\beta_1x_i+e_i$
$e_i\sim N(0,\sigma^2)$
Treat $\beta_0 +\beta_1x_i$ as a constant, it is not difficult to see:
$Y_i\sim N(\beta_0 +\beta_1x_i,\sigma^2)$  (useless for this proof)
We can write the model as matrix format:
$Y=\beta X+e$
$X$ is the design matrix with two columns:
$\begin{bmatrix}
1 & x_1\\
1 & x_2 \\
...& ...\\
1 & x_n
\end{bmatrix}$
By OLS:
We can get $\beta=(X'X)^{-1}X'Y$
Here $\beta=(\beta_0,\beta_1)'$
Below is the proof:
Next we will see what will happen when we center the $x_i$
Let $x^*=x_i-\bar{x}$  (here $x^*$s are deviations from their mean values)
$\bar{x}=\frac{\sum x_i}{n}$
$Y_i=\beta_0^* + \beta_1^*x^*+ e_i$
Now the design matrix $X^*$ is :
$\begin{bmatrix}
1 & x_1-\bar{x}\\
1 & x_2-\bar{x} \\
...& ...\\
1 & x_n-\bar{x}
\end{bmatrix}$
Still by OLS we can calculate
$\beta ^*=(X^{*'}X^*)^{-1}X^{*'}Y$
Now let us see what happened with $\beta^*$
$X^{*'}X^*=\begin{bmatrix}
1 & 1&... &1 \\
x_1-\bar{x} &x_2-\bar{x}&... &x_n-\bar{x}
\end{bmatrix}*\begin{bmatrix}
1 & x_1-\bar{x}\\
1 & x_2-\bar{x} \\
...& ...\\
1 & x_n-\bar{x}
\end{bmatrix}=\begin{bmatrix}
n & \sum (x_i-\bar{x})\\
\sum (x_i-\bar{x}) &  \sum (x_i-\bar{x})^2
\end{bmatrix}$
Noted $\sum (x_i-\bar{x})=0$
$X^{*'}X^*=\begin{bmatrix}
n & 0\\
0 &  \sum (x_i-\bar{x})^2
\end{bmatrix}$
$\therefore (X^{*'}X^*)^{-1}=\begin{bmatrix}
1/n & 0\\
0 &  1/\sum (x_i-\bar{x})^2
\end{bmatrix}$
$\beta^*=(X^{*'}X^*)^{-1}X^{*'}Y=\begin{bmatrix}
1/n & 0\\
0 &  1/\sum (x_i-\bar{x})^2
\end{bmatrix}*\begin{bmatrix}
1 & 1&... &1 \\
x_1-\bar{x} &x_1-\bar{x}&... &x_1-\bar{x}
\end{bmatrix}*\begin{bmatrix}
y_1\\
y_2\\
...\\
y_n\end{bmatrix} =\begin{bmatrix}
 \frac{\sum y_i}{n} \\
 \frac{\sum (x_i-\bar{x})y_i}{\sum (x_i-\bar{x})^2}
 \end{bmatrix}=\begin{bmatrix}
\beta_0^*\\
\beta_1^*
\end{bmatrix}$
Here we can see $\beta_0^*$(intercept) is $\bar{Y}$ which is just the grand mean.
Next we need to show $\beta_1^*=\beta_1$ noted:$\beta_1$ is the coefficient without centering and we know that for original $x_i$s, $\beta_1=\frac{\sum(x_i-\bar{x})(y_i-\bar{y})}{\sum(x_i-\bar{x})^2}$ i.e $\frac{S_{xy}}{S_{xx}}$
Here is a good reference as how to calculate $\beta$s for linear regression.
In page 4 you can see $b_1$(here is $\beta_1)$$=\frac{\sum(x_i-\bar{x})(y_i-\bar{y})}{\sum(x_i-\bar{x})^2}$
and $b_0$(here is $\beta_0)$$=\bar{y}-b_1\bar{x}$
Comparing with $\beta_1^*=\frac{\sum (x_i-\bar{x})y_i}{\sum (x_i-\bar{x})^2}$
We need to show that $\sum(x_i-\bar{x})y_i=\sum(x_i-\bar{x})(y_i-\bar{y})$
This is not difficult since $\sum(x_i-\bar{x})(y_i-\bar{y})=\sum (x_i-\bar{x})y_i-\bar{y}*\sum (x_i-\bar{x})$. Note, the last term is just zero.
$\therefore$ $\beta_1^*=\beta_1$.
Summary, by above calculations, we can see when centering the $x_i$s only the intercept changed to grand mean other coefficients will not change.
##############################
Based on Dilip's comment if you don't want to use matrix and do not consider intercept use the following formula will be much straightforward.
$\beta_1=\frac{\sum(x_i-\bar{x})(y_i-\bar{y})}{\sum(x_i-\bar{x})^2}=\frac{Cov(x,y)}{Var(x)}=\frac{Cov(X-a)(Y-b)}{Var(X-a)}$
Comment: I enjoyed going through your derivation. Very nice. I wonder if you can consider a hyperlink for the $\beta_1$ formula when you say, '... and we know that for original $x_i$s,...'
Comment: I am having trouble understanding how you obtained Y=(x`x)^-1x`y by OLS. I have never used this design matrix format so that is most likely where I am lost at.
Answer: The regression equation $y = \beta_0 +\beta_1 x + \epsilon$ is estimated by minimizing the sum of squared $\sum_i (y_i - \beta_0 - \beta_1 x_i) ^ 2$.
When you derive this equation with respect to $\beta_0$ and put that equal to zero (to find the minimum) then you find that $\bar{y} = \beta_0 + \beta_1 \bar{x}$. (see below).
Subtracting the latter equation from the regression equation you find $(y-\bar{y}) = \beta_1 (x-\bar{x}) +\epsilon$.
This is the regression equation without an intercept but with the variables as deviations from the mean.
As you see the $\beta_1$ is the same in the 'original' equation.
Note that,
(1.1) For the 'original equation' we found that  $\bar{y} = \beta_0 + \beta_1 \bar{x}$.  Or that $\beta_0 = \bar{y}-\beta_1 \bar{x}$.
(1.2) For the equation in deviation form: $(y-\bar{y}) = \beta_1 (x-\bar{x})$ can be re-written as $y = (\bar{y} - \beta_1 \bar{x}) + \beta_1 x$ which is the same intercept. So if you estimate $\beta_1$ from the equation $(y-\bar{y}) = \beta_1 (x-\bar{x})+\epsilon$ then this is the same $\beta_1$ as estimated from the 'original' equation. If you want to estimate $\beta_0$ from $(y-\bar{y}) = \beta_1 (x-\bar{x})+\epsilon$; this can be done as  $\beta_0 = \bar{y}-\beta_1 \bar{x}$.
=====
Proof that minimising $\sum_i (y_i - \beta_0 - \beta_1 x_i) ^ 2$ yields $\bar{y} = \beta_0 + \beta_1 \bar{x}$.
Deriving $\sum_i (y_i-\beta_0 -\beta_1 x_i)^2$ with respect to $\beta_0$ gives $2 \sum_i (y_i -\beta_0 -\beta_1 x_i) (-1) = 0$. It follows that $\sum_i y_i -n \beta_0 -\sum_ix_i =0$ and after dividing by $n$ you find $\bar{y} = \beta_0 +\beta_1 \bar{x}$.
Comment: This is a good solution. you can move $\bar{y}$ to right hand too, which is the new intercept.
Comment: @Deep North: I did not do that because the question asked for 'deviations from the mean'. Note also that the intercept is $\bar{y} -\beta_1 \bar{x}$ not $\bar{y}$..
Comment: $\bar{y} -\beta_1 \bar{x}$ is for original $x_i$s, $\bar{y}$ is the intercept after centering. I mean this one $y-\bar{y} = \beta_1 (x-\bar{x}) +\epsilon$
Comment: @Deep North: after centering $x$ **and** $y$ there is no more intercept and the question was to show that '... without an intercept term' (see the question).
Comment: @Deep North: :-) I read your answer and you get a (+1) for it


how do you turn the overfow drain in tub upside down

Question: my house was built in 1946, love the old tub but how do I turn the overflow drain upside down where I may take a bath? As of right now, there's not enough water to cover my feet! Here are the images, sorry about the mess! I plan on replacing the knobs, etc..[overflow The tub itself will be re-caulked also
Comment: Until you get the lever controlled stopper to work, you might be able to stop it with a thin, flat rubber (elastomer) stopper.
Comment: Since this does seem to be about changing the overflow level, at the risk of making it essentially a shopping question, there is a product for exactly that purpose that involves no actual plumbing - a clear plastic dome with suction cups and a hole - you turn the hole to set your new desired overflow level, and then you have to be very careful in the bath or you'll slop water over the edge onto the floor. "overflow drain cover" should find it without getting into spamming a brand name, of which there seem to be several selling the same thing.
Comment: I glued a shaped piece of brass over the bottom half of the inlet to my overflow drain. That got me another 1.5 inches if depth. Tested to see that flow through overflow drain was strong enough to take hot and cold at full throttle. You do NOT want your tub overflowing onto the floor. That sort of thing causes ceilings to collapse.
Comment: Thanks so Much everyone!! Co-workers husband turned it for me, Sorry I haven't been on here, but thanx A Bunch!
Comment: @jonib, please provide and accept an answer, accept one of the others offered, or delete your post. We'd like to see this question resolved. Thank you!
Answer: I could be wrong but If read this correctly, it is not a case of it not working properly, it is a case of the water level in the tub being to shallow ( reaching the overflow before it covers her toes.) As lover of soaking in a tub i sympathize with her and wish for her to have a deep soaking tub, but short of a new tub there is not much one can do.
I believe she is asking how to change the Height of the overflow opening to allow the water level in the tub to be deeper.
The opening is on the underside of the chrome overflow escutcheon, You could try and take off the escutcheon,  put a wash cloth over the drain so you do not drop the screws down the drain. (three screws, two for the cover one for the handle, take the handle of first then take the escutcheon cover off) turn the escutcheon 180 degrees so that the opening is on top. you would have to caulk around the bottom. This would result in gain of maybe in inch and half of water depth.
what i do is, when the water reaches the overflow i cover the overflow with plastic kitchen wrap, the suction will pull the plastic tight to the opening. This will buy you some time.  but you must not do this and walk away from the tub while the water is on. I an not responsible for any water damage that you cause. i will take credit for your happy toes.
Answer: There are many varieties of waste & overflow assemblies. You will need to disassemble yours to find out how it works and what the problem is, it is not always easy but if you are ambitious and you persevere I have confidence that you can fix it. Look closely for any manufacturer's name stamped on the overflow plate, it might help you find parts.

Comment: PS- the wire and plunger setup is commonly referred to as the *bucket and wire assembly*.
Comment: If the linkage becomes disconnected, is it possible to reconnect through the overflow opening in the tub or does one have to have access behind and under the tub.
Comment: You can usually fix it from the opening in the tub (depends on type, if it is like the picture on the left above, I know you can). I have even removed entire bucket and wire assemblies and replaced them that way. It isn't always easy though, you need to fish the wires and bucket up and they get stuck/jammed and crud makes it a fight.
Comment: When I think about the problems with these linkages I am surprised people put in this type of stopper. There are metal stoppers that are operated by hand from the tub side--with a twist it drops down and seals. I put one of these in a lavatory for a relative, then later I went over and it was removed. I was told, " It doesn't work." I found it and put it back on and brightly said, "I put it back on and it works." But I know that the next time I'm over there it will be removed.


What can you do against a fed Fizz?

Question: A couple games ago, one of my teammates (Vladimir) Fed a Fizz 9 times. I played Kog'Maw and since Fizz can pretty much jump over my front line and own me, there was nothing I could do. What can you do against a fed Fizz?
Answer: There are several measures you can take against a fed Fizz:

Ranged poke him
Focus CC on him during team fights
Get GA/banshee
Dodge his ult
Get magic resist
Answer: There really isn't much you can do 1v1. Best thing to do is try to catch him alone with your team, will be hard with troll pole though, he can get away easy.

What can you do against a fed Fizz?


Jpgraph: Show whole year even if some months are missing

Question: I want to show the values for each month in a graph. But depending on the year, months in the beginning or the end are missing (e.g. because values had only been recorded from April, not January, or because the current year isn't over yet).
Currently, Jpgraph will then only show the months that have values. But I'd like there to still be 12 sections, the missing ones should just be empty/zero.
Is there a way to have Jpgraph show the missing months?
Thanks,
MrB
Answer: step by step:

go to php.ini
find "memory_limit"
change value and Put it in the 32MB.(For Example)
Enjoy!

good luck


updating cliques for an updated graph

Question: A graph $G$ has nodes $V$ and edges $E$. Let's say I have found the maximum clique or all the cliques in $G$ with any algorithm, such as the Bron-Kerbosch algorithm. After a while, $E$ has been updated to $E'$ by adding new edges to the graph, while $V$ remains the same. I want to find all the cliques again in $G$ with $E'$. Is there a way to use the cliques found earlier and update them in some way instead of finding the cliques from scratch again?
Answer: If the goal is to find all cliques, then we start with the fact that every clique in $E$ is also a clique in $E^\prime.$ For each new edge $(a,b),$ look at every pair of cliques $C,\hat{C}$ such that $a\in C$ and $b\in \hat{C}$ and test whether the set of new edges makes $C \cup \hat{C}$ a clique.
If the goal is to find a maximum clique, do the above and update the maximum clique whenever a new incumbent is found.

updating cliques for an updated graph


Custom Icons on Iphone Status Bar

Question: This could be simple but I haven't found specific information about that. It is possible in monotouch to put a custom icon in the iPhone Status Bar for an specific application? Or this shouldn't be done. I read some information about changing the color or hide the Status Bar but nothing about adding custom icons.
Answer: There is no public API for adding icons to the status bar, and doing so using an undocumented method will almost certainly keep you out of the app store.
Answer: You can control the colour and some icons (e.g. network activity) but it cannot be customized. Also Apple wants you to replace it with your custom one.
The only tools (that I know) doing this kind of stuff are for jail-broken phones.
Answer: you should refer the below SO link.Its similar to your question Hope it helps you...

Adding view on StatusBar in iPhone

Custom Icons on Iphone Status Bar


Can I store files and folders on a live USB

Question: Sorry but my flasher is quite big.
I wonder,I have some movies and stuff.
Could I store them on the same flash drive after installing Ubuntu so that I could store them on the usb drive.
(I just want to store files in the space I didn't use (reserved space) to store my files and folders.
I am using windows.
Comment: To close voters: This is not off-topic. Please read the first paragraph.
Answer: A Live, (or Persistent), USB uses the FAT32 filesystem.
Windows can see and access files on a FAT32 partition just fine, (as long as it is the first partition on the drive).
Adding files to this partition will not break the Live install unless the Ubuntu files are deleted or overwritten.
If you need to access any of these stored file while booted from the USB, open filesystem/cdrom as root.
All of my USB drives have an install of Linux on them.
If you are talking about doing a Full install to the USB, use manual partitioning, (Something Other), and make the first partition on the drive FAT32 or leave it NTFS.
Answer: Yes, this is possible. But, I suggest you this following procedure to follow:

First booting from a Live CD or USB other than the one you want to use as target disk.
Use the gparted software a.k.a "Partition Editor".
First create an ext4 partition and a swap partition in your USB disk.
Then create a Fat32 partition on the rest of the free space.
Start Ubuntu installation.
Choose the USB disk as the target disk on the installation process. Also use the "Something else" option to select the root partition (which is the ext4 partition, you created already) and choose the swap partition. Then proceed with the installation.
Make sure you selected the boot loader installation path correctly. For example, if you are installing to a USB disk, it might be /dev/sdb or /dev/sdc etc.
Answer: Yes, this is possible. You can use the Startup Disk Creator from Ubuntu to do that. There it is possible to write an Ubuntu image also on a USB flashdrive with files on it. But you should make a backup before ;-)
Answer: Since you're using Windows, you can check this guide to create a bootable USB drive on windows Or just use Universal USB Installer which is quite self explanatory to use.
After installing ubuntu on flash drive, you can put your files and folders in it without any problem.
Answer: No, user files and settings are not saved on other storage media in Live environment, unless you explicitly do so. E.g. – mounting the hard drive and creating/saving configuration files on it.
However, if the internal hard drive has a Linux swap partition on it, the Live OS may use it as a "ramdisk" for increasing the system's performance.


I'm on an EEA FP. Can my spouse who's an EEA citizen travel out of the country while I stay in the UK?

Question: Can my spouse (EEA citizen) travel out of the UK while I stay in the UK? I hold an EEA Family Permit.
Comment: When you say travel, do you mean a few weeks vacation or do you mean your spouse would reside elsewhere long-term?
Comment: That's certainly not breaking the spirit of the EU rules.
Comment: she would be away for 3 weeks. that's it
Answer: Strictly speaking, no, you are not supposed to benefit from freedom of movement in the UK while your wife is outside the UK, but I suspect that a court would draw a distinction between visitors and residents.  If you and your wife have established your residence in the UK, then her temporary absence should not deprive you of the right to remain in the UK.  If you are visiting the UK temporarily, however, and she leaves, then you should probably also leave.
Comment: well, I do work in the UK and we're renting an apartment. although we've been in the UK since February 2018
Comment: I doubt you have much to worry about. What document did you show your employer to demonstrate your authorization to work?  How long will your wife be away?
Comment: she will be away for three weeks


How to update to the 18.10 beta?

Question: I found CD images for the 18.10 beta, but I'm wondering if there is a way to upgrade OTA. I have the bionic-proposed box checked, but there is still nothing.
Comment: Questions related to any version prior to final release is off topic here.
Comment: This is about upgrading 18.04. Border case off topic I would say. But there IS an answer so I took the liberty to answer it. We do need beta testers, don't we?
Comment: 18.10 is Cosmic, not Bionic. Enabling the bionic-proposed repositories will do something other than you intended. Undo that.
Comment: See also the following link, [Ubuntu Development version / How to participate](https://askubuntu.com/questions/1018033/ubuntu-development-version-how-to-participate)
Answer: Pre-requisites:
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo apt autoremove

Those will make sure your current system is up to date.
Edit /etc/update-manager/release-upgrades and set Prompt=normal to avoid the "No new release found message."
This will start the upgrade:
sudo do-release-upgrade -d

Big fat warnings:

Please do not do this on a production server. 18.10 is not ready for general usage and breaking your system is more likely than having a working system. Every new update might break something.
If you have personal data do make a backup every day and save them all. At some point you might need to re-install as every update could break your boot procedure. Knowing a little not more then average about the inner workings of Ubuntu so the base system, Linux, systemd, the boot process would be good to have.
Biggest problem probably will be 3rd party drivers. I would remove them and stick to the open source versions when upgrading and re-enable them when there is a working newer system.

How to update to the 18.10 beta?


Do we know Ford Prefect's old name?

Question: I was reading this question about Ford's name, and was reminded that it is not his original name.  Do we know what his name was before it was "Ford Prefect"?
Answer: Sort of, but not really
There's a footnote on this topic in the novel; it doesn't tell us his actual name (though there's a quite compelling reason given for why not), but we do learn that his nickname at school was "Ix":

Ford Prefect's original name is only pronuncible in an obscure Betelgeusian dialect, now virtually extinct since the Great Collapsing Hrung Disaster of Gal./Sid./Year 03758 which wiped out all the old Praxibetel communities on Betelgeuse Seven.
[...]
The other kids at school nicknamed him Ix, which in the language of Betelgeuse Five translates as "boy who is not able satisfactorily to explain what a Hrung is, nor why it should choose to collapse on Betelgeuse Seven".
The Hitchhiker's Guide to the Galaxy About Ford Prefect
Comment: Related reading: [What is a Hrung?](http://scifi.stackexchange.com/q/119511/31394)
Comment: Isn't Ix from Dune just the 9th (IXth) planet? I think there's even a passage in an inner monologue of one of the Bene Gesserit about that, something about that the stupid Ixians don't even understand where their name comes from.
Comment: Hm, I wonder if this was a reference to Ix from Dune?
Comment: @FinnO'leary I don't imagine so.  There's no real similarity other than the name, and the shortage of very short names (as required by the joke) that don't immediately call to mind an English meaning means that authors who use them are highly likely to have coincidental clashes.
Comment: @JörgWMittag Yeah, so even then we'd ran out of short names.
Comment: So *this* is where all those views and rep came from!
Comment: @JörgWMittag That was my point, yeah :)
Comment: Are all of the H2G2 answers supposed to be voted to 42?

Do we know Ford Prefect's old name?


Simple QM question about Sy matrix

Question: Given  a spin 1/2 particle in state $|\alpha\rangle=\begin{bmatrix}a \\b\end{bmatrix}$, what is the probability of it being measured in the $S_{y+}$ state. Is this equivalent to, if $S_y$ is measured on this particle, what is the probability the result being $\hbar/2$? I think it's supposed to be like $|\langle S_{y+}|\alpha\rangle|^2$ right? And $|S_{y\pm}\rangle=\frac{1}{\sqrt{2}} \begin{bmatrix}1 \\\pm i\end{bmatrix}$ But then I get $a^2/2 +b^2/2$ for both. That doesn't make sense. What am I doing wrong?
Answer: Figured out what I was doing wrong. I had to write it out explicitly considering, a,b complex.
The answer is $\frac{1}{2}(|a|^2 + |b|^2 + i(a^*b - b^*a))$ Does anyone know a more succinct way of writing that last term? It's definitely real so no worries about that.

Simple QM question about Sy matrix


The reason why the function to query owner of NFTs is not included in ERC1155 unlike ERC721

Question: I'd like to know the reason why the function to query the owner of NFTs is not offered in ERC1155 unlike ERC721.
It seems possible to query the owner of token whether it is NFT or FT. What's the problem with this function?
Answer: Because the ERC1155 is a semi-fungible token standard. Which means that a potentially very big amount of tokens can be living on the blockchain for a given ID, and plenty of accounts could own one single copy of this token in their wallet.
That would lead to a big iteration to return an array of owner addresses, this is gas costly and probably not what we want in an OZ standard.


Best way to handle sparse + non-sparse data to create a model

Question: I'm wondering what is the best way to handle sparse+non-sparse data in e.g. a Ridge regression using scikit learn.
Ridge can handle both sparse and nonsparse data.
Imagine something simple as a description (text) field that gets Count/Tdidf Vectorized (sparse), and an income continuous variable.
Now imagine that we have several other text fields and several other continuous variables.
What is the best way to model some continuous y variable?
I've considered making two separate models (one using sparse data, one using non-sparse) and somehow trying to combine.
I've also considered using PCA to make the sparse data into a "handleable" amount of continuous features.
How do you usually solve this issue?
Note: the continuous variables would have many unique values (and you'd lose power anyway when converting continuous to bins), and the text fields might end up having like a million features, thus not able to be dense.
Answer: You can have a look at : Feature Engineering and Classifier Ensemble
for KDD Cup 2010 where the authors generated different models (for sparse and dense features) and combined it to obtain good perf (they actually won the KDD cup).


What if MS advisor pad his wife's name into my conference and journal publications?

Question: My MS advisor who is a tenured professor in a US school is padding his wife's name into my publication papers. His wife is an PhD candidate from the same department too and she didn't have any contribution on my research work. This is ethically and morally wrong but as the advisor is my thesis committee chair and I want to do my defense in coming month, I haven't opposed his idea yet. What I could do in this scenario? (He submitted one paper in a conference already with her name as second author and I am working to submit another in a transaction- he insisted her name to put in the second author position)
Comment: How would you know that his wife has not contributed?  She could have come up with the idea.  At the very least, he and her would have 'discussed' your paper.  Proving that she has not contributed will be very difficult.  As an aside, my old colleague had this rule: if you are in the same room when the paper is discussed, you are a co-author.
Comment: Are other faculty aware that this is happening? Do you have any allies in the faculty?
Comment: Well for start, I never discussed anything related to my research with her despite I am the one who is working on this research topic and coming up with the major ideas.  I understand what you are saying but this is highly debatable and question the whole idea of authorships in academia @Prof.SantaClaus
Comment: Discomforting situation indeed. Assuming what you have sketched is true, you should refuse accepting that behaviour. But the "How to" is the complicated part.... Did you try asking kindly why she is being added to the authors list?
Comment: I haven't discussed any this issue to any faculty yet. I have professional good relationship with other faculty members but not sure how discussing this with them will affect my upcoming thesis. @Buffy
Comment: No I didn't ask him as that could lead to a conflict and my thesis defense is in coming month. @Alchimista
Comment: How did it end? million-dollar court case? the wife is a succesful politician/academian/surgeon?
Comment: @EarlGrey not even close to a million-dollar :)
I changed my lab and professor's wife is now an assistant professor in his husband's university. She is co-authored in two of my paper where she didn't contribute a bit.
Answer: This sort of "guest" authorship is not unheard of. For instance, that may be why Chinese universities primarily give credit to the first or corresponding authors of papers (as opposed to other authors, who may be "guest" authors).
Assuming your description of the situation is correct, including another PhD student who had little to no contribution as the second author, especially one with a personal connection to the advisor, is definitely ethically questionable. It's good that you noticed and disagree with it.
Practically speaking, it's much easier to raise this issue after you have graduated and received any recommendation letters you need from your advisor. For instance, if indeed you are submitting in a few months, you could delay submission of the papers until afterwards. Alternatively, even if you submit a paper with a non-contributing second author, as the first author you will still receive the primary credit from any applications of your CV.
Comment: You can be a bit more forceful about keeping someone off the author's list if you aren't relying on the advisor for passing your defense and getting a recommendation letter for your next job. Ultimately, it can get as ugly as either of you let it; if one author doesn't want it published, they can easily complain to a journal to stop publication. This is why ideally, authorship should be discussed before the authors start working on the project.
Comment: Then the right thing would be not to confront him (since you are in a vulnerable position), and not to work with him in the future. You might want to see some justice, but practically speaking it is nearly impossible to prove anything. If the lady in question is his wife, they presumably talk, so he can always claim that his ideas are largely her ideas as well.
Comment: Any idea about how to raise the issue after graduation? @Elodin
Comment: What are you seeking to achieve? If you feel your colleague is doing something you consider ethically wrong, you don't work with them in the future.
Comment: I am here seeking advice to do the right thing as the advisor's this particular act is wrong and I am in a really vulnerable position to confront him for this act at this moment. I won't work with him in future for sure though. @rg_software
Answer: The situation you describe is known as the "White Bull effect" and was for example described here:

"Junior researchers can be abused and bullied by unscrupulous senior
collaborators. This article describes the profile of a type of serial
abuser, the White Bull, who uses his academic seniority to distort
authorship credit and who disguises his parasitism with carefully
premeditated deception. Further research into the personality traits
of such perpetrators is warranted."

what you can do? In your current situation: Most likely nothing. You can hardly win anything but lose a lot. But on the brighter side, in most fields only the first and the senior authorship count anyway (for exactly the reason described in the paper above).


Group Admin kicked out of own group

Question: Why does Whatsapp kick me out of group of whcih i am admin and other groups in am in. I changed from Samsung S4 to J3. And how can i restore my previous backups?
Answer: If you tried to change your phone number of your whatsapp account, whatsapp recognises your account as a different from initial one.
Your account therefore gets considered as not being among the group members.

Group Admin kicked out of own group


Timeline for letters of recommendation

Question: How long before you need them should you ask for letters of recommendation for academic jobs? I've heard the etiquette is to ask 3-4 months in advance, but haven't found much corroboration for that. Honestly, that seems like quite a long time. Would asking as late as 6 weeks in advance come across as rude?
Comment: I think I would differentiate between a preliminary ask such as, "Would you be willing to write me a letter of recommendation for X or Y when the time comes?" and a specific ask. I make preliminary asks 2 or 3 months in advance, and then ask specifically about 4-6 weeks in advance. The good thing about this timeline is you can find out what sort of materials they will need to write a letter when the time comes. When I ask specifically, I usually include my application materials as well as their requested materials, so it is difficult to do that too far in advance.
Answer: I can't speak for everyone, but 6 weeks would be fine for me personally.  Less than 2 weeks I'd be grumpy about, if there weren't a good reason.
Answer: I would like a month or two advance warning, because a coherent, helpful letter requires at least a half-day's work, I think. EDIT: and, just to explain, usually all my days are over-committed (note: over) several months in advance, so it's not that I can happily re-allocate any significant part of a day on short notice.
I also do not think that it's about providing other material, because I strongly think that my letter should refer to my first-hand experience with a candidate. After all, their transcript and other activities that I've not seen myself ... will be documented otherwise... and my comments on such things will be worth nothing, in fact, contrary to many traditional beliefs. That is, my praise of a transcript means... srsly... what? Or praise of a summer project, or other projects done out of my sight, etc?
I read letters, on our grad admissions committee, and I write letters, focused on first-hand experience, NOT on commentaries on transcripts. Such commentaries add nothing.
Therefore, there is scant point in giving your letter-writers your larger CV... although it is traditional. If (heaven forbid) all they can do is wax eloquent over the wonders of your CV, they're not adding anything, not helping you.
(But, still, apparently lotta people can be fooled lotta the time. Still, further, I myself would not want to count on fooling people.)
Comment: My advisor says that he needs these materials because he needs to have his memory jogged. I understand because even I need my CV to remember what I did 5 years ago, and that is how long we have worked together.
Answer: I want to say that what follows is more of an exception than a rule and that you should give your letter writers at least two weeks of notice in advance of writing a reference.
This year alone, I have had two students ask me for rec letters with about a week in advance of the deadline. They were in a bind, whether due to other professors never writing them back or suddenly realizing they needed four references instead of three. In general, I would say "No" to such a short timeline. However, I ended up writing them brief letters anyways because I don't want them to be unable to submit grad school applications due to not having enough rec letters. I only did this because these were students for whom I could quickly write a letter. To be honest, the letters were not as well written or as thorough as they could be had I had more time. This is yet another reason why you should ask your letter writer with plenty of time in advance--they probably won't be able to write a well considered reference with short notice.

Timeline for letters of recommendation


Changing ownership of a directory

Question: I am trying to change the ownership of a directory to a certain group.
I execute getent group and I see that the group I'm interested is in there - sudo:x:27.
Now I am executing chown in the following way:
sudo chown -R sudo /PATH/TO/DIR
And I get: id 'sudo': no such user
I also tried sudo chown -R 27 /PATH/TO/DIR - this commands actually being executed but then when I try for example to use mkdir in the directory I should own right now I get permission denied (and I did check with ls -l that the permissions changed).
What am I doing wrong?
Answer: chown takes the user and group as user:group. If you only want to change the group:
sudo chown -R :sudo /PATH/TO/DIR

Comment: This command does this. It **will** change the owning group. It will **not** change permissions. It will **not** change the owning user.
Comment: (OT: sorry for the edit back and forth, I had a little trouble with the history of my browser)
Comment: And this way this group will keep all of it's past ownerships right? nothing changes except from the added ownership?
Comment: no, this will replace the current group of all subdirectories and files under that directory with the group `group`. Your question states that you want to CHANGE the group, not ADD another one.
Comment: Oh so I am probably using the wrong command? I simply want a specific directory to be owned by the `sudo` group (so if im inside that group I can create/delete/copy files inside that folder)- is there another command that does this?
Comment: What's wrong with the right command for the situation, `chgrp`?
Comment: Nothing. As usual there is more than one way to do something in Linux.
Answer: Use the chgrp command.  ie.
sudo chgrp -R /PATH/TO/DIR

Using chown will work with names or numbers... ie. specifying 27 would have worked if you had also specified the username/UID correctly. For example:
sudo chown -R 0:27 /PATH/TO/DIR

would have set the ownership to root:sudo.
If you just want to change the group, chgrp may be easier for you.
If you only want to change a single directory, ie the one specified, omit the -R option.
If you want to change permissions, use the chmod command.

Changing ownership of a directory


CSV new-line character seen in unquoted field error

Question: the following code worked until today when I imported from a Windows machine and got this error:
new-line character seen in unquoted field - do you need to open the file in universal-newline mode?
import csv

class CSV:

    def __init__(self, file=None):
        self.file = file

    def read_file(self):
        data = []
        file_read = csv.reader(self.file)
        for row in file_read:
            data.append(row)
        return data

    def get_row_count(self):
        return len(self.read_file())

    def get_column_count(self):
        new_data = self.read_file()
        return len(new_data[0])

    def get_data(self, rows=1):
        data = self.read_file()

        return data[:rows]

How can I fix this issue?
def upload_configurator(request, id=None):
    """
    A view that allows the user to configurator the uploaded CSV.
    """
    upload = Upload.objects.get(id=id)
    csvobject = CSV(upload.filepath)

    upload.num_records = csvobject.get_row_count()
    upload.num_columns = csvobject.get_column_count()
    upload.save()

    form = ConfiguratorForm()

    row_count = csvobject.get_row_count()
    colum_count = csvobject.get_column_count()
    first_row = csvobject.get_data(rows=1)
    first_two_rows = csvobject.get_data(rows=5)

Comment: rectummelancolique's answer below is what solved my similar issue. http://stackoverflow.com/a/17315726/3131666
Answer: It'll be good to see the csv file itself, but this might work for you, give it a try, replace:
file_read = csv.reader(self.file)

with:
file_read = csv.reader(self.file, dialect=csv.excel_tab)

Or, open a file with universal newline mode and pass it to csv.reader, like:
reader = csv.reader(open(self.file, 'rU'), dialect=csv.excel_tab)

Or, use splitlines(), like this:
def read_file(self):
    with open(self.file, 'r') as f:
        data = [row for row in csv.reader(f.read().splitlines())]
    return data

Comment: What option eventually worked? Btw, you are reading the file twice: in `get_row_count()` and in `get_column_count()` - consider reading the file in `__init__` and remember `data` in `self.data`, then use it in other methods.
Comment: and when I try the split lines version (which is very cools thanks) I get coercing to Unicode: need string or buffer, S3BotoStorageFile found
Comment: +1 for splitlines() which avoids messing around with different formatting options on OSX. Hope it works across other platforms too...
Comment: This now gives the same error, but on line starting  upload.num_records = csvobject.get_row_count() now
Comment: Great answer. Using - "dialect=csv.excel_tab" however, screws up the output when used with csv.DictReader. Just the 'rU' options works magically though
Comment: 'U' mode is deprecated('U' ------> universal newline mode (deprecated)). I use Python 3.7.6
Comment: I just faced an issue with UTF-16 encoded file - "_csv.Error: line contains NULL byte" by fixing universal newline mode issue, so for future, use `True` argument to keep the `"\n"` at the end of each line, use `str.splitlines(True)`.
Answer: I realize this is an old post, but I ran into the same problem and don't see the correct answer so I will give it a try
Python Error:
_csv.Error: new-line character seen in unquoted field

Caused by trying to read Macintosh (pre OS X formatted) CSV files. These are text files that use CR for end of line. If using MS Office make sure you select either plain CSV format or CSV (MS-DOS). Do not use CSV (Macintosh) as save-as type.
My preferred EOL version would be LF (Unix/Linux/Apple), but I don't think MS Office provides the option to save in this format.
Comment: MS DOS Comma Separated didn't work for me (same error), but Windows Comma Separated.
Comment: If you are on a Mac, this is absolutely the correct answer.
Comment: On OS X, Windows Comma Separated csv worked, MS DOS Comma Separated didn't.
Comment: I get the same issue on OS X. I find myself having to make a new CSV file. Simply saving the current as plain CSV format or CSV (MS-DOS) does not fix the issue.
Answer: For Mac OS X, save your CSV file in "Windows Comma Separated (.csv)" format.
Comment: thanks, that was the needed ingredient, as I'm using Mac w/ MS office.
Answer: If this happens to you on mac (as it did to me):

Save the file as CSV (MS-DOS Comma-Separated)
Run the following script
with open(csv_filename, 'rU') as csvfile:
    csvreader = csv.reader(csvfile)
    for row in csvreader:
        print ', '.join(row)

Answer: Try to run dos2unix on your windows imported files first
Comment: no really an option I need to allow user to upload csv from both Windows and Macs without any special modification. The import was saved from Excel (Windows) as a CSV so maybe there is something extra that needs to be done in Python to read these?
Comment: @GrantU You are referring to Mac OS X 10.0 or later, not Mac OS 9 or earlier, correct? Between 9 and 10, Mac OS switched from `\x0d` (ProDOS) line endings to `\x0a` (UNIX) line endings.
Answer: This is an error that I faced. I had saved .csv file in MAC OSX.
While saving, save it as "Windows Comma Separated Values (.csv)" which resolved the issue.
Answer: This worked for me on OSX.
# allow variable to opened as files
from io import StringIO

# library to map other strange (accented) characters back into UTF-8
from unidecode import unidecode

# cleanse input file with Windows formating to plain UTF-8 string
with open(filename, 'rb') as fID:
    uncleansedBytes = fID.read()
    # decode the file using the correct encoding scheme
    # (probably this old windows one)
    uncleansedText = uncleansedBytes.decode('Windows-1252')

    # replace carriage-returns with new-lines
    cleansedText = uncleansedText.replace('\r', '\n')

    # map any other non UTF-8 characters into UTF-8
    asciiText = unidecode(cleansedText)

# read each line of the csv file and store as an array of dicts,
# use first line as field names for each dict.
reader = csv.DictReader(StringIO(cleansedText))
for line_entry in reader:
    # do something with your read data

Answer: I know this has been answered for quite some time but not solve my problem. I am using DictReader and StringIO for my csv reading due to some other complications. I was able to solve problem more simply by replacing delimiters explicitly:
with urllib.request.urlopen(q) as response:
    raw_data = response.read()
    encoding = response.info().get_content_charset('utf8')
    data = raw_data.decode(encoding)
    if '\r\n' not in data:
        # proably a windows delimited thing...try to update it
        data = data.replace('\r', '\r\n')

Might not be reasonable for enormous CSV files, but worked well for my use case.
Comment: That solved my problem,Thanks!Look [here](https://stackoverflow.com/questions/15433188/r-n-r-and-n-what-is-the-difference-between-them)
Answer: Alternative and fast solution : I faced the same error. I reopened the "wierd" csv file in GNUMERIC on my lubuntu machine and exported the file as csv file. This corrected the issue.


Color palette in LyX?

Question: Is there a color palette in LyX (similar to that in MS Word)? I frequently use colors and the quickest way I know of doing it now is to select text, click on the Text Style button, select color, and click "Apply" or "OK".
Comment: To make sure I understand your question, you would like to choose a color that is not one of the 19 options that LyX gives you in the Text Style dialog, right?
Comment: No I want something similar to MS Word (and many other programs) where there is a little menu (palette) of colors and I can just click on a color to get that color. Instead of going through the aforementioned four steps.
Comment: I see. So you would like to choose one of those colors, e.g. "Red". You just want to be able to do it in a more efficient way.
Answer: You can create a shortcut for a specific color, as answered here. Or, if you want to just apply the last text style, you can click on the toolbar button that has the tooltip "Apply last".
Other than those specific case (e.g., if you want to use many different colors often), it does require the steps that you already mentioned in your post. The reason for why LyX does not make it easy to do with two clicks (like, e.g., Microsoft Office and Libre Office), I believe, is that for most users of LaTeX it is more common to set colors globally, and to avoid "finger painting" text manually. Thus, the LaTeX (and LyX) way of using color would be to set a style, e.g. "important", where the color of "important" is, e.g., "blue". This way, if you (or your editor or co-author) decide later on that "important" text should be "red", you can easily change it. For more information on this philosophy (i.e., the principles behind the design decision of LyX), you can see the Wikipedia page Separation of content and presentation.
Note that in LyX, it is easy to set the custom style of text with two clicks (e.g. in the layout box, or Insert > Custom Insets).
All that said, I think it would be a valid feature request to LyX to have an easier way to set the color. The above explanation is just meant to explain why this (to my knowledge) has never been requested before.

Color palette in LyX?


Why do LIGO use a quarter wavelength for detecting gravitational waves?

Question: I have already researched into this and I am left slightly confused still. I have gathered that the use of a quarter wavelength is to turn a linearly polarised wave into a circularly polarised wave. But why? I appreciate any feedback.
Comment: One-quarter of the wavelength is just an estimate because the frequency or wavelength isn't sharply determined for a signal. But the reason why LIGO is highly sensitive when $L=\lambda / 4$ is exactly analogous to the reason why the electric dipole antenna is best at $L=\lambda / 2$.
Comment: Can you be more specific? Is there some image or text where they specifically mention the use of a quarter wavelength at LIGO? If you mean quarter waveplates, they are used in any large optics experiment. Note that at LIGO, you would find these typically on a laser bench, but it is not a key component in the interferometer itself.
Answer: I believe you mean "quarter wave plate" rather than quarter wave length:
https://en.wikipedia.org/wiki/Waveplate
Quarter wave plates are sometimes used after polarized beam splitters (PBS).  Suppose you have a PBS illuminated by a source. One polarization (say linear horizontal) goes one way and the other (linear vertical) goes the other way. Now suppose you want to split the linear vertical light a second time. If you put it through another PBS then the light won't be split; all the light will come out in the vertically polarized direction. So you insert a quarter wave plate, which turns the linear vertical light into circular, after which the second PBS splits the light in half once more.
To get a more specific answer, give us a link to a picture of the interferometer setup you are are trying to understand and we can answer what specific purpose it plays there.


How do you explain the "weight" of helium?

Question: If weight is measured as M * g (mass x gravity), then how does the "weight" of a massive helium filled balloon negative? Let's say you have a 63,000 m^3 helium balloon. The mass of the helium is around 11,000 kg! 11,000 kg * 9.81 is a substantial amount of "weight", but the measured weight is negative due to the density differential with the surrounding body of fluid (air). What accounts for this mathematically? Is the "g" term negative? Is the m*g weight equation not valid in this case?
Comment: Now calculate the weight of the air the helium balloons is displacing.
Comment: It is like a bubble of air in water. The bubble goes up very visibly, but water goes down.
Answer: Most objects have densities that are very much larger than that of air. For calculating the motion of these objects in air, the buoyancy force can be neglected without introducing substantial errors. If you define "weight" as what a scale reads, though, it is technically not exactly $w=mg$ unless the object is in a vacuum, but rather $w=mg-\rho g V$, where$V$ is the volume of the object and $\rho$ is the density of the surrounding fluid. For a helium ballon, this second term (the buoyancy force) is not only not negligible, it is larger than the gravity force. So $w$ is negative.
Comment: why do people condense the buoyant force to just rho * g * V? If the mass of the helium is substantial, albeit less than the second buoyant term, wouldn't you have to lesson the buoyant force term by the mass of the helium x gravity?
Comment: The mass of the helium plus the mass of the balloon is $m$. The total gravitational force is $mg$. Neglecting buoyancy, that would be the weight.  The buoyancy force is actually the result of higher air pressure near the bottom of the balloon than near the top, but is most easily calculated by using Archimedes' principle, which says that it's equal to the weight of the displaced air. Does this make it clearer?
Comment: It does help, thank you Ben51 you have actually cleared up a lot of headache for our company haha
Answer: the helium balloon is experiencing a force in addition to that of gravity which you have not taken into account: the buoyant force caused by its being immersed in a medium that is more dense than it is.


How to force x11vnc to use Xfce?

Question: I am trying to set up x11vnc with an Xubuntu 19.10 machine as the server and a Windows 10 Pro machine as the client.  For some reason, when I connect to the x11vnc server, the VNC viewer opens up a connection to the terminal.  This is not what I want; I want to be able to access the Xfce desktop.  I can access the desktop on the Xubuntu machine itself, and I can type startxfce4 in the VNC session to get to an Xfce desktop, but I know there has to be an easier way.  What is it?
Answer: Turns out that adding the -usepw flag allowed me to get to the Xfce desktop.
Answer: Welcome to the wonderful world of X11. There are several different ways to set up your X environment.
Option 1 is to use a display manager (lightdm, gdm, xdm, kdm) which automatically starts the X server, prompts you for your login info, and starts your X session which you can usually select. To get VNC running on display managers, see this.
Option 2 is xinit. xinit allows you to start your X session directly from the console with two files, ~/.xinitrc and ~/.xserverrc. To start Xfce4 using xinit with VNC enabled, create ~/.xinitrc and add the following commands:
#!/bin/bash
x11vnc & # start VNC as a job
xfce4-session # start xfce4

How to force x11vnc to use Xfce?


What's the cleanest way to integrate apps across multiple devices?

Question: I have an iPhone and two Macs. I sync my files across all three using iCloud and want to do something similar with my apps: I want to be able to use an app on my iPhone, and use the same app on both of my Macs, for apps where this is possible.
What's the cleanest way to do this? Right now I download the app separately on each device using the same Apple Id, so when I update something in the app from one device, the update is present in the instance of the app on the other devices. Is there a better way to do this?
Comment: Which app is in question ? If the app supports sync, it will update across all devices. But some don't even exist for both Mac and iOS. And some simply don't have cloud syncing as a feature.
Comment: @ankii this question is the job description for being a Mac admin. :-)
Comment: @ankii I'm not thinking of a particular app, just apps in general. You said some apps will have the options to sync across devices; for those apps will I manually download the app on each device, then follow the given app's instructions to sync across all of them? I downloaded an app called Any.do on all devices and the data do sync across all of them, but I didn't knowingly select "sync devices" anywhere.
Comment: gkeenley I was not aware of the Mac admin job, @bmike points out (and adds tag mdm too). I took it from the perspective of regular users.  The comments can be deleted actually.
Answer: Enabling automatic App Store downloads on all devices solves this issue for devices that use the same AppleID for App Store.

macOS this is in the preferences for the App Store App
iOS this is in the settings app under Apple ID > iTunes & App Store

The general case is solved only when you package and script app installs with an MDM framework like JAMF Now. It's a lot of work to start packaging your apps or manage installers, so most groups don't fully manage all apps until they have 50 to 100 Macs, but the technology is there to do this on macOS and iOS. There are even comprehensive books on packaging such as Armin Briegel's
Comment: Thanks for the info. What's "enabling automatic app store downloads"? And can you point me to any resources where I can read about the packaging and scripting of app installs?
Comment: The user forums on JAMF has the best packaging info @gkeenley and see my edit to the post above for how to enable downloads from other devices


view state encryption for visualforce pages

Question: Since visualforce pages are served over https connections, is view state encryption really required? How will this affect view state performance?
Answer: While the view state is communicated over the HTTPS pipe (hiding it from people outside the HTTPS session) the view state ends up as viewable text for the user (who created the HTTPS session). So if it wasn't encrypted, fields in your controller would be viewable by the user: at best exposing implementation detail and at worst exposing information that should be secret.
Another benefit of the view state being encrypted is that hacking of the view state content at the client-side (which would be very fragile) is effectively blocked.
As there is no option to encrypt or not encrypt the performance impact is not something that can be explored; the serialization of Apex objects and transmission of the view state are pretty expensive processes too.
Comment: Most of the data we would want to display to user on VF page tough.


How can one test for difference in variation between two groups of different sample sizes?

Question: I have a question, which has puzzled me for some time now. I hope this community can provide an answer.
I have a method which can measure conversion of pyruvate into lactate in the body, the results are expressed in ratios, e.g. 0,2; 0,4 and so on. I have conducted several animal experiments using this method and am now interested in perfecting my animal method. Specifically, I want to know if it is better to use fasted or fed animals. I have results from a sample of fasted animals, n=15 and results from a sample of fed animals, n=5. What I want to know is, does fasting increase the variability of the results? Are the animals more "in line" with each other when they've been fed, i.e. do the results lie closer together?
I cant seem to find a good way of testing for this - I've thought of using coefficient of variation or a Bartlett's or Levene's test, but am concerned as to the difference in sample size (n=15 vs. n=5). Specifically, I don't want my power to detect a difference in the variance to be diminished because of sample size-difference. Can anyone come up with a good way of testing for something like this? I'm somewhat of a novice in statistics, so please forgive me if something is unclear - or just plain wrong.
Thank you in advance!
Answer: If the quantity of data you have is fixed then there is little you can do to improve your power to detect a difference. You could also use the Brown-Forsythe test which may have some slight advantage but really with five in your smaller group your prospects are not stunning.


spend a specifc UTXO

Question: Is there any methods to pick a particular UTXO and send it to a particular address in bitcoin regtest mode using bitcoin-cli other than createrawtransaction and sendtoaddress
Answer: You can use fundrawtransaction and specify a particular input to be used in the transaction. Bitcoin Core will then choose the rest of the inputs to meet your output amount automatically.
You can also use lockunspent to prevent specific UTXOs from being selected for coin selection thereby limiting which UTXOs can be used. Then any time that coin selection is used to create a transaction (i.e. in sendtoaddress, sendmany, fundrawtransaction, walletcreatefundedpsbt), only outputs that are not locked will be selected.

spend a specifc UTXO


Faulty data occuring on a brand new raid array

Question: We're having a problem with data inconsistencies on an IBM server we've set up, containing 6 1TB SAS drives running of an IBM raid controller in RAID 6. I would subscribe it to faulty drive(s), only the RAID controller isn't reporting any problems. The file systems (all ext3) have been remounted in read-only mode by the OS (Open Suse 11) several times, and the server then has to be restarted, fsck'ed, and then booted again. Any thoughts as to what could be wrong?
Comment: If it's brand new, get on the phone with the manufacturer and use your support contract!
Comment: agreed if you just got it or is within a few months start buggin tech support. this should be covered especially ibm, hp or the sort of products.gd
Comment: I'm wondering if it could be a bad connection or a dodgy cable or similar?
Comment: What firmware are you at? Is it the latest? See [IBM's website](https://www-947.ibm.com/systems/support/myview/supportsite.wss/docdisplay?lndocid=MIGR-5073639&brandind=5000008) for the latest firmware for the controller.
Answer: Firmware for the controller and the drives should be set to latest or most stable (you can ask the IBM techsupport for the version numbers and download links)
also, ext3 is limited in file sizes as well as partition size. check out http://en.wikipedia.org/wiki/Ext3 to make sure you're not overusing the FS.
Also, LSI based controllers used to be limited to 2Tb logical disk size, that was resolved with recent firmware. it is possible that you are using an early firmware which is not quite stable for large logical disk sizes.
Answer: RAID 6 engines are fairly new, could be a firmware bug. Hardware engineers are not the always the best software developers.
I would troubleshoot by first building a JBOD. Then expand to RAID 5, 6. If it turns out to be the hardware RAID engine, you could go with software RAID.
Personally, I don't like RAID 3+ at all. Compared to RAID 10 you get more space or more availability for the price of a 4x performance hit on small writes and dodgy recovery on drive failure.
Answer: Are you using an LSI SAS controller?

We had an issue on those, that any SMART activity (tests, status etc.) causes the controller to reset. This sets the disks faulty and degrades RAID.

Try disabling stuff like smartctl, hddtemp etc. Basicly disable anything that uses S.M.A.R.T.
Answer: Could be the server quietly corrupting the raid set. Possible if for example there was a faulty bus. Frequently syslog / dmesg would make mention of APIC and or Interupts problems around the time of failure.


How to share Guest's internet with host on Virtualbox?

Question: I have a problem that I have been trying to fix over 3 months now, I'm using Ubuntu 12.04 64bit with Windows 7 as a Guest on VirtualBox, I have a USB Modem which doesn't support Linux, the Modem works good on the Guest but I don't know how to let the Host (Ubuntu) use that connection, I have searched around the Internet and most documents and fixes for how to share Host's connection with Guest, not Guest with Host.
Beside, I've found some posts with similar problem but I couldn't understand the workarounds, I'm still beginner.
So could anyone provide a step-by-step guide how to share Guest's Internet with Host?
Thanks a lot!
Comment: A possible solution could be to set up a proxy or VPN server on your guest and connect to it from your host.
Comment: @pcworld that's a lot easier said than done on a Windows 7 guest.  Not sure that's still a valid approach given that, nor am I sure that's on topic here
Comment: How I can do that?
Comment: @pcworld Please explain how to do this (Step-by-Step). I have same problem and will appreciate any useful answer
Comment: Seems similar to this https://stackoverflow.com/questions/69842792/let-host-use-guest-internet-connection
Answer: There is a great answer at this post to create a host only connection for your Virtualbox that can be seen by Ubuntu to be used for connecting into your VM for network connection sharing.
In VirtualBox, how do I set up host-only virtual machines that can access the Internet?
Before you follow those directions you need to create the virtual connection.  Copy and paste the following in a terminal window to create it:
vboxmanage hostonlyif create
Also, follow these instructions here after you have created the host only connection and have it configured to setup Internet Connection Sharing in your Windows VM so that you can share your connection.
http://windows.microsoft.com/en-us/windows/using-internet-connection-sharing#1TC=windows-7
Answer: make the network adapter a 'host-only" adapter
( just click devices menu above the running virtual machine
 and change the "attached to" network adapter setting
 to "Host-only" and then you will need to wait a few minutes while
 the changes propagate and/or you change the hosts network
 addresses to match the new guests host-only adapter address (192.168.0.1)


constraining drag move along a path in iphone

Question: I am making an app  in which balls roll on tracks.
So when we touch and drag the balls around the screen, they should move along  the tracks. If the drag goes out too  distant from the track, it should stop. The tracks can be  any shape.
What is the best appraoch..?
Answer: It depends on how the track is defined programatically, but it you've got a CGPath that represents it, or can make one, use can use CGPathContainsPoint in the touchesMoved method and refuse to update the position of the ball if it is outside the path.


Why blue background are used for special effects and What is difference between the blue and the green backgrounds?

Question: In many movies and TV series blue background is being used for giving special effects or for some kind of animations. So what makes blue color so special? Which is better, blue or green backgrounds?
Comment: Related (if not even duplicate): [Why are movie scenes shot with green background?](http://movies.stackexchange.com/q/52597/49)
Comment: Related (if not even duplicate): [What is the green background? ("green screen")](http://movies.stackexchange.com/q/8568/49)
Comment: I'm not going to pass this of as an answer because it's from what I know. Green is used a lot more because it has the most contrast with the human skin. There are a lot more blue than green hues in a well lit actors' skin. The contrast is needed to make the seperation of the actor and the background a lot easier. Blue screen isn't a bad choice but we tend to key out actors more often than objects since we can cgi those just as easy as the background.
Answer: Source Quora:

Green/blue screens are based on the idea of chroma-keying. The idea is
  that a specific color is chosen and replaced by a different
  color/background. So, a green colored background can be switched out
  with a background of, let's say, a weather map.
Technically speaking, the colors can be gray, white, black, or purple,
  but green and blue are used most often because they "stand out" the
  best. I say "stand out" in the sense that since chroma-keying is
  picking up a color and replacing it with a different image, if a
  weatherman was wearing a red tie while filming on a red screen, the
  tie would be replaced as well as the background. In the
  movie/weather/gaming industry, green and blue screens are used.
Blue screens are used in place of green screens because it's generally
  easier to chroma-key. The color is softer than in a green screen.
  However, green screens are still more commonly used because of
  multiple reasons. One of them being the fact that some people like to
  wear blue clothing. Green screens are also more commonly used because
  of the color green being the highest luminance of all the color
  channels (RGB). Green screens are very bright, but because of the high
  luminance, there is also a high level of light reflection from a green
  screen, resulting in "green spill".
Green spill is when there is so much light reflection that some color
  reflects onto your subject as well. Green spill is very problematic,
  and is usually best fixed before shooting by watching your lighting,
  and chroma-key background.
But, in the end the thing that determines the use of a blue screen
  versus a green screen is foreground objects. It's not a good idea to
  shoot Kermit the frog in front of a green screen, and shooting an
  "Avatar" character in front of a blue screen isn't a very bright idea
  either.   If you're shooting video or with a single-chip camera, be
  aware of the component resolution of your camera.  Green is used with
  video because traditionally it is stored at the highest resolution.
  Many of today's compression formats  store blue at the lowest
  resolution.  If your camera is recording 4:2:0, that means blue is 1/8
  the resolution of green, which can lead to matte edge issues if you
  try to key with blue. If you're using a single-chip camera with a
  bayer filter (probably all current single-chip cameras), green is
  recorded at twice the resolution of blue or red.
Single-chip cameras use a bayer pattern to record red, green, and blue
  using a single sensor. A 4k single-chip camera records green at 2k,
  red at 1k, and blue at 1k.
Comment: Oh dear, green spill indeed. Especially actors with a dark(er) skin. It helps to have a really big space but sometimes you have to do with a small studio and than have to deal with a lot of post work.


Are there any non-Valyrian steel ancestral weapons other than dawn?

Question: Some noble Houses have an ancestral weapon, usually a sword even if Celtigar's ancestor weapon is an axe. All of these ancestral weapons are made of Valyrian steel, except Dawn the ancestral weapon oh House Dayne that is made from the heart of a fallen star. Is it the only exception, or are there any other non-Valyrian steel ancestral weapons?
Comment: It's mentioned that the name Ice goes back much further than the Valyrian blade.
Comment: It is also mentioned that Ice is valyrian steel and 400 years old
Comment: Yes, the implication being that there were other, presumably ancestral, swords named Ice before the current one.
Comment: Oh, I see what you mean, but there isn't enough source to be an acceptable answer, as we know to few about it : is it hereditary, unique sword...
Answer: Yes
The Just Maid is the legendary sword of Galladon of Morne and it's said the Maiden herself gave him an enchanted sword.

"Ser Galladon was a champion of such valor that the Maiden herself lost her heart to him. She gave him an enchanted sword as a token of her love. The Just Maid, it was called. No common sword could check her, nor any shield withstand her kiss. Ser Galladon bore the Just Maid proudly, but only thrice did he unsheathe her. He would not use the Maid against a mortal man, for she was so potent as to make any fight unfair."
A Feast for Crows, Brienne IV

However, Master Hubert seems to believe that Galladon was a man of more recent times from Morne and if this is the case it's likely the sword stayed within the family.

Many of the folk of Tarth, highborn and low alike, claim descent from a legendary hero, Ser Galladon of Morne, who was said to wield a sword called the Just Maid given to him by the Seven themselves. Given the role that the Just Maid plays in Ser Galladon's tale, Maester Hubert, in his Kin of the Stag, has suggested that Galladon of Morne was no rude warrior of the Age of Heroes turned into a knight by singers a thousand years later, but an actual historic figure of more recent times. Hubert also notes that Morne was a royal seat of petty kings on the eastern coast of Tarth until the Storm Kings made them submit, but that its ruins indicate that the site was made by Andals, not First Men.
The World of Ice and Fire, The Stormlands: The Men of the Stormlands

We also have Lady Forlorn, although it's speculated as being Valyrian steel this is only in semi-canon sources so it's unclear as of yet. It is the ancestral sword of House Corbray.

The rest was a rout. Attacked from front and rear, the last great host of the First Men of the Vale was cut to pieces. Thirty lords had come to fight for Robar Royce that day. Not a one survived. And though the singers say the High King slew foes by the score, in the end he, too, was slain. Some say Ser Artys killed him, whilst others name Lord Ruthermont, or Luceon Templeton, the Knight of Ninestars. The Corbrays of Heart's Home have always insisted that it was Ser Jaime Corbray who dealt the mortal blow, and for proof they point to Lady Forlorn, reclaimed for House Corbray after the battle.
The World of Ice and Fire, The Vale


How to remove add to compare in catalog search result page?

Question: Actually I want to remove add to compare in catalog search result page
Comment: Hello, @hitesh if any of answer solves your concern then mark as accepted which will help future readers, thanks.
Answer: you should add below code in your Magento_Theme/layout/default.xml file :
<referenceBlock name="catalog.compare.link" remove="true"/>
<referenceBlock name="catalog.compare.sidebar" remove="true"/>

This will delete from everywhere.
Comment: i want to remove in search result page for products in custom theme magento 2
Comment: if you add this piece of code in your theme's default.xml file it will remove from all places, however if you want to remove only from specific section then you should use this code in the required module / section layout.
Answer: You need to add :
<referenceBlock name="catalogsearch.product.addto.compare" remove="true"/>
into:
.../layout/catalogsearch_result_index.xml
Answer: I think the following links will help you in achiveing the same
https://bsscommerce.com/blog/how-to-disable-compare-in-magento-2-full-tutorial/
Magento 2: Safe and easiest way to disable Compare products & Wishlist Module
Comment: Please don't put single links, Describe about your solution
Answer: Disable compare in Layer Navigation:
Compare products block is defined in

vendor/magento/module-catalog/view/frontend/layout/default.xml

Now add a default.xml file to your theme in

/Magento_Catalog/layout/default.xml

Then remove your block as following:
 <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">  <referenceBlock name="catalog.compare.sidebar" remove="true"/>  </page>

Disable compare in Product Page and Category Page:

You add the following xml instruction to your theme's default  xml
file:

The xml file of your theme is located in

/app/design/frontend/Vendor/theme/Magento_Theme/layout/default.xml

or

Magento_Catalog/layout/default.xml

Reference
Answer: if you want to disable or remove add to compare option from frontend side
you can do the following
go to app/design/frontend/Vendor/theme/Magento_Theme/layout/default.xml
add below line just after body tag
<referenceBlock name="catalog.compare.sidebar" remove="true"/>

run this command

php bin/magento cache:clean && php bin/magento cache:flush

it will remove from catalog product listing as well as from search result


What happens to the wands of dead wizards?

Question: When wizards die, are their wands recycled? Or are they buried with the wizard or what?  I mean, the wand might not be interested in a new master just yet, but it seems like a waste of a perfectly good core and wood.
Comment: Ron's first wand was second hand. Perhaps poorer families passed their wands down
Comment: The Elder Wand was laid with Dumbledore - not sure of others.
Answer: The wand is generally laid to rest along with its owner. Quoting from Dumbledore's notes in The Tales of Beedle the Bard:

Most witches and wizards prefer a wand that has "chosen" them to any kind of second-hand wand, precisely because the latter is likely to have learned habits from its previous owner that might not be compatible with the new user's style of magic. The general practice of burying (or burning) the wand with its owner, once he or she has died, also tends to prevent any individual wand learning from too many masters.

Indeed, this is what happens in one case – Dumbledore's wand is buried with him. There are very few other accounts of exactly what happened to somebody's wand after they died.
If the wand is liable to malfunction with a new owner, that might explain why the wood and cores aren't recycled. (Although I've never seen evidence that the wizarding world are particularly conscientious in that regard.)
I'm sure I've read something about a wand's power being "broken" with the death of its master, but I can't find a reference to it now.
Comment: The 'wand's power being broken with the death of it's master' reference is the Elder Wand, hopefully having it's power broken with Harry's eventual death of old age, as it had not been won from him. (in retrospect, working as an auror fighting dark wizards and having this goal seem mutually exclusive).
Answer: A witch or wizard's wand is usually buried with the first owner, but in some specific cases like Ron, who came from a poorer family, got a second-hand wand, and Neville, who also got his father's wand, was more of a sentimental reason. However, most of the wizards and witches that faced death, were buried with their wands. Dumbledore, Lily and James, and Nymphadora and Remus were buried with their wands. Aside from Dumbledore, I can't find specific evidence to support this, other than Harry would have inherited his parent's wands, and likewise with Teddy Lupin. Most wizards are buried with their wands because, depending on the wood and core types, the wand may "die in power" as quoted from the Pottermore Wand Wood section, and the effects may not be pleasant. There are always special cases but for lack of canonical evidence and examples, I would say that there are always special cases, but mostly they would be buried with their wand.
In the Pottermore section for English Oak, it says,

"It is said that Merlin's wand was of English oak (though his grave has never been found, so this cannot be proven)."

Which offers proof that Merlin was believed to be buried with his wand.
Comment: This is a nice answer but would be a lot better if you [edit]ed in some quotes to back up some of the points you've made!
Comment: Agreed. There are a lot of bold statements here, but very little by way of evidence to actually back them up.
Comment: There is no canonical evidence other than the fact that Lily and James wands would have belonged to Harry and there is no mention of this.
Comment: @Valorum before, I was going by what is not than by what is. But I have managed to find canonical evidence if you could revisit it.
Comment: @Ava - Definitely now worthy of an upvote
Comment: thank you, much appreciated :)
Answer: Besides for Dumbledore's wand covered in alexwlchan's answer, there is another instance in which we are told about someone being laid to rest with his wand. From Chapter Twenty-Two of Half-Blood Prince:

And Odo the hero, they bore him back homeTo the pace that he'd known as a lad,
sang Slughorn plaintively.
They laid him to rest with his hat inside outAnd his wand snapped in two, which was sad.

It's not entirely clear whether the wand had been snapped specifically for the burial or for some other reason (whether deliberately or accidentally). Though the phrase "which was sad" might indicate that at least the "snapped in two" part waas not considered standard practice.
Answer: It depends on the wizard, and the wand.
As mentioned in the other answer, some are buried with their owners.
Some are handed down, but at least in the cases we've seen in the books, this is rarely successful. Both Ron and Neville have more success as wizards not only as they grow older, but when they get their second wand which has chosen them specifically. This may prove different if the match was better, but it seems even brothers and sons using someone else's wand isn't ideal.
The core and wood can make a difference in this matter, as seen on Pottermore. The unicorn hair core description tells us, "They are the most faithful of all wands, and usually remain strongly attached to their first owner, irrespective of whether he or she was an accomplished witch or wizard." It also warns, "they are prone to melancholy if seriously mishandled, meaning that the hair may 'die' and need replacing." Source.
Similarly, the ash wand wood section explains, "The ash wand cleaves to its one true master and ought not to be passed on or gifted from the original owner." Source.
As we can see, some wands may be effectively handed down, most should not be, and some certainly shouldn't be.
Comment: According to the Wiki, Ron's was ash and unicorn hair and Neville's is unknown, but his second was cherry with unicorn hair. Ron's second was willow and unicorn hair, by the way.
Comment: Are the materials of Ron's and Neville's first wands known?
Comment: @ifurini, Ron had ash and unicorn, and Neville's was unknown.


Confusion in DS160 address and passport address

Question: I am from India. I will be applying for F1 Visa. While filling the DS160 form I got confused about what to fill in my home address and mailing address. My present address on my passport is of the college. Now my degree is completed and I am residing now at my permanent address(home). I am confused - what should I fill in the mailing address, should the mailing address of DS160 be the same as the present address of the passport or it has to be of my home as I am currently residing there?
Answer: You should fill out your current address, not the one on the passport.
You do no longer live on the college address and will not (or not easily) receive mail via that address.
If you have a space to put an explanation you can mention you moved from the address in the passport. But if there is no such space, just ignore the address in the passport.


Crop a man out of a 360 video

Question: I'm making a 360 video, filmed with 2 180 degree spherical cameras back to back.  The problem is that the man holding the cameras shows up in the bottom section of the video.  With the software, (I am using Kolor Autopano Video) is there a way to crop a section out of the video?
Answer: To do any cropping of video in Autopano Video, you will need additional software from Kolor: either Autopano Pro or Autopano Giga. That will allow you to click the edit button below the preview window to send it to the editing program and apply a crop.
Alternatively, you can render out your video from Autopano Video that includes the cameraman, and then make your crop in a video editing program like Premiere Pro or Final Cut (even iMovie and Windows Movie Maker may work). That video can still be rendered as 360 video.
Comment: Yes, but what shows instead of the man?  Sorry I'm a complete newbie to this.
Comment: Nothing shows instead of a man. Your request was for a crop. If you want to mask, that's a very different story, and given you don't have overlapping video (you mentioned two 180-degree cameras back-to-back) that could be quite difficult.
Comment: So, the idea would be to film without the man being in the way.
Comment: Most 360 videos I've seen simply accept that there is a cameraman. Check out nearly all examples on Littlstar, for example. If you don't want a cameraman in the frame, your camera will typically be stationary while the action occurs around it.

Crop a man out of a 360 video