Why does particle measurement cause quantum wavefunctions to collapse

Question: When we attempt to measure a certain property of a particle, how and why does its wave function collapse? I've tried to find answers on my own, but they've been far too complicated for me to comprehend. Would appreciate any answer with limited complex jargon, and more simplistic explanation, if possible.
Answer: A simple way to look at it is to remember that the wavefunction describing a particle or a system of particles is a mathematical function, a solution of a specific quantum mechanical wave equation, with specific boundary conditions . When a measurement is made, an interaction with the system happens that changes the boundary conditions. This means that a new mathematical function will describe the particle or the system of particles after the measurement, and this is what is called "collapse", a misleading term. A wavefunction is not a balloon.
Answer: It postulates III that says,

If the particle is in a state $|\psi\rangle$, measurement of the variable (corresponding to ) $\Omega$ will yield one of the eigenvalues $\omega$ with probability $P(\omega)\propto |\langle\omega|\psi\rangle|^2$. The state of the system will change from $|\psi\rangle$ to $|\omega\rangle$ as a result of the measurement.

The postulates doesn't have proofs.

Another aspect of this postulate says the measurement of the variable $\Omega$ changes the state vector, which is, in general, some superposition of the form
$$|\psi\rangle=\sum_{\omega}|\omega\rangle \langle\omega|\psi\rangle$$
into the eigenstate $|\omega\rangle$ corresponding to the eigenvalue $\omega$ obtained in the measurement. Which is called the collapse or reduction of the state vector.
Answer: Not only is wave function "collapse" a misleading term, it is also not an intrinsic part of quantum mechanics. There are interpretations of quantum mechanics, such as the many-worlds interpretation, in which a wave function never collapses - it only appears to, due to our limited knowledge. If you loose one sock from a pair you do not describe this as "sock collapse" - the other sock is still out there somewhere, you just don't know where.


Data-bound UserControl in ListBox.ItemTemplate

Question: I have a simple class Product and a UserControl named ProductSummaryControl.  ProductSummaryControl displays the details for a Product class that is passed in to its DataContext.  I have verified that this works when I set up the control and its property manually.
I run into a problem when I try to use the ProductSummaryControl as part of a ListBox ItemTemplate.  This is the relevant code:
<ListBox x:Name="ProductsList" HorizontalContentAlignment="Stretch">
    <ListBox.ItemTemplate>
        <DataTemplate>
            <local:ProductSummaryControl DataContext="{Binding}" HorizontalAlignment="Stretch"/>
        </DataTemplate>
    </ListBox.ItemTemplate>
</ListBox>

I set the ListBox ItemsSource to a List and I see multiple instances of my ProductSummaryControl that correspond to the number of products in the list, but the controls are not properly bound to the data.  All of the examples I've found of customizing ItemTemplate on the web suggest that {Binding} is the correct way to get the item value, but I'm apparently missing something...
UPDATE:
I did a bit more research and I've discovered that the DataContext of the ProductSummaryControl is being set to a default instance of Product().  I think this is because of this:
 <UserControl.Resources>
    <DBSchmid_Data:Product x:Key="ProductDataSource" d:IsDataSource="True"/>
</UserControl.Resources>
<UserControl.DataContext>
    <Binding Mode="OneWay" Source="{StaticResource ProductDataSource}"/>
</UserControl.DataContext>

This was caused by setting up the UserControl's DataContext in Blend so that the various elements in the control could reference properties of the inherited DataContext.  I verified that I could change the value of DataContext from a button click method and have the binding work properly, so I thought it would also work with binding through a template.  Apparently the two cases are treated differently, but I still don't understand how.
Comment: This works for me.  Could you describe how it's going wrong?  Are you seeing any binding errors in the Output window when you run it under the debugger?
Answer: I finally had a chance to fight with this more and made it work. I had to delete the StaticResource, as it was interfering with setting the DataContext of the ProductSummaryControl. I still don't understand why, but deleting the resource allowed the binding to occur. I also had to point the DataContext to the Content property of the ContentPresenter owning the templated control.
<DataTemplate>
    <local:ProductSummaryControl DataContext="{TemplateBinding Content}"
                                 HorizontalAlignment="Stretch"/>
</DataTemplate>

Answer: Might be an issue with the way you structured your ProductSummaryControl, because even if you don't put {Binding} the DataContext will get automatically inherited to the control


Special case of the Hodge decomposition theorem

Question: I am trying to prove the following special case of the Hodge decomposition theorem in differential geometry for an $n$ component vector field $V_i$ in $\mathbb{R}^n$. I have very little knowledge of differential geometry.
any vector can be written as the following combination
$V_i = −\partial_i \phi + \epsilon^{ii_2 i_3···i_n}\partial_{i_2}F_{i_3i_4···i_n}$
where $F$ is a rank $n-2$ anti-symmetric tensor.
I have read the proof of the Helmholtz theorem, but I don't know how I can generalize it.
More specifically the Helmholtz theorem uses the identity $$\bar{\nabla} \times (\bar{\nabla} \times \bar{V})=\bar{\nabla}(\bar{\nabla} \cdot \bar{V} )-\nabla^2 \bar{V}$$
What is the generalization of this identity to $n$ dimensions?
Do I have to assume some Ansatz? What would that be? It would be great if somebody could show a stepwise method showing tensor calculations, and stating the necessary theorems?
Lastly, how do I prove the uniqueness that given the curl and divergence ($\partial_i V_i=s$ and $\partial_iV_j-\partial_jV_i=c_{ij}$), and the normal component at the boundary, the vector is uniquely specified.
Comment: The identity will be $\Delta = \mathrm{d}\mathrm{d}^* + \mathrm{d}^*\mathrm{d}$.
Answer: Shuhao Cao has provided a strong answer in terms of the usual language of differential forms and tensor calculus.  I present here an alternative in terms of geometric calculus which I hope will be enlightening.
As I related in my answer to your other question, geometric calculus can look somewhat different from differential forms, but most of the basic concepts are the same.  For instance, there is an exterior derivative:
$$\mathrm d\omega \equiv \nabla \wedge \omega$$
And a coderivative, or interior derivative,
$$\delta \omega \equiv \nabla \cdot \omega$$
These are simply how these concepts are denoted in geometric calculus.  The preference of using them over $d, \delta$ is that the geometric product makes meaningful the statement
$$\nabla \omega = \nabla \wedge \omega + \nabla \cdot \omega$$
which, written in terms of $\mathrm d\omega, \delta \omega$ might otherwise come off as patent gibberish.  But the use of multivectors in geometric algebra and calculus makes this a perfectly valid mathematical statement.  It allows us to separate what would otherwise be some tensor $\partial_i \omega_j$ into two distinct, meaningful parts.  If $\omega$ is a $k$-vector, then $\nabla \cdot \omega$ is a $k-1$-vector and $\nabla \wedge \omega$ is a $k+1$-vector, and both pieces can be kept track of in the equation using the clifford algebra framework.
Again, treating $\nabla$ as an operator in and of itself is useful in geometric calculus because it has a Green's function:
$$\nabla G = \delta$$
where here, $\delta$ should be understood as the Dirac delta function.  The form of the Green's function in 3d is $G(r) = \frac{r}{4\pi |r|^3}$, and you can ultimately relate it to having the same form in higher dimensions, just dependent on the hyperarea of the unit sphere and so on.  Having a Green's function makes $\nabla$ invertible through integration in a way that the exterior and interior derivatives by themselves are not.

With that in mind, the Helmholtz decomposition can be expressed using geometric calculus quite simply.  First, you ask about an identity that is used in the derivation.  This is actually a general result:
$$\nabla(\nabla \omega) = \nabla^2 \omega = \nabla \wedge (\nabla \cdot\omega) + \nabla \cdot (\nabla \wedge \omega)$$
This is the geometric calculus analogue of your identity, and it unifies the Laplace-Beltrami and Laplace-de Rham operators that Shuhao Cao refers to into a single, scalar operator $\nabla^2$.

