Known vulnerabilities for when a guest executes a stored procedure on SQL Server

Question: I have a production database with crucial business information. Meanwhile, my company is involved in a project with some other company and we have to exchange some information on a regular basis. How secure is it if I let the other company's IT department execute stored procedures on our database server? They would have to know the database name, address, procedure name and of course I could set them a new login. My worries are, are there "easy" ways of bypassing security and accessing other data in the database?
Comment: @RBarryYoung, how would "providing DB copy/backup" will help OP when some one is concern about the unauthorized data access?
Comment: Is the need for this data temporary for the duration of the project, or permanent?
Comment: Why don't you just give them a copy of your database?
Comment: @AnupShah  Oops, you are right, I misread the question.
Answer: I would first question why they need direct access to the database. You might ask your manager or legal department if the security policy for the company allows granting this type of access. Is it really needed if they are just going to execute a stored procedure on a regular basis.
As you stated this is going to be on a regular basis I would setup an SSIS package to export the information to a file. Then either have the package email the file (if not to large) or put it on a UNC directory for them to come and download themselves. If they want to determine when the data is pulled down setup a script for them to execute outside of SQL Server that simply runs the package.
Comment: Hi there...direct access is needed because there are going to be some data transactions from our database to theirs and vice versa. The data will be 50-100 thousand rows which needs to be updated and/or inserted.
Comment: Unless it requires manual intervention SSIS package can take care of that for them.
Answer: I have been to in this situations before where for a small  projects (yet for good amount of period) we need to work with some out sourced team and we also need to make sure the client data is safe. for every day work we can not keep an eye on who is accessing what.
on the other side we also want to make sure they can access information they really need as smoothly as possible. in this cases, I would suggest to create specific USER_ROLE and assign appropriate permissions to that role. not only that also Deny the Other permissions explicitly. Add the specific/needed user from that team as member of this role. of course you will make sure that the Role doesn't have any sysadmin/serveradmin/dbowner/securityAdmin/BackupCreator etc... kind of permissions.
a single person can manage the adding or updating the permissions on db objects as needed/requested.
Granting/revoking/Denying permissions on different objects can be manged by automated scripts to reduce daily overhead.
by this way at least your team will be aware of what has been given access to at any point in time.
Comment: That's a nice thought but there is one thing though...When I give the other party access I don't want them to see the db or any tables listed in the db. They should login to the db via remote connection file (that isn't a problem which i set up) and pull info I granted to pull. Because there are tables which change every few minutes I cant generate on every change a new VIEW of 200.000 rows
Comment: I didn't get this point. Why would you change/create new view for every update/insert in same table. When you said the Table is changing every few minutes, you mean there are insert/update/deletes happening on that table. lets say you created Role "RemoteUser". GRANT SELECT/INSERT/UPDATE/DELETE ON "Table1" TO "Anup". Now When I am login-in with as remote user and try to Access "Table1" I can access it all time. I am not restricted to selected rows. When any new Objects Gets Created/Dropped then I need to make sure the remote user "Anup" gets right permission if he supposed to see that.


Windows 7, doesn't start up at times and/or is very slow to start

Question: I have a older system, Asus P5N (MB) Intel core 2 6600, 32 bit (OS) 4.00 GB RAM. The problem is ever since I changed from windows XP to 7. at times it will not start up at all, the fans all start but the screen is black. If I push the reset button I'll hear the little beep sound my system make and then it will start, other times it starts real slow and I get the BSOD. (blue screen of death)that say windows failed to start. After using the computer it freezes on shutdown, it gets to the screen that says windows is shutting down with the little circle that is rotating and it just stops, i have to shut it down by killing the power.
Comment: The BSOD should have a STOP number that you should include with your question.
Comment: Please provide more information.
Answer: If your system doesn't even get to the BIOS screen when you power it on sometimes, that's not caused by the installation of Windows 7.  Typically the cause of that is an overheating CPU, bad RAM, a bad power supply, a bad expansion card, or possibly but less likely a bad peripheral such as a USB device or hard disk.
Based on the rest of what you say, I would try to eliminate hardware issues as the culprit first:

Download/burn a Memtest 86 iso and run it for 24 hours, see if it reports memory errors.  If it does, replace your RAM.  You may also try installing 1 stick of RAM if you have multiple sticks of RAM.
Reset BIOS to defaults.  Find and apply any BIOS updates if possible.
Try booting system with no expansion/graphics cards and no other devices except main hard drive and onboard graphics only (if the motherboard has onboard graphics).
Dust out CPU and make sure the system is well ventilated.
Answer: If you have a spare copy around, run SpinRite (www.grc.com/spinrite.htm), which may easily discard any Hard Drive issues and serve for maintenance purposes as well if nothing critical is detected.
Answer: There are many types of blue screens.
If there is an error in the blue screen with this sentence:

dumping physical memory to disk

it is a problem in your RAM. To solve this problem, change your RAM.


How Walking meditation happen

Question: Without any thought automatically start the walking and it's last for 15 minutes. How it's related to meditation.
Comment: Can you add some more details? What lasts for 15 minutes? And what two things need to be related? Are you saying that during a walking meditation session, you were absent from thought for 15 minutes? You might also be asking how the walking meditation did this? Please add some more information so that you can encourage good quality answers.
Answer: There are four meditation postures: walking, standing, sitting and lying down. Walking is beneficial:

AN5.29:1.1: "Mendicants, there are five benefits of walking meditation.
AN5.29:1.3: You get fit for traveling, fit for striving in meditation, and healthy. What's eaten, drunk, chewed, and tasted is properly digested. And immersion gained while walking lasts long.

And here are some challenges to overcome while walking:

AN4.11:1.1: "Mendicants, suppose a mendicant has a sensual, malicious, or cruel thought while walking.
AN4.11:1.2: They tolerate it and don't give it up, get rid of it, eliminate it, and obliterate it.
AN4.11:1.3: Such a mendicant is said to be 'not keen or prudent, always lazy, and lacking energy' when walking.

Here are the details of walking:

MN91:9.34: These are the thirty-two marks of a great man possessed by Master Gotama.
MN91:10.1: When he's walking he takes the first step with the right foot.
MN91:10.2: He doesn't lift his foot too far or place it too near.
MN91:10.3: He doesn't walk too slow or too fast.
MN91:10.4: He walks without knocking his knees or ankles together.
MN91:10.5: When he's walking he keeps his thighs neither too straight nor too bent, neither too tight nor too loose.
MN91:10.6: When he walks, only the lower half of his body moves, and he walks effortlessly.
MN91:10.7: When he turns to look he does so with the whole body.
MN91:10.8: He doesn't look directly up or down.
MN91:10.9: He doesn't look all around while walking, but focuses a plough's length in front. Beyond that he has unhindered knowledge and vision.
Comment: Perhaps hands clasped works better: > [Thag7.4:2.1](https://suttacentral.net/thag7.4/en/sujato#thag7.4:2.1): Arranging my robe over one shoulder
> [Thag7.4:2.2](https://suttacentral.net/thag7.4/en/sujato#thag7.4:2.2): and clasping my hands together,
> [Thag7.4:2.3](https://suttacentral.net/thag7.4/en/sujato#thag7.4:2.3): I walked alongside that stainless one,
---
In the west, wearing a bright yellow traffic vest seems to give everybody peaceful confidence as well.
Comment: So he walks with his arms hanging motionless by his sides.  I've tried that, and it affects my balance. On the plus side, people in the street seem to form a curve around me.
Answer: Walking is a bodily posture, is tied to the body.
When one's attentiveness is fixed on the theme of the body then one is developing mindfulness of the body [kayagatasati] which is a healthy perception to entertain as it is distant from unwholesome themes that give rise to worry, lust, anger & delusion and this distancing results in seclusion & jhana.
Walking is fairly immersive and one should simply feel the thoughts & sensations as one is walking, perceiving beginning & the end as one would in inhaling & exhaling for Anapanasati which is likewise a bodily theme.
Another benefit to walking meditation is that walking stirs up energy, it is difficult to fall asleep whilst walking and it might wake up one beset by sleepiness.
The only thing you change is the posture, you can still relax or contemplate as you would otherwise.

How Walking meditation happen


Add item in Azure storage queue from workflow

Question: I'm trying to add an item in a Azure storage queue from a SharePoint 2013 workflow.
I created a Dictionary named "Header" with two "rows" one with name "Authorization" and the value is: SharedKey thenameofmystorageaccount:mylongkey==
And the other row is name "x-ms-date" and value is a variable today
as body in the request I created a textstring with the value
<QueueMessage>
<MessageText>[%Current Item:ID%]</MessageText>
</QueueMessage>

then I added the Dictionary Header in the RequestHeaders properties in the Properties for the HTTP request.
But there has to be something wring with my header because I just gets an "Forbidden" as Response code back from the call
Any Ideas?
Answer: Most likely it is a cross origin (CORS) issue. Azure storage now supports setting CORS rules where your can authorize your SharePoint domain. Search on Set-AzureStorageCORSRules.


Finding the radius of convergence of Laurent series

Question: I have this problem I want to solve: Find the radius of convergence of the power series of the function $\frac{1}{z^2+z+1}$ around $z=1$.
I tried obtaining the derivatives but I could not simplify anything.
I thought maybe I have to use the geometric series but I don't know how.
Comment: If all you want is the radius of convergence around 0, say, it will be at the first singularity, i.e. smallest zero of the denominator.  If you want the series, decompose $z^2+z+1$ using partial fractions and expand the result as geometric series.
Comment: sorry I forgot to add I want it around z=1
Comment: Same would apply as to the radius of convergence.  The series will converge up to $(-1\pm\sqrt{3})/2$
Answer: $(z^2 + z + 1) = (z-\phi)(z-\phi')$
$\frac {1}{z^2 + z + 1} = \frac {1}{(z-\phi)(z-\phi')}  = A(\frac {1}{z-\phi} - \frac {1}{z-\phi'})$
$A = \frac {1}{\phi - \phi'}$  Not that it really matters in the radius of convergence.
$\frac {1}{z-\phi} = \frac {1}{(z-1) + 1 - \phi} = (\frac 1{\phi-1})\left(\frac {1}{1 - \frac {z-1}{\phi-1}}\right) = \frac 1{\phi-1} \sum_\limits{n=0}^\infty \left(\frac {z-1}{\phi-1}\right)^n$
and that series converges when $|z-1|<|\phi-1|$
But that is a Taylor series and not a Laurent series.
$\frac {1}{z-\phi} = (\frac 1{z-1})\left(\frac {1}{1 - \frac {\phi-1}{z-1}}\right) = \frac {1}{\phi-1}\sum_\limits{n=1}^\infty \left(\frac {\phi-1}{z-1}\right)^n$
is a Laurent series.
Which converges when $|z-1| > |\phi - 1|$
All that is left is to find $\phi,\phi'$
$\phi = \frac 12 + \frac {\sqrt 3}2i$
$\phi' = \frac 12 - \frac {\sqrt 3}2i$


Why boundary conditions in Sturm-Liouville problem are homogeneous?

Question: Boundary conditions in Sturm-Liouville problem looks like this:
$$
\alpha_1 y(a)+\alpha_2 y'(a)=0
$$
$$
\beta_1y(b)+\beta_2 y'(b)=0
$$
The ordinary boundary conditions for boundary-value problem looks:
$$
\alpha_1 y(a)+\alpha_2 y'(a)=\gamma_1
$$
$$
\beta_1y(b)+\beta_2 y'(b)=\gamma_2
$$
Why in Sturm-Liouville conditions $\gamma_1$ and $\gamma_2$ both zeros? Does it have some hidden (or physical) sense?
Answer: If you want a solution with $\gamma_1\ne 0$ and/or $\gamma_2\ne 0$, then you can subtract a function from your solution that satisfies the non-zero endpoint conditions, and you have effectively converted the problem to an inhomogeneous problem with homogeneous endpoint conditions, which can be solved using separation of variables.
Comment: Thanks a lot for answer, but I am mostly interested in the origin of zero conditions, in fact why in Sturm-Liouville problem we have $\gamma_1 = \gamma_2 = 0$
Comment: @danielleontiev : Everything started with Fourier. He invented separation of variables, and used it to solve heat problems. He also created the Heat Equation. Homogeneous conditions of the type you have stated would be applied to the end of a wire where the radiation of heat would be proportional to the temperature. A non-homogeneous term would represent a source of some type.
Answer: Methods of linear algebra may be brought to bear on vector spaces. The space of solutions satisfying homogeneous boundary conditions is a vector space, whereas the space of solutions satisfying inhomogeneous conditions is only an affine space. Moreover, there is an easy way to translate the homogeneous vector space into the affine space: by translation!


What is the x-bar tree of 'I am proud of my students'? (having trouble with proud)

Question: I am having trouble attaching the 'proud' to the 'am'. 'Am' is a verb and 'proud' is an adjective for the noun 'I', so should come as an adjunct for 'I', but here it would have to somehow come from the verb? After that, attaching the preposition 'of' and 'my students' is fine.
Comment: The copula complement is usually the constituent-structural complement of the VP headed by the copula.
Comment: It's not an adjunct. The AdjP "proud of my students" is a subjective predicative complement of the verb "be" in its ascriptive sense. It ascribes the property of being proud ... to the referent of "I".
Comment: Which theory/model of syntax are you working with? Saying x-bar is not specific enough.
Answer: (Disclaimer: I am not a specialist in Syntax)
According to the X-bar Theory, Adjectives, as any other lexical category, undergo three different levels of projection. They can have Complements (which are sisters to the head), Specifiers (or Subjects, i.e. sisters to Adj′) and Adjuncts (sisters to AdjP). Semantically speaking, the complement of an adjective is usually a Prepositional Phrase that is necessarily required for completing the meaning of the adjective. Thus, if you say proud, you have to mention the reason of the pride, which constitutes the complement of this adjective. Syntactically, proud of my students is a constituent made of an adjectival head and a prepositional complement selected by the head:

For the internal structure of the PP the usual analysis applies.


Angular Momentum vs Moment of Inertia

Question: Pretty sure that this question has already been answered in this site, but I cannot find it. Anyway, here's the question: What is the difference between angular momentum and moment of inertia?
Comment: I won't be surprised if this question is marked as duplicate, but I just need a link to the question.
Answer: Angular momentum is the "moment of momentum", meaning it gives us an idea of how far is the linear momentum vector applied at. Torques involve the moment arm of a force, and angular momentum involves the moment arm of momentum.
Particle Mechanics
Take a single particle moving in a straight line (in the absence of external forces). It has mass $m_i$, it is located at vector $\boldsymbol{r}_i$ with velocity vector $\boldsymbol{v}_i$. This sets us up for the following definitions

Linear Momentum of particle, $$ \boldsymbol{p}_i = m_i \boldsymbol{v}_i $$
Angular Momentum about the origin, $$ \boldsymbol{L}_i = \boldsymbol{r}_i \times \boldsymbol{p}_i $$

The above is sufficient to recover the location of the path line, at least the point on the path of the particle closest to the origin.
$$ \boldsymbol{r}_{\rm path} = \frac{ \boldsymbol{p}_i \times \boldsymbol{L}_i }{ \| \boldsymbol{p}_i \|^2} $$
You can easily prove this if you show that $\boldsymbol{L}_i = \boldsymbol{r}_{\rm path} \times \boldsymbol{p}$, which you do with vector triple product identity $\boldsymbol a\times( \boldsymbol b \times \boldsymbol c) = \boldsymbol b (\boldsymbol a \cdot \boldsymbol c) - \boldsymbol c ( \boldsymbol a \cdot \boldsymbol b)$.

So in summary, Angular momentum describes the (permendicular) distance where linear momentum acts. The conservation of angular momentum law means that not only linear momentum as a vector is conserved, but also the location of this vector (or the line in space the vector acts through) is conserved.
Rigid Body Mechanics
When you extend the above to multiple particles clumped together as a rigid body the concept of moment of inertia arises. First off, Charles's theorem state that for all the distances to be maintained, each particle can only move with a combination of translation and rotation (with vector $\boldsymbol{\omega}$) about a common axis. Commonly the center of mass is used as a reference point, and so the motion of each particle in the body is restricted to $\boldsymbol{v}_i = \boldsymbol{v}_{\rm com} + \boldsymbol{\omega} \times  \boldsymbol{r}_i$.
Commonly the motion is decomposed to the translation of the center of mass, and the rotation about the center of mass. This yields the following relationships

Linear Momentum of rigid body, $$\boldsymbol{p} = \sum \limits_i m_i \boldsymbol{v}_i = m \boldsymbol{v}_{\rm com}$$
Angular Momentum about center of mass, $$\boldsymbol{L}_{\rm com} = \sum \limits_i \boldsymbol{r}_i \times m_i \boldsymbol{v}_i = \sum \limits_i m_i \boldsymbol{r}_i \times ( \boldsymbol{\omega} \times \boldsymbol{r}_i ) $$

Mass moment of inertia
In order to understand angular momentum of a rigid body rotating about the center of mass better, it is common to separate the geometry parts from the motion parts
$$ \boldsymbol{L}_{\rm com} = \underbrace{ \mathrm{I}_{\rm com} }_{\text{geometry}} \;\;\underbrace{ \boldsymbol{\omega}}_{\text{motion}} $$ where
$$ \mathrm{I}_{\rm com} = \sum_i (-m_i [\boldsymbol{r}_i \times][\boldsymbol{r}_i \times]) = \sum_i m_i \left| \matrix{ y^2+z^2 & - x y & - x z \\ - x y & x^2+z^2 & -y z \\ -x z & -y z & x^2+y^2} \right| $$
This is the mass moment of inertia tensor. It is the rotational equivalent to mass, since $\boldsymbol{p} = m \boldsymbol{v}_{\rm com}$ and $\boldsymbol{L}_{\rm com} = \mathrm{I}_{\rm com} \boldsymbol{\omega}$ have a similar form.

So, mass moment of inertia describes how far away from the rotation axis is the mass distributed at. It conveys the geometry information of angular momentum. So if a known mass moment of inertia about an axis $I$ is described by $I = m r ^2$, it means the geometry of the problem is similar to that of a mass ring with radius $r$.

More details in this similar answer.
Comment: Thank you so much! But can you please explain the mass moment of inertia tensor? I don't really get it.
Comment: A tensor (or matrix) is multiple values combined into one quantity. Mass is a scalar quantity, but the mass moment of inertia is not. Push an object along various directions and you will feel the same mass regardless. Try to rotate a body about various directions and the inertial resistance you feel varies. This is expressed by the 3×3 symmetric inertia tensor $$\mathrm{I} = \left| \matrix{ I_{xx} & I_{xy} & I_{xz} \\ I_{xy} & I_{yy} & I_{yz} \\ I_{xz} & I_{yz} & I_{zz} } \right| $$
Answer: Eventhough @ja72 contribuited with his answer analysing the physics of rotational physics, I would like to contribuite a bit in a more mathematical sense between the concept of moment of inertia and the mathematical object called tensor.
Actually, the moment of inertial is the "freshman" encounter with tensors, because it's appearence is natural in Newtonian Physics.
It's well-known that the relationship between the angular momentum $\vec{L}$ of a particle and the angular velocity $\vec{\omega}$ is then a linear relationship:
$$ \vec{L} = \mathcal{I} \vec{\omega} \tag{1}$$
But this case is a particular case when the rotational  system do not have the contribuition of moment of inertia from other directions. Physically speaking this system can rotate only around $z$-axis ($\hat{k}$ direction) or $y$-axis ($\hat{j}$ direction) or $x$-axis ($\hat{i}$ direction) and also rotating around a direction of a vector $\vec{v} = x\hat{i} + y\hat{j} + z\hat{k}$

But in a arbitrary rotational motion, the contribuition of the moment of inertial of other axis will be appreciable and then the linear relationship $(1)$ have no meaning.
Instead the relationship is performed by another kind of physical quantity called Inertia Tensor:
$$ \mathfrak{I} = \sum^{3}_{i=1}\sum^{3}_{i=1} I^{ij} \vec{e}_{i}\otimes\vec{e}_{j} \tag{2}$$
Where components $I^{ij}$, are called components of inertia tensor. These components have a matrix representation called Inertia matrix or (unfortunately) Inertia Tensor:
$$ I^{ij} = \sum^{3}_{i=1}\sum^{3}_{j=1} m[\delta^{ij} \mid\mid \vec{r}\mid\mid^{2} - r^{i}r^{j}] \tag{3}$$
The whole object $(2)$ is the real inertia tensor and tensors (in this case of rank 2) are objects which lies on a vector space called Tensor Product $V\otimes W$ (please keep this for all your academic life: the best (rapid) answer to the question "what is a tensor?", is "it's a element of tensor product".
Then, when we apply the tensor on angular velocity vectors, we get the vector called angular momentum:
$$ \vec{L} = \mathfrak{I}(\vec{\omega}) \tag{4}$$
$---------------------$
Observation:
In fact there's a minor technical (but crucial point) consideration on $(4)$: to perform a linear transformation like $(4)$, we have to define the object which have tensor components $I^{i}\hspace{0.3mm}_{j}$, i.e., an mixed tensor:
$$ \mathfrak{I} = \sum^{3}_{i=1}\sum^{3}_{j=1} I^{i}\hspace{0.3mm}_{j} \vec{e}_{i}\otimes\vec{e}^{j} \tag{5}$$
And then (in component form) we perfom a operation called contraction, which result the components of angular momentum vector:
$$L^{i} = \sum^{3}_{j=1}I^{i}\hspace{0.3mm}_{j} \omega^{j} \tag{6}$$
$$ * * * $$
Some references (For Tensors):
$[1]$ Steven Romam's Advanced Linear Algebra
$[2]$ Joshi's * Matrices and Tensors in Physics *
$[3]$ McMahon's Relativity Demystified
$[4]$ Lang's Linear Algebra
Answer: The moment of inertia is a measure of how a mass of a rotating body is distributed about the axis of rotation, and its symbol is $I$. The angular momentum is the mass times the cross product of the vectors $r$ and $v$, or the product of the moment of inertia and the angular velocity $\omega$. Its symbol is L.
Comment: Actually, Michael, the moment of inertia is a measure of how difficult it is to produce angular acceleration in a rotating body that is given a specified torque.  Angular momentum is the rotating equivalent of linear momentum.  For linear momentum, $p=mv$.  The rotational equivalent of mass is $I$ and the rotational equivalent of velocity is $\omega$, so angular momentum is given by $L=I\omega$.

Angular Momentum vs Moment of Inertia


Visual studio winForms bug

Question: When i write my programs in Visual Studio (2008), they run perfeclty at my computer: program's objects are placed as i did it in designer. But when i run programs on other computers, some objects are placed wrong by few pixels: they touch other object. I suppose it is due to my monitor's resolution (1680x1050). I find that I can use TableLayoutPanel. Any other ideas to solve my problem? Thank you.
Answer: Why don't you set the size of your application's window to a desire resolution and see how it is rendered. This should render the GUI as if the application was running in those resolutions.
Another thing you may check is for how the size of the columns/rows on TableLayoutPanel are defined. You can set their size as a relative or absolute size. If you set it to an absolute size the objects should appear always on the same place.
Answer: I suggest you write a test application with as few controls possible where you can reproduce the issue.
Then, come back here to SO and describe exactly what situation you have

which controls show that behaviour?
does it only occur with TableLayoutPanel, or with other Panels, or without any Panel?
does it only occur when the user changes the form's size?

Please post some code or screenshots.

Visual studio winForms bug


Why does OS X use swap memory when memory pressure remains low?

Question: My system (Yosemite / 10.10) has been paging out to swap memory despite my memory pressure reading less than 50% over the last 7 days (tracked with iStat Menus). How is this possible? It would be one thing if memory pressure exceeded 100% at some point in the last week and then the swap file was activated, but that doesn't seem to have happened at all and yet I've got 1.25 GB of 2.00 GB being swapped right now, with 36% memory pressure. Shouldn't the new memory model introduced in Mavericks behave differently?
Comment: see if this helps - http://apple.stackexchange.com/questions/107126/what-scale-or-measure-does-mavericks-memory-pressure-adhere-to
Comment: Lots of good answers and details on [this thread about memory pressure](https://apple.stackexchange.com/questions/107126/). I'd focus on optimizing for pressure and not swap allocation. 2 GB of swap comes quite easily from leaky code and as long as it doesn't impact your storage, why do the hard work to locate and find those leaks?
Answer: This is one of the all-too-few times where the answer is officially documented by Apple.
The short answer is that the system tries to keep a certain amount of memory free so it can quickly provide memory to an application when the application requests it. When there is not enough free memory, then memory that has not been "touched" in a while gets swapped out. Often this is memory that the application "leaked", which is to say allocated, used for a while (maybe just once), and will never use again, but forgot to tell the OS it was done with.
In Yosemite and other versions of OS X, SystemUIServer was notorious for leaking lots of memory. This would be a prime candidate for getting swapped out, because it was not needed by the app, but could not be reclaimed by the OS. Swapping this memory out to disk is all upside for performance; the only downside is a relatively tiny amount of disk space used.


Running Wire in Updated Kitchen and Living Room

Question: I'm trying to plan out how to run the wire for my electrical outlets.  I thought I could save wire by branching my hot wire in two different directions.  Is this code?  Is there a drawback?  I would make sure there was enough room in the box.
Comment: You can branch a circuit, that is not against code in itself, but what circuits you branch, what they load to, etc. is. If you are rewiring, and you are not working with an electrician, your best bet is to read the NEC because there are a lot of rules to cover far beyond branching. As far as drawbacks, it is simple, the fewer breakers you run, the fewer independent lines you run, the more frustrating it is in the future when you "need" to branch off of or repair, an exisitng circuit, or you blow a breaker. There are sizing guidelines to follow to help in this area.
Answer: Electrical wiring must be in a "tree" topology for cables.  Most of the time it is in more of a vine topology, but that is a kind of tree. That is, you can split off branches anywhere that is inside a junction box.  You would then have 1 supply wire and 2+ onward wires for each of hot, neutral, and ground.  Since it's in a junction box, you could put a receptacle or switch there and join its hot and neutral also.
What you're not allowed to do is loop cables back onto other cables: branches of the tree cannot rejoin.  AC power actually kicks out very strong EMFs.  If power went out one branch and came back another, it would throw EMF all around the circle, which would be a serious problem that can cause vibration and inductive heating. But if all the wires in a cable add up to equal and opposite current, the EMFs cancel each other out.  A tree layout for cables ensures that.
Following up on that same rule, every hot needs to return current on a neutral or other wire in that same cable.  So when you branch hot, also branch neutral and ground  as well.  It is less critical for ground to be in a strict tree layout, since current only flows on ground during fault conditions.
Lastly, every branch must be inside a junction box, and those cannot be buried where you would need tools or disassemble the house to access the junction box cover.


Sum of $\frac{1}{1 \cdot 2} + \frac{1}{3\cdot 4} + \cdots$

Question: I am practicing for the GRE, and came across the following question: Find the sum
$$
\frac{1}{1 \cdot 2} + \frac{1}{3\cdot 4} + \frac{1}{5\cdot 6}\cdots.
$$
The answer is given to be $\log(2)$, with the hint: "Apply partial fractions to each term and then recognize the series for $\log(1 + x)$ or estimate." I have no idea what partial fractions means in this context, and have tried without success to manipulate this sum by pulling out terms to get it into a familiar form. Any help is appreciated.
Comment: You're summing terms of the form
$$\frac{1}{2k(k-1)},$$
which has partial fraction decomposition
$$\frac{1}{2k-1} - \frac{1}{2k}.$$
Thus the series is....
Comment: Hint: Taylor series for $$log(1+x) =x-\frac{x^2}{2}+\frac{x^3}{3}-\frac{x^4}{4}+...$$, find x that match the above sequence
Answer: We have that
$$\sum_{k=1}^n\frac1{(2k-1)2k}=\sum_{k=1}^n \left(\frac1{2k-1}-\frac1{2k} \right)=1-\frac12+\frac13-\frac14+\ldots=\sum_{k=1}^n (-1)^{k+1}\frac1k$$
then refer to the Alternating harmonic series and the related Sum of the alternating harmonic series $\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{k} = \frac{1}{1} - \frac{1}{2} + \cdots $.
Answer: You have to know two things to solve this problem.
First how to change your fractions to difference of fractions.
For example: $$ \frac {1}{(4)(5)}=1/4-1/5 $$
Second , you need to know $$1-1/2+1/3-1/4+... = \ln (2) $$


getting java package names

Question: I have a java program which searches for files in a directory and returns names matching Test______.java, but i would want to find the package name for each of these java files.How can i do this?
Answer: The easiest way is to open each file and parse out the package com.foo.bar statement, wherever you find it.
Answer: It sounds like you're not actually loading these files into your current JVM class loader?  If you are, you can use introspection.
If not, you'll need to open the files using a FileInputStream, then use a BufferedInputStreamReader to read the file line by line and search for the package statement.

getting java package names


Does the constraint equations written for pulley mass system can be any coordinate system other than rectangular

Question:

This is an example problem from the book vector mechanics for engineers. I had a doubt that how the position vectors for A and position vector B relative to A defined. That is the equation which is rounded in yellow in the second picture, there we should write the vertical component of of B/A and add it to position vector A. But we are adding magnitudes of lengths of vectors to obtain the length of wire. It is confusing. Please help
Answer: In general you are right. It's not possible to casually add position vectors in different coordinate systems.
However in this case it is possible, because of the context. In order to help you understand it more intuitively, it might help you are considering that the constrain equation describes the length of the rope. And the values $x_A$ and $x_{B|A}$ are not vectors but they are scalar coordinates of the position vectors. The fact that the  coordinate systems are selected in such a way that the rope is parallel, means that it is possible to use those coordinates directly in the constraint equation.
Comment: So after differentiation we get velocities which will be magnitudes of the velocity vectors without the direction. Now I understand thank you.
Comment: Again in this particular occassion (because the coordinates systems were selected smartly), the velocity magnitude that is calculated  can be associated with the coordinate systems. E.g. you see that $v_A = 2\cdot v_{B|A}$


Equivalent of Fresnel law for determining transmitted/diffuse split

Question: I understand that Fresnel tells us what percentage of light reflects vs refracts, but what law tells me the  percentage of refracted light that is transmitted versus the percentage of refracted light that is scattered back out as diffuse?
Comment: Do you mean subsurface scattering?
Answer: Physically, the origin of diffuse light is subsurface scattering, which happens continuously as light travels through a material. So, the proportion of transmitted light depends on the thickness of the object.
There's no precise equivalent to the Fresnel law, but maybe the closest thing is the Beer–Lambert law. It states that the transmitted light falls off exponentially with distance, proportional to $e^{-\sigma x}$, where $x$ is the distance the light has traveled through the material and $\sigma$ is the extinction coefficient (with units of inverse length). The non-transmitted portion of the light may be partly absorbed, and partly scattered through the material.
You get the appearance of "diffuse" when typical length scale of scattering is smaller than you can see ($1/\sigma \ll  1\text{ pixel}$). Then the light gets scattered so many times in such a short distance that by the time it comes back out, its distribution looks isotropic (Lambertian). The apparent diffuse color is controlled by the wavelength-dependence of the scattering and attenuation coefficients.
When the scattering length scale is larger, you get a soft appearance to the material (as in wax, marble, human skin, etc), or partial translucency.


Prime plus square equals prime

Question: Furstenberg–Sárközy's theorem states that if a set of positive integers has positive upper density, then there exists (infinitely many) pair of elements of the set, whose difference is a perfect square. Since prime numbers have zero density, this theorem does not apply to them. And I was wondering if there is a result in this direction regarding prime numbers. Explicitily - are there infinitely many pairs of prime numbers $(p,q)$ such that $p-q$ is a perfect square
Comment: Almost assuredly, and that square might be less than 246. Gerhard "See About Small Prime Gaps" Paseman, 2018.10.02.
Comment: I think, should such a result be established, that this square can be  $ 4 $. Googling "jumping champions" may be insightful.
Comment: Well, obvious, thank you, I will defend myself with saying that I am sleepy. However it is not proved for sure, as you say, so the question still has something actual to ask (with the problem most probably being quite easier).
Answer: Tao and Ziegler extended the Green-Tao theorem to the polynomial setting. As a very special case we get that any subset of the primes with positive relative density contains a difference which is a square.
https://arxiv.org/abs/math/0610050
Answer: As Joel mentions, this follows from the work of Tao and Ziegler.
Alternatively, this can be directly deduced from the density of the primes and the known bounds on the Furstenberg–Sárközy theorem. Indeed, the bounds of Pintz, Steiger, and Szemeredi from the 1980's are suffient. See:
J. Pintz, W. L. Steiger, and E. Szemeredi, On sets of natural numbers whose difference set contains no squares, J. London Math. Soc. (2) 37 (1988), 219–231
See also the even stronger bounds in the more recent work of Bloom and Maynard: https://arxiv.org/pdf/2011.13266.pdf.

Prime plus square equals prime


Using the same SSL Certificate of a Domain on different IIS Servers?

Question: We have different Web Sites on different IIS Servers belonging to the same Domain as site1.example.com, site2.example.com, site3.example.com. However, we have no idea about how to use the same certificate on different IIS Servers and Web Sites. So, which steps should we apply in order to use the certificate of example.com on different IIS Servers for these Web Sites? Could you please clarify us regarding to this issue?
Comment: Does the friendly name/Subject of the certificate match the domain name  of all the web sites?
Comment: Yes, all of them will use example.com.
Answer: You may issue different x509 certificates for every host or site.  Or, if using one certificate, subject alternative names and wildcard host names are commonly supported.
There are a great many tutorials on TLS and x509 certificates. Here is one introduces the topic: How to Use X.509 Certificates and SSL For Secure Communications
Comment: Thanks for your answer. Our certificate type is SHA2 and I am not sure if there is something we should do in order to use this SHA2 certificate on site1.example.com, site2.example.com, site3.example.com. Any idea?
Answer: There are three steps involved here:

Actually purchasing the certificate
Installing the certificate on one server
Exporting the public/private keys of the certificate for installation on additional servers

Actually purchasing the certificate
In order to secure multiple subdomains of the same domain, you have two options.

UCC (Unified Communications Certificate) certificate: UCC certificates can be used to secure multiple subdomains, but you must know which subdomains you want to secure when you purchase the certificate. When you generate the CSR (Certificate Signing Request), you will be required to enter the various subdomains as SANs (Subject Alternative Names).
Wildcard certificate: Can be cheaper or more expensive than UCC depending on how many subdomains you need to secure. You might have no choice as well if you don't yet know all the subdomains you need to secure.

Installing the certificate on one server + Exporting the public/private keys of the certificate for installation on additional servers
This is largely platform dependent if you need the actual steps, so if you do, let me know your OS and IIS version and I'll edit my answer.
Comment: Many thanks fr your answer. Actually I have no idea about the steps regarding to this issue. As we use **Wildcard certificate**, could you please add to your answer the necessary steps about installing certificate on the main server and generating key or etc. for the subdomain servers (on the same IIS and on a different IIS)? In addition to this, we would be appreciated if you indicate the tool or steps to do this. Thanks in advance.
Answer: Use the same process to import the certificate PFX into the local machine Personal/My store using the Certificates MMC on the other IIS servers, then use IIS Manager to select the certificate.
If you do not already have the certificate PFX, export it from one of the existing IIS servers that may have the certificate.
If the certificate private key is marked as "not exportable", you may use JailBreak to export the certificate.
Comment: Thanks for reply. Actually we have SHA2 type certicicate in *.cer, *.crt, *.pfx formats and we are wondering if we should import **the same file** to all of the IIS Servers or Web Sites? Or should we need an extra process i.e. generating key, etc. to the SSL certificate for each of IIS Server or Web Sites where the certificate to be exported? Any idea?
Comment: The PFX should have the public and private keys, and this would be the file that you import (yes, the same file) to all IIS servers/websites
Answer: You can use a wildcard certificate (*.example.com) and import it on a server. The same can be said for a certificate with different subject alternate names. For simplicity, a pfx-type of certificate is the easiest. You can import this certificate on all servers and use it.


Must Matter Particles Have A Hard Edge?

Question: It's my understanding that electrons are particles, and it's also my understanding that their location while orbiting an atom cannot be determined precisely and must be determined by statistics and probability, almost like electrons can be in multiple places at the same time. That made me think, hmm, could electrons exist more as smears instead of hard-edged particles?  A smear can be in more than one place at a time. The only difference is a smear doesn't have a hard edge like a spherical particle would. It would sort of "blend" matter and space. I'm also wondering if perhaps smears would demonstrate wavelike properties that hard-edged particles can't. Is there any knowledge out there that states that matter particles either must have a hard edge or can't have a hard edge?
Comment: Related: http://physics.stackexchange.com/q/24001/2451 , http://physics.stackexchange.com/q/41676/2451 , http://physics.stackexchange.com/q/119732/2451 and links therein.
Comment: It actually _is_ smeared out, until it must interact (i.e. transmit a force)!
Comment: Thank you for this wonderful question, by the way. The answers generated are terrific and really cover the topic from all angles. Welcome to Physics.SE!
Answer: This is one of the key results of quantum field theory: particles are not single points, they are disturbances in quantum fields that are spread out over space. Typically the disturbance is not spread out very much, otherwise it looks more like what we know as a wave than a particle. The technical term for what you're calling a "smear" is a wavepacket.
Answer: In fact any object with non-zero physical extent is required to be deformable by relativity (but see below); otherwise pushing on it can transmit energy and information faster than light. And quantum mechanics rules at those scales so everything does have fuzzy edges. At the scale of the very small there are no sharply defined objects.
A consequence of this is that all fundamental particles are required to be dimensionless.
Alas, this introduces endless singularities into the math, so the plan is to find a theory which can combine relativity and quantum mechanics at the very small scale in a way to both preserves locality and prevents all those divergences. The best product to date is string theory.
Answer: I like the way you're thinking, but I'd like to try to open your mind a bit further.
A lot of our everyday concepts are a product of the net behaviour of billions of particles following the laws of physics. For example, consider a steel ball. It has a "hard edge". What does this mean? It means another ball can be anywhere outside of the hard edge, but cannot overlap. Why is this so? Because of billions upon billions of iron and carbon atoms in a stable arrangement which will not permit this (without enormous energy input). Now imagine two balls of cotton wool. They have "fuzzy edges" and so can overlap somewhat. Why? Because their particles rearrange themselves with only minor investment of energy.
If we assume (for purposes of argument) that electrons are fundamental particles that aren't made of smaller particles, then there is nothing to give them a "hard edge" or "fuzzy edge". They certainly have an effect on the particles around them, just as Jupiter has an effect on the Earth. But just because Jupiter is a "smear" (it is made of gas) and the Earth has a hard edge, doesn't mean electrons have any physical shape at all!
The lesson here is that concepts that seem to apply to all objects in our experience, like volume, density, and shape, are not necessarily "universal" and there is no reason to expect they apply to the very particles that give rise to them!
Electrons have a position, though it's not a traditional $(x,y,z)$ co-ordinate but a set of probability distributions. This is not the shape of the electron. It is its location. Without a shape, how can we visualise what is going on in the subatomic world?
Well, let me ask you this. Does your group of friends have a shape? You could write their names in a list, or in a circle, ordered in countless ways, but there would be nothing that lets you visualise the "physical reality", except maybe a map of all their current locations. Such a map would tell you very little about the system. Even photographs of all your friends would tell you very little about them. On the other hand, learning more about the characteristics of each of the people would give you a lot more understanding of the system and how it behaves.
Although it's nice to visualise things, sometimes the fact that we can't visualise them helps prevent us from trying to apply inappropriate intuitions to them.
(To expand your mind just that little bit more: I suspect that the reason we can't seem to find a unified theory of physics is that we're not willing to let go of concepts like position and time, which makes it impossible to imagine the "particles" from which space and time arise.)
Answer: A particle does not need to have a hard edge.  It can for example, be a density function, which sort of fades to zero.
One might note that waves can intersect each other and come out as if the other wave was not there.
Particles with hard edges are more an artefact of our minds rather than 'what's really there', until we get some real evidence otherwise.  Note however, that the scattering rules would still apply if the particle is nebulous, because instead of hitting a solid wall and bouncing off, one essentially rolls up some steep hill, and roll down at a different angle.
It's just that tennis balls are easier to understand, but they might not be the correct model at femtometre-scale physics.

Must Matter Particles Have A Hard Edge?


Is the U(1) gauge theory in 2+1D dual to a U(1) or an integer XY model?

Question: The compact U(1) lattice gauge theory is described by the action
$$S_0=-\frac{1}{g^2}\sum_\square \cos\left(\sum_{l\in\partial \square}A_l\right),$$
where the gauge connection $A_l\in$U(1) is defined on the link $l$. I was told that this theory in 2+1D spacetime is dual to a U(1) XY model on the dual lattice, described by the following action
$$S_1=-\chi\sum_l \cos\left(\sum_{i\in\partial l}\theta_i\right)-K\sum_i\cos(\theta_i),$$
where the XY variable $\theta_i\in$U(1) is defined on the dual site $i$. It was said that the K term in the action is to take into account the instanton effect in the compact U(1) lattice gauge theory (which I don't understand). However when I tried to derive the the dual theory, I arrived at the following integer XY model (or height model?)
$$S_2=-\chi\sum_l \cos\left(\sum_{i\in\partial l}m_i\right),$$
with the integer variable $m_i\in\mathbb{Z}$ defined on the dual site $i$. Because the Pontryagin dual group of U(1) is simply $\mathbb{Z}$ but not U(1), so I believe that the U(1) gauge theory $S_0$ should dual to an integer XY model $S_2$, and this duality is exact. But every book or paper that I have encountered did not mention anything about $S_2$, instead they all point to the U(1) XY model $S_1$. Therefore I was forced to conjecture that the integer XY model is equivalent to the U(1) XY model with additional K term. Can anyone tell me if my conjecture is correct or not? How to go from $S_2$ to $S_1$ (or maybe directly from $S_0$ to $S_1$)? How is the K term being added? What is the physical meaning of the K term?
Comment: Very interesting question. Could you briefly comment on how you derived $S_2$ from $S_0$, and how $\chi$ and $m_i$ are related to $g$ and $A_l$?
Comment: Could you elaborate on the derivation of S2?
Answer: Let't me give it a shot. One possible explanation is to imagine we soften the integer condition for $m$'s in $S_{2}$. Then, the cosine term in $S_{1}$ is what we want to add because when $K$ is large, it enforce the integer condition and go back to $S_{2}$.
Answer: It is dual to a model of integer spins on the dual lattice sites.  See for instance Savit.  The duality is between continuous compact variables and discrete integer variables.  The dual partition function is
$$
Z = \sum_{\{m \} } \prod_{x^{*}, \mu} I_{m - m'}\left( \beta \right)
$$
Where the product is over dual links (plaquettes of the original lattice) and the $m$s live on the dual sites.  the difference $m - m'$ is the difference between integer values at adjacent dual sites.  $\beta = 1/g^2$ and the sum is an unconstrainted sum over the integers at each dual site.
To derive this expand the Boltzmann weight in a Fourier series and integrate out the gauge fields.  Then solve the constraint on the integer variables associated with the plaquettes of the original lattice.


What language to use in Georgia (the country)? Is English widely spoken?

Question: I don't speak Georgian. I have been told not to use the little Russian that I know because it might be problematic considering the edgy relationship with Russia. My question is which language should I use in my day-to-day interactions with people like in restaurants and taxis and all?
And do you know any free website or videos that can teach me any Georgian?
Answer: If you know Russian, use it. Despite the political situation, Georgians are smart and open minded. They may not like the Russian government but they love Russian people and they love the Russian language.
I'm pretty convinced after seven months in Georgia that people learn Russian there for just the same reason foreigners everywhere learn English: it's cool and it's useful.
English is spoken, but I wouldn't say "widely". It's spoken by people aged in their 20s and younger, moreso if they're in a big city and moreso depending on their level of education.
In 2010 the Georgian government made a big push for the country to learn English and has been recruiting thousands of native English speakers, mostly from USA, with the goal of having at least one English teacher in every village.
The result is that young kids speak Georgian, a few English words and phrases they've learned at school, and a few Russian words and phrases they've picked up from friends and relatives. People in their teens and twenties are pretty fluent in both Russian and English with just a Georgian accent in both. People in their forties or older rarely speak any English at all but will speak fluent Russian with an accent. (People in their thirties seem to be a bit of a grey zone between the 20s and 40s age groups).
There are also a considerable number of ethnic Russians of various generations living especially in the cities in Georgia. Plenty of ethnic Armenians and Azeris as well as expats live in Georgia too and communicate between each other in Russian.

If you know some Russian, use it first. It will actually endear you to Georgians more than English at this point. Taxi drivers know Russian but no English. Restaurants aimed at rich tourists have some English speaking staff but in small authentic restaurants and dukanis only Russian (or Georgian) will be useful.
Use English when your Russian isn't good enough if the other person knows English.
Georgians are very very impressed with any foreign travellers who can speak a few words of Georgian. Especially in places few tourists go they will be particularly amazed and delighted.

You can get the basics from searching the Internet for videos. Just knowing the numbers one to ten, "hello", and "thank you" is a reasonable goal. It's much more important to learn the Georgian alphabet, which is nothing like the English or Cyrillic alphabets, and in fact not like any other alphabet. The last time I looked not many of these Internet tutorials went much beyond the basics anyway. You can buy imperfect but usable phrasebooks in Tbilisi.

Some more tips:

Being fluent in Russian won't prevent you from getting ripped off in the bazari but it will make it a bit easier to haggle. Anywhere except the bazaar prices are marked and fair and where they're not it's easy to haggle by smiling and holding up fingers (-:
If you visit the Armenian-majority cities, don't try to use Georgian. Stick to Russian or win hearts with a couple of Armenian words.
Comment: So, bottom line: learn Russian, Georgian *and* Armenian, three *entirely* different languages with three *entirely* different alphabets! ;-)
Comment: @gerrit: If you love languages it's a golden opportunity. Russian is Indo-European too and believe it or not quite a bit closer to English. Armenian is quite an outlier with much the same difficult sounds for English speakers that Georgian has. Many expats there find it more beneficial to learn Russian than Georgian. Those of us who really loved it there preferred the daunting task of learning Georgian instead (-:
Comment: @gerrit: Why not ask a version of that question on linguistics.SE?!
Comment: @Max: That would be "Inglisurad an Rusulad laparakobt?" Pronounce all "u" long as in "you" and all "a" as in "aha" - not as in "cat", all "s" should be like "ss" and never change to "z". In Georgian script it's "ინგლისურად ან რუსულად ლაპარაკობთ?".
Comment: @gerrit As I recall, most of the world's language diversity is in the Pacific and Africa. Three languages in one small-ish country isn't really all that much. For example, Equatorial Guinea is only a third of the size of Georgia but has three official languages and five recognised regional languages; Wikipedia says that more than 50 languages are spoken in Benin (which is about twice the area of Georgia). And those were just the first two countries I looked at.
Comment: I wonder if any country would score higher than Georgia if one defined some measure of "language density", measured as the "distance" between languages divided by the geographical distance within a country...
Comment: [Yes!](http://linguistics.stackexchange.com/q/2836/1254).
Comment: @gerrit: If Georgia isn't Caucasian enough or isn't linguistically diverse enough you can always man up and visit Dagestan just over the border (-;
Comment: Rather than opening in Russian, how about just learning the Georgian for "Do you speak English or Russian?"
Comment: @DavidRicherby Right, I learned as much in the past 3½ years :-)
Answer: Yes, in general, Georgians have some issues with Russians. But, at the same time, Russians are still (or perhaps, again) regularly visiting the country as tourists, so it ain't that bad.
And if it's obvious you're not Russian (for example due to your limited Russian), you won't easily be taken for one.
Russian is most certainly more widely spoken than English.
Comment: Georgians still love Russians and are still welcomed by the government and the locals. Georgians cannot get tourist visas to Russia, all Georgian imports are banned, and Georgians and other Caucasian people are subject to random violence at the hands of skinhead gangs at least in Moscow if not other cities.
Comment: @hippietrail Caucasian as in people from the Caucas mountains, or Caucasian as in non-Russians of European descent?
Comment: @AndrewGrimm: Oh sorry, people from many if not all of the Caucasian republics and former republics such as Chechnya, Dagestan, Georgia, Ingushetia. I don't know many specifics, just some horror stories I heard from Dagestanis and Ingushetians I met in Georgia backed up by a Ukrainian friend who said the same (about Caucasians, not about Ukrainians.) [Wikipedia has some information](http://en.wikipedia.org/wiki/Racism_in_Russia#Peoples_of_the_Caucasus).
Answer: Georgian is very hard to learn. It would be a great challenge for you. This is the separate language, having very little common with any other language (with exception of Svan and one other language, both spoken in Georgia). Also the alphabet is not similar to anything else, and I've learned only 2 letters of it.
When it comes to Russian, Russian is widely known in Georgia and is considered the international language, the first to try to communicate with foreigners. Some people know English, but I've not met anyone speaking English and not speaking Russian. Knowledge of Russian will be a great advantage for you. The Georgians will not take you for Russian, if you don't speak Russian really good ;)
It is a good idea to learn some words in Georgian, the Georgians are very happy when someone tries to say something in their language. It would be great if you would learn the numbers and the letters of Georgian alphabet - city names on road signs are written in both Georgian and Latin alphabet, but street names are usually in Georgian only (with a few exceptions of old Russian plates).
Comment: Actually Georgian is related to either two or three languages, depending on which authority you listen to. Svan, Mingrelian, and Laz. Some authorities consider two to be dialects of a single language. Most Laz speakers are over the Turkish border and there's few left anyway, Svan speakers are also few. Mingrelian has by far the most speakers of Georgian's sister languages.
Answer: Well, Georgians speak Georgian, English (which is becoming 2nd most-common spoken language) and Russian. Older people speak Russian and Georigan only, while the younger generation mostly speaks English and Georgian, but nowadays you can communicate with people there in the English language.


Well pump runs, but bladder tank is empty, and we have no water

Question: My water just all of a sudden stopped working the other day but when we went to check the well pump it was still running, but now he went to check the bladder tank and it is empty. HELP!
Comment: Could be a number of things.  Perhaps your water level in the well has dropped, the pipe from the pump to the house may have broken, the pump may have failed.  I'm assuming a submersible pump here vs. a jet pump.  In either case, however, you may be better off to call a well specialist.  Most well system repair require special tools and expertise.
Comment: Pictures and a system description disambiguating type/location of pump would be helpful. i.e you may have a jet pump (since you can hear it running) that has lost prime (needs to have water added so it can pump water) or your pump may have worn out so it no longer pumps. However, given how inconvenient no water is, your fastest (though often costly) approach would be to call a "well guy." But we might offer insight if we have a bit more to go on. FWIW, if you have a jet pump (not a submersible nor a simple suction pump) I STRONGLY recommend looking into a submersible if you need to replace it
Comment: A jet pump typically has TWO pipes running to the well - actually it's one to the well and one from the well. They were a product that made sense when the electric motor was the failure prone part. That has not been true for decades, and they are wasteful (power in to water pumped) and annoying (the priming foolishness.)
Answer:
Shallow Well
A centrifugal pump doesn't work when it's full of air.  Some of them can self prime with very small differences between the pump and the water level (trash pumps, typically) Normally they are 'wet' all the time.  The foot valve keeps the pipe to the pump full of water between cycles.
If the foot valve fails, then all the water in the your water system drains back into your well.  (Normally you would have a check valve on the out put of the pump too, which would at least slow this down.)
A failed foot valve is a cheap fix, although a nuisance to do.
However the foot valve may just have stuck.  You can try repriming the pump.  There is usually a bolt on the top of the pump casing you can open and fill with water.  You need to do some arithmetic to figure out how much water it will take. 1"pipe runs about 30 feet per gallon. 1.5" pipe runs about 15.  So dump 5 gallons of water (go to a neighbour) and see if the problem goes away.
If the pump is still full of water, then you have another problem.
Break the output connection, and BRIEFLY run the pump.  If you now have a gallon of water on the floor, then you know the pump works.  If it doesn't then fix the pump.  This could be simple:  The impeller is no longer attached to the shaft, or it could be that the impeller has died of old age.
Note:  If you have a pressure gage on the pump, then if it says you have pressure, you can skip the 'break the connection and make a mess' paragraph above.
If you have water at the pump, but not at the house, then verify that every valve between the pump and the pressure tank is actually open.  YOU may not have closed them.  But I can just see some 12 yr old turning off the water while a sibling is in the shower...  (I know.  I did this to my sister.  Except I turned off the hot water.)  If everything is open, then inspect the ground carefully between house and well head.  If you have a wet spot, you know where to start digging.
Water at the pump may also be true with a broken impeller.  Water is present, but no energy is being transferred to it by the impeller.  This will show as no mess/no pressure.
Deep well with jet pump.
You've got two lines now, and enough depth that there may multiple sections of pipe.

Foot valve may have failed.
One of the connections (usually hose clamps) has failed.

Pull the pipe string.
Submersible pump. (not shown on illustration)
These are usually trouble free.  Good thing.  Pain to replace.  A failed foot valve doesn't affect the supply of water, except that it can put a slug of air into the system, and,in a deep well, give you some awesome water hammer.  (Air pressure only will support a 30 odd column of water.  So without a foot valve, the water in the pipe up to the check valve will fall back into the well, leaving a pretty good vacuum behind.  When the pump next starts, you have a rapidly moving slug of water that travels  up the pipe, slaming into each corner it hits.)
Pulling the pipe.
In both of these, you need to pull up the pipe string, and see what's wrong.  Note that a deep pipe string is not light.  This is something that you can do with a helper, but...

Learn how to tie a pipe hitch.  Once you get some pipe showing, throw a pipe hitch around the pipe, and tie the other end to something solid.  Slide the hitch down the pipe, as you pull it out.  This way you aren't standing there with quivering muscles trying to keep a grip on slimy pipe.  Note that synthetic rope on slimy black poly pipe doesn't grip too well.  Your pipe hitch may need a few extra turns.
A submersible pump adds 80 pounds or so to the load for a small 1/2 HP one.
It can go a lot easier if you have a front end loader and 3 people.  You tie two hitches to the pipe, one to a stationary object, one to the bucket of the loader.  Raise the bucket, sliding the stationary hitch down.  Lower the bucket.  Load is picked up by stationary hitch.  Slide the bucket's hitch down.  Repeat.  Third person moves the pipe away from the well head.  I've done this with a 400 foot submersible.

Failed pump.
If you determine that the problem is the pump, then in the interest of family harmony, you may want to just go buy an new pump. THEN fix the old one.  This will get water and the resulting clean dishes, food, clean kids, flushed toilets etc in play.  If the old one is fixable, great.  If not, then watch the sales and buy a spare.
(I'm paranoid:  I replaced a sump pump because it was making weird noises.  I thought the bearing was going.  Kept it though.  It sits beside the sump, with a hose clamp ready to be swapped.  I also have a non-float switch pump on 60 feet of 1" line in the garage, which may buy me time to replace the sump pump.  I also have a 12v pump mounted on a separate line in the sump that can keep up with the flow in all but the worst conditions when the power is out.  It has a battery with a smart charger on it.)


How did Saitama defeat a monster before becoming a hero?

Question: Reading the One Punch Man wikia I've read that when a younger Saitama, before being a hero, was able to defeat a monster. How was this possible? Did Saitama have some power before becoming a hero?
Answer: Saitama was nowhere near as strong before. He did defeat a monster and that is what motivated him to become a hero and that is where his training started. This is clear in the anime and manga. However, it does not necessarily say whether Saitama had fighting skills or if the monster was weak. You cannot determine whether Saitama at that point was stronger than what a normal human was but as shown by his fighting skills when fighting the monster in the anime you may assume he is stronger than the average human. Therefore he could be considered somewhat strong but in comparison to his current figure and other heroes such as Genos he was quite weak before he was a hero.
Answer: In the anime and manga, Saitama starts off as a reasonably fit, unemployed salaryman (he's notably more non-descript in the original webcomic). He's not as cut as he is portrayed in the present time, but certainly not doughy or without definition.
Saitama's fight with Crabante, his first monster fight, is indicative of the mindset that would deliver him unto extreme power: don't stop until it's done, and ignore your limits. He fights through pain and Crabante's superior power to take advantage of Crabante's weak point and saves the day.
In the manga there is a sidestory chapter (Volume 2, Bonus chapter) that takes place around 300 days into his training to be a hero. He still has his full head of hair.  He's in a great deal of pain through the initial part of the story, but near the end an attacking monster hits him while he's out doing his running and knocks out his tooth

 which turns out to be the source of Saitama's pain, as he had an awful toothache in exactly that tooth.

This restores Saitama's focus (and he suffers no other form of damage, despite being launched through a wall), and he quickly one-shots the monster and simply continues on with his running like it was no big deal.
Indeed, there's a second sidestory chapter that takes place during his training days (Volume 3, Bonus Chapter 1).  This one I don't think specifies exactly when it occurs, but he still has his hair.  Saitama's out in the city and really, really needs to pee.  But he can't get inside anywhere to use a bathroom because everyone's hiding from a huge attacking monster (Cicada Nymph).  Saitama runs pee-dance-style trying to find one and one-shots the monster when it gets in his way.  I don't think Saitama really even registered the monster (either as a threat or even existing), being more focused on finding somewhere to pee.
Which is all to say that Saitama does appear to have a meteoric rise in power, but in his fight against Crabante his only extraordinary ability appeared to be his willpower and courage. He does not achieve his ultimate power until he loses all of his hair, but even before he has shown any hair loss (it's not specified if he lost it somewhat gradually, or all-at-once, or what) he is able to take powerful hits with little to no damage, and can one-shot monsters.
Incidentally, the bullying thing you mentioned is in the Volume 1 bonus chapter.
Answer: I believe if you follow the story, we can see that Saitama was not bald headed. He was a normal salary man. Then one day he met with a crab monster, where he was beaten so badly. With some luck and brain, he managed to defeat the crab monster. Later on he fight with monster and train a lot. Just like what anime season 1 stated, he do some muscle training to his limit until he realized that he has become bald.
So imo, he was a weakling before becoming a hero. He was strong before joining hero association.
Comment: What does being bald have to do with the question of him being strong before being a hero?
Comment: Maybe I get it wrong, but he lost his hair and gain tremendous power.
I thought that balding point is the tipping point of his power.


N white and black balls and N boxes Probability

Question: Given $N$ boxes , $N$ white balls and $N$ black balls
chooses one box randomly and one ball from it randomly
Find the probability of getting white ball.
Comment: "$N$ boxes, $N$ white balls and $N$ black balls" is rather imprecise. Do you mean that there are $N$ white balls and $N$ black balls in each of $N$ boxes? That there are $N$ black balls and $N$ white balls, distributed among the boxes at random? So that each box has at least one ball? So that each box has exactly two balls? So that each box has one black ball and one white ball? These things will change the answer quite a bit, so until they're clarified, there's no real way for you to get an answer.
Comment: Given $N$ new users posting $N$ new questions which are worded as demands rather than questions,  what is the probability they are all homework problems?
Answer: It depends on how the balls are distributed among the boxes. We will assume each box has at least one ball. Then we could put a white into $N-1$ of the boxes, and all $N$ black and the remaining white into the last box. The probability of white is then $\frac{N-1}{N}+\frac{1}{N(N+1)}$. This is close to $1$ if $N$ is large. Similarly, by an analogous distribution, we can make the probability of black close to $1$.
If on the other hand we put $2$ balls in each box by a process that does not pay attention to the colours of the balls, then by symmetry the answer is $1/2$.


coherent analytic cohomology vanishes for q > 2dim

Question: Given a complex-analytic manifold of dimension $d$, why does the cohomology of coherent sheaves vanish in dimension $> 2d$ (without using GAGA)?
Comment: Shouldn't the cohomology of coherent sheaves vanish above $d$? This should be somewhere in "Coherent Analytic Sheaves", by Grauert and Remmert, but I don't have the book here so I can't check.
Comment: Angelo, that is a very good point. I'm certain it isn't in the CAS book (I read it quite thoroughly, and there's no discussion of higher sheaf cohomology in that book apart from the chapter on Grauert's Higher Direct Image Theorem), so a better place to try is G&R's other book Theory of Stein Spaces.  It would be nice to also have the result without smoothness.
Comment: BCnrd the required vanishing follows from Andreotti-Grauert.See
corollary4.15 page 428 of Demailly's book on CAG.
Answer: Note that it is not necessary to say to avoid GAGA, as GAGA has no relevance in the absence of compactness assumptions.
Anyway, something much more general (and satisfying) is true: all topological sheaf cohomology on a (paracompact Hausdorff) analytic space vanishes beyond twice the analytic dimension.  Here is a sketch of a proof. By metrization theorems, such spaces are metrizable. Also, connected components of analytic spaces are open, so cohomology is direct product of cohomologies on the connected components.  We can therefore restrict attention to the connected case, so the underlying topological space is separable (i.e., countable base of opens); I think this latter fact is stated with reference in the Introduction of the book Theory of Stein Spaces.  (If not, assume the given analytic space is separable, a very "practical" assumption!)
By the local analytic "Noether normalization" (really Weierstrass Preparation), twice the analytic dimension equals the "topological dimension" in the sense of dimension theory as in Engelking's marvelous book "General topology" for separable metric spaces. (For separable metric spaces, various notions of topological dimension are proved to agree; all done in that book. For opens in a real Euclidean space it recovers the expected "dimension"!) That book shows open covers of separable metric spaces have refinements whose $(n+1)$-fold overlaps are empty for $n$ beyond the topological dimension (in one of the various equivalent senses of dimension: the "covering" dimension!). Now use equality of Cech and derived functor cohomology for paracompact Hausdorff spaces to conclude.


Need help making a 3d keychain pendant

Question: I have been fighting with this for the past week and am pretty much about ready to throw it away. I am trying to make keychains for a party and have had nothing but issues and I am almost out of time to get them done. I tried to upload the 2d image and it wouldn't upload properly so I had to do each detail individually and combine them. (I have already given up on making the text look clean.) In the process of combining each object together, my object is now done but has NO solid faces that I can extrude to make it into a 3d object nor can I add a hole for a ring (where there is currently an extra dot that won't delete in upper right corner). Fill doesn't work and I can't download new software onto the computer. I would be more than happy to send the file if you think you can fix it for me.
Comment: That dot in the top right corner is the origin of the object, not a vertex, every object has one.
Also when i read the title i thought you want to make a chain, while it looks more to me that you want to make a pendant for a key-chain and most likely want to 3D print it right? I would suggest to adjust the title, making it easier for others knowing this topic better, to find the question easier and thus giving you faster help. Also, to be able to help further, it may help if you share the .blend file.
Comment: Thank you Xylvier. Ok I was confused because the origin was originally centered until I tried adding a circle for the hole but it would't combine correctly so I deleted the circle but I guess the origin changed location when I combined them. I have changed the title.
Answer: As you asked if someone could fix it (well i tried):

I would like to roughly tell you what i did, so you could do it too, next time.
After converting the path to a mesh ("Object-Menu" -> "Convert to" -> "Mesh from Curve/Meta/Surf/Text") and cleaning it reasonable, way to many points.
I separated the parts and made the main body from just the outer line extruded with a n-gon face. The rest was separating all the parts based on what layer they go. Like some framing of the text was cut out of the body and the text then set inside the cut out part giving it that depth.
If this is what you were trying to make is questionable, in the file is one pendant object that was the union of all parts, as well as a pendant in parts.
In case you want the faces that are cut in the body to be rather outside, just select all the vertices in the inner part of the body from the side-view and move them along the "Z" axis up. Would have liked to clean it up more, hope this helps you.
Btw. i was missing those bells, could not find them in the file.
Comment: Thank You! This has helped immensly!

Need help making a 3d keychain pendant


What's the eccentricity of our sun's orbit around the center of the galaxy?

Question: Just thinking about "galactic habitability zones." Is this even a valid question?
Comment: I doubt that it's Keplerian. Keplerian elliptical orbits only apply to a central gravitational field, but the galaxy's field is not a $1/r^2$ field.
Comment: It is indeed a valid question! You certainly do not want to be bobbing around the [huge black hole on a 16-year orbit](https://en.wikipedia.org/wiki/S2_(star)) at the speed of 5 Mm/s. These things are not going to last. But elsewhere... it's probably survivable. I've seen worse. But I do not really know enough on galactic habitability to write an answer, sorry.
Answer: EDIT: I am getting down-voted, and as per the comment below me this seems to be because I failed to answer the question. I thought the question was about Galactic habitability zones as the description mentions but it seems I was wrong. If your question is about the eccentricity of the Sun's orbit around the center of the galaxy, then that question has already been answered here: How can one get the eccentricity of the orbit of the Sun around center of the Milky Way?. I'll leave the rest of my answer in case you were interested in the "habitability" of our galaxy. Cheers.
So "habitable" in the context of our solar system is really talking about radiation flux, where if too much of the sun's radiation is hitting the surface of our Earth, the Earth's atmosphere will heat up too much and the environment would be unsustainable for the development of life. So the Earth is close enough to the sun that the sun has a very strong effect on the dynamics of Earth's environment (obviously, since all of life feeds in some indirect way on the sun!)
However, in terms of the Earth in the context of the Galaxy, I want to clarify that the distance between stars in any galaxy is actually massive compared to the distance between the Earth and the sun. Really, the chance that our solar system will interact with any other star or solar system in the next few billions of years is virtually zero.
With this in mind, I'd say the only consideration about a "Habitable Zone" would be, as someone else has said, our distance from the super-massive black hole at the center of the Milky Way. But since this only makes up a tiny portion of our galaxy, the entire galaxy is really "habitable" for our solar system.
Hope that helps!
Comment: This doesn't answer the question, and the second paragraph seems totally unrelated to the topic.
Comment: Ok, I answered what I thought they were asking, I've edited my answer.
Comment: IMHO, the body of the question is just as relevant, if not more so, than its title. So I think your answer is reasonable. Still, it might not be healthly living <1000 lightyears from the centre, due to the higher rate of energetic events like supernova, and other stuff that can cause gamma ray bursts.
Comment: I disagree with your assertion that a single criterion establishes the  galactic habitability zone. But, this isn't my argument, look up "Rare Earth Hypothesis" and galactic habitability zones. Rather fascinating.
Comment: Can you send me a specific link? I don't think I have time to read the entire wiki article. Is your argument that there is indeed a galactic habitability zone and that the Earth is the only planet with life partly because of this reason?


Finite Precision Arithmetic Coding Decoding Process?

Question: I've been doing some reading on arithmetic coding, particularly how to deal with finite precision, so for example, when the range is inside the interval (0, 0.5) or (0.5, 1), one can just output 0 or 1 respectively, and then double the range. What I don't understand is if this process is adopted, how does one go about decoding the resulting code?
Answer: The decoder runs an exact duplicate of the encoder (necessarily delayed with respect to the original), including its encoding interval model.
The decoder also keeps track of the known output interval of the encoder, up to the point at which it has read the compressed datastream.  When this interval fits inside one of the intervals of the encoding model, it knows it can decode the corresponding symbol.

Note that, while reading the compressed datastream, the output interval can quickly be reduced to a size of 1 (the smallest step the finite-precision encoder can represent).  Since the encoding intervals are all discretized, this unit output interval is guaranteed to fit into some encoding interval, so the decoder can never fall too far behind the encoder.  However, the end of a compressed stream may require a "flush" of the decode state -- either by some auxiliary signal (like a file length), or by the encoder sending enough extra bits to ensure that the decoder finds its termination symbol.


For a wireless channel, what is the difference between Ergodic capacity and Outage capacity?

Question: What do the terms Ergodic and Outage mean? And how do they relate to Shannon capacity?
Answer: Imagine that you want to transmit a block of symbols over a wireless channel (infinite block if we want to discuss capacity). The wireless channel will vary throughout your transmission due to mobility and multi-path and therefore, your received symbols will undergo fading. Now, one may refer to two different scenarios, one where the fading is varying fast and one where the fading is varying slowly. I will assume that we are aware of the fading realization, i.e., we have CSI.
Fast fading
The fading remain constant over a small number of symbols and hence, we may obtain a good estimate of the capacity by averaging what we receive over the fading realizations. This is called the ergodic regime. Hence, the ergodic capacity is given as
$$C_{\mathrm{erg}} = \mathrm{E}_{H}\!\left[ \log(1+\vert H \vert^2\gamma) \right]$$
where \$ \gamma \$ is the SNR and \$ H \$ the fading coefficient.
Slow fading
In this regime, the fading stays constant over a large number of symbols. Therefore, averaging is not possible since we will not have enough fading realizations. Also, since the fading can be arbitrarily small and remain for a very long time, there is no way to guarantee that we can communicate at any rate above zero with arbitrarily small error probability.
Instead, we take another route and define the outage probability as
$$  p_\mathrm{out}(R)= \Pr\left( R > C(H) \right)$$
where \$C(H) = \log(1+\vert H\vert^2 \gamma)\$ is the instantaneous capacity.
We can now define the outage capacity (also called \$\epsilon\$-capacity as the largest rate that we can communicate with, given that the probability of being in outage is smaller than \$\epsilon\$. Hence,
$$ C_{\epsilon} = \sup\! \left \lbrace  R:p_\mathrm{out}(R) < \epsilon   \right \rbrace. $$
Answer: Ergodic Capacity: is the same as Shannon Capacity.
Outage Capacity: is the highest rate of communication that occurs given a certain outage probability. A measure for slow fading channels.
This is good place to start:
https://en.wikipedia.org/wiki/Channel_capacity


Is a2x8x10' enough support as a ridge beam for a 14'x10' shed roof?

Question: I'm building a 14' x 10' shed with a gable roof w/ 3.5/12 pitch. I plan on a 2x8x10' ridge beam attached &supported by 2-3 2x4's. rafters will be 2x6x8' 16 or 24" oc. i was hoping for an opinion about the ridge beam size. i'm not sure i understand span tables compleatly. thanks for any advise. Ed.
Comment: Will you have ceiling joists or collar-ties?  Without either, the rafters will not be triangulated, in which case approx 1/2 of the entire live+dead load of the roof will be carried by the ridge beam, and a 2x8x10' would be insufficient.  On the otherhand, if you will be triangulating the rafters with ceiling joists or collar-ties, then the ridge beam merely serves to tie together and stabilize the top ends of the rafters and it will carry very little load.  Accordingly, the roof strength will determined by the quality of connections between the joists/ties and rafters (and rafter dimension).
Comment: Geography? Snow?  Roofing materials?
Answer: I assume from your description that your are stick framing (ie not using trusses, and not with any ceiling joists.
The short answer to your question is "maybe", but probably not. The answer to the question depends on the expected wind and snow loads in your area, the species of the wood you plan on using, whether it's normal dimensional lumber, or a laminated beam.
My best advice is to find the permitting authority for your area (typically either the city or building department), and go in and talk with an inspector. They can give you a much more definitive answer than you can get from us, and you can be more confident in it. If you are in an area where that is difficult, the best answer I can give you is that a single 2x10 may work if you have very light loading, but I would be more comfortable with a doubled 2x10 instead. I tend towards overbuilding in cases like this, and the cost of a doubled 2x10 in cost and effort it minimal.
Note that with a ridge beam, you need to carry the load in an uninterrupted path from the beam all the way down to the footings. A 4x4 should be fine for that.
Hope that helps.


Turning on with ADB and SDK tools?

Question: My samsung mobile is switched off with busted power button, and the "Volume down+main button with charger" process is also not working..is there a way I can restart it using adb and sdk tools??
Comment: https://android.stackexchange.com/questions/131248
Answer: download magisk manager and exact variant of boot.img to any other android device. patch boot.img with advanced - keep force encryption + keep avb/dm-verity
install Odin and drivers. flash magisk_patched.tar in AP slot. set the auto reboot option
unlock device and install magisk manager. you are rooted
edit: now modify your device for auto boot each time charger is plugged in, see Irfan Latif's answer on Automatically power on Android when the charger is connected
now dump your para partition and inspect with hex editor. if you find the off mode charge string you can modify value. flash the modified para partition. this will make your device auto boot each time charger is plugged in
if the changes aren't persistent for some reason, install some start-up script which executes the mod directly

 sed -i '0,/off-mode-charge=1/s/off-mode-charge=1/off-mode-charge=0/' $(find /dev/block -name by-name)/para
Comment: This trick should work only on devices where bootloader supports `fastboot oem off-mode-charge 0`. I don't know if `odin` provides an equivalent command or not. But many vendors don't implement this command in bootloader.
Comment: Universal way: https://android.stackexchange.com/a/221384/218526

Turning on with ADB and SDK tools?


How can I get my Steam account back?

Question: I was in the middle of playing Team Fortress 2, and I just got hacked in-game.  Steam just logged out for no exact reason, and I got kicked out of the application.  I tried logging in, and there was an error.  It's a premium account, so that's probably why somebody hacked it.  Is there any way I can get it back?
Comment: Stop reading Stack Exchange and contact Valve ASAP. Give them as many details as possible.
Comment: Do you have 2 factor authentication, and what is the specific error when you try to log in?
Comment: Thanks for your help... I finally found out how to contact Valve.  Person named Earl said that my account was compromised and I got it back.  Thanks so much BTW :D
Comment: @Daneolog What's a premium account? Never heard about that before
Comment: @Artery In combination with Team Fortress 2: Team Fortress 2 is a Free to Play game. Accounts that have never bought anything from the TF2 store have certain limitations within TF2. Buying something from the TF2 store will upgrade the account to premium, with more backpack space etc.
Answer: For people finding this question via Google. Follow the steps outlined in this Steam Support article in that exact order:

Scan (and secure) your computer. Make sure there are no viruses on your computer, and make sure your network and connected devices are all safe. Doing anything on a compromised computer will only make thing worse.
Secure your email. Make sure that no-one is able to get access to your email. Always use a completely unique password for your email that you never use anywhere else. Someone can reset all your passwords using your email and authorize an aweful lot of things with it, which makes your email the most critical thing to keep safe. Use 2FA with your email if you have not set it up yet.
Change your Steam password by following the link on that page (or go to this link if it still works).

If you are using the Steam app, do not authorize anything that was not done by you. Ever. Do not give the code generated by the app to anyone, and only enter it on the official Steam website.

How can I get my Steam account back?


Does suspending an account allows access to CPanel?

Question: I have a CPanel reseller account, and I want to suspend a site because it was hacked, but I want to know if will be available to site owner to restore it.
Answer: When suspending a cPanel account, it will fully lock down the account... it prevents login into cPanel, SQL, Mail and all other services, crons and processes. The account can then only be restored via the Reseller administrator.

CKB What happens when you suspend an account?
The system uses the passwd -l command to lock the account's
  /etc/shadow password file. This command prepends the account's
  passwords with two exclamation marks (!!).    The following list includes
  some of the effects that this action causes:
<code>- The user cannot log in to their cPanel account.
- The account's database users cannot log in to their databases.
- The suspended account's password cannot change.
</code>
Answer: Simon is right about what access they won't have.
I find the best way to handle a situation like this is to change the document root to something like <code>/public_html/temp</code> and then unsuspend the account for a negotiated length of time e.g. 48 hours
Comment: https://www.servint.net/university/article/the-tech-bench-changing-a-document-root-in-cpanel/
Comment: Thanks! Do you know where could I do this?


How to join different quantum circuits into one big circuit on specific qubits in qiskit?

Question: I have a quantum circuit that loads the data and is acting on qubit q0,q1,q2 then another circuit that does the same on q3,q4,q5 then I have to apply an CDKMRippleCarryAdder and few other ansatz parameterized gates acting on specific qubits.
How can I add this all to one big circuit and run it. I already tried add function, but it doesn't specify which qubits should it be applied. I also tried compose function, although it has the parameter of specific qubits, it adds classical registers to the circuit, which in the end are giving me trouble in applying the GroverOperator of the EstimationProblem function. Is there any other way
Answer: QuantumCircuit.compose() method will not add classical registers to the result  unless you pass a circuit that already contains classical registers. So, if your do something like:
circ1 = QuantumCircuit(3)
circ1.h([0, 1, 2])

circ2 = QuantumCircuit(3)
circ2.x([0, 1, 2])

circ = QuantumCircuit(6)
circ.compose(circ1, [0, 1, 2], inplace=True)
circ.compose(circ2, [3, 4, 5], inplace=True)

circ will not have any classical registers.
If, however, say circ1 contains a classical register, then you will have to remove its classical bits before passing it to compose method as follows:
circ1 = QuantumCircuit(3, 3)
circ1.h([0, 1, 2])

from qiskit.converters import circuit_to_dag, dag_to_circuit
dag = circuit_to_dag(circ1)
dag.remove_clbits(*circ1.clbits)
circ1 = dag_to_circuit(dag)

Answer: In Qiskit, you can create a composite circuit using the compose function while specifying the qubits that the second circuit should act on. However, as you noticed, the compose function also adds classical registers which is causing issues with your Grover Operator.
If the classical registers are not necessary for your use case, one way to bypass this problem is to manually add the gates of the second circuit to the first circuit on the desired qubits.
Here's an example of how you might do it:
from qiskit import QuantumCircuit

# Assume you have two circuits: circuit1 and circuit2

circuit1 = QuantumCircuit(3)
circuit2 = QuantumCircuit(2)

# Add gates to circuit1 and circuit2 as needed
# ...

# Create a new circuit with enough qubits
circuit = QuantumCircuit(max(circuit1.num_qubits, circuit2.num_qubits))

# Add the gates of circuit1 to the new circuit
for gate in circuit1.data:
    circuit.append(gate[0], gate[1])

# Add the gates of circuit2 to the new circuit, on the desired qubits
for gate in circuit2.data:
    qubits = [q.index for q in gate[1]]
    # Shift the qubit indices by the desired amount
    qubits = [q + circuit1.num_qubits for q in qubits]
    circuit.append(gate[0], qubits)

This code will create a new circuit with the same gates as circuit1 and circuit2, but circuit2's gates will be applied to the qubits shifted by circuit1.num_qubits.
After this, you should be able to apply your CDKMRippleCarryAdder and ansatz parameterized gates on the specific qubits without having unnecessary classical registers in your circuit, hopefully resolving the issues with the Grover Operator.
Keep in mind that this code snippet may need to be adjusted depending on the specific details of your problem and your circuits.
Answer: The above answers are good enough. You could also refer to this video from Qiskit's official YouTube channel. It presents various methods for joining two circuits.


Sort Hashtable by (possibly non-unique) values

Question: I have a Hashtable that maps strings to ints. Strings are unique, but several may be mapped to the same integer.
My naive approach was to simply invert the Hashtable to a SortedList that is indexed by the Hashtable's values, but the problem is that you get a clash as soon as two of the Hashtable's strings map to the same value.
What is the most efficient way to list my entire Hashtable (keys and values) ordered by the values? (Where two values are the same, I don't care about their ordering.)
Answer: Using Linq:
hashtable.Cast<DictionaryEntry>().OrderBy(entry => entry.Value).ToList()

Answer: You said you wanted the most efficient method. The following code is the best I could find.
Hashtable hashtable = GetYourHashtable();
var result = new List<DictionaryEntry>(hashtable.Count);
foreach (DictionaryEntry entry in hashtable)
{
    result.Add(entry);
}
result.Sort(
    (x, y) =>
    {
        IComparable comparable = x.Value as IComparable;
        if (comparable != null)
        {
            return comparable.CompareTo(y.Value);
        }
        return 0;
    });
foreach (DictionaryEntry entry in result)
{
  Console.WriteLine(entry.Key.ToString() + ":" + entry.Value.ToString());
}

I experimented with various different approaches using Linq, but the above method was about 25-50% faster.
Answer: Maybe this could work:
myhashtable.Keys.Select(k => new List<string, int>() {k, myhashtable[k]})
    .OrderBy(item => item[1]);

This should give you a list of lists, with the nested lists containing exactly two elements, the key and the value. Sorted by the value (second element).
I'm not quite sure if the Hashtable has a KeyValuePair<K, V> type... something like this could also work:
myhashtable.Items.OrderBy(kvp => kvp.Value);

Answer: The immediate way that springs to mind is along the lines of what you have except that you have a SortedList (or similar) that uses the original values (ie the integers) as keys and as values has a list of the original keys (ie the strings if I understand correctly). There is a bit more faff involved in adding values (since you need to check if they exist and add them to the list if so or create a new list otherwise). There may be better methods but this is the one that immediately springs to mind...


Feed Me logs access from the front-end

Question: So I've created a web portal for a client so they could upload a file which triggers a Feed Me feed (on that file). I handle the upload and triggering of the feed with a custom Module. I trigger the feed using the php exec function and the feed's Direct Feed URL. I would love to show the user the log for the Feed's task while it's running, so they would know if any errors occur. Is there a way to do this?
Answer: I would look to the feed-me plugin itself:
The controller:
https://github.com/craftcms/feed-me/blob/develop/src/controllers/LogsController.php
Which calls the service: https://github.com/craftcms/feed-me/blob/3a8246c055240c46ae9307f3ccada3c42d296920/src/services/Logs.php#L71
Essentially it just reads the log file and presents it to a template, so you could use JS/AJAX to return the results every x seconds.

Feed Me logs access from the front-end