COIN FILTERING OF 10%

Question: I recently hired a  3rd party to trace and retrieve my investment which was being scammed. They said they were able to retrieve and sent the investment to an exchange. When I tried to withdraw, the exchange says I must deposit a 10% value of Bitcoin to their wallet to filter the coins which had come from a flagged wallet with fraudulent activities. They claim this is a standard procedure set by Finra. They have now given me 2 weeks to do this before my account is blocked permanently. What should I make of this?
Comment: Without providing more details including the name of the organizations that you are working with little can be done to assist you. Please include as much information as possible.
Answer: I'm sorry to say, this is a fairly common scam. Often victims of scams are targeted by scammers, telling them they can retrieve their money so long as they pay more.
This exchange wanting you to deposit funds in order to withdraw your "recovered" funds is a scam. If you deposit funds to them, they will not let you withdraw them for some other made up reason.
Please do not give the exchange or the 3rd party any more money.
They are lying to you.

COIN FILTERING OF 10%


How is a feature request a duplicate of a support question?

Question: I asked Could we allow users to challenge moderators' decisions? but it was marked as a duplicate. But I believe it isn't a duplicate because the questions linked to are asking how to use a feature that already exists in Stack Exchange, while mine is asking if we could implement a new feature.
Comment: The "moderators" didn't claim anything... it was closed by users. None of the close voters have mod diamonds. Stop calling people mods when they're not.
Comment: @Kendra That doesn't change the fact that "moderator" is a title here and when used in a complaint, it makes the issue unclear. Saying that users closed the question is much more clear (and accurate) than saying that the question was closed by moderators. Intentionally misusing the term is being done for effect and is not helping his complaint.
Comment: @Cole You seem to misunderstand the very concept of SE being self moderated community. The users themselves perform most of the moderation, and the actual moderators only supervise and step in when required, or to speed things up.
Comment: @Catija Technically, almost all users are "moderators" to a degree. We _all_ have the ability to "moderate" content in one form or another. For instance, voting and flagging. (Which is probably the reason for the line _"and yes I am using that word, they are moderators by definition"_ in the question.)
Comment: Imho , this question isn't asking what to do when a question is already closed... it seem instead to be challenging the fact that question in different categories (support VS feature request) can be used as duplicate target in the first place. In that way, it doesn't seem a dupe, or at least not a dupe of the [currently linked question](http://meta.stackexchange.com/questions/194476/someone-flagged-my-question-as-already-answered-but-its-not).
Comment: @Kendra by your (and his) logic, Cole is also a moderator, and thus is asking himself to justify his decision...
Comment: @Catija And if Cole wasn't using "moderator" as a title but to describe the action the users were taking? They were moderating the content, therefore in action they were moderators. It's still technically correct.
Comment: @KutuluMike And he _should_ justify his decision- His decision to disagree with the assessment of other "moderators" who happened to feel his question was a duplicate. That justification should then be edited into the original question in such a way as to clarify it and make it clearer it's not a duplicate. (If it indeed isn't- I feel it is.)
Answer: In general, you should edit your original question to clarify why it's not a duplicate rather than bringing up a new question. If you can't do that convincingly, the question will remain closed… because you did not convince enough people (5 with 3k rep, or 1 with a gold badge or diamond) that your assertion that the questions are different is correct. (This was explained on the answers to the other question, incidentally.)
But a feature-request for a feature that already exists is definitely a duplicate of a support question asking what feature to use for the same purpose — both are answered by pointing to the appropriate usage of the existing functionality. Which you should be using, rather than asking for a feature that already exists.
Answer: It's a roundabout way of declining your request. You're asking for a way to handle your question being closed, and that (admittedly more broad) question already has several answers.
And you should note that the people that close your question (or put it on hold) are not "always right". Those banners list multiple user names, because it's done by voting, which means that it's not just one person's word against your question - several other people agree. In the case where only one user name is listed, (gold badge duplicate closers, diamond moderator actions), you can still go to that site's meta to ask about and challenge the closure.
Comment: Not only did that handful of people vote that @Cole's question was a duplicate but the other 470 people who could be voting the other way have not.  I would say that the community is saying in an overwhelming way that it can be considered a duplicate and that the software behaviour that it requests is unwarranted.
Comment: @PolyGeo: That statistic is a bit misleading; 95+% of those who *could* vote to reopen in principle have probably not actually seen the question. Out of ~170 views, I would not put money on more than 20 or so being those with CV privileges. That's certainly more than enough to reopen in principle, but it's far less than some definitely-not-duplicate questions have required to be reopened. It's more the downvotes that provide the overwhelming response.
Comment: @NathanTuggy You're right, on both counts, over time a larger percentage will see the question and choose to vote one way or the other but most will not have yet.


SEO impact: changing animated GIF images to PNG image sprites

Question: My project  has a lot of GIF images on all pages as it's a library. This makes the page size huge. So I decided to turn all animated GIF images to PNG image sprites (which reduces image size dramatically) and animate them by JS. But now question appears - the project has been showing those GIF images for years, how will that impact SEO? Will it create problems with search engines?
Comment: Images traditionally only effect image search and not textual search. Or at least not much. If your site works and is faster, I am not sure I would worry about it. Cheers!!
Answer: Have you tried optimizing the GIF images? Properly made GIFs usually shouldn't be much larger than PNG sprite.
But as far as SEO goes - it shouldn't have much, if any, effect on rankings. Just make sure your JS solution works on all browsers and devices. And maybe have the old GIFs as fallback in noscript tags.
Comment: Thanks. I decided to go with SVG+CSS - that dramatically reduced page load speed
Answer: The only way that changing your images would change your web rankings is if users hated your site and stopped using it.   As long as your users are happy, your Google rankings aren't going to suffer.   In fact, with a faster site ranking could even improve.
I've done countless projects where we change technical details such as scripts, images, and which HTML tags are used.   Google rankings don't even blink for such changes unless you royally mess up the site.
If the images are ranking in image search, it is likely that image search rankings will be dramatically changed.   To minimize impacts you can either leave the old gifs in place or redirect to the new pngs.


Can coiling a bandsaw blade permanently twist it?

Question: I bought a used 10 inch bandsaw and it came with several blades.  All the spare blades came coiled.  I just put on the 1/4 inch one and it has a twist in it.  Looking at some howtos, coiling a blade involves some twisting of the blade.  Can you create a permanent twist by coiling, perhaps by not doing it correctly?  (The answer will determine how I store the blades).
Comment: Can it? Possibly, however, storing them coiled is a long standing tradition. It's also how they're packaged for shipment by the manufacturer. I doubt they're intentionally damaging brand new products.
Comment: I think being doubtful about coiling being an issue, in general, is the right call given that it's both longstanding practice *and* still done by the manufacturers themselves (with no instruction to uncoil ASAP when the blade gets into the shop). Plus of course nearly every bandsaw user coils blades that aren't in use. *"...perhaps by not doing it correctly?"* This may be the heart of the Q, because I'm sure the answer is yes.... doing a lot of things *incorrectly* can lead to problems. I don't think there's any reason to think this would be an exception to that :-)
Comment: Thanks for the comments.  Good blades are kinda pricey, and I'm a newbie, so if there's a chance I'll ruin them by coiling them wrong, I'll find another way to store them.
Answer: Can you damage them?  Yes if you put the twist in or unwrap them incorrectly.  However, correctly folding them and unfolding them will not damage or twist them.  I have a bandsaw mill that has the same kind of blades and we store all of them that way.  Take care and you won't damage them, and taking care you won't damage yourself either.


Connecting flight from Tel-Aviv to Venice

Question: I fly from Tel Aviv to Venice via Rome (Fiumicino). Between flights I have only one hour. The same airline (Alitalia). Is it really hard to catch the second flight? How should I act?
Comment: If the airline is willing to sell you the flights on a single ticket, they belive you can make it (and are ready to shoulder the cost of rebooking you if you don't). If not, don't risk it. Are you asking specifically for instructions on how to transfer between terminals as Fiumincino?
Answer: Every airline has a Minimum Connection Time set and below that the system won't issue a ticket for you. But that is a thing set in computers, not always the reality. Like, the relevant MCT for this connection is 45 minutes but for about an hour in the morning and in the evening (which is alas when the flight from TLV lands) the transit area becomes a spectacular chaos. If you want to make this connection, make sure you are as close to the front as possible, deplane and move quick.
Answer: I suggest you :

Check your Fare rule about change
Call Alitalia and ask to change te reservation with the requested flight .

If you would you like to change your flight ticket that you already purchased ,even if is just the next flight ,it is follow the same rule of a any change on your flight ticket .
Anyway a free change request could be authorized from the airline , since it's just for short connection time


Where is the antecedent and consequent phrase in this melody?

Question: I have learned that a period is made up of two phrases, the antecedent and consequent phrase.
In this melody we have two periods in the verse.
Do I simply say: bars 1-2 is antecedent, bars 3-4 is consequent?
I was taught that a consequent ends on the I chord.  It doesnt work for this melody.
Where is the antecedent and consequent phrase in this melody?
http://runeberg.org/img/sondag/0250.5.png
Answer: Not heard of antecedent or consequent, but it must mean question and answer to the commn man. In this piece, the first four bars are the question, stopping on an imperfect cadence - as questions often do - making the last four bars the answer, coming to a perfect cadence.
Comment: Convoluted how? They are simply neutral structural terms. Something like the first 8 bar antecedent phrase of a minuet isn't asking a _question_. Typically antecedent just means the first part end with a half cadence.
Comment: Antecedent and consequent are standard musical terms in classical music theory.
Comment: Antecedent/consequent of a period phrase structure.Is this maybe an American/British thing?
Comment: @MichaelCurtis - sounds convoluted enough to be real English! Q and A is what it means though...
Answer: I assume that @Hank provided the correct score...

...the music is in D major.
The antecedent and consequent parts are 4 bar phrases.
The first, the antecedent, ends on the dominant chord A major. You could say the phrase ending modulates to A major and label it A: I, or if you want to label it all in D major, the final two chords of the antecedent would be D: V/V V. Either way the important thing is the final chord of the phrase is A major which is the dominant chord in D major.
The second, the consequent, ends on the I chord D major forming a perfect cadence.
The two parts, the antecedent and consequent, and especially the paired structure of a cadence on the dominant setting up tension which is resolved by the consequent perfect cadence, together are called a period.
In the case that melodic material is similar between the antecedent and consequent the period can be called parallel. I highlighted in yellow the similar melodic parts. I would call this a parallel period, because most of the melodic material is similar.
You can use metaphorical terms like 'question/answer', 'up/down', 'open/close', 'cause/effect', etc. if you like, but 'antecedent/consequent' are the formal, neutral terms.
If you want to really abstract the period concept, you probably can say the consequent is a phrase ending as a perfect cadence in the main key and the antecedent ends with any cadence that isn't the consequent. Half or deceptive cadences or a cadence in the dominant key would be the most likely antecedents.
If you're in a minor key, your antecedents will likely target the dominant or relative major.
Hymns like this one will exhibit periodic structure, but you can also find examples in classical dance forms like the minuet, and in 32 bar jazz standards.
Answer: 1-2 question
3-4 answer
5-6 question
7-8 answer
this are 2-bar phrases, the bar 4 is semi final (dominant chord), bar 8 final.
I would use the concept of antecedent and consequent for a 4 bar sentence.
in German this form is called:
1-4 "Vordersatz" -> Halbschluss
5-6 "Nachsatz" -> Ganzschluss
I think Vordersatz and Nachsatz are equivalent to antecedent and consequent.
The 8 bars will be  a "Satz" (sentence) or as you say a period, while in German the 8 bar-period is: phrase, phrase repetion, phrase development, final phrase, (each 2 bars).
As you see the terms phrase, Satz, period are very "stressed."


Developing native applications to run both on Android & iPhone?

Question: I'm new to mobile phones development, but I wonder whether there is any way to develop native apps (HTML-based apps is another story) that would run both on Android and iPhone? I know that there exist applications available for both OSs, so I wonder how are they ported/developed for both targets?
Comment: possible duplicate of [Technology to write iPhone, BlackBerry and Android phone at the same time?](http://stackoverflow.com/questions/821085/technology-to-write-iphone-blackberry-and-android-phone-at-the-same-time)
Comment: See also [What work has been done on cross-platform mobile development?](http://stackoverflow.com/questions/51988/what-work-has-been-done-on-cross-platform-mobile-development), [cross-platform development for mobile devices](http://stackoverflow.com/questions/2380196/cross-platform-development-for-mobile-devices), [Crossplatform iPhone / Android code sharing](http://stackoverflow.com/questions/2380258/crossplatform-iphone-android-code-sharing) and many other similar questions.
Answer: You can simply have two different projects, with same design and graphics, or, you can do it with some frameworks like PhoneGap or Rhomobile.
The best way is to have two different versions of the code, so you can take advantage from the platform that you are using.
Comment: I wouldn't recommend Rhomobile, the Rhodes framework is not mature enough in my opinion. The resulting interfaces are pretty clunky and very non-native feeling. Check out the apps they list under their customers before making your decision, and note that Wikipedia no longer uses Rhodes.
Comment: Of course the best way is have a different native version of the app for every platform.
Comment: Ok, but that really basically means writing the same application twice. No way to re-use code (at least to some extent), while still keeping the advantages of native apps? Is it a common practice to write apps from scratch (only sharing resources)?
Comment: Yes you can using cross-platform framworks, but the result is a not the best you can have as if you do it as separate projects. To be honest, I think that big dev teams use only shared resources and do it as separates projects. But if you want to use a framework to spend less time in it, you can of course, but be careful in you choice. Personally I've tried Rhodes, it looked really good at the start, but after some weeks, I'd understood that split the two projects was the better way, but maybe it was because the project was really complex.
Answer: http://www.appcelerator.com/
Answer: You can share a significant amount of Non-UI logic and code libraries by taking advantage of MonoTouch and MonoDroid. They are native frameworks which provide C# bindings around iPhone's and Androids native APIs. They have the added advantage of being able to develop in C# which IMHO is nicer than Obj-C and Java.


Is there always a limiting reagent in every equation?

Question: Is there always a limiting reagent in every equation? For instance, is there a limiting reagent in $\ce{CaCl2 + Na2CO3 -> 2NaCl  + CaCO3}$ where the same number of moles are reacting with each other?
Comment: Considering that there are $6.022\times10^{23}$ molecules per mole, it seems unlikely that an *exactly* 1:1 ratio could ever really be achieved.
Comment: @MaxW It is possible using e.g. AFM tips to nudge individual atoms and molecules and cause them to react, which I suppose counts as exact in a very technical manner.
Answer: An interesting philosophical question. We are given a chemical equation: $$\ce{CaCl2 + Na2CO3 -> 2NaCl  + CaCO3}$$ and that the same number of moles of the reactants are used. Now the OP poses the question "Is there a limiting reagent?"
As chemists we can say that 1.00 moles of $\ce{CaCl2}$ were reacted with 1.00 moles of $\ce{Na2CO3}$. We'd pragmatically say that the moles were equal and that there was no limiting regent.
However this is a significant figure argument, not reality. Avogadro's number is about $6.022\times10^{23}$. There is no lab in the world that can weight out precisely one mole of $\ce{CaCl2}$ accurate to 23 decimal places. We don't even know Avogadro's number accurate to 23 decimal places! The best value is $6.022140857(74)\times10^{23}$.
So in reality, despite our best efforts as chemists, one reagent or the other will be in some small excess which we'd consider to be insignificant given the overall precision of the experiment.
Comment: Note that, since 20 May 2019, the Avogadro number is (by definition) exactly $6.022\,140\,76\times10^{23}$.
Answer:
There can't be any limiting reagents in the equations. Equations are purely theoretical expressions and are always balanced in terms of moles.
"Limiting reagents" arise in real world chemical reactions.

The questions on limiting reagents are usually formulated in a form of "we have a reaction according to this equation, and we have X grams of this reagent and Y grams of that reagent, which one is limiting?"
A question "which reagent in this equation is limiting?" without additional info makes no sense.
Comment: The OP has clearly stated "same number of moles are reacting with each other", so the amount of the reagents are given. Using the molar masses you can get to the actual weight. What additional info is required?
Answer: I'd like to explain this problem with an example. The chemical equation in question is:$$\ce{CaCl2 + Na2CO3 -> 2NaCl  + CaCO3}$$
Since $K_\mathrm{sp}$ of $\ce{CaCO3}$ is $\pu{3.36\times10^{-9} mol^2\cdot L^{-2}}$, it is safe to assume that this reaction would have proceeded to completion, if $\pu{1 mol}$ of $\ce{CaCl2}$ is reacted with $\pu{1 mol}$ of $\ce{Na2CO3}$ to give $\pu{1 mol}$ of $\ce{CaCO3}$ solid and $\pu{2 mol}$ of aqueous $\ce{NaCl}$. Therefore, no limiting reagent in that calculation because we used exact stoichiometric amounts of starting materials.
What if you have mixed $\pu{100 mL}$ of $\pu{2 M}$ $\ce{CaCl2}$ with $\pu{100 mL}$ of of $\pu{1 M}$ $\ce{Na2CO3}$? You can calculate how many mols in each solution:
$$
\begin{align}
\text{Number of moles of}~ \ce{CaCl2}~ \text{in solution} &= M_1V_1=2~\pu{mol L-1}\cdot \pu{0.100L}=\pu{0.2mol}\\
\text{Number of moles of}~ \ce{Na2CO3}~ \text{in solution} &= M_2V_2=1~\pu{mol L-1}\cdot \pu{0.100L}=\pu{0.1mol}
\end{align}$$
Now, according to the chemical equation, only $\pu{0.1 mol}$ of $\ce{CaCl2}$ would react with available $\pu{0.1 mol}$ of $\ce{Na2CO3}$ to give $\pu{0.1 mol}$ of $\ce{CaCO3}$ solid and $\pu{0.2 mol}$ of aqueous $\ce{NaCl}$. The rest of $\pu{0.1 mol}$ of $\ce{CaCl2}$ would remain unreacted in the solution. In this situation, we called $\ce{Na2CO3}$ is the limiting reagent because all of them would be consumed by the reaction. In other word, $\ce{CaCl2}$ would be in excess.
Comment: Okay, your entire solution revolves around a given example, but is missing a conclusion. So, are you implying that whether there would be a limiting reagent or not depends on the amount of the reagents used, correct?
Comment: @ Gaurang Tandon: correct. There is always a limiting reagent, if at least one of the starting materials is in excess in the reaction mixture.


Why doesn't Chinese have voiced sounds like [b], [d] and [g]?

Question: So I'm wondering why, Chinese lacks voiced sounds like B, D and G. B, D and G all sound different from English. B is like [p], D is like [t], and G is like [k]. Were the voiced sounds all too hard to pronounce or were they replaced with voiceless ones? I already know, K, P and T are reserved for the aspirated version of G, B and D. But what is the reason for the lack of voiced sounds in Pinyin?
Comment: I think that there is a very interesting question here, but it is a bit obscured by your premise "B, D and G all sound different from English." Of course Chinese consonants sound different from English. Also Spanish consonants, French consonants and German consonants sound different from English. In fact if you look at Chinese transcriptions into European languages before pinyin became so popular, you'll find that every language transcribed Chinese consonants differently, as they were each trying to pull Chinese consonants towards the closest consonants from their own language.
Comment: Re: "In most languages... they are pronounced [b], [d], and [g]", I think most languages have a single [VOT](https://en.wikipedia.org/wiki/Voice_onset_time) distinction. But I don't think it's really uncommon for languages to mostly distinguish aspiration rather than voicing. Even in many English dialects, initial /b/ /d/ and /g/ are barely voiced at all, and initial /p/ /t/ and /k/ are pretty strongly aspirated. So for a monolingual English speaker, Pinyin "b" and "p" seem like intuitive transcriptions of the consonants.
Comment: To expand on the other answer: Middle Chinese had a 4-way tone distinction as well as a voicing distinction, but in most branches of the languages, this changed into an 8-way tone distinction w/no voiced stops. https://en.wikipedia.org/wiki/Four_tones_(Middle_Chinese) for more; Cantonese is a good examples, as the modern tone categories map closely to this 8-way distinction.
Comment: The reason I'm specifically talking about B, D and G is because, that is not their usual sound. In most of the languages, they're in, they are pronounced [b], [d] and [g] respectively
Comment: What are they those English dialects
Answer: It's generally believed that we used to have a contrast between voiced and voiceless b,d,g, but this distinction was lost during Song dynasty.
王力《汉语语音史》 (王力全集 edition)
Page 247

本章讲宋代音系,主要是根据朱熹反切。……他所用的反切并不依照《切韵》,可见他用的是宋代的读音。这样,朱熹反切就是很宝贵的语音史资料。

Page 248

这个声母系统比晚唐五代的声母系统大大地简化了,其原因是:1. 全浊声母全部消失了。……

(The consonant system of Song dynasty was greatly simplifed compared to that of late Tang dynasty. The reason is that ... most voiced initial-consonants have disappeared, except /m/ 明, /ɱ/ 微, /n/ 泥, /ŋ/ 疑, /l/ 来, /r/ 日.)
王力 1980 construction of late Tang initial-sounds:

王力 1980 construction of Song initial-sounds:

See also 邵荣芬《汉语语音史讲话》 chapter 5.1 discussion, and this Internet forum discussion.
Comment: Not all voiced consonants – all voiced **obstruents**. /l, r, m, n/ are also voiced consonants, and they remain unchanged. In the context of Chinese phonology, 全浊声母 means 'voiced obstruent initials' (including stops, fricatives and affricates), in opposition to 次浊音 'voiced sonorant initials' (including nasals, laterals and other continuants) – the 全 doesn't mean 'all'.
Comment: You don't need to explain 全浊 and 次浊, but translating to "all" will confuse someone who is learning the proper pronunciation of Chinese: they will think they should also devoice /l, r, m, n/, which is incorrect. One can simply translate to 'all voiced obstruent initials have disappeared', then add a quick explanation: 'That is, all voiced consonants except /l, r, m, n/ have disappeared.'
Comment: Thank you very much!
Comment: Yes, but explaining what is 全浊, 次浊 would need too much digression. 浊音清化 is also discussed on Chinese forums https://www.zhihu.com/question/55381763
Comment: (There is also the issue that they didn't 'disappear' – they merged with their unvoiced counterparts. If they'd disappeared, [ba da ga] would have become [a a a], which obviously didn't happen. They disappeared as distinct entities _from the system_, but not as sounds from the individual words. But that's sloppy wording in the original, not your translation.)
Answer: I will be frank, there is no answer to your question beyond the fact that all languages are made up of sounds humans can make, and that chinese has some sounds english doesn't and vice versa.
Why is lead and lead pronounced two different ways, while cite and sight are pronounced the same?  Why is polish c a ts sound in english, why is j in spanish an h sound in english? Pick any language including english itself and such questions are all around you.
If you starting asking why things are the way they are, your best result is an etymology rabbit hole to a language thousands of years ago that still is what it is because it is.
So I don't blame you for asking, but its one of those odd questions with no direct answer isn't it? Why isn't the sh or ch in english the same as pinyin sh or ch? Why doesn't english have the ü sound? You can go on and on both ways with any language and you will not go anywhere.
If you have to say it, the answer is chinese pinyin sounds don't match english sounds, because they represent chinese sounds, not english ones.  I hope the previous comparisons help show that as a 100% serious answer (◐‿◑)
Comment: @Akshat Yes, it's absolutely true. It's not an odd question, and it is perfectly normal to ask – there just isn't really an answer. That's how most 'why' questions about language are. As the other answer says, we know that there _used_ to be voiced stops in Chinese – and indeed Wu (Shanghai) still has them to some extent – but they merged with the unvoiced ones. Why did this happen? Because it did. Why did the same thing happen in Icelandic and Danish, but not in Swedish and Norwegian? Why is it in the process of happening in English? Because it did/is. We can say no more.
Comment: @AkshatGoswami I didn't mean to say that its odd to ask the question, but that the question itself is odd for not having an answer.  Sorry for any confusion, I did not at all mean to say anything wrong for wondering about it.  I will slightly reword that part to be more clear.
Comment: Are you sure this is true? It's not an odd question. It's normal to ask about the absence of voiced consonants.
Answer: Reading OP's clarifying comments, there are a couple of different questions mixed up here:
1. Why don't the sounds /b/, /d/, /g/ occur in (spoken standard) Chinese?
This is about the phonology of the language itself, and comes down to two main points: One the one hand (as per zagyrcha's answer), different languages just do have different inventories of sounds, which change over time through a complicated mixture of random chance and systematic effects — there's no general reason to expect any given language to contain any particular sounds.  On the other hand, the specific route by which standard Chinese came to lose these sounds (having historically had them, until around a millennium ago) is well-explained in user2249675's answer.
2. Why does Pinyin, along with some other romanisations, use the letters «b», «d», «g» to transcribe sounds that aren't /b/, /d/, /g/?
This is about the design of specific romanisations — that is, ways to represent Chinese using the Latin alphabet.  Unlike the phonology of the spoken language, and unlike many older writing systems, these romanisations were deliberately and consciously designed, and explained by their designers, so it has a clearer answer than question (1).
Modern standard Chinese doesn't have a voicing distinction like most European languages, i.e. the pairs of consonant sounds /p/-/b/, /t/-/d/, /k/-/g/ (in which /p/ is unvoiced and /b/ voiced, and so on).  But it does have a somewhat analogous distinction: aspiration.  So there are pairs of consonants /p/-/pʰ/ (unapirated and aspirated versions of /p/), /t/-/tʰ/, /k/-/kʰ/ — it's hard to hear the difference for speakers of English and many other languages that don't have such an aspiration distinction (e.g. in English, our /p/ may be aspirated or unaspirated just depending on context, we don't think of it as a different sound), but the difference just as clear for speakers of languages that do have it as the voicing distinction /p/-/b/ is for Anglophones.
So any romanisation of Chinese wants some way to distinguish these aspirated–unaspirated pairs; and since the letters «b», «d», «g» used in most European languages for voiced consonants aren't needed for that, it's very natural to repurpose them for aspiration instead, with «p» representing the aspirated /pʰ/ and «b» the unaspirated /p/ (presumably since voiced consonants like /b/ are usually unaspirated in most languages, whereas unvoiced like /p/ are more often aspirated by default), and similarly for «t»–«d» and «k»–«g».
The table of "initials" on Wikipedia:Pinyin gives a helpful overview, with IPA notation and links to explanations of the terms involved.


SSH failed public key authentication

Question: I have a server, and I want to be able to SSH in with two different users. I have setup public key authentication for the first user, and it works just fine, however, I can't login with the second user.
The difference between the authorized_keys file is that, the second user has two keys(both of them fail when authenticating). Both the .ssh directory and the authorized keys file have 755 permissions. The ssh client sends the key, that I want to authenticate with. What could be the problem?
Comment: Please show the commands for the two users and the different keys for the second user you are using to ssh into the server.
Comment: Glad the above worked in your case.
Besides just resetting the password. I'd advice to also have a look if you have pam_tally locking the account. pam_tally2 --user userb --reset This will reset the failed counts on the account and allow you to login.
Answer: First, the .ssh directory should have 700 permissions and the authorized_keys file should have 600.
chmod 700 .ssh
chmod 600 .ssh/authorized_keys

In case you created the files with say root for userB then also do:
chown -R userb:userb .ssh

If the problem still persist, then post the output from your ssh log file in your question and I'll update my answer.
For Debian:
less /var/log/auth

For Redhat:
less /var/log/secure

Comment: `chown -R userb:userb .ssh` replace `userb` with your current user. i did `chown -R userb:userb .ssh/authorized_keys`  just in case too.

Really helpful answer!!
Comment: `less /var/log/auth.log` shown interesting stuff! `Authentication refused: bad ownership or modes for directory /home/pi` This was not flagged anywhere in `ssh -vvv`, bad debug info from SSH it's always a headache.
Answer: I have found this message in /var/log/auth.log:
Oct 22 13:27:58 hagyma sshd[27420]: User userb not allowed because account is locked
I have set a password for userb with sudo passwd userb, and it unlocked the account.
Comment: this was the solution for a backup user created as a system account
Comment: ..and now you have two problems. hope that password is secure.
Answer: For me, sshd was ignoring ~/.ssh/authorized_keys because /home partition was mounted in an unusual way. I tried everything, I set the correct permisions, and it worked only after modifying in sshd_config:
StrictModes no

Comment: This was working for me on CentOS 7. root login with public key was working, but not for users on /home
Comment: I tried adding this to my Synology's config, and it caused sshd to fail to start. Nearly locked myself out of the server.
Comment: Instead of `StrictModes no` first try to set permissions 700 to your home folder chmod 700 /home/user Also check this article [enter link description here](https://www.ibm.com/docs/en/was-liberty/zos?topic=system-avoiding-problems-ssh-in-collective)
Comment: Sadly this would be the only solution but is not secure enough for my use-case
Answer: I had same problem due to SELinux.
Please, configure SELinux properly (restorecon -Rv ~/.ssh) or disable it (on RedHat, you should edit /etc/selinux/config and reboot the machine or just type setenforce 0 to disable SELinux temporarily until next reboot).

SSH failed public key authentication


Does free fall in a magnetic field also leads to no force acting on the falling object similar to free fall in gravity

Question: In complete absence of gravity if a metallic object free falls in a magnetic field will it continuously feel the force of magnetic field or will stop feeling the magnetic field during the free fall.
Comment: What's going to cause it to "fall" in the absence of gravity?
Comment: What's your magnetic field? If velocity of particle and mangetic fields are parallel then no force will be applied to the particle.
Comment: "Free fall" doesn't _lead_ to no force acting on the falling object. "Free fall" is our _name_ for the condition of no force acting on the object.
Answer: The term "falling" really has no well defined meaning in the absence of gravity. The object will feel the force of the magnetic field as long as it's inside the magnetic field and it will accelerate accordingly. Eventually the object will either move out of the field or just bump into one of the poles.


Can I prevent power theft?

Question: I have heard stories about miswiring and other, less accidental ways that power gets stolen, especially in rentals and condos. I would like to protect myself from false charges if I end up moving into one. Are there safe and legal ways to stop other people from stealing power from the line I'm paying for?
Answer: It's difficult to completely prevent theft. The illegal tap could have been installed long before your presence. Such taps can be nearly impossible to locate. It's even difficult to prevent new taps from being installed because meters and overcurrent devices need to be accessible and you cannot reasonably monitor external wiring 24/7.
While it's difficult to stop, it's not too difficult to detect, though somewhat inconvenient. Turn off all the branch circuit breakers in your unit, then inspect your meter. If the meter indicates current is flowing, you are paying for power you are not using. Of course, if you run this test when the thief is not using your power, you cannot detect it. You need to catch them in the act so to speak.
Also, if the thief has tapped into your branch circuits, you have also shutoff their access so they are undetectable. To identify this kind of theft, you need to disconnect every single thing in your unit that uses power. This includes doorbell chimes, smoke detectors, clocks, furnaces, stoves, etc. Then once again check the meter. If the meter indicates current flowing, power is being consumed that is not under your control.
Comment: You could fine tune the checking by turning off all branch circuits, then turning on one at a time while unplugging the devices from that branch to verify which branch is experiencing the draw.  You can also check for current draw directly on the conductor for a circuit if you have access at the box where the wires are not sheathed together in a bundle.

Can I prevent power theft?


Count posts for each taxonomy term for each month

Question: Cannot figured it out... I need to count how many posts there are for each taxonomy term form each month.
Answer: This is a long answer and there is a lot of code, please note that it is all not tested.
My solution use a function that create a multidimensional array where key are year, month, term id and the value are the term count.
The function also accept as argument an array of args to pass to  WP_Query, limiting the term counting to desidered posts, so you can count terms of a taxonomy in a specific period using WP_Query time options or only for posts that respond to another taxonomy query using tax_query options, and so on.
Data ireturned by function are very rich and can be manipulated in a lot of ways, as example I will post a function that return the counting for a specific term in a specific month.
Anyway, here you are:
function set_cont_taxonomy_term_for_months($taxonomy = 'category', $query_args = '')  {
  $defaults = array(
    'posts_per_page' => -1,
  );
  $args = wp_parse_args($query_args, $defaults);
  $query =  new WP_Query( $args );

  $output = array();

  if ( $query->have_posts() ) : while( $query->have_posts() ) :  $query->the_post();
    $terms =  wp_get_object_terms( get_the_ID(), $taxonomy, array('fields' => 'ids') );
    if ( is_array($terms) && ! empty($terms) ) {
      global $post;
      $year = (int) substr($post->post_date, 4, 0);
      $month = (int) substr($post->post_date, 5, 2);
      if ( ! isset($output[$year]) ) $output[$year] =  array();
      if ( ! isset($output[$year][$month]) ) $output[$year][$month] = array();
      foreach ( $terms as $term ) {
        $output[$year][$month][$term] = isset($output[$year][$month][$term]) ? $output[$year][$month][$term] + 1 : 1;
      }
    }
  endwhile;
  endif;
  wp_reset_postdata();
  return $output;
}

The output of this function is an array which an inner item is something like:
$output[2013][7][132] = 5

that is: in the July 2013 the term with ID 132 was used 5 times
Note that this assertion is valid 'in general' (for all posts) only if second argument of function is empty (as is by default) otherwise is valid only for posts responding to the query args array passed as second param to function.
Now, you can use the array generated by this function with this other one:
function get_month_term_count($term_id = 0,  $year = '', $month = '', $taxonomy = 'category', $query_args = array() ) {
   if ( ! $term_id ) return 0;
   if ( ! $year ) $year = (int)date('Y');
   if ( ! $month ) $year = (int)date('n');
   $count = (array) set_cont_taxonomy_term_for_months( $taxonomy, $query_args );
   return ( empty($count) || ! isset($count[$year][$month][$termid]) ) ? 0 : $count[$year][$month][$termid];
}

The output of this function is a number, that is the counting for a given term id in a given month for a given query posts.
Use it is a lot easier than explain:
Following code shows how many times category with id '3' is used in posts of current month:
$cat = get_term(3);
$today = getdate();
$m = ($today["year"] * 100 ) + $today["mon"];
$count = get_month_term_count( 3, $today['year'], $today['mon'], 'category', array('m' =>$m) );
sprintf( __('In current month category %s is used %d times.'), $cat->name, $count);

As I previous said, the data generated by the set_cont_taxonomy_term_for_months are very rich, as example, following code shows tag counting in all the months of current year:
$today = getdate();
$count = set_cont_taxonomy_term_for_months( 'post_tag', array('year' => $today["year"] ) );

if ( ! empty($count) ) {
  foreach ( $count as $year => $year_array ) {
    echo '
' __('Year: ') . $year '
';
    foreach ( $year_array as $month => $month_array ) {
      echo '
';
      _e('Month ') . date_i18n( "F", mktime(0, 0, 0, $month, 1, $year ) );
      echo '
';
      echo '
';
      foreach ( $month_array as $tag_id => $count ) {
        $tag = get_term($tag_id);
        if ( ! is_wp_error($tag) && ! empty($tag) ) {
           printf( __('
Tag %s used %d times
'), $tag->name, $count );
        }
      }
      echo '
';
    }
  }
}

If you have a lot of posts, doing 3 nested foreach cycles will slow down the script, so try to use the function set_cont_taxonomy_term_for_months passing $query_args as selective as possible and, if you can, write functions to return desired informations without perform cycles, just like I do with with get_month_term_count function.
Hope it helps.
Edit:
I have changed the 3 nested loops in my last example, now it should works.
Answer: One method you might want to research is wp_get_archives
http://codex.wordpress.org/Function_Reference/wp_get_archives
You might also be able to use the_date() to sort out posts in a given month.
http://codex.wordpress.org/Function_Reference/the_date
I would try to find a function that can store results in an array, and then use count() on the array to learn it's contents...
Good luck!


Tofu character on Workbench

Question: Everything else is OK, but can not display right text on Popup and Menu.
Answer: This type of problems usually happen when you have invalid permissions on font files. The solution lies in detecting the font file and correcting its permission.
Since, Most of the font files reside in /usr/share/fonts, you can apply a generic fix on them.
First make root the owner of all files and dirs in /usr/share/fonts/
sudo chown -R root:root /usr/share/fonts -v

Then change all folders visitable by fixing permissions on them
find /usr/share/fonts -type d -exec sudo chmod -v 755 {} +

Then use this command to fix permissions on font files.
find /usr/share/fonts -iname '*.[ot]tf' -type f -exec sudo chmod -v 644 {} +

This command lists all files with .ttf and .otf extension and change the permissions of them to 644, required permission bits for fonts.
You can use this command to change all files permissions to 644.
sudo chmod -R a+rX /usr/share/fonts

Comment: It might also be useful to assure that all find files are owned by root: `sudo chown -R root:root /usr/share/fonts`
Comment: updated the answer
Comment: I also noticed that the first `find` may fail to discover some files if they're inside unreadable or untraversable directories, yet those are only fixed in the second `find` command.
Comment: @DavidFoerster I had same suspicion, but In my test, with `sudo` order doesn't matter
Comment: `find` doesn't run with super-user privileges the way you wrote it so it couldn't find files inside directories without read and traversal permissions for the executing user. While `chmod` runs with super-user privileges it only acts on the files provided by `find`.

Tofu character on Workbench


How some broker make revenue without collecting commission?

Question: I am stock Broker who helps other stock investor by selling and buying their stocks with an exchange some amount of commission (like 5% on their profit). But I don't understand how other stock Broker like eToro who don't take commission or stock trading service charge and also make huge revenue at end of the Day. Suggest me some alternative method for making revenue without charging any commission to the stock investor ....
Comment: Related: [How can stockbrokers be so cheap in the U.S.?](https://money.stackexchange.com/q/135000), [Why can Robinhood offer trading without commissions?](https://money.stackexchange.com/q/54675)
Answer: No commission brokers like Fidelity, Schwab, Vanguard, etc. make billions of dollars per year from investors. They make money from:

Net interest income

Mutual fund and ETF service fees

Advice solutions

Sale of annuities

Payment for order flow

Managed money
Answer: Most "free" brokers live on payment for order flow. The market makers paying the broker in turn live of the bid-ask-spread. In the end, you are paying the bid-ask-spread, so free really needs to be in quotes.
Answer: Your savings, as an investor, are not always "invested." So the brokers "lock" your uninvested money and put it in a brokerage subsidiary or reinvest it on its own terms on cash sweep accounts. However, the broker pays you some interest in return, of course.
In this way, you will, at least, gain some money interest then let your account sit still. Here's how they benefit: At present, Charles Schwab pays less than 0.1% of interest rates on cash sweeping accounts and invests it at about 2.5%, which pockets the gaps.
or
These firms no longer charge fees, but they don't earn revenue from the stock transactions. Notice that on various brokers, payment for the order flow can vary.
Basically, such brokers receive payments to deliver buy and sell orders to their clients to algorithmic trading companies. These computerized trading companies align customers with their own selling orders.
Comment: Did you mean to say that they *do* earn fees from stock transactions?
Comment: Well, they do not charge fees directly but get payed by a market maker. See my answer. In the end the customer is always paying ;)
Comment: Degiro charges you for uninvested funds because the best available places for them to park it have negative interest rates. Not sure they're making profit on that. Maybe they charge a spread.


Is it a good idea to practice on a raspberry Pi serve

Question: I'm sixteen years old and I would like to be a system administrator or penetration tester don't know which yet. Should I buy Enterprise server level equipment or will starting out with a raspberry Pi be fine?
Using fedora server edition.
Answer: TL/DR: Start with the hardware you have, use something like virtualbox to allow you to create virtual machines to learn with and buy extra gear as you require it.
Enterprise level servers and equipment can be very expensive, especially for someone sixteen years old. Most of what enterprise level stuff gives you is power and support and sometimes specialist feature sets - none of which you really need when you are learning.
The most important thing to get started with when learning to become a sysadmin is to get to know the systems you want to work with - normally linux or windows. You can learn the fundamentals both of these on almost any computer, including virtual machines or a raspberry pi. There is no need to buy anything specially for this.
I would recommend starting with virtualbox which will allow you to easily create and run virtual machines on either a windows, mac or linux host. From there you can learn to install, use and configure various systems and software in ways similar to how productions things might be setup. You can even create networks of vms to simulate real world setups - if your host is powerful enough to run multiple vms.
You can do quite a lot on a raspberry pi, so it might be worth getting one if you don't already have one - but it runs an embedded linux which is a little different from normal distros but can be a fun/interesting way to learn some things but I would also get use to creating virtual machines as there is stuff you can do on them that is harder or different on a raspberry pi. That said there is also stuff you can do on a raspberry pi that you cannot do in virtual machines - mostly due to its gpio pins.
As for other hardware you should buy it as you require/want it. You can learn a lot about being a sysadmin without ever needing to buy something particular for it.
Comment: Thank you for your detailed answer!  I plan on setting up the raspberry Pi as a server. I use virtual box on my Mac to run Fedora server, Ubuntu, and a recently installed Kali Linux. You're right about Enterprise level equipment being too expensive since I don't have a car yet. I have about four different books on Linux but I feel like it can't hurt to know a little bit more about windows.
Comment: It's not really embedded Linux. It's far far closer to Debian than to a QNAP, for example.
Answer: From an administration standpoint running on a low power virtual machine or on a credit card computer is an excellent way to learn about how to administer Linux. Especially since Raspbian closely mirrors Debian which is actually used on many servers. Other distributions like you mentioned Fedora also work.
You can easily run web servers off of the rpi and learn how to configure them as well as install server applications based on php, python, node, etc.
Some features typical of enterprise environments like network management and virtualization can be tricky on an rpi. But you can still easily use LXC containers and install things like libvirt just to get familiar with what they look like.
Most database software like postgres should run fine for prototyping purposes.
In large part "enterprise hardware" doesn't mean anything special except that its well supported by the manufacture. What is a big shift from learning to professional is that your workplace will have many working parts; an enterprise environment that you'll need to be able to get familiar with quickly.
That means being familiar with a lot of different technologies and specifically all the popular ones.
For virtualization theres: VMware, hyperv, xen, KVM and LXC. and only the last 2 will really be usable on rpi.
For databses theres mariadb, postgres, mysql, MS SQL, etc. All these are easily run on rpi except the last one.
For webservers theres: nginx, apache, lighttpd, ISS. All of these would run great except the last one.
For application servers there's the following languages: Python, Perl, Java Node.js, PHP and .net. All of these can be run on the rpi.
You can see the common thread is that the rpi missing out on Microsoft server software and technologies. You will need to decide if thats important to you.
Comment: Okay I gotcha. I'm not too worried about microsoft stuff right now. Focusing on mastering the Linux command line. Some of the terminology used here is still flying over my head but as I progress in the book I'm starting to understand it more and more. Also googling helps.
Answer: No. It's probably one of the worst place to start learning sysadmin, you not only have to learn sysadmin but you also got to learn raspberry pi at the same time and cope with its limited computing power while being distracted by a bunch of unnecessary ports.
The best way to start learning sysadmin is a virtual machine. You can install a free virtual machine hypervisor like Virtualbox and install a server OS into the VM there. A VM installed with a server OS is essentially identical to VPS hosting.
Most enterprises nowadays runs on cloud system, which runs on virtual machines. If you want to learn about the enterprise grade capabilities that you can't do easily with virtual machines at home, I'd suggest signing up for an account at a cloud commuting provider like Amazon AWS or Google Cloud. They start off really cheap and they have some free quota which should be sufficient for learning purposes.
Additionally, as a sysadmin you're likely also going to have to know a bit about domain management. You may want to buy a domain name and learn about DNS management.
Answer: Personally I will follow this path
a)Start to read a lot of sysadmin books,from simple
talking about vim,networking,x11..to complex about postfix,oracle db,sql,ldap,dns..etc
You can find on ebay those book,they are not expensive
b)Take some certifications: lpic2,rhcsa,better lpic3 and rhce(are not easy..but not impossible after 1-2 years of study).
c)If possible buy a cheapest server like old Hp Microserver(avoid the model with Celeron..is ultra-slow!),here you can run a lot of vm(with 16GB of ram you can run 10-12 linux vm) and test services like ftp,dns,networking,etc
d)Find a job as sysadmin,you can start from junior level and become senior or why not..an architect some day.
Good luck!
Comment: Thanks! I already have some books on Linux but I'll follow your suggestion and buy some books on sysadmining specifically on eBay.
Comment: Since we're all doing opinions, I personally see very little benefit in certifications. Sadly, more and more often I see people learning how to pass the exams instead of learning how to administer systems.


How do you know when to split an object method into 2 or more other methods?

Question: I know this is a very basic question, but I sometimes find myself struggling to figure out when to split a single object method into multiple methods.  For example, I am trying to set up an ACL using Zend_Acl and Zend_Auth, as shown in this tutorial: http://devzone.zend.com/article/1665.  However, I am wondering if the My_Plugin_Auth::preDispatch() method should invoke calls to a method called authenticate() and a method called authorize(), instead of having everything lumped in under preDispatch().  I was thinking that this would make the code more readable and encapsulate the logic into its smaller parts, but i'm not sure if this is reason enough.
Comment: You've hit the nail on the head - as long as the code makes more sense in separate functions, do it. It will help you in the long run.
Comment: Does it matter what order authenticate or authorize are called in? If so then it can be valid to use a function to call both functions in the required sequence.
Comment: Just ship the fkn thing.
Comment: i highly recommend you read the book 'Code Complete'. Second do look up on 'Cohesion and Coupling' in terms of software
Answer: Without having read the article in question, certainly you should avoid multiplexing functionality in methods - authentication and authorization are very different things.
So on that basis alone, there's good reason.

his would make the code more readable ...not sure if this is reason enough.

As I've been spending years telling people, we do not write code for computers to understand - we write code for people to understand. So if splitting it into more methods make it easier to unerstand, then its a good idea.
Comment: Indeed. Computers understand even the weirdest crap. Humans don't.
Comment: Every function should tell a story. And a good story doesn't get into niggling details not germane to the main point of the story. Your character might tie his shoe, but you don't need to stop and tell the reader how he tied the shoe. That story is for a different level.
Comment: Adding extra comments for human comprehension is also a good idea. Comments add very little extra CPU time ;-).
Answer: From the top suggested book for programmers on Stack Overflow - https://stackoverflow.com/questions/1711/what-is-the-single-most-influential-book-every-programmer-should-read
Valid reasons to create a routine
Here are some that may be applicable to this case.

Reduce complexity
Avoid duplicate code
Support subclassing
Hide sequences - do the functions need to be called in a particular order?
To ensure all routines are small? NO

Another point mentioned elsewhere is that a function should "have strong, functional cohesion - doing one and only one thing and doing it well".
If the sequence matter
it may be worth creating a wrapper function that calls the two in the correct order. In an object oriented approach, create two separate functions for both the operations, make them private/protected and have a public method call the two in sequence. That way anyone using your class won't make the mistake of calling only one of the function or calling them in the wrong order.
Answer: I think it's a good idea to break up larger functions into logical components and from the names of your two methods it sounds very reasonable. Down the road you may need to be able to use that authorize method for something else without the call to authenticate and vice versa.  That being said taking it to an extreme can be a bad thing too so be sensible!
Comment: thx for the replies guys.  Yeah that's what I am constantly worried about, taking it to an extreme and perhaps breaking out a single method into too many methods, so i'm trying to figure out some sort of rule of thumb or general way to determine when it is the optimal situation to break up a method into smaller parts.
Answer: This is a concept that I learned in Structured Programming and still applies to Object Oriented Programming, as well. I have seen a lot of "Spaghetti Object Oriented Code", with methods that have a lots of lines...
Here are quick ideas of when to cut a single function/method into several:

Empirical 25 lines rule

If the code has more than 25 lines, because the programmer's mind, have difficult to understand more than that information.

Loop rule

When you a "loop", with an specific goal, and that code is very extended. By "loop", I mean "for", "foreach", "while", etc. A "for" with 3 lines of code may not require to be put in a separate method, but a "for" with 35 lines of code, means move it.
Source Example (C#):
before_blah();
for (int k=0; k < list.Count; k++) {
  for_blah_1(k)
  ...
  for_blah_42(k)
}
after_blah();

Dest Example (C#):
before_blah();
this.iterateitems(); // <-- for goes there
after_blah();

Conditional or Alternative rule

Similar, goes for conditional / alternative "blocks" like "if", "swith", "case", if some of the options is too extended, I make a single method for that option. There are times, that I even make a single method for each option, even if it not that large.
Source Example (C#):
switch (option) {
  case 0:
    blah_0_0();
  break;
  case 1:
    blah_1_0();
    ...
    blah_53_0();
  break;
} // switch

Dest Example (C#):
switch (option) {
  case 0:
    cancelItem();
  break;
  case 1:
    printItem();
  break;
} // switch

Functional Rule

By "functional", doesn't mean "function", but activity. If you have 3 or more consecutives lines of code, that share a common purpouse, you may want to make a
separate method.
Source Example (C#):
FileStream F = new FileStream();
F.Path = parameterPath;
F.Options = myOptions;
F.Reset();

do_something();

F.Close();

Dest Example (C#):
FileStream F = this.PrepareFileStream(parameterPath, myOptions);

do_something();

F.Close();

Of course, some of this guidelines are more subjective than logical.
Just my 2 cents...
Answer: Needing to reuse is an obvious reason. Readability is always beneficial, but I'm starting to use the theory of How much can I hold in my brain at one time? Break off a chunk of the code into another method and once you get it to work, you can forget about it. It helps me to focus.
Answer:
Is it so long that I can't view it without having to page through it?
Does it do more than one thing at a time?
Is it difficult to tell what it's doing?
Does it show signs of Cut-Copy-Paste Reuse?
Do I have a perfectly valid reason to refactor the method at this time, or should I be doing something else (like fixing a defect)?


SVM+HOG object detector

Question: I ran into a problem when training an SVM+HOG object detector, and this is what I did.
I put all the features in a list called features and used
X_scaler = StandardScaler().fit(features)
scaled_X = X_scaler.transform(features)
rand_state = np.random.randint(0, 100)
X_train, X_test, y_train, y_test = train_test_split(np.array(features), labels, test_size=0.3, random_state=rand_state)

According to sklearn.preprocessing.StandardScaler, this transformation in StandardScaler() is based on the mean and standard deviation of all the training samples. So here comes the question, if I want to test my trained SVM on only 1 newly seen sample, how can I apply the StandardScaler()? as I cannot calculate the mean and standard deviation from just 1 sample.
From my understanding, if I want to test the SVM on new data (not x_test), I need to follow the same procedure from training. Therefore, I tried to extract HOG features from multiple newly seen samples and append to another list called test_feature, then
X_scaler = StandardScaler().fit(test_feature)
scaled_X = X_scaler.transform(test_feature_feature)

seems to be working properly and the SVM produces correct output, but when len(test_feature) == 1, no matter I use StandardScaler() to transform test_feature or directly use y_pred = clf.predict(np.array(test_feature)), the output are all garbages.
Any comments?
Answer: Just simply call on transform. As you said, the standard scaler uses the training set's mean and standard deviation in transforming the data. The same mean and standard deviation that was already computed using the training set will be applied to the new data. There is no need to recalculate these parameters.
from sklearn.preprocessing import StandardScaler
data = [[0, 0], [0, 0], [1, 1], [1, 1]]
scaler = StandardScaler()
# calling fit will calculate the mean and std
print(scaler.fit(data))
# print out the calcualted mean for example
print(scaler.mean_)
# transform a new data point
print(scaler.transform([[2, 2]]))

Answer: You need to fit your StandardScaler() on the training data only otherwise your means and variances are going to be bias as they are computed using test data. Once this transformer is fitted, you can perform a transform() on your test data and new samples which will scale them according to the calculated mean and variances.
You should:

train_test_split()
fit() your StandardScaler() using train data
fit() your model using the transformed train set
transform() your test data
predict() transformed test data

As follows:
X_train, X_test, y_train, y_test = train_test_split(np.array(features), labels, test_size=0.3, random_state=rand_state)

scaler = StandardScaler()

X_train = scaler.fit_transform(X_train)

clf.fit(X_train, y_train)

X_test = scaler.transform(X_test)

clf.predict(X_train)

SVM+HOG object detector


Use of the word "collate"

Question: I just want to know if my sentence is correct using the word "collated".

Please see attached file for our Question bank collated during our meetings.

Is the message of the sentence correct?
If not, could you provide me with a better sentence?
Answer:
Please see the attached file for our Question bank which we collated during our meetings.

Firstly, I would add a the, because you are referring to a specific attachment.
Secondly, I would add which we, so you have a proper subject. Collated is now used as an adjective, but it seems to be referring to question bank, while you want to refer it to the attached file. By adding which we, you indicate that you (as a group, you could also use I if you did it by yourself), collated the information in the file.
You could also rephrase it altogether, I think this might be even clearer, the sentence at the start of my answer might be read as the question bank which we collated.

Please see the attached file which we, during our meetings, collated for our Question bank.

You could also say this, if the question bank was the only subject of your meetings (the emphasis is now less on the files being for your question bank). In this case, it might also be more natural to swap our for the:

Please see the attached file which we collated during (our / the) meetings for our Question bank.
Answer: collate means to collect and combine data, information, or texts.  See https://en.oxforddictionaries.com/definition/collate
The word occurs, as the examples suggest, in articles or papers describing a research process.  It is puzzling to me that you speak of collating occurring in meetings.  People meet to talk and interact; they don't meet to put together data or sort cards or put information in order, although perhaps they did.
Collating is what a copier does when it puts copies in order. At least that's the most common use today in American English, other than in research reports and in the description of computer programs that sort data.
My guess is that in these meetings, people discussed which questions to include in the Question bank, possibly providing lists of questions that were later assembled in a file (document); the document is now being passed out to people who attend these meetings.
So my guess is that "collate" is not the word you want.

Use of the word "collate"


Density function in phase space

Question: What does density function in phase space physically mean? How does it indicate,  the more familiar density that we are accustomed to ( an analogy may be), in phase space?
Answer: It is a probability density, not a density of something like matter or energy.
The probability density $f$ answers the question "how likely is it (what is the probability that) the microstate $\omega$ in one of the points in some set $A$":
$$P(\omega\in A) = \int_A f(p,q)dpdq$$
The most other famous example of probability density in physics is the squared modulus of the wave function $\psi$,  $|\psi(x)|^2$ being the probability density of finding the particle at point $x$. Another example is Brownian motion of a single particle.
Answer: If you integrate out the momentum variables, then you get the usual density as a function of just position. Let's say there are N particles each with mass $m$ so total mass $Nm$.
$$
\int d^3p d^3x \; \; \rho_{phase} (x,p) = Nm\\
\int d^3p \; \; \rho_{phase} (x,p) = \rho (x)\\
$$
So the phase space density is giving more refined information. Careful that the units are different. For example, $\rho$ has units mass per volume, but $\rho_{phase}$ has units like $kg/(m kg m/s)^3$

Density function in phase space


Force of impact the same regardless of which object is moving?

Question: My friend is trying to tell me the force of an impact of riding a bicycle into a stationary car at a speed $v$ will be the same force as if the car is traveling at the same speed $v$ and drives into a stationary bicycle? I don't see how this makes any sense. Can you tell me if this is a true statement? I would imagine you would get much more force if the car drove into the bicycle rather then the bicycle into the car even though they are both going the same speed.
Comment: The wording suggests a two-body problem, but a real collision with two vehicles also includes the road: Earth, a massive stationary third body.
Answer: Your friend is correct. If a bicycle of mass $m$ travelling with speed $v$ runs into a stationary car of mass $M$ then its speed  changes to 0 (assuming $m<<M$) and the change in momentum, the impulse, is $mv$. This can also be thought of as the average force times the time of the collision.   If the car has speed $v$ and the bicycle is stationary then after the collision the bicycle has speed $v$, momentum $mv$, so the impulse and the average force are the same.
Which is counter-intuitive. As a cyclist I know I'd rather hit a car than be hit by a car, if I had to do one or the other. The difference is that after the first collision I and my mangled bicycle are at rest on the road, whereas after the second I'm traveling at speed, I'm going to fall off into the road and sustain further injures, possibly including going under the wheels of the car.
Comment: Of course, the situation of the bike hitting the car is not actually equal to the car hitting the bike.  In the real world, the bike would stop quickly after hitting the car, whereas the car would tend to keep rolling after hitting the bike.  When the car hits the bike, there is a high probability that the bicyclist will get run over by the car.
Answer: The change in momentum is the impulse $\int_{\rm collision} F\,dt$ and this will be the same for all situations as will the variation with time of the force of interaction between the car and the bicycle.
Let the mass of the car be $M$ and the mass of the bicycle (and rider?) be $m$ and assume that initial speed of the car (Case 1) and the bicycle (Case 2) be $v$ with the other vehicle initially at rest.
Further assume that before the collision the stationary vehicle do not have the brakes on and after the collision the car and the bicycle move off together.
Case 1 - car moving
Using conservation of momentum the final speed of the two vehicles is $\dfrac{Mv}{M+m}$, the change in momentum of the bicycle is $\dfrac{mMv}{M+m}$ and the decrease in kinetic energy of the system (car and bicycle) is $\dfrac12\dfrac{mM}{M+m}v^2$.
Case 2 - bicycle moving
Using conservation of momentum the final speed of the two vehicles is $\dfrac{mv}{M+m}$, the change in momentum of the bicycle is $\dfrac{mMv}{M+m}$ and the decrease in kinetic energy of the system (car and bicycle) is $\dfrac12\dfrac{mM}{M+m}v^2$.
Note that the change in momentum of the bicycle and the loss of kinetic energy is the same in both cases.
What does all this tell us?
Well you could analyse a Case 3 where both the car and the bicycle are moving but their relative speed of approach is $v$ to find that the change of momentum of the bicycle and the kinetic energy loss is the same as before.
A good way of analysing such a situation is to jump into the centre of mass system (car and bicycle)
In the centre of mass frame the velocity of the car will be $\dfrac{mv}{M+m}$ and the velocity of the bicycle will be $\dfrac{Mv}{M+m}$ in the opposite direction to that of the car irrespective of the initial velocities of the car and the bicycle as long as their relative velocity of approach is $v$.
This is a good example of Newton's first law in action.
In case 1 with the car moving you could say that the frame of reference is the bicycle, in case 2 the frame of reference is the car and in case 3 the frame of reference is the Earth or the centre of mass of the system and all of these frames of reference are inertial.

In the real world the collision between a car and a bicycle would have many phases and not just be a two body interaction.
Answer: The force of impact is not dependent on the change in speed (i.e., a bike crashing into a car with some initial speed having zero speed after the crash) but rather on the change in momentum. Change in momentum of an object is given by the product of its mass and its change in speed, so because a car has much more mass than a bike, the change in speed will be much less to produce the same change in momentum as a bike at a high speed. Thus, a car traveling at some speed would have a higher impact force than a bike at the same speed.
Comment: How does this address the original question?
Comment: OP is asking about the difference in force of impact between a car and a bike. I try to explain that the force of impact is dependent on the change in momentum and is therefore significantly affected by the mass, contrary to the friend's statement. Edited to be a bit more conclusive.
Comment: Are there two collisions: a car-bike collision and a car-car collision?
Comment: That is how I interpreted the question. If I misinterpreted it I welcome the OP to correct me.
Answer: Consider the single head-on collision between a car and a bicycle, seen and studied by two observers. The bicycle (with rider) and car remain locked together after the collision.
One observer, (A), is using the frame of reference of the car as it is just before the collision;  to him, the car is at rest and the bicycle comes up and smashes into the car. If the car can roll freely, the combined wreckage will roll off slowly.
Another observer, (B), uses the frame of reference of the bicycle as it is just before the collision; to him, the bicycle is standing still, and the car comes up and smashes into the bicycle. The cycle is scooped up and carried off by the car, which slows slightly.
Each observer comes complete with video and sound recorders.
They will certainly disagree as to the initial and final velocities of the various pieces of debris after the collision;  that's why different frames of reference are, well, different.
But they certainly will record the same level of damage to the car, bike and, sadly, rider.  There's only one collision.  The rider can't be slightly bruised as seen by B and mangled as seen by A. The forces must be the same for both observers.
And most importantly, none of this will change if A also observes the fact that the ground is at rest in his frame, or B observes this, or neither one of them observes this.  After all, an observer using the ground frame of reference may see a bike racing down the highway and being hit from in front (or even behind) by the car...


Why do some packages require their own user to run?

Question: Why in SVN, Apache, and many other programs, does the admin have to create a new user just for the server to use?
Comment: I edited your question to be more clear; but I fear I may have misunderstood your meaning entirely.  Please clarify... if my edits were incorrect, I apologize, and hope you'll re-word your question to be more clear.
Answer: If I understand your question properly, you're asking why must an svn user be created for svn, and a www-data user created for apache, etc.  Correct?
The reason is for security.  The basic concept at play is called "isolation," and is a common practice.  The main basic idea is that if each service runs as its own user, then if there is ever a security flaw or bug discovered in the program, the flaw would only be exploitable to the extent allowed by that user.
For example, suppose someobody figured out how to hack into SVN and delete all of your files. (This is not a real security flaw, and likely never will be, but just assume, for the sake of argument)...  If you ran the SVN service as the 'root' user, then this theoretical hacker could start deleting all of your files.  If, on the other hand, SVN requires its own user, then this theoretical hacker can only delete the files owned by the SVN user.
I hope this addresses your question... if not, please clarify, and I'll try again.

EDIT: To answer your comment...
It is usually/always possible to run any program as root.  But it is usually inadvisable to do so, except when actually necessary.  A very common approach to this sort of thing is to run every program with the least amount of permission necessary.  This can also help prevent a bug in a program from inadvertently causing problems with other programs (another reason for security isolation, which I did not mention earlier).
However, there are times when a program must run as root, because it simply cannot do what it needs to do any other way.  Some common tasks that require root privileges, and would thus be justification for not running as a separate user:

Accessing the system password database
Binding to (listening on) a privileged TCP port (i.e. ports 1-1023)
Interacting with the filesystem or certain hardware devices at a low level

Even within these (and other) categories, there are often ways to get around having to run as root.  For instance, many network programs (Apache for instance) will start as the root user, then bind to port 80, then change users to www-data for the rest of its execution. So even when there are specific cases that require root access, often measures are taken to get around that requirement so that the process can run as a less-privileged user.
Comment: great answer!Can you please give example of programs that on linux that not use thier own user?
Comment: Well, technically many of those things can also be done using capabilities (CAP_NET_BIND_SERVICE, CAP_SYS_RAWIO and such).
Answer: Because the authors of those programs choose to use separate user databases rather than using the system password database.
One reason why that is sometimes done is if the program needs to have access to the plaintext version of the password, perhaps because it is implementing a network protocol which requires that, as there is no way to access the plaintext passwords for system users as they are only held in hashed form.
That is true for example with apache, and by extension for svn when it is using HTTP basic authentication, as HTTP basic authentication requires access to the plaintext passwords.
Comment: This has nothing to do with the question!
Comment: Can you please write examples - its hard to me understand because I am not linux expert - I am linux intermediate level user (I am web programmer).
Comment: Having to implement HTTP basic authentication _is_ an example of why it may be necessary to have a separate user database.
Comment: Well it doesn't now the question has been edited @BloodPhilia... The original question was very unclear and could be read either way.
Comment: In TomH's defense, the original question was difficult to understand, and he answered the question before it was edited.


Shapes of ROC curves for different classifiers ('steppy' for SVM and smooth for k-NN)

Question: When constructing the ROC curve for various classifiers I've noticed that their actual shapes tend to be very different for models such as logistic regression or SVM compared to k-NN. For instance, in the image below we see a ROC curve that corresponds to a k-NN classifier, and as it can be seen there are hardly any 'steps' or jumps, if any at all, hence being quite smooth. On the other hand, if we observe the ROC curve that I obtain for the SVM model the steps are definitely more abundant. I've tried this for various datasets, and steps or jumps always seem to be absent in the case of the ROC curve for k-NN in scikit-learn; I don't know if R does this as well. Does anybody know why the ROC curve for k-NN might adopt this specific shape, whereas the ones for SVM or LR involve noticeably more steps? Thanks a lot in advance.
Comment: @MatthewDrury Piecewise linearity can happen, depending on how you deal with ties.
Comment: @MatthewDrury These ROC curves are being created on scikit-learn, and for the k-NN one $k=9$ and $p=1$. Conversely, for SVM $\gamma=0.1$ and $C=2^{-5}$. And it definitely can happen, as I said, I've verified this with multiple datasets. Also, if you have a look at this link that I found on the internet, they seem to obtain a similar ROC curve shape for k-NN as me: http://www.stat.washington.edu/courses/stat391/spring13/_images/hw8_roc_1.png,
Comment: How are you creating these ROC curves?  Really every ROC curve should look like your second example: it must make discrete jumps as new data points become classified as being members of the positive class.  It really can't happen that an ROC curve is piecewise linear, as in the first example.
Comment: ....Thinking....
Answer: Diagonal lines occur in ROC curves when you have ties, that is when you have one or more observation with the exact same test value in both the positive and negative groups.
SVM classifiers output continuous probabilities. The chance to get a tie is normally very low. This is why you get a "steppy" curve.
On the other hand, due to the limited number of observations that make a k-NN decision, the output probabilities are typically not continuous. For instance if you considered a k-NN classifier with k = 3, probabilities can only be 1.0, 0.67, 0.33, 0. It is very likely that you observe these values in both groups, hence the tie and the diagonal line.
Comment: Minor note: SVM does not naturally yield a probability for predictions but a signed distance from the separating hyperplane. Subsequent methods like Platt scaling can enforce a probability, but is secondary to the SVM itself.
Comment: That's an extremely helpful response, and it makes complete sense! My k-NN currently uses $k=9$ and $p=1$, that is, Manhattan distance, but I guess the principle that you have laid out applies to my model too. Furthermore, for my test set I only have 13 1s out of 88 outcomes, which is a very small fraction compared to the 0s. Therefore, this might be influence this as well. Do you know of any book or reference which seem to mention your explanation? Also, whenever a ROC curve has a lot of steps, this implies that a lot of thresholds can be fixed, right? Again, amazing explanation.
Comment: I usually like to point to Fawcett's really good "Introduction to ROC analysis" http://cvrr.ucsd.edu/ece285/papers/Fawcett_IntroductionToROC.pdf . See figure 6 for this specific case.
Comment: I would just add to the explanation that some variants of roc conventionally wrap a hull around the steps and compare the area under that curve instead of the step curve. So if all your curves are piecewise linear in some software, that might be the reason.


Freemember form jumps to top on inline_errors

Question: I have a freemember registration form that is working. However my form is at the bottom of the page. When inline errors are triggered, my form jumps to the top of the page, instead of the top of the form or error.
Answer: One way to solve (work around) this is to use some jQuery to check for the presence of errors in your form and then scroll to them if there are any.
if ($('.error').length > 0) {
    $('html, body').animate({
        scrollTop: $('.error').first().offset().top
    }, 2000);
}

Or to insert a notice at the top of the page prompting the user to scroll down and check for errors in their form.
if ($('.error').length > 0) {
    $('h1').after('
There were errors with your submission. Please see below.
');
}

This example assumes you set the Freemember error handling to inline and your error delimiters use the class .error (see the docs).


Overlay Analysis of US Yield Curve

Question: Let's define the US yield curve as the O/N fed funds rate, then the on the run 2/3/5/7/10/20/30y us treasury notes and bonds, represented by their yield to maturity as of today T.
What I am trying to do is find a point in time in the past when the yield curve YC(t < T) most "resembles" YC(T). I realize that this is a subjective definition, so I am trying to figure out if there is a usually accepted method?
I suppose I could define a measure such as YC_Diff(YC(Ti), YC(Tj)) which measures the YTM deviations (like sum of squares of YTM differences, maybe with weights). Then I could compute the measure for all historical dates available (excluding recent history as this is the most likely match) and return T* such that YC_Diff(YC(T), YC(T*) is the min value across the entire data set?
Are there more advanced techniques to match a shape of a curve?
Comment: This sounds very similar to work done by Brody & Hughston a while back, see: https://www.jstor.org/stable/3067288
Answer: What you suggesting amounts to applying a topology to a space which contains yield curves. The suggested approach which is basically applying the $l_2$ norm seems pretty reasonable, as perhaps would be applying the $l_1$ norm, where the distance between two curves is the sum of the absolute values of their differences.
I would add that depending upon precisely what you are doing you might not care about the overall level of rates but, instead, the shape of the curve, i.e where the term structure is relative to its start.
In which case your distance metric, here lets use $l_1$, is amended such that instead of:
$$ D(C_1, C_2) = \sum_{i}^n |C_{1,i} - C_{2,i}| $$
you allow any curve to be shifted in parallel by $\epsilon$ to match the shape of the other:
$$ D(C_1, C_2) = \min_\epsilon \sum_{i}^n |C_{1,i}-C_{2,i}+\epsilon|$$
I will state without proof that $\epsilon$ is probably equal to:
$$\epsilon = \frac{1}{n} \sum_{i=1}^n C_{2,i} - C_{1,i}$$
which makes this quite efficient to calculate rather than solving an optimisation for each date. Taking squares ($l_2$ norm) probably makes this harder, I don't know for sure as I've never investigated.
Comment: How about defining the shape of the curve as CT,i / CT,1 (i=1 to N) i.e. normalizing rates by the level of the shortest maturity?
Comment: Sure that's an idea, but it's not the same as the above and won't give the same results. Valid, though, depending upon your scenario. You could even have two parameters but then the minimisation becomes a multi-param solver and a bit harder.

Overlay Analysis of US Yield Curve


Backup Mongodb on EC2 through EBS snapshots - timing issue

Question: I'm following this guidance
http://docs.mongodb.org/ecosystem/tutorial/backup-and-restore-mongodb-on-amazon-ec2/
I have 4 EBS 1000 IOPS volumes assigned to instance.
These 4 volumes through MDADM assembled into software RAID10 array.
I want to do backups through EBS Snapshots as explained in the article above.
Question:
Mongodb says - that I need to
mongo shell>db.runCommand({fsync:1,lock:1}); -- this will lock the db for writing

....run snapshot creation...
mongo shell> db.$cmd.sys.unlock.findOne(); -- this will unlock the db for writing

So, do I need to unlock the DB for writing after I issued the command ec2-create-snapshot or after it's finished and the actual snapshot is created?
thanks,
Dmitry
Answer:
do I need to unlock the DB for writing after I issued the comand ec2-create-snapshot or after it's finished and the actual snapshot is created

once the ec2-create-snapshot api cmd returns (with the snap-id), you are good to unlock for writing.  However, you may see slightly degraded performance until snap is finished.
Amazon sends new writes during the snapshot creation time to temp storage, and this can be slower. Once snap is complete things converge.  Keep in mind, the first ebs volume snap will take a while, but then the following snaps are incremental backups, and will finish much faster.


What can we do to encourage more "Chen derivation" questions?

Question: In many of their podcasts, the founders of Stack Exchange have made comments that the secret to having a successful site is in attracting expert level participation. They noted that in-depth, detailed questions were a key part of that. I believe that the question about the derivation of the Chen Formula very much fits this category of questions. But we need more of them. How an we get them?
Comment: I did answer one chen formula and it go not votes  http://poker.stackexchange.com/questions/1045/the-right-bluff-frequency/6690#6690
Answer: The problem is that there is not enough traffic coming through the site at the moment.
All we can do is try and promote the site as much as possible to get more traffic on here.
Once there is more traffic more questions will come and more experts will be on hand to answer the questions.
Not really sure how to drive people to the site other than talking about it constantly at the tables or with any poker groups/ forums you are involved in.
Comment: Just having more people isn't enough though. I'm concerned that there might not be enough portion of interesting questions being asked for the expert-level players to be interested. Without them being interested, even a lot of traffic is going to result in a less-than-stellar site. I myself go through periods where the overall simplicity of the questions we do get makes me less motivated to return regularly.
Answer: I have some expertise in SEO, and can say that talking about PokerSE on the forums is not an only way of getting more traffic.
The most efficient is asking some "mass" questions. That means: interesting to mass of people and formulated using optimal key words from search engine point of view.
For example this question:
Poker Rooms Comparison
It is now on the 2nd page of Google output by term "poker rooms comparison".
And it will tend to get the 1st place in several months or so. And many new people will come. Because SE sites are extremely trusted and privileged by Google and because of their search engine optimized structure.
Yes, this is not solving a question of getting more PRO into poker stackexchange, but at least we will get more traffic.
Update:
Another issue is that poker community is very conservative. Experienced players got used to the forums where they "live" nowadays, and it is difficult to lure them out. For example 2+2 forums, or Gipsyteam (for CIS players).
Answer: I would agree that this seems to be becoming a rather large problem. The traffic on the site is pretty low but the percentage of the questions that I am interested in looking at is pretty low. I would describe myself as an intermediate player so for players more advanced than me it I imagine there is very few posts that would be of interest.
I think that another problem is that there does tend to be low level questions but there are also lots of low level answers and comments. I have seen questions where somebody is asking about what to do in a certain spot and they get responses such as "It depends." Obviously that is true but it is hardly helpful and comments/answers such as this really clog up the site. There also sometimes seems as if there is a prejudice towards in depth analysis and especially mathematical analysis. I have seems comments such as "the maths isn't all that important" or "if you use math your play becomes predictable".
Now I realise that I have just written a few complaints about the site but I think these things really discourage advanced level users from using the site, so I think that one possible solution is to try to aggressively  oppose these comments and answers (I don't mean in an aggressive tone but just as much as possible) as much as possible. If this is coupled along with an increase in traffic then hopefully the site will go somewhere.
I really like the stack exchange format and really hope that this site can be successful but at the moment I think that it is really stalling.
Also I think that we need to get LaTex!


If someone was making software, able to display content in any written language, what would they have to consider?

Question: I know you'd have to use Unicode.  And that Japanese is read vertically and reverse of English.  What are some of the things one would have to take into consideration?
Comment: Actually Japanese also has left to right as a standard reading direction - they are flexible that way :) But there are languages that are right to left - which is fun when you consider your screen co-ords are XY origin usually either upper left or lower left...
Answer: What you are asking about is referred to as internationalization (i18n). You would have to consider UI layout to allow text from different languages to fit properly and to allow controls to dynamically shift positions to make room for this text.
You would also have to account for locale-specific date and currency formats.
If your application requires a database, you would have to ensure that data is stored in Unicode.
Answer: OMG Ponies!!! (Aka Humanity: Epic Fail) has some interesting examples of numbers, languages, and time challenges that have been encountered with computers if you want some major headaches in these areas.  Vimeo link, if you want the video version.
Answer: Some languages (Hebrew and Arabic) are read right to left.  Also, if you are including the localized display of Dates then you need to accommodate locale-specific date formats (m/d/y vs d/m/y) and abbreviations (Oct vs Okt).  If you are showing localized time anywhere then you will need to tackle the Time Zone beast as well.
Comment: Not to mention localized number formatting, etc etc... Germanic (and other) languages use a comma instead of a decimal for currency, doubles and floats, for instance.
Answer: Before you start with vertical languages like (some of) Japanese scripts, I would look at Right-to-Left issues. Once you understand them, you are somewhat prepared to tackle other writing systems.
A good example of issues related to RTL handling is available from W3C. They mostly talk about it in the context of HTML, but the core issues are there.
You especially need to deep-dive into these issues if you expect to mix languages (e.g. Arabic content mixed in with English).
Answer: Not all languages have the notion of uppercase and lowercase, and of those that do it's not always a 1:1 mapping, and you can't always make a round trip with the conversion.
This page, from unicode.org, has some interesting information on the subject, including this:

For example, both a sigma and a final sigma uppercase to a capital sigma


Colpitts oscillator bypass capacitors importance

Question: A Colpitts oscillator makes use of the common emitter configuration, and the
indicated amplifier configuration is known to be a linear circuit. How come do we call the
stated oscillator a nonlinear circuit? How would removal of the emitter bypass capacitor
in the common emitter configuration hurt the whole oscillator?
Comment: A colpitts oscillator can be common-emitter, common-collector or common-base. I think you need to post a picture of what you are talking about especially the bit about the emitter capacitor.
Comment: *How would removal of the emitter bypass capacitor...* **Think**, what does the capacitor "bypass", DC signals and/or AC signals? Low/high frequencies? How does a common emitter amplifier with a bypass capacitor behave (what gain, bandwidth etc..) and how would it behave if that capacitor was removed? *A Colpitts oscillator makes use of the common emitter configuration* I can design a Colpitts oscillator **without** using any common emitter circuit!
Comment: Maybe [this link](http://www.stades.co.uk/Colpitts%20CE/Colpitts%20Oscillator.html) might help you understand what you want?
Answer: Question: "How come do we call the stated oscillator a nonlinear circuit?"
Each oscillator is and must be - per definition - a non-linear circuit. This is because for a safe start of oscillation the closed-loop pole pair must be in the right half of the s-plane (loop gain >1). As a consequence, the oscillation amplitudes continuously are growing until a non-linear effect within the feedback loop reduces the loop gain to unity.
(In reality and due to some delay in the feedback loop, the loop gain will slightly "swing" around the nominal value of "1" - and the pole pair will move slightly between the left and the right half of the s-plane).
This non-linear effect can be caused (a) by a simple limiting effect (fixed supply voltages) or (b) by a non-linear gain characteristics of the amplifier.


Creating a donor letter

Question: We are trying to find out if we enter a contribution in a donor record, are you able to create a donor letter from a constituent record in CiviCRM?
Answer: welcome to civicrm stackexchange.
You can generate receipts as PDF files to then print and post. You can do this via the Contact's 'contribution' record or via Find Contributions eg at
http://dmaster.demo.civicrm.org/civicrm/contribute/search?reset=1
if you tick a Contribution, then under Actions you can see both

Receipts - Print or Email
Thank you letters - Print or Email.

Pls add comments below, or embellish your question with more details if this doesn't answer your question.
You can read more about this in the Documentation
Also, in terms of StackExchange protocol, if an Answer is helpful, give it a +1, and if it gives you the Answer you need (ie you might get several answers) then 'accept' it.

Creating a donor letter


Dealing with weird connectors

Question: I recently got hold of an LED matrix that I would really like to use in a project. The problem I have is that it uses a 2mm (not 2.54mm) pitch pin header connection for which I can find no standard sockets close by. Making a pcb would be the next best option but by the time it gets fabbed and shipped my holidays will be over. Are there any secret tricks around that would allow me to solder this matrix onto veroboard?
Comment: The secret trick is to plan ahead and not wait for the last minute.
Answer: If I was in your situation I would probably solder ribbon cable or individual wires to each pin and run to the board.  Or etch my own PCB.
Comment: ditto etch your own PCB
Comment: Or, in a hurry, scalpel + copper-clad and whittle your own board.
Comment: Being able to etch or otherwise make pcb's is handy. You won't be dependent on some company and long shipping times for every little bit. Otherwise it's time for dead-bug or Manhattan or some other improvised method.
Answer: While you're probably way after your holidays, for anyone who stumbles upon this question - a fairly creative solution for dealing with 2mm rasters is to use a 2,5-to-3,5-inch HDD converter:

Note that this will only work on exposed pins, not with the shrouded connectors (unless it happens to be a 40-pin one).
Answer: I see that Newark has some 2mm pitch development boards.
They also have a couple of boards (such as the Vector 8018 and Vector 8028) that have a 0.1 inch pitch on the left and 2 mm pitch on the right side.
Answer: You probably decided by now, but 2mm pitch board to board connectors are really quite common.  Newark stock the following GCT sockets between 2-10 circuits in single row and dual row, both thru hole and SMT options, these are all vertical sockets.
Newark also stocks 1.27mm and 1.00mm pitch board to board sockets too.

Dealing with weird connectors