How to derive the fact that $p\sim d/dx$ and $H\sim d/dt$ from classical mechanics?

Question: I am trying to understand Noether's conserved quantities to shifts in time and or position.  I have seen the derivation of the operators for Schrodinger's equation but not for classical mechanics.
Is it true or perhaps obvious that the derivative of the action $S=∫(KE-PE)dt$ with respect to time is Energy since it is the $d/dt$ of a $∫dt$ that contains energy?  Also is it equally obvious that the derivative of the action with respect to position, is the momentum $dL/dx=$ momentum?  Or does it require some extra steps and logic to derive the fact that $d/dx=$ momentum and $d/dt=$ Hamiltonian?
Answer: These observables-are-derivatives equations carelessly obscure what's really happening, viz.$$\langle x|\hat{p}_k|\psi\rangle=-i\hbar\frac{\partial}{\partial x_k}\langle x|\psi\rangle,\,\hat{H}|\psi\rangle=i\hbar\frac{\partial}{\partial t}|\psi\rangle$$or something like that. Since these statements are in quantum-mechanical Hilbert space language, they cannot be derived in classical mechanics. Instead, quantum mechanics is constructed to represent certain truths about classical mechanics in these equations. The Poisson brackets $\{x_j,\,p_k\}=\delta_{jk}$ give rise to $[x_j,\,p_k]=i\hbar\delta_{jk}\Bbb I$ ($\Bbb I$ the Hilbert space's identity operator) because momentum and the Hamiltonian are the generators of infinitesimal space and time translations (see here and here, respectively).
Comment: I think the best way to phrase it is "we can go from QM to classical mechanics by the identification of commutators with Poisson brackets" and not the other way around, especially because of ambiguity of operator ordering. That's why quantum mechanics is sometimes presented from an axiomatic viewpoint.
Comment: @MSha It's a bit of both. Whatever QM becomes in the direction you describe has to be CM, but we worked out how QM had to look based on knowing that, so the historical theory development order is "the other way around".
Answer: The correspondence with classical mechanics is best seen in the Heisenberg picture by acting on operators $\hat{f}(\hat{x},\hat{p},t)$ rather than on kets $|\psi\rangle$.
First of all, recall that the commutator $\frac{1}{i\hbar} [\cdot,\cdot]$ corresponds to the Poisson bracket $\{\cdot,\cdot\}$, cf. e.g. this Phys.SE post.
Now let us answer OP's title question:

Differentiation of the operator $\hat{f}$ wrt. time $t$ is given by Heisenberg's EOM
$$ \frac{d\hat{f}}{dt}~=~ \frac{1}{i\hbar} [\hat{f},\hat{H}]+\frac{\partial \hat{f}}{\partial t}, \tag{1Q}$$
which corresponds to Hamilton's EOM
$$ \frac{df}{dt}~=~\{f,H\}+\frac{\partial f}{\partial t}. \tag{1C}$$

Differentiation of $\hat{f}$ wrt. $\hat{x}$ is given by
$$  \frac{1}{i\hbar} [\hat{f},\hat{p}], \tag{2Q}$$
which corresponds to
$$ \frac{\partial f}{\partial x}~=~\{f,p\}.\tag{2C} $$


Building a windows game for Mac.

Question: I have a game that I made in Unity and I have a windows build for it. It works fine on windows no problems there but I want to make a mac version of it. To make a mac version will it work if I just build it for mac or will I have to reprogram it for mac? I don't have a mac to test this and obviously I dont want to release a broken game. Note that the game uses the command Input.GetMouseButtonDown(0) a lot, not sure if you need a different command for a mac mouse.
Answer:
To make a mac version will it work if I just build it for mac

Yes, with a giant asterisk.
You can indeed generate a Mac build from your Unity project on Windows, and most things should work fine when it's run on a Mac. The whole point of a cross-platform engine like Unity is to insulate your project from platform-specific details, as much as it can. So going via the Unity input system, you can read mouse input no matter what the underlying OS or mouse driver, etc. You should not have to reprogram large parts of your game.
But the only way to be certain is to test.
Some things that do vary between the platforms:

The numbered order of buttons and axes on gamepads are not guaranteed to be the same (since it's up to the driver to number them)
When you read from a render target in a shader, under some circumstances your result may be flipped vertically on Mac because of differences in how DirectX and OpenGL address textures (Unity automatically corrects most instances of this, but render textures occasionally pose corner cases it can't fix for you)
This list is incomplete. I'll leave this as Community Wiki so developers can note other common mismatches between these platforms.

So, find a friend with a Mac and ask for their help testing.

Building a windows game for Mac.


Is it possible to have dropdownmenu in place of dropdownlist in asp.net? whenever user moves mouse over that control it should display items in it

Question: i have dropdownlists in my asp.net web site, now i want to switch them into something like  menu  and its items should look like menu items, at mouseover event items in that control should be displayed, is it possible to achieve? how?
Answer: It is very well possible using javascript/jquery and setting the css to give it the placing and affects you feel like. You will many such examples googling it out....one such is: http://www.queness.com/post/1047/easy-to-style-jquery-drop-down-menu-tutorial
Answer: If you like to convert an existin dropDownList to a menou like I know the the Linkselect jQuery plug-in but also I know a similar from Yahoo User Interface Library
jQuery or other library is strongly suggested for a complex conversion like that, at least the examples I know use a library.


Are there any differences between "oval" and "ellipse"?

Question: Are there any differences between "oval" and "ellipse"?
Comment: Related; http://english.stackexchange.com/questions/6108/is-there-a-word-for-a-class-of-circular-shapes
Answer: I believe they can be used interchangeably in common English, but have specific (and different) meanings when used in mathematics.
The online Cambridge dictionary contains the following definitions:
Oval

shaped like a circle that is flattened
either at one place or at two opposite
places, so that it is like either an
egg or an ellipse

Ellipse

an oval; a flattened circle

However, in geometry there is a difference. According to the Wikipedia page on ovals:

In geometry, an oval or ovoid is any
curve resembling an egg or an ellipse,
but not an ellipse.

In addition, from the Math Forum

once the size of an ellipse has been
fixed then its exact
shape is mathematically determined. In other words, the line
forming the perimeter can be drawn in only ONE way. This is
distinct from an oval where the perimeter has only to be a
concave curve, and there are many possibilities. Simply, an
ellipse IS an oval, but an oval may or may not be an ellipse.

Doctor Sarah, The Math Forum
Comment: To be honest, you wouldn't see the word oval appear anywhere in maths (except perhaps in school). It's just too vague. If we wanted to mean what 'Doctor Sarah' describes, we would probably say 'convex hull'. (Can she really be a Dr? I doubt it; it's pretty rookie to get convex and concave mixed up.)
Comment: "Unlike the ellipse, oval does not have precise mathematical definition." http://mathworld.wolfram.com/Oval.html and the already mentioned Wikipedia page.
Comment: Better: **Oval**: shaped like a circle (imagine a wire hoop) that is flattened by squashing either across a diameter or across a lesser chord, so that it is like either an ellipse, or the shadow of an egg
Answer: This is adapted from my answer to another question.
In my experience, "ellipse" usually has a precise, geometric meaning, while "oval" is a more vague and general term.  Most dictionaries I've checked agree with this, but a few dictionaries say that the two words can be used interchangeably.  The  New Oxford American Dictionary defines "oval" as "having a rounded and slightly elongated outline or shape, like that of an egg".  It defines "ellipse" as "a regular oval shape, traced by a point moving in a plane so that the sum of its distances from two other points (the foci) is constant".
Various other online sources agree:
dictionary.reference.com agrees: ellipse versus
oval
Mathworld agrees: oval
thefreedictionary.com agrees: oval versus ellipse
mathforum.org agrees: "Simply, an ellipse IS an oval, but an oval may or may not be an ellipse."
answers.com agrees: "An ellipse always has two axes of reflection; an oval has one or more."
I've found a relatively few sources which define "ellipse" and "oval" to mean the same thing.  I've found no sources at all which say that "ellipse" is more general than "oval".
Answer: In geometry a ellipse has two foci, a major axis and a minor axis which are perpendicular to each other and the foci are located on the major axis.
It is possible to draw an ellipse using two pins (or pegs), a loop of thread and a pencil or other drawing instrument. To do this the pins or pegs are inserted into the ground or paper on which the ellipse is to be drawn, the loop is placed over them and the drawing instrument is moved along the loop keeping it tight. This draws a very specific shape like a flattened circle which is symmetrical around both axes. There is also a well-defined formula for an ellipse which can be used to construct an ellipse using a computer. If the two foci are located at the same point this produces a circle so a circle is a special type of ellipse.
An oval on the other hand can be one of a number of shapes, one of which is the ellipse. The most common of these shapes are:

An ovoid which is like a longitudinal section through a hen's egg. This is similar to an ellipse but is symmetrical about only one axis because there is a big end and a small end to a hen's egg. The formula for an ellipse will not produce this shape and a circle is not a special case of an ovoid.

The shape of a running track, which is symmetrical about both axes but has straight parallel sides and semicircular ends. Again the formula for an ellipse will not produce this shape; it can be thought of as a circle with a rectangle inserted into it but the only way to turn it back into a circle is to remove the rectangle and move the semicircles back together. A circle is not a special case of this kind of oval either unless you consider that an runnning track with the straight sides having length zero is a special case of the oval.

So yes, there is a difference. An oval can be one of a number of shapes one of which is an ellipse. It's a bit like the difference between the words 'tree' and 'oak'. All oaks are trees but not all trees are oaks.
Comment: 'Ovoid' is often reserved for the 3-D shape of the idealised egg. '
**ovoid**: [adjective]
(of a solid or a three-dimensional surface) more or less egg-shaped.' [['OL'](https://www.google.com/search?q=ovoid&rlz=1C1CHBF_en-GBGB973GB973&ei=UZcpY57tDbiYhbIP5-izsAs&start=0&sa=N&ved=2ahUKEwje2ayJlqP6AhU4TEEAHWf0DLY4FBDy0wN6BAgBEDk&biw=1341&bih=766&dpr=1.25)]
Answer: From what I can tell (looking at my kids' Montessori curriculum), an ellipse is a kind of oval.  An ellipse does not have a "pointier" end (is not like an egg), whereas an oval can be pointier at one end, or not.
Answer: Taking the question at face value — where I see reference to mathematics — and emphasizing that this community is interested in the various meanings of words in all varieties of English, I humbly offer the following.
In Australian English:

A cricket or football ground (Aus)

[Collins Dictionary (iPhone edition)]
The Oxford Learner's Dictionary gives:

(Australian English) a ground for Australian Rules football

But they have a lot to learn themselves, as one of the most famous Australian ovals, Adelaide Oval "…has been headquarters to the South Australian Cricket Association (SACA) since 1871".
I was surprised to find, when visiting Australia a few years ago, that this was a generic term for a sports ground. I had previously assumed that the name was unique to the famous English cricket ground, Kennington Oval (1845), and its attribution to Adelaide was a single instance of immitation. Not so.
The attribution of 'Kennington' to what is now generally known as 'The Oval' suggests to me that at one time this might have been a more general usage in Britain, but I have no evidence on that point.
Answer: To me the defining difference is this:
An oval can be made from two radii  (the plural of radius). That is, you can make an oval using your compass (or parts of a circle, if you like). You can never do this with an ellipse. That is, no part of an ellipse will ever make a circle.


Quebec GIS Data

Question: I'm looking for basic political borders for the province of Quebec, as well as property parcel data and topography. Any suggestions for inexpensive/free data?
Comment: what research have you done?
Comment: I have consulted their natural resources page and a few other government-based sites.
Answer: Quebec is big you can find open data by individual municipality.
To get you started here is Quebec City
http://donnees.ville.quebec.qc.ca/catalogue.aspx
Has many formats common to GIS (shp,KML,DWG etc).
Note: Not all municipalities have the same level of opendata, property parcel might have be sourced another way (aerial, LiDAR, imagery).
For Smaller scale boundaries you will find Natural Earth very useful.
http://www.naturalearthdata.com/downloads/10m-cultural-vectors/
Answer: The page is in French, but you can find a lot of geographic data on the Ministère de l'Énergie et des Ressources naturelles's site:
Répertoire des services Web et données géographiques
Borders can be found here: Carte générale du Québec
A small scale topographic map can be found here: Carte du relief
Toggle the sections under "Produits offerts" to access the actual files.
Answer: Forêt Ouverte has topographic (LiDAR-derived) data available to download for free. The spatial resolution of the DEMs is 1 meter, and can be downloaded by tile from the ftp link provided in Catalogue > LiDAR > Index et téléchargement > Téléchargement - LiDAR (pleine résolution). This is an ongoing southern Quebec LiDAR survey, eventually the whole southern half of Quebec should be available at that resolution. For the rest of the province, there is always the good old 1:50K NTDB maps with contour levels.
Quebec Parcel data (for the revised cadastre, called "Cadastre rénové" in French) is maintained by the MERN. It can be visualized on Infolot, but the vector data isn't free. You can refer to the web page concerning the ordering of Quebec Cadastre Lots data (Commande des lots du cadastre du Québec).
Another option for parcel data may be to contact individual municipalities or counties (MRC) and ask if they offer data extraction services for vectorial property assessment parcel boundaries (Unités d'évaluation) from their "Matrice graphique" (for a fee).

Quebec GIS Data


Why does only one light burn out constantly

Question: I have recessed lights and the light on one of them only lasts around 2-3 weeks all the other lights on the same circuit works just fine
Comment: While you're at it, check for any loose connections to the can. A loose connection could create arcing which will shorten the life of the lightbulb. The socket itself could also be bad and arc as well.
Comment: could be a heat generation issue. The one may be getting too hot. is it the first light in the sequence?  if you dont replace the broken one does the next in sequence break after a while,   IMO, the only thing it could be are power fluctuations, excess heat or excess vibration
Comment: Makes sense I'll check that.
Comment: If its a mr16 or another bulb with pins, check the pins for corrosion. Could be humidity or arching in the socket
Answer: Both of those answers may be correct.
It is most likely that the arcing would be in the socket itself.  Obviously heat generated in the junction box is not as likely to damage the bulb as heat generated between the bulb and the socket.  And if the circuit wiring were involved, other bulbs would be burning out too (from excessive ultra fast "flickering").  In that regard, a common problem is that the "tab" in the middle of the socket can get compressed so that the light bulb is not making good contact with that tab when you screw it in.  Needless to say, screwing the bulb tighter and tighter will, over time, make the situation worse.  Fortunately, it's an easy fix, BUT you must turn off the lights ...and if you are not comfortable with electricity, turn off the breaker.

Turn OFF the light.
Using an insulated (or taped up) flat head screw driver, poke up inside the socket and press against the end of the tab so that it bends slightly outward toward you.

If there is a loose connection that is arcing, that is serious.  If you can't find the problem, install an AFCI circuit breaker and monitor the situation by bypassing different connections to see if one of them trips the AFCI.
Comment: Arcing can also oxidation damage the contacts of the socket and the bulb which also will make the arcing problem worse . If this is occuring, it is probably best to replace the socket and the bulb.
Answer: I had this same problem and, I think, I traced it to vibration from the floor above.  Replaced with LED four years ago and the problem has been fixed.  Make sure your LED replacement bulbs have the proper color temperature!  2700K matches incandescent and is nice and warm.


Why is there a phase difference in RC circuit?

Question: In a capacitor circuit,the there is 90 degree phase shift between current and voltage in capacitor(when supplied sinusoidalvoltage and it varies from 0 to 90 degrees in a RC circuit.Can somebody tell me why exactly there is a phase difference between 0 to 90 degrees in a RC circuit while a purely capacitive circuit has a phase difference of 90 degrees
Comment: The complex impedance of a capacitor is $Z = 1/(i \omega C)$. This leads to the phase delay.
Answer: This phenomenon can be explained by taking a look at the electrical impedance, which is caused by the R and C components. The electrical impedance $Z$ is composed as
\begin{align}
Z = R + i X
\end{align}
where $X$ is the reactance. This is for capacitors $X_C = -\frac{1}{\omega C}$ and for inductors $X_L = \omega L$.
We can make a sketch of this in a complex plane, which looks like

Now you can see, that it depends on the ratio of $R$ and $X$ what the phase difference $\phi$ between the real electrical current ($R$ - direction) and the voltage ($Z$ - direction). The actual dependence being
\begin{align}
\varphi= \arctan{\left(\frac{X}{R}\right)} \, .
\end{align}
(in the electrical engineers notation with $j$ as the imaginary unit)
From this you can also see that if you have nearly no electrical resistance $R$ you end up with a $90°$ phase difference.
I hope this answers your questions.
Comment: This doesn't answer the question. It just uses another mathematical language for describing phase shift: imaginary and complex numbers. You don't explain why reactance can be described as imaginary numbers.
Answer: Let us apply a sinus formed voltage $u$ over a capacitor $C$:
$$u = U_0 \sin \omega t.$$
The charge $q$ in the capacitor is given by
$$q = C u = CU_0 \sin \omega t.$$
The current $i$ through the capacitor is then given by
$$i = \frac{dq}{dt} = C U_0 \omega \cos \omega t = I_0 \cos \omega t,$$
where $I_0 = C U_0 \omega.$
Now you should be able to see the phase shift since $\sin$ and $\cos$ have a phase shift of $90^\circ.$


Calculate percentage of land cover within a buffer in meters, not decimal degrees

Question: I am trying to calculated the percentage of land cover within a buffer area (3000m) around my coordinates. My output is in decimal degrees but I want it in meters or at least that I can calculate the percentages of land with the buffer. The projection system I used is WGS_1984 the data is for Africa. Does anybody know a different projection system in meters for Africa or another way I can calculate this?
Comment: Does the data extend over all of Africa? If so this will help:
http://www.georeference.org/doc/guide_to_selecting_map_projections.htm
"Use Lambert Azimuthal Equal Area or Orthographic for South America and Africa."
Answer: You don't have a problem.
Using decimal degrees is tantamount to computing in a Plate Carree projection, which distorts distances (and areas) greatly at points away from the Equator.  However, within any 3000 m region the change in distortion is inconsequential (unless that region is extremely close to one of the poles).
Suppose, then, that the area of any polygonal region within your buffer is incorrect and should be multiplied by a factor 'a' in order to make it correct.  The foregoing argument implies that although 'a' will change (sometimes by a lot) across a large study area, when you are working within a given buffer 'a' can be treated as a constant.  Because you are seeking to compute proportions of areas, you will be taking the area of a subset of a buffer (determined by a specific land cover type, it seems) and dividing it by the buffer area.  Suppose you compute these two areas as 'A' and 'B', respectively.  Then the correct proportion will be

(a*A) / (a*B) = A/B,

exactly what you compute using the (bad) coordinates.
Note that these ratios are unitless: they are neither in decimal degrees nor meters nor anything else.  If you like, you could re-express them as percentages by multiplying them by 100.
Because the correction factor 'a' also includes any changes of units of measure (such as from decimal degrees to meters), the units of measurement you use do not matter, either.  Thus you don't even have to convert from decimal degrees to any other unit.
Watch out for software that fails to report the areas with adequate precision.  The area of a 3000 m radius circle is typically around 0.003 squared decimal degrees and so areas of land cover types within that circle could be on the order of 0.001, 0.0001, or even smaller.  If the software rounds its output (say) to the nearest 0.01 or 0.001, you would lose a great deal of information.

Technical details
In the Plate Carree projection, the area distortion correction factor is extremely close to the cosine of the latitude.  (It is exactly equal to this in a spherical Earth model.)  It therefore varies with latitude.  When moving across a buffer of radius 'e', you can change the latitude by at most 'e' relative to the center.  The change in the cosine will (to first order) be given by its derivative (the sine),

cos(f - e) - cos(f + e) = sin(f)(2e) + O(e^2).

Since sin(f) is less than 1 in size, the change in the cosine will not exceed 2e in size (to first order, which is extremely accurate for small e).  With a 3000 meter buffer, 'e' is approximately 0.027 degrees, just under 0.0005 radians: that's the value to use in the formula.  Except near the poles, where the cosine shrinks towards zero, 2(0.0005) = 0.001 is a tiny fraction of the cosine (and multiplying by sin(f) makes it a little smaller still).  Throughout Africa, for instance, you can expect these approximations to be fully accurate to three decimal places and often more.  That will be more accurate than the land cover data.
Answer: If you are "near" the equator I suggest that you use Cylindrical equal area and for the entire continet you could use "Africa Sinusoidal" (those equal area projections are useful for density computation). If you are working on a specific country, there is a search tool on the EPSG website and you can also have a look at the predefined projection available in ArcGIS (projected coordinate system > national grids > Africa)
Answer: I have a similar question as yours before, and I found this coordinate system may help :"Projected Coordinate Systems/UTM/WGS1984/Northern Hemisphere/...." and choose one which over your country~(you can Google it)
Comment: When last I looked, a great deal of Africa was not in the northern hemisphere.
Answer: In QGIS it's possible to do that, without any reprojection, by using the class QgsDistanceArea of PyQGIS. With the use of the states_21basic.zip shapefile (geographic coordinates) and assuming that "California" is "your buffer area", running this code in the Python Console:
<code>area = QgsDistanceArea() #creating object

area.setEllipsoid('WGS84')  #setting ellipsoid

area.setEllipsoidalMode(True) #setting ellipsoidal mode

wb=iface.activeLayer()

feat = wb.selectedFeatures()

multiPart = feat[0].geometry().isMultipart()

if (multiPart is False):
    pol = feat[0].geometry().asPolygon()
    print "area is %.2f km2" % (area.measurePolygon(pol[0])/1e6)
else:
    multipol = feat[0].geometry().asMultiPolygon()
    print "There are %d polygons" % len(multipol)
    i=1
    sum_area = 0
    areas = []
    for pol in multipol:
        val_area = area.measurePolygon(pol[0])/1e6
        areas.append(val_area)
        sum_area += val_area
        print "area%d is %.2f km2" % (i,val_area)
        i +=1

print "total area = %.2f" % sum_area

i=1

for item in areas:
    perc = (item/sum_area)*100
    print "perc_area%d is %.2f" % (i,perc)
    i +=1
</code>
I got the next result:

You can observe that the script is calculating each individual area, the total area and the area percentages without reprojecting the shapefile in geographic coordinates (ellipsoid GRS80).


What is the difference between orbital velocity and critical velocity? Are their values similar or not?

Question: As critical velocity is the minimum velocity required to put a satellite into orbit. And orbital velocity is the velocity required to keep a satellite moving in an orbit.The value of critical velocity I found is 7.9km/s.On various sites it is written that there is a difference between orbital velocity and critical velocity ,but when I found the value of orbital velocity by formula v equals square root GM/R it comes  7.9km/s by putting standard values for G,M AND R .As these values are same can anyone tell me, why is there a difference between two?
Comment: More on cosmic velocities: https://physics.stackexchange.com/q/179227/2451
Comment: Hmm!I haven't found any thing related to my question, except that formula.
Answer: I have not used the term critical velocity so have used your definitions of orbital and critical velocity.

orbital velocity is the velocity required to keep a satellite moving in an orbit

For a circular orbit this is found by using Newton's second law with the gravitational attractive force $\frac {GMm}{R^2}$ producing the centripetal acceleration $\frac{v_{\rm orbital}^2}{R}$ for a satellite of mass $m$.
$\frac {GMm}{R^2} = m \frac{v_{\rm orbital}^2}{R} \Rightarrow v_{\rm orbital} = \sqrt{\frac{GM}{R}}$

critical velocity is the minimum velocity required to put a satellite into orbit

Ignoring the rotation of the Earth and any effects due to the atmosphere you will need to give a satellite enough kinetic energy $\frac 12 mv^2_{\rm critical}$ at launch to enable it to increase its gravitational potential energy $\frac{GMm}{R_{\rm Earth}} - \frac{GMm}{R }$ and then have enough kinetic energy left $\frac 12 m v^2_{\rm orbital}$ to go into orbit.
Comment: @RabikJohn So I think that your question has been answered?
Comment: I want to know that ,critical and orbital velocities have same valuesthen why they are called different? I can't get my answer from your answer.
Comment: @RabikJohn My answer shows that the values of critical speed and orbital speed are different.
Comment: But,I get the same values for both .The value of critical velocity is 7.9km/s and value for orbital velocity also comes 7.9km/s ,after putting values in formula v equals to square root GM/R
Comment: @RabikJohn The only time the two speeds can be the same is for an orbit of radius equal to the radius of the Earth when there is no gain in gravitational potential energy.
Comment: Oh! you mean value of R in that formula is not necessarily equal to value of radius of earth.If I change the value of R then orbital velocity will be different?
Answer: Orbital velocity depends upon height of satellite
It is given by v= square root of (ghR) where h is the height of satellite and R is the radius of earth
Critical velocity is a  constant value and its value on earth is 7.9km/s
It does not depends upon altitude
It gives the velocity of smallest possible orbit given that there is no air friction and other retarding factors
Comment: Please use MathJax to make formulas in your post readable.
Answer: The orbital velocity is given by,
V(orbital) = $\sqrt{GMe/R}$   ,
Where R is the sum of radius of earth and the altitude at which the sattelite is revolving.      R = Radius + Altitude,
So its value will be always greater than or equal to critical velocity.
Critical velocity is the minimum velocity required to put a sattelite to orbit while orbital velocity can be any velocity greater than critical velocity.Orbital velocity can be equal to or greater than the critical velocity.I hope you understood.
Comment: This answer was already given by someone else.


Does changing career delete progress on the D career?

Question: In Need for Speed Rivals, I have not tried changing careers, as I am worried I will lose my progress, considering I have a Lamborghini vendor. The reason I want to know is that I would like to have both a cop and a racer career.
Answer: Need for Speed Rivals does not have multiple save functionality. You have a few options depending on if you are playing on PC or on console.
If you are playing on PC you can simply backup your save which would be saved in this location <code>%USERPROFILE% \Documents\Ghost Games\Need for Speed(TM) Rivals\settings\ <user-id>.sav</code>
If you are playing on a console you can create a second profile, or back up your data on a flash drive to keep your previous save game.


Is it financially risky to buy new car made in UK considering Brexit?

Question: I live in an East-European EU country and I am considering buying a new Toyota Auris. These are made in the UK and Toyota has no plans to relocate. That makes me nervous because after Brexit,  I may have a problem due to  service components skyrocketing in price.  In the event of no deal,  is there a risk that car components made in the UK  might increase 2x or more in price?
Comment: Though I'm not familiar with that particular model, and thus can't give you a definitive answer, Toyota shares many components between models.  Those components are made around the world (it's likely that your "made in Britain" Toyota is only assembled there), by many differents suppliers, and parts should be readily available in the aftermarket.
Comment: Seems to me like the best anyone can do in trying to answer this question is to speculate. It'd probably be very hard to answer objectively.
Answer: There's a reason why they changing Auris back to Corolla.
Toyota have this comfort that many of their parts are interchangeable between different models. For example clutch for Auris fit also on Corolla made in 2006, Urban Cruiser and (surprisingly) Yaris. And those parts are not made in UK.
Next is that not all parts are exclusively made by car manufacturer. For example some shocks are made by KYB. I don't remember the naming but in EU it's coded as "made in factory/manufacturer of OEM parts" (or identical with OEM).
What I would look at, rather than parts, is the fact that they going back to Corolla so 2018 Auris is the last years of this model. It may be reason for end of year sale with big rebate as dealerships will try to push them out and make room for Corollas. If you can compare prices of Auris at the beginning of this years and last year rebate for "MY 2017" models you can see difference in price.


MS teams sharescreen and blur background features

Question: I am using the official Microsoft teams application. However, it does not support screen sharing or blurring the background on video calls. The organization I work with uses MS teams for our meetings and I DO need share screen feature to deliver my presentations. Is there any stable unofficial application for Ubuntu that supports this? It would be ideal if it supports (blur background) as well.
Answer: I just found this: https://gitlab.com/parrot_parrot/ms-teams-replace-background
I tested it, but I am having problems installing one of its requirements, tensorflow_gpu==1.15.3 ... I have a Python version superior to the one specified here, maybe that has something do to with it.
Still, think of this as a starting point for other's experiments, I will update this comment if I fix and make it work
Comment: For Ubuntu 20.04 & Lnux Mint 20.1 Python3.8 is the current version of the Debian default install package "python3" and requires TensorFlow 2.2 or later which includes GPU support, https://www.tensorflow.org/install/pip. However, to enable GPU support there are prerequisites enumerated https://www.tensorflow.org/install/gpu for Uubntu 18.04 & 16.04, not 20.04. When I tried to follow them, I had an illegal instruction core dump in the Python code which loads TensorFlow. Parrot includes the "requirements.txt" which installs TF 2.4, but also installs the deprecated TF-gpu. Oversight?
Answer: As of January 2022, the Teams Background Effects (change/blur) and Share Content/screen works in Microsoft Edge for Linux. I have it running on Ubuntu 20.04.
Here's what the background option looks like (option highlighted in red):

And the share screen option:

Create Teams on Edge desktop file
You can also create .desktop file to open MS Edge with Teams. You can do this by:

Copy and rename existing Edge .desktop file from terminial: cp /usr/share/applications/microsoft-edge.desktop ~/.local/share/applications/microsoft-teams-edge.desktop
Edit the file: gedit ~/.local/share/applications/microsoft-teams-edge.desktop
Change Name entry at the top of the file and replace it with something like Name=Teams on Edge Microsoft
Find the Exec entry in the file and replace it with Exec=/usr/bin/microsoft-edge-stable --profile-directory="Default" https://teams.live.com/.
If you use multiple MS Edge profiles, change "Default" in the above command to the profile you use for Teams (eg --profile-directory="Profile 1").
Optional: You can also set a unique icon so that Teams on Edge looks different to the default Edge icon. Here is the icon I created for this purpose.

Background
The functionality update is related to Microsoft Feature ID: 85738. These options may also work in Chromium-based browsers like Chrome or Brave. Also see here for more info.
Answer: For screen sharing you'll probably need to use Teams via the web interface, which is what I do and it uses considerably fewer resources than the official "app". Be sure to use either Edge or Chromium for this. As for the blurry background, you can accomplish this to a degree with FakeCam from the Snap Store. This will appear as another camera device, which you can select from your video chat tool of choice. It's not limited to any in particular.
Comment: Thank you for your answer. Can you log in with your organization account using the web interface? Will you have privileges like admit people to a meeting who are in the queue?

Also, I installed this fakecam app but unable to understand the instructions after installation to get it running. Could you please help me with that as well. I am using Ubuntu 20.04. What are the commands I should execute after sudo snap install?
Comment: Yes, I use my organisation's credentials to sign in and everything works as it should. The web app version of Teams has proven itself to be far more reliable and consistent on Linux over the last 8 months or so than the native app. It can still crash if you end your post on an emoji and backspace right before hitting send, though. As for FakeCam, you should be able to find it in your applications list. From there you can configure your preferences. In Teams (either the native or web app), you set your camera to the FakeCam device and it "just works".
Comment: FakeCam didn't work for me, at this moment, I could not find the way Teams to use virtual devices, I searched on the Web, but people say it is disbled.
I just found this, still not tested: https://gitlab.com/parrot_parrot/ms-teams-replace-background
Answer: Teams does support screen sharing using the Linux client as well as the windows one.
Once a call is started, there should be a 'share screen' option in the button bar [square with an upwards arrow overlaid in it]
Thumbnails of which monitor to share in a multimonitor configuration should then be shown (I am not sure whether this would apply if you only have a single monitor)
Although not the 'single application window' capability that Zoom gets...
Once the monitor to share is picked, it should get a thin red highlight surrounding the very edge and a very small banner at the top indicating it is being shared.
Comment: I have not found a way to blur or replace images other than the parrot link referred to above, I have not tried it as my GPU is not very powerful & suspect it will stretch my PC too much.
Answer: If you are still looking for a solution to blur or add background on teams linux native app, I have created a workaround solution to do so.
https://github.com/prabhakar-sivanesan/MS-Teams-background-changer
You can check this github repository and follow the instructions there. Runs without GPU dependencies.
Answer: Maybe a bit late in replying, but I have not found the following alternative in any other answer on the forum:
https://snapcraft.io/teams-for-linux

Unofficial Microsoft Teams client for Linux using Electron. Uses the
Web App and wraps it as a standalone application using Electron.


How to determine Canadian patent life-time?

Question: Is patent CA 2561773 A1 still valid or pending?
Event shows: dead in 2008
Please inform of risk of patent infringement.
Answer: Citing the Canadian patent office website as reached through the Google Patents link on "dead" applications:

The date that an abandoned application could normally no longer be reinstated.
Dead Application  2009-09-21

Unless the owner is in a coma and can therefore reinstate the right after waking up (I don't know if this is possible in Canada), the patent application is most probably "dead".
Comment: Just a little nit to pick, but I hate when applications are referred to as patents.
Comment: I think it cannot be reinstate the dead patent, only if the application erroneously became dead


Easily spinning Windows and Linux containers

Question: I'm thinking about setting up a CI/CD infrastructure for my team.
Since the components we're developing are on-premise and should run a different OSs, I'm thinking on spinning up Windows & Linux containers.
Clearly I could use Kubernetes and spin up some dockers, but then I'm limited to Linux and Windows 2016. Since I need to test even older versions of Windows such as Win 7, 8, & 10, I thought on spinning up VMs.
I've read that Kubernetes + RancherVM or Nomad can be used to spin up VMs but haven't tried it out.
Does anyone have experience it or had to develop something similar? I want to hear some info before spending days of research in the wrong direction.
Comment: You might find there are more people with experience of such things over at [Stack Overflow](http://stackoverflow.com/), if they allow questions without code, sorry I can't help more myself, I am only familiar with VS and Azure for CI/CD.
Answer: I would suggest Vagrant. Since VM deploy a provision can be automated. Virtual machines in VirtualBox and Hyper-V can be used.
Regards


Having more than 10 letter on header while exporting SHP to Excel using ModelBuilder ArcGIS

Question: When I export a shapefile to Excel from ArcGIS using ModelBuilder  the header maximum length is 10. I would like to know how can I have more.
Comment: Migrate your spatial data from the old shapefile format into the file geodatabase format. That can have longer field names and also aliases. Don't know what they are? Read the help file
Comment: Your shapefile couldn't have field names longer than 10.  If your table shows field names longer than that in your project it would be because you used field aliases.  Unfortunately any aliases created in ArcMap for a shapefile or feature class can't be exported using the Table to Excel file, despite the option in that tool to use field aliases as column headings.  I think that only aliases created in ArcCatalog in feature classes are covered by that option and if you edit those in ArcMap those edits won't go.
Comment: Thanks for your help !
Answer: I don't think it's possible. This is because shapefiles cannot store field names of more than 10 characters. (Shapefile is an old format from the 1990s)
If you convert a data table into shapefile format, the field names are truncated (if longer than the limit). So, if you had longer field names, the information is already lost when it's converted to a shapefile.
Comment: Thanks for the answer, do you know a way to actually export it? I've tried to convert it to gdb first but the problème it's that instead of erasing the data each time I use my builder it create a new files in the gdb, and it's not a solution
Comment: @Amine1992 What is your original data format? If it's shapefile, it couldn't have any field names that are longer than 10 characters. Exporting to gdb first wouldn't help since the source data has at most 10 characters for each field name. If your original data is in another format such as gdb., then try to skip the shapefile part, as it is the bottleneck.
Comment: thanks for the answer, i will try to skip the shp part of it !


When tiling a floor must I start in the middle of the room?

Question: I am tiling a small bathroom ~45sq ft. The book I am referencing suggested starting the tile in the center of the room to prevent laying any tiny fractions of tile near one side of the room. I'm working with 12x24" tiles and it looks like I might be better suited with starting the tiles at the door threshold. Is the start at the middle idea just a guideline that I can go ahead and break?
Comment: Start where it's going to look the best
Comment: You should attempt to have a full tile in front of the door
Comment: Just an observation. You have a running bond pattern so the "centering" concept is moot since you are centering both the grout lline in one row and the tile in another. That is why you get fat tiles on one row and slivers on the others. If you did a parallel configuration then the centering concept to avoid less than half of a tile makes sense.
Comment: If you start at the doorway, how are you going to get out? No, seriously, play around with your tiles till you find an optimum arrangement. If the walls are in any way irregular, have you thought of laying them diagonally? Uses more and you have some fun doing the cutting, but looks fantastic. Also you could put a frieze round the edge, looks very nice a in a room with no furniture, and you can eliminate the very thin cuts then.
Comment: @ArchonOSX - Thanks for the comment. The "Tiling 123: Home Depot" book I bought is far from detailed and of course didn't mention anything of that sort, but what you mention makes sense.
Comment: start from the door side and then continue away from the door. Half cur tile near the door is more visible and looks awkward.
Comment: RedSonja made some very good suggestions to consider (diagonal layout would solve narrow tile cuts).
Answer: The two things (starting in the middle and avoiding slivers) are NOT related.
You can start in the middle and end up with idiotic cuts on both edges - or you can start in the corner and not do that...
What you SHOULD do is measure enough that you know where to put the SENSIBLE cuts on the edges, regardless if you are starting at a wall, corner, or the middle of the floor. When starting in a corner or at a wall, your very first tile might well be a cut tile. By planning, you know what cuts you are making and can place the whole and cut tiles as you like. In your case, the first two-and-a bit tiles at the door should probably be cut so that there's not a large gap at the threshold (or you need to get the door molding cut so they can slide under it.) Depending how the (invisible) far wall (opposite the door) comes out, you might want to take enough off the "door" tiles that the wall parallel to the door does not have what looks to be a 1-1/2" slice running along it.
The main argument I've seen for starting in the middle is to avoid following an irregular wall - but you can do the same thing by striking a chalk-line where the first grout line from the wall would be, and pre-cutting all the tiles for that wall if it's irregular (or if they will be half or 1/3 tiles so the far wall isn't slivers - which you'll know because you measure it.)
Based on your pictures, I'd choose the "not centered" approach, since the visible far wall is decidedly not slivers that way, but that's purely an opinion call, not "right" or "wrong."
Answer: Yes, starting in the middle of the room can be a bit un-nerving. There's no reason not to begin in another location ; as long as you're comfortable with the appearance of cut tiles along the wall. For the sake of balance and uniformity It would be wise (as you noted) to begin at the most trafficked entry point working out and away into the room. I always found you get the best look from the tile if you can install full tiles to be in view when the door is open. So looking at photo #2 you see more full tiles and fewer cut tiles. This will also produce less work in that you won't be going back to the tile saw constantly and there won't be as much waste. You might want to trim the door molding so the tile can fit underneath rather than notching angled cuts. Keep your spacing along the wall as close to the joint spacing as possible if you don't intend to install wall molding (it will look neater). Any grout joint over 3/16 inches you will want to use sanded grout for a stronger grout joint.
Answer: I followed the advice given here and went with the "non-centered" approach - to ensure that the threshold looked good and not start in the middle of the room.  Here are the results:
Answer: When I tiles three adjoining rooms I wanted straight lines connecting the rooms. I didn't want the dining room to be half a tile left or right of the kitchen.
I started in the middle of the family room because it was the biggest and what would be the biggest area where any mistakes would be the most visible. Then, I laid out tiles from that center one, using the spacers, into each of the rooms BEFORE I ever started mudding. Then I shifted that center tile as needed so I had as few cuts on each wall and still had my continuous lines. It was a sort of test lay.
I think another reason you start in the middle is to divide any misalignment equally into each corner. If you start in one corner and that tile is four degrees off then all of that error will end up in the opposite corner. Start in the center and that error ends up being less obvious. I don't actually know if that's true and I haven't put a lot of time into working that out. Maybe someone can tell me if I'm not even close on that one.
Answer: I have laid tile in maybe 100 bathrooms of this size.  You start at the door wall and work your way out.  Other decisions are based on where your vanity will be and where most of the traffic will be. On yours it looks like the area running straight out from the door will have the most tile traffic so I will use that fact in my answer.

first install your threshold where you want it and parallel to the door wall.  If you do a really good job of installing your threshold it will sit right at a point where you can tile straight across without cuts and your grout width next to the threshold will be uniform.
You have a pattern.  You want to offset your tiles using a horizontal pattern.  In your "not centered" picture this is the way you want to do it EXCEPT do not line your first tile with the upper left hand corner (of the pic), it should be lined up with the door wall.  This might not be true for a large room but surely is for a small bathroom as this area will be 80% of the focus.
to line up the tile with the door wall you will have to cut out the bottom of each of your door jambs - do not cut tile around this, as it is hard and ends up looking tacky.  This is a bit tricky because you want it snug as possible but you have to account for both tile and thinset.  I usually just add 1/4" to tile height.
The only time I would ever start in the middle of a small room like this would be if I was running some diagonal pattern.  Since you aren't then this is moot.
I would keep your tiles snug to the left wall (in the pics).  This wall is in front of the door and is the eye line for the bathroom.  Any odd/non-uniform cuts I would put on the other wall.
Answer: LOL, that is funny. Might want to burn that book because any tile setter that wrote that is either a complete amateur or an idiot.
There are two basic problems with tile geometry: the room is not square, and the dimensions of the room are not evenly divisible by the dimensions of the tile. Solving these two problems is not trivial, even for experienced tile setters and for an amateur it is very difficult.
I would strongly suggest getting tile setting software. This software will let you experiment with different layouts and help you determine the best configuration for your space.
In general, what you want is for everything to be balanced, which means that the angles and cutoffs are the same on all sides. For example, if the tile makes a 5-degree angle with the wall on the left, then it should make a 5-degree angle with the wall on right. Having a 3-degree angle on one side and an 8-degree angle on the other is bad. Likewise, the cutoffs should be balanced. If you have a 5-inch cutoff on one side, then you should have a 5-inch cutoff on the other. Having no cutoff on one side, and a 10-inch cutoff on the other is bad because it is not balanced.


What is the tightest orbit binary planets can orbit each other?

Question: If there were two Earth-like planets in a tight orbit around each other, how close could they be to each other without colliding?
How quickly would they have to orbit to be stable?
Would they be habitable?
Could something similar to a Roche lobe form from their atmospheres?
Answer: One can certainly imagine double planet "Rocheworlds" (like the one in Robert Forward's eponymous novel) where two terrestrial worlds fill their Roche lobes until they touch.
On its own this is perfectly fine: there are indeed a fair number of asteroids and trans-Neptunian objects forming tight pairs or a merged dumbbell shaped contact binary. The planets would be tidally locked to each other, not dissipating energy through tides.
The problem is that when the rest of the solar system is taken into account tidal dissipation begins to matter. The tides will cause the planets to move a bit relative to each other, and strong tidal dissipation will dampen that motion - dragging them inwards. Hence, relatively quickly since the tidal dissipation would be strong in big and soft terrestrials, the double planet would merge.
The orbital speed calculation looks a bit messy. Basically, the mass of the touching planets (that we need for the speed) is their density times the volume of their Roche lobe, which lacks analytical expression. However, one can approximate them fairly well as spheres of radius (see also Eggleton) $r=0.38 R$ where $R$ is their orbital distance. So we get $$M\approx 0.2298 \rho R^3.$$ Kepler's law gives us the period $$T^2 = \left(\frac{4\pi^2}{2GM}\right)R^3$$ (note the $2GM$ term rather than $GM$ - this is for a double pair), or $$T = \sqrt{\frac{2\pi^2}{ 0.2298 G \rho}}.$$ For Earth-density worlds I get $T=4.2512$ hours. Note that this is independent of the size of the system!
Can systems like this form? Probably. Can they remain long enough that life emerges on the planets and they become Earth-like? Hard to tell, but I suspect the answer is something like "yes, if they start sufficiently far away from each other then they will spiral in slowly enough that there is a biosphere when things get really tight." I suspect such coincidences in time and formation are rare. But the universe is large.
Comment: I see, it's independent of the size of the system for a *constant density*, like a pair of [these Earth-density giants](https://space.stackexchange.com/q/14383/12102)


Debian testing and RabbitMQ - upgrading

Question: I've got a simple problem with RabbitMQ on debian testing. The service works fine and I'm happy with it, but when it upgrades, it loses all it's exchanges, queues and, most importantly, permissions. Is there a way to migrate users and permissions across major version upgrades? I've googled quite a lot, but can't find anything.
Answer: Do not let important tools get upgraded by the OS packaging system. Do it manually. Test it first on another machine. There should be no issues with upgrading RabbitMQ if you only upgrade the binaries and scripts which are in $RABBIT_HOME/ebin and $RABBIT_HOME/scripts in the tarballs produced by RabbitMQ developers. Any persistent queues will be picked up when the new versions starts up.

Debian testing and RabbitMQ - upgrading


Can I connect a resistive touch panel to the iPad?

Question: I am wondering if it would be possible to connect a resistive touch panel (manufactured with a 30-pin connector) to the iPad through the 30-pin connection and use that for input?
Comment: For what program? If this is a developer question, it's off-topic here. If this is about existing programs, I don't know of any that support this.
Answer: No chance I'm afraid, the limiting factor is software more than anything though, it's possible that an App could be written to talk to said accessory, but using it outside of that App would not be possible unless you are talking about a highly modified jailbroken solution.
Unless you already have a device in mind that exists which you actually want to use, I can't imagine anyone creating one, and if they did not by the dock connector, but more likely over a custom Bluetooth protocol which is allowed (see the i-Cade games cabinet for example of a custom controller using Bluetooth that only works with supported apps).
You may be better mentioning what you wish to achieve to allow alternate answers, as I am almost positive that this method will never fly.
Comment: Fantastic! Thank you for the input. I would only want it to work in a specific app so I think it would be great. I thought it was possible because of the arcade docks that are out there (which you mentioned). Thanks again
Answer: it is possible to connect an external touchscreen capable of sending input to iphone:
http://www.macstories.net/iphone/the-external-touchscreen-that-can-control-an-iphone/


Random walk on lattice

Question: I have a $9 \times 9$ square lattice. In each site of the lattice, there are $N$ molecules, where $N$ is a large random number and it is different for different sites.
N equal to 100000000+-100 in beginning and changes by passing time.
I want each molecule to do a random walk in each time step. $N$ is very large and it is not possible to apply random walk for each molecule in each site. Could anyone help? It is a part of other code, actually molecules f cites are consumed by other particles and they diffuse in time, but the part I have problem in is diffusion of molcules.
I don't have enough score to answer the comments, so I answer here. Yes lattice is 2d.
Yes, Exactly! I want number of particles in each site.But I don't underestand what do you mean. Could you provide an answer?
Comment: This sounds like you don't want to track each individual particles, but you want to track for each site the number of particles you have there. Based on how exactly you define your random walk, you need to define a time step model that relates the number of molecules at each site to the numbers at neighboring sites.
Comment: I assumed that your lattice is 9x9x9, since it's cubic, and changed the question accordingly. Right now, you are not providing enough information. How big is N? What is the distribution of N? What is the purpose of your model?
Answer: In the comments, @WolfgangBangert mentions the first part, the representation: instead of storing for $10^8$ particles a lattice location -- a two dimensional vector $(x,y)$ with 9 entries in each dimension -- you choose the dual representation by storing for each site $(x,y)$ the number of particles which occupy the site.
The second component is the transition. Straightforwardly, you would have to draw two times $10^8$ random numbers in order to check whether each one of the particles undergoes a transition. By this, however, you would have won nothing (regardless of the reduced representation of the system state in step one).
Therefore you approximate the distribution of the particles which undergo a transition by a normal distribution, which should be a very good approximation as your $N$ is quite large. The theoretical basis for this is the central limit theorem, and the parameters of the normal distribution depend on your microscopic transition law. You then draw a few random numbers from the normal -- which might even not be necessary as the normal should be really sharp, so it's possible you can just pick the mean.
Note that the above procedure is similar to what is done in classical statistical physics, when going from the microscopic description to the canonical ensemble.
Comment: I cannot comment on your answer, so I write here. I know about central limit theorem and statistical mechanics, the problem is, I cannot apply it. Because there are 2 dimensions. for one dimenston it is easy: I generate a normal random number for each site. this number shows number of particles which go to the write. Other particles on the site go left. But I don't know what to do for 2d case
Comment: @SoniaSohi: in terms of StackExchange speech, this seems to be a comment :-). The exact application of the CLT depends on your transition law. Basically, it's important whether the x- and y-directions are correlated. If they are not, one can use two one-dimensional normals. If they are, you correspondingly need a correlated normal. (Note that in the worst case, your transition law could also be so pathetic that the CLT doesn't hold or that it is only a bad approximation)
Answer: For such large numbers the diffusion process becomes essentially 'deterministic' (https://en.wikipedia.org/wiki/Law_of_large_numbers) so the classic approach is to implement a finite differencing method for a diffusion equation, such as: https://nl.mathworks.com/matlabcentral/fileexchange/38088-diffusion-in-1d-and-2d .

Random walk on lattice


Newbie questions: real-time clustering of messages

Question: I'm very much a newbie in NLP, so please accept my apologies if this is an obvious question, the wrong place to ask it or any other error I could be making.
I am considering using NLP for some subset of real-time spam detection in real-time chat. The general idea would be to observe semantic clusters forming in real-time, as they could indicate activation of a wave of spambots. This, by itself, won't be sufficient to indicate that it's spam but I suspect that it would be an interesting data point in the process.
More specifically:

my system receives text messages in real-time (e.g. thousands to tens of thousands per second);
I would like to classify them and see if semantic clusters emerge;
I will need to cleanup the data regularly (e.g. remove everything that's older than one hour) to avoid retaining potential private data;
I cannot rely on external services for privacy reasons, so whatever happens, I'll need to write code. I'm fine with that.

I figure that I need to encode my text messages into vectors, using e.g. BERT or some other existing model. So far, so good. My difficulties are:

real-time classification of a growing dataset, with an unknown number of clusters (I'll be able to experiment with the distance, though);
regular cleanup.

Are there any well-known algorithms or libraries that I should look at? I'm not afraid to code and optimize my code, if I have a good reason to believe that it's going to work.
Answer: This looks like a problem of topic modelling: unsupervised clustering based distributional semantics.

For the issue of the unknown number of clusters, HDP is certainly a good option.
For analyzing the changing behaviour, there are dynamic topic models which can represent this, in particular D-LDA, DETM.


How to unground microwave transformer

Question: I'm trying to make MOT tesla coil and would like to connect secondary coil in series. The low voltage end of secondary is connected to the body of the transformer. I don't particularly want to disconnect this as it may be useful for some other projects. Is it bad to connect the secondaries in series with secondary low end attached to transformer core but not connect the core to earth ground?
Comment: High voltage at utility power frequency is much more dangerous than at the usual frequencies for Tesla coils. In addition, the current capability of a MOT is likely higher than most Tesla coil designs. I am not inclined to comment on the actual question,
Comment: I've modified my answer significantly, as a result of seeing how some of the MOTs on my bench look, now I have them in bits. You might want to read it again.
Answer: A MOT has one great attraction for amateur coilers, it's cheap.
Aside from that, it's the worst possible choice for powering Tesla Coils.
Let's assume you've done the obvious thing with two MOTs, which is to use one in phase, one in antiphase, to get a balanced +/- 2kV about ground, as Jasen has illustrated in his answer, with the primaries in parallel.
Voltage too Low
As you've found out, the voltage is still too low for reliable spark-gap operation. So, you're looking to stack them.
Here we need to make a distinction between the MOTs you used to be able to get 20 years ago, and those of the 2020s. Today's MOTs are value-engineered to the max. Old MOTs used to have thick insulation around both primary and secondary, which was good for the full output voltage, and then some. Today's MOTs only insulate the outside and sides of the secondary to the full HV output voltage, the inside of the secondary and the whole primary are only insulated to take mains spikes, 1500V or so.
That means although you may have seen posts from coilers saying they had lifted the core connection and put secondaries in series, or floated the core on the output of another MOT (and I've done both), that's because they were using old style over-engineered MOTs. This trick will not work as well, or at all, with today's MOTs.
There is a safe way to series two MOTs, if you have a third. Connect two MOTs together secondary to core, secondary to core. Now power a third MOT from the 'hot primary'. All insulation is now running within its design stress.

simulate this circuit – Schematic created using CircuitLab
I may have the dots round the wrong way, I've not bothered to think it through. There are only two possibilities for phasing the connection of the hot primaries, one is right, the other will give zero output.
Let's say you use six MOTs to get the output of four in series, for a balanced +/- 4kV AC from ground. That's a lot of metal, and you're still barely at a voltage that gives adequate spark-gap results.
While a series connection will get you more volts when everything is working normally, sparks from a TC can get everywhere. A little extra voltage can break down the 3kV insulation. The first sparkover from your TC could trash your MOTs.
Voltage too High
The voltage is too high for safe 'on the bench' operation. I'm not saying that mains voltages are safe, but they're safe enough to use 'on the bench'. Below 1000V, any thickness of dry clothes will insulate against an accidental contact. A MOT secondary has a peak voltage of 3000V. That will jump through a layer of clothing.
Current too High
The current is far too high. Even if you leave the shunts in, they're not current-limiting like those of a Neon Sign Transformer (NST) are. If you get a shock from an NST, you're not guarranteed to be toast, that from a MOT is almost certainly fatal.
Availability
I feel your pain, NSTs are hard to come by. All the modern ones have GFCI or are high frequency, both of which renders them unsuitable for TC use. You need an old, second-hand, big-iron NST.
Join a dedicated coilers forum, google will find them for you. Get chatting to the old timers. Some will have NSTs that they're willing to sell or lend. It's sooooo much easier to start with the right tools, an NST, than to cobble inadequate and dangerous tools together.
A Good Way to make a Tesla Coil with a MOT
The one way a MOT does make a good TC is to balanced doubler rectify it to +/- 6kV DC, then double that through resonant charging into a rotary spark gap DC coil. It works very well, but it's rather complicated for a first project.
Comment: Hi. Thansk for the explanation. I've started messaging my local neon sign shops. Hopefully I can get my hands on NST, but if not ill just wire MOTs in series like you said but disconnecting ground so core is not live.
Comment: 'so ground is not live?' You've obviously not understood what I've said about core the winding insulation. Leave the secondary to core connection intact, avoid touching the live cores.
Answer: Well, it is dangerous because if you somehow come in contact with it, you will get a lethal shock... And considering the voltages, things like wood etc. start to become less reliable insulators. Doing this with MOTs is typically not recommended.
Also if you stack more then 1, you risk breakdown from the secondary to the primary.
Answer: it really depends on how good the insulation is between the primary and the core.  these things are designed to be as cheap as is practical so it's probably not good enough.
can you work with a centre-grounded secondaty?
you can get that by useing two tranasformers with one of them reversed

simulate this circuit – Schematic created using CircuitLab
Comment: Those primaries should be in parallel. With series primaries, you'll only get 2kV balanced out, instead of the 4kV you could get with parallel. Of course with series the magnetising current will be way down, but that's not normally the first consideration of the coiler.
Comment: yeah, seeing as he was wanting to connect in series for more voltage that's a fair point. edited

How to unground microwave transformer


Linux mint freezes after clicking on run button in android studio

Question:
I have installed android studio in linux mint 18.1. Every thing is working file but whenever I'm clicking on run app button it freezes completely after that I need to restart laptop. My spec is Pentium quad core with 4 gb ram. I have insteed 32 bit library also.
Answer:
I had the same problem when I used the Virtual Device and solved it by changing the graphic emulated performance back to Software.
Answer: The screen is freezing because the emulator is set up to run on software emulated performance mode which does not use GPU so instead it grabs so much CPU that it just freezes your main OS UI. The solution is to make the emulator run on GPU so that way it does not eat all of CPU and memory.
To configure the emulator follow steps bellow:

Go to virtual devices window
select to edit your AVD
In Emulated performance change to hardware
Click finish


Is Joel Greenblatt's Magic Formula biased towards large companies?

Question: One of the sorting criteria in Joel Greenblatt's Magic Formula is EBIT. However, EBIT is positively correlated with the market capitalization of companies, i.e., larger companies have a higher EBIT. Nonetheless, even though EBIT might be high for some large companies, their EBIT/capitalization ratio may be lower than for some smaller companies, and the latter would be more attractive to invest in. Therefore, is it fair to say that the magic formula is (at least partly) biased towards large companies?
Comment: Personally I'd suggest avoiding anything with "magic" in its name.
Comment: @keshlam, I agree with the criticism, but there's truth to the methodology from a value-investing perspective.
Answer: According to this site,

The Magic Formula, as explained by Joel Greenblatt in his book The Little Book that Beats the Market, involves ranking stocks based on two metrics: earnings yield (EBIT/enterprise value) and return on capital (EBIT/invested capital).

Both of these metrics involve normalizing EBIT with respect to some other metric (enterprise value and invested capital). Basically, earnings yield and return on capital are modified versions of ROI. Both of these normalizing factors track the size of the company, and are correlated with market capitalization. So there isn't a clear bias towards large cap companies (there could be one empirically, but there isn't clear evidence of one just from the definition).


Is quantum physics based on language wordplay?

Question: Sometimes I think that most of the Quantum Physics is deliberately complicated. For example, look at the Schrodinger's cat. Now I know that the cat represents various other complex phenomena for example superposition, but I am taking the cat here for simplicity. Isn't it deliberately complicated? The cat is both dead and alive. I understand that unless you don't check, you don't know the result. But it's like saying, if a criminal doesn't get caught, he has not committed any crime. But it doesn't necessarily mean the even if you are unaware, there is no result inside the box.
Comment: (cont'd) I can now verify what once I could only suspect: popular accounts of QM are the crudest possible shorthand, useless as descriptions except to warn people to leave their intuition at the door. Schrödinger's Cat is no exception. To non-initiates, it is little better than mystical nonsense — except that riddles of mystics do sometimes hint at how they may be fruitfully understood. But it is hard to see how to improve on this without serious maths. Imagine explaining the merits of a mobile phone plan to someone without using numbers, and you get a sense of the futility of the enterprise.
Comment: It's not just that you don't know the result.  You can do tests that give results that only make sense if both states are present in an indeterminate form.  That's what the double slit photon experiment proves.  The interference patterns indicate that prior to observation, instead of one of the possible outcomes happening, they all happened and mutually interfered with each other.
Comment: I sympathise with the OP. I remember my frustration with eager and earnest accounts of things which were "simultaneously waves and particles", which if taken seriously could only imply they were neither (without telling me what actually *was* the case); and breathless accounts of the double slit experiment which insisted that particles could be in two places at once, but only if detected in neither place. Meanwhile, all attempts to describe what entanglement was were equally excited but didn't explain what set it apart from mere randomness.
Comment: **MY QUESTION IS WHY DID THIS QUESTION BECOME ON-HOLD** WHILE SCARILY OVERWHELMING ( THAT ONE WHICH OVER 4K PEOPLE ARE STILL SEEM TO BE GRUMBLING ABOUT ) GOD-LOGIC QUESTION IS **STILL OPEN**. THIS QUESTION IS INTERESTING **TO ME PERSONALLY** IF IT IS RELATED WITH ENTROPY STUFF. FINALLY BUT NOT LEAST **I AM NOT SHOUTING BUT JUST EMPHASIZING**.!
Comment: In other words, you haven't the foggiest idea what the Schrodinger Cat thought-experiment is supposed to illustrate.
Answer: The point of Schroedinger's cat is not just that you have not checked, the point is that the cat is killed based on an indeterminate event.
Indeterminate events in normal physics have to be in one of the allowed states.  Indeterminate events as we observe them in quantum dynamics can be in multiple states at once, and only decide what state they were in during the past when some result affects something measured.
This ability to not have to write history until you hit another particle is the point.  It seems insane.  We like to believe history is written as time passes.  But on a microscopic scale where individual particles may be far enough apart that we can separate out each interaction and determine its state, this just is not true.  Past history is written when particles interact later.
Of course there are so many particles, on any normal scale, that this almost never matters.  Immediately after one interaction, there is another, and another.  Fairly quickly some of those contribute to some noticeable effect on our shared reality, and things are decided.
In a literal case of a dead cat in a box, that cat is going to rot or not, and you are or are not going to smell it rotting.  No need to open the box.  Even if you had an airtight box, you would have to isolate the cat so thoroughly that its body heat could not contribute to the temperature of the room around it, as on some subconscious level we all measure that.
So this is not a realistic idea, just a hypothetical to make the point of how strange time is on the tiny scales where complete accounting is theoretically possible.
This kind of leads one to accept a view of physics like Leibniz's, where the monads all 'commune' and 'decide' what happens, over a form of materialism where actions are independent and absolutely predictable.  You can consider the distinction a word-game, but it seems to really matter.
For instance, why should time run slower when there are a lot of particles present?  (We observe the gravitational time dilation proportional to mass from general relativity, and macroscopically, mass is basically a particle count.)  You can insist it is all about objectivity and relativity of measurements, but maybe that is just the effect.
It makes comparable sense to consider that those particles, being more numerous and more intimately interconnected really might have to 'commune' more in order to 'decide' how to move on -- so time really passes faster for more 'more independent' particles more isolated in space.
Comment: So according to you, it's not wordplay right?
Comment: All of philosophy and half of science is wordplay.  But your understanding is lacking.  Your characterization of what Schreodinger meant is completely off.  In the cat dilemma, it **is** required by QM that **there is no result inside the box** (if the box were perfect enough).
Comment: Interesting to me an ignorant though.
Comment: Excellent answer, though I would add that whether a human or other conscious entity is doing the measuring only matters inasmuch as we, the people worrying about this bit of physics, are social animals who care about whether another physical system is a thinking peer. As far as physics is concerned, there is no evidence that consciousness plays a role.
Comment: That is why, despite its hoakiness, I am convinced by Whitehead that Liebniz notion of 'communing' and 'deciding' particles has merit.  To my mind, whatever consciousness is, either does not matter in people, or it matters already at the level of genes, which make decisions of a sort, and therefore probably of particles.
Comment: But actually, the more and the more I teach myself, the more and more I inclined to agree with the questioner's question shouldn't it be **hypothetical** or not.........
Answer: Looking solely at the title of your question, the answer is no.  Quantum physics or quantum mechanics is based on scientific method, constantly subjecting the most valuable and useful theories of nano-scale behavior to question (disproof).
Answer: Here's a though experiment: What are tomorrows lottery numbers? The simple answer would be "I don't know (yet)". But instead you could say "the first number is maybe 1, or maybe 2, or maybe 3, ..." and so on. Instead of saying that you don't know, you could say the number is in an overlapping state where it could be any of 49 numbers, with equal probability. Of course, for lottery numbers this is nonsense.
However, for electrons this is exactly how they work. And not only in the future, but all the time. An electron circling around an atom isn't at some point circling at a certain speed. It is in a permanent state of being "somewhere around here". It is in one of many places with certain probabilities. But probability is not quite the right way to express it. Imagine you took a photo of a ball swinging around a centre, but leaving the camera lens opened for an hour. On the photo you would see the ball in all different places, but brighter in places where it was more often, and dimmer in places where it was more rarely. An electron is a bit like that, but at any single point in time.
Now Schrödinger's cat is the result of an experiment where quantum physics is made to control something in the non-quantum physics world. The cat is killed if an electron hits a detector. But an electron, as explained, doesn't hit a detector. It simultaneously hits and doesn't hit, with different probabilities. Therefore the cat is in a state where it is simultaneously dead and alive. It's not either dead and alive but we don't know because we haven't checked, it is both dead and alive at the same time.
Answer: Word play does not give specific quantitative laboratory results. Quantum mechanics makes quantitative predictions. So it's not word play. The question reveals confusion on te subject. You need a primer where the philosophy is integrated with the mathematics. I wrote such a book long ago. Try "Primer of Quantum Mechanics" by Marvin Chester.
Answer: To be clear, the strange effects of QM occur at the atomic level; they're not visible at the macroscopic level, though they have effects there too.
So, in a sense, you have Schrodinger dead to rights; no such experiment, in principle can be carried out; and hence, it appears that his line of argument is false.
But hold; first, Schrodinger was writing for the public and not his peers - so he wanted to make the physics explicable; second, he wanted to emphasise the strangeness and novelty; and thirdly that the onset or must be taken into account.
So, no; it's not word-play; but in a way it is; but it's a play not intending to obfuscate but to make clear: would you rather be faced with Schrodingers Equation or his eponymous Cat?
Comment: Schrodinger's cat as a problem was initially intended as popularization (although it became popular) -- it was a way of framing QM interpretation problems between and among physicists, e.g. it was published in a scientific journal.  Specifically it was an attempt to show that the quantum jumps envisioned by Bohr and Hiesenberg lead to absurd conclusions, i.e. a cat that is both dead and alive.


Can't save image while rendering

Question:
I tried to do a test render and I cant save the final image. Does anyone know what causes this, and what ca i do?
Comment: Write more descriptive title for your questions please. As to rendered image check if render was finished as there is message in red stating it is not
Comment: I left the house for 2-3 hours, and when I got back I found that I couldn t save my render. I dont know what to check, Im a beginner but I did some renders and never had any issue. It says it took 34 mins, so it seems that it s finished. I had the same problem yestarday with an older version of blender.
Comment: Yay, Windows 10. So I guess it's a rights problem again. Set up a Temp dir under "User Preferences - File" that Blender is allowed to write to. Also, don't use the installer version of Blender on Windows 10, instead use the zipped version and extract it to your desktop.
Answer: There is another solution. I encountered a similar problem where it showed a red dialogue box saying image cannot be written. So I just made another folder in the same directory and saved it in that folder. It worked perfectly!
(solution for Windows 10)

Can't save image while rendering


Can you use a sprite with uneven dimensions in Unity 2D?

Question: I'm new to game development as a whole, so forgive me if this is an idiotic question in itself, but I want to use a sprite sheet where the entire sprite sheet's dimensions are 104x144, and the dimensions of an individual "pose" of the sprite is 26x36. If I can use this sprite, and I'm asking if I can, what Pixels Per Unit would I put? Again, I have absolutely no idea how this works, and I'm probably being a huge idiot about this entire thing.
Answer: This looks like a question you can answer by trying it!
Import the sprite sheet into Unity. Observe that there are no error messages, your game still builds and runs correctly, and your computer does not catch fire.
Modern devices can handle non-power-of-two textures just fine, as long as you're not using mipmaps, which usually for pixel art sprites you won't be. Unity also has the ability to re-pack these sprites into atlas textures to work more efficiently. And the size of an individual sprite within the sprite sheet doesn't matter at all, since the polygon it's being drawn on is allowed to cover as much or as little of the texture space as you want.
As a general rule: always try the thing first, to verify whether there is a real problem that you need to spend time asking about. Much of the time, what you try first will be good enough to continue progressing other parts of your game.

Regarding Pixels per Unit, remember that this is not related to the number of pixels in the image. It's related to how many pixels make up one logical building block of your world.
Let's say you're making a tile-based game. The logical unit of your game is then the size of one tile - that lets you position your tiles at nice clean integer positions, and reason about things like "a dash that moves 3 tiles needs to travel a distance of 3.0 units in world space". In that case, if your tile is 16 pixels, then 16 Pixels Per Unit makes sense. If a tile is 32 pixels, 32 Pixels Per Unit makes sense. No matter what the overall dimensions of the sprite sheet are as a whole.
We haven't seen your character in the context of your world, so we cant speculate whether the full 26x36 dimensions of its pose make up the right logical unit for your world. In some games, characters are larger than the game's logical unit, overhanging the edges of the tile or their collision representation. In other games, characters are smaller than the game's logical unit, fitting inside a tile with room to spare around.
Answer: Leave the pixels per unit at its default value.
Just below those options is a button labeled "Sprite Editor". Click this button to open the sprite editor.
In the top left corner of the sprite editor, click the button labeled "Slice".
Select type "Grid by Cell Size".
Enter pixel size X: 26, Y:36
Click the "Slice" Button
Click "Apply" in the top right corner and close the sprite editor.
EDIT: Rereading, I realize this answer does not answer your title question. Yes, you can use rectangular (and other shaped) sprites. The pixels per unit is unrelated to sprite shapes and should either left at its default value (in most cases, but not always) or set on all sprites to a common value in a tile based game.
Comment: The default value is indeed not a bad starting point, but it won't be right for all non-tile-based games. So I'd caution against advice that says to always leave it there unless you're using tiles.
Comment: Good point, I'll add a caveat


How can I resend the commerce email from the admin orders screen?

Question: Is there any way of allowing site admins to resend the default order email that commerce provides to the user after a completed order?
Answer: Since I was using the commerce email module, it was a pretty easy setup to use a rules component and then add it to my /admin/commerce/orders vbo view.
<code>{ "rules_resend_order_email_to_customer" : {
    "LABEL" : "Resend order email to customer",
    "PLUGIN" : "action set",
    "REQUIRES" : [ "variable_email" ],
    "USES VARIABLES" : { "commerce_order" : { "label" : "Commerce Order", "type" : "commerce_order" } },
    "ACTION SET" : [
      { "variable_email_mail" : {
          "to" : [ "commerce-order:mail" ],
          "variable" : "commerce_email_order_[mail_part]",
          "language" : "default"
        }
      }
    ]
  }
}
</code>
Comment: This is similar to the solution I used. I also created a custom Message type to send a separate admin order confirmation on order completion, and used a version of the code above to provide a VBO option to resend the admin order email. Came in handy on a customer site when their fulfilment house wasn't receiving the order emails and the client didn't want them to be logging in to view the orders online.
Comment: Thanks, just what I needed. Upvote.
Answer: No, there's no such functionality.
Such functionality could be implemented on top of Commerce Message (since it can save sent messages into entities, allowing them to be resent later). Will require someone to code it and submit a patch.
Comment: Thanks for following up @Bojan Zivanovic. How about a way of using vbo and rules component? I have vbo running on my admin/commerce/orders screen. Select one or more orders, choose "resend order email"...?
Comment: Yeah, that could work.
Technically, it would be generating a new email, not resending the one from checkout time, but in practice it shouldn't have a difference.

Let me know if you get stuck on any one the steps.
Comment: Cool. @Bojan Zivanovic unfortunately I am stuck on the fist step :), the component. I dont know which type of component and what to act on. Thoughts?
Comment: I managed to figure it out and posted my answer. Thanks @Bojan Zivanovic


How do I stop the toilet seat from continuously sliding to the right every time it is used?

Question: I don't know why the seat keeps moving. I slide it left and it moves to the right every time. Now I definitely see similar questions on here, but the people say they tighten it and it gets loose again. My problem is, I don't know what they're tightening and where to find it. Because I don't see any screws.
Comment: Edit your post to add photos of where the seat connects to the toilet, top and bottom.
Comment: Hold your left hand on the top of your head as you are sitting down.
Comment: The heads of the screws / bolts are often concealed under covers just behind the seat itself, with the seat closed. They often just snap open to reveal the place you would apply a screwdriver. Don't over-tighten - plastic ones will break (which is good, because...) metal ones will break the toilet (much worse.) Though for the most part metal screws are *usually* paired with plastic nuts these days (less likely to either rust solid or break the toilet) but older ones may be all metal (the good ones will be brass/bronze so they don't rust. The bad ones will be a rusted mess of steel.
Answer: Standard toilets in my area tighten from below, with a thumb-turn nut located between the tank and bowl. You can only see and access the nuts from the bottom looking up.
That being said, there are many different types of toilets and this may not apply to yours.
Comment: If the bolts are REALLY loose, you may need to use a screwdriver on the heads while you hold the thumbscrews or wingnuts on the bottom. Each bolt head is usually hidden behind a plastic cover, which simply pries up from above.
Comment: In my experience the special nuts below on each side have a projecting tab which contacts a surface on the toilet preventing the nut from spinning even without a wrench. I usually use a large screwdriver on the tops of the bolts. If the bolts do need to be restrained, usually a wrench is not needed. These are often plastic bolts so don't overtighten them. These always loosen with use so expect to have to do this every so often.


Amplitude spectrum (transfer function) of signal?

Question: I have one question related to finding amplitude spectrum (transfer function) of signal knowing that output signal is time derivative of input signal. I have the answer graph but I don't understand the reason.
Answer: HINT:
If $X(j\omega)$ is the Fourier transform of a signal $x(t)$, try to remember (or look up) how $X(j\omega)$ is related to the Fourier transform of the derivative $x'(t)$.
Some people are more familiar with this in the Laplace transform domain: the time derivative corresponds to which operation in the Laplace transform domain? Replace $s$ with $j\omega$, and you'll understand the given figure.
Comment: Yep! I got it, thank you very much!
Answer: Based on what you explained, the output signal $y(t)$ is given by:
$$
y(t) = \frac{dx(t)}{dt}
$$
where x(t) is the input signal.
By transforming this problem in the Laplace domain, we can re-express the above equation as:
$$
Y(s) = sX(s) - x(0^{-})
$$
If we know that $x(0^{-})=0$, then this can be simplified as $Y(s) = sX(s)$. Using this expression we can now obtain the transfer function of our system in the Laplace domain $H(s)$ as:
$$
H(s) = \frac{Y(s)}{X(s)} = s
$$
In the Fourier domain, we can replace $s=j\omega$, such that:
$$
H(j\omega) = \frac{Y(j\omega)}{X(j\omega)} = j\omega
$$
Then we can find the amplitude of $H(j\omega)$, which is equal to:
$$
|H(j\omega)| = |j\omega| = |\omega|
$$
You can also express this in terms of linear frequency $f$ (in terms of Hz), where the angular frequency $\omega$ is related to linear frequency by $\omega = 2\pi f$. This gives us:
$$
|H(f)| = 2\pi |f|
$$
If you simulate this, you will get the following plot, which is the same as the one you posted.


Music and Fourier Transform

Question: I posted this question on MathStackExchange. My question is in here now: How can I program a Fourier Tranform of a plot without knowing the function that generates the plot, assuming the funcion is of the form
$$\sum_{n}\sin(2\pi n)?$$
As I said in my earlier post: This is an unrigorous project. Don't worry about real-world application or what would be the fastest way. I'm just very curious how one could program such a Transform in Mathematica.
Comment: @vitamind To be frank, that would only be interesting as an exercise for you, but nobody in their right mind will go re-implementing the FFT algorithm, when perfectly good standard implementations exist. In fact, I suspect that even the one in Mathematica probably relies on an underlying fast optimized library of some kind. To see how `Fourier` works, search Fourier transform on this website and you will find a ton of answers. FFT is a topic that comes up often.
Comment: So, how would you get the function? As a list of values? In other words, in what physical form should we expect the input of your Fourier transform?
Comment: What if I play an A4 note on my piano, without backgroundnoises, and record it?
Comment: Use the command Fourier. It takes a list (like your sampled piano) and calculates the spectrum.
Comment: How does this command work? What are is the idea behind it? Can I program "my own" easy Fourier comman?
Comment: It's called the FFT (Fast Fourier Transform). https://en.wikipedia.org/wiki/Fast_Fourier_transform
Comment: Could you help me program a FFT of a wave, without using the command Fourier?
Answer: Here is the slow Fourier transform... call it the SFT... it's basically the same as the FFT, but slower. On the positive side, it's not hard to program. Let x be the list that you want to take the transform of. The formula implemented is:

where N is the length of x. In Mathematica, this is:
<code> X[k_] :=  Sum[x[[n + 1]] Exp[-I 2 Pi k n/Length[x]], {n, 0, Length[x] - 1}]
</code>
You can evaluate this for all n terms using
<code>X[#] & /@ Range[Length[x]]
</code>
OK. It's not really called the Slow Fourier Transform. It's called the "Discrete Fourier Transform," or DFT. MarcoB already thinks I'm not in my right mind, so I better stop here.
Comment: Time for you to do something. Take a lot of samples of your function, call them x, then the transform will be X as defined above.
Comment: I understand the mathematical computation now. Thank you very much. I will come back to inform you if I was able to program it.
Comment: Okay I did it. Only one small question: What's the command to find a function-value of a plot? So I only I have plot, I put in $2$ and then I get the value of that plot at $2$.
Comment: @bills Hehe. I like the Slow Fourier Transform though :-)

Music and Fourier Transform