Now we can go about proving the Helmholtz decomposition.  Let $E$ be a vector field.  Let $M$ be some region with boundary $\partial M$.  Let us presume that there exist a scalar function $\phi$ and a bivector field $A$ such that
$$E = \nabla \wedge \phi + \nabla \cdot A = \nabla \psi$$
such that $\nabla \wedge F = 0$.  There is nothing particularly lacking in generality with these assumptions, as I will show.  Consider the following integral:
$$\oint_{\partial M} G(r-r') dS' \, \psi(r') = (-1)^{n} \int_{M} \delta(r-r') \, dV' \psi(r') + \int_{M} G(r-r') \, dV' \, E(r')$$
This is where keeping track of grades, as they're used in clifford algebra, is important: even if $\nabla \wedge A$ were nonzero, we could separate it out of this equation by considering that 3-vector term alone.  So I have done nothing that violates generality (yes, I've assumed some things about integrability and smoothness and such; we'll go with all those necessary things being applicable, for otherwise you wouldn't even be able to do the problem).
What this use of the fundamental theorem does is give us a formula for $\psi = \phi + A$, and since separate grades must always independently obey such an equation, we can write down the equation as
$$\begin{align*}
\phi(r) &= \int_M G(r-r') \cdot E(r') \, |dV'|- \oint_{\partial M} |dS'| \left[ G(r-r') \cdot \hat n' \phi(r') - [G(r-r') \wedge \hat n'] \cdot A(r') \right] \\
A(r) &= \int_M G(r-r') \wedge E(r') \, |dV'| - \oint_{\partial M} |dS'| \left[G(r-r') \wedge \hat n' \phi(r') + G(r-r') \cdot \hat n' \, A(r')\right] \end{align*}$$
We're not actually going to use these formulas; I'm merely arguing that, given these potentials defined on some surface, the functions themselves can be constructed as well.

What we really want to do is look at the Green's function for $\nabla^2$ instead.  There does exist such a function (which I will call $H$ such that $\nabla H = G$).  In 3d, $H(r) = (4\pi |r|)^{-1}$, so this is exactly what you're used to seeing in expressions of the Helmholtz decomposition.
Again, our preferred hammer for deriving integral theorems is the fundamental theorem.  Use $H$ and $E$ and observe that
$$\nabla \oint_{\partial M} H(r-r') \, dS' \, E(r') = (-1)^n (i E) + \nabla \int_M H(r-r') \, dV' \, \nabla' E(r')$$
(If you can't see how this is so, just pull the $\nabla$s into the integrals and remember $\nabla H = G$.)
But remember that $E = \nabla \psi$.  The invertibility of $\nabla$ means that we can, through some integrals, essentially cancel $\nabla$ to get
$$(-1)^n \phi(r) = \oint_{\partial M} H(r-r') \, \hat n' \cdot E(r') |dS'| - \int_{M} H(r-r') \nabla' \cdot E(r') \, |dV'|$$
and the bivector potential $A$ follows by replacing dots with wedges.  This is the Helmholtz decomposition.  You need to know the Green's function for the Laplacian.  You need to know the dimension of the space.  But most importantly, since you seem hung up on this point, you need to know the tangential components of the vector field, not just the normal component.
Comment: +1 Nice to know Laplace-Beltrami and Laplace-de Rham operators are unified like that. Btw, when dimension is 2 or 3, $$\nabla \times u = f,\\ \nabla \cdot u = 0,\\ u\cdot n|_{\partial \Omega} =0$$ yields a unique solution too. For 2 is trivial, for 3 $f$ has to satisfy certain boundary constraint. Not for higher dimension though.
Comment: You wrote $∇∧ϕ$ for a scalar field $ϕ$.

What does the curl of a scalar field mean?
Comment: In geometric calculus, we use $\nabla \wedge$ to denote the exterior derivative.  Hence, $\nabla \wedge \phi = d\phi$ is the gradient (well, depending on whether you consider gradient to be a vector or 1-form, but in clifford algebra, the distinction is typically not observed anyway).  This can *also* be denoted $\nabla \phi$ because $\nabla \phi \equiv \nabla \wedge \phi + \nabla \cdot \phi$.  The last term is the codifferential and is automatically zero for a scalar field.
Comment: Ah. Thanks! The general result is: for a vector $a$ and r-vector $B_r$, we have $a \cdot B_r = \frac{1}{2}(aB_r - (-1)^r B_r a)$. Hence, $a \cdot B_0 = \frac{1}{2}(aB_0 - (-1)^0B_0a) = \frac{1}{2}(aB_0 - B_0a) = 0$.
Answer: Partial answer: In general, if we ignore music isomorphism at the moment (i.e., we are not that into identifying $k$-forms with $k$-vectors). In $\Omega\subset \mathbb{R}^n$, the Hodge-Laplacian (Laplace-de Rham operator) for $k$-form is define as:
$$
\Delta := \mathrm{d} \delta + \delta \mathrm{d},\tag{1}
$$
and Laplace-Beltrami operator is defined as: $\Delta_l = \delta \mathrm{d}$ (see Marsden's book Manifolds, Tensor Analysis, and Applications Page 443), where
$$
\mathrm{d}^k : \Lambda^k(\Omega) \to  \Lambda^{k+1}(\Omega)
$$
is the exterior derivative of $k$-forms, and $$\delta_k := (-1)^{nk+n+1} \star^{n-k+1}\mathrm{d}^{n-k}\star^k, $$
which is $\delta_{k}: \Lambda^k\to\Lambda^{k-1}$ (again ignoring musical isomorphism at this moment). It can be viewed as the  adjoint of $\mathrm{d}^{k-1}: \Lambda^{k-1}(\Omega)\to\Lambda^{k}(\Omega)$ with respect to the inner product through Hodge star operator $\star$. Then to be precise (1) is actually:
$$
\Delta =\mathrm{d}^{k-1}\delta_k + \delta_{k+1} \mathrm{d}^k : \Lambda^k(\Omega) \to  \Lambda^{k}(\Omega) .\tag{2}
$$
This is the formula in $n$ dimension.
Example: For 3 dimensional case, $\omega$ is $1$-form, (2) reads:
$$
\Delta \omega = (\mathrm{d}^0 \delta_1 + \delta_2 \mathrm{d}^1)\omega = - \nabla (\nabla \cdot \omega) + \nabla \times (\nabla \times \omega) .
$$
Above is from the cochain complex
$$
\Lambda^0(\Omega)\ \stackrel{\mathrm{d}^0 = \nabla}{\longrightarrow}\ \Lambda^1(\Omega) \ \stackrel{\mathrm{d}^1=\nabla \times}{\longrightarrow}\ \Lambda^2(\Omega)\ \stackrel{\mathrm{d}^2=\nabla \cdot}{\longrightarrow}\ \Lambda^3(\Omega),
$$
and its dual complex
$$
\Lambda^3(\Omega)\ \stackrel{\delta_3 = -\nabla}{\longrightarrow}\
\Lambda^2(\Omega) \ \stackrel{\delta_2 = \nabla\times}{\longrightarrow}\
\Lambda^1(\Omega)\ \stackrel{\delta_1 = -\nabla \cdot}{\longrightarrow}\ \Lambda^0(\Omega).
$$
Remark: if using musical isomorphism, curl is $$\big( \star\mathrm{d}(\omega^{\flat})\big)^{\sharp} = \partial_i v_j − \partial_j v_i $$ which is an $n(n-1)/2$-vector for all $1\leq i<j \leq n$.
For Helmholtz decomposition in arbitrary dimension, please see this paper page 2 (1.1), it specifically deals with the Sobolev spaces, and $L^p$-theory for Maxwell systems. Without ambiguity, it is
$$
\omega = \mathrm{d}^{k-1} \alpha + \delta_{k+1} \beta + \gamma.\tag{3}
$$
In (3), $\delta_{k-1}\alpha =0$, $\mathrm{d}^{k+1} \beta = 0$, and $\mathrm{d}^{k}\gamma = \delta_k \gamma = 0$.
For the last question, Mitrea's book Layer Potentials, the Hodge Laplacian and Global Boundary Problems in Nonsmooth Riemannian Manifolds has a presentation. Also this paper, section 3 has a very nice and readable presentation in addressing your question in 3 dimension. For the $n$-dimensional problem, the paper refered above has discussed a related problem(see Proposition 4.4-4.6), in which the main tool used is Helmholtz decomposition.
The other way of viewing Helmholtz decomposition is through weak formulation of PDEs to construct the decomposition, for the following problem:
$$\left\{
\begin{aligned}
\mathrm{d}^k\omega &= f \quad \text{in }\Omega,
\\
\delta_k \omega &=  0\quad \text{in }\Omega,
\\
\omega\wedge \nu &= 0\quad \text{on }\partial \Omega,
\end{aligned}
\right.$$
having a solution actually relies on the coercivity of the corresponding bilinear form
$$
B(\cdot,\cdot) := \langle\mathrm{d}(\cdot),\mathrm{d} (\cdot)\rangle + \langle\delta(\cdot),\delta(\cdot)\rangle, \tag{4}
$$
which in 3 dimensional setting is just
$$B(u,v) = \langle\nabla \times u,\nabla \times v\rangle + \langle\nabla \cdot u,\nabla \cdot v\rangle.$$
(4)'s coercivity relies on a Poincaré type inequality in the corresponding Sobolev spaces, namely,
$$
\|\omega\|_{L^2} \leq \|\mathrm{d}^k\omega\|_{L^2} +\|\delta_k\omega\|_{L^2},
$$
which is true when $\omega\wedge \nu = 0$. More generally, whenever we get tensor field when taking exterior derivative, the Poincaré type inequality should be
$$
\|\omega\|_{L^2} \leq \|\text{symmetric part of } \nabla \omega \|_{L^2} +\|\text{anti-symmetric part of } \nabla \omega\|_{L^2},
$$
of which this paper has a dicussion.
Lastly, Marsden's book chapter 6 through 9 is a good ride.
Comment: @user79365 Thanks for the correction.


How exactly did most nobles gain wealth?

Question: If most peasants in the medieval ages were structurally poor due to relying on subsistence farming; how could most landowning nobles become wealthy, if most taxes were only paid in produce? How could they afford to buy expensive equipment or even have their own military retinues?
Comment: [Documenting preliminary research will improve both the probability of an answer and the quality of the answer(s)](https://history.meta.stackexchange.com/a/785/26786)  Also, queston is _far_ too broad.  An answer would require a survey of the entire globe over thousands or tens of thousands of years.  Plus a definition of "noble". Question assumes that nobles were wealthy, which for much of history is patently untrue.
Answer: The Doomsday Book makes clear that in England, by the time of the Conquest, not only is there considerable economic surplus but many of the peasants were far from subsistence farmers.

The peasant tenantry can be broadly subdivided into two main groups:

Free peasants: freemen & sokemen. They formed about 12% of the population recorded in the Domesday Book.
Unfree peasants: villeins, bordars and cottars. According to the UK National Archives website, These groups made up about 72% of the population recorded in Domesday. The Lord of the Manor could move them between estates as he wished, and also had the power to approve or prevent marriages.

Slaves: comprised roughly 10% of the population recorded in the Domesday Book. This group had no property rights, and are not included in the peasant tenantry. They could be bought and sold at will by their lords.
...
Villeins were both the wealthiest, and the most numerous of the unfree peasants. They made up about 40% of the population recorded in Domesday, and often held fairly substantial portions of land (up to 40 acres is recorded in some instances).

Certainly cottars were subsistence farmers; but it's by no means certain that bordars were as well. Villeins and freemen, comprising over half the adult male population, were most definitely NOT subsistence farmers.


How to get only latest logged event via Web3 API?

Question: Is there a way to get only latest log for e.g myContractInstance.myEvent? Don't wanna rewind whole past. I know I can pass latest to a filter object, but that's not quite what I want. I'd like to get latest one from the past (no matter at which block it happened) and then continue listening for a new ones. Is this possible?
Comment: Would you know a rough upper bound on how long ago the last event would have been produced? Also, have you considered using a state variable in your contract instead of an event? Seems like that's more suited to your use case
Comment: yea, indeed, it can be solved with state variable. I was just curious if such thing is possible. Thanks
Answer: How about {fromBlock: "latest", toBlock: "latest" }?
Comment: hmm, I don't think this is it. For example if `myEvent` was executed 20 times during lifetime of a smart-contract. I want to get that 20th time, I don't care if it was called 20th time in latest, first, or whichever block
Comment: It sounds like what you need is a state variable indeed. If only to store `block.number`.


Is it wise to ask for why a resume has been rejected?

Question: Is this a common practice or even acceptable?
Comment: Have you tried searching this site for similar questions? There are many similar questions.
Comment: @enderland I did and did not find anything close to what I am looking for. Perhaps I did not use the right search terms?
Comment: http://workplace.stackexchange.com/q/10686/2322 http://workplace.stackexchange.com/q/17718/2322 http://workplace.stackexchange.com/q/57496/2322 http://workplace.stackexchange.com/q/6018/2322
Answer: It certainly can be, though if you are screened out in the very initial processes, you might have a difficult time getting anyone to respond to your queries.  Heck, sometimes it is impossible to get feedback even if you are a finalist.
Companies are very gun-shy about telling people why the did not get selected because they feel it would be like giving someone ammunition for a potential lawsuit. Even if they prevail, it's a nuisance to defend against some kind unfair treatment legal claim, so they instead will try to avoid saying anything.
It's not considered rude or out of place, though, so long as, when you ask, you ask in the spirit of trying to understand to make improvements for other opportunities in your job search, and not to argue with them about why they were wrong to do so.
Don't be surprised if, if they actually do respond, the only response you get is "you were an excellent candidate, but we felt another candidate was a better fit for the position."


Code to install files to the GAC doesn't seem to work

Question: Basically we ran into where, for whatever reason, we had to put some 3rd party dll in the GAC for it to work correctly. (The assemblies loaded, but had weird behavior and trouble finding types in the loaded assemblies. The app itself is a add in to another 3rd party program, so it must be something about how its being loaded.) So I tried to write some quick code to handle this without having to manually do this on each machine it was needed on.
This is basically what the code boils down to:
<code>Dim X As New System.EnterpriseServices.Internal.Publish
X.GacInstall(name)
</code>
Where name is the filename of the dll. This runs without error. It even add the assembly to the GAC. However, the application still experiences the same issue until you manually add the assembly in .Net Configuration window.
Do you think there is another step that needs to be done in my code?
Comment: Use fuslogvw.exe to debug this.
Answer: If you have administrator permissions enabled on windows directory, this might fail to install.


How to download all my apps in google play when I have flashed a new ROM?

Question: When I have flashed a new ROM, I have to download all the apps I need in google play one by one, which is very inconvenient absolutely. Some of you may recommend "Titanium Backup", but it will lead to some errors with my device sometimes. So I want to download all my apps using google play in one time, instead of downloading my apps one by one. That is, I want google play to download and install all the apps in my previous ROM automatically after I have flashed a new ROM, Is that possible? Better if you have some more convenient methods. Thanks for any help!
Answer: You have two options.

Do a factory reset. Go to Settings > Backup & reset > Factory data reset.
When you are asked to log-in your Google account, it will ask you if you want to download the apps you installed before. Usually, your paid apps will be installed (and possibly some of the free apps). You may have to manually install the others.

Or, you can always use Titanium Backup. Make sure to back-up only user apps, not system apps. Then, restore those user apps after you have flashed a new ROM.
Comment: Keep in mind that for #1 you must have had the "Google backup" enabled before ("Store my data with Google"). If there was nothing backed up, there's nothing to restore from, obviously :)
Answer: Also, if the above doesn't work for you, or there are many apps that haven't been downloaded you can bulk install previously installed apps using the "My Apps" on the Play Store.
My Apps > All

Then press and hold on an app, and it will be selected. Apps that have already been installed onto your device will be greyed out.
You can then press on any other apps you want to install, then "Install" at the top right.


How much time would it take to build a small medieval city/village/town with a wall surrounding it?

Question: What I'm asking is how many months would it take for around 50,000 people to build an urban medieval settlement that is circular and surrounded by a wall made of brick/stone to protect against magic monsters? First, they'd have plenty of materials because most of everything would be made of mud(bricks) and wood, and maybe some stone and they are nearby to a mountain with a bunch of stone and a large forest. Second, the size of the settlement is approximately 18 square kilometers in area. Each person would be able to collect resources for and build a moderate sized building in about a few days. Also, they cannot work at night because of magic monsters. Food is also plenty.
Comment: If one person can build a moderately sized building in few days you are using magic. Which makes any answer to this question valid, because.. magic!
Comment: My point is that without a specification of the buildings and walls to be built it is not possible to give an estimate of the time and effort required. Ah, and if a "person would be able to collect resources for and build a moderate sized building in about a few days", then that building is a temporary hut, not a house. VTC because the question needs more details about what is to be built.
Comment: In real history, at the beginning of the 5th century, the Greeks-who-called-themselves-Romans under emperor Theodosius II built the 5.7 km long [Theodosian Walls](https://en.wikipedia.org/wiki/Walls_of_Constantinople#Theodosian_Walls) of Constantinople in 9 years. Only the walls, not the city. At that time, Constantinople had about half a million inhabitants, and an area of about 20 km². And it was the Roman Empire building the walls. On the other hand, if by "a wall surrounding it" you mean a glorified fence, then yes, they can build it in a month or two, no problem.
Comment: could you please clarify some points:
1. how tall and how thick must the wall be to protect from "magic monsters"?
2. how are the people protected from the monsters during the construction?
3. what kind of tools/machinery do the poeple start with?
4. how is the area for the settlement prepared? Overgrown wilderness or a flat plane?
Comment: If these people can build their buildings in a few days then it sounds like you are asking how long to build the wall.  How tall, thick and made of what material do the walls need to be?  What domesticated animals do they have available?  How far away is the quarry from where the settlement is being built?  Note that in ancient siege warfare some attacking armies built one or even two concentric walls around the city or town being besieged to prevent breakouts/relief, so a hasty fortified wall can be constructed quite quickly by a large, skilled army.
Comment: Wouldn't the night monsters cause havoc to building sites during the nights? I mean, you haven't described what they are, but unless they are ethereal life-draining ghosts, wild monsters are not very careful most of the time ^^.
Answer: Let's make some assumptions

No magic is used to build the town.
All 50,000 people are men age 18-25.
The only tools to start with are medieval-era hand tools, which weren't too different from hand tools today.
The land is au naturale, meaning nothing has been previously done to it.

Next, let's dispel a myth

The idea that one person during the medieval era could collect the necessary materials and build a structure in a couple of days is, if you'll forgive my bluntness, pure fantasy. To be fair, you didn't define the building. It could be a one square meter outhouse. But I'm assuming you're thinking something bigger. Can't be done.

Initial problems
Mud bricks
Mud bricks aren't made from any old mud. You want 20%-50% clay in that mud. You also need sand, straw (or grass, or pine needles), water, sunlight, a mold for the bricks, of course... and five days. (Source) And that's using just one mold to get just one brick. You'd need thousands of molds (probably tens of thousands) and you need to build them before you can make your bricks. It would require weeks just to make the bricks needed to build a single structure of moderate size.
As you read through this you'll hopefully realize that you could bring a lot of this kind of stuff with you, ready to go, if you have animals. But that also has a price. I'll mention animals momentarily.
Timber or lumber?
If we're using lumber (think "planks"), then you're talking about setting up a saw mill. Probably a dozen saw mills. Which means you need a nearby river to power the saw mills. We can assume the blades, files, and tools needed to build the mill came with the 50,000, but just building the mill will take time. It can't be done in a couple of days, especially when all the initial wood products are being shaped by hand.
Of course, you could opt to use the "log home" method and forego lumber, but that's a less efficient use of materials, which is a fancy way of saying you need to cut down more trees. You're going to need a lot of trees. Wait till I mention your wall, which won't initially be brick.
Transporting resources
You're cutting down trees and moving mud. You could dedicate some of your 50,000 to that task, but let's assume they brought horses or oxen. Of course, that means you're feeding and caring for the animals. You could just set them to graze, but you're still having to dedicate people to their care and use. Even with animals, it takes time to clear the 18 km^2 and to gather additional resources from the local forest.
Water, sewer, and the problem with uneven ground
50,000 people (and animals...) require food, water, and at least the most basic sanitation. You can't just (e.g.) carry the water or half your 50,000 will be dedicated to supporting the other half. That means canals, ditches, and/or aqueducts. It means more ditches to carry sewer away from the town. It means having to fill in at least some of the uneven land to guarantee that the water and sewer go where they're supposed to, and enough flat(ish) areas to build all those buildings on.
Now, you could have people dedicated to various support issues (I'll mention that in a moment) and more to cutting timber and building the saw mills, and more still to making bricks, but just getting to the point where it makes sense to start really building things means...
You'll notice we haven't actually built anything but a few saw mills...
That's a bit of an exaggeration... but not much. You're not days into this project. You're months into this project, and most of your 50,000 are still sleeping on open ground. At least somebody has thought to plant some crops (irrigation!) and so far you've been lucky that only some of your people have died from monster attacks. Oh, yeah, some of your 50,000 must be dedicated to security (at least at night) until that wall has been built (not counting the people dedicated to animal care, food production, administration, etc.). You could build the wall first. Probably should. But 18 km^2 worth of land means a wall that's more-or-less (assuming your community is a wonderfully perfect circle) a 15 km long wall. Your average pine tree trunk is 1 meter in diameter, so you need 15,000 trees (or an unfathomable number of bricks) to build the wall.
I can't take it anymore
It won't take months to build this walled town. It will take years. The only way to make that go faster is to use far (far!) more people than the town itself will be able to house and to bring an astounding amount of prepared resources (food, lumber, nails... Oh, nails... you're going to need blacksmiths, miners, more animals...).
Here in the U.S., Habitat for Humanity can build an entire modest house (1200 sqft) in one day. BUT! They're using a combination of skilled labor and unskilled help (the unskilled help is expected to invest up to 500 hours...) and the number of involved people is dozens, they have all the resources (trees, rocks, mud, ore...) already converted to their immediate needs (lumber, stone, bricks, nails...) and they've coordinated the delivery of everything they need before the construction day begins. They're using power tools, not hand tools — and lest we forget, doing this in a single day isn't actually normal, even for Habitat for Humanity. It usually takes a team of people a week, if not a month, to complete a home.
So... years. I could be wrong (and would love to be proven wrong!), but at this point that's my story and I'm sticking to it.
But I made some assumptions that I didn't list

I assumed that you want a fully-functioning town that won't need repair the very next week due to shoddy, do-it-as-fast-as-you-can workmanship.

I assumed that the town must be self-supporting.

I assumed that there are no logistics outside the 50,000. In other words, nobody is sending food and materials (like replacement tools... that's a big deal) during the construction phase.

There are a lot of things you could do to get that town built quickly (say, within six months), if you're willing to suffer the consequences. But, since you didn't indicate any of this in your question, I assumed the worst-case requirement of a long-term self-sustaining town.
Comment: Not even today a single person can build a moderately sized building in few days. Assuming no magic is involved answer a question which is not the OP's one.
Comment: To accelerate this, by a lot, do it like the roman army.

Forget stone buildings, use tents instead. Make the settlement as compact as possible (18 km^2 is way too large).
Forget stone walls, use palisades (and add motes etc when time allows) instead.
They even carried the stakes for the palisades with them.

That should get you to a setup of a basic fortified camp in no time at all, and it can be expanded in days or weeks with earthwork.

Once the camp is save, then its time to set up a more permanent residence.
Comment: @LazyLizard no no time. From sources: roman legion, 4500 people, can erect camp in 4 hours.  Poorly trained in 6. Record little less than 3 hours. Heavy Camp (or Winter Camp) with heavy palisade, 4 side gates and 12 scout towers, reinforced with rocks, big mot and wooden houses for soldiers and animals in one week.  But remember that that are temporary structures, they last year or two then need to be rebuild from base.
Comment: @k_z Hours are basically no time compared to years. Thats what I meant.
Comment: @L.Dutch Did I miss something? The question is not tagged [tag:magic], the OP didn't say that magic was involved in the construction, and the OP was asking how long it would take to build the town - and I answered that question. I asserted the dispelled myth because I don't know if the 1-2 day number was due to magic or due to the OP's not understanding construction requirements.
Comment: @k_z Actually, you and LazyLizard are underscoring my final point about the OP having the option to choose to build the town quickly - but with consequences. The OP didn't tell us how long the town had to last (which is why I assumed a permanent town), but if all they need is 1-2 years worth of time, the Roman Legion data you posted would be fabulously valuable. Indeed, both insights (Lazy's start-with-temporary-then-build-permanent observation and your observations about the Legions) are quite valid.
Answer: Frame Challenge
Under the given circumstances (medieval period with magic monsters that only attack during night) there is no reason to encompass the whole settlement in a wall. More likely they would build a fortified central keep (or for that size of population a few scattered over the area) and return every night to the keep to sleep in safety.
An actual wall all around the town would probably take years after the town is mostly developed (which would also take years). I think you should count in decades until the town is in the state you describe (fully selfsufficient developed town with an complete exterior wall).
A possibility would to start with something akin a roman era fort. With a trained legion it took only a few hours to built up a fortified camp to start with and only a few months to built it into an actual fort (with a wooden wall!!!).
From there on the village could grow over time with new sections of walls being built every few months.
Answer: I'm going to cite a very strange source in saying that in the Little House books, Pa manages to build a one room claim shanty in one day with only one other person. Granted, they used milled boards, but using my own experience building/ being outdoors.
Assuming that materials are plentiful, you might have a group of 6 people build a reasonable sized cabin in a day if the others could give them the resources required. So if a third of the people gathered resources the second third built and the last guarded that means you'd be able to have 2777 houses built in a day which has everyone with a house by the end of 18 days.
Of course, that's assuming that the 50,000 people are able-bodied reasonably trained men who each want their own house, if there are families the result would be different.
However, one last thing to note is planning. I don't see how logistics or monsters would be a problem, but having 50,000 people coordinate to build a town would be a nightmare. Who's managing everything and how are they going to get everyone to build in a circle. These questions while important for world building can be easily fixed by an intelligent leader or an already existing feature on the land which facilitates such construction.


What do developed nations do with organic municipal waste?

Question: What do developed nations do with organic municipal waste? Are there separate receptacles in addition to bins for plastics, glass, metals, etc.? Is organic waste then transported for anaerobic digestion or composting? By "developed nations" I mean "nations that have developed and sustainable waste management systems" (not the two-bin US or the incinerating Japan, for instance)
Answer: I don't know that any nation has a uniform system of domestic waste collection and processing/disposal. Waste collection and disposal systems are usually determined by municipal councils, either individually or in collaboration with neighboring councils.
For the past 25 to 30 years, depending on where I have lived, my experience has been each household is supplied with three colored bins by the local council for curbside collection. One smaller bin is for general household rubbish that will be either dumped in to landfill, burned in power generating incinerator or "processed" by other means. This bin is put out each week.
The other two bins are for recyclables and for garden waste respectively. These bins are put out on alternate weeks. On odd numbered weeks it might be the recyclable bin and on even numbered weeks it would be the garden waste bin that gets put out. In addition to this, some councils have a system where they collect larger amounts of garden waste twice a year. The councils inform householders at the start of the year, on which two dates, six months apart, it will collect additional garden waste for their region. These dates are usually in spring and autumn. For a week prior to those dates, householders can prune, chop and tidy their gardens and place the additional garden waste in large heaps on the curb or verge outside their houses.
Upon collect, all garden waste, is turned into compost or mulch which the council then sells to whoever wants to buy it.
Comment: I guess you were talking about American suburbia, weren't you? I was talking about cities, urban practices (in Europe, most of all)
Answer: Generally the best uses of organic municipal waste is by extracting whatever biogas you can, created in anaerobic conditions, and injecting that biogas (methane) into the natural gas network. Generally you can't make enough methane that way so only small percentage of the total used methane is biogas and most of it is still natural gas, but it's a very useful way to reduce the use of the natural gas somewhat. Also the organic waste is then decomposed and becomes new soil used for gardens for example.
That's for sorted organic waste. For non-sorted waste, it is directly burned to energy, and that energy is used to create district heating (if in a cold area where heating is required) and electricity. If in a warm area where heating is not required, only electricity is produced.
Comment: You answered a slightly different question, "What SHOULD developed nations do with organic municipal waste?"
Comment: How is it collected?
Comment: Usually waste is collected as separately sorted waste, such as waste bin containing only organic waste, and a waste bin containing only energy waste (and there are different bins for paper waste, cardboard waste, metal waste, plastic waste, glass waste, electronic waste, batteries, etc). Yet some people throw organic waste into the energy waste bin.
Comment: What exactly is energy waste?
Answer: My council collects food waste and turns it into biogas which is used in the municipal vehicle fleet - mostly buses and caddy type vans, etc.
We put our food waste into a separate bin, which is collected weekly.
Comment: I think the practice is fairly widespread here, although my Council is a bit more sustainably minded than many of the rural councils here. I think councils in other Scandinavian countries also do this - I live in Sweden.
Comment: Is it a widespread practice in the place where you live? In what country do you live?


how to create a salesforce rollup field thats not on a master record in pro edtion

Question: I have a object called key account with all the accounts that belong to this key account connected - the connected accounts have a sales total field which i what to add into a total on the Key account, i cant use a roll up and the key account is not a master record??
Any help appreciated
Answer: Use the Rollup Helper app. Since you can't use code yourself, you're limited strictly to whatever you can find that supports Professional Edition.


Installing long 20ft metal poles in concrete around a football pitch

Question: I work at a football club and I need to install some long 20 ft metal poles into the ground set in concrete. My question is how deep must the holes be and what diameter hole needs digging. The poles are ex scaffold poles and are 3 inches in diameter. The poles are being installed to hold up netting behind the goals to stop the ball from going into adjoining fields and roads etc. Thanks for any help
Answer: The primary stress in this case will be wind. Typically you'd embed a pole at a ratio of 1:4. In your case, if the poles are 20' above ground, you'd want to be 4-5 feet down. If your poles are 20' in length (16-17' above ground), 3-4' may be adequate.
I'd probably use form tubes (or cleanly-dug holes) of a 10 or 12" nominal diameter (at least 3 time the pole diameter). You wouldn't want less than 3-4" of concrete outside the pipe to prevent breakout.


What is the best/recommended OS to run a stake pool?

Question: What is the best/recommended Linux OS to run a stake pool?
Answer: Definitely Linux, thanks to its command-line and server capabilities.
NixOS 21 is a worthy candidate.
Comment: What flavor of Linux?
Comment: What about FreeBSD ? Did somebody try it out ? Does it work ?
Comment: For example NixOS. It's a GNU/Linux distribution that uses Nix as both a package manager and a configuration manager.
Comment: Sorry @Jey, I haven't run it on FreeBSD.
Answer: On ARM hardware such as a Raspberry Pi 4B, I highly recommend this Alpine Linux setup written about by some members of the Armada Alliance of SPOs. It does a great job running Cardano static binaries while using very little power, CPU, and memory.
My pool (Adaberry Pi [00000]) runs both Alpine and Ubuntu nodes very reliably on these little single-board computers.
Comment: is it still running with the new node version?
Comment: The RPi 4B 8G runs 1.34.1 without problems.
Answer: I am a Windows expert since 3.0 (1988), and Linux/Unix almost as long.  I am proficient in Windows 2019 and 10.  Although there is a Windows solution for running a Cardano stake pool, I would not recommend it for many reasons.  As far as Linux distros go, Ubuntu is an excellent one that I have worked with for almost 15 years, and I highly recommend it.  It is backed by a successful commercial enterprise, but it is free to the community.  As a Debian fork, it is relatively easy to use and well-supported.  And, if that isn't enough to convince you, the shell scripts and installation documentation & courses are all using it as an example.
One thing you should know, is that Ubuntu labels their OS versions by year and 6-month release cycle.  So for example, 18.04 was released in 2018 in April, while 18.10 was released in October.  The April releases are more proven/solid, the October releases more experimental.  Every other year is a Long-Term-Support release, or LTS, so 20.04 LTS has a longer-term support commitment from Canonical Software.
Also, for the Stake Pool I operate (PLL), I did some research and it is recommended to apply automatic OS updates, so we enabled that.
If you need more help, give us a shout on Telegram at https://t.me/tprevolution
Answer: For cardano-node 1.30.1, it is:

Linux 64-bit (Ubuntu 18.04 LTS, 20.04 LTS; Mint 19.3, 20; Debian 10.3)
Windows 64-bit (8.1, 10)
MacOS 10.13, 10.14, 10.15


cocos2d-iphone-2.0-rc2.tar.gz is not Responding

Question: I have installed the cocos2d-iphone-2.0-rc2.tar.gz but it not showing the list on xCode. Is there any one who can help me.
My Xcode version is 4.3.2
Answer: Run the template installer from the cocos2d-iphone-2.0-rc2 folder:
<code>./install-templates.sh -f
</code>
More details in this article, including how to use cocos2d with ARC.


Poco SocketReactor Scalability

Question: I have written a proxy server for Linux using Poco but have since been reading up on the various approaches to achieving TCP/IP server scalability. I will need the server to handle persistent connections (not HTTP traffic) with an upper limit of about 250 simultaneous connections. Each connection typically uses about 5-10Kb/sec and the best possible latency in handling traffic is crucial.
As it stands I am using the Poco SocketReactor which uses the Reactor model with a select() call at its heart however I have had a read on the C10K problem as well as few other resources and it seems that using this approach might not be the best idea. I believe there is a test implementation in the Poco libs that uses poll() so this could be an option to improve things.
Does anyone have any experience using a Poco SocketReactor and do you have any idea how well it might scale for my scenario? If it will not scale well, suggestions on alternatives would be appreciated.
Answer: On Windows Poco does use select(), however on Linux/BSD/OSX it will use the best possible implementation out of:

select()
poll()
epoll()
/dev/poll

Poco SocketReactor Scalability


Where to store access key for Quickbooks integration

Question: I am having to refactor a Quickbooks integration with Salesforce and am wondering the best way to store the credential information. The first developer used custom settings for most of the credentials and a field on the user object for the access token (since it is more than 255 characters). I need to move the access token elsewhere so that it is not stored in plain text but I would like to be able to easily access it from Apex code. The access token seems to be around 700 characters. Any and all advice is appreciated.
Comment: Does each user have their own access token? Only a few privileged users?
Comment: All users would have the same access token I would think. The integration needs to work regardless of the user. Im not sure the reason it is stored on the user object :)
Comment: Possible duplicate: [Where to Store Token Auth?](https://salesforce.stackexchange.com/q/149921/2995)
Answer: Store it on a Named Credential. It has an OAuthToken field which you can merge into your callouts without ever needing to know its value. And in fact you won't be able to read the value after you set it.
Using the token is easy. Setting it took a little more work. You can see some more about what I did with a similar requirement here.
Comment: You'd just have to play around with it. I got roadblocked by politics and never took the project to completion. But it works; I was able to set up the token and authenticate. And Eric provided a complete and functioning UI that you could pull in and work with so it's less painful to set/update the token values. I recommend you try it and see what you find.
Comment: Is there any solution that doesnt have to use the Metadata API?
Comment: @ZackWalton That's only when *setting* the token. You just have to do it once in an anonymous script, then you can deploy the token to other environments without the need to use the Metadata API in every org.
Comment: The access token needs to be updated periodically and use the refresh token once expired. Maybe Im just not understanding but is this supported?


AES cryptography keys

Question:
What are the three possible values (in bits) for the length of the AES algorithm keys?
Approximately how big is the AES key space?
Comment: a) is literally answered by typing "AES key lengths" into your favourite internet search engine, and b) is an easy computation using those values. What have you tried? Where are you stuck? This is not an online homework service.
Comment: The key space of an n-bit AES key is precisely $2^n$. What is the point of the second question?
Comment: first I'm new in this field and I searched but I wanted to make sure by asking the people here since they know better about cryptography than anyone else.. anyway thank you for your effort
Answer: AES key sizes are 128, 192 and 256 bits. Note that Rijndael has more possible key sizes, so this is not a limitation of the algorithm; it's just what the AES competition had as requirements. Note that the number of rounds and the key schedule is adjusted to the key size.
AES keys don't have any redundancies; each bit directly influences the key space. So therefore the key size is $2^{128}$, $2^{192}$ or $2^{256}$ for the respective key sizes. This is somewhat different from the old DES cipher that also contains parity bits in the full key. More modern symmetric ciphers simply use all bits and try to avoid weak keys.

AES cryptography keys


Is it sufficient to rub an impurity under tap water if the stain is still visible afterwards?

Question: I got an impurity on my trousers. I rubbed the place a little under water. Then I used it, but the stain of impurity was still visible, as the area was wet. It touched my skin. Is the trouser impure? Is the area of my body that it touched also impure?
Answer: You rubbed the place a little under water, but if you know what type of impurity it was and what to do to remove it, then you should use that. Some sorts of impurity needs to be washed with soap or decoloring substances (like bleaching powder), but some are easy to purify by washing in water or using the flow of water.
You have to ensure yourself that the place you suppose to be impure is obvious. No place besides this is impurified. If you can ensure this then comes the point: was the way you used to purify it right?
The answer depends on what type of impurity was there. Organic and oily substances may be cleaned by using soap. If the impure substance is colour changing then you can use bleaching. Note, fruit juice (which is commonly responsible for colour changing) is not impure.
If the impure substance is caused by various human or animal body fluids (feces, semen, blood or urine), this is what you should do:

Feces need to be washed with soap. If it is obvious, especially wash the place of impurity, though you should wash the whole clothing. It looks better.
Blood can cause colour changes if you do not wash it immediately. But, if it stays a long time and causes a colour change then use bleach. Though, I doubt whether the long term presence of blood is impure.
In case of urine, you should wash the whole clothing. This is because you might find it difficult to determine where exactly within the clothing the impurity is.
In case of semen, you obviously need to wash where in the clothing it impurified. If you wash it there that is likely enough to purify it. But, it looks better to not do any sacred activities wearing such clothing. Rather, you should wash the whole of the clothing under water.
If it takes too much time to get the impure place in contact with water, then it produce a spot that is hard to erase. You can use bleach to erase it.

If the clothing is of any non-white colour then bleach may cause harm to it. In that case, it is better wash the whole clothing before performing sacred activities in it. If a spot remains after washing then you should not use that to perform sacred things. (I am not sure about this point, but I tell you this as it is I think it is better)


Is it possible to intercept voice data during call?

Question: I plan to develop Android application which will encrypt/decrypt voice data such that parties can communicate using secure channel. So the question is: how to intercept voice/audio data during GSM call? Is it possible or not? Should I use Android NDK or something else?
Answer: In GSM it is not possible to encrypt the voice and send it through the voice channel due to channel characteristics. The signal sent through the voice channel has to be (similar to) human voice as vocoder (CELP) is used for channel coding.
So even if you had access to low level libraries and used it to encrypt voice to send it directly through the voice channel it would be not possible for the called party to receive and decrypt the signal.
Encrypted voice however could be sent through the data channel as data.
Comment: Never knew that! Very interesting answer.
Answer: This is something that happens in the low level of the operating system. You wouldn't be able to access this information in the application level.
I suggest that you look into VOIP like SipDroid. I bet you'll be able to set it up to use encryption easily. (srtp instead of rtp)
Even if you SipDroid doesn't support this, it's is open source so you could add this feature.
Answer: Call recording is not yet possible on Android. See this feature request.
You can record your voice from microphone, but you can not record the sound of the other party. If you only want to record your voice use android.media.MediaRecorder.AudioSource.MIC
Comment: I didn't mean to record call. I meant intercept live voice data, change/encrypt them "on fly". Is it possible?
Comment: No - you do not have access to call voice data.
Answer: Simple Answer, NO!
Answer: if you are able to access low level libraries and used it to encrypt voice to send it directly through the voice channel off course it would not be possible for the called party to receive and decrypt the signal but if you modulate encrypted voice data and transform this voice data into speech like waveform and send through the voice channel of GSM then surely other party will receive and decrypt the voice.
Answer: I know there are apps that act like voice changer where they change your voice and transmit that thru gsm voice. Maybe you can make an app that takes the voice then modulate it to something like phase shift keying or digital radio monodiale like what hams used in vhf and hf radio communication and transmit the audio to gsm then demodulate it back to voice but instead of straight forward modulation demodulation you can add pgp, aes, or whatever encryption you like. I'm also intrested to see a project like this.
I think it would also be great if you could use this to transmit data thru voice gsm channel like the 56k modems in the past instead of the gprs channel.
See reference
    http://freedv.org/tiki-index.php
http://www.aprs.org


Unconfirmed/Pending Blockchain.info Transactions Returned to Wallet

Question: On 10-26-17, I sent $425 from my blockchain.info wallet to my Coinbase wallet.  As of 10-28-17, the transaction is still pending.  If the transaction is never confirmed, will the $425 reappear in my blockchain.info wallet?
Comment: My Blockchain wallet that is . . .
Answer: The transaction was finally confirmed 56 hours after I initiated it.  I assumed the transaction would be rejected, and the funds would revert back to my BlockChain wallet, but they found their way to my Coinbase wallet.
Interestingly, there was no record of the transaction on Coinbase.  After 24 hours, the network had no record of the transaction.  Anyone viewing my Coinbase wallet would have no idea how the funds arrived in the wallet.  All's well that ends well!


Why is 'ordinary book' translated as 普通の本 and not 普通な本

Question: I have trouble understanding why "no" is used here instead of "na". For example, on Tofugu they translate きれいな人 as "beautiful person" and きれいのヒント as "beauty hints" or, basically "hints about beauty". In this vein, "futsuu no hon" should mean something like "book about trivia/banality". Still, it is translated as "(an) ordinary book". Is there something special about "futsuu" that makes it behave as such?
Comment: Does this answer your question: https://japanese.stackexchange.com/q/2770/9831 / https://japanese.stackexchange.com/a/93149/9831
Comment: Not directly, but it does shed some more light. Thank you!
Answer: Boundary between adjectival nouns (often called na-adjectives) and pure nouns is actually somehow fluent. Some words are used only with な, some words are used only with の, and some words can be used with both of them.
Both "普通の" and "普通な" are considered valid. The former is used about 5 times more often according to Google.
Comment: +1, but there is a difference between the two. 普通な is used by some, but it should be avoided at least in formal sentences. I never use it even in informal settings.
Answer: 普通 is a noun with two meanings 'commonplace, ordinary' etc., or 'normal, the norm'. Hence to make it an attribute of another noun, you would use the 普通の construction. 奇麗 is and adjectival noun so is conjoined with な to a following noun. Your example of 奇麗のヒント sounds like something from an advertisment for beauty products or the like, and in that kind of context non-standard usages are used for the very purpose of being distinctive. Normally, kirei is turned into a noun by the addition of the -sa prefix, 奇麗さ.


Length of varchar column - is there an advantage to using 255?

Question: I often come across columns that are varchar(255), so presumably this is a convention of sorts. 255 is 2^8 - 1. So is there something 'magical' about lengths that are 2^n - 1? Or just specifically 255? Is there a performance or storage optimisation advantage to certain specific varchar lengths? Or is this just old wisdom which is no longer applicable to current versions of MariaDB and MySQL?
Comment: Do you need 255 characters?
Comment: Historical reasons, at least according to https://stackoverflow.com/questions/1217466/is-there-a-good-reason-i-see-varchar255-used-so-often-as-opposed-to-another-l
Comment: @McNets I actually need more than 255, but since that number is used so often, I thought I should use that as an example.
Comment: Simply use the length you need.
Comment: @EvanCarroll thanks for pointing out this question. It's useful and similar, though not exactly the same because I'm asking about 'magical' lengths (2^n -1).
Answer: I rant against 255 occasionally.  Sure, there used to be some reasons for '255', but many are no longer valid, and even counter-productive.
In MySQL, there are reasons to stop at 191, 255, 767, 3071, 64K, and probably other values.  Some depend on Engine, some on CHARACTER SET, etc.
A VARCHAR is stored as a 1- or 2-byte length plus enough bytes for the current text in whatever charset you have specified.  However, the choice of 1 or 2 is not driven only by the individual column; it is driven by the total row size.  That is, this is not a valid excuse for using 255.
Use a length that is

Big enough to conservatively never be exceeded, yet
As small as seems reasonable.

While I am ranting...  CHAR (fixed length) is rarely advised.  And almost always it should be CHARACTER SET ascii -- country_code, postal_code, Y/N, M/F, MD5, UUID, base64, etc.  (MD5 and UUID should be taken a step further, but that is another rant.)
Potential negative impacts of blindly using '255':

If you have a lot of columns, you could hit a max row size limit and CREATE TABLE will fail.
You could overflow a limit on index size.
Complex SELECTs may need a temp table, and may use MEMORY for it.  In this case, VARCHAR(255) becomes CHAR(255) for the temp table.  And, if using utf8, that is 755 bytes for every row!  (8.0 fixes this design flaw?)

Related:  Don't blindly use BIGINT for all numbers.  It takes 8 bytes.  Even INT is overkill, at 4 bytes.  See MEDIUMINT, SMALLINT, and TINYINT.  Be aware that the (2) on INT(2) means nothing; it still takes 4 bytes.
Comment: MySQL-8.0.13+ uses [TempTable](https://dev.mysql.com/doc/refman/8.0/en/internal-temporary-tables.html#internal-temporary-tables-engines) by default for temp tables which has efficient storage for varchars.
Answer: At one point in time, that was the max length of a column in Sybase, and the derived SQL Server. I'm sure others copied it to maintain compatibility so that migrating applications / SQL to a new platform wasn't difficult, as everyone was fighting for market share back in the day.
There's no real good reason to perpetuate it, other than compatibility.  I've noticed that it seems to have been replaced by varchar(max) these days.
Comment: This in interesting precise historical example, which could add some value to this Q&A. Some cited source would make it stronger, though.
Comment: (Oh, and welcome to [dba.se] !)
Comment: @Pac0 Ha, unfortunately much of the reference is found in paper manuals from back then ;)
Answer: "Standard" column lengths are used all over the place, and invariably indicate there was no effort performed to understand the actual required length of the column.
If you have a column where there will never be more than 24 characters used, why specify the length of the column as 255?
Analyzing and using the correct length for variable-length columns takes a small amount of effort, and ensures side effects of using too large a column length never become a problem.  I know your question is about MySQL, however this answer shows how SQL Server uses column lengths in various ways that may not be apparent at first.
Answer: We've taken a completely different rule now. We use one of two things:
`NVARCHAR(max)`

if it won't be indexed.
`NVARCHAR(400)`

if it will be indexed.
Generally speaking we believe that limits are obsolete and we really shouldn't care anymore. Disk space is cheap.  The 400 ensures the index can always be created on the most restrictive target platform. It is my understanding that the 255 index limit on MySQL is gone else I would have written 255. The thing about VARCHAR is you will not be penalized for allowing it to be bigger than it needs to be so there isn't much downside to being too big, so we just set it big and don't think about it anymore.
Comment: @MickleForetic: The same rule is in play for memory space these days. It's just not that expensive that it's worth the crippling effect of guessing too low.
Comment: I agree that disk space is cheap, but we are talking about memory space here. The main point of using a database is to be able to query and sort data, not just store it.


example of a compact quantum group at a root of unity?

Question: In Woronowicz's theory of compact quantum groups, the most well-known example is $SU_q(2)$, for $q$ a real number. Moreover, all the other examples of compact quantum groups, based some Drinfeld--Jimbo dual, that I can find, are for $q$ not a (non-trivial) root of unity. Does anyone know of an example of a compact quantum group at a root of unity?
Answer: This is impossible in the usual sense. For example, you can look at the dimension function on the representation category of $SU_q(2)$. The quantum dimension of the half spin representation is $|q + q^{-1}|$, and in general the quantum dimension cannot be smaller than the usual dimension.


what is UC input for a relay?

Question: I just faced "UC input" while reading a Relay's catalogue. In the catalogue it has been told that the relay can have DC input,UC input and AC input. so what is UC input?  I searched for it but didn't find anything useful.
Comment: Can you provide a link to whatever it was that used "UC Input?"
Comment: Just googled this up and found it [here](http://www.weidmueller.cz/files/download/download-sekce/product-catalogues/relays-and-optos/1427050000-cat4-2-0i-viii-en.pdf): Input UC, 24V UC, etc..
Answer: Standard a relay is designed for VAC or VDC input only. In the case that the relay input is designed for VUC both kinds of supply are allowed.  In other words. It is safe to supply the relay with VDC or VAC. The letter U stands for universal. A little rectifier is build in the relay to make this possible. The danger of burned relays because of using an VAC relay when a VDC relay is required is gone that way.
Comment: so if the catalogue  says that the relay can have 48 V UC as input, it means that both 48 V AC and 48 V DC inputs are possible?
Comment: That is correct. The advantage is that the user no longer has to find out what is needed

what is UC input for a relay?


does WD My Cloud work like dropbox?

Question: Does WD My Cloud work like dropbox? I would like to sync a folder in real time between different computers. I thought if WD My Cloud works like dropbox, then it would be cheaper to buy it rather than using dropbox, googl drive, or onedrive.
Answer: yes.
Pretty much. For your purposes anyway. I think of it as a secondary iCloud. There are some slight differences in terms of niche features, but the core product is essentially the same as most client-server cloud storage and synchronization services.
but..
The main difference is that Dropbox is marketed as more of an offsite remote file-storage directory, like an online USB thumb-drive for sharing certain files between several devices. Whereas the Western Digital services GUI is more suggestive of an automated full system backup solution for the prevention of data-loss in the event of a catastrophic system failure. However, their actual functionality's remain largely indifferent.
also;

NAS (Network Attached Storage).
rSync (Remote Sync). rsync.
Wget (Web Get). wget.
cURL (URL Client). curl.
SCP (Secure Copy Protocol). scp.
Answer: WD My Cloud devices are NAS solutions for file sharing withing a network and over the Internet.
NAS devices act as network folders that can be accessed from any device connected to the specific network and, with the proper settings, can be accessed over the Internet, just like the online cloud services you mentioned. A NAS is basically pretty much any storage device connected to a network through a router that can be accessed over that network from another device. A simple example would be a basic external storage drive or a thumb drive connected to your router's USB port that can be accessed through your phone for data transfer from and to it over the internal Wi-Fi.
WD My Cloud devices offer a bit more features such as torrent clients, media serving and other features as well as scheduled or continuous backup solutions.
In your case you can have a folder on the My Cloud device and have access to it from multiple devices either from the WD My Cloud application or from other applications (depending on your preference or need).
Answer: My Cloud is nothing like Dropbox for files or videos.
In DropBox you can use Window Explorer and its just like another drive.  You can scroll through photos quickly.
My Cloud you have to open each file individually and its not like having a useable everyday drive on your computer.
This is the most important feature for the average users.
Here is the relevant info:
WD MY Cloud
Excerpt:

My Cloud is a private personal storage unit that plugs into your home network. It automatically backs up and centralizes all your content in one safe place no one can see but you.
Comment: Welcome to Superuser.  Please take the tour at https://superuser.com/Tour to get the most out of this site.
Answer:
Does WD My Cloud work like dropbox?

What "works like" means for you? It's like "does a Tesla works like a train?" - yes, both have wheels and electric engines; but there are still differences...
So, both are backup solutions, but there are quite big differences:
Cloud providers (like dropbox)
pro:

your data is automatically synchronized
don't need to maintain devices
data is stored in multiple locations (protected from hardware failure / disasters...)
data is available from everywhere

con:

you don't "own" the device

Personal hard-drive
pro:

you "own" the hardware
synching within your home probably will be faster

con:

data protection is your "responsibility"

both from hardware failures and hacker attacks

remote availability depends on your home's internet connection and works only if your home is connected to the internet (no availability during power outage)
probably slower performance if you travel far from your home

I intentionally didn't included cost; it depends on a lot of factors.

does WD My Cloud work like dropbox?


Sum of two unbounded self-adjoint operators

Question: Let $A$ and $B$ be two unbounded self-adjoint operators. From this mathoverflow post, for instance, we know that $A + B$ is self-adjoint on $\mathcal{D}(A) \cap \mathcal{D}(B)$ if $A$ and $B$ are commuting and positive operators (Putnam's book is cited as a reference there). My question is: assume $A$ is positive and $A$ and $B$ commute. $B$ is not positive though, but $B$ is a relatively bounded perturbation of $A$. Could we still say $A + B$ is self-adjoint?
Comment: I don't know what 'relatively bounded perturbation' means, but maybe the top answer in the linked post would help? That answer suggests you should think of $A$ and $B$ as multiplication by measurable functions on $L^2(X,\mu)$. Is it possible that there would be 'cancellation' that enlarges the domain?
Comment: Have you looked at Kato's book *Perturbation theory for linear operators*? It has a whole chapter that deals with questions of this kind.  The most used perturbation results are there.
Comment: The sum of two commuting s.a. possibly unbounded operators is always self-adjoint, it is just that in the general case one has to use a more subtle definition of the sum.  Rather than the algebraic sum as described above, one takes its closure.  Both facts become quite transparent if one uses the fact that the operators can be simultaneously diagonalised, i.e., represented as multiplication by measurable functions on an $L^2$-space (spectral theorem).
Answer: This will work if you take the assumption that $A,B$ commute in a sufficiently strong sense (commuting resolvents would be enough). Then no extra assumption is needed.
There is a version of the spectral theorem that says that there is a projection valued measure that represents both $A$ and $B$:
$$
A = \int s\, dE(s,t) , \quad B = \int t\, dE(s,t)
$$
See here.
Clearly this makes $\int (s+t)\, dE(s,t)$ self-adjoint on a suitable domain. Note, however, that this domain is not necessarily $D(A)\cap D(B)$, as simple examples show (multiplication by $|x|$ and $x$).
Comment: Very nice answer! Suppose we take the following example: $A = \Delta$, the Laplacian on the torus, and $B =  ik\frac{\partial}{\partial x_1}$, where $k \in \mathbb{R}$. Clearly they commute. But I am not sure whether they strongly commute in the sense you describe. Could you please shed a little light on this point? Thanks!
Comment: @amano: This definitely works because you can use the Fourier transform to (simultaneously) make multiplication operators out of both of them. (So you in fact don't need any general theory to make $A+B$ self-adjoint on a suitable domain.)
Comment: @amano $ikX$ is relatively $\Delta$ compact, in particular, it is relatively $\Delta$ bounded with relative bound $0$. Then see my answer below.
Comment: @ChristianRemling Is there any way to read the spectra of $A$ and $B$ from these two variable projection valued measures? In the single variable case, we know that Spec$(A) = $ supp$ E_\lambda$, where $A = \int \lambda dE_\lambda$.
Comment: @SMS: I think there's a similar description here: $x\notin\sigma (A)$ if and only if $E(M)=0$ for some set of the form $M=(x-\delta,x+\delta)\times\mathbb R$.
Comment: So then, we should also have $x + y \notin \sigma(A + B)$ if and only if $E(M) = 0$ for some set of the form $M = (x - \delta_1, x + \delta_1) \times (y - \delta_2, y + \delta_2)$. Do I understand this correctly? Thanks!
Comment: @SMS: No, for an analogous criterion for $x\notin\sigma (A+B)$, you would need $E$ to be zero on a neighborhood of $\{ (s,t): s+t=x\}$.


How do I write a strong hook for an argumentative essay?

Question: The scenario is to write a hook for an argumentative essay. The topic is "Can tigers be kept in zoos?", as they have less space in zoos compared to nature, and for other reasons they should not be kept in zoos.
Answer: In this answer, I will list one way to do this (if I think of more I will add to this or make a separate answer).
It is always good to interest your reader right off of the bat.
So, as M. A. Golding suggested, do some research on your topic first. Then, pick a fact that stands out to you.
This could be an interesting fact (such as __ was invented back in __ by accident), a quantity (such as __ people died during __), or anything that would encourage a reader to keep reading.
Once you have picked one, you can incorporate it into your first paragraph. It's also a good idea to come back to that fact during your conclusion - to create a nice rounded effect.
If the fact worked, then your reader will be intrigued/hooked and will decide to read more.
For example, if your essay's theme was "can tigers be kept in zoos", you could start by saying (depending on which side you are arguing for) either "__ number of tigers die in zoos each year, or "it's been proven that baby tigers develop better with human care" (I just made that up).
Then, in the end, you can round back by talking about the starting fact. You can also elaborate on why you chose the fact and how it was important because the reader would have read all the other info, so they would be ready for a deeper look at the fact in the conclusion.
Answer: Maybe you should do some reasearch, maybe on the internet, for stories about tigers in zoos.  If you find a bunch of interesting, or happy, or tragic, stories about zoo tigers, maybe you can find one which seems to relate to the subject of your essay and support your agruement.


Temp gage randomly stops working while driving and ac doesn't work. 2015 Chevy cruze

Question: I have a 2015 Chevy Cruze and randomly my temp gage stops working and my ac doesn't run. I changed both the coolant sensors and if I disconnect the battery and reconnect it then everything runs correctly but I have to do that probably at least once a day. Any suggestions?
Answer: Your vehicle is probably setting a code for some type of coolant sensor fault. That code then disables the AC and makes the fans run on high because the car is in a limp mode. If the car doesn't know the coolant temp it will do everything it can to cool itself down including not get hot like running the AC. Disconnecting the battery clears the code and gets you out of limp mode.
check the code and diagnose as prescribed. If I had to guess it is a wiring problem.

Temp gage randomly stops working while driving and ac doesn’t work. 2015 Chevy cruze


Creating an executable file without a compiler

Question: I came across an article a long while ago on how to write out a .com file directly without using any external tools. The method was to basically copy con myfile.com and then hit ctrl+alt+number for each instruction.
I've lost the url for the guide... Google isn't helping much either.
If you have the link, please could you post it.
Comment: I don't have a good reason :) . It just seemed like an interesting thing to learn.
Comment: I know I probably shouldn't ask, but why?? Do you miss entering bootstrapping code on your IMSAI with the front panel toggle switches?
Answer: You don't need an article for it; what you've described is the entire tail end of the process. Just make sure you use the keypad numbers and not the toprow numbers.
For the beginning, you'll need to hand-assemble the program. Unless you're into pain I recommend you find yourself an actual assembler or compiler instead.
Comment: Well, it's just a nice 'party trick'... If I'm not able to find the answer in another couple of days, I'll just mark your answer as accepted :- ).
Answer: Insipred by Ignacio Vazquez-Abrams I found this link, which uses ECHO in stead of COPY CON.
Answer: There's also debug.exe that comes with most versions of Windows before Vista.  You can use it as an assembler, disassembler, debugger, etc. and also code COM executables with x86 assembly with it.  It may or may not fit your definition of a "compiler".
Answer: The article Legion2000 SR iqlord's eXtreme coding describes the process, and has a list of the alt codes with related asm and hex values.
The article that got me interested in this topic was Bootstrapping a simple compiler from nothing.  It looks like an interesting challenge, but I haven't tried it myself.
Scheme from Scratch is an example of someone working on the challenge of bootstrapping a compiler.
Answer: This is doable because .com programs aren't relocatable, so they don't need relocation tables, so the header is a fixed size.  Not true for .exe files. I don't recall the header details off the top of my head (believe it or not, I used to!), but if you dig up one of the bibles of the old religion like "Undocumented DOS" or anything that talks about writing TSRs those should have info about the .com header.


Quoridor jumps at the edge of the board

Question:
It's white's turn to move. The uppermost squares are at the edge of the board. In the first figure and second figure, which arrows are legal? If the upward arrow is illegal in the second figure, then if black's pawn and walls together block all the paths to the edge, is it illegal for black to place walls in that position?
Answer: from the rules here

When two pawns face each other on neighbouring squares which are not
separated by a fence, the player whose turn it is can jump the
opponent's pawn (and place himself behind him), thus advancing an
extra square (fig.6). If there is a fence behind the said pawn, the
player can place his pawn to the left or the right of the other pawn
(fig.8 and 9)

So in example one the white player may not move ahead as that goes off the edge of the board.  If the white player wants to jump the black pawn they may move left of right
In your second example the black player with walls either side blocks access to that specific square they're are in.   I don't think they "block all the paths to the edge". As white can move backwards and go around to left or the right.
If it is possible for a player to reach the opposite side of the board, no matter how long the path, then they do not have all paths to the edge blocked.
Comment: Ah that wasn't clear to me from your picture.   I suppose it's not permanently blocked at eventually the player will run out of walls to place and be forced to move so it's probably ok.  However as the rule is 'an access to the goal line must always be left open' then maybe black was not able to build the wall in that situation.  the situation you describe does feel a very unlikely edge case though.
Comment: In the second figure, as you said it isn't blocking all the paths, but what I meant was what if black already blocked all the left and right sides with horizontal walls.
Comment: Yes it is very unlikely, and I agree that it would be ok to allow placing walls. I'm writing an AI for quoridor, and if the rule doesn't sufficiently clarify this matter I would allow placing for simpler implementation.
Answer: According to these rules, yes, you can jump to the side of a figure on the edge, but you cannot jump straight over (off the edge):

If an adjacent square is occupied by another pawn, a player can jump over the pawn. If the square in the direction of the jump is accessible (i.e., not blocked by a wall and within the boundaries or the board), this is the only possible place where to jump to. If the square is inaccessible, a player can perform an L-shaped jump by following the direction to the pawn and then moving left or right of the pawn, provided the respective squares are accessible.

This thread on BGG, also confirms.

Quoridor jumps at the edge of the board


For connecting two micro which one is better, UART or RS232?

Question: I'm trying to connect two devices which in both of them use pic micro. I am curious to select best connection solution. I can use uart for connection between them and also with helping of MAX232 rs232 connection could be used. Anyone with experience have recommendations about it? Which is better and what are their advantages and disadvantages?
Comment: UART is a functional block for implementing serial communications, not really a protocol or signal voltage specification.  It would be much better to say "logic level" vs. "RS232 level"  Either way a UART (or whatever your vendor calls it - USART, UCI, etc) will likely be involved, the question is if you will also use external line transceivers.
Comment: How far are the devices apart, and how are they connected (PCB traces, wires)?
Comment: Tow devices separated of two meters and for connection wires will be used.
Answer: UART
Cheaper, since you don't need any extra hardware.
EIA-232
(the name RS-232 is obsolete.) Will give you better noise-immunity, because it uses higher voltages and has lower impedance.
EIA-422
has an even better noise-immunity, thanks to the balanced signal, but unless your environment is extremely noisy (think high power electric machines, like several kW) you probably won't need it. You would need differential transceivers, and twisted wire cable.
Comment: Though maybe not applicable here, isn't RS-422 also better suited for long distances?
Answer: The comment from @chris-stratton is correct and an important point. If you are talking about using EIA-232 or EIA-422 you are almost certainly talking about using a UART as the functional block that performs serial communication. And as @stevenvh said, EIA-232 is not a good choice for a new design. So, do you need to add an EIA-422 transmitter/receiver to each microcontroller? There are several things to consider.
One of them is speed (bits per second). At high speeds the UART output pins from your microcontrollers may have trouble driving the capacitance of two meters of cable. The microcontroller is capable of driving a few cm of wire to a 422 transmitter at high speeds, so if you need high baud rates you might want to use 422 just for that reason.
Another consideration is common-mode voltages. If you use the raw UART pins to connect the microcontrollers then you must also connect the grounds of the two microcontrollers. Depending upon the physical situation and how the boards are powered, the ground levels of the two boards might be different. There might be other good reasons for not connecting their grounds together, and if that's the case then using a differential signalling scheme, like 422, will allow the microcontrollers to talk to each other even if there are several volts difference between their ground levels.
You can get 422 receivers and transmitters in fairly small packages at low cost, but there are disadvantages to using 422 instead of directly connecting the UARTs. Since 422 is differential instead of single-ended you need two wires
each for the two directions of information flow and a termination resistor at the receiving end, where a direct connection would require three wires (signals
in both directions plus ground) and no termination resistors. The dc current consumed by a 422 connection is several milliamps so the increased power consumption (on the order of 100mW per transmitter) might also be an issue for you.
You should also consider LVDS (low-voltage differential signalling, EIA-644) which works at lower voltages and consumes much less power. The disadvantage is that the common-mode range is reduced, but over 2 meters that might not be a problem for you.
Answer: For 2 meters you might or you might not need MAX232 to convert levels. It depends on the bitrate. I think that for 2 meters it's safe to use 0-5V level for up to 9600 bits/s. For higher rates you should use MAX232. Note than MAX232 will increase the voltage difference  between 0 and 1 from 5 V to about 18-20V (from -10 to +10V).
But if you use shielded cable you can safely use TTL levels for a bit higher bit rate if you shielded cable. The only problem would be cable capacitance. If you don't have oscilloscope to measure rise time go with MAX232 to be 100% sure. It'll also allow you to extend the cable for up to 15m later.
Alternatively (because max232 requires a lot of components) if power consumption is not that big problem (if not battery powered) you can from 470ohm to 2k resistors on RX pins of MCU. This will increase the current on the wires and reduce the chance noise to interfere.The cable capacitance will still be an issue, so be careful with higher speeds


How does the logistics work of a Chaos Space Marine Warband?

Question: Raiding can't always be the only answer to get supplies. Maybe getting supplies from a Hellforge but that can be expensive. A Warband should want to stay relatively hidden to not get a Chapter chasing them with or without Imperial detachments to grow and getting stronger. I know its traitor legion dependent but they still need to worry about logistics (even World-Eaters).
Answer: The logistics are crazy.  First check out this page; scroll a bit into the chat and you'll come to Frater Dominus' post.  Frater Dominus is actually Aaron Dembsky-Bowdon, renown Black Library Author who is wildly respected as the King of Renegade Astartes Fluff.  It doesn't get much more authoritative than that!
In essence it breaks down a couple different ways, leaving aside raiding Imperial facilities and doing deals with Hellforges.  I've listed them here in no particular order

Doing a deal with "friendly" warbands.  Maybe you're all from the same legion, maybe you're old allies from a Black Crusade, maybe you hate each other but feth it, you need supplies.  So you do a deal.  "I'll swap you 30 slaves and a thousand lascannon power packs for your 40,000 rounds of bolter ammo and spare tracks for a land raider." So you steal what you can from raids on imperial outposts/other chaos warbands, and then swap extra stuff for what you didn't steal. Or maybe your overarching warlord (Abaddon the Despoiler, say) commands other contingents to give you weapons/ammo/food because he wants you to be efficient tools.  or maybe an allied warband gives you XYZ things because THEY want you to take the risks of attacking position Alpha, and you're willing to take that risk because you need XYZ SO BADLY.

You have tributaries.  Maybe it's a world that was friendly to your Chapter before you turned, so you put on the old colors and collect the old tithes because its easier than starting a fight and since the Inquisition purged your records and astropathy is hit-and-miss these idiots never got the memo that you're renegades.  Or maybe you have worlds in the Eye/Malestrom that owe you fealty.  They make boltrounds/harvest promethium for your flamers or whatever and in exchange you keep them from being ground into extinction by some OTHER chaos warband.  "nice city there, be a shame if someone nuked it from orbit" is a POWERFUL motivator.

You own a world of your own.  You're a fething Chaos Marine Warband! There's 110 of you! You're the most horrific warriors to ever exist so of COURSE you conquered a place.  Raised up an army of mortals to be your lackeys/cannon fodder/guard it when you're gone.  Said world is rich in certain resources, so you do a deal with a Hellforge to trade its mineral wealth for weapons.  Or maybe you're also sheltering some Hereteks/have some heretek slaves who produce more-or-less all of what you need. Or maybe it's a pretty populous planet that has no problem keeping 110 marines and and old cruiser supplied.

You have a construction ship.  Maybe you captured a mechanicum forge-vessel from somewhere.  They're pretty widespread and provide a wealth of materiel for campaigns.  It's great! Can turn all sorts of raw materials into weapons and sundry other supplies.  You only need the raw materials.  So you occasionally set up shop on mineral-rich asteroids or do deals with sketchy rouge traders or xenos who don't care you're chaos worshippers as long as the price is right.  What price do you pay?  Maybe a percentage of the finished goods.  Maybe you attack a rival for them.  Maybe the price is that you don't turn their planet into a hellscape covered in corpses.

You've done a deal with Devils.  The warp is a WILD place.  The Eye of Terror is full of demon-worlds that do nothing but craft swords for khorne's legions, or distill human souls into fine wine, or anything else you can think of.  Maybe your warband's sorcerer has made a Pact with one of the Demonic lords that rule such worlds.  You offer it your warband's worship, or a specific amount of sacrifices, or the purging of a certain world or anything else demons pact with mortals for.  In exchange, the Demon's worlds provide you with bolters that never run out of ammunition, or a ritual that turns its victims into armor panels that can repair your tanks/ships, or a creepy cornucopia that endlessly supplies promethium.  The possibilities for this one are literally limitless.... as long as the Demon lord is appeased...
Comment: that is a wonderful answer, and thank you very much for the link and the information about my second most beloved author
Answer: Raiding probably is the biggest source of resources for warbands(at least the Night Lords trilogy suggests so). There are a few things you need to take into account

Space ships are big and largely self-sufficient(some resources such as fuel and spare parts can run out, but in terms of things like food and water, they can produce/recycle their own). Warp capable ships are massive, and expected to hold enough supplies to last months or years between resupply(since there's always the chance of getting lost in the warp, and travel generally taking a long time)
The imperium is massive, and the distances are long. If they attack, say, a remote supply depot, it may well be weeks before anyone even notices, and months before it's investigated. By the time anyone notices, the trail will likely have grown cold.
Related to the above, there just aren't that many loyalist space marine chapters. If there are a million worlds and a thousand chapters of space marines, there just isn't enough to chase after every raid, whether traitor marine, other chaos force, or some foul xenos.
In some cases, they may even want to be chased by loyalist space marines: After all, any space marines chasing after them will have many supplies that are hard to find elsewhere, such as astartes-pattern power armor, bolters and other supplies specific to space marines(and of course, geneseed).
Time flows differently in the warp and eye of terror. What has been 10 millenia for the Imperium, has in some cases been only centuries for a particular warband. So in some cases, there's  no need for raids that would be frequent from the perspective of someone in the real space.

Combine the above with alternatives to raiding as suggested by Dario Quint in the accepted answer, and it's quite easy to see that warbands can maintain adequate supply status without a steady base(although having one certainly helps massively).
Answer: Chaos Warbands usually have a home planet / base of operation (emphasis by me):

Oliensis - Oliensis is a Daemon World located in the Eye of Terror that is devoted to Slaanesh, the Prince of Pleasure. The entire planet is actually a colossal morbidly obese man curled into a fetal position. The surface is home to hordes of Slaaneshi daemons and also serves as a base for Noise Marines of various Slaanesh-dedicated Chaos Space Marine warbands.
From the Daemon World article on Fandom

So, they can use their base of operation to produce what they need for their raids. But with the capture treasures of a raid, they can pay the Dark Mechanicum for the other goods they can't produce themselves.
And for the Warband not to be chased by a Loyalist Chapter is the reason for them to often have their base of operations within parts of the galaxy not accessible to the Imperium, e.g. the Eye of Terror or Maelstrom.
Comment: @Fuchswille How you figure that most warbands don't have a planet (or part of it) they control? There might be some fleet based warbands, they might be more raid oriented than planet based warbands. But there is no indication that most warbands do not have a planet as a base of operation. Furthermore, they need ties with the Dark Mechanicum to keep their armoury (weapons, armours, ships etc) running. So, a warband without alliegences cannot operate at all!
Comment: but what if they dont have control of a demon world, like most warbands?
Comment: after the black crusades more and more get away from their to far thinking warmaster(abbadon) and i figure that many tried to get power in the imperium and they themselfs have dedicated units to hunt those threats down so the warbands cant get important worlds that have the ressources to keep the warband supplied