Why such a strong action by a moderator by deleting a meta question thread post for being courteous?

Question: I just had a response in a question thread deleted because I said "Thanks" for a well considered response.  The issue I am discussing regarding a knowledge wiki for basic, constantly repeated answers is appropriate. Having the post deleted is like a slap down.  Very rude!  The comment by the moderator is appropriate, the act of deleting the entire comment is a real turn-off/put down to someone new trying to participate on the site.
Answer: It has been deleted because it is not an answer to your own question; it could be a different question, but it's not an answer to your own question. The fact you started with "Thanks kiamlaluno," made it seems as you were replying to me. In your "answer" you then say, "Please let me know if you think such a resource makes sense here at Drupal Answers." which makes it another question altogether, as you are implicitly asking "Do you think such a resource makes sense here at Drupal Answers?"
SE sites are not forums, and answers are not threads; this means there isn't a continuous feedback between who asks a question, and who replies.
In a forum, a user would wrote a post, somebody else could ask a question to which the OP replies, then the other user could answer to the question asked in the post, the OP could say the other user is still not understanding what he is asking, etc. on SE sites, including meta sites, you ask a question, and you get an answer; if there is something you don't understand in an answer, you can ask that in a comment for the answer, but if the exchange of comments become too long, you get the suggestion to continue the discussion on a chat room appositely created, as comments are not thought for discussion.
Comment: If you have any follow up, you should report that in a new question. Stack Exchange sites are Q&A sites, not discussion web sites; this means that what is allowed, or not, is more restrictive than what a forum site would allow. It's not a matter of being bureaucrats; it's just a matter of defining what is welcome, and what is not welcome. On Stack Exchange sites, it is already defined what is welcome.
Comment: I appreciate your response. My follow up expands on the ?, addressing how the site can be used or maybe improved.  Your answer was informative but immediately leads me to further clarifications & expansion ?s.  In this way it is similar to a forum discussion.  I believe there should be accommodation for following up & these comment boxes are too limited in size & features to do it in.  I came to this site because of the high response rate to ?s, & like helping newcomers when I can.  The ? & followup is on topic! Let's not be intolerant bureaucrats. I'm out of space in the box.


Is this an example of the fallacy of affirming the consequent?

Question: Would this be an example of the "fallacy of affirming the consequent"?

If suspect X did the deed, then we would find evidence A, B, C and D. And, yes, look, here is evidence A, B, C and D. So suspect X is the felon.
Comment: Correct. See [Affirming the consequent](https://en.wikipedia.org/wiki/Affirming_the_consequent).
Comment: @Paul Ross : There are two answers to your affirming the consequent question. I realise you asked the question a while back but there are responses you might be interested to consider. All the best : Geoffrey Thomas
Comment: @GeoffreyThomas Paul Ross is not the one asking the question. He merely edited the question.
Answer: The fallacy of affirming the consequent can be set out formally :
p → q
q

Therefore p
We cannot validly infer the antecedent 'p' from the conditional schema and the affirmation of the consequent 'q'.
The conditional could be true ('If p then q') and the consequent, 'q', true. Yet 'p' could be false. This would violate the rule that a falsehood cannot be validly inferred from truth(s) :
If p then q (true)
q           (true)

p           (false)
In an obvious example, take :
If it is raining, then the pavements are wet (true)
The pavements are wet                        (true)

Therefore it is raining                      (false)
'If it is raining, then the pavements are wet' - true conditional. 'The pavements are wet' - true consequent. They really are wet. But it isn't raining - false antecedent. The pavements are wet because a water main has burst.
Hope this helps, makes things a bit clearer : it shows that your question was
spot on. Your logical instincts are sound.
Answer: Wikipedia describes affirming the consequent in the following way:

Affirming the consequent, sometimes called converse error, fallacy of the converse, or confusion of necessity and sufficiency, is a formal fallacy of taking a true conditional statement (e.g., "If the lamp were broken, then the room would be dark,") and invalidly inferring its converse ("The room is dark, so the lamp is broken,") even though the converse may not be true. This arises when a consequent ("the room would be dark") has one or more other antecedents (for example, "the lamp is not plugged in" or "the lamp is in working order, but is switched off").

Note how this fallacy is described as the "confusion of necessity and sufficiency".
It is not necessary that the lamp be broken if the room is dark. The lamp being broken is only a sufficient condition for the room to be dark. There may be other explanations besides a broken lamp which would also be sufficient to darken the room.
However, if we know that the lamp actually is broken and we also know that this broken lamp is a sufficient condition for the room being dark, then the room would be necessarily dark because a sufficient condition for the room being dark has been fulfilled. But in this case all we know is that the room is dark.
They also explain why this fallacy is common.

Converse errors are common in everyday thinking and communication and can result from, among other causes, communication issues, misconceptions about logic, and failure to consider other causes.

Consider the example:

If suspect X did the deed, then we would find evidence A, B, C and D. And, yes, look, here is evidence A, B, C and D. So suspect X is the felon.

This is an example of the fallacy, because we are assuming our knowledge of the evidence and that X being the felon would be a sufficient condition for the evidence appearing as it does means that X is necessarily the felon.
That doesn't mean X is free to go. X may in fact be the felon, but we don't know for sure given what we know of the evidence. The fallacy is in claiming that X must be the felon, that X is a necessary condition for the evidence to exist rather than only a sufficient condition.

Reference
"Affirming the consequent", Wikipedia https://en.wikipedia.org/wiki/Affirming_the_consequent
"Necessity and sufficiency", Wikipedia https://en.wikipedia.org/wiki/Necessity_and_sufficiency
Answer: Yes this is a fallacy because of the fact we can have instances of true premises and a false conclusion.
If the Earth is the third planet from the Sun, then you are Santa Claus.
You could put whatever you desire after the word THEN.
Some people will find instances where everything checks out factually and they think the resoning works because it works right then and there.  Thus this resoning is at best shakey.  Sometimes it yields correct conclusions and sometimes it does not yield correct conclusions.


Construction of a coupling of a sequence of Bernoulli random variables

Question: Let $(X_n)_{n\in\mathbb{N}}$ be a sequence of Bernoulli distributed random variables defined on a probability space $(\Omega,\mathcal{F},P)$ and $(\mathcal{F}_n)_{n\in\mathbb{N}}$ be a filtration such that, for all $n$, $X_n$ is measurable with respect to $\mathcal{F}_{n+1}$ and $E\lbrack X_n|\mathcal{F}_n\rbrack>1-\delta$ for some fixed $\delta\in(0,1)$. I want to construct a probability space $(\mathcal{X},\mathcal{A},\mu)$ and sequences $(Y_n)_{n\in\mathbb{N}}$ and $(Z_n)_{n\in\mathbb{N}}$ of random variables which are defined on this probability space such that $(Z_n)_{n\in\mathbb{N}}\overset{d}{=}(X_n)_{n\in\mathbb{N}}$, $Y_1,Y_2,\ldots$ are iid Bernoulli distributed random variables with parameter $1-\delta$ and $Z_n\geq Y_n$ for all $n$. Note that by the assumptions above, we can conclude that, for all $n\in\mathbb{N}$ and $i\in\{0,1\}^n$, we have $P(X_1=i_1,\ldots,X_n=i_n,X_{n+1}=1)\geq (1-\delta)P(X_1=1,\ldots,X_n=i_n).$ First I will give you the basic idea that I have: My idea is to define $Y_n$ by using iid random variables $(U_n)_{n\in\mathbb{N}}$ which are uniformly distributed on $(0,1)$ and setting $Y_n=1_{\{U_n<1-\delta\}}$ for all $n$. Now I want to define $(Z_n)_{n\in\mathbb{N}}$ recursively: On the set $\{Y_1=1\}$ we set $Z_1=1$. I want $Z_1$ to have the same distribution as $X_1$, so I must define $Z_1$ on the set $\{Y_1=0\}$ so that $\mu(Y_1=0,Z_1=1)=P(X_1=1)-(1-\delta)$. At this point I am not sure how to do this. I was thinking about using a random variable $V_1$, which is also uniformly distributed on $(0,1)$ and independent of $(U_n)_{n\in\mathbb{N}}$ and setting
\begin{align*}Z_1=1_{\{Y_1=1\}}+1_{\{Y_1=0,V_1<(P(X_1=1)-(1-\delta))/\delta\}}.
\end{align*}
Then $\mu(Z_1=1)=P(X_1=1)$, is this construction correct? Next, I would construct $Z_2$. My idea is to use the same idea as in the construction of $Z_1:$ Let $V_2,V_3$ be two random variables which are uniformly distributed on $(0,1)$, independent of each other, independent of $V_1$ and independent of $(U_n)_{n\in\mathbb{N}}$. Then I would set
\begin{align*}
Z_2=1_{\{Y_2=1,Z_1=0\}}+1_{\{Y_2=1,Z_1=1\}}+1_{\{Y_2=0,Z_1=0,V_2<(P(X_1=0,X_2=1)-(1-\delta)P(X_1=0))/(\delta P(X_1=0))\}}+1_{\{Y_2=0,Z_1=1,V_3<(P(X_1=1,X_2=1)-(1-\delta)P(X_1=1))/(\delta P(X_1=1))\}}.
\end{align*}
By this construction, $(Z_1,Z_2)$ should have the same distribution as $(X_1,X_2)$ if I did not make a mistake. Analogously, I would now define $Z_3,Z_4$ and so on. Ultimately, this leads to a process $(Z_n)_{n\in\mathbb{N}}$ such that for all $n$ we have $(Z_1,\ldots,Z_n)\overset{d}{=}(X_1,\ldots,X_n)$, i.e. $(Z_n)_{n\in\mathbb{N}}\overset{d}{=}(X_n)_{n\in\mathbb{N}}$ by Kolmogorov's extension theorem. The problem that I have is that I do not know how to make this proof rigorously. In the $n$-th step of the construction we need $2^{n-1}+1$ uniformly distributed random variables: one for the construction of $Y_n$ and $2^{n-1}$ more to complete the construction of $Z_n$, i.e. I would define $(\Omega_{n,k},\mathcal{F}_{n,k},P_{n,k}):=((0,1),\mathcal{B}(0,1),\text{Uni}(0,1))$ for all $n\in\mathbb{N}$ and $k=0,\ldots,2^{n-1}$ and set
\begin{align*}
(\mathcal{X},\mathcal{A},\mu):=\left(\times_{n\in\mathbb{N}}\left(\times_{k=0}^{2^{n-1}}\Omega_{n,k}\right),\otimes_{n\in\mathbb{N}}\left(\otimes_{k=0}^{2^{n-1}}\mathcal{F}_{n,k}\right),\otimes_{n\in\mathbb{N}}\left(\otimes_{k=0}^{2^{n-1}}P_{n,k}\right)\right).
\end{align*}
Now I am not sure how to make the construction of the processes rigorously. If we assume that we have already constructed $Y_1,\ldots,Y_n$ and $Z_1,\ldots,Z_n$, I would define
\begin{align*}
Y_{n+1}(x)=1_{\{x_{n+1,0}<1-\delta\}}(x),
\end{align*}
where for $x\in\mathcal{X}$, $x_{m,j}$ denotes the coordinate of $x$ which belongs to $\Omega_{m,j}$. But now I am not sure how to formally construct $Z_{n+1}$. Does anyone have an idea?
Answer: Construction.

Let $(U_n)_{n\in\mathbb{N}}$ be a sequence of i.i.d. random variables which are uniformly distributed on $(0, 1)$.

Then, define $p_n : \{0, 1\}^{n-1} \to [0, 1]$ by
\begin{align*}
p_n(x_{[1:n)})
&= \mathbf{P}(X_n = 1 \mid X_{[1:n)} = x_{[1:n)}) \\
&= \mathbf{E}[X_n \mid X_{[1:n)}=x_{[1:n)}],
\end{align*}
where $x_{[1:n)} = (x_1, \ldots, x_{n-1})$ and likewise for $X_{[1:n)}$. (Here, $x_{[1:1)}$ is regarded as an empty list $\varnothing$, so that $p_1(\varnothing) = \mathbf{P}(X_1 = 1) = \mathbf{E}[X_1]$.)

Finally, define $Y_n$ and $Z_n$ by
\begin{align*}
Y_n = \mathbf{1}_{\{U_n \leq 1-\delta\}}
\qquad\text{and}\qquad
Z_n = \mathbf{1}_{\{ U_n \leq p_n(Z_{[1:n)}) \}}.
\end{align*}

Observations. From the above construction, we observe:

$(Y_n)_{n\in\mathbb{N}}$ is a sequence of i.i.d. $\text{Bernoulli}(1-\delta)$-random variables.

$Z_n \geq Y_n$ holds, since $p_n(x_{[1:n)}) > 1 - \delta $.

For any $n \in \mathbb{N}$, note that $Z_{[1:n)}$ is a deterministic function of $U_{[1:n)}$. In particular, $Z_{[1:n)}$ is independent of $U_n$. Then, for any $z_{[1:n)} \in \{0, 1\}^{n-1}$, we have
\begin{align*}
\mathbf{P}(Z_n = 1 \mid Z_{[1:n)} = z_{[1:n)})
&= \mathbf{P}(U_n \leq p_n(Z_{[1:n)}) \mid Z_{[1:n)} = z_{[1:n)}) \\
&= p_n(z_{[1:n)}) \\
&= \mathbf{P}(X_n = 1 \mid X_{[1:n)} = z_{[1:n)}).
\end{align*}
So by the principle of mathematical induction, $(Z_1, \ldots, Z_n) \stackrel{d}= (X_1, \ldots, X_n)$ holds for all $n \in \mathbb{N}$, which in turn implies that $(Z_n)_{n\in\mathbb{N}} \stackrel{d}= (X_n)_{n\in\mathbb{N}}$.

Conclusion. The sequences $(Z_n)_{n\in\mathbb{N}}$ and $(Y_n)_{n\in\mathbb{N}}$ constructed as above satisfies all the desired properties.


How can I use two TP4056 with four Li-ion batteries, but single load?

Question: Need to connect and charge two Li-ion batteries in series.
I'm not sure if it is possible to connect and use two Li-ion batteries and TP4056 like this. Are they going to be balanced? Do they need to?
Comment: No, you can't do that. Probably IN- and BAT- are connected together. Now look at your 5 V in. It will connect to BAT- of the top board and put +5 V on the BAT+ of the lower board.
Comment: That's why i connected top li ion between 10V and 5V, and the last one between 5V and 0. So top bat should be ok (?)
Comment: No. It's just a very bad solution. You can see in Tony's answer that R2, for example, is between the BAT- and IN-. (It's probably a low value for current sensing.) If you connect BAT- to BAT+ of the lower board you will completely mess this up.
Answer:
Thus your problem now looks like this.

"No Way, Jose".
Yes they need to be balanced to prevent accelerated aging from mismatch charge imbalance with high current and deep discharges.

It is analogous to runaway series incandescent lightbulbs ( where the faster weaker bulb achieves near full brightness and the other bulb stays cool.
Another example is like mismatched-Vf shunt LEDs sharing current. If one LED cannot support the current of 2 or more in parallel, one can burn out open cct as thermal runaway lowers the Vf of the hotter LED thus drawing more current.
There is a better chance of extending end-of-life to achieve the max rated charge cycles if they are balanced or much lower if they are not!


Uncertainty principle for two compatible observables. When do we get the equality and the inequality?

Question: For two compatible observables A and B i.e. if $[A, B]=0$, the uncertainty principle says that $$(\Delta A)_\psi(\Delta B)_\psi\geq 0$$ in any state $|\psi\rangle$ where $(\Delta A)_\psi=(\langle \psi|A^2|\psi\rangle-(\langle \psi|A|\psi\rangle)^2)^{1/2}$ . I know that these uncertainties have nothing to do with the precision of measurement. It is however not clear to me when will we get equality and when inequality?
Comment: If you look at the derivation of the general uncertainty principle, you should be able to tell which terms are neglected there to obtain this inequality from a more complicated equality, and so this will be an equality when these neglected terms are zero. Do you have some difficulty with doing this on your own?
Comment: Consider $A=B$, when would $(\Delta A)_\psi$ be non-zero?
Comment: I think, there exist some states $\psi$ for which either $(\Delta A)_\psi$ or $(\Delta B)_\psi$ or both are zero. In those states, the uncertainty product is zero. Am I right?
Comment: @DvijD.C. When $\psi$ is not an eigenstate of $A$. Also, see my comment above.
Answer: The Heisenberg uncertainty relation looks like
$$(\Delta A)^2(\Delta B)^2\geq \frac{1}{4}\langle \psi|[\hat{A},\hat{B}]_+|\psi\rangle^2+\frac{\hbar^2}{4}$$
The above inequality becomes (if you look for the whole derivation) equality only if

$\hat{A}|\psi\rangle =c\hat{B}|\psi\rangle $
$\langle \psi|[\hat{A},\hat{B}]_+|\psi\rangle =0$

where $\hat{A}=A-\langle A\rangle $ and $\hat{B}=B-\langle B\rangle $.


Shorthand for empty line or \\ \indent

Question: This page says that \\ starts a new paragraph.
However, it does not end up looking the same as inserting an empty line in my source code (which I have always used to define paragraphs), which also indents the new line.
The latter describes the visual effect I am looking for, but since I am typing out a conversation (which means a lot of indented newlines), I hope to find a more elegant command for this, so I don't have to fill my source code with empty lines or \\ \indent everywhere.
Is there such a command?
Comment: @Mr.H I'm afraid that web site might not be the best of resources in general. It's definitely not up-to-date, as the screen shots indicate, next to a link to a LaTeX 2.09 file, references to outdated program versions ... As introductory lecture, I recommend [The Not So Short Introduction to LaTeX2ε](http://tobi.oetiker.ch/lshort/lshort.pdf), more are listed in [What is the best book to start learning LaTeX?](http://tex.stackexchange.com/q/11) and [LaTeX Introductions in languages other than English](http://tex.stackexchange.com/q/84384).
Comment: [Welcome to TeX.SE](http://meta.tex.stackexchange.com/questions/1436). Does `\par` do what you want?
Comment: @Mr.H The second bullet in that page, telling that ``\\*`` starts a new line but not a new paragraph is nonsense: it is a new line command with no intervening page break. The following description tells about ``\\`` tells something nearer to the truth. The page http://www.personal.ceu.hu/tex/para.htm is about paragraphs and says rather different things.
Comment: Now that's what I was looking for. Thanks!
I'm sure I've seen it before, but writing papers I got so used to the empty line I must have forgotten about its existence.
Also, I noticed this gives the exact same visual effect as an empty line. {\\ indent} leaves just a little less room between the lines. Good to know.
Thanks again.
Comment: The reference is ambiguous. `\\` does not start a new paragraph, but issues a new line/line break.
Comment: Possibly related to your problem here: [Is there an easy way to have my whole document with a space between paragraphs rather than indentation?](http://tex.stackexchange.com/q/42)
Answer: \\ produces a line break. \par produces a new paragraph. Inserting empty line between two lines produces a new paragraph.
Furthermore, \\ does not justify the last line before. If you want so you can use \linebreak.
Comment: What is a feature of the editor? That an empty line produces a new paragraph? That's all *TeX's work.
Comment: I think Sigur meant that most text-based editors do that for their text files (nl+cr).
Comment: I see. So `\\ ` does not start a new paragraph after all. I now also understand why `\\ \indent` looks just slightly different. Thanks to you, Sigur and Peter Grill.
Comment: can you delete the phrase about editors it's either wrong or I don't understand what you mean:)
Comment: @DavidCarlisle, done! Thanks.
Answer: The page that you refer to is simply incorrect, you should not believe everything you read on the internet.  The standard way to end  a paragraph in TeX is to use a blank line, the command sequence \par is also available but not usually needed in documents, it is more useful in code sections.
If you are typesetting a structured text such as a dialog or poem etc, it usually helps to use more focussed markup than just using blank lines and paragraphs. For example
\begin{dialog}
\item[Mr. H] How do you make a paragraph?
\item[Random Website] Use \verb|\\|.
\item[Sigur] Use a blank line or \verb|\par|
\item[David] You may want to use a list structure rather than paragraphs.
\end{dialog}

It's a feature of a markup system like LaTeX that you can choose the markup you want independently from how you want the result to be typeset. A simple implementation of the above would be
\newenvironment{dialog}{\description}{\enddescription}

But other definitions could produce other layouts from the same input.
Comment: This is super condescending. Of course OP doesn't believe everything he reads on the internet. That's why he's asking here. Reliable LaTeX documentation is hard to search for because most of it is locked inside SEO-unfriendly PDFs (and even `.tex` files!). Bad yet web-friendly resources float to the top.
Comment: @Merchako not sure why you object to this wording it's just a common phrase not at all intended as condescending. Also this answer is correct unlike the accepted answer. I'll leave a comment under the other answer.
Comment: I'm sorry, @David Carlisle. That was too strong of me. I should have simply suggested that you rephrase the idiom. (Though I would stand by the assertion that just because it's a common phrase doesn't mean that it's okay.) I was angry at my code last night, and I gave you worse than you deserved.
Comment: @Merchako no harm done, caused me to look at this old question, and get Sigur to fix his answer:-) (Given that the OP started the question by referencing an online tutorial that was wrong, I don't see anything wrong with the wording here) It's a completely standard harmless phrase google turns up over hundred thousand  hits for it not to mention dozens of images.
Comment: Thanks, @David Carlisle. I don't necessarily have issues with the phrase per se, but in the context of learning about LaTeX, it can be hard to know what to trust. Some of the easiest-to-find resources are the least trustworthy or up-to-date. It's been very frustrating trying to search for documentation. (Compare with how we have MDN Web Docs to learn about HTML/CSS.) That's why I come here, and StackExchange is on the internet, too!

Shorthand for empty line or \\ \indent


Docker vs Vagrant

Question: Every Docker image, as I understand, is based on base image - for example, Ubuntu.
And if I want to isolate any process I should deploy ubuntu docker base image (where is difference with Vagrant here?), and create a necessary subimage after it installing on ubuntu image?
So, if Ubuntu is launched on Vagrant and on Docker, where is practice difference?
And if to use docker provider in Vagrant - where here is difference between Vagrant and Docker?
And, in Docker is it possible to isolate processes on some PC without base image without it's sharing to another PC?
Comment: some info here http://stackoverflow.com/questions/16647069/should-i-use-vagrant-or-docker-io-for-creating-an-isolated-environment
Answer: Vagrant is a utility to help you automate setting up VMs. Docker is a utility that helps you use containerization in linux.
A virtual machine runs a whole system, and emulates hardware. Containers section off processes in a single running kernel without emulating hardware.
Both a VM and a Docker image may be Ubuntu 14.04, but with the Docker image you don't need to run the whole OS.
For example, if I want to run an nginx container based on ubuntu, I'd end up with only the nginx process running. No upstart/systemd/init is needed. A VM would run an init system, manage its own networking, and run other services as well. The container image approach that uses a linux distro base is mostly for convenience.
It is entirely possible to run Docker containers with very minimal images. A statically compiled binary alone in an image is all you'd need to run a container.
Comment: >Both a VM and a Docker image may be Ubuntu 14.04

So, Docker can run ubuntu with hardware emulation?

How, for example, Docker launches nginx container? It run Ubuntu base image and after runs nginx container as subprocess of docker's ubuntu?
Answer: Vagrant : Vagrant is a project that helps the spawning of virtual machines. It started as an command line of VirtualBox, something similar to Gemfile for VM's. You can choose the base image to start with, network, IP, share folders and put it all in a file that anyone can reuse to spawn the same configured machine. Vagrant has different extensions, provisioning options and VM providers. You can run a VirtualBox, VMware and it is extensible enough to be able to create instances on EC2.
Docker : Docker, allows to package an application with all of its dependencies into a standardized unit of software development. So, it reduces a friction between developer, QA and testing. It dynamically change your application, adding new capabilities every single day, scaling out services to quickly changing the problem areas. Docker is putting itself in an excited place as the interface to PaaS be it networking, discovery and service discovery with applications not having to care about underlying infrastructure. Yes, their are still issues with docker in production, but, hopefully, we'll see the solutions to those problems, as docker team and contributors working hard on those issues. As Docker Volume driver allows third-party container data management solutions to provide data volumes for containers which operate on data, such as database, key-value stores, and other stateful applications. The latest version is coming with much more flexibility, complete orchestration build-in, advanced networking, secrets management, etc. As you can see one, rexray, as volume plugin and provides advanced storage functionality. emccode/rexray We're finally starting to agree on more than just images and run time.

Docker vs Vagrant


Home address and transfers?

Question: I've been reading and researching bitcoin recently because I'm interested in the idea and would like to participate. My question is, since each bitcoin user is anonymous, if I bought something from someone else, how will they know where to send it? Also, if I'm transferring money to and from another person, how do I know it it going to the right person?
Answer: Bitcoin is not anonymous, it is pseudonymous.
When you send bitcoin to someone, they will tell you what their bitcoin public address is, and then you will send bitcoins to this public address. A public address is a random-looking string of numbers and letters, here is an example I just pulled randomly off a block explorer website:
15x6Ggmjwu6h5nDkidnkqpAms2L6JeuENJ
Privacy is maintained by not using an address more than once. If you have multiple people pay you at the same address, then those people will be able to know the other transactions you were involved in with that address.
Each address has a corresponding 'private key', and you need to know what the private key is in order to spend the funds. So you can tell people your public address(es) so that they can send money to you, and then you keep your private keys safe so you can later spend those coins! (wallet software automatically keeps track of private keys for you)

Home address and transfers?


Which Stack Exchange site is preferred to ask about certifications?

Question: I have some questions about Cisco certifications (like CCIE and CCNA). So which Stack Exchange site is preferred to ask about these things?
Answer: (Here I explain, why he can't post it anywhere)
Well, this is a hard thing. The main problem that SE sites tend to interpret their topicality as narrow as possible, and it tends to worsen with time. Although sometimes there are also possitive changes, I suspect mainly CM effect behind that and not the "natural" change of the community.
Your question seems to me a border case on many sites, which means it can be accepted manywhere, but nowhere has a big chance. The sites I would suggest:

http://networkengineering.stackexchange.com . They have very strict and narrow topicality, despite their urge to grow. But maybe a little bit of previous consultation on their meta could help.
http://programmers.stackexchange.com . Here the main problem is that it is not a programming question, maybe with programming-related certificates you would have more chance.
http://serverfault.com . They also have a similarly strict policy as the networkengineering.
http://academia.stackexchange.com . Here the main problem that they are focusing to post-grad matters and not to out-of-academia certifications as yours.
http://workplace.stackexchange.com . Here you can find answer on workplace and jobsearch-related things, I suspect maybe at least some of your questions would fall in this category.

(From here I explain, what possible roundabouts and partial solutions I can see)
There is also the surprisingly unused chat, most of the sites have one. On the chatrooms, you can get answers to questions which are considered offtopic on the main site, but seem answerable by their power users. Most SE sites have a dedicated chat room for that.
Chat can be used also to consultation before or after the question, often it is possible that actually you can ask the question on a form, which passes the site review mechanism while you also get an answer to your question. For example, most sites actually allow asking your homework questions there, but the requirements in this matter are hard to pass. If the homework OPs would consult about this on the meta or in the chat, most of them could formulate their question to an acceptable form (or even get an answer there). Most of them simply won't do this. Maybe you can find a similar way also in your case.
It would be also possible to initiate a new site in the Area51, but it will be slow and it hasn't a quite high chance. From the other side, it would make possible for many people with similar problems as you to get their answers to their questions similar to yours.
It is also very important: the topic of the sites results, that you will get your answers in their viewpoint. Thus, for example, "What can I learn on a course of an XXX Cisco cert" can be more near to the topic of the networkengineering, while a question like "How the HR estimate the worth of an XXX Cisco cert in the selection process" may match much better the workplace SE. Thus, fragmenting your question and ask them differently on different sites is an useful strategy. You can also link your related questions on other sites in comments.
Most of the meta sites tend to behave like a fight club between the question closer community and the asker/defender community, thus initiating something on the meta will most likely result a long thread in negative tone. Remain always polite, and don't forget: your goal is to know, how can you ask your question in an acceptable form. Don't react to the attacks, it is much better if you try to move the discussion into a consultant line: how could it be asked on a conform way, what is the part of your question which is acceptable, etc.
Comment: these questions are _extremely_ poor fit for Programmers - they would be quickly voted down and closed over there, see [Why do certification questions keep getting closed?](http://meta.programmers.stackexchange.com/a/6443/31260) Recommended reading: **[What goes on Programmers.SE? A guide for Stack Overflow](http://meta.programmers.stackexchange.com/q/7182/31260)**
Comment: On a closed question (as off-topic), *[NPDEV software defined networking Cisco certification](http://networkengineering.stackexchange.com/questions/24028)*, from 2015 on Network Engineering, a moderator commented: *"NE is a site to ask and provide answers about professionally managed networks. The community has decided that certification/education questions are off topic. Please see [What topics can I ask about here?](http://networkengineering.stackexchange.com/help/on-topic) for more details."*. So Network Engineering seems to be out of the question.
Comment: I think SE sites tend to determine what is on-topic as naturally as possible.
Comment: @PolyGeo The sites are quite different in this sense, I don't know the GIS and the Genealogy SE, but I wish you have right in the case of these sites. Between the sites in my combined flair, I think SU, SO and MathSE does this what you say, while the SF and the Physics SE does its exact opposite. For example, on Unix SE you can't ask about Unix programming, or on Serverfault you can't ask about a broad range of remote management tools. These are totally illogical decisions from their side in my opinion, leading to continous troubles and harassment of goodstanding newbies.
Comment: @gnat I explained the OP, why his question has only a small chance on the programmers SE. And you now "correct" me, of course with a downvote, explaining that his question has only a small chance on the programmers :-) Thank you very much, I had always the impression, that the PSE isn't my community, thank you very much the additional proof :-)
Comment: yeah sure. It's just the thing for Programmers to get [hundreds lemmings from Stack Overflow](http://meta.stackexchange.com/questions/73382/please-stop-using-programmers-se-as-your-toilet-bowl) to try their luck over there. "Oh but I found this at meta, and it says 'maybe with programming-related certificates you would have more chance'". I guess you didn't even look at Programmers meta posts referred in my prior comment
Comment: @gnat Exactly. I am not interested on the inner circle orgies explaining why they *need* to reduce their topic. By you, it is a ritual: a monkey initiates, "let X be offtopic", and then you all explain, *yeeees it should be offtopic*, and then you love eachother, everybody votes everybody up, and then close&destruct together a lot of goodstanding newbie questions. I simply didn't want to see it 345354. time, so is it.
Comment: @PeterMortensen Around a half of the answer was about the roundabouts or partial answers (chat, meta). For example, about a factual question in the exam to this cert, even the NE could help. Or, maybe the OP could find informal, out-of-the Q&A answers trying on the chat. You, gnat and the downvoters simply ignored this. It looks as if you had interpreted the post as an advice to post a question on these sites.
Comment: @gnat My previous comment is also for you.
Comment: I extended the answer to help the downvoters of the future easier to understand, that I actually *didn't* advice the OP to post offtopic questions anywhere.


How to reduce color noise in Darktable?

Question: Photo worth a thousand words is below.
Summary: Darktable generates a lot of color noise which is really hard to remove in color photography. Why is that? How to fight it?
Answer: In Darktable 3.X (I'm using 3.8), I get very satisfying results for removing color noise completely and the remaining grain reasonably by using a single instance of Denoise (profiled) set to mode: wavelets and color mode: Y0U0V0.
The module in this mode is split to two sections:

Y0 is for removing grain altogether;
U0V0 is for removing color noise (making it monochrome noise which is much less annoying).

I set the Y0 curve to the same amount in all levels coarseness while the U0V0 curve is set progresivelly to remove none of the most coarse color noise and most of the fine color noise. This is to prevent removing color from small colorful objects (like toys, for instance).

The faint gray line in the graph is the Y0 curve
I combine the Denoise module with hot pixels removal module.
This is the result I get with these settings (top is without denoise, bottom is with denoise):

I learned how to use the wavelets mode of the module in this video: https://youtu.be/7ZhbeXpx2W8
Comment: Years ago I gave you upvote, but now I have to also make a comment: your answer is very, very good! Thank you for sharing your experience with people like me!
Answer: I use the Profiled Denoise + Equalizer for this.  In the Equalizer, I pull the chrominance line to the bottom at the point which is approx 3/4 from the left.
Answer: I just saw the question looking for something else, hence the late date.
According to the Darktable manual (and my experience), the "profiled denoise" works best when used twice: once with "wavelets" and blend mode "colour", once with "non-local mean" and blend mode "lightness". For both, I usually tune down the intensity (NOT blend opacity), until noise gets just visible (preserves details better).
Also, you might want to adjust contrast/exposition, if you really want to compare with the RT image.

How to reduce color noise in Darktable?


Create a time span field

Question: The date module provides a handy widget for specifying a date.  Is there something similar on Drupal 6 for specifying a length of time such as 6 months or 3 days?  The time span will need to be converted to or stored as seconds for use by my module.
Answer: The Interval Field module looks like it would do the trick.

Interval field gives you a simple field and widget to allow users to enter interval values eg

2 months
3 days
4 years
Comment: Good answer for 7, but I should have mentioned I'm on Drupal 6.  I'll edit my question.
Answer: For Drupal 6, try the Duration module.
Another great module for Drupal 7, is the Time Period module.

Create a time span field


"Help me write this reminder email."

Question: We get these like once a week. They are off-topic. They are too localized. Can we add this as a specific off-topic reason in the help tour or something? I feel like there has to be some way to let newbies know this in advance so we aren't constantly closing down first-time questions and/or first-time SE users.
Answer: The "what to write" close reason currently reads:

This question appears to be off-topic because asking what to write or asking for help rephrasing a sentence or passage are both off-topic here, as such questions are very unlikely to help anybody else.

(There are links in there, but I didn't reconstruct them here.)
"Help me write X", where the OP is asking for text, seems to be a "what to write" question.
Based on a suggestion in a comment, I've modified the "what to writer" entry in the help center on-topic page.  This is in the "what not to ask" list:

Asking how to write a particular kind of email, letter, memo, or other correspondence -- or, more generally. asking "what should I write about" (more about this here).
Comment: @LaurenIpsum oh, I see!  Yes, that sounds like a good idea.  See my update.
Comment: @LaurenIpsum the list is already pretty long (too long IMO) at 8 bullets -- the *on-topic* list has only 6, for comparison.  Please take a look [in context](http://writers.stackexchange.com/help/on-topic) -- maybe you can suggest a reworking of that list that also incorporates this without expanding it even more?  If so, please propose it in an answer for better visibility.  Thanks!
Comment: What I'm looking for is something which can be read *before* the person posts something. In the help section there's the On-Topic part of the FAQ, which has a list of "don't ask these." (Questions seeking to interpret or analyze an existing work. Proofreading requests. *etc.*) I'm thinking more like adding **"How to write a particular kind of email, letter, memo, or other correspondence."**
Comment: if I may nitpick, can we split them up? I don't think someone who's never been here before will understand the difference, and they are both important. so:
**[1]** • Asking how to write a particular kind of email, letter, memo, or other correspondence
**[2]** • Asking "what should I write about" (more about this here)
Comment: "What should I write about" can be homework, fiction, news, nonfiction, etc. That's a different kind of off-topic than "Help me write a reminder email."
Comment: I think you're right; it does work in context.

"Help me write this reminder email."


How do I target a VirtualBox VM when setting up IntelliType application-specific settings on a Mac

Question: I would like to have specific options set up for Virtual Box VMs, but when I set these up for the VirtualBox.app they only apply to the manager application and not the VMs.
Answer: The problem is that the VMs run using a different application, one contained within VirtualBox.app. The Add Application dialog does not allow you to browse deeper into the .app file (like you'd normally do by using "Show Package Contents" in Finder).
One workaround to this is to create a symbolic link to the application that's running VMs. Here's an example command (that you'd run in the Console) that would achieve this:
<code>ln -s /Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app ~/Applications/VirtualBoxVM.app
</code>
This creates a symbolic link in your personal Applications folder. Now in IntelliType you'd browse to your own Applications folder and select the VirtualBoxVM application.


Dual-Boot Ubuntu, Raspbian?

Question: I have one micro SD card and would prefer to not get another one right now. I would also like to boot more then one OS. Preferably Raspbian and Ubuntu. (20 version) is there any installer software that helps with that. Any solutions will be helpful thanks in advance.
Answer: Look at Berryboot here. It has an option to make a copy of a working OS allowing you to try things and roll back if it has issues.
One thing though, any SD card is subject to failure and putting all your eggs in one basket (ok I'm a bit late for Easter) is not the best situation to be in and I would look to buy more cards maybe 16 or 32GB ones and spread your risk.
Comment: Thankyou, and you are right. I will get more sd cards and maybe a ssd card but I wanted an immediate solution. Where I am things are closed up from Covid-19 and Amazon would take a while.

Dual-Boot Ubuntu, Raspbian?


reCAPTCHA vs other captcha systems

Question: What is a good reason to choose reCAPTCHA over a well known and tested captcha generator on the server. Is it just philanthropy (helping with digitizing texts) or are there other good reasons.
Answer: reCAPTCHA is rather neat.  Not only does it stop spammers but it helps digitize books.  Each word that appears in the captcha has actually been scanned in from a book but sometimes the character recognition is off so the computer my save some gibberish of a sentence without knowing any better.
See the image off their site:

By making people type in what they think the word is, it helps create a digital copy of the book or word that was scanned with accuracy while at the same time checking what the user submit, comparing it to other's submissions, and determining if the user is human or not.
For that reason I use reCAPTCHA.  I'm not just selfishly protecting my site, I'm providing a service for others.
Not only that but it's fairly simple to implement and provided by a reliable company (Google).
Comment: Thanks for the detailed answer. I am aware of the text digitizing aspect of it as pointed out in the post - I was actually looking for costs/benefits *outside* this aspect. You point out that reCAPTCHA is fairly simple to implement - do other popular generators have issues on this front - do you have cases in point.
Comment: Which books has reCAPTCHA actually transcribed? I can't seem to find the answer on their site.
Answer: The question was "why should I use it"; that question must include "why shouldn't I use it", so some criticisms:
Recaptcha volunteers your users to be OCR monkeys, without bothering to ask their opinion.
It requires that you advertise recaptcha in the captcha widget, which isn't always appropriate.
It's a web service, which means there's no hard guarantee it'll still exist a week or a year or two years from now.  (Google has crippled or removed public, widely-used APIs in the past, such as their translation API.)
It only supports web pages, loading everything with scripts and iframes.  It doesn't have a proper API, so if you ever want to have an iOS or Android app that logs into your system, and need to show a captcha there, you'll be out of luck.
You have no control over the complexity of the generated captcha.  Captchas always have a tradeoff between how hard they are to read and how difficult they are to OCR.  There are no knobs to adjust, based on how important stopping robots is to your use case.  If they decide to make the captchas much harder to read (which they've done at times), and this becomes a nuisance to your users, there's nothing you can do about it.
Comment: Thanks for the informative perspective. (I'm trying to visualize OCR monkeys but can't get any mental pic :) )
Answer: reCAPTCHA is quite good. Most other generators are broken easily while reCAPTCHA usually gets good scores.
Another good thing is that it has the accessiblity button so that it would read the text.
Answer: This is an old threat but I would just like to confirm that in my case we used reCAPTCHA on a number of Drupal 6 websites in combination with the Honeypot module. We did that to stop automated spam user registrations.
I presume these user accounts were being created automatically by desktop applications such as SEnuke XCr and XRumer with the aim of then posting spam. They create the user account but they rarely do anything further but I found it annoying. Further reading on this subject can be found here: How to prevent spam user registrations? (links to an article on Drupal.org).
I can confirm that the above reduced my spam user registrations from a little over 100 a day to none at all.
Answer: We need to register our IP address on which server would be running. Its seems some what risky. So we might be required to change registration work flow in case of use of reCAPTCHA.

reCAPTCHA vs other captcha systems


how to prevent QTableModel from updating table depending on some condition

Question: i have a mysql tables that uses lock-write mechanism. the lock might go for too long (we're talking about 1-2 minutes here).
i had to make a check if the table is in use or not before the update is done (using beforeUpdate signal)
but after checking and returning that my table is in use , system hang until the other user unlocks the table . is it possible to prevent data from updating if the flag returned that the table is in use.,
im searching for a better way to handle this i don't want to re-implement the setData method since doing this is a pain. or if you have a good re-implementation for it . it will be very helpfull.
thanks in advance
Answer: Python threading: http://docs.python.org/library/thread.html You can create threads that wait until the table is finished and it should be negligible in system resources, also your end user wont have to wait for the system to respond to continue with a different task.


When will 2002 MS4 be named?

Question: The trans-Neptunian planetoid 2002 MS4 is currently the largest known unnamed Sun-orbiting object. Is there any standard schedule on when this and similar objects might be named? Usually the discoverers propose the names for the celestial body, which Chad Trujillo and Michael Brown obiously haven't. In that case, what will happen?
Answer: If the discoverers don't propose a name (and they have a 10 year interval in which to do so) then the object remains unnamed.
This minor solar system body has a permanent designation, "307261" which uniquely identifies it.  So there is no need for a name. There is no provision for the IAU to grant the naming rights to a third person, and certainly the naming rights aren't auctioned or available for sale.
So if the discoverers don't name it, it remains known only by its numeric code.
See https://www.iau.org/public/themes/naming/ section "Minor Planets"
Comment: According to your link, the discoverer has the _privilege_ of naming it for ten years. That means after that, anyone can theoretically name it, but it still has to be approved, as you say. https://en.wikipedia.org/wiki/(307261)_2002_MS4#Numbering_and_naming
Answer: Actually anyone can name this Dwarf Planet at this point, it just has to follow the guidelines specified in the link above.. Dr. Jan Ticha at the IAU is the one that receives the submissions.
Comment: This is probably right, but the IAU normally ignores naming suggestions from people who don't have a particular interest in the object.  Anyone can *suggest* a name, but unless you can also demonstrate a need for the object to be named, you can expect your suggestion to fall on deaf ears.
Comment: Can you provide more details to your answer? What exactly are the criteria that need to be met?

When will 2002 MS4 be named?


Highest derivatives of implicit function

Question: I am learning to use the implicit function theorem (IFT) and met recently the following problem:
Let $F(x,y)=x+y+x^5-y^5$. The given equation defines a smooth function $\phi:U\rightarrow \mathbb{R}$ (where $U$ is a neighbourhood of $0$) such as $F(x,\phi(x))=0$ $\forall x\in U$ (because $F(0)=0$, $\frac{\partial F(0)}{\partial y}=1\ne0$ and it is possible to use the IFT). We are to evaluate $\phi^{(2004)}(0)$.
So, let's differentiate the identity $x+\phi(x)+x^5-\phi(x)^5=0$. Firstly we get $1+\phi^{'}(x)+5x^4-5\phi^{4}(x)\phi^{'}(x)=0$. Obviously, $\phi(0)=0$ hence $\phi^{'}(0)=-1$. After that, differentiating one more time we evaluate $\phi^{''}(0)$, $\phi^{'''}(0)$ and so on. It means we are able to evaluate some derivatives 'by hand'. However, after the 3rd or the 4th step this process becomes impossible.
Ok, there is a formula for evaluating the highest derivatives of function products, but there are also very long computations.
Is it possible to avoid this kind of evaluations?
Answer: First, until you say $F(x,y)=0$, you don't have an equation that's defining $y$ locally as a function of $x$. This is really a sneaky problem: Notice that 2004 is even; can you deduce some sort of symmetry property of $\phi$ from the nature of the function $F$?
Comment: $\phi$ and $\phi^{(2004)}$ are odd functions. Thank you!


Is there any way to check reward address value?

Question: Smart contract should allow the reward withdrawal only if all rewards are withdrawn. In other words only if the reward address will have exactly 0 lovelaces after the reward withdrawal. Is there any way/idea how to check this?
Answer: The ledger already enforces this rule. See "Reward accounts are set to zero for each corresponding withdrawal." in the Shelley ledger spec.
Comment: Thanks for your answer **james**! Yeah, I know about this. But the question is how can Plutus validator script get this info? As far as I know, all withdrawal data Plutus validator has is `txInfoWdrl :: Map StakingCredential Integer`. So, there is no any flags like 'Rewards are set to zero' or something like that. At the moment I use a stakeDeregistrationCert trick (it fails in case withdrawal amount < reward amount since stake address can be deregister only if reward amount = 0). However it's a bit expensive (tx fee) and complicated, and I'm trying to find a cheaper and easier way.


Artifacts when using solidify on curves

Question: When i apply the solidify modifier to curves (created by importing a svg file), it creates some weird artifacts. Any idea on how to fix it?
Answer: I had the same problem with a logo that I had imported. What fixed it for me was this process. (Blender 2.90.1)

Note, sometimes it is quicker to join similar curves, like text, by selecting them and then selecting Object -> Join *

1.) In object mode, select the imported curve.
2.) Select Object -> Convert To -> Mesh from Curve/Meta/Surf/Text.
3.) Tab into Edit mode.
4.) Select all points using A.
5.) Press X and select Limited Dissolve.
6.) Tab back to Object mode and add your solidify modifier.
This method works very well for curves with few points. I have had some imports that still had some artifacts after using this method which required manipulation of the vertices to solve the problem (deleting, moving, etc.) but was really trial and error after using the method described above.
Hope it helps!

Artifacts when using solidify on curves


How to copy files to multiple hosts across the network?

Question: I have more than 200 Ubuntu systems to which I want to copy a file.
How can I copy files to multiple hosts across the network? What possibilities do I have?
Note: This question is related to How to find the version of an Ubuntu machine remotely?
Comment: How big is the file?
Comment: The file size is 12 MB.
Answer: I realise you probably only want something simple but there are dozens of ways of doing this. But first we want to be able to control all the computers at once.
That might seem a strange direction to go but it'll save you time later on when you might want to send a shutdown, reboot, upgrade to all the computers.
clusterssh
Let's install clusterssh and fire off a command to connect to all our servers at once (this might not be viable for 200 at once - I don't have 200 computers to test it on!)
sudo apt-get install clusterssh
cssh user@first_computer:port user@second_computer:port ...

That will spawn little output windows for each connection (why I say 200 might be a stretch) and one global input dialogue. From there you can send the same command to all your servers.
If you want to do it from the command line, and this might support 200 connections, you can look at the -a flag for cssh. You can throw each server a command (or string of commands). It'll connect, execute and close the connection.
cssh -a 'cd directory; ls'  user@first_computer:port user@second_computer:port

You can simplify your connections by using clusterssh's powerful configuration. Open man cssh and head down to the FILES section. It explains how you can create an /etc/clusters file to allow you to quickly create groups (called tags) like this:
clusters = <tag1> <tag2> <tag3>
<tag1> = host1 host2 host3
<tag2> = user@host4 user@host5 host6
<tag3> = <tag1> <tag2>

Then you can do:
cssh -T 'tag2' -a 'cd directory; ls'

Use a central repository
I don't mean a deb repo (but that's possible too, I guess) rather something like git or brz. It could be something as simple as a web server or a network share. If network bandwidth has bottlenecks in places, something like a torrent server might even be the best course (that's how Facebook updates all their nodes)
Tell your network to download the files
From here it's just connecting the dots. Using cssh you'd just tell all your computers to fetch the file and do whatever needs doing with it.
I suggest you start small. Get the file shared and then try a simple cluster of a couple of computer and see how it goes. Expand that out.
I suggest that even once you're done you keep a cluster of a couple of computers for testing before you push things to the main group.
Answer: Alternatively you can keep it push-based. The easiest way of that is writing a script that:

Iterates through a list of servers
Connects to the server and copies the files (two options here):

Uses sshfs to mount the remote filesystem locally, cp/rsync the files, fusermount -u the directory you mounted it on (to unmount the remote system).  Continue.
Just use rsync's network abilities to copy the files over.
rsync /localdir/ user@remote:/remotedir

Answer: [Oli's answer came on while I was typing]
An alternative to clusterss is parallel-scp. It is part of the pssh package
You need to provide the list of hosts in a text file (e.g. hosts.txt) and then you issue:
parallel-scp -h hosts.txt file2copy.dat /target/directory
Consult the man page to suite your particular needs. This shouldn't hit limits for too many connections since it doesn't require to open live connections to all as cssh does it will try this sequentially.
PS: Having key-based authorization set up will of course make this a lot easier but I suspect having your key distributed to 200 systems in the 1st place might be why you're asking this question ...


If I sell something for bitcoin can I then use the bitcoin I receive to buy something else?

Question: I hear a lot about double spending of bitcoin. Can a single bitcoin be spend twice, as a dollar can. For example, I give dollars to 7 eleven for gas, they then use that money to pay their suppliers. Can bitcoin be used in the same way?
Comment: Short answer: _obviously_ you can spend the Bitcoins you acquire, or they would be a completely pointless project.
Comment: For reference: http://en.bitcoin.it/wiki/Double-spending
Comment: Would be closevoters and downvoters--Tom has a legitimate question, as for the general public the phrase "double spending" is not immediately clear.  DBTN!  (Don't bite the newbs)
Answer: I think the confusion is around the phrase "a single bitcoin". A dollar bill is a thing, you can move it around and it changes ownership, but it is still the same dollar bill.
You might be imagining a bitcoin as a "virtual thing", like a computer file, which you can also move around. Sending the file to someone is analogous to giving them the dollar bill.
The problem is, computer files don't move; they are copied. Even when you tell a computer to move a file from one disk to another, it is simply making a copy and then deleting the original. When you give someone a dollar bill, you don't have it any more. You can't really give someone a computer file, because you simply both have copies.
If a digital currency were implemented this way, you could simply keep giving copies of the same computer file to everyone you paid, and you would basically have an infinite supply of money. That is what people are talking about when they refer to double-spending. The idea of using the same money twice.
So, bitcoin can't be a simple as a computer file. How does spending work?
Imagine a world where there are no dollar bills and coins. Instead, all transactions are performed by credit and debit cards and similar things. In that case, when you spend $1 at a 7-Eleven, you theoretically give them a dollar, except there is no physical thing to move. In reality, your bank and 7-Eleven's bank simply agree to add a transaction to each of their ledgers, saying you transferred $1 from your account to theirs.
In other words, what's actually being passed around isn't "virtual money", but records of transactions instead.
Spending a bitcoin is very much like this: you create a transaction that says you are transferring X BTC from your account to someone else's. That is published to the network and becomes part of the transaction record and then "everyone" knows your wallet has X fewer BTC and the other person as X more BTC.
There is a lot of complexity in how that publishing process works, how it guards against fraudulent transactions, how it works in a decentralized fashion, etc. There are a lot of places to read about how it all works, including this site.
So, if you have 10 BTC and receive 1 BTC, then you turn around and spend 1 BTC, did you spend the BTC you just received? Or one of the other ten? That's a question for philosophers, to be honest.
Answer: Actually, double spending is a class of attacks against bitcoin.

Double-spending is a failure mode of digital cash schemes, when it is possible to spend a single digital token twice. Since, unlike physical token money such as coins, electronic files can be duplicated, and hence the act of spending a digital coin does not remove its data from the ownership of the original holder,[1] some other means is needed to prevent double-spending.

Source
Bitcoin's mechanism is the block-chain.
Answer: Double-spending as an attack is different than spending coins you receive.
The attack is when you try to spend the same coins twice. For example, you have 1 BTC in your wallet, spend it to buy a coffee, then spend it to buy a soda. Assuming both the coffee and soda cost 1 BTC, you shouldn't have enough coins to pay for both. But the (very complicated) attack would allow you to do just that.
Contrast this to me paying you 1 BTC for a slice of pizza. You can then turn around and spend that 1 BTC on a coffee, just like if I had given you a dollar, euro, or anything else.
Answer: Bitcoins are never really "sent" anywhere.   That is the simplest method for the Bitcoin client to emulate the way we use cash today.   When I pay you, I give you cash and after that I no longer have it and you now have it.
With bitcoin, spend transactions are broadcast to peer nodes, and from there each node relays the transactions to other peer nodes.  Within seconds the transaction is known by nodes around the world.
Each node is like a ledger that holds a history of transactions.   So each node can know if the funds have already been spent.
And that's all that a valid transaction consists of -- an assignment of previously unspent funds.
The Bitcoin-Qt/bitcoind client and E-wallet services just make it seem familar by making it look like bitcoins are magically transferring from one person to another.
But in reality, each transaction is simply an entry in a ledger, replicated tens of thousands of times on nodes located around the world.


Alternatives to Real Player

Question: I'm looking for a program that can open Real Player files (.ram).  Real Player stinks, and I don't want to install it on my computer.  Unfortunately, I have to open some .ram files for an online class that I'm taking.  Are there any media players that can open Real Player files?
Comment: Is it an art class? That's the only justification I can think of for the juxtaposition of modern day technology with realplayer.
Answer: Looking for an alternative to real player - check out Real alternative.
Now that is good naming. You get exactly what it says on the tin.
Comment: Was just about to suggest the same thing!
Comment: Real/QT alternatives would be my recommendations as well.  QT Alternative installs as a standard codec allowing replay in almost any standard media player so you can keep using your current app.  I believe Real Alternative does the same but haven't encountered a real media file in years so am not sure.
Answer: Always has to be VLC!
It does say on their site only partial support for Real Player files, however I have not had a problem in the past.
Comment: VLC didn't work for me.  Still a great media player though!
Answer: Either VLC or Real Alternative Lite (with Media Player Classic)
I personally recommend Real Alt. Lite with Media Player Classic. If you install Quicktime Alternative too, you can then open QT and Real files with Media Player Classic.
Some folks swear by VLC, I can't do anything with it. Not my taste!
Answer: Mplayer and its many front-ends can play Real files.

MPlayer is a movie player which runs on many systems (see the
  documentation). It plays most MPEG/VOB, AVI, Ogg/OGM, VIVO,
  ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT, NuppelVideo, FLI,
  YUV4MPEG, FILM, RoQ, PVA files, supported by many native, XAnim, and
  Win32 DLL codecs. You can watch VideoCD, SVCD, DVD, 3ivx, DivX 3/4/5,
  WMV and even H.264 movies.
Another great feature of MPlayer is the wide range of supported output
  drivers. It works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev, AAlib,
  DirectFB, but you can use GGI, SDL (and this way all their drivers),
  VESA (on every VESA compatible card, even without X11!) and some low
  level card-specific drivers (for Matrox, 3Dfx and ATI), too! Most of
  them support software or hardware scaling, so you can enjoy movies in
  fullscreen. MPlayer supports displaying through some hardware MPEG
  decoder boards, such as the Siemens DVB, DXR2 and DXR3/Hollywood+.
MPlayer has an onscreen display (OSD) for status information, nice big
  antialiased shaded subtitles and visual feedback for keyboard
  controls. European/ISO 8859-1,2 (Hungarian, English, Czech, etc),
  Cyrillic and Korean fonts are supported along with 12 subtitle formats
  (MicroDVD, SubRip, OGM, SubViewer, Sami, VPlayer, RT, SSA, AQTitle,
  JACOsub, PJS and our own: MPsub). DVD subtitles (SPU streams, VOBsub
  and Closed Captions) are supported as well.

Alternatives to Real Player


Does powering a module with 5v instead of 3.3v affect it's logic level?

Question: I bought a NEO-6 u-blox 6 GPS Module (datasheet, pages 9 and 14), which has a standard serial connection. I have a USB to serial converter, which is 5v logic. This board says it can be supplied 3v-5v, and I have seen people say that it is 3.3v logic, but these people always say to power the board from 3.3v. My question is: If I power the module with 5v, will the logic become 5v tolerant?
Comment: Please fix your question and link to the [datasheet](https://www.openimpulse.com/blog/wp-content/uploads/wpsc/downloadables/GY-NEO6MV2-GPS-Module-Datasheet.pdf) and not to an eBay page that has no data. Read the data sheet and update your question if there's something you need help with. Give references to the page numbers, etc. **in your question** and not in the comments.
Comment: This should be answered in the datasheet, without which we can't answer either.
Comment: I've added the datasheet, I'll add page numbers when I find the pages.
Answer: With no datasheet, it's difficult to say. Generally speaking, V In High max will be VCC + 0.6 maximum. And V Out High will be at least VCC * 0.7 to max VCC. This is true 90% of the time.
But you never know of the IC has multiple internal voltage levels. Some ICS may have 5V VCC, which it regulates internally to 3.3 and 1.8, and logic will be tied to the 3.3v.
And that module has a sot-23-5 IC, which may be a voltage regulator. So while the module is 5V in, the actual IC runs on 3.3v.
So datasheet is important here.
Update: The IC's data sheet confirms what I said above. Max 3.6V VCC for that specific GPS IC. The 5 pin sot-23-5 is likely the mic5218-3.3 3.3V low dropout linear regulator. No 5V tolerance at all on the data pins.
Comment: Datasheet, datasheet, datasheet. I completely forget to look at those some times, the datasheet even says the board is not 5v tolerant. Thanks for the quick answer!
Answer: That depends on the circuit. If it is a 3V chip with a 3V low-drop regulator it will never really run on the 5V you supply. If it is a 3-5V chip it will in general adjust its logic levels.
For your case, the datasheet of the GPS module (http://www.kayraelektronik.com/download/gps-moduller/NEO/NEO-6_DataSheet_(GPS.G6-HW-09005).pdf) states that the module itself is 3.6V maximum, so I suspect that the PCb contains a voltage regulator.
The electrical specs doe not state that the pins are 5V tolerant.
Comment: I can still power the module with 5v, right?
Comment: If the documentation of your PCB says so. Thie datasheet is of the GPS module itself, so that is no use to figure this out.
Answer: A schematic for a similar (the same?) board is at this website (posted by G4ZFQ, who cited K9IVB as the source of the schematic). It shows that the I/O pins are directly connected from the GPS module to the board's I/O pins. The module's datasheet states that that the I/O terminal's maximum voltage is 3.6 V, so it would not be 5 V tolerant.
The board does contain a 3.3V regulator that is used to convert the input power supply voltage (3-5V) to 3.3V, but the GPS module itself never gets 5V.


Which wires goes to appliance's ground and on/off switch?

Question: I have an electric hair trimmer whose power kept getting interrupted.  I knew the problem was in a particular spot in the cord because when it would bend there, the trimmer would lose power.  I cut the cord at that spot and discovered one of the wires inside the outer black insulating rubber was broken.  My plan was just to strip the outer black insulating rubber and re-splice the two wires together and then cover the area back up with a few layers of electrical tape.  Problem is I forgot to label the wires before I cut them and now I'm not sure which wires coming from the plug go to which wires that are attached to the cutter.  Is it that the wire belonging to the wider prong on the plug goes to the trimmer's ground and the wire belonging to the narrower prong goes to the trimmer's on/off switch?  What happens if it's wired backwards - does it just not work or is it dangerous?  Would I get electrocuted?
Comment: A mains cord spliced with electrical tape sounds like a good way to damage yourself.
Answer: The Live (thin blade) should be switch-controlled. The Neutral (thick blade) should be connected to ground. Reversing them could potentially be fatal.


Can I debounce after a shift register?

Question: I am rewiring a cheap old organ for digital and want to use shift registers to read all the keys. Is it possible to debounce the keys after the shift registers, or do I need to do it before? Either way, is there anything I need to keep in mind?
Comment: You effectively asked a few new questions. In general you should not do that, it makes a perfect answer to your original question seem sloppy for nor answering the new parts. Better open a new question, or ask a (small) follow-up in a comment to the answer.
Comment: Sorry, rolled back.  People just wrote more general answers than I expected.  Michael's answer gave me enough confidence to order the components, and they're cheap enough that I don't risk much by finding the rest of my answers via experimentation.
Answer: It is perfectly legitimate to strobe all the key present states into a series of shift registers and bring those states into the software realm. All you need to do is to sample the key states on a periodic basis and at each sample do some "vertical bit math" on the current bit stream as compared to the previous copy of the bit stream.
The neat thing about this approach is that you can operate on the vectors of all the input stream data a byte at a time and effectively process the debounce and current state logic on eight keys at a time!
I have used this approach in a number of commercial products over the years and have been able to support large numbers of key inputs without consuming a high percentage of the processing bandwidth if the MCU.
To give an idea of how the vertical binary math works I will share some code here that processes a vector of input signals. In the example the inputs were gathered from six pins coming in from a port. However it can be extended to as wide of vector as you need with successive bytes of data coming in from your shift registers.
First some definitions from a header file. Note that this input filter scheme was designed to be called once each 10 msec with four sample periods to provide for switch debouncing over a 40 msec period.
<code>#ifndef _INPUTS_H
#define _INPUTS_H

/* setup the number of input poll samples to filter for stable state */
#define INPUT_POLL_COUNT    4

/* define the states of the INPUT bits in the input status byte */
/* the inputs from port 4 are gathered and shifted right two bits */
#define INP_1           0x01    /* P4.2 - input 1 */
#define INP_2           0x02    /* P4.3 - input 2 */
#define INP_3           0x04    /* P4.4 - input 3 */
#define INP_4           0x08    /* P4.5 - input 4 */
#define INP_5           0x10    /* P4.6 - input 5 */
#define INP_6           0x20    /* P4.7 - input 6 */

#define INP_CNT     6           /* number of logical inputs */

/* global data declarations */
extern unsigned char code inp_table[INP_CNT];
extern unsigned char xdata inp_filter[INPUT_POLL_COUNT];
extern unsigned char xdata inp_status;
extern unsigned char xdata inp_previous;
extern unsigned char xdata inp_true;
extern unsigned char xdata inp_false;

/* input function prototypes */
extern void inp_init(void);
extern void inp_scan(void);
extern unsigned char inp_state(unsigned char inp_bit);
extern void inp_clear(unsigned char inp_bit);
extern unsigned char inp_true_test(unsigned char inp_bit);
extern unsigned char inp_true_get(unsigned char inp_bit);
extern unsigned char inp_false_test(unsigned char inp_bit);
extern unsigned char inp_false_get(unsigned char inp_bit);

#endif /* _INPUTS_H */
</code>
Here is the global data definition for the input debounce scanner.
<code>/* array of defined INP acess masks ordered by index number */
unsigned char code inp_table[INP_CNT] = {
                                         INP_1,      /* P4.2 - input 1 / power LED */
                                         INP_2,      /* P4.3 - input 2 / green stat LED */
                                         INP_3,      /* P4.4 - input 3 / amber stat LED */
                                         INP_4,      /* P4.5 - input 4 / blue ID LED */
                                         INP_5,      /* P4.6 - input 5 / aux in A */
                                         INP_6       /* P4.7 - input 6 / aux in B */
                                        };

/* array of bit flags for inputs filter */
unsigned char xdata inp_filter[INPUT_POLL_COUNT];
unsigned char xdata inp_status;          /* current filtered input state */
unsigned char xdata inp_previous;        /* previous filtered input state */
unsigned char xdata inp_true;            /* saved input true transition */
unsigned char xdata inp_false;           /* saved input false transition */
</code>
Next here is the routine called at startup to initialize the debounce filter arrays and current state vectors.
<code>/*
**
** routine to initialize the inp scan port logic to the inactive
** state.
**
*/

void inp_init(void)
{
    unsigned char i;

    for(i=0; i<INPUT_POLL_COUNT; i++)
    {
        inp_filter[i] = 0;
    }
    inp_status = 0;
    inp_previous = 0;
    inp_true = 0;
    inp_false = 0;
}
</code>
This is the routine called once each 10 msec from a timer interrupt to fetch the current input data and process it through the bit vectors using vertical bit math.
<code>/*
**
** routine to poll the inp lines and filter the current state of inputs
** (note that this is called from the timer interrupt function)
**
*/

void inp_scan(void) using 1
{
    unsigned char inp_tmp;
    unsigned char inp_or;
    unsigned char inp_cur;
    unsigned char i;

    inp_cur = P4 >> 2;                      /* read inputs from P4.2 -> P4.7 */

    /* loop to shift filter up by one position and perform */
    /* bit wise equal comparison */
    inp_or = 0;                             /* this holds 1 for bits that are */
    for(i=0; i<INPUT_POLL_COUNT; i++)       /* changing in span of filter table */
    {
        inp_or |= inp_cur ^ inp_filter[i];  /* adjacent pair != so set or */
        inp_tmp = inp_filter[i];            /* swap so to slide table up */
        inp_filter[i] = inp_cur;
        inp_cur = inp_tmp;
    }

    /* produce bit pattern for current stable input data */
    /* if a input goes true its previous false state data is */
    /* automatically cleared and as well if a input goes false */
    /* its previous true going status is cleared */
            /* no chg where toggles  */   /* mask present status where stable */
    inp_status = (inp_status & inp_or) | (inp_filter[0] & ~inp_or);

    inp_tmp = inp_status & (inp_status ^ inp_previous);
    inp_true |= inp_tmp;
    inp_false &= ~inp_tmp;

    inp_tmp = inp_previous & (inp_status ^ inp_previous);
    inp_false |= inp_tmp;
    inp_true &= ~inp_tmp;

    inp_previous = inp_status;
}
</code>
Finally here is a collection of subroutines that can be called by mainline code to see what the current status of any given key is.
<code>/*
**
** function to return the current filtered and stable state
** of a specific inp input. returns 0 if the inp is
** inactive and 1 if the input is active. the input argument
** is the bitmask for the requested inp.
**
*/

unsigned char inp_state(unsigned char inp_bit)
{
    if(inp_status & inp_bit)
    {
        return(1);
    }
    return(0);
}

/*
**
** function to flush the inp input
** true/false status for a bit and make that inp
** look inactive. the input argument
** is the bitmask for the requested inp.
**
*/

void inp_clear(unsigned char inp_bit)
{
    inp_true &= ~inp_bit;
    inp_false &= ~inp_bit;
}

/*
**
** function to check for specific inp status
** indicating a queued TRUE transition of a inp.
** if so then to return a 1 value, else
** return a 0 value. the input argument
** is the bitmask for the requested inp.
**
*/

unsigned char inp_true_test(unsigned char inp_bit)
{
    if(inp_true & inp_bit)
    {
        return(1);
    }
    return(0);
}

/*
**
** function to get input status for a inp bit
** indicating a queued TRUE transition of a inp
** and then clear the queued true status. if the inp
** is queued true then return a 1 value, else return
** a 0 value. the input argument is the bitmask
** for the requested inp.
**
*/

unsigned char inp_true_get(unsigned char inp_bit)
{
    if(inp_true & inp_bit)
    {
        inp_true &= ~inp_bit;  /* clear the status */
        return(1);
    }
    return(0);
}

/*
**
** function to check for specific input status
** indicating a queued FALSE transition of a
** inp. if so then to return a 1 value, else
** return a 0 value. the input argument is the
** bitmask for the requested inp.
**
*/

unsigned char inp_false_test(unsigned char inp_bit)
{
    if(inp_false & inp_bit)
    {
        return(1);
    }
    return(0);
}

/*
**
** function to get inp status for a specified bit
** indicating a queued FALSE transition of a inp
** and then clear the queued false status. if the input
** is queued false then this so then to return a 1 value,
** else to return a 0 value. the entry argument is a bit
** number 0-7 to look at.
**
*/

unsigned char inp_false_get(unsigned char inp_bit)
{
    if(inp_false & inp_bit)
    {
        inp_false &= ~inp_bit;  /* clear the status */
        return(1);
    }
    return(0);
}
</code>
Comment: 40ms is getting to the edge of acceptable delays, though, from a playability standpoint.
Comment: @ScottSeidman - The code I posted was a sample from some other application. One is free to set the sampling rate as fast as the residual bandwidth of the MCU can support and then set the debounce filter depth accordingly. Each type of switch and application will have its own set of unique requirements. One beauty of the software approach is how easily it can be adjusted to the requirements at hand.
Answer: I am going to assume are reading all of the keys by feeding them in parallel into shift registers, and then clocking them out.
You need to debounce them as they are latched into the shift registers; otherwise if their is noise from a key the wrong state could be latched and then shifted out.
There are lots of circuits around for debouncing switches; this is considered one of the best:

For more information, see "A Guide to Debouncing".
Comment: Sorry to say but your claim that all the switches must be debounced before loading into the shift register is decidedly not true.
Comment: Oh and by the way. An RC filter switch debouncer can be a suitable method should one decide to use hardware for debouncing switches but it is not one of the best. The best debouncer still uses a two throw switch and a set/reset flip flop.
Comment: @MichaelKaras Whether or not you need to do the debouncing before or afte depends on the scan rate.
Comment: @MichaelKaras Re the RC filter, that's why I said it is *one* of the best. I agree the latch is best, but it uses more hardware. It is the first one mentioned in the document I linked to.
Answer: If all key-bounce events happen quickly, there is no harm in feeding the key switches directly to the shift registers and letting software take care of them.  Indeed, in cases where switch bounce events will be shorter than the minimum time resolution of interest, slow polling will take care of switch bounce "automatically" [if a key is pressed just before a scan, but switch bounce causes it to be read as not pressed, it will simply be perceived as having been pushed one polling cycle later than it actually was].  For an organ, it's probably desirable to avoid quantizing key events too coarsely, so "vertical bit processing" as described in the other answer may be good.
Something like an organ keyboard, however, may have switch-bounce problems that cannot be resolved purely in software.  The difficulty is that some switches may have a resistance which varies irregularly with position; if pushed sufficiently slowly, this process could be spread out over an arbitrarily-long time.  If one uses suitably-sized pull-up resistors, this problem may be solved by feeding the switches into Schmidt-trigger buffers in advance of the shift registers.  If one uses that approach, it may be good to arrange things so that when driven with full VDD the pull-ups would be a little "stiffer" than desired, but instead of connecting them to VDD connect them to an adjustable voltage.
Alternatively, depending upon the type of organ the keyboard is coming from, it may be desirable to power the switches from a higher-voltage supply, pass them through a resistor, and diode-clamp them to a voltage which is acceptable to the Schmidt-trigger buffer (one would need a passive pulldown in that case).  From what I understand, some silver-alloy switches may tarnish so as to have significant resistance, but applying enough voltage to force current through them will help break down the tarnish.  Such switches may initially work fine when connected to low-voltage/low-current logic, but performance may degrade with time.  Something like an electropneumatic pipe organ keyboard would switch 24 volts or so with significant current; a Conn Minuet electronic (vacuum-tube based) organ keyboard would switch less current, but at 90 volts.

Can I debounce after a shift register?


flash loan arbitrage vs flash loan attack

Question: What is the difference between a flash loan arbitrage and a flash loan attack? If I somehow find an opportunity to make a 1000% profit which crashes one or more token, will it be considered an attack? If anyone can explain the difference.
Answer: Flash loan arbitrage means that when the bot see an underpriced token, take a flash loan from Aave and do arbitrage between two exchanges and return the loan with interest. On the other hand, in flash loan attack, hacker take a flash loan from Aave to drain the pool. The difference is that in arbitrage, no one lose the money and it is just a way to make prices equal between exchanges. In flash loan attack, the project lose the money.


Why do electrons move towards regions of lower potential?

Question: Can someone explain why electrons move from high to low potential regions in quantum mechanics? By the way, what is the very definition of this potential? Moreover, how does this generalize to other particles?
Comment: We don't need quantum mechanics and the relation is perfectly general: $\vec{F}=-\vec{\nabla}V$
Answer: First of all, before anyone gets mad: We do not know. You could say that it just turned out that way, but in nature things tend toward their minimum states of energy. You simply have to accept this axiom(think about particle excitement and the ground state). For a charged particle the Potential energy equation is:
$U_{potential}=\cfrac{(k*q*Q)}{R}$,
Where $k$ is Coulomb's constant, and $r$ is the distance between the charges.
So, because the electron's charge is negative, a greater distance would yield a larger potential energy value. Since we said that in nature, particles tend toward their lowest states of energy (once again think of gamma decay, or something of the sort), it would make no sense for an electron to travel away from a region that causes it to have lower energy state. Consequently, electrons move toward the region of a lower state of energy.
$\textbf{Your next question should be: Why do thing tend toward their lowest states of energy?}$
I will attempt to answer this as well:
It has to do with the principle of $\textit{minimum total potential energy}$, a concept  that denotes the phenomenon that, innately, structures in nature will tend towards their lowest states of potential energy.
The reasoning for this is intuitive if one considers the second law of thermodynamics, which states that in nature, a bodies will tend toward their equilibrium, where entropy is at a maximum. Simply put: if something is cold it is in a state of $\textbf{low entropy}$, and if something is hot is in a in a state of $\textbf{high entropy}$.
Consequently, if something has a higher heat content, it has a lower potential energy, and since things tend toward maximum entropy, we can reason that things tend toward low energies as well. For example, an electron and a proton will combine to form a neutral hydrogen atom, which has less charge than the individual particles (even if they are infinitely far away). So, if this applies even at infinite distances, then every particle is connected in this way, and they will all tend toward their lowest states of energy.


Are end points of an open bosonic strings orthogonal to D-branes?

Question: I'm apologizing for such simple question, I just started to learn string theory. If one end of an open bosonic string is attached to a Dp-brane it means that in directions normal to the brane Dirichlet b.c. are satisfied, and in tangential directions Neumann b.c. are satisfied. Each textbook I checked says that an end point of a string is just pined to the brane, but such descriptions ignores Neumann b.c. in tangential directions. It looks to me that Neumann conditions mean that the string is orthogonal to the D-brane. Is this right?
Answer: The endpoint is pinned in the sense that it can only move in the world volume of the brane. A good visual, I think, is a normal string with a small loop at the end that is tied loosely around a fixed rod. The string moves freely in the direction parallel to the rod, but is fixed in the directions perpendicular to it. This would be like a D1 brand.
Comment: You saying that there are no Dirichlet conditions in tangental directions, that is just part of the definition. But I'm asking: what second part of the definition (Neumann b.c. in tangential directions) imply?
Comment: Sorry, I misread your question. The other BCs are connected to the fact that no momentum can flow out of the string in that direction, just like for a normal household string.
Comment: Yes, I agree with this, but if we don't look at momentum and just look only on coordinates, is not it also true that Neumann's BC's in tangential directions imply orthogonality as I claim?
Comment: Yes, that is correct. Page 129 of zwiebach, if you have it.


Is there any use for Flex + Python/Ruby without a web framework (Django/Rails)?

Question: I often hear about Flex being combined with web frameworks on the backend. The idea being that Flex serves as the presentation framework while the web framework (Django/Rails) does the database lookups and sends the data to Flex to present in the form of XML.
However, is there ever a situation where Flex and Python/Ruby would be combined without a web framework as an intermediary? Under what circumstances might such a combination make sense (if any)?
(I'm trying to think of projects where the functionality of a scripting language would be complementary with the functionality of Flex - but also whether it's possible for the two to be combined without too much high jinx).
Answer: You can still code against WSGI directly in Python.  If that's the route you want to go, PEP 333 is about the only way to go.
With that said, doing so is a good learning experience, but WSGI wasn't really intended to be used directly.  You don't have to use a full-stack framework like Django if you don't want to.  If you want something more light-weight, might I suggest CherryPy or web.py?  They're a lot more light-weight than Django is.
There are other options aside from WSGI, but they'll pretty much all have about the same caveats.  In other words, it can be done, but usually isn't recommended.
Answer: Flash player allows developers to open sockets to remote applications. It is feasible that you could create a Flex application that connected to a remote server and transferred binary or serialized data. This has the added benefit of supporting asynchronous communication, so such a thing might be practical for multiplayer games or chat clients.
Adobe develops an application for this purpose called Flash Media Server (Unless the name has changed).
There is also an open source project called Red5 with a similar feature set.
Finally, there are several libraries that enable serialization and transfer of flash objects between languages. Some examples are AMFPHP http://www.amfphp.org/, and the much more advanced Flex Data Services http://www.onflex.org/ted/2006/05/flex-data-services-part-1.php.


Universal Blacklist Request: RTFM

Question: I was a bit surprised it wasn't on there already, right next to LMGTFY. But I can't think of any reason it would be appropriate to put RTFM in a post or comment.
Comment: If nobody understands how they work it can only be due the complete lack of documentation. When it comes to understanding how SE works ignorance **is** an excuse, because it's being carefully cultivated.
Comment: Irony: your post and this discussion would not have been possible with this rule enabled. :-) Also, we would see "R-T-F-M", "R.T.F.M." or "R*T*F*M" etc.
Comment: Um, no... The Blacklists are per site. Apparently nobody understands how they work. =[
Answer: It sounds good at first glance, until you get into the details...
As of now there are 97 posts containing rtfm. Among them I see:

Someone asking for the manual
Someone who answered his own question with the manual
RTFM appearing in program output
RTFM used as an example similar to foo and bar
Someone stating that they read the manual

One thing I didn't see from my short spot check was misuse of "RTFM". Such things should be dealt with on a case-by-case basis, as they are now.
Comment: @pauska It is when they don't need to be rewritten.
Comment: If you ban "RTFM" on these grounds, you may as well ban "Google" on these grounds as well.
Comment: 97 posts isn't a terrible amount of posts to re-write
Comment: Fine, don't rewrite them but block future posts from containing the acronym? I can't see how blocking "RTFM" is bad, when we block people from writing "Help" in a title..
Comment: "Why can't I paste the output of installing `rvm` into a Server Fault question?"
Comment: Banning it wouldn't necessitate rewriting any existing questions... We can also make an exemption for when the content contains "RVM" as well. I'm a bit miffed that RVM even does that. The rest, I really don't see self-deprecation as an excuse. But I'll agree that it may need some more thought.
Answer: RTFM is (was) an actual product - It is entirely conceivable that we would encounter questions about this product (as a component of the relatively common RT ticketing system), and there are parts of RT that still refer to "RTFM" even though it's no longer a discrete product.
It would be rather unpleasant for us to turn around and tell someone they can't ask their question because the name of the product they're asking about is a bad word.

More broadly, I would rather not see us applying word-bans to correct bad behavior - If people are being dicks we have existing tools (peer pressure, edits, mod messages, suspensions, whomping shovels, personal responsibility) to deal with this, and I'm all for applying those tools liberally.
I think word bans should be saved for truly egregious problems (like LMGTFY), spam, etc.
Answer: Sorry but sometimes RFTM is the correct answer. We see far too many posts which would never have been required if the asker had simply done the right thing and read the documentation.
Instead of creating a blanket ban on the term shouldn't we instead simply close any questions where RTFM is given in either an answer or a comment? Don't treat the symptom. Treat the disease instead.

Universal Blacklist Request: RTFM


Multiple confusion matrix for multiple training instances. Which one to take?

Question: I am using Matlab Neural Network toolbox for a classification problem. Now  considering a single set of data, if the inbuilt neural network is trained and classified with same data multiple number of time, different accuracy and different confusion matrix is obtained. Now which result should I take? Should I take all the vales obtained in all the training instances and average them fix on one particular result?
Answer: I can't check at the moment (no Matlab at hand), but I suppose the differences come from the different random seeds used to initialize the neural networks (at least this is the only part which i can think of that has a random component). I would suggest predicting class probabilities, averaging those and then viewing the resulting confusion matrix of the "averaged" prediction. This way you - to a degree - mitigating the effect of randomness resulting from different initializations of the weights.
Comment: by the way, how many data should one take which be averaged?
Comment: This is just personal experience (= no science behind it), but I'd say 20-30  (if it's not too time-consuming to run) should cut it.


Can I use fresh okara without cooking it?

Question: I started to experiment with home-made soy milk, which means that I have a lot of okara and I am looking for various ways of using it. I grind the soy beans before boiling the milk, so that the okara I get comes from the beans that have just soaked in water overnight and boiled for one or two minutes before grinding. Can I use such okara directly in spreads and other recipes without boiling it or steaming it? Can my body use the proteins and other nutrients?
Answer: Its been a while but I found this thread as I was wondering the same thing... Not much info on raw okara but I just googled raw soybeans....
"For human consumption, soybeans must be cooked with "wet" heat to destroy the trypsin inhibitors (serine protease inhibitors). Raw soybeans, including the immature green form, are toxic to humans, swine, chickens, and in fact, all monogastric animals."
From wikipedia http://en.wikipedia.org/wiki/Soybean
Answer: Okara is not very appealing raw It should be cooked into something.
It is used in some foods but I have never heard of it being used raw.
Comment: So far I have used it in spreads and breakfast cereals. It tastes good (or rather it takes over the dominant taste quite willingly) and it creates a nice texture. I'm mainly curious if my body can absorb the nutrients from okara without cooking or baking it.
Answer: If you made soy milk in a soy milk maker, the okara isn't raw, it's cooked. But if you made it in a blender before boiling the beans, and then cooked the milk on the stovetop, then the okara really needs to be cooked before eating.
Answer: From what I know, I suggest to cook it. Here are many examples of people being poisoned after drinking uncooked soybean milk. The toxin in raw soy milk may be trypsin inhibitors and saponin. Okara is part of soybean, it may contain the toxin.
Answer: I was trying to figure out if okara powder is safe to use in smoothies and came across this question.
As other commenters mentioned, the question is whether it was cooked, and how long. This is presumably easy to determine if you're making soy milk at home, though 1 minute is probably not sufficient. This paper notes:

Boiling them at atmospheric pressure during 20 minutes was required to destroy 80% of the soybeans antitrypsin activity [...] Nevertheless, the soybeans texture was not satisfactory; therefore, longer boiling periods were tested so as to establish the most suitable time needed to achieve a softness similar to that of common beans as usually consumed. Softness was measured instrumentally, and the optimal conditions found were: 40 min boiling after 8 hr soaking in a 0.25% bicarbonate solution.

Ground soybeans probably cook more quickly than whole soybeans, but it seems like 20 minutes would be a minimum to avoid toxins.
For commercial dried okara flours, this site notes:

Fresh okara made from raw uncooked soybeans (like what we get from our soya milk recipe, where we process uncooked beans, filter, then cook the milk) has a flavor similar to raw mung bean shoots.
Raw uncooked okara must be cooked before consumption because uncooked soy protein is poisonous - see our article on "What to do with soy bean pulp" for details on How To Cook Raw Okara.
Fresh okara made from cooked soybeans (where cooked beans are blended and then filtered) has a neutral or bland flavor.
Dry okara granules and powders have a nutty flavor to them.

So it's apparently possible to tell by taste (neutral/nutty implies cooked; "beany" implies uncooked). Additionally, the manufacturer would probably mention that it must be cooked prior to consumption if it's made from raw soybeans. If their package mentions adding it to smoothies or other raw applications, it's either safe to eat, or they are opening themselves up to serious liability claims.
Answer: I made my soy milk by soaking 1 cup of beans in hot water for a day and removing the translucent skin. I steamed the soaked soy bean and blended it in my vita mix with 7 cups of water.
Then I strained this and the okara was unbelievably delicious - like almond paste with no bitterness, but nutty and creamy. The milk turned out very delicious and creamy.
I am going to add it in my carrot tomato soup.
Comment: I'm sorry, but how does this answer the question?