Which cloud server provider is best for accepting bitcoin payments with BTCPay Server?

Question: This video shows someone using lunanode for their BTCPayServer cloud server. What are the other top reputable and reliable cloud servers out there for running an online store that wants to act as its own payment processor via BTCPay?
Answer: Actually, it's my video :D
Lunanode provides easy "1 click install" process. You can host btcpay server on any other VPS server (like azure, aws, digitalocean etc.) but the process will be just a bit more complicated, and will require downloading and configuring btcpayserver.
As always any solution will have some tradeoffs, like cost or how easy it is to use, how reputable is the provider, etc.
All methods of hosting are presented in this document.
Comment: are you one of the developers behind btcpay server?
Comment: No, I am just an educator and content creator.
Comment: Can BtcPay Server be configured to receive payments at a .crypto or .eth domain address rather than the full-length wallet addresses?
Answer:
Which cloud server provider is best for accepting bitcoin payments with BTCPay Server?

None
I would prefer deployment on a Raspberry Pi instead of cloud(someone else's computer) for something related to bitcoin : https://docs.btcpayserver.org/RPi4/
Reasons: Privacy, Security and you can buy one for less than $100. Raspberry Pi 400 is built into a compact keyboard


SQL Server 2008 tempdb log

Question: my tempdb log is currently at:
Currently allocated space: 0,50 MB
Available free space: -25,95 MB (-5190%)
How can this be minus? What should I do?
Answer: It might just be that a particular reading for available space is wrong (and the rest of the database is healthy). I have seen negative values like this after certain admin operations such as detaching a DB and reattaching it without its original log (i.e. using sp_attach_single_file_db) though in most cases this sort of thing would not be done against tempdb.
One or more of the DBCC commands like DBCC UPDATEUSAGE may sort this if it is mealy an accounting discrepancy.
Also if the rest of your databases are fine (do check before proceeding, and verify you have good backups, in case the tempdb size misreporting is a symptom of a larger problem) then just try stop and restart the SQL services - I believe tempdb is recreated from scratch each time the services start.
See also the notes on this page about tempdb, specifically in relation to some tools misreporting the size (generally or after a shrink operation).

SQL Server 2008 tempdb log


Is this a case of overfitting?

Question: I am training a CNN-LSTM-FC network with around 1 Million parameters network for spatial time series prediction but the validation loss does not even come close to the training loss after 1-2 epochs. Is this a clear case of overfitting? Any inputs would be appreciated!
I am using keras with tensorflow backend.
Answer: To me it looks like a clear case of overfitting and perhaps the main reason is that your model is far too complex for the problem. In order to differentiate beween over and under fitting you can think about learning in the following way.
The data which is given as example (training data) contains the bahavior of the true model with some additional noise. You cannot make a clear difference between them. What you do when you want to learn is actually to try to approximate the true function with a model of any sort.
In this process you come with some learning biases: you assume some possible forms for the true function (each learning method assumes some types of functions which could be approximated) and also assume some type shape of the noise (also encoded in the model structure and it's parameters).
Here you could encounter two situations. If the model is not able to build an approximation by construction (consider tryingto fit a linear model to a sinusoidal shaped true function with noise, for example), then you will not be able to learn too much from training data and also the test data will have a similar error. This is because a less flexible model is very robust (at extrema you can fit a constant model for regression, the constant model will have most of the time similar error on train or test).
If your model is too flexible, than you can approximate your true function but also more than this, aka you incorporate also many errors from the training sample. That means you approximate too wel the training data (low error on training) and you will be most of the time far from test data (errors from test data are different than training data), thus you have high errors there.
Since nobody is able to differentiate the true function from noise, neither a learning model will not be able. Very often the first questions when you start to build models for a problem are related with how complex is my problem and how flexible is my model. Since you are talking about deep nets, having a milion of parameters is a lot (despite the general indecent hype around the topic, where adding milions of additional parameters and burning a lot of money with training is a happy activity). My 2cents:  start with simpler models, especially the ones which underfits, which can give you an idea about what kind of battle do you have to win.
Answer: I would rather say, that in your training, underfitting occurs, because the train values are much better, than the test values. This can occur, when your memory cells cannot store enough information, so maybe try to increase the units or nodes of your LSTM, so the loss can converge better.
Comment: It looks quite the opposite. When training error is far bettern then test errors you overfit

Is this a case of overfitting?


Overwrite resources

Question: Is it possible to overwrite resource from your app?
If so, how can I get the path to pass to the OutputStream?
I tried something like:
<code>FileOutputStream("/data/data/com.myapp.test/res/drawable/image.png");
</code>
but I get a file not found.
Thanks
Answer: Resources cannot be overwritten. You could, however, check to see if you have an overloaded resource in a file within your application's space and, if so, make use of that instead. This wouldn't translate directly into layout.xml references though, you would need to manage this programatically, without using resource IDs.
Answer: For what purpose do you need to override a recourse?
If you want to change a picture (i guess it from your filepath) you might want to save the picture on the SDcard or if you want the file to be only for your App, you can save it on the Phone-Memory.
After you saved the new picture you could check if the file exist. If it exists, you load it, if not, you load your standard picture from the recourse.

Overwrite resources


Why is a return process assumed to be stationary when there is volatility clustering present?

Question: I am analysing a logarithmic returns series only to find the ADF result to signify the stationarity of the series. I understand that this is a way of differencing the original price series, however I am confused regarding how an I(0) process can be used to explain the presence of volatility clustering as this characteristic accounts for unequal variance as time progresses. Would the explanation have something to do with weak stationarity? And if so, how and why?
Thanks in advance
Comment: An ARMA process can be stationary. A GARCH-type conditional variance equation is sort of the same as ARMA-type of conditional mean equation.
Answer: A stationary process can exhibit volatility clustering. This has nothing to do with weak stationarity, it is true for strict statioarity as well.
As you say, a stationary process must have the same variance for every point in time. But this doesn't apply to the variance of the distribution at some point in time conditioned on realized values on other points in time.
By volatility clustering one refers to either a conditional relationship or a feature of the sample paths. It doesn't mean that unconditional variances will differ from one point to another.
To see the difference, consider the following example:
Say you have a process: $...,X_{-2},X_{-1},X_0,X_1,X_2,...$ which only has the sample paths: $$...,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,...$$
$$...,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,...$$
$$...,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,...$$
$$...,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,...$$
$$...,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,...$$
Where each of the sample paths has equal probability.
This process is strictly stationary, while there is "clustering" of ones in its sample paths.


Can two people who are asexual get married?

Question: The situation is a couple where both the man and woman are not interested in consummating the marriage, but they want to get married because they are in love and they want the companionship. How would kiddushin and nisuin work in a situation like this? The woman would not be doing bedikot and going to the mikvah. Would an Orthodox rabbi still be willing to marry them?
Comment: If she doesn't go to the mikvah then there will be restrictions on their marriage. Ie passing things to each other, eating alone together without a reminder, beds apart, etc.
Comment: Why do they need to get married?
Comment: Well of course they should get married. This is no different to an elderly man and woman getting married.
Comment: Different but related: https://judaism.stackexchange.com/q/129470/31534
Comment: @robev Also possible yichud issues, if she was not tehora at the chuppa (or even if she was but there was no consummation before her next period, although presumably in such a case one could be mekil).
Comment: @JoelK I assumed she went to the mikvah for the chasuna and they chose not to consummate so that would be fine according to the Rema
Comment: [Welcome to MiYodeya](https://judaism.meta.stackexchange.com/a/3887/11501) Sheldon and thanks for this first question. Great to have you learn with us!
Answer: This is the kind of question that will, in practice, have to run through a personal Rabbi who knows the couple and the situation. It seems there might indeed be Rabbis who would marry the couple, as this is even done sometimes for a homosexual couple (an orthodox man and a woman who are not attracted to each other but wish to fulfil the mitzvot and seek companionship and therefore marry - it happens!):

איש ואשה שיש להם נטייה חזקה לבני מינם, וקבלו על עצמם לכרות ברית נאמנות
ביניהם, ולהיות חברים טובים זה לזה, ולהשתדל לקיים מצוות עונה כפי
יכולתם, יכולים לקיים את מצוות הנישואין באופן זה, ולהקים משפחה טובה.
A man and a woman who both have same-sex attraction may decide to
marry each other, be faithful, be great friends to each other, and try
to observe the mitzva of ona to the best of their abilities. They may
fulfil the mitzva of marriage in this way and raise a fine family.

This does not answer the details of your questions. Given what Rav Melamed wrote here, I would imagine that the Rabbi would do everything he can to persuade the couple to study the Torah ideals of love and morality, and reach a deeper understanding of love and intimacy than most people ever would (many people are led by their passions to do so out of urge, rather than holiness), and they indeed might find down the line they wish to fulfil all of the mitzvot available in a holy marriage:

וגדול שכרם של המצליחים להתגבר על יצרם, ומתוך אחריות מוסרית עמוקה בונים
זוגיות נאמנה ואוהבת ומקימים משפחה. וכפי שאמרו חכמים (אבות ה, כג):
"לפום צערא אגרא". ולא רק בעולם הבא יזכו לשכר, אלא אף בעולם הזה, מפני
שכדי להתגבר על יצרם יצטרכו להעמיק יותר ביסודות האהבה והמוסר, וממילא
יזכו לחברות עמוקה יותר, וכדרך שאמרו חכמים (ברכות לד, ב): "במקום שבעלי
תשובה עומדים אין צדיקים גמורים יכולים לעמוד"
The reward of those who succeed in overcoming their urges and who, out
of deep moral responsibility, establish a committed, loving marital
relationship and raise a family, is very great. As the Sages state,
"According to the suffering is the reward" (Avot 5:23). They merit
reward not only in the next world but in our world as well. This is
because in order to overcome their urge [or lack of urge?], they must delve deeply into
the foundations of love and morality. Doing so allows them to
experience a deeper intimacy. It is reminiscent of the Sages'
statement, "Where penitents stand, even completely righteous people
cannot stand" (Berakhot 34b)

[square bracket comments mine]
By doing so, this couple makes the world better, as whatever efforts we make in kedusha produce results that are available to everyone. Certainly, this is an area of the human condition that could use more heroes saving the day for all of us!

וזה נעשה על ידי אותם אנשים שאינם חשים תשוקה טבעית, ואע"פ כן מתוך קבלת
עול מלכות שמיים, כורתים ברית נאמנות עם בת זוגם. ועליהם אמרו חכמים (שבת
פח, א) שהם "עושים מאהבה ושמחים בייסורים, ועליהם הכתוב אומר (שופטים ה,
לא): "וְאֹהֲבָיו כְּצֵאת הַשֶּׁמֶשׁ בִּגְבֻרָתוֹ".
This is accomplished by the very same people who do not feel a natural
desire for the opposite sex, and yet enter into a covenant to be
faithful to their spouse, out of a desire to accept upon themselves
the yoke of the kingdom of Heaven. Thus, the Sages declare, "People
who act out of love and are happy in their suffering are the subject
of the verse, 'Those who love God are like the sun rising in might'
(Shoftim 5:31)" (Shabbat 88b)

Source: Peninei Halakhah, Simchat Habayit U'Virkhato
Again, the particulars should certainly go through a Rabbi. It might not be permitted to marry if the wife refuses to go to the mikva etc, and I'm sure there is a huge amount of halachot to consider!


Is it possible to safely wire nut the hot wires and remove the extra 4 way and 3 way switch?

Question: I want to install smart lights and 1 single smart switch in my living room. However the lights in my living room currently are on a 4 way. Is it possible (and safe) to just have one wired smart switch and then for the two remaining switches just wire-nut the hot wire together to maintain continuity and remove the switch? Basically I want to make it in essence a single pole switch, but it is wired as a 4 way.
Comment: Building Codes require each room to have a physical switch in certain standard locations, that any human can operate, and that controls a light.   You must retain those switch locations.
Comment: What make and model of smart switch are you wanting to use?
Answer: A switch just connects two wires together, so yes, it's absolutely possible to remove a switch and connect the right wires together to keep the light on.  In fact, some smart switches have instructions that tell you to do just that because rather than having 3 or 4 smart switches, you would have one wired smart switch and the rest would be wireless remotes that control the one switch.
The wires that need to be connected are more complicated than just "hot" and "neutral" because 3 and 4 way switch setups have "travelers".  A pretty fool-proof way to determine which wires need to be connected would be use a continuity tester to see which wires the switch is connecting and make sure you wire nut the same wires.  Some wires will end up not being connected and should be capped for future use.
That said, there are usually code requirements to have a room light controllable from all entrances to the room. So while you can remove all but one switch, you may not really want to do that.  But, like I mentioned some smart switches have this in mind and make keeping the light functional from all locations easy.
Comment: Okay thank you. Honestly my plan is to replace the other switches that I take out with a smart button, that is wireless, so theoretically, it should still be in code?
Comment: Yea, the idea is that you shouldn't have to walk into a dark room and feel your way to the other side to turn on the light.  Before you start, look up diagrams of how a 4 way switch can be wired, so you know a little more on what to expect when you start to dig into the switches.  Label everything before removing the wires.  Your main wires will be Line, Load, Travellers, Neutrals (normally white), and Grounds (bare or green).
Comment: @Micah label _every_ wire and **take pictures** of the wiring _before_ you remove any wire from any screw!


Which Banjo bolts do I need for Zee M640 calipers?

Question: I've just ordered a set of Zee M640 calipers to replace the old BR-M596 2 piston calipers on a bike I bought recently.
While looking for other parts I need I  noticed that the calipers don't come with Banjo bolts.
I will have to make new hoses up with Banjo fittings, but I'm not sure which Banjo bolts I need and I can't find anything about it online, can anyone help?
I'm in the UK and I don't have a good bike shop near me (just a Halfords and they are useless) so everything has to be bought online.
Thank you in advance.
Answer: You need Y8H098010 if you'll be doing this with Shimano hoses.
Comment: That's great,thank you mate


Why is shower head flow uneven with lots of water not coming through spray holes?

Question: Replaced water heater, so water main was shut off.  First time using shower had a  lot of water flowing out the side of the shower head, not through the spray holes.  Hand held shower head works fine.  Suspect sediment, but could use some help,  Thanks.
Comment: Sounds like sediment.  Soak the head in a bowl of vinegar for a few minutes.
Comment: @crip659 this would qualify as answer
Comment: I suspect your suspicion is correct.
Comment: next time, and to folks reading this, run a _bunch_ of water through the tub spout as fast as possible after changing a hot water heater, re-opening a disconnect valve, adding a water softener, etc; this releases all the particles through the big fat opening so that they don't find their way into faucet screens, icemakers, april aires, irrigation, showerheads, etc.
Answer: It's quite likely that changing out the water heater mobilized a good amount of sediment, scale, sand, etc. that had collected in the lines.  The "shock" of re-applying water pressure and flow pushed that up and into your shower head.
You may be able to get it out by removing the shower head from the hose and trying to back-flush it with some clean water.  Soaking it in white vinegar may also help dissolve any mineral sediment that is there.
Hopefully that will clear it up but if not, then you may need to replace the shower head.
It's always a good idea to remove filters, screens, and things like your shower head and flush the lines after having to perform maintenance like you did.  If you have some other fixtures that have not yet been used, you might do that proactively rather than risk clogging them also.


How to create a clickable slideshow

Question: I'm trying to create a slideshow on sharepoint online 2013 that when clicked, brings you to a different page, not just the image itself. Does anyone know how to do this? Thanks in advance!
Answer: If you are using bootstrap you can try carousel component. This one we have already on out SPO site.
https://getbootstrap.com/examples/carousel/
There is another simple example in w3schools also which you can build from scratch and customized as required.
https://www.w3schools.com/w3css/tryit.asp?filename=tryw3css_slideshow_rr
You just need to enclosed in an anchor tag in above example as below

Let me know if you want any additional information on getting information from list and build as a component.
Thanks,
Venkat Konjeti

How to create a clickable slideshow


Can the bottom stair have a different height than the rest in GA?

Question: Have spiral staircase in which all the riders but the bottom one are the same height. Is that acceptable in GA?
Comment: I think it is nationwide, the difference can only be 3/8" from the shortest riser to the tallest. That means you can have risers that are 7" and 7 3/8" in a set of steps, but you can't go to 7 3/4" thinking it is only 3/8" difference than the one next to it. I does not matter if it is the last one or the first one, or any in between.
Comment: I'm not sure, but I'm guessing that if this happens to be OK, it will depend on how much the difference is. It would probably be good if you could include the measurements for the height of the bottom vs the other risers.
Comment: It will be a stumbling hazard for anyone not accustomed to it. While on a trip in Russia we found most stairs were like this ( out side of Moscow), I guess a lack of standardization. We learned to look at all stairs for non-standard height at the top or bottom step to avoid falling.
Comment: Is the bottom step taller or shorter than the others? Taller would be more of a problem than shorter.
Answer: The maximum rise of steps is 8". The maximum difference between risers is 3/8" from smallest to largest, as @Jack says. (See ICC R3220.127.116.11)
A handrail is required if there are 4 or more risers.
Exterior steps have some exceptions.


Deallocate resources on process termination

Question: How I can deallocate resources when the process gets killed by, for example, the Task Manager? Is there a way to call a function before the process gets closed?
Answer: There really is nothing you can do if your process is killed.  By definition, killing a process is just that - killing it.  The process does not get an opportunity to run any code.  This is very much "by design".
Imagine that you could register a routine that was called when your process was killed by the user (or by another process).   What would it do?   All the other threads in your process would be in an indeterminate state,  How would you synchronize with them?   Remember, the idea is that the process needs to be killed.
The other scenario is even tougher: your code is benign and trying to do the right thing - e.g. clean up and be a good system citizen.   Some code isn't.  Imagine what a boon to a malware author it would be if the OS allowed code to be run for a process that was being killed.   It would be bad enough for malicious processes that were running with standard user privileges, and completely awful for any running with administrative privileges.
Critical finalizes and structured exception handling will not solve this fundamental issue.
ON the upside, the OS will free all the resources it knows about when your process is killed, namely memory and kernel objects.  Those will not leak.  But explorer doesn't know about your process so it cannot clean up for it.
One way to solve this would be to have a monitoring process that keeps track of your other processes state and cleans up for it.   You could do this with a simple process, or with a service.   You might also consider some kind of shell extension that had its own thread that did the same thing.
Answer: There is no way to execute arbitrary code upon termination within a process which is about to be killed by a call to TerminateProcess, such as by Task Manager, or another process utility such as TSKILL or TASKKILL.
Neither critical finalizers, nor ordinary finalizers, nor try/finally blocks, and certainly not mere objects which implement IDisposable can cause code to be executed in this scenario. Even DLL detach events will not be invoked from a process termination via TerminateProcess.
The best you can do is to use a watchdog process which monitors your original process and executes relevant code when the original process is terminated.
Answer: Theoretically the O/S should deallocate resources after the process is killed. What kind of resource are you thinking of in particular?

Edit:

Ok, it's kinda tricky to explain. I'm using a library that is wrapping some OS functions to manage some Shell Extensions. When the application closes without calling explicitly the appropriate methods, all explorer freezes and I need to restart it.

Any unmanaged DLL is (according to the documentation) supposed to be invoked with a DLL_PROCESS_DETACH event; however, this DLL_PROCESS_DETACH event isn't called when the process is terminated via the TerminateProcess API.
Googling for these terms turned up The Old New Thing : Why can't you trap TerminateProcess?
which says, "Once you kill with TerminateProcess, no more user-mode code will run in that process. It's gone."
Because everything you're trying to work with (i.e. .NET, Explorer, Shell, COM) is happening in user-mode, I think the answer is that there's no way to do what you want.
Instead, perhaps there's another way: for example, by adding code to your Shell extensions so that they realize if your process is abended.
Comment: Ok, it's kinda tricky to explain. I'm using a library that is wrapping some OS functions to manage some Shell Extensions. When the application closes without calling explicitly the appropriate methods, all explorer freezes and I need to restart it.
Comment: DLL_PROCESS_DETACH is not passed to DllMain when the termination is caused by TerminateProcess.
Answer: You could try wrapping your whole process in a try/finally statement (you put the deallocation stuff in the finally clause), but in some cases even that will not be enough.
Actually, I think you could launch a background thread from your process to do all the stuff and Thread.Join() with your main thread so that if something goes wrong in the child thread, the main thread will be still able to get things right. Of course, this will not work if the whole process gets terminated for some reason.
You could also launch a child process and call Process.WaitForExit() but I'm not sure if your shell-related thing could work with a multi-process approach.


Why do sites that host papers not have a comments section for each paper?

Question: Why do sites that host papers such as IEEE's not have a comments section for each paper? Sometimes there is something that needs to be added, corrected or clarified by the community but as far as I know there is no such a thing... or is there?
Comment: What could go wrong? First, what do you mean by community - anybody could add a comment? I'm sure nobody on the internet would get kicks out of defacing/trolling/harassing yet another website...
Comment: @JonCuster On this site everybody can comment and it's not that bad.
Comment: @FedericoPoloni... On this site, if we did not have myriads of users flagging spam and abusive posts, it would soon be as useless as most other sites.
Comment: @FedericoPoloni Actually you need at least some amount of reputation (like 20 or 50) to comment. I don't recall if the association bonus counts towards this, but it does mean that someone completely unfamiliar with the SE network cannot comment.
Comment: @JonCuster Not anybody, registered users usually have paid actual money to get access which cuts a big portion of random people logging in and writing trash. Also, researchers have critical thought and better judgment to decide what is important and what not.
Comment: It's easy to imagine many things that *can* go wrong (starting with the huge overhead work related to building the forum infrastructure, because existing PHP-based or Wordpress-based solutions are inadequate for long-term archival), but it would be the most interesting to hear about what has actually been tried and *did* go wrong.
Comment: @TobiasKildetoft [50 points to comment](https://academia.stackexchange.com/help/privileges), association bonus counts. But you can post questions and answers from a fresh new account, which is almost the same thing spam-wise.
Comment: @GEdgar So what? The publishers can do the same thing, and even pay some moderators. I think most authors would flag spam comments to their own papers anyway.
Comment: And my time and critical thought will focus on a few papers and their relation to my work.
Comment: @FedericoPoloni but vaccines.stackexchange.com would be a cesspool in about 10 minutes flat.
Answer: There are a few third-party sites where you can do this. For instance, https://paperhive.org/ and https://scirate.com/. None of them has a large user base, at the moment. There used to be more (http://www.arxaliv.org/, https://selectedpapers.net/) but they seem to be down.
(Disclaimer: I am a friend and a former colleague of one of the founders of Paperhive.)
Comment: @darijgrinberg I can answer only some of these questions: Paperhive supports Mathjax in comments; the comments are CC-BY licensed. For the other ones, I will point out this thread to the Paperhive people and hopefully they'll answer themselves.
Comment: Does PaperHive support LaTeX/MathJax? How easy is it to export all discussions related to a given paper from PaperHive? (Or even view them all together, without having to click around a PDF.) What are the plans for long-term archival and availability? What is the copyright policy on comments?
Comment: Thanks for this! Such a site would be very useful, but I am wary of something that will fold in 5 years and leave behind a lot of non-migrable (for reasons of format or of licensing) resources. So far, many of the pioneering plants have withered and little has been left behind; if I hadn't archived my arXaliv comments, I'd have no idea where to find them now...
Comment: @darijgrinberg Answers by a Paperhive founder are in [this other answer](https://academia.stackexchange.com/a/89711/958).
Answer: Reason 1: Many publishers (still) see themselves simply as content providers. A reader goes to the publisher website, downloads a pdf and leaves. A publication is understood as a static (dead?) document, so post-publication activities are not encouraged technically.
Reason 2: The publisher website landscape is very fragmented. Even smaller scientific communities have to go to multiple publisher websites to get their content. So, a researcher would need multiple logins to add comments on the different websites. A high barrier even today.
Reason 3: A simple forum-like comment covers only a few of the post-publication discussion use cases. It is good for general opinions and corrections. Annotations, however, are much more targeted and also cover use cases like corrections of specific mistakes in formulas, paragraph-level questions and statements, discussions around data and images, proofreading, and referencing of specific parts of a document (example of direct linking at PaperHive: https://paperhive.org/documents/jKRG3MqMuj66/revisions/QOdeW6lxZMHk?a=s:Vjw91UM7br1A).
These are some of the reasons why we at PaperHive [Disclaimer: I'm one of PaperHive's founders] chose to build a system that is connected to publishers' websites but enables the communication on a separate cross-publisher platform entirely dedicated to reading and discussing. We have a small widget that informs readers on a publisher website of existing discussions (see example on a partner's website: https://www.growkudos.com/publications/10.1016%252Fj.neurobiolaging.2014.04.026) but the actual reading & annotation happens on PaperHive.
All public discussions are under the CC BY license and we follow the W3C open annotation standard (which is the foundation for interoperability and portability). We have an API for the export of annotations (documentation in progress) and have on our roadmap to archive the discussions at one of the two most-widely used systems in publishing (Portico or Clockss).
Comment: Either way, what you've built there looks like a great step forward! I'm looking forward to eventually referee papers on such a platform...
Comment: Thanks for chiming in! Seeing that there is a W3C annotation standard and that someone uses it makes me happy, and CC BY looks very good. Though I'm wondering why I often get an infinite loading screen when I click on the "referenced text" in a discussion. If you are pulling these documents from the publisher page in real time, you should probably build safeguards for the case the publisher page is down or changes its structure or the document gets re-scanned and the references lose their target.
Comment: On a deeper level, though, let me describe what to me is the most uncanny part of your site: It all relies heavily on an internet connection. Unless I have missed it, I cannot find an "download the whole discussion for a given paper as a PDF" (e.g., concatenate the paper with the discussion threads, and replace the yellow highlighter by some sort of endnote markers) option. But that becomes useful, once discussions become long and meaningful and begin containing their own research. Perhaps [StackPrinter](http://www.stackprinter.com/) could be a good model here.
Comment: Minor thing: Is there a way to search for a given subject and sort by "how much discussion has been recently made about the paper"? That could significantly improve adoption, as it would automatically provide people with examples of usage relevant to their discipline (once such examples exist).
Comment: Thank you for the comments, @darijgrinberg!

- You have a point with the dependance on publisher's tech. However, changes in publishing are extremely slow. Html and text-matching will be one way to secure portability of comments.

- "Download annotations" is on our roadmap. Thanks for the StackPrinter hint!

- There are already researchers conducting peer review on arXiv papers within PaperHive. They review the papers privately and send the annotated documents to the editors of some journals. The open access publisher LangSci Press also has their proofreading and peer review on PaperHive
Comment: Seconding @darijgrinberg 's last comment.
Comment: is this like Diigo?
Answer: There are a couple issues with this that I've both seen and experienced:

It's probably not worth it, as few papers actually draw comments. Pubmed Commons, for example, means you can leave comments about a paper on it's Pubmed entry. I looked up some of my papers...there isn't a single comment. Not one. And while I'm not the most prominent researcher in the world, we are talking about a body of papers with 500+ citations. So...why bother with implementing this?
If you do get comments, you're vulnerable to things. For example, the anti-vaccination community launching a spam campaign. While you can restrict the comments to subscribers, what about open access journals? Crackpots with library memberships? Many of the same arguments that you should be able to comment apply to the public being able to comment. And that means moderation. Whose going to do that?
What are the obligations to commenters? Am I free to ignore them? Or, if J. Random asserts there's an error in my paper, do I have to address it. How much do I have to address it?

TL;DR: There's significant costs and not a lot of clear benefit, especially when there are ways to contact an author directly.
Comment: @AnnaK. If I'm free to ignore it then whether or not there's an error is never really resolved. You've just added noise. As for the "report button", a report button needs someone on the other end to make the judgement over whether or not that's actionable. And again, if you just want to muse about a paper, there's already a mechanism for that in many journals.
Comment: Better do noise than let things slip silently.
Comment: But that's the first reason I wanted to stress this issue: some papers might have errors, the rest of the world shouldn't suffer from those errors... or even worse... propagate the erroneous information onto another paper or use them to his/her advantage. If people notice something it should be pointed out and not hidden just because the author will have *xyz* problems.
Comment: @AnnaK. One of the problems though is that "Commenter Thinks There's an Error" and "There Is an Error" are not the same thing. What does the journal do if the author refuses to comment? Or the commenter goes on a string of nebulously goal-posting objections (see: every anti-vaccination argument ever). Or the author and the commenter disagree that the error is in fact an error? How long am I obligated to respond if indeed I need to respond at all? If there's an important error, that's what letters - either to the editor or the journal, are for.
Comment: Most of these problems are trivial (in my opinion). 1: Since these are comments, the author should not feel obligated to answer them. This is why conferences are: the real obligation to *answer* questions is there. The comment section should be something that people can comment and users to be able to see for years later. 2: Just a report button will do for people that disrespect the comment section, papers are meant to be read by grown ups not 5 yrs olds.  3: I'm sure journal and conference editors will be happy to receive tens of emails everyday for things posted decades ago (possibly).
Comment: @AnnaK. I'm not sure you'd say that if you were the person who had to deal with the noise. Also, again, if there's no authorial obligation to address the comments, odds are they're just these silent, useless things hanging out in the void. Blogs, journal letters, etc. are established mechanisms that *have* been used to address problems in papers before. What do you think is lacking in the existing methods? Just that they're not tagged to every single paper?


Difference between su and su -

Question: I wonder what's the exact difference between these 2 commands:1. su
2. su - . Can anyone please explain?
Answer: The man page describes it fairly well with the following:
   -, -l, --login
          Start the shell as a login shell with an environment similar
          to a real login:

             o      clears all the environment variables except TERM

             o      initializes the environment variables HOME, SHELL,
                    USER, LOGNAME, and PATH

             o      changes to the target user's home directory

             o      sets argv[0] of the shell to '-' in order to make
                    the shell a login shell

I usually think about it in terms of the environment I want, in all honesty I tend to always use su - by default.

Difference between su and su -


Can the color of the underline below the text be changed to a different color than the text in Corel Draw x7?

Question: I am making a visiting card in corel draw X7. I want to change the color of the underline of a word but when I do it the color of the whole text changes too. Please tell me how to change the color of underline without changing the color of text itself.
Answer: I would draw a new thin rectangle and put under the text you would like to underline. You can then group the 2 objects to keep together.
Too bad it isn't as easy as CSS.
Comment: So tempted to downvote you for that last sentence. I loathe CSS :P
Comment: @Ryan that's a shame, CSS is awesome! Usually it is easier to design in any design program but for this it would be so much more simple if you could just do a bottom-border character style.
Comment: Is there any direct method to select the underline and fill the color directly?
Comment: By the way what is CSS?
Comment: @JATT The method I used is using a new line (object) entirely (Not using the underline text). My method would make it easy to keep text in-tact and change the underline color. CSS stands for Cascading Style Sheet, it is used to format HTML.
Answer: My suggestion would be this:

Add text without underline
Adjust text to correct size, font, and color
Use the Pen tool to create a straight stroke
Adjust the fill of the stroke to the color desired for the underline
Place the new line under the text field

You now should only have to copy and paste the stroke under each word that needs it. This seems like a ton of work, but for a custom look sometimes the extra steps can pay off. Hope the best.


Creating a tag cloud from text:nsp output

Question: I am using Text::NSP which creates n-gram from text files. Is it possible to create tag clouds from an output file of Text-NSP? I have used and liked IBM Word Cloud Generator which only gives a tag cloud output from the frequency of each word within a file. However, I am working with 2-grams and 3-grams. In short, I need a tag cloud generator which will accept an input file with words and their occurrence number. I am running on Debian.
Thanks all.
Answer: I started to use R snippets package which is what I was searching for.
The output of text::nsp should be changed with some bash scripts in order to obtain a dataframe acceptable by the R.


What are the best practices for SharePoint server 2013 at VM hardware level?

Question: What are the best practices for SharePoint server 2013 at VM hardware level?
Comment: best practices in which prospective !  Installation, Management, Administrations !
Answer: basically it depends about the one's requirement. How many users you are expecting, what service application will be used, purpose of the farm etc.
here are some hardware requirement:
<code>Type                                           Memory        Processor
Dev/stage/test server                          8GB RAM        4 CPU

All-in-one Database/Web/Service Application    24GB RAM       4 CPU

Web/SA server                                  12GB RAM       4 CPU
DB server (medium environments)                16GB RAM       8 CPU

DB server (small environments)                 8GB RAM        4 CPU
</code>
Here is really good article from Technet, which will cover all topics in it.
Use best practice configurations for the SharePoint 2013 virtual machines and Hyper-V environment


TRP HY-RD brake pistons won't retract to take new pads

Question: I'm replacing pads on my TRP Hy-Rd brakes. These are cable actuated hydraulics. Using tire levers, wrenches, etc. I have not been able to push the two pistons far enough apart to fit the rotor between the pads. I can move one piston, but the other follows, so there's no increase in the gap. I've tried pushing the pistons apart both with and without the old pads in place. Not having any luck. Any suggestions?
Answer: Detaching the cable reduced the pressure and allowed the pistons to both slide back.
Comment: Accept your own answer to mark the problem as solved.
Comment: For future readers - I think what was happening here was that the actuating lever was pulled slightly which cuts the main cylinders off from the reservoir. If fluid is prevented from flowing into the reservoir the pistons cannot be retracted.


Is microsoft.com not using TLS/SSL?

Question: On my way to Microsoft to download "security essentials", I noticed that the download page isn't a secure site. Is this legitimately the case, or an indication that I may be compromised in some way? (Some kind of name resolution hijack?)
Comment: Since the executable you download is signed, I think they made it easier for a proxy server to cache rather than go for extra privacy.
Answer: It appears that Microsoft.com does indeed run using standard HTTP rather than HTTPS (TLS/SSL secured). However, their website can be accessed using HTTPS if you enter: https://www.microsoft.com. This causes the main page to display over a secured connection.
That said, their security essentials page (http://windows.microsoft.com/en-us/windows/security-essentials-download) is not accessible using HTTPS and results in a 404 Not Found error (if your browser even lets you open it).
I do not know why Microsoft would use standard HTTP instead of secure HTTPS, but it appears that they do. It seems like a poor set-up on their part, but I do not believe this means either you or they are compromised.

Is microsoft.com not using TLS/SSL?


how can you accelerate the fusion cycle in high mass stars?

Question: I'm trying to design a device that would cause a supernova in a high mass star. I want some kind of explanation so the device doesn't seem so handwavy. Is there any way to somehow increase the amount of Fe 56 or 58 in a star, increase the density of it's core, or increase the outward pressure on the star to rapidly accelerate the fusion cycle in high mass stars?
Comment: You could do like they did in _Iron Sunrise_ by Charles Stross. I think it involved changing the nature of time in the very center of a star, such that there was a 20 km vacuum in the center.
Comment: the energy output from the fusion of lighter elements keep the star from collapsing, it takes more energy to fuse heavier element like iron and thus the energy output starts to decline exponentially very quickly and kaboom!
Comment: To NomadMaker - I don't think a situation where time is manipulated works for my scenario because the whole point of this supernova device is to generate energy for time travel. so if they could already do that in the core of stars, it wouldn't be an issue.
Comment: To user6760 - I'm aware of the binding curve, and stages of fusion within a star, I'm looking for a method of accelerating the process so that it happens within hours.
Answer: In order for a star to supernova, based on our current understanding of physics, you need to have three things:

Sufficient mass for the start to explode rather than burn down (Roughly 6-8 times the mass of our own Sun
An exhaustion or significant decrease of readily consumable fusion fuel
Sufficient fuel of a different type such that the star is fusing heavier elements (think silicon rather than helium or nitrogen)

All of these things tend to occur over millions of years for stars of sufficient volume and mass. Additionally, there is still ongoing research in the field of supernovas, so there is not exactly a precise recipe to create one.
That said, it looks from the comment section that by "rapidly" you are talking hours, which is unfortunate. On a longer, stellar scale of "rapidly" (A few decades to a few centuries) it might be possible to trigger this effect by a reverse form of Star Lifting (https://en.wikipedia.org/wiki/Star_lifting). In a nutshell, instead of lifting or blasting mass out of the star, you would add massive amounts of heavy elements (probably multiple planet-sized lumps of iron or some such material) into the star at a velocity less than that of the escape velocity of the gravity well. The perk of this method is that it would be achievable at our currently level of technology and is compatible with current physics.
If you want to speed things up, you could greatly increase the mass you introduced. In theory, if you took two high-mass stars that were close to supernova anyway and smashed them into each other, the resulting collection of stellar mass would more rapidly burn through the fuel and supernova. The problems with this are A) moving a star and B) the physics of aiming that precisely in a moving universe so the mass doesn't just spiral off.
Finally, if you have access to some handwavium, you could teleport the core out of a star and replace it with supercritical fissile material. Supernovas occur when the gravity holding a star together is less than the force being expelled from the interior. By essentially detonating a super-nuke in the middle of a low-gravity space, you would get an impressive explosion. Strictly speaking, this would be less a supernova and more of a space nuke targeting a star.
Answer: You will need ridonkulous amounts of energy, or some handwavium.
So make your device out of believable handwavium.
Your device briefly, for about a minute, suppresses thermonuclear reactions within its field of effect. It was originally designed as a last-ditch shield to protect your fleet heavy battlecruisers against incoming hydrogen bombs, by suppressing their fusion reaction for the moment as they would detonate. How? I have no clue, that's for the technical boffins to know. We just activate the mechanism and hope we got the timing right. It is very large, very clumsy and takes days to reset, of course.
You, in your insane genius, have figured out that if you turn this device on a large star, it will very briefly stop the fusion process in the core, triggering a core collapse, and subsequent supernova runaway reaction.
You make very, very sure to not tell anyone this, as it would of course lead to you becoming the #1 most wanted fugitive in the known universe!
Comment: I feel like the star lifting idea presented earlier, would fit better, but I do like your idea of suppressing fusion, and might adopt it elsewhere in some form.


Are there special attack vectors for statistical databases?

Question: Are statistical databases vulnerable to SQL injection attacks?
If so, what specific kind? Can you think of an example?
Comment: Is this homework? The answer may relate to situations where the SQL database is open for aggregation of multiple entries, while selecting a single entry is forbidden. This way, one can collect averages, max values, min values, etc., and this way deduce information of single entries with some probability.
Answer: I might be mincing terms here, but technically no, a statistical database shouldn't be vulnerable to SQL injection, because statistical databases tend not to use SQL as its query language. They tend to use variants of the language like MDX or DMX. Then again, some do support SQL though so...
However, since they do accept input in the form of a language they certainly can be vulnerable to injection because its not really up to the database or its server to prevent injection. Its up to the application calling into the database to properly protect against injection.
There are varying degrees of damage involved here too. In most cases you can't insert data or delete data as these databases/cubes/models tend to be read only, however it could be possible to change the intended result set and get more information than expected. I would expect this to be possible in poorly developed reporting applications.
Answer: If by "statistical" you mean "zero inputs" then the answer is: no.
But if this is an SQL DB that accept inputs (i.e. even for filtering purposes) than all standard rules still apply, and its as vulnerable as any other SQL DB.


The new software iOS 8.1.3 won't update

Question: I have the iPhone 5s which I bought like 2 months ago. The new software update iOS 8.1.3 wont install. I press the Agree button for terms and conditions and it just wont do anything.
Answer: Try updating through iTunes. This is useful for those times when there isn't enough free memory available for the update to install on the device itself.
The sequence is to back up the phone and then apply the update.
If there is an error, you will see it in the iTunes update error logs. You can also restore the device to factory settings (via iTunes or via the reset options in the settings app - erase all content and settings) and then update if the cause of the error is some corruption of the apps and data on the phone.
Comment: @andrianav. I've elaborated on the answer - it's basically a triage problem now. iTunes will log update errors and also let you clear errors from the device if needed.
Comment: i have tried that already and i have a 4GB free space in my phone! when i tried from itunes, it went until the end but last minute said that it cannot be done..
Comment: @bmike. so what am i supposed to do now? (sorry for not understanding)
Comment: @andrianav. I'd start with connecting the device to iTunes and press restore. If that fails, you can ask a follow on question here if you don't know where to look for the error logs or you could just wipe the device and try updating. I'm not sure what part you are uncertain of - so asking a new question with details and linking here might be your best shot if the answer as written isn't enough detail for you.

The new software iOS 8.1.3 won't update


What is "forward" and "reverse" voltage when working with diodes?

Question: What is the difference between "forward" and "reverse" voltages when working with diodes and LEDs?
I realize this question is answered elsewhere on the interwebs such as wikipedia, but I am looking for a short summary that is less of a technical discussion and more a useful tip to someone using diodes in a hobby circuit.
Comment: I removed the apostrophe from "and LED's" because I'm pedantic. :)
Comment: I added "and LED's" as a way of capturing search queries that don't spell out the "D" :)
Comment: LED means Light Emitting Diode.
Comment: @Madmanguruman Most of my edits definitely qualify for that description, too. Thanks. :)
Answer: The forward voltage is the voltage drop across the diode if the voltage at the anode is more positive than the voltage at the cathode (if you connect + to the anode).
You will be using this value to calculate the power dissipation of the diode and the voltage after the diode.
The reverse voltage is the voltage drop across the diode if the voltage at the cathode is more positive than the voltage at the anode (if you connect + to the cathode).
This is usually much higher than the forward voltage. As with forward voltage, a current will flow if the connected voltage exceeds this value. This is called a "breakdown". Common diodes are usually destroyed but with Z and Zener diodes this effect is used deliberately.
Comment: @JYelton, if you exclude zener diodes, most every diode you use will conduct when it has a "forward" voltage, and will cutoff when the reverse voltage is met.
Comment: @Kortuk, I wish your comment was an answer and also accepted. The other answers are correct, but the point of a diode is to be a one-way check valve for current. Breaking a diode is how interesting things like Zener diodes were found.
Comment: @AgentZebra Compared to a common reference, yes, see [this picture](http://i.stack.imgur.com/0PeBU.png). A [Zener diode](https://en.wikipedia.org/wiki/Zener_diode) can be used as a voltage reference or a voltage limiter.
Comment: @fukanchik When you connect the diode as described in my answer, you can expect the voltage difference between the diode terminals to be approximately the forward voltage given in the datasheet.
Comment: What do you mean by 'more positive'? Can a current be 'less positive'? And what is a Zener diode used for?
Comment: How does this apply to "Forward Voltage" in datasheets?
Answer: Typically the forward voltage is the voltage at which current starts to flow in the normal conducting direction (as mentioned above it's somewhere in the range 0.3-0.6v)
Reverse voltage is sort of the same thing - it's the voltage where current starts to flow when the diode is in the normally non-conducting region - this is also the point where the diode is likely to turn into a charred mess as all the internal semiconductor stuff turns to mush (choose a value somewhat larger than the largest PEAK [not RMS] AC voltage the diode will see)
Comment: "Above" is relative; answers are first sorted by vote count and then randomized.  I think you meant "As mentioned by Leon".
Answer: Forward-bias is when the anode (the pointy part of the symbol) is positive and the cathode (the bar) is negative. Reverse-bias is when the anode is negative and the cathode is positive. A lot of current flows when the diode is forward-biased, provided that the voltage is higher than 0.6V or so for a silicon diode or 0.3V or so for a germanium device. A very small amount of current flows if a diode is reverse-biased.
If you have a DVM and some diodes, you can check it for yourself. Diode cathode leads are usually identified with a band, so if you switch the DVM to a low resistance setting, and connect the leads across the diode in both directions, you should see a low resistance in one direction and a high resistance in the other direction, provided that the DVM is supplying a high enough voltage. Some DVMs have a special diode test setting that is easier to use.
LEDs usually have a flat against the cathode lead.
Comment: Why's it called `Forward-bias`? why the word `bias`? And is that the same as `forward voltage`?
Comment: Forward is just the opposite of reverse. It is the same as forward voltage.
Answer: Excavating in 3... 2... 1...
Just so that the information is condensed here and I like to know where to find my offspring, I'd add typical forward voltages for common LED as a quick reference for everyone. (And also because I like to dig an old thread on the 18th December.)
As per Wikipedia:

Typically, the forward voltage of an LED is about 1.8–3.3 volts; it varies by the color of the LED. A red LED typically drops 1.8 volts, but voltage drop normally rises as the light frequency increases, so a blue LED may drop around 3.3 volts.

LED forward voltage quick reference

IR LED drops about 1.5V
Red: ~2V
Amber: ~2V
Yellow: ~2V
Green: ~2.5V
Blue: ~3.5V
White: ~3.5V
Laser diodes: ~1.5V but may vary a lot with wavelength (like 375nm to 3300nm)
Comment: While I agree these forward voltages are helpful, this doesn't really answer the original question which is about contrasting forward and *reverse* voltages with respect to diodes. You might have good response by posting a separate question, "What are some common diode forward voltages?" and posting this answer. See also [this meta answer about self-answering questions](http://meta.electronics.stackexchange.com/a/3853/2028)
Comment: I'm not disputing that you are adding good supplemental info; just saying that people looking for this might find it more quickly if it's attached to a question reflecting it. (Plus you'd get some upvotes on both the question and answer, at least from me!)
Comment: I clearly stated I just wanted to "add typical forward voltages" information. Take it as supplemental info about your very question, for instance.
Comment: Not that I'm running after reputation, well, I might consider adding a dedicated question about that.
Answer: Although you mention "voltage," I believe you mean bias. If this is correct, then "forward bias" is the application of a voltage in such a way that the diode "shows" a low resistance.  "Reverse bias" causes the diode to show a high resistance.
Comment: My question is phrased to address common (at least in my experience) expressions, but yes, *bias* is what is meant by the terms. Leon's answer covers this, though I think your answer explains it differently and is helpful as well.
Answer: Forward voltage is the one that makes the diode to conduct while the reverse voltage is the one that makes a diode very bad conductor or almost an open circuit unless diode "breaks down".
Answer: For perfect junction diodes there is a relation between the current and the voltage given by Shockley's diode equation I = Is(exp(Vd q/nkT).  You can solve this to get Vd, the diode voltage, as a function of I.   But when you have a resistor in series with the diode, you can NOT solve the circuit; you must use successive approximations.  (Unless you have a WP-34 calculator with the built in Lambert W function, of course.)   Ordinarily, you can replace nkT/q with about 0.6 volts, and saturation current Is with about 1 mA, and your voltage calculation will be in the ball park.
Google "shockley diode equation" to learn more than I can type here.


Are mockups free of charge?

Question: As a web developer freelancer, clients sometimes ask me to give them a mockup for some new pages or ideas they have in mind and want to build. This takes time to achieve, so should I be asking them for extra fees or consider it as a part of the working process?
Answer: They are asking for your time to create something for them that is of no use to you or anyone other than themselves. You should be paid for your time.
Answer: In general, I would agree with the accepted answer, as you should normally ensure that you get paid for your time - regardless of what you do.
However, sometimes a mockup can be essential in landing a customer and could therefore be seen as an investment. Off course, the risk is that the customer takes your free work and goes elsewhere.
Perhaps one could produce 'partial' mockups which demonstrate your capabilities and proposed way forward, but don't reveal how you would go about the entire solution.
The only universal rule in freelancing is always staying focused on turning a lead into a paying customer. If it seems likely that no more work will be forthcoming, all work must be paid for. If more work seems likely, you're in the more difficult grey zone and must evaluate whether the potential client dangling lots of potential future work in front of you is being honest.
As long as a client owes you money - or when you have done agreed upon free work - always ensure that they don't hold all the cards. You must either insist on payment or only make partial deliveries.
Answer: Never work for free.  You could have a different flat fee rate for project discovery or design exploration.  In fact, this is a good "hook" package for marketing to sell people on your services. It's also an interview for you too. Get to know the client, process, payment terms etc.  You may find out that you don't want to work with them... especially if they try to get free design services from freelancers.
Comment: Really? Like never ever? You cannot see any situation at all where doing unpaid work can be seen as an investment?
Answer: You can ask payment for mockups, telling the customer you will discount them if they will ask you to continue with the project (e.g. you'll make the pages following the mockups provided).
You can decide (tacitly) to discount less then 100% and take a little amount for the mockups if you invest too much time on them for example.

Are mockups free of charge?


What does the face detection feature actually do?

Question: As "Face detection" really a catchy word in Compact camera market, What do face detection perform in a digital camera? what more does this feature do in addition to auto focus system?And why there is no face detection thing in DSLR world?
Comment: @Itai: but the reason they've only added it recently is instructive.
Comment: [Lots of good explanations on the web](http://lmgtfy.com/?q=face+detection)
Comment: @Itai: And...we generally prefer to answer questions here, rather than simply sending people off to a web search. I think Mattdm is right, the reason why DSLR's only received face detection recently is instructive.
Comment: Modern DSLRs have face-detection too. Please check you facts.
Comment: @Itai - The problem with that, is that you just receive information about general face detection not specific for why it is in digital cameras.
Answer: The camera doesn't know what the most important parts of the image are, and therefore what you would like to have in focus. Traditionally autofocus systems have simply selected the closest object near the centre of the frame and focussed on that. This can easily fail in the presence of irrelevant foreground details.
Face detection makes the assumption that if the image contains people, you would probably like to have their faces in focus, so by detecting the location of faces the autofocus system can be more accurately instructed.
In order to for such a scheme to work you must have some way of reading the image data continuously and the ability to focus on an arbitrary point in the image. This essentially means you need live view and contrast detect AF for face recognition. This is one of the reasons the feature was slow coming to DSLRs, contrast detect is still slower than phase detect and is thus not the primary way of focussing with DSLRs. Another factor is that DSLR users tend extert slightly more control over the camera's operation and prefer to select AF points manually.
The really interesting development is that the Canon 1DX has a metering sensor which is high enough resolution to detect faces, so it can use face detection in conjunction with phase detect AF.
Comment: It should also be noted that the 1D X face detection (and possibly face detection in other camera) are not limited to detecting human faces. I've read a few articles where people used the 1D X face detection feature to detect bird and animal faces as well, a rather intriguing capability.
Comment: @jrista that's probably the result of using a really simple face detection scheme that looks for a round shape with two eyes! But yes I can see how that would still be an advantage to nature photographers.
Comment: I'm not sure its that simple, as it seems to work in profile... For deer, elk, even bear...that wouldn't really be a "round" face.
Answer: Apart from assisting focus, some cameras do not only have face detection but also try to detect the expression, like for auto shooting when people are smiling, instead of taking 10 images to get people to smile. You can even get a rotating tripod for e.g. Sony WX1 that allows you to put it in the middle of the table and have it rotate and snap pictures during a dinner party when people smile at it. It would also be handy for surveillance footage to snap pictures of faces while you are away. From personal experience I haven't used the face detection much on my WX1 save for in the beginning when showing off the camera - I use it mostly to record concerts, and I don't miss the feature on my DSLR.
Comment: Some of these features even warn you about closed eyes after taking the shot. Also included is setting for smile level treshold, where you can tell the camera if it should take a photo for even the slightest of smiles, or if it needs to be a real wide grin before a photo is captured.
Answer: DSLRs have face detection too, even the high-end models like Nikon D800.
I suggest you to do a simple Google search to learn more about face detection.
Face detection simply detects the face in the frame and then it set the autofocus and exposure settings to give priority to the face.


If "lad", "fella" and "bloke" are synonyms, then "hombre", "homme" and "man" are _______?

Question: Is there a technical term for the relationship between a word and its equivalents in other languages? I thought of cognate, but don't think it quite works, as cognates could include words like chief and chef which aren't in fact synonymous, and would exclude words which have the same meaning in different languages but have no etymological connection (like "hombre" and "man" in this case). Obviously "equivalent" does the job, but is there a more precise linguistic term? Something like transynonym, perhaps?
Answer: The word "translation" is suitable here. The word "translation" means "a rendering from one language into another" or "the product of such a rendering" according to Merriam-Webster, which "hombre", "homme", and "man" certainly are.
Comment: Welcome to English Language & Usage! We're looking for long answers that provide some [explanation and context](//english.stackexchange.com/help/how-to-answer). Please explain why your answer is right, ideally with [citations](//english.stackexchange.com/help/referencing). Answers that don't include explanations may be [removed](//english.stackexchange.com/help/deleted-answers).
Comment: I don't think translation quite works. Yes, we can say '"hombre" is a translation of "man"', but we don't use "translation" to say "these words are translations" in the way we might call two words synonyms. Also, as your M-W quote shows, "translation" suggests a conscious act of rendering, I'm really talking about accidental examples of "parallel evolution" within two languages, situations where two languages both have a word for the same thing. I suppose "equivalent" or "counterpart" is the best we can get, if there isn't a technical term already in existence. Thanks for your help, anyway.
Comment: How about "analogue" or maybe even "complement"?


Flight number from Manchester to Limoges 7 days ago

Question: Can anyone please tell me the flight number from 7 days ago for above flight on 10 March from Manchester to Limoges
This flight was over 6 hrs delayed
Flight scheduled for 13.20 and to land at Limoges by 16.05
My ticket with Ryanair does not give me flight number only ticket reference
I am required to give the flight number for compensation.
Answer: To further the correct answer from @DavidSupportsMonica
FR38 is indeed the correct flight you are trying to search for, as the flight on March 10th 2023 has been delayed by 6 hours
It was scheduled to arrive at 16:05 and landed 6 hours later at 22:29 (data from flightradar24)
Answer: Airlines often fly the same flights repeatedly, on the same day(s) of the week and at the same time(s), using the same flight number. If "7 days ago" refers to a flight on March 10, 2023, then it's very likely the same flight will again occur next week, on March 24, 2023.
Both Google Flghts and Ryanair's buy-a-ticket page show Ryanair's flight FR38 from Manchester UK to Limoges FR, departing 1320 and arriving 1605, on Friday, March 24.
Ryanair flights on the same route after March 24 do not always go on Friday, but they do show the same route, same times, and the same flight number.
Thus, you were on Ryanair's flight FR38.


Seat post size on Schwinn Loop

Question: The seat post (and the saddle) got stolen on my Schwinn Loop. I've searched everywhere but I haven't been able to find the diameter/size of the seat post so I can look for a replacement online. Any piece of info would be appreciated.
Comment: Seat post diameter is highly standardized.  Which is to say there are about 20 different "standards".  You'll have to measure it somehow.
Answer: Sorry to hear about your loss.    Is this your bike?

The manual is at http://media.schwinnbikes.com/media/uploads/blog/files/S14-Folding-Owners-Manual.pdf and is utterly useless.
From a review I found "[the loop] has perhaps the longest seat-post I've ever seen on a bike so no doubt it will be able to accommodate very tall people with ease. "  So that means a 400 or 450mm long seatpost.
As for the diameter of the seatpost - you can use calipers to measure, or take it into your local bike shop.      It could be anything from 25.4mm to 34mm with 27.2 and 30.something being more common.  0.2mm difference will make the seatpost wobble and wear faster, so got to get the right measurement.
Regarding the seat (saddle)  the review mentioned its a particularly horrible experience, and that the saddle should be your first upgrade.  So that's positive.

First consideration is that it may happen again.  So you need to plan some precautions before parking up your bike.

Pitlocks - replace the seatpost quick release with a bolt that needs a special tool to undo.  Buy this at the same time you buy the seat and post.
Plain old bolts rather than Quick Releases

Downside of these is it makes the bike harder to fold up cos you'll need to carry tools.
Given its a folding bike, you might consider folding it and storing it inside from now on.
Comment: Thanks. That is my bike. The info was really helpful. I did manage to measure the diameter and it was indeed 27.2mm. I will try to contact Schwinn's customer service to confirm.
Answer: I had a Schwinn Loop. The seatpost was 27.2mm in diameter and a staggering 550mm in length. If you are suspicious that this might lead to bending, you'd be right. I bent mine and couldn't find a replacement that long.
Bikefolded.com lists the seatpost length as 400mm, but it is wrong.
Eventually I sprung for a Dahon, and I've been much happier with every aspect of the bicycle. Incidentally, it has a much thicker seatpost.

Seat post size on Schwinn Loop


how can pass data back from current screen to previous screen after clicking back button, ios

Question: I am transferring data from FirstView to SecondView after clicking on a button.
FirstView.h
@property (strong, nonatomic) NSString  *stringOfFirstView;

FirstView.m

 - (void)pushToSecond {
         SecondView *controller   =   [[SecondView alloc] initWithNibName:@"SecondView" bundle:nil];
         controller.stringOfSecondView          =   self.stringOfFirstView;
         [self.navigationController pushViewController:controller animated:NO];

        }

In SecondView, I have
SecondView.h
    @property (strong, nonatomic) NSString  *stringOfSecondView;

At SecondView,my goal is to go back to FirstView by clicking on back button and also want assign stringOfSecondView to stringOfFirstView as well
Question :
How can I assign stringOfSecondView to stringOfFirstView via clicking back button.

Just let you know, I am detecting an click event on back button in SecondView by doing
SecondView.m
- (void) viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:YES];
    if ([self.navigationController.viewControllers indexOfObject:self]==NSNotFound)
        NSLog(@"will show onto console");

}

But I am stuck how to do passing data back
Please advice if you have any clues about this issue.
Answer: I would use a delegate. So in your SecondView you need to create a protocol that sends data back to your FirstView. Your FirstView would become a delegate of the SecondView. There are tons of tutorials on how to make a delegate.
Comment: delegate is another option that you can send back data.I am also looking for another alternative way such as how to know the previous controller from uinavigation controller.....
Answer: Basically you have 2 options:

In secondView: hold a reference to firstView
The more flexibile alternative: If you possibliy want to reuse the functionality, define a
protocol. Let firstView implement this protocol, and let firstView be the delegate for
secondView

In both cases, secondView will have an assign/weak-Property, where it stores a reference to firstView. And firstView will implement a Method, which receives a NSString and stores it in stringOfFirstView
Answer: It might help not to think of it as assigning via the click of the back button. Essentially, when you click the back button your FirstView will regain control. At the point where it is back in control, you can simply ask SecondView for the value of stringOfSecondView and store it wherever you like, such as in stringOfFirstView.
In order to ask the SecondView for this information, you may want to "remember" who the SecondView is by storing it's ID in an instance variable in FirstView. Also, remember to retain and release it properly if you are not doing automatic reference counting.
Answer: Just to complement ttran's answer, you can take a look here: http://mobiledevelopertips.com/objective-c/the-basics-of-protocols-and-delegates.html.
The basic idea is to create a Protocol (where you define methods that should be implemented (optionally or not) by the classes that adopt this Protocol. This means that your FirstViewController can adopt a Protocol, so your Second View Controller can know some methods that the First View Controller has.
So, the missing part is that the Second View Controller needs to have a reference to the First View Controller. You can do that via delegation (The delegate usually is a weak property).
Again, you can read more and understand this process by reading the basics of protocol and delegates.


Gap in my resume

Question: I have a heart condition and recently developed depression.  I left a job because the workload was too much for me, but this also helped to create my depressive state as I always wanted to be a full time contributor to society.  How do I explain this absence during a job interview?  My depression is better but my heart condition will never be.  It is mostly manageable.
Answer: By all means mention you took time off to deal with your heart condition and that it's ongoing but under control. But best not to mention your mental problems at all.
Answer: Please don't feel pressured to disclose that information unless you want to. Plenty of people have gaps in their resumes for various reasons--family issues, career changes, travel plans. A few months or even a year missing on your resume wouldn't raise as many eyebrows as you'd think. You went through something personal and I think it's fair to keep the details to yourself. In the case you are asked about the gap during your interview, you can say it was for health/personal reasons (that are now under control) and most likely no one would push the issue further.

Gap in my resume


Font Viewer not running in Ubunt 16.04 latest version

Question: Downloaded and installed Ubuntu 16.04 from the Ubuntu website 3 days ago. Updated the OS using commands in terminal. I need to install a font Rachana.ttf, which is available on my computer's desktop. But Font Viewer not running? It just shows the busy cursor spinning, but eventually does nothing? Is there a fix?
Even though i right click on the font, the listed menu doesn't show "install font"
Comment: Possible duplicate of [How to install many font files quickly and easily?](http://askubuntu.com/questions/191778/how-to-install-many-font-files-quickly-and-easily)
Comment: Run `sudo apt update && sudo apt upgrade` to get the latest fixed version of `gnome-font-viewer`.
Answer: There is a bug with this issue.
Try to update gnome-font-viewer. Latest version is 3.16.2.
To check version.
gnome-font-viewer --version

If your gnome-font-viewer version is old, update with following command.
sudo apt install gnome-font-viewer

After update try to open your font again.


Keyboard events in a WPF MVVM application?

Question: How can I handle the Keyboard.KeyDown event without using code-behind? We are trying to use the MVVM pattern and avoid writing an event handler in code-behind file.
Comment: To save searchers time reading the responses, the quick answer as of 4/2011 is that this is not possible without code behind. The reason is - KeyDown is an EventTrigger but Conditions are only supported on DataTriggers. This is easily solved with a simple converter, but this is not currently possible with just XAML unless you create an EventTrigger that sets a DataTrigger - but if you do that, then say "goodbye" to readability of your code.
Comment: The leading answer here applies to single key capture only (e.g., the "Enter" key). A more complete and uptodate answer is here: https://stackoverflow.com/a/38433681/93394. (Uses EventTriggers from the Windows Interactivity library to respond to *any* KeyDown event.)
Answer: To bring an updated answer, the .net 4.0 framework enables you to do this nicely by letting you bind a KeyBinding Command to a command in a viewmodel.
So... If you wanted to listen for the Enter key, you'd do something like this:
<TextBox AcceptsReturn="False">
    <TextBox.InputBindings>
        <KeyBinding
            Key="Enter"
            Command="{Binding SearchCommand}"
            CommandParameter="{Binding Path=Text, RelativeSource={RelativeSource AncestorType={x:Type TextBox}}}" />
    </TextBox.InputBindings>
</TextBox>

Comment: This is definitely the proper method as of .net 4. Needs more upvotes
Comment: This works with mouse clicks, too, BTW. Example:
Comment: So as the OP was originally asking, how would you link to this to any text entered? Ie. OnKeyDown event?
Comment: Another note: This does not work with TextBlock, because TextBlock is not focusable. The InputBinding needs to be set on an object higher up in the hierarchy.
Comment: This consumes the input, is there anyway to make a command that just responds to the previewing of a key press so that the normal functionality that would occur with that key will still happen anyway? For example if I want to run a command when the Tab key is pressed on a certain control but I still want the default behavior of tab to function properly (moving focus to the next control in tab order). Using this key binding for the Tab key no longer moves focus when pressing Tab.
Comment: Needed to add `UpdateSourceTrigger=PropertyChanged` to my binding to get this to work. [Thanks to this answer](https://stackoverflow.com/a/37718935/906773).
Comment: For a working version, `Key` value should be `Return`, not `Enter`
Answer: WOW - there's like a thousand answers and here I'm going to add another one..
The really obvious thing in a 'why-didn't-I-realise-this-forehead-slap' kind of way is that the code-behind and the ViewModel sit in the same room so-to-speak, so there is no reason why they're not allowed to have a conversation.
If you think about it, the XAML is already intimately coupled to the ViewModel's API, so you might just as well go and make a dependency on it from the code behind.
The other obvious rules to obey or ignore still applies (interfaces, null checks <-- especially if you use Blend...)
I always make a property in the code-behind like this:
private ViewModelClass ViewModel { get { return DataContext as ViewModelClass; } }

This is the client-code. The null check is for helping control hosting as like in blend.
void someEventHandler(object sender, KeyDownEventArgs e)
{
    if (ViewModel == null) return;
    /* ... */
    ViewModel.HandleKeyDown(e);
}

Handle your event in the code behind like you want to (UI events are UI-centric so it's OK) and then have a method on the ViewModelClass that can respond to that event. The concerns are still seperated.
ViewModelClass
{
    public void HandleKeyDown(KeyEventArgs e) { /* ... */ }
}

All these other attached properties and voodoo is very cool and the techniques are really useful for some other things, but here you might get away with something simpler...
Comment: Always grab a local copy of `ViewModel` instead of calling to the property each time... `var vm = ViewModel;`, from there use **vm** instead of `ViewModel`.
Answer: I do this by using an attached behaviour with 3 dependency properties; one is the command to execute, one is the parameter to pass to the command and the other is the key which will cause the command to execute.  Here's the code:
public static class CreateKeyDownCommandBinding
{
    ///
    /// Command to execute.
    ///
    public static readonly DependencyProperty CommandProperty =
        DependencyProperty.RegisterAttached("Command",
        typeof(CommandModelBase),
        typeof(CreateKeyDownCommandBinding),
        new PropertyMetadata(new PropertyChangedCallback(OnCommandInvalidated)));

    ///
    /// Parameter to be passed to the command.
    ///
    public static readonly DependencyProperty ParameterProperty =
        DependencyProperty.RegisterAttached("Parameter",
        typeof(object),
        typeof(CreateKeyDownCommandBinding),
        new PropertyMetadata(new PropertyChangedCallback(OnParameterInvalidated)));

    ///
    /// The key to be used as a trigger to execute the command.
    ///
    public static readonly DependencyProperty KeyProperty =
        DependencyProperty.RegisterAttached("Key",
        typeof(Key),
        typeof(CreateKeyDownCommandBinding));

    ///
    /// Get the command to execute.
    ///
    /// <param name="sender"></param>
    /// <returns></returns>
    public static CommandModelBase GetCommand(DependencyObject sender)
    {
        return (CommandModelBase)sender.GetValue(CommandProperty);
    }

    ///
    /// Set the command to execute.
    ///
    /// <param name="sender"></param>
    /// <param name="command"></param>
    public static void SetCommand(DependencyObject sender, CommandModelBase command)
    {
        sender.SetValue(CommandProperty, command);
    }

    ///
    /// Get the parameter to pass to the command.
    ///
    /// <param name="sender"></param>
    /// <returns></returns>
    public static object GetParameter(DependencyObject sender)
    {
        return sender.GetValue(ParameterProperty);
    }

    ///
    /// Set the parameter to pass to the command.
    ///
    /// <param name="sender"></param>
    /// <param name="parameter"></param>
    public static void SetParameter(DependencyObject sender, object parameter)
    {
        sender.SetValue(ParameterProperty, parameter);
    }

    ///
    /// Get the key to trigger the command.
    ///
    /// <param name="sender"></param>
    /// <returns></returns>
    public static Key GetKey(DependencyObject sender)
    {
        return (Key)sender.GetValue(KeyProperty);
    }

    ///
    /// Set the key which triggers the command.
    ///
    /// <param name="sender"></param>
    /// <param name="key"></param>
    public static void SetKey(DependencyObject sender, Key key)
    {
        sender.SetValue(KeyProperty, key);
    }

    ///
    /// When the command property is being set attach a listener for the
    /// key down event.  When the command is being unset (when the
    /// UIElement is unloaded for instance) remove the listener.
    ///
    /// <param name="dependencyObject"></param>
    /// <param name="e"></param>
    static void OnCommandInvalidated(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
    {
        UIElement element = (UIElement)dependencyObject;
        if (e.OldValue == null && e.NewValue != null)
        {
            element.AddHandler(UIElement.KeyDownEvent,
                new KeyEventHandler(OnKeyDown), true);
        }

        if (e.OldValue != null && e.NewValue == null)
        {
            element.RemoveHandler(UIElement.KeyDownEvent,
                new KeyEventHandler(OnKeyDown));
        }
    }

    ///
    /// When the parameter property is set update the command binding to
    /// include it.
    ///
    /// <param name="dependencyObject"></param>
    /// <param name="e"></param>
    static void OnParameterInvalidated(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
    {
        UIElement element = (UIElement)dependencyObject;
        element.CommandBindings.Clear();

        // Setup the binding
        CommandModelBase commandModel = e.NewValue as CommandModelBase;
        if (commandModel != null)
        {
            element.CommandBindings.Add(new CommandBinding(commandModel.Command,
            commandModel.OnExecute, commandModel.OnQueryEnabled));
        }
    }

    ///
    /// When the trigger key is pressed on the element, check whether
    /// the command should execute and then execute it.
    ///
    /// <param name="sender"></param>
    /// <param name="e"></param>
    static void OnKeyDown(object sender, KeyEventArgs e)
    {
        UIElement element = sender as UIElement;
        Key triggerKey = (Key)element.GetValue(KeyProperty);

        if (e.Key != triggerKey)
        {
            return;
        }

        CommandModelBase cmdModel = (CommandModelBase)element.GetValue(CommandProperty);
        object parameter = element.GetValue(ParameterProperty);
        if (cmdModel.CanExecute(parameter))
        {
            cmdModel.Execute(parameter);
        }
        e.Handled = true;
    }
}

To use this from xaml you can do something like this:
<TextBox framework:CreateKeyDownCommandBinding.Command="{Binding MyCommand}">
    <framework:CreateKeyDownCommandBinding.Key>Enter</framework:CreateKeyDownCommandBinding.Key>
</TextBox>

Edit: CommandModelBase is a base class I use for all commands.  It's based on the CommandModel class from Dan Crevier's article on MVVM (here).  Here's the source for the slightly modified version I use with CreateKeyDownCommandBinding:
public abstract class CommandModelBase : ICommand
    {
        RoutedCommand routedCommand_;

        ///
        /// Expose a command that can be bound to from XAML.
        ///
        public RoutedCommand Command
        {
            get { return routedCommand_; }
        }

        ///
        /// Initialise the command.
        ///
        public CommandModelBase()
        {
            routedCommand_ = new RoutedCommand();
        }

        ///
        /// Default implementation always allows the command to execute.
        ///
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void OnQueryEnabled(object sender, CanExecuteRoutedEventArgs e)
        {
            e.CanExecute = CanExecute(e.Parameter);
            e.Handled = true;
        }

        ///
        /// Subclasses must provide the execution logic.
        ///
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void OnExecute(object sender, ExecutedRoutedEventArgs e)
        {
            Execute(e.Parameter);
        }

        #region ICommand Members

        public virtual bool CanExecute(object parameter)
        {
            return true;
        }

        public event EventHandler CanExecuteChanged;

        public abstract void Execute(object parameter);

        #endregion
    }

Comments and suggestions for improvements would be very welcome.
Comment: This has been asked before, but where does CommandModelBase come from?   I think I'm missing something...
Comment: I've updated the answer to include a description of CommandModelBase.  I should have included it in the first place.  Hope it helps!
Answer: A little late, but here goes.
Microsoft's WPF Team recently released an early version of their WPF MVVM Toolkit
. In it, you'll find a class called CommandReference that can handle things like keybindings. Look at their WPF MVVM template to see how it works.
Comment: I was just trying that yesterday, and I think it's the cleanest way to bind a key. Unfortunately, there is no way to bind all the keys at once (or I couldn't figure out how), and I need the whole keyboard, so you would have to create a binding for each key and then again all the keys when shift is pressed, and then again when Ctrl is pressed... It gets long. We opted for just having a KeyUp hander in the code behind that calls a method in the VM. Like 5 lines of code instead of all those bindings. And the VM is still unaware of the View.  Thanks for the response
Comment: 2020 Update. The WPF is dead and the posts from the link above are archived and placed here https://archive.codeplex.com/?p=wpf
Comment: Use better KeyBinding Command
Answer: Similar to karlipoppins answer, but I found it didn't work without the following additions/changes:
<TextBox Text="{Binding UploadNumber, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
    <TextBox.InputBindings>
        <KeyBinding Key="Enter" Command="{Binding FindUploadCommand}" />
    </TextBox.InputBindings>
</TextBox>

Answer: I looked into that issue a few months ago, and I wrote a markup extension that does the trick. It can be used like a regular binding :
<Window.InputBindings>
    <KeyBinding Key="E" Modifiers="Control" Command="{input:CommandBinding EditCommand}"/>
</Window.InputBindings>

The full source code for this extension can be found here :
http://www.thomaslevesque.com/2009/03/17/wpf-using-inputbindings-with-the-mvvm-pattern/
Please be aware that this workaround is probably not very "clean", because it uses some private classes and fields through reflection...
Answer: Short answer is you can't handle straight keyboard input events without code-behind, but you can handle InputBindings with MVVM (I can show you a relevant example if this is what you need).
Can you provide more information on what you want to do in the handler?
Code-behind isn't to be avoided entirely with MVVM. It's simply to be used for strictly UI-related tasks. A cardinal example would be having some type of 'data entry form' that, when loaded, needs to set focus to the first input element (text box, combobox, whatever). You would commonly assign that element an x:Name attribute, then hook up the Window/Page/UserControl's 'Loaded' event to set focus to that element. This is perfectly ok by the pattern because the task is UI-centric and has nothing to do with the data it represents.
Answer: I know this question is very old, but I came by this because this type of functionality was just made easier to implement in Silverlight (5). So maybe others will come by here too.
I wrote this simple solution after I could not find what I was looking for. Turned out it was rather simple. It should work in both Silverlight 5 and WPF.
public class KeyToCommandExtension : IMarkupExtension<Delegate>
{
    public string Command { get; set; }
    public Key Key { get; set; }

    private void KeyEvent(object sender, KeyEventArgs e)
    {
        if (Key != Key.None && e.Key != Key) return;

        var target = (FrameworkElement)sender;

        if (target.DataContext == null) return;

        var property = target.DataContext.GetType().GetProperty(Command, BindingFlags.Public | BindingFlags.Instance, null, typeof(ICommand), new Type[0], null);

        if (property == null) return;

        var command = (ICommand)property.GetValue(target.DataContext, null);

        if (command != null && command.CanExecute(Key))
            command.Execute(Key);
    }

    public Delegate ProvideValue(IServiceProvider serviceProvider)
    {
        if (string.IsNullOrEmpty(Command))
            throw new InvalidOperationException("Command not set");

        var targetProvider = (IProvideValueTarget)serviceProvider.GetService(typeof(IProvideValueTarget));

        if (!(targetProvider.TargetObject is FrameworkElement))
            throw new InvalidOperationException("Target object must be FrameworkElement");

        if (!(targetProvider.TargetProperty is EventInfo))
            throw new InvalidOperationException("Target property must be event");

        return Delegate.CreateDelegate(typeof(KeyEventHandler), this, "KeyEvent");
    }

Usage:
<TextBox KeyUp="{MarkupExtensions:KeyToCommand Command=LoginCommand, Key=Enter}"/>

Notice that Command is a string and not an bindable ICommand. I know this is not as flexible, but it is cleaner when used, and what you need 99% of the time. Though it should not be a problem to change.


Do decisions of British courts have any effect on other English speaking jurisdictions around the world today?

Question: I've heard it said that various troubling decisions by British courts would set precedent binding upon many English speaking jurisdictions all around the world. I suppose this is in common law/commonwealth jurisdictions but surely there must be a fork in their respective legal cannons upon obtaining independence from the U.K.? How does this exactly work with many of these states having their own parliaments?
Comment: I don't know enough to offer an answer but the [Judicial Committee of the Privy Council](https://en.wikipedia.org/wiki/Judicial_Committee_of_the_Privy_Council) is potentially relevant
Comment: Are you asking *now* or are you asking for the Pre-Decolonialisation situation, where for example India was a Crown Colony?
Comment: I'm asking about the situation extant now.
Comment: If the common law is preserved and continued, pre-fork British decisions can stay controlling until overturned by domestic statute or domestic court decision.
Comment: What determines if it is preserved? Do you mean by an Act of the state legislature? Can a court overturn a precedent without being superior to that court which set it?
Comment: Short answer: yes. It is at least persuasive authority, especially in non-U.S. common law jurisdictions.
Answer: Contemporary decisions of domestic British courts (e.g. the Supreme Court) are not binding in foreign jurisdictions. They may be persuasive for courts there, because there is a common legal tradition and the U.K. judiciary is often considered to be quite good.
Some countries have preserved a right of appeal to the Judicial Committee of the Privy Council (aka "The Queen in Council"). This body is basically the same judges as the Supreme Court but sitting in a different room. As the JCPC their decisions are precedential in wherever the appeal came from, and potentially elsewhere if the law in question is the same. Corollary: JCPC decisions are not precedential for British courts, unless the JCPC goes out of its way to say so. In these cases, the JCPC applies the law and constitution of the origin country, which can include retained pre-independence British laws as well as the common law. That country could pass a subsequent statute or constitutional act overriding the JCPC's decision (as Parliament could in the U.K.), so that country retains ultimate control even though one of "its" courts is a shared one sitting in London.
This arrangement can cause dissonance. For example, some Caribbean countries would like to execute people, but that is prohibited in the U.K.; the JCPC continues to permit executions to go ahead in some cases, even though that would be illegal if the same judges were in a different room hearing a British case. There are very occasional cases from Brunei, whose law is determined by the Sultan and includes aspects of Islamic law not known in the U.K. legal tradition.
Comment: @Joseph P.
 If this is an "Excellent explanation" the best thanks you can give is to upvote it. If you think it is also **the** answer,  you could and perhaps should "accept" it cy clicking the checkmark to the left of the answer.
Comment: Excellent explanation, bravo!


Reference paper to support information -- energy relation $\left(kT \ln2 \rm\frac{J}{bit}\right)\;.$

Question: In answer to Maxwell's Demon Constant (Information-Energy equivalence) there is stated that one bit of information allows to perform $kT \cdot \ln2$ Joules of work. Which paper supports the thesis? (there are many publications on Maxwell daemon, Szilard engine, Landauer's principle).
Answer: See e.g. page 3 of

http://arxiv.org/abs/0707.3400

It's nonsensical to attribute this simple particular insight to a "discoverer"; all these considerations should be associated with Ludwig Boltzmann who knew the answer even though the information in physics was considered continuous at that time.
One may easily derive the result. For example, put one molecule of an ideal gas in a vessel, learn in which half of the vessel the molecule is (one bit of information), and put a barrier in the middle.
You will be able to allow the molecule to do the work and expand from $V/2$ to the original volume $V$. The molecule will do the work
$$ W = \int_{V/2}^V p\,dV = \int_{V/2}^V \frac{kT}{V}dV = kT \ln \frac{V}{V/2} = kT\ln 2 $$
where I used $pV = NkT$ for $N=1$ molecule of an ideal gas. More generally, you don't have to consider ideal gas. Just recall how work is related to the free energy, $E-TS$. To reduce the entropy of a subsystem by one bit, i.e. by $k\ln 2$ (look at Boltzmann's tomb formula to know why it's this value), we have to do change $E-TS$ by $kT\ln 2$.
Comment: I like nice simple and well explained answers +1
Comment: Dear Pygmalion, I changed one $E$ to $W$. Steffen, information surely "is not" energy. They're different quantities. But much like pretty much any pair of quantities in physics, they may have various relationships and there may exist important true sentences in which both of them appear. At a fixed temperature $T$, as you said, 1 bit allows to perform $kT\ln 2$ of work. But that doesn't mean that energy and information is the same thing, e.g. because $T$ isn't a universal constant. It's the temperature, another quantity. In a similar way, we don't say that voltage and current is the same thing
Comment: One note though, are you using one symbol $E$ for two different quantities?
Comment: @LubošMotl: Doesn't this mean that information is more a controll of energy (which can be prepared via manipulating T), not the energy?
Comment: Nice answer, really. Could you please explain further why you mention free energy $E-TS$ and the necessity to change it by $KTln2$ in order to reduce entropy by one bit? As I understand, Szilárd thought measurement process required dissipation, hence the paradox disolves. However, as shown by Bennett, acquisition of information does not necessarily involve dissipation. It's the necessity to return to a suitable state for measurement which constitutes an irreversible process (since it involves logical irreversibility). What do you think about this?