How does the encryption/decryption process work?

Question: I am not referring here to the process of Public Key exchange, but rather the process of encryption or decryption itself after the Public/Private keys have been generated. For instance, using Diffie-Hellman algorithm we ended up getting both Public and Private Keys of size 512 Bytes. How are we supposed then to use the Public Key to encrypt a given plain text message "Hello World!" and the Private Key to decrypt it?
Comment: Maybe your question already has an answer [here](http://crypto.stackexchange.com/questions/14945/how-is-a-public-key-actually-used-to-encrypt-something?rq=1).
Comment: You would have to encode the message "Hello World!" into the plaintext space of Diffie-Helman and then encrypt it.  But, in fact, things are not even done like that, because messages use to be longs and public key encryption uses to be slow, so, you would rather encrypt the message with some block cipher and use the asymmetric scheme to encrypt the key of this block cipher...
Comment: I just realized that you are talking about Diffie-Hellman, not about ElGamal, so now I think I'm not getting the point of your question. Do you want to know how to use the exchanged key to encrypt? Because you are not supposed to use the Diffie-Hellman's  public key to encrypt messages.
Comment: @Vitor : Yeah exactly. I will truly appreciate that :)
Comment: The question is too broad, I would rewrite it in such a way that it is *specific* to any protocol that involves diffie hellman for key agreement.
Answer: Diffie-Hellman does not generate public and private keys. It generates an agreed number in such a way that:

An eavesdropper cannot work out what number has been agreed upon.
A man in the middle can either know the agreed number which party $A$ is using and the agreed number which party $B$ is using, or ensure that the agreed number which party $A$ is using is the same as the agreed number which party $B$ is using, but not both.

No encryption is involved in Diffie-Hellman and Diffie-Hellman does not generate encryption keys.
Of course one of the main uses of an agreed number would be to do encryption with it – or rather, with a key derived from it. But that is nothing to do with Diffie-Hellman per se.
To that extent, your question is "How, given a number, do I turn it into an encryption key and use it?" – to which the answer is, "In any way you like".
Answer: Diffie-Hellman is a key agreement protocol. It is used to establish a secret value (master secret) which is identical at the parties involved in the key agreement.
This value is then put through a Key Derivation Function (KDF) to derive one or more symmetric keys, such as AES keys, that are also identical for the parties involved. These keys can then be used to encrypt messages and to protect the integrity and authenticity of the messages between the parties. Sometimes the value is truncated or put through a one way function such as a hash function instead of using a well defined KDF.
The actual symmetric cipher, mode of operation and method of generating the authentication tag are not part of the key agreement protocol; basically they can be anything at all.

It is impossible for other parties to retrieve the secret value that has been agreed upon.
Then again, it is important to note that Diffie-Hellman does not authenticate the parties themselves. This should be performed as part of the protocol using different primitives such as signature generation functions. It's important that the public values used for the key agreement are also verified at some point in the protocol.
Answer: Diffie-Hellman key exchange uses one party's private key and the other party's public key to generate a shared secret value, this is done through either exponentiation or multiplication modulo a prime, depending on the algorithm and type of key. There are other methods of creating a shared secret, such as the infamous algebraic eraser.
The shared secret could be used directly as a symmetric key, however this is neither recommended nor done in practice, because there is not an even distribution of entropy in the shared secret, and sometimes bits can be strongly biased.
The shared secret is hashed before being used as a key, or be processed with a specific key derivation function like HKDF, or the PRF used in TLS.
Comment: @user-x220 Session keys have nothing to do with this. You also wrote, Diffie Hellman is used to create a pair of private/public key, which is just not the case - DH is a key exchange protocol and not a public key encryption scheme. In this field, correct context, naming and notation are really important.
Comment: Thanks for your answer. I would like to stress again that I would love to have a deep explanation of how the actual encryption process occurs rather than the key agreement protocol whether it's a public/private keys system or a hybrid system with shared session keys
Comment: @tylo : I might did a mistake without paying attention. The key-exchange protocol itself doesn't matter. What do matter is the encryption process, like how a plain text "Hello World!" message like that get encrypted into something like "+%$lk23-**-/?09" using for instance the public key?
Comment: @user-x220 I think you're confusing some concepts. There is no public key in this context. The key exchange algorithm ensures both parties have a secret. This secret is deterministically converted into a key. Now both parties have the same key. This key is used to encrypt and also decrypt, using a symmetric encryption algorithm. This symmetric encryption algorithm can be any algorithm you choose. A common choice is AES. AES takes a block of 16 bytes, a key of 16,24,or 32 bytes, and produces 16 bytes of ciphertext. These blocks are typically chained together in some manner.


Uniform Concentration Bounds on Weighted Sum of i.i.d. Bernoulli Random Variables

Question: Let $\delta_1,...,\delta_n$ be $n$ independent identically distributed Bernoulli random variables with $\mathbb{P}(\delta_1=1)=p$. We consider a set $\Omega = \{\mathbf{a}:=(a_1,...,a_n)~|~a_i\in [0,c/n],~\sum_{i}a_i=1\}$, where $c$ is a generic constant. What is the best upper bound for the following probability?
\begin{align*}
\mathbb{P}\left(\sup_{\mathbf{a}\in\Omega}\left|\frac{1}{p}\sum_{i}\delta_ia_i-1\right| \geq t \right)
\end{align*}
Comment: I think you can do the sup more or less explicitly, but when I  do it I  don't get an idea of the range of t in which you are interested.  What is it ?
Comment: I think this probability is just equal to $1$, under mild extra assumptions on $p,c,n$. For a typical outcome, with roughly the expected number of $\delta_j$'s equal to $1$, we could take those $a_j=0$ or something of this sort. For an atypical outcome, we don't need to do much of anything, we can just take $a_j=1/n$, and again the sum won't be close to $1$.
Comment: @michael, I am interested in a small constant $t$, which does not scale with $p$ and $n$.
Answer: As commented by Michael, $S:=\sup\limits_{\mathbf{a}\in\Omega}\left|\sum_{i}\delta_ia_i-p\right|$ can be expressed explicitly. Indeed, letting
\begin{equation}
 k:=\sum_{i}\delta_i,
\end{equation}
one has
$$S_1:=\max\limits_{\mathbf{a}\in\Omega}\sum_{i}\delta_ia_i=1\wedge\frac{ck}n$$ and $$S_2:=\min\limits_{\mathbf{a}\in\Omega}\sum_{i}\delta_ia_i=1-\max\limits_{\mathbf{a}\in\Omega}\sum_{i}(1-\delta_i)a_i=
1-\Big(1\wedge\frac{c(n-k)}n\Big)$$
$$=0\vee\Big(1-\frac{c(n-k)}n\Big). $$
So,
\begin{equation}
 S=|S_1-p|\vee|S_2-p|.
\end{equation}
The probability in question is $1-Q$, where
\begin{equation}
 Q:=P(S<pt)=P(|S_1-p|\vee|S_2-p|<pt).
\end{equation}
The exact expression for this probability is very complicated, depending on a large number of cases involving the variables $c, p, n, t$; see the 6-page expression in https://www.dropbox.com/s/2jhj2pi3v8o1d2b/Mathematica.pdf?dl=0 .
Note that for $\Omega\ne\emptyset$, it is necessary that $c\ge1$.
Since you said that $t$ is "small", let us assume, for instance, that $0\le t\le1\wedge\frac{1-p}p$. Then
\begin{equation}
 Q=P\Big((1-t)p+c-1<\frac{ck}n<(1+t)p\Big).
\end{equation}
In particular, if $c$ is close to $1$ (so that all $a_i$'s are close to $\frac1n$), then this expression for $Q$ is close to
\begin{equation}
 P\big((1-t)np<k<(1+t)np\big),
\end{equation}
the probability that $k=\sum_{i}\delta_i$ (which has the binomial distribution with parameters $n$ and $p$) takes a value in an interval symmetric about the expected value of $k$.
Now you can use any of the known bounds on the tail probabilities for the binomial distribution to bound $1-Q$.
Answer: This is an expanded version of my comment above. The probability equals $1$ if we make the mild extra assumption that $t\le 1$ and
$$
t\le \frac{c-1}{c+1}\left(\frac{1}{p} - 1\right) \quad\quad\quad\quad (1)
$$
(you wrote you wanted small $t$).
First of all, by the symmetry of the maximization, to find the sup, it suffices to discuss the case where $\delta_j=1$ for $j=1,2,\ldots , k$, and $\delta_j=0$ otherwise, for some $k$. So we're maximizing
$$
\left| \frac{1}{p} \sum_{j=1}^k a_j - 1 \right| . $$
There are two cases: (1) If $|p-k/n|\ge pt$, then we simply take $a_j=1/n$ to confirm that the $\sup$ is $\ge t$.
(2) If $|p-k/n|< pt$, then I really want to take $a_j=0$ for $j\le k$. I can't always do this because I also must keep the sum equal to $1$, but if it is admissible, then obviously the sup is $\ge 1\ge t$.
If $a_j=0$ for $j\le k$ is not possible, then I do the next best thing: I'll take $a_j=a$ for $j\le k$, with $a>0$ minimal. In other words,
$$
ka + \frac{c}{n}(n-k)=1 .
$$
Then
$$
1-\frac{ka}{p}=1-\frac{1}{p} + \frac{c}{np}(n-k) = 1+ \frac{c-1}{p} - \frac{ck}{np} > 1+ \frac{c-1}{p} - c - ct .
$$
I want this to be $\ge t$, and this is condition (1) rewritten, so we're done.
Comment: The condition $(1-t)p+c-1\ge(1+t)p$ is equivalent to $t\le\frac{c-1}{2p}$. So, it follows from my answer that $Q=0$ and hence the probability $1-Q$ in question is $1$ if $0\le t\le1\wedge\frac{1-p}p\wedge\frac{c-1}{2p}$. The latter condition is less restrictive than the condition $0\le t\le1\wedge\frac{c-1}{c+1}(\frac{1}{p} - 1)$ -- given that $c\ge1$.
Comment: @IosifPinelis: Yes, it's obvious from my argument that I'm not attempting to find optimal conditions, I'm just making the general point that the prob is $1$ essentially always.


Text field shows after picklist value is sellected

Question: I am curious if this thing is possible to do on page layout.
If i select some value from picklist/checkbox the text field should show up on page layout.
Answer: The only way I can think of doing this on a standard layout is by using a picklist/checkbox field along with a workflow rule to change the recordType of the record and have different layouts for each recordType, one with and one without the text field. Otherwise, you could embed a custom visualforce page and use the rendered attribute to evaluate the picklist/checkbox field to determine whether or not that text field should display. Available on both input and output textfields.

rendered  Boolean A Boolean value that specifies whether the component
  is rendered on the page. If not specified, this value defaults to
  true.     10.0    global
Answer: This is currently not possible using native Salesforce without a Visualforce Page. But there is an Idea with a whooping 54000+ points raised long back but in consideration now. Latest update says that the Product Team wants to address this Idea but the timeline is more than a few releases out.
https://success.salesforce.com/ideaView?id=08730000000BroxAAC
Please vote for this idea.
If you are looking for Appexchange Solutions, May I suggest you to go with Skuid which is a powerful UI related App. Relevant Link :
http://help.skuidify.com/m/supercharge-your-ui/l/173514
Cheers,


what is the difference between 'incantation ' and 'invocation'

Question: What do we call the action of calling God's name(s) praying to Him for curing a disease. Is it incantation or invocation or something else?
Comment: Welcome to ELL, Zeeshan. We expect people to do a little research before posting a question. If the research doesn't make everything clear, please add links to your research and explain specifically what you don't understand. In this case, you could look the words up in a good dictionary like this one: https://dictionary.cambridge.org/dictionary/english/incantation. In this case, the difference comes from the latin words in the middle: cantus = song or chant, vox = voice. So the right word depends on whether you sing or say God's name.
Answer: An incantation is a chanted phrase.  An invocation is a summoning, a calling-by-name.  An incantation can be employed in an invocation; invocation can be the purpose of the incantation.


Would anyone like a drink?

Question: Does anyone want a drink? vs. Would anyone like a drink?
The first sentence is perfectly fine. I just want to know whether the second one is correct and if so whether it's preferred to the first or not i.e more polite.
If the sentence was "Would you like a drink?", I would not ask the question because it is correct and common. What itches me is "anyone" in the second sentence.
Comment: I can imagine someone saying *"That itches me"* in the literal sense of causing skin irritation, but it seems archaic or dialectal. I don't think the figurative usage in this question text has any currency with native speakers.
Comment: You're not supposed to ask multiple *questions* in the same post, but that doesn't imply we can't usefully address multiple *issues*. Your English is already pretty good (excellent "About Me" in your profile, btw), so I can see why you're keen to have us check for even the slightest "deviation from standard". I assume you'd have taken note just the same if I'd ***edited*** your text, but (a) I wasn't 100% sure ***itches*** wasn't a regionalism, and (b) I think *other* users might benefit from seeing the comment. Anyway - thanks for the positive feedback.
Comment: I might've mistaken it for something else. I cannot think off the bat. But what's important is that I learned from this mistake. Thank you very much.
Answer:
Would anyone like a drink?

is OK, but more polite than Does anyone want a drink?, and you would be hoping for positive responses.

Does anyone want a drink?

is also OK but more of a casual request. The asking person probably would not care much if anyone wanted something or not.

Would anyone like a drink?


Is it acceptable to ask for clarification after the hand had been started?

Question: Our neighborhood game plays dealer's choice with many strange variations and a few non-standard hand ranking.  Is it acceptable to ask for clarification after the hand had been started?  A few players say no.
Comment: @RomanMik It's pretty simple why. They want to milk people for their last penny.
Comment: Any game for money should have its rules clearly stated and accessible to all players at any time. In poker rooms, it is usually acceptable to ask for clarification from a floor director. I don't see why your game shouldn't allow it.
Comment: You can always ask for clarification of the rules, as long as that doesn't reveal information about your hand.
Answer: Where I work we deal mixed games at very high limits. It is perfectly acceptable, even for the super sensitive high limit players for a person whom has little or no experience with a game to ask questions, before the hand, after the hand and during the hand. It should be no problem with your local game to ask for rule clarification at anytime. If they think not, Read Romanmik's comment over a few times until you decide it might be better to find another game, because as he said it is simple why they won't.


Do real game developers use blueprints, or do they always use C++?

Question: I'm starting to learn Unreal Engine 4. Every time I use blueprints, I think "that's not right" and I need to use C++, but there are not as many tutorials with c++ code. So, is it ok to use blueprints as a programmer?
Comment: I like to think you meant "_professional_ game developers". If you make _any_ game, you _are_ a real game developer. Be proud of yourself. I believe in you.
Comment: Why are you learning UE4 today? Why not use the latest version?
Answer: A real game developer is someone who manages to deliver a product.
Visual coding is a tool that can be used to achieve that. Some people use Chat GPT, some people use notepad, some people use blueprints, some use an IDE. Which tool you use boils down to personal preferences and the way you approach a problem.
As long as your game is running as you envisioned it in the end, the player will never know how you coded it.
Comment: And the people who use ChatGPT come to Stack Overflow when their nonsense advice doesn't work.
Comment: @Nelson not just a single text file, **a 1,000+ entry long switch-case statement**
Comment: And deep down, nobody actually cares. A relatively recent game that was widely successful, Undertale, is basically a case-study for some of the most horrid programming practice. Apparently, all the NPC dialogs are in a single giant text file.
Comment: @fyrepenguin I [found it](https://github.com/fachinformatiker/undertale/blob/master/scripts/SCR_TEXT.gml)... the horror!
Comment: @Peter-ReinstateMonica agreed - at the end of the day, the players don't see the spaghetti behind the curtain, and it produced a much-beloved game.  I would note, though, that good design will be appreciated by the devs themselves when they go to fix bugs/make updates. But you evidently don't need "good code" to produce a "good game".
Comment: @fyrepenguin That *is* funny. The code uses the switch to set a *global* array of strings :-). I mean, to stay in the spirit of this answer, which Nelson was aiming at: It works. Disrespect ends right here.
Comment: I know it has been said, but although you can crap on Toby for not putting it into a "proper" node hierarchy or often over engineered oop structures, he got the job done.  1 dev/designer doing it all.   If this kind of switch case structure methodology, which is used a ton by compilers/interpreters, as it's usually pretty fast, kept things easy to edit and organise, than I give him points for intelligently figuring out a way to keep it simple.
Comment: @AnthonyPace: That's an important point as well - the main reason we know to do better is because someone else did it worse back in the day, and has since paved the way to doing it better - but our "Better" solutions are sometimes not quite as fast, and need to be optimized to be properly better...and it ends up looking like that in the end after our tooling turns it into a final product anyways.
Comment: I'd add that the Unreal Engine, and the Blueprints inside of it, was developed specifically to try and make game development easier - visual coding is probably most prominent with visual assets being tied to them, but it is not the only use of it, and if you can make the entire game in the "Higher Level" Blueprints code, it's designed to go through the same process that a C++ developed game would; that is why the player would never know how you coded it, just that you did.
Comment: Gone Home was 100% using graphs by the creator, AFAIK. The game did really well
Comment: Good answer, but I _almost_ feel like it's missing that nobody says it needs to be an "or" question. A programmer might be writing components that need more of a "tailor-made" approach, [while _at the same time_ a game designer/level designer/story writer/etc. might be working with blue prints](https://en.wikipedia.org/wiki/Division_of_labour). Even if you're doing all these jobs combined as a solo dev, you're still free to decide per job which tool would be most efficient.
Comment: well, thats work for me i guess
Comment: @fyrepenguin: The type of thing that makes me think "Yeah, that's why Unreal Engine has Blueprints.". Maybe not specifically storing all the dialogue in there (Ideally in individual files for each NPC, probably?), but maybe they would - and separate it out for each case, and tied to the UI - and separated from the rest of the game logic.
Comment: the player will never know how you coded it. unless... [this happens](http://t.co/sOlxq3ts) or [that happens](https://github.com/keendreams/keen)
Comment: `And the people who use ChatGPT come to Stack Overflow when their nonsense advice doesn't work.` Those people have to learn how to write prompts, and what to expect (and what not to expect), and how to use the answers. Yes, GPTs can and do hallucinate, and are not magic, but they can absolutely be a *very* powerful tool to make development quicker.
Answer: Professional game development teams working in Unreal Engine typically use a mix of blueprint and C++.
One good strategy is for a designer to attempt to implement a feature in blueprint, then ask a programmer for review their prototype. The programmer can identify things that are inefficient, overcomplicated, or heavily used within the blueprint, and reimplement those in C++ in a reusable and maintainable way. The designer shouldn't hesitate to ask the programmer for C++ features that would make their job easier.
If you're the only developer on the team, of course, you have to wear both those hats. Use what works for you, as Zibelas suggests in their answer.
Answer: "Real" game developers always use the right tool for the job.
Even though it is perfectly possible to produce a professional game using only C++ or only blueprint graphs, most professional Unreal Engine projects use a mix of both. They both have their advantages and disadvantages.
One main advantage of blueprints is that they are very fast to compile, which makes it a lot more convenient to prototype and iterate with them. But C++ solutions are usually(!) much more performant at runtime. So when a feature that was initially prototyped with blueprints turns out to be a performance bottleneck, then redoing it as a C++ class can sometimes help.
And depending on what problem in particular you are trying to solve, either one might be easier to create, read and/or maintain. In general, blueprints excel at "simple" logic flows ("when B button is pressed, jump!"), while C++ is the better medium to convey logic that requires more complex algorithms and data structures ("when AI agent is idle, pick a job from the master job list using this rating function, break it down into steps using goal-oriented action planning and push them onto the task stack for the agent"). But there is a large grey area in between where either approach is reasonable.
And it's not uncommon either to use a mixed approach of creating a blueprint graph where some of the nodes are custom nodes implemented in C++ specifically for that one graph. This approach is particularly common in teams that contain both programmers and non-programmers who want to be able to tinker with the game mechanics without having to ask a programmer for every little change.
So the answer to the question "should I learn blueprints or should I learn c++?" is "Yes!"
Comment: ***"should I learn blueprints or should I learn c++?" is "Yes!"*** this should be in bold! xD
Answer: I like to think of games as "interactive art". (As once, EA used to mean.) A game developer is part programmer, part artist. We should explore a lot of different modes to reify the experience we wish upon the player. Let it come from hard code (like C++, Javascript) or assistance tools like Blueprints.
Professional game developers know many ways to manifest their ideation. Some even use pen and paper to prototype the game.
Comment: EA stands for [Electronic Arts](https://en.wikipedia.org/wiki/Electronic_Arts), not Interactive Art.
Comment: @Vaillancourt "used to mean". In the formative years of the company, special emphasis was placed on the "art" aspect of games. Also, a letter (which I fail to find) demonstrated similar sentiment of leveraging this "interactive media" (computers) for making "art". [Quoting](https://en.wikipedia.org/wiki/Electronic_Arts) - "When Gordon and others pushed for "Electronic Artists", in tribute to the film company United Artists, Steve Hayes opposed, saying, "We're not the artists, they [the developers] are..." This statement from Hayes immediately tilted sentiment towards Electronic Arts".
Answer: In Unreal Engine - supported by the approach of the Fortnite team - the intended design of Blueprints is that C++ usually exposes functions, logic, events etc, into a blueprint ready for the game designer to make use of in the intended way. In Unreal Fest, this has been a topic raised quite often, and answered in this way.
Regardless - as others have stated - who cares. When the game works, is fun, makes money and is more often than not superceded by the next game... choices like this become a question of maintenance burden rather than anything else.
To summarise: Expose parts from C++, use in Blueprint, but most importantly, get the game made.
Answer: This answer is applicable to any software development task. As a general principal you should use the highest level language/tool that gets the job done. This will result in the fastest and cheapest development and the easiest maintenance. You should use lower level tools as needed to improve the performance of bottlenecks or to do things that are not supported in the high level tool/language. Do not base your decisions on idiology but let the task dictate the tool.
In your specific case, use blueprints wherever possible and only use C++ to do something that cannot be done with blueprints (or is more difficult) or where the performance would be unacceptable. And, as always, don't prematurely optimize code - always profile it first.
C++ is one of my favorite languages, but it is usually not the fastest or cheapest (in terms of development time) way to solve a problem with the required performance. This is the metric that should drive any 'professional' developer.
Comment: Visual programming tools like Blueprints are inherently clumsier than textual languages, so this generalisation doesn't work. Blueprints are quicker and easier than C++ for simple tasks but actually become more difficult to understand quite quickly.
Comment: @JackAidley, you missed my point. Any task that is quicker and easier to do with C++ should be done with C++ - that is my point.
Comment: then I suggest you rephrase your answer to make that clear, because as it stands you appear to be recommending C++ be used only on the basis of performance.
Comment: @JackAidley, done - although I think I would already be clear that 'things that are not supported in the high level tool' and 'something that cannot be done with blueprints' does not mean that you should use blueprints if it is 'in any way possible no matter how tortuous'. Common sense obviously applies. To be absolutely clear my point is that you should use the tool that is easiest to achieve the task and not be influenced by idiology or premature performance considerations - if that is c++ then use c++.
Answer: Starting with Blueprints in Unreal Engine is awesome! They're a visual way to learn core concepts without code, making it easier to grasp than diving straight into C++. Think of them as training wheels - building your understanding before transitioning to C++ for more control and efficiency. Don't be afraid to mix and match! Use Blueprints for faster iteration and C++ for performance-critical sections. This flexibility is key in Unreal, so have fun creating and learning!
Comment: I would say they are not trainings wheels. Else you can argue as well any ide are training wheels and only real coders use only plain text editors or notepad.
Comment: Don't think of blueprints as "training wheels". Think of them as a tool that fits some problems while code fits others. They are not meant as a bridge for beginners to programming to be eventually get replaced. There are a lot of use-cases where blueprints are just the better solution, even if you are a master at C++ programming.
Comment: That's interesting


Campagnolo Cambio Corsa primitive derailleur -- can it be recreated?

Question: Does anyone make this sort of system and sell it today, or is my only option looking for someone selling theirs? I've googled whether similar systems are being made today but found nothing to my liking. Are there any new versions of this?
Comment: It's definitely easy enough to manufacture, with modern CNC machinery it'd just be a tricky small job so it'd cost more (likely $US1000+ for two dropouts and an axle), but from the photos online it would be straightforward to draw. It's not high precision or anything.
Comment: What advantages are you looking for? The ability to release the rear wheel while riding? The lack of derailleur pulleys? A four speed close ratio derailleur setup?
Comment: As far as I know, nobody's mad enough to do build this anymore. Note that the frame has to be specifically built for this, so its likely just the bikes that were built this way that use this back in the day.
Comment: You want something with more gears than a fixie/singlespeed but you also want the hipster cred of something really old style?     These gear systems are certainly of historical interest, but are also totally impractical.  Do you really want to loosen your back axle while rolling to change to the other gear?  That's what the top lever does, and the other lever pushes the chain over,  then you retighten your axle and hope its still in line with the brake.   Not really recommended for street usage!   Get an IGH or a deraileur bike if you want gears.
Comment: If it's not being made any more, you should ask yourself why.
Comment: Even if somebody could manufacture the device which might be the easiest bit, it would also require special drop-outs and a special rear axle as well.
Answer: This system, the Campagnolo Cambio Corsa, or race shifter was introduced in 1946 and superseded in 1949 by the Paris Roubaix which used only one lever, vs. two and again in 1951 by the Gran Sport parallelogram derailleur, which slightly modified is still state of the art. The Cambio Corsa was probably only made for three years.
It is still possible to buy these parts, complete systems or bikes with these parts on sites like eBay. Keep in mind that the Cambio Corsa and Paris Roubaix systems require special toothed rear dropouts and can't be used on just any bike.
Even at vintage events like the Eroica it's rare to see them as the gearing is not suited to the routes.


When a wand is broken, does the charge status affect its potency?

Question: I die a lot because I don't trust my wands to be more helpful in clearing multiple monsters that surround me (magic traps and Rodney/summon nasties), and the useful ones are all beams and rays.  I've recently learned that breaking a wand acts like a grenade instead of a gun.  Also, you need to be resistant to the wand's effect.  What I wonder is this, "If I break  wand,  does a +1 charge have the same effect as a +10 wand of the same type?"  Physics would suggest that the energy stored would make the higher charge more powerful, but gameplay suggests that breaking is breaking, nothing more...   Please clarify.  Also, I know that +0 charge usually does nothing.
Answer: It depends on both number of charges and type of wand. The 3.4.3 spoiler on breaking wands has details; the short form is, most wands do from 1 to (charges * 4) damage, with some wands doing nothing, wands of cold or fire doing twice that, and lightning or death doing four times that. Wands also have their normal effects (burning spellbooks, freezing water, teleporting items/enemies, etc).
If you want to really get into the details, it happens in do_break_wand() in apply.c.
Answer: According to the source code, wands do the following damage when broken:

Wishing, probing, nothing, locking, enlightenment, opening, secret door detection: no effect
Death and lightning: 16*number of charges
Fire and cold: 8*number of charges
Magic missile: 4*number of charges
Striking: 1 to ((1d6+1)*number of charges)
Everything else: 1 to 4*number of charges

Note that wands of death, lightning, fire, cold, and magic missile have fixed damage levels for a given number of charges, so if you want to maximize your effectiveness, use one of those.
The damage type depends on the wand type, so normal resistances and effects apply (eg. undead aren't affected by breaking a wand of death, flammable objects burn if you break a wand of fire, and breaking a wand of light lights up the room).


Powershell incrementing name and execute cmdline

Question: I'm trying to write a powershell script that will create outlook logs (using NETMON) from the local client to the exchange server.  The problem is the file name is not incrementing correctly.  I found this incrementing script online and i understand the logic (kinda).  Am i using the right way to initialize the counter?  It isn't renaming the file correctly.  It gives the 2nd file just a _ then the 3rd file gets a _2 then after that it stops renaming files.
ALSO is invoke-expression waiting for my cmd to exit or will it just go to the next step of $count-- ?
<code>#Directory to complete script in
$path = "c:\Outlook_Logs\"
cd $path
$cmdline = "Nmcap.exe /network * /captureipv4.address==X.X.X.X /file :\outlook_logs\client_$count.chn:100MB"

#Writes out number of files in directory to console
$count = (get-childitem $path -name).count
Write-Host "Number of Files: $count"

#Sorts items by decsending order
$items = Get-ChildItem | Sort Extension -desc

#Deletes oldest file by file extension number
del $items[0]

#Copy file from original directory to backup directory
Copy-Item c:\Outlook_Logs\* c:\Outlook_Logs_Temp\

#Sorts items by decsending order
$items = Get-ChildItem | Sort Extension -desc

#Renames files in quotes after NewName argument
$items | ForEach-Object  -begin { $count= (get-childitem $path -name).count }  -process { rename-    item $_ -NewName "client_$count.cap";Invoke-Expression "$cmdline"; $count-- }
</code>
Answer: There's no need to increment the names yourself. chn captures files are created and names incrementally automatically when they reach the size specified after the colon.
What happens when you lower the size to 1MB and execute the command?
Comment: when i run the cmd twice it just overwrites it the previous file.  It's not acting as as you stated...
Comment: Nmcap.exe /network * /capture ipv4.address==X.X.X.X /file c:\outlook_logs\client.chn:1MB
Comment: I don't think it remembers where it stopped. Once you rerun it will starts all over again. If you want to increment it yourself you need to use a .cap extension
Comment: i think you are right because i have to hit ctrl+c to exit.  I tried with a .cap and it's still not working.  I'll find another wat to count, possibly a do-while so we can take it from there.  I'll let you know if i have any luck thanks for your help


How do I connect an outlet to two black and three white wires?

Question: I am rewiring a 3 prong outlet.  I pulled out the old one and found 3 white and 2 black wires attached.  I did not see a ground wire.  How do I rewire these to the new outlet?
Comment: Pictures would help.
Comment: Where do the wires go when they leave the junction box? If they leave as 2 white/black pairs with one white all by itself then it **might** be that the lone white is actually the ground, though if that's the case it should be green instead of white.
Comment: Go get the old receptacle out of the trash. You're gonna need it.
Comment: I hope you tagged the wires before disconnecting them.  Is this outlet a switched outlet?
Comment: What do you mean "rewiring"? Are you adding wires or simply replacing the outlet?
Answer: See attached image.

Good Luck.


Local storage of NCBI database in MongoDB

Question: My short term goal in a project is to build a local database of the NCBI dbSNP database. The data and schema are available on the FTP site(). I was going to implement the database using MySQL, but I just learnt about MongoDB. Is it possible to somehow convert the sql schema code to mongoDB architecture? Also, are there any real advantages to implementing the dbSNP database as MongoDB?
Comment: This question appears to be off-topic because it is about pure bioinformatics implementation issues, not biology. Also: why would you want to use MongoDB, given you just heard about it and don't know the advantages?
Comment: Why bioinformatics is off topic in a biology website is beyond me.  Lots of biologists don't know how to do taxonomy or behavioral observation which was most common 40 years ago.  Many are molecular biologists, but its not required for all biologists.  Nobody can define what is in biology these days, why in such a hurry to declare what is out?  This is a highly subjective judgement.
Comment: @shigeta I usually put the line pretty far on the informatics side when deciding whether a question is off-topic, but this question is a bit far on the informatics side for me. The main question, how to convert an SQL database to MongoDB is better asked on a specialized site. But there is a question below that that might require some biology knowledge, and that is whether a NoSQL approach is useful for an SNP database.
Comment: @Venkat if you edit your question with indications of biological relevance, then it will assist its reopening!
Answer: I've played with mongoDb.  It is a nearly schemaless data store - each record (analogous to a row) can have nearly any entry name set except for a unique ID that mongoDb uses.  In practice most of your records will have the same labels and names
Leaving SQL for noSQL is turning out not to be a great win.  MongoDB will excel in retrieving records quickly and processing records by their content.  It has some constraints too compared to SQL.  It requires that the main index be stored in RAM, which might or not be an issue.   For very large datasets mongoDB can be configured to shard the data automatically - splitting it up over a cluster of machines for high throughput fast processing applications.
If you need flexibility in your data record and you have a good machine (or a good cluster) to put it up on it could offer some advantages. We have a reasonable store of dbSNP on a recent MySQL machine and it performs okay.  Not thousands of transactions a second, but we can do reasonable throughput of record processing.


Storing 3rd party OAuth2 tokens in Salesforce

Question: I am developing an app and this app is authenticated using OAuth2. Where do you I store the OAuth access and refresh tokens in Salesforce? Is Custom Setting the best approach ? Also, how do i store tokens of multiple users.
Answer: Yes custom setting will be best option here.
<code>Hierarchy__c CS = Hierarchy__c.getInstance(userinfo.getuserId());
System.Assert(CS.Accesstoken__c== '******');
</code>
You can create a Hierarchical type custom setting and based on user can create data there. Because query on custom setting does not count against SOQL governor limit so it will help you in limits as well.
Comment: What about using a list custom setting? Are there disadvantages to that?
Comment: @akcorp2003 there is no disadvantage but normally in this scenario we use Hierarchical CS because here you can create record for user basis and easily get them using the code I have posted.
Comment: So is this the only way or are there better ways ?
Comment: @Ranga I think in your use case its best way but not the only way. You can still use list CS or Object.


Windows DNS server resolving specific outside domain to 127.0.0.1

Question: I'm completely at a loss on this one.
I have a windows domain environment with 2 DNS servers, one on Windows Server 2008 R2 and one on Windows Server 2012.
Internal DNS resolution is fine. External resolution is fine as well, with one exception.

Any time I try to resolve Facebook.com in a browser, it fails.
This is domain wide, not restricted to my local machine.
NSLOOKUP returns Name: Facebook.com and no ip address on my local machine and the servers
I've checked the host files on my machine and both DNS servers.
I've ran /flushdns.
I went to both DNS servers and looked in the "Cached Lookups" section, and Facebook's A record is set to 127.0.0.1
After deleting the cached lookup and trying again I got the same result.
SSH'ing to the firewall and running DIG on the domain returns the following output:
<code>[HOSTNAME]:/# dig facebook.com

; <<>> DiG 9.9.6-P1 <<>> facebook.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29742
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;facebook.com.                  IN      A

;; AUTHORITY SECTION:
facebook.com.           890     IN      SOA     [OFFSITE LOCATION].com.
hostmaster.[OFFSITE LOCATION].com. 14 900 600 86400 3600

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Jun 18 15:55:31 CDT 2018
;; MSG SIZE  rcvd: 121
</code>

The "Offsite Location" in the AUTHORITY section is a company that my company just acquired. It seems like their DNS server is responding as the authoritative server for Facebook, but I don't know enough about DNS to say for sure.
Aside from contacting them, where do I go from here?
Comment: Presumably the forwarders in your DNS server are set to the other company's DNS server. Change them to 184.108.40.206?
Answer: Resolution was found literally minutes after posting:
I got in contact with the offsite location. Apparently, they do in fact black hole Facebook, and my DNS server had a forwarder setup to forward to them.
So they removed the entry and everything is fine.


Connecting to Bluetooth Thermal Printer using iPhone

Question: Is there or is there not a way to connect my iPhone (sdk 4.0 and above) to a bluetooth printer (Looking for connecting a Thermal Printer for printing a receipt) to execute some printing tasks? I'm developing the app, so what framework could possibly do this? I see that Apple's External Accessory Framework handles bluetooth communication, but is it possible to print using that framework? Is there any Thermal Printer supported with AirPrint. I did not find any.  Thanks in advance.
Answer: there are Wifi printers available. We can use one of them. Please see this link.
Comment: did you manage to find a way to print to receipt printers by Wifi or bluetooth?
Comment: Do you know something more about that please?


Different light fixture in basement on pull switch

Question: I have more than six light fixtures in the basement each has its own pull switch each fixture is getting it's power from some where from each room upstairs and I like to know how can I add a switch so I can turn all lights at once.
Comment: Can you figure out which circuit each fixture is on?
Comment: I am sure I can trace it from the panel.
Answer: The short answer is yes you can, the easiest way is first to see if all the lights are on 1 breaker (normal wiring) It is possible they could be on 2 or 3 different circuits but again you could still do it with 1 switch (3 phase and some wires).
Most basements or all I have worked on are fed from 1 or 2 circuits. Identifying the circuits is the first step. After that it can be as simple as turning all the pull chain fixtures on and interrupting the feed with a simple switch a box on the feed or even at  the panel , 2 wires (Romex to a new box) where you install a simple switch). This may be quite easy but we need to know if it is a single circuit and if it is for lighting only.
Comment: Checked the electrical panel and found 3 breakers connected to 2 light fixtures so a total of 6 lights.
Comment: Having 3 different circuits there is going to be a fair amount of work depending on how it's wired. Normally we would not want to switch all the outlets. You would need to make a map of how the wiring is routed. If the 2 lights are fed after an outlet then you could interrupt the light circuit and take each cable back to a common box and use a 3 phase light switch. I might consider some home automation here and install smart lamps. That can be controlled from 1 point or even your phone. Or just wiring all 6 lights to 1 circuit with a single switch this may be more cost effective.


Can I have a transaction where the source and destination are the same?

Question: If challenged, I could do this on demand with an amount of the challenger's choosing, to 'prove' I have control of the funds.
Comment: You do not need to make a transfer to prove that you have control of the funds. All you need to do is sign a message with the key that controls the funds in the address.
Answer: Yes, it is possible to send to the same address. However, to prove control of an address, you could instead sign a message.
Answer: Transactions come from an account (wallet) to an address contained in another account. If you have 2 btc in your wallet, they will actually be made up of a history attached to each fraction of those coins ever spent in a previous transactions. In other words you have fractions of coins that add up to 2 btc.
When you spend/send btc in a transaction your account bundles the fractions to equal the new sum. If the fractions don't add up equally to the new transaction total, you will receive change back to your account, most likely in a new address created during the transaction.
If the goal is to consolidate multiple addresses in your wallet to one, it would be prohibitively difficult due to the these fractions of btc. I would create a new account with one address then send your entire balance there.
This is not needed to prove ownership.
Please correct me if I'm wrong.


Can a tree "uneasily frowning" be synonymous to a tree "hauntingly frowning"?

Question: In the sentence "the trees uneasily frowned on....", I was wondering if saying "the trees hauntingly frowned on....." is synonymous. From the look of the definitions of the words "uneasily" and "hauntingly" they seem to be synonymous in this context, however I'm notentirely sure whether that is true.
Comment: Please quote the definitions as given in the dictionary and provide a link. Unless you show us the definitions you are using we can't comment on them.
Answer: These two constructions do not communicate the same thing to me, although it is hard to pinpoint why. Here is why they seem different:
In "the trees uneasily frowned on...", you seem to be characterizing the trees' frowning as inducing anxiety in them (the trees).
In "the trees hauntingly frowned on...," you seem to characterizing the trees' frowning as inducing anxiety in some other party (e.g. the narrator or protagonist).
This is probably because of the difference between uneasy (an adjective, not derived from a verb and thus never associated with a direct object) and haunting (which derives from the verb to haunt which does take a direct object).
Answer: I agree, uneasily is the way the trees frown and hauntingly is how another party would perceive their frowning.
"the trees nervously frowned" would be more like "uneasily" and "the trees frighteningly frowned" would be more like "hauntingly".
Answer: No, they are not synonymous. "Uneasy" is a quality of comfort (lack of). "Haughty" is a quality of attitude, a kind of unfriendliness, a purposeful way of projecting disapproval (believed superiority).
But besides that, the quote is very difficult to decipher (or paraphrase) because it's a strange anthropomorphizing of trees.


If I want to deodorize my carpet with baking soda, should I spray water on the baking soda?

Question: https://web.archive.org/web/20160715111807/http://www.housekeepinghere.com/weekly/baking-soda-carpets/ says that I should keep the carpet dry, while http://www.repair-home.com/flooring/carpet/carpet-cleaning-solutions.html says that I should spray the area with water.
Answer: Baking soda needs to be in contact with the odors to work.  If the baking soda is wet, it will not really work at all because the water will be blocking the odors from getting near the surface of the baking soda.  I also suspect it would be a real mess to clean up.
In the past I've tried baking soda on carpets (dry!) and found it to be a waste of time.  A professional steam cleaning is probably the most effective solution.
Comment: Instead of a fine powder which is easy to vacuum you'll end up with clumpy baking soda that might even be stuck to the surface you sprayed it on.  Keep it dry.
Comment: Oh wow, I see. =/ Well, could I wait for the water to evaporate then?
Answer: I use baking soda all over my rugs, carpets, and the dog's bed a couple times a year. I think it works great. This is just normal house/dog smell I'm trying to get rid of, not smoke or animal excrement thankfully. I wouldn't wet it bc like a previous commenter mentioned it would become clumpy and not as easy to vacuum up.
Comment: Hello, and welcome to Home Improvement. Thanks for the answer; keep 'em coming. And, you should probably [take our tour](//diy.stackexchange.com/tour) so you'll know the details of contributing here.


Magento Sage 50 Integration

Question: I'm looking for an integration solution between Magento CE and Sage 50 Quantum Canadian Edition. I see there are solutions for the US version of Sage but cannot seem to find any affordable solutions for the Canadian edition. Has anyone worked with integrating Magento with Sage 50 Canadian Edition before and have any suggestions?
Answer: I am not sure why you want for solution only for Canadian version? Maybe you can check Sage 100 standard from USA? We have used that few months ago and connected that with our Magento CE with their extension without any problem. I can share my experience in PM with you if you want.

Magento Sage 50 Integration


Raising, lowering and number operators for Dirac notation

Question: Starting from this very interesting post Defining quantum-mechanical Bra and Ket operations, i would like to implement raising, lowering and number operators, taking into account that they might be non-commutative, i.e.
$$
  a_i^\dagger a_i |n_1,\dots ,n_i, \dots \rangle \neq a_i a_i^\dagger |n_1,\dots ,n_i, \dots \rangle
$$
I know that there is a package for Quantum Mechanics but I would prefer a stand-alone script.
Answer: The SNEG library is a (now fairly old) package for second-quantised operators, especially in the context of condensed matter physics.  It's sometimes a bit clunky, but I still occasionally find it useful.
Comment: Can you maybe give a short example on how to use the package?


How to use generic level editors with my arbitary code?

Question: I have a game, breakout clone. It has a Block class that contains CCSprite as a property.
Usually I made levels by manually setting those blocks to positions.
Here comes the question, how do I use generic level editors with my custom code? All editors work with CCSprites and not my class. How can I overcome that?
Comment: Either, you write a cutom exporter for the level editor of your choice, or you write an importer for your program which reads the level generated with the level editor and parses it into the format you need.
Comment: ^ Importer is far easier.
Answer: As sarahm said in a comment, you need to either import the maps from files saved by the level editor or write an exporter for it(if it supports plugins/extensions like this).
Since they're generic and as such meant to be used by more than just one game, the format is probably quite simple(and almost certainly documented somewhere, just search a bit) so writing an importer is most likely the better choice.
You will probably need to read type/position/any other properties you're interested in and use them to build your map(place objects, set tile types, etc.). You could always also convert said level files to your own format, but I doubt there is much reason to do this.


Polyatomic molecule vibrational spectra - Molecular dipole expansion in Taylor series

Question: To give some context: I am studying the molecular spectra in the context of an introductory course to atomic and molecular physics. My professor is using the transition rate expression from an initial state $|a\rangle$ to a final state $|b\rangle$ in the dipole approximation:
\begin{equation}
W_{a\rightarrow b} = \frac{4\pi^{2}}{e\hbar} \, \alpha \, I(\omega_{ba}) \, |\vec{\varepsilon}\cdot\vec{D}_{ba}|^{2}
\end{equation}
to derive the selection rules for the vibrational (and rotational) spectra. $\vec{D}_{ba}=\langle b|\vec{D}|a\rangle$ is the matrix element of the molecular dipole between the two states, and for a generic molecule composed of $N$ nuclei of positions and atomic numbers $\vec{R}_{I}$, $Z_{I}$ and $n$ electrons of positions $\vec{r}_{i}$ the dipole is given by:
\begin{equation}
\vec{D} = e \left( \sum_{I=1}^{N} Z_{I} \vec{R}_{I} - \sum_{i=1}^{n} \vec{r}_{i} \right)
\end{equation}
For a diatomic molecule with relative distance between the nuclei 1 and 2 given by $R=|\vec{R}_{1}-\vec{R}_{2}|\,$, if $\vec{D}$ depends on $R$ one can expand it in series around the distance of equilibrium between the two nuclei $R_{\mathrm{eq}}$ ["physics of Atoms and Molecules", B.H. Bransden & C.J. Joachain]:
\begin{equation}
\vec{D}(R) = \vec{D}(R_{\mathrm{eq}}) + (R-R_{\mathrm{eq}}) \, \frac{\mathrm{d}\vec{D}(R)}{\mathrm{d}R} \, \bigg|_{R=R_{\mathrm{eq}}} + \cdots
\end{equation}
Which is logic enough, since the derivation of the vibrational and rotational eigenvalues has been made only for a diatomic molecule on the assumption that the nuclear motion is centred around $R_{\mathrm{eq}}\,$.
The problem arises when my professor wrote that expansion for a polyatomic molecule like this:
\begin{equation}
D_{\beta}(\vec{R}) \simeq D_{\beta}(\vec{R}_{\mathrm{eq}}) + \sum_{I=1}^{N} \ \sum_{\alpha=x,y,z} (R_{I,\alpha}-R_{I,\alpha}^{\mathrm{eq}}) \, \frac{\partial D_{\beta}(\vec{R})}{\partial R_{I,\alpha}} \bigg|_{\vec{R}=\vec{R}_{\mathrm{eq}}}
\end{equation}
What does it mean? Has anyone ever seen this expression? And if so, could you suggest me where to search?
It seems like he is expanding every coordinate of the dipole $\vec{D}$ around an equilibrium point $\vec{R}_{\mathrm{eq}}$ , but then there are the terms $R_{I,\alpha}^{\mathrm{eq}}$ which suggests that every nucleus $I$ has its own equilibrium position. So the vectors $\vec{R}$ and $\vec{R}_{\mathrm{eq}}$ are vectors of vectors, with every component corresponding respectively to a position and an equilibrium point of one of the nuclei...right? But does this make sense?
Has anyone ever seen this method to deal with the spectra of polyatomic molecules, and if so, could you suggest me where to search?
Every previous calculation has been made with diatomic molecules, so this jump to the polyatomic case it's very confusing.
Answer: The expression is perfectly reasonable and your interpretation is correct.
Its essentially just a convention for summing over indices of all relevant quantities. The Dipole vector has three dimensions and in a Cartesian coordinate system it is conventional to call these $x,y,z$, and the index $\beta$ is a place holder for them, $\beta \in {x,y,z}$.
Each nucleus also "lives" in a three dimensional Cartesian space, and in the mathematical treatment we use the direct sum of these spaces, i.e. for each nucleus we have a set of $[x,y,z]$ coordinates, which we label additionally with an index for the corresponding nucleus, for example $\vec R_1 = (R_{1x},R_{1y},R_{1z})$ for the first nucleus. The complete vector that describes the structure of the molecule is then
$$
\vec R_1\oplus \vec R_2 \oplus \dots \vec R_N :=\left ( \begin{matrix}R_{1x}\\
R_{1y}\\
R_{1z}\\
\vdots \\
R_{Iz} \end{matrix}\right )=\vec R
$$
In your example that index is $I\in {[1\dots N]}$. So summing over all nuclei coordinates requires summation over a combination of $[x,y,z]$ and $[1\dots N]$, which is done in your example using $\alpha $ and $I$.
Its also important to understand that each component of the dipole moment is a function of all these coordinates, i.e.
$$
\vec D = \left(\begin{matrix}D_x \\ D_y \\ D_z \end{matrix}\right)
$$
where $D_x=D_x(\vec R) =D_x(R_{1x},R_{1y}, R_{1z}, \dots R_{Iz} )$, likewise $D_y =D_y(R_{1x},R_{1y}, R_{1z}, \dots R_{Iz} )$, and $D_z =D_z(R_{1x},R_{1y}, R_{1z}, \dots R_{Iz} )$. Each component is function of all nuclei coordinates and each function is expanded around the equilibrium coordinates,
$$
\vec D^{Taylor} \approx \left(\begin{matrix}D_x(\vec R_{eq}) + \vec \nabla_RD_x|_{R_{eq} }\cdot (R-R_{eq})  \\D_y(\vec R_{eq}) + \vec \nabla_RD_y|_{R_{eq} }\cdot (R-R_{eq})  \\ D_z(\vec R_{eq}) + \vec \nabla_RD_z|_{R_{eq} }\cdot (R-R_{eq})  \end{matrix}\right)\\
$$
The last equation of yours is index notation for this expression.


Flying with the help of Coriolis force

Question: I had just started to learn about Coriolis force and an interesting thought occurred to me. Can you fly with the help of Coriolis force because when you run Coriolis force acts upward and the angular velocity vector is perpendicular to the relative velocity vector?
Answer: The quick answer here is no. At least not more that you can fly with the help of the centrifugal force.
Remember that both of these forces are fictitious forces, so there exists a coordinate system where the forces are zero.
Do not get me wrong, i like the way you are thinking. Unfortunately the scenario you are describing is essentially a situation where you are orbiting the earth in free-fall.

Flying with the help of Coriolis force


Mac OS battery cycle count

Question: Im under Yosemite OS X I got a new battery for my mac model a1398 mid 2012 retina, I charged the battery first time to 100% and drained it till it went to sleep mode to calibrate the battery, now I never let it go under 80% and plug the charger, most of time I use the charger but the thing is, I saw that my cycle count is 3 and it was 1 before, I don't understand how this happened? any idea?
Comment: Well if you let it go for example from 100% to 80% 10 times, that's two cycles. Plus when you drained it completely = 3 cycles.
Answer: From Apple's support note on battery cycles:

A charge cycle means using all of the battery's power, but that doesn't necessarily mean a single charge. For instance, you could use your notebook for an hour or more one day, using half its charge, and then recharge it fully. If you did the same thing the next day, it would count as one charge cycle, not two, so it may take several days to complete a cycle.

So essentially, as long as you ever run the laptop unplugged at all, your cycle count will slowly increase.
Answer: For example, if you discharge your battery halfway one day, then halfway again the next day, this counts as one cycle, not two.
In your case discharging to 80% it will take 5 times before a cycle is counted. (5x20% =100%) = 1 cycle.
Fully drained = 1 cycle.
Draining is not recommended.

Mac OS battery cycle count


Ableton Live 9 (or 10) Lite Vocoder

Question: I've been using Ableton Live 9 Lite a little for several months, and recently updated to Ableton Live 10 Lite.  I can't find the built-in Ableton vocoder shown in video tutorials in either of these versions.  Does anyone know whether the Ableton Live Lite software has the built-in vocoder?  Thank you very much! ::)
Answer:
Ableton Live 10 Vocoder is not available in Lite Edition and Intro
Edition.
Ableton Live 10 Vocoder is available in Standard Edition and Suite
Edition.
Ableton Lite is slightly more restricted than the Intro version.
For detailed comparisons between Intro, Standard and Suite Editions
see the corresponding official page.
https://www.ableton.com/en/live/compare-editions/
For detailed list of features included in Live 10 Lite visit
https://www.ableton.com/en/products/live-lite/features/ (As you can see Vocoder is not listed there, thus it is not available in Lite Edition of Live)

Ableton Live 9 (or 10) Lite Vocoder


Is the neck's volume largely genetic just like the calf?

Question: Calfs are notoriously difficult to develop in terms of volume because their shape and volume are mostly genetically determined. I'd like to know if this is also the case for the neck: is a powerful neck largely genetic or can a man with an average neck actually develop a thick neck? I can't find any before/after photos for the neck anywhere online which makes me ask that question.
Answer: Genetics plays a part, sure, but a man with an average neck can surely develop a thick muscular neck.
I saw this first hand during the time I played rugby. My fellow team mates used to do 3 sets of 3 different exercises specifically aimed for the trapezius and neck muscles every two days! I assure you that you will gain a significant amount of neck thickness withing a few months.
Another example is seen in the sport of boxing where neck muscles are of utmost importance. In the lower divisions, some boxers have a very thick neck compared to other muscles.
Answer: There's some truth to the "calves are genetic" argument, but your genetics impact muscle development across your body so it's not specific to your calves. Your biceps could be loaded with slow twitch fibers as well, as an example. Further, there's a surprising correlation to people making excuses about their calves and people who don't do cleans.
Anecdotally I've found that necks tend to look and get bigger with three exercises:

A properly performed powerlifter-esque bench press, with your head actively-barely-touching the mat, which requires your neck to be very engaged.
The deadlift.
The clean.

The largest "neck muscle" to grow is the distal levator scapulae, followed by the trapezius, shown below.

All three of those exercises above directly involve the largest muscles in your neck in a safe way. Plus, they're great for a bunch of other things as well. Simply put, you're not going to be deadlifting 500 pounds, benching 315, or cleaning 225 and have a skinny neck.
Answer: Genetics definitely play a huge role - you seldom see someone who does not train with ripped 18" arms. However, you do often see people who look untrained or very lightly train with absolutely huge, ripped necks (e.g., Henry Rollins).
FWIW, in going from untrained to benching 365 and deadlifting 515 over the course of about 20 years, I put about an inch on my previously 16" neck. Good luck.


location mirroring is not working when used with nginx redirect

Question: I'm trying to redirect a URL with nginx and at the same time, mirror the request to another location block. the mirror works fine when I use it with proxy_pass, but it doesn't work when used with nginx redirect
<code>location / {
    mirror /test
    access by lua '
    ngx.redirect("some url received from redis using lua scripts")
    '
}
location /test {
    proxy_pass <backend-service>
}
</code>
Answer: It looks like we can't use the mirror with the nginx redirect because the mirror gets triggered in phase PRECONNECT which occurs later than phase REWRITE where rewrite/return end request processing. So, the mirror does not even get triggered because its processing would happen later. Thanks to Alexander Azarov for explaining it in this question


How do I render and save as MP4?

Question: I am using the latest version of 2.78a and I can't figure out how to save it as an MP4 file. I have downloaded an intro template (for youtube) and changed the text to what I want, but I don't know how to save it as an MP4 file. I have rendered the animation on default settings and it keeps rendering the animation over and over again. What do I do?
Comment: Related; https://blender.stackexchange.com/questions/15142/how-to-render-an-animation-as-video-in-blender
Comment: It many cases it is better to render to PNGs and then use a separate tool to encode it to mp4 : http://web.purplefrog.com/~thoth/blender/python-cookbook/render-to-pngs.html
Answer: Blender will render the frames that are between the start frame and end frame if you press Animation.
The outputfile is located in the path that is shown in the text-box. You can change it pressing the button with the folder icon
You can either the animation as an image-file sequence or as a video file. MPEG will output .dvd format, but you can change the extension to .mp4 in the windows explorer (you must check the option to view the file extension in folder options from windows
Comment: Ok, ive pressed the text button box at the top of the screen and the only other option is trapcode. Also, why does the nimation keep rendering over and over again? And i can't locate the folder icon. I want to have the animation as an intro for a youtube video in MP4       *EDIT* i now understand why it renders over and over again - it has to render every frame of the animation, like you said, i apologise. but i still don't know what to do when it is is finished rendering. do i have to wait for the rendering to finish before the mp4 option becomes availible?

How do I render and save as MP4?


How the various quantum gates are implemented physically in quantum computer?

Question: I'm not able to find any sources. Can you point me to some?
Comment: *Quantum computation and quantum information* from Nielsen and Chuang + *Quantum computing for computer scientist* from Yanofsky and Noson
Comment: Does this answer your question? [What is the physical representation of a qubit?](https://quantumcomputing.stackexchange.com/questions/1390/what-is-the-physical-representation-of-a-qubit)
Comment: Welcome on the QC SE! I think yes, there are a lot of sources, although most of them is hard. If the community finds your question too broad ("needs more focus"), I suggest to read some of them, and then ask the details of a specific implementation (like by photon spins or so). What you learn in this process, will help you to ask this time much more liked (=upvoted) questions.
Answer: I found this interesting article that talks about creating a Fredkin quantum gate (controlled SWAP) : https://advances.sciencemag.org/content/2/3/e1501531
I hope this can help you in your search.
Answer: This playlist by QuTech Academy on the 'building blocks' of a quantum computer might offer some nice insights.

Video $10$ & $11$ introduce spin qubits, with the second video specifically on the operations on spin qubits.

Video $12$ & $13$ introduce NV centre qubits, with again the second video specifically on the operations on spin qubits.

Video $14$ through $19$ introduce the widely used transmon qubits, with measurements, single-qubit operations and the two-qubit operation in separate videos.

Video $20$ through $25$ introduce the concepts behind a majorana-based topological quantum computer, but so far there's little 'physical' about that (unfortunately)

Notable omissions include (as QuTech doesn't work on these technologies):

Trapped ion systems. Check for instance this video by MIT Opencourseware for the basics.
Photon-based systems, most notably the linear KLM model. Check the (wiki)link for the introduction on how the gates are implemented (hint: beam splitters and mirrors).

Of course there's also adiabatic-style quantum computers, but there you don't perform 'gates', you just tune the coupling between qubit neighbour pairs.
Answer: You can find some information about gates implementation here in this article:
Realization of efficient quantum gates with a superconducting qubit-qutrit circuit
Although the proposed setup is rather experimental, it may give you some ideas how to implement gates on computers with superconducting qubits.


Mobile Form + Master/Detail list

Question: I'm currently working on an automotive review app which I have to display all the information related to the review in only one context. The review structure is based on a form of 4 fields and a list of sections in which each section item can be detailed (please see the image below). In terms of a mobile app, what is the recommended structure? I've been thinking on split up the automotive review into 3 tabs, but since the 2 lists are not in the same "information level", this does not sound the best approach for me.
Answer: For a very small amount of detail information, the standard way to display details would be to have a + beside "Interior", which when clicked slides down to display the extra details.
For larger amounts of information you will probably want to have an arrow (pointing off screen to indicate another screen is available) beside "interior", which takes you to a seperate details screen when clicked.
EDIT:
For linking "General" to "Categories", you need some kind of affordance indicating that the user is leaving the overview and looking at more advanced / detailed options. A common way to represent this is with ellipsis.

An ellipsis works well because it's a common mark used in the english
  language for omissions and unfinished thoughts. At a cognitive level,
  users will understand an ellipsis affordance to mean that there are
  more options available to complete the task that aren't yet displayed.
  The ellipsis tells users that the action is not immediate. This allows
  users to click a button or menu selection to explore the different
  options behind it. Without ellipsis affordances, users will assume
  that every action and selection is immediate when every one is not.

Full article here.
You could have a button at the bottom of the general screen that says "Advanced...", or "Details...", or "Categories..."
Comment: Franchesca, that works really well between 'Categories' and 'Parts', but how about between 'General' and 'Categories'?
Comment: @SamuelWaskow I will update my answer to include this.
Answer: Wheat ever you are doing is a right approach.  This will be a guided approach.  With some small improvements you can enhance the user interaction.

A back button with previous page label
I see a save button on every page and in the header, doesn't your use case require a save button?   if required it should be placed in the page where user has taken a decision and changed the properties.  Look at the my proposal in the attached image.

Mobile Form + Master/Detail list


How does AC scale with character level?

Question: In D&D 3.5, I know that base attack bonus scales with level. How does AC increase over levels to meet it? I know saves do, so there should be some kind of AC thing? Is it done more with HP, or is there something I'm missing?
Comment: Mandatory pun: "Poorly."
Comment: @Zachiel I thought we weren't supposed to post answers in the comments!
Answer: Other answers have explained that AC doesn't automatically scale, which is true. There is no level component to determining AC.
Instead, AC is a function primarily of five factors:

Dexterity
Armor, including magic enhancement bonuses
Shields, including magic enhancement bonuses
Rings of protection
Amulets of natural armor

There are certainly other sources of AC—size bonuses, natural armor bonuses, and so on—but these are the common factors available to most characters.
So, what are we talking about with each of these?

Dexterity is obvious; everyone has a Dexterity score. Due to armor's maximum Dexterity, however, the amount that Dexterity's bonus to AC can actually scale is limited, and many characters will never improve upon whatever Dexterity they start with. It is certainly possible to attain extremely high Dexterity, and there are armors with very-high maximum Dexterity ratings (and at the extreme, gnomish twist cloth has no limit at all), but that isn't most characters. So for most characters, Dexterity is not a factor in the scaling of AC.

Armor basically means a chain shirt or full-plate, the best light and heavy armors, respectively. The medium armors are poor; if you have medium armor proficiency and want better armor than a chain shirt, you should get mithral full-plate (wear a chain shirt until you can manage that). So your mundane armor, in most cases, offers either +4 or +8. The only real exceptions here would be those high-Dexterity characters, who have too much Dexterity to wear even a mithral chain shirt.
On top of the mundane +4 or +8, magic armor gains enhancement bonuses; all magic armors are required to start with a +1 enhancement, so really we are discussing +5 or +9. The enhancement bonus can scale up to +5, but gets very expensive.

There are roughly two varieties of shield worthy of consideration—buckler or and the hide shield from Sandstorm. Everything a light or heavy shield can do, a hide shield can do better, unless you actually wish to perform shield bashes. Tower shields are always a poor choice for literally every character, and in any event the best thing about them, the total cover trick, is something the hide shield can also do and without a special feat. The other "exotic" shields found in Races of Stone are really only considerations for a handful of classes who get free proficiency with them—none of them are worth a feat—so I won't be considering those. Anyway, like armor, shields can gain enhancement bonuses, +1 to +5, and +1 is compulsory before any other magic can be added to the shield. Thus we are talking about +2 for a +1 buckler or +4 for a +1 hide shield as the "starting point" for shield usage.
Note that many melee characters should not use a shield at all at first—two-handed weapons have far too many advantages to use a shield. However, the animated property is not too terribly expensive, can allow such characters to have their cake and eat it too—but the cost definitely is there.

Also expensive are rings of protection and amulets of natural armor, both of which also scale from +1 to +5. Notably, a ring of protection provides a deflection bonus to AC—that is, it counts against touch attacks, which armor, shields, and natural armor do not.

For most characters, then, their starting Dexterity and their initial +1 armor and +1 shield (or +1 animated shield) provide a big chunk of AC early on. If we're talking full-plate and hide shield, it's an easy 25 (assuming at least 14 Dex) even at fairly low levels. After one has acquired those items, though, improving AC more quickly becomes very expensive, even compared to, say, mithral full-plate.
The only real options for further AC improvements are improving the enhancement bonuses on armor and shield, and purchasing a ring of protection and/or amulet of natural armor. Each of these four options vary from +1 to +5, and their costs each scale quadratically with that number. Due to the quadratic growth, it is best to spread the bonuses around—have a +1 armor, +1 shield, ring of protection +1, and amulet of natural armor +1 before you get +2 on anything, and then again +2 on everything before getting +3 on anything, and so on.
We could therefore work out some kind of progression, improving each of these items in a cycle as we get towards maxing out all four for +20 AC. It would have to be a bit fudged, since we would have to guess about other things a character invests their wealth in, but we could come up with something. However, I'm not going to do that. It would be a waste of time for one simple reason: you shouldn't do that.
That is, buying a ring of protection, buying an amulet of natural armor, upgrading your armor and/or shield's enhancement bonus, those are all very poor choices, because they simply cost far, far too much. There are vastly more important things to spend gold on, that provide far greater protection and cost much less.
In conclusion,

How does AC scale in D&D 3.5?

After the earliest levels, it doesn't
Comment: @J.Mini Unless you have a specific desire to be unarmored, gnomish twist cloth is better than armor—you can magically enhance it as armor, and it has no maximum Dexterity bonus. This can happen long before epic levels. At epic levels, it all ceases to matter because the epic levels are broken and shouldn't be used.
Comment: If intending to use that last line as a header, you should put it at the start of your answer. Otherwise, [if not meant as a header, you should avoid using header formatting - use bold or other regular formatting instead](https://rpg.meta.stackexchange.com/questions/6498/use-real-headers-instead-of-fake-headers).
Comment: @MaximeCuillerier It's _Sandstorm_; I did say that... Anyway, it's +3, but I'm not sure about ASF or ACP—if you are worried about those, use a buckler. A heavy shield is only +1 more than a buckler, and _twilight_ is a +1 property, so you could just get a _+2 buckler_ instead of a _+1 twilight heavy shield_ for the same AC while keeping your hand semi-usable. But of course you shouldn't do that because the AC isn't worth it, and the _+1 something-else buckler_ would be far better than either.
Comment: "The only real exceptions here would be those high-Dexterity characters, who have too much Dexterity to wear even a mithral chain shirt". This has put a very strange idea in my mind - what the heck happens at Epic levels? Does dex eventually get so high that you stop wearing armour?
Comment: How about a mention for the monk, which has a class feature AC that slightly scales?
Comment: @KRyan I looked on the net and I couldn't find the ''Hide'' shield except with the material ''Dragonhide''  in what book is it?  And I believe a heavy shield (githcraft or with the Twilight enchantment) (as you demonstrated in another answer about ACF) is very good, what is the AC bonus and the ACF for a hide shield?
Comment: @KRyan In conclusion the heavy shield if mithral and githcraft (assuming you got the strenght and have access to githcraft/mithral) is better  (for a mailman sorcerer for example since 0ACP and 0ACF) than a Hide shield. I pretty much always take your word for granted, and I know a buckler can indeed be useful and now I see why, I guess I never have to worry about wearing my shield while being caught by surprise if I use a buckler instead, so you are indeed right once again.
Answer: By default, AC does not automatically scale with level at all. The only way to increase it is by improving your Dexterity, upgrading your equipment, or using AC-boosting spells, class features, or other such effects.
Some of those effects may themselves scale (for instance, barkskin's AC bonus increases based on its caster level, and a monk's AC bonus increases based on their class level), but they will explicitly state if and how they do.
Answer: In standard D&D edition 3.5 or 3 it does not unless the character in question is a Monk that is unencumbered and unarmored. However there are examples presented in both the D20 Modern books and the D20 Star Wars books that you could efficiently adapt for a campaign setting that you want to have this effect.
A setting like a stone age world where crafting armor is not a common skill could use this kind of system. However be careful with game balance. Some one with training in not getting hit is still at a disadvantage to someone who is prepared to be hit and is mitigating the damage of that hit with some type of armor. Remember AC isn't a calculation of the defenders ability to dodge its a calculation of their ability to not take damage while being attacked.
To that end if you are going to have a level bonus to defense and armor, have armor do more than just deflect attacks; have it mitigate damage and deflect attacks. To do so divide the armor's AC by 2 make the higher resulting number the armor's AC and the lower number a mundane damage reduction (i.e.: Studded leather has an AC bonus of 3 as standard, with this variant it would have an AC bonus of 2 [which you then add the character's level defense bonus to] and a damage reduction of 1 that is by passed by anything but mundane attacks). You can find more detailed information for this variant rule set in the Unearthed Arcana book for 3.5 edition under the Variant Rules section.

How does AC scale with character level?


What could cause human females to have an yearly menstrual cycle in the future?

Question: I'm working on a story that is set in the future where human females have evolved to have a fertile period once a year for two months. Is such an evolution scientifically feasible?
Comment: Have you done any basic research (eg: Googling) yet?
Comment: If "anything would help" then this question is too broad.
Comment: @Aify It is a very specific scenario to be googled. No luck there. I want a pointer as to which book/site/research paper I can start off with. Or is this too broad a question?
Comment: I'm rewording the question to be more specific.
Answer: We have already evolved to this point, because we have evolved to be able to control our own hormones pharmacologically.  There are birth control pills that result in 4 periods a year, or no periods a year.  They are available and safe.  An added benefit of these pills is decreased lifetime cancer risk.
http://www.webmd.com/sex/birth-control/features/new-no-period-no-pms-birth-control-pills#1
Answer: If it's set in the future, rather than the past, have this accomplished with genetic engineering. That seems like it will become technologically trivial, since we already have the tools we need (an understanding of how fertility works, and the ability to do genetic engineering). Personally, I suspect that even within our lifetimes, fertility could become "opt in" rather than "opt out." It would solve an awful lot of societal problems.
For us to have evolved this way on our own, that's harder to justify. Lower fertility is not normally an evolutionary advantage, it's a disadvantage. Perhaps resources were so scarce that it was be advantageous to invest more resources per child into fewer children?
Comment: I agree completely. Societally, I have no idea why that would be desirable. To me, the "opt in" fertility I mentioned would make sense, either from a voluntary standpoint, or in an Evil Empire scenario. But the man asked for "scientifically feasible" explanations of how his particular scenario was possible, which is a slightly different question.
Comment: If it is GE I have trouble seeing how women would choose this once a year timing.
Answer: The classic explanations for species wide human infertility usually involve genetic mutation caused by either pollution or biological warfare.
Another, less traveled path, involves the Gaia Theory in which the planetary ecology is a self balancing system with built-in safeguards against destructive species.  When humanity starts threatening the health of the entire ecology, Gaia turns off our ability to procreate and thus solves the problem.
But all these explanations get thrown out when you through in the magic word, "evolution".
Is such evolution biologically possible?
...probably not...
As we currently understand it, evolution is a rather short sighted process, favoring traits which increase an organism's chance of survival only within a single lifespan. If a trait helps a creature survive to breeding age then there is an increased chance that that creature will breed, passing on the trait and thus increasing the chance that that trait will survive within the creature's prodigy.
...but maybe...
Imagine, however, that evolution is more than we currently believe.  Imagine that it somehow favors traits which will increase the chance of survival of the trait-holders over the span of multiple lifespans.  Imagine that it favors such traits, even when they do not contribute to the survival of their holders within a single lifespan.  Although extremely unlikely, such a redefinition of evolution changes everything...
This new evolution might be intelligent enough to lower our fertility rate to keep us from over populating the planet and destroying the ecosystem.  It might be smart enough to help us avoid such an extinction even though that extinction is still several generations away.
What I am proposing is something like the Gaia theory (because it requires a steering intelligence greater than our own) but it is a Personal Gaia Theory with dominion only over our singular species, a species which has already achieved the milestone of sentience.  Since we have already achieved the impossible in obtaining our ability for independent cognition, is it too much to believe that we might also have covertly and under subconscious cover, achieved an ability for collective thought.  If we have, then within that collective thought lies the ability to avoid our coming extinction...
... by decreasing our women's fertility to a couple of months out of every year and thus significantly decreasing the burden which we put upon this planet's ecology.
Before all the scientists flame me for this very unscientific hypothesis, please understand that what the O.P. is requesting would otherwise simply be impossible.  As I have already acknowledged, evolution does not work this way.  Any trait which annihilates its ability to propagate itself through procreation (which is by definition what infertility does), cannot be spread by evolution.  Only by embracing the unlikely can I give this question a positive answer.
Comment: There are many mammals who are only fertile during fall. I think it has to do with the fact that the cub would most likely not survive should it be born later than June. So, there is no point reproducing outside the few fertile months. Maybe OP could invent some similar and boring reasons for humans not to need year-long fertility.
Comment: In this case, the problem has been transferred to coming up with a mechanism which explains why non-annual breeders would be selected against.
Comment: @Magicsowon, That is an excellent idea!  ...and something I didn't know when I wrote my answer.  Why not make it into an answer.
Comment: @Magicsowon - The problem is the occurrence of transitional forms. That is, natural selection only preserves traits which occur. Of course, you could claim that a sizable minority of human females already behave this way, and it's not noticed. Since lactation inhibits conception, children are already spaced at a minimum of about a year even without contraception, it's (very slightly) possible that the pattern in a minority isn't noticed, especially since the OP does not specify that the yearly estrus is synchronized with the seasons as it is in most annual breeding species...(cont)
Answer: The reason for being receptive to mating all year long and not just few days in a year is to be found in the evolutionary advantages behind it:

the male, having the possibility to mate, is more likely to be around and help raising the proles, which for humans is a heavy effort (for the first few years babies do nothing more than sleeping and processing food to fertylizers)
the female can lower the chances of pregnancy (being homo one of the few mammal species suffering from heavy delivery related deaths, due to the standing posture)

In principle it is possible, nowadays we have pathologic cases in which the female skips some cycles. Some scientists even postulate that removal of the cycle would be beneficial for the woman (I read it some years ago). It strongly depends on how this would affect the sexual receptivity of the female.
If it would make her indifferent to mating except than in the fertile period, it could be evolutionary unfit, unless there are other means to support the growing baby. Else it would be perfectly plausible and sustainable.
Answer: Think in a reverse way than the main stream - whether they are scientific-wise, evolution-wise, biological-wise... these are merely doctrines adopted since we don't know (and we will never know with the same level/type of intelligence) the Ultimate Answer to everything hence all these doctrines will be revised from time to time; that intrinsically menstrual cycle is the result of sexual desire, the cycle is for making the by-product the offspring. Then this cycle will be re-regulated if the sexual desire changed.
The monthly cycle is the result of daily, hourly, minutely sexual desire... it's possible in any day there will be sexual activities hence impregnation, the most accommodating cycle will be monthly.
Now if there are sex-robots to feed the sexual needs, over time the body will learn that sexual activity doesn't lead to impregnation, thus it will alter the cycle to conserve energy (menstrual is lost of blood hence lost of energy).
If, another scenario, some humans develop certain self-cultivation therefore their pleasure don't derive from sex hence don't have the tail of impregnation, then this cycle may even be controlled, i.e., only if the woman decided to have pregnancy.
Last, if the human society evolves to completely under control and planned, then new humans will be "hatched" from incubators and female role of reproduction is unnecessary therefore the menstrual cycle will be obsolete too.
From the above understanding, setting the cycle to whatever period of time is as if it's free for anyone's wish, or the author's wish like this OP.
The only logical, with scientific support purport to set the cycle to twice a year is to change the orbit of the moon. Like the tide, the female cycle is regulated by the moon. The moon is orbiting the earth in a monthly cycle, if for any reason this orbit changed to yearly, then the menstrual cycle will be altered too.
Why the moon regulates the female cycle? This new question will take another big page to explain...
Comment: How exactly does the amount of light bouncing off the Moon regulate the female cycle?!? You do know that the 28 day menstrual cycle is an average, not a fixed number?


Memory Card Cannot be Accessed

Question: I have a Canon 7D.  Suddenly my camera says "Card cannot be accessed. Reinsert/change the card or format card with camera".  This is a card I have been using for about 6 months.  How can I retrieve the photos on the card?  This is the second time this has happened with my 7D.  What am I doing wrong?
Answer: It is unlikely that you are doing anything wrong.  If it is the same card as before, it is likely your card may be faulty.  If it is a different card, it is likely your 7D may be faulty.  If you are able to access the card from a card reader on your PC, then the card reader in the 7D may be faulty and if you can not, then it is likely the card has become corrupt and you will need to try using a file recovery tool such as the ones described in the answer that Philip Kendall linked to.
Answer: Same thing happened with my 5D MK II. Most of the times, the problem is with the card. i.e., You might have browsed your card in some random PC or Mac (which might have virus).
What you need to do is, After you copy all the photos from the card to computer, please make sure that you format the memory card from the camera itself before you start shooting again. So that, this won't happen again.
To recover the pictures, I always follow a simple method. Mine is Windows 7 PC. So, I simply insert the memory card in my PC, and after the external drive opens up, I'll search for  <code>*.*</code>  in the search bar. So that it would show all the files that were written in the memory card, irrespective of the nature of the file. (careful, do not select the affected files) Copy only the pictures you want to recover and paste them in a different location.
[Unlike other methods, like photo recovery software, this method is not guaranteed. Yet, you could give it a try. Most of the times, it might work]

Memory Card Cannot be Accessed


BTC for political donations?

Question: When I am asked to make donations, I assure the requester that I will donate if they accept BTC.  Initially, that gets a blank look, but I wonder how it might change if more of us took that approach.  Specifically, has anyone had success with making donations, political, religious or otherwise, using BTC?
Comment: related: [Is there a list of charities that accept Bitcoin donations?](http://bitcoin.stackexchange.com/q/2560/5406)
Answer: Yes, there is a number of organizations and projects that accept Bitcoin donations.
The above linked list includes political parties (e.g. Libertarian Party in the US), at least one church (St. John's in Goshen, NY), a score of open-source projects, as well as a number of charities and other causes.

BTC for political donations?


SharePoint 2010 Upgrade to SharePoint 2013 - People Search Results are Wrong

Question: I upgraded the Search Application from SharePoint 2010 to SharePoint 2013, implemented People Search Core Results webpart, clicked on a person returned in People Search Core Results and get forwarded to the SharePoint 2010 farm.  How do I return results from the SharePoint 2013 farm?
Answer: After upgrading from SharePoint 2010 to 2013, need to verify the content source crawl path like below :
<code>sps3s:// My_Site_host_URL
</code>
Note : Here My site host URL should be from SharePoint 2013 URL.
And also, verify people search result page from site search setting, check any custom page was created which points to SharePoint 2010... or you can create a new search result page for people search from SharePoint 2013.
For details configuration of people search in SharePoint 2013, please read the below MSDN documentation :
Deploy people search in SharePoint Server
Comment: This resolved my issue.  The content source after the upgrade still had a source pointing to the SharePoint 2010 farm.  I deleted it and added a new start address per your recommendation above.  Thank you.
Comment: Hi - glad to hear from you that it helped you. :-)


How do I mount a light intended for a tube to a flat rack?

Question: I have a rack like this:

This works really well for me, for the most part.
Alas, I am mounting my taillight like this:

So, in the past, I've had some PVC pipe affixed to the side of the thing.  Now, I'm shoving a tube underneath straps as seen above.  Does anyone have any other suggestions?
Comment: zip tie the pvc pipe to the back of the rack
Comment: Why not mount it to the seatpost? Assuming you can mount it high enough to be visible above whatever you are transporting on the rack.
Answer: The light seems to have an elastic bungy/strap to hold it on. Your rack appears to have a flat vertical plate on the back.  The light might just strap over that and keep pointing backward.  That would be the simplest option.

As for making something. it depends what tools you have access to.  I have 3D printed light-to-bike adapters for several different lights.
https://www.tinkercad.com/things/0SRvpWOsT1e flashlight/torch to a chainstay on a recumbent
https://www.tinkercad.com/things/hbQZMa0HcQc flashlight/torch between the seat stays on a road bike
Every one is custom to the bike and the light's attachments.
If you don't have access to a printer, then carving an interposer from something like wood can be a suitable substitute.  Paint it to protect from moisture.

If aesthetics aren't important to you, one can achieve a lot with excessive quantities of cable ties.  Use black ones for UV resistance.

Last resort is to put this light on your seatpost and buy a more-suitable second light to go on the rack.  There's nothing wrong with having several rear lights.


Relativistic quantum mechanics

Question: Special theory of relativity predicts negative energy as well $E^2 =p^2 + m^2$ which when merged with quantum mechanics predicts antiparticle (Dirac equation). But what does it mean that a free particle can have negative energy? I mean to say can I experimentally differentiate between a particle (say electron) with positive energy and one with negative energy?  And also the general solution of Dirac equation is a linear combination of both positive energy (spin up and down) and negative energy (spin up and down) states, so what does it mean that if i measure the energy of an electron very large number of times, about half the time I will get positive and other half negative?
Comment: I can't immediately see the connection between spin up/ down and positive or negative energy states, I have to say.  But I will read more about it
Answer: The existence of negative-energy particles is a common misconception.
In the context of relativistic quantum mechanics, it is possible to make sense of the negative energy solutions using the Dirac sea toy model. Imagine your particles to be fermions (that is, obeying the Fermi-Dirac statistics and consequently the Pauli exclusion principle). Moreover, imagine all of the negative-energy states to be filled. This state is called the Dirac sea (all negative-energy states filled and all positive-energy states unfilled).
The Dirac sea is proposed to model the vacuum state. It has an infinite negative energy, but that's no big deal, because we can redefine its energy to be zero (we can only measure energy differences). Consider the fluctuations of the Dirac sea. You can either have some of the positive-energy states filled (which would increase the energy), or you can have some of the negative-energy states freed (which would also increase the energy). As you can see, all fluctuations of the Dirac see have more energy than the sea itself, thus, there are no negative-energy particles!
The modern QFT-based treatment is a bit different.
In QFT you interpret positive-energy and negative-energy solutions as creation and annihilation operators acting on the Fock space of quantum states of second-quantized theory. The concept of "particle" is thus different from a "solution of the Dirac equation", however these are connected of course.
In QFT there are no negative-energy states, the vacuum having the lowest energy of all, which we usually redefine to be zero. All particles and antiparticles have positive energy. No Dirac sea is required.

Relativistic quantum mechanics