Professor put me in cc when sending recommendation letter to college I am applying to?

Question: As the title says, I received an email yesterday, presumably I am in Cc of the email that my professor wrote to the university I am applying to. In my understanding there is always some mystery about the letters. But what exactly is the norm here? Does anyone care?
Comment: Was it "cc" or was it "bcc"? You say "presumably"... The recipients might care if they can see your name, but they won't see it if you were "bcc"'d. Please clarify.
Comment: bcc. but I thought sender and actual recipient always see everyone in cc and bcc, only bcc don't see who is in cc? I am confused....
Comment: Everyone can see who is 'cc'-ed. Only the bcc-ed recepient knows that (s)he is bcc, other receipients have no information about him/her. So you have nothing to worry about. :) Good luck.
Comment: I always provide a copy of my recommendation letter to the person I'm recommending. This is in the context of post-docs in the group applying for jobs, so slightly different, but not that different...
Comment: just tested it out in the same email system, you are correct. apologies. i can't personally see if its cc or bcc but i she confirmed it was bcc
Comment: Please see the explanation of [bcc](https://www.lifewire.com/what-is-bcc-blind-carbon-copy-1171131).
Comment: I was confused because when I try to test bcc in gmail I can see my email address that I put in bcc. So I wrongly assumed the school's system is similar.
Comment: Please don't try to "delete" your questions like this. It doesn't work.
Answer: It is becoming more widely accepted that people have the right to be aware which information is kept on them by various organisations, to request access to this information and in some cases to request this information to be deleted (see e.g. FOI for UK, GDPR for EU). So by cc'ing you in, you professor acknowledged your right to access the same information about yourself that (s)he is sharing with the third party.
No, it does not reduce your chances — it is perfectly reasonable for professor  to show the recommendation letter to the candidate, if they wanted to, and in some places it is even required.
Comment: In the U.S., people have, as you said, the right to see their recommendation letters, but they normally waive that right. This practice is so standard that a recommendation for which that right has not been waived might not be taken very seriously. So the OP would have a good reason to worry if this had been a cc rather than a bcc. With a bcc, there's no problem.
Comment: In some "jurisdictions," maybe? Seems like an unusual use of "legislations" to me. Maybe it's a Britishism?
Comment: @AzorAhai No it's just me being dumb. Thanks - corrected.
Comment: Hell, in many cases the recommendation letter is *written* by the candidate ;-)
Comment: @Flyto Well, I wanted to mention this, but at least sometimes people to grumble on it.
Comment: @AndreasBlass The fact that the student was cc'd into the email does not imply that he had not waived his right to see the LoR. Logically, I mean.
Answer: Your comment clarifies that you were blind-copied (BCCed), not open-copied (CCed).  That means that the college you are applying to would have just received a regular letter-of-recommendation with no apparent CC in the list of recipients (i.e., the do not know that this professor copied you into the message).  As to whether this is normal, there is no standard here; it is a matter of discretion.  Professors sometimes give a private letter-of-recommendation without disclosing to the student what they wrote, and sometimes they copy the student into the letter, so he/she can see what they wrote.  When copying the student into the letter, some professors do this via blind-copy, so that the college does not make a negative inference about the candour of the letter.
Answer: I would say NO, it does not reduce your chances.
Why would you think it would?
A letter of recommendation is no secret.
Even though it seems from the comments you were in BCC (so nobody can know).
Maybe think about it this way: You have certain qualities or capabilities. You professor obviously thinks that these qualify you for what ever he is recommending you. So there are no secrets anyway. You and your professor knew your capabilities and now the receiving party knows as well. It should not be a surprise to anyone, that you know why you are recommended.
Comment: As to why it would: The committee may think the professor did not write a wholly accurate letter of recommendation because they also sent it to you (e.g. did not fully describe your flaws; overly praised you, etc.)
Comment: I agree with you, but I am not sure if adcoms do, so I was curious. In the end I don't really care either way


What are the advantages of using PRNG over TRNG?

Question: True random number generators use an unpredictable physical means to generate numbers, whereas pseudo-random numbers utilize mathematical formulas to produce a certain sequence of numbers that will appear random. I know that for PRNGs the efficiency is very high because they tend to generate a large quantity of random numbers in a short amount of time. Beside reproducibility  and efficiency, what are the advantages of using PRNG over TRNG?
Comment: PRNs can be produced programmatically. TRNs require a "physical" entropy source, which can be a "device" or event timing information; the former requires the presence of a specific type of device, the latter breaks the timing-independent abstraction commonly used for programming.  However, the main advantages seem to be reproducibility and data rate.
Answer: It's an apples and oranges comparison.
When you want something to be truly random, you must use a TRNG. Examples include a lottery, or a secret/private key in cryptography.
When you want something repeatable, you must use a PRNG. An example is a large secret keystream for XOR encryption, generated (imperatively: identically) on both the transmit and receive side from a short common shared secret key.

What are the advantages of using PRNG over TRNG?

PRNGs can be portable to different computers and languages. Their implementations are easy to validate. They have a mathematical security definition, and it's easy to make fast PRNGs that experimentally match it (on the other hand, we don't know how to prove that).
TRNGs are not portable (they are not entirely software anyway), and are much more complex (typically there's a hardware source, tests of that at power-up and while in use, and a conditioning stage). It's hard to convince a neutral party that a TRNG works.
In practice, the best choice is almost always a Cryptographically Secure PRNG, seeded by a public constant when one wants repeatability, or seeded by the output of a TRNG (or a secret constant changed manually as needed, perhaps combined with a counter, or time from a truly strictly increasing reference) otherwise. The CSPRNG will mask any small imperfection of the TRNG there will be, and have a high throughput: modern CSPRNG are extremely fast (in the order of 10 CPU cycles per byte generated for Salsa20, which supports "skip-ahead").
Comment: @Pseudonym: Cryptographically Strong PRNGs have matured, and now are quite fast; like 10 cycles per byte for an assembly-language implementation, less than three times that in C. It's uncommon they are a botleneck.
Comment: "the best choice is almost always a Cryptographically Strong PRNG"

That isn't really true. Crypto-strong PRNGs tend to be very expensive, which means they tend to be reserved for situations where security depends on them. In Monte Carlo algorithms where you need a lot of random numbers in a short space of time, for example, they are not very well suited.
Comment: Interesting! A reference would be very helpful here.
Comment: @Pseudonym: I added a [reference](https://cr.yp.to/snuffle/speed.pdf). It's a bit dated (2005), because I wanted something that's truly portable. It sports 10.55 cycles/byte for Salsa20 on Intel Pentium M using 32-bit instructions available on most architectures. Newer [references](https://eprint.iacr.org/2013/759.pdf) will tend to do much better on modern CPUs with SIMD instructions, or specialized ones like AESENC or SHA256RNDS2, but then we loose portability. When instantiated as an easily used CSPRNG, great care is needed so that the interface code does not kill the performance.
Comment: Thank you for that. I did know about ChaCha20, and that it is an order of magnitude slower than general-purpose PRNGs under the same conditions. That certainly makes it competitive, as long as you don't need advanced features like skip-ahead. See, for example, https://www.pcg-random.org/other-rngs.html.
Answer: In a word, no.
Even TRNGs carry artifacts from natural processes which must be filtered out by slow entropy polling, random polling, inversion and XOR from the same source but over two different time periods, using many such sources, and combinations of all of the above.
The time between Geiger counter ticks is an example of truly random events, created as they are from a billion billion radioactive atoms.  It's literally slow entropy polling taken to the extreme!  Although the times are analog, they can be made digital simply by comparing each interval to the preceding one.  If it's longer, it's a 0.  If it's shorter, it's a 1.  By using an even number of multiple independent detectors and timers and XORing the streams, you'll arrive at a string of binary numbers which pass all current and conceivable tests of randomness.
You can achieve the same degree of randomness, however, even if you use fairly deterministic generators, such as those found in Excel, if you "randomize the random."
I've been doing so for several years, and at a rate of over 91 Mbps.
By the way, CSPRNG is not "Cryptographically Strong PRNG."  It's "Cryptographically Secure Pseudo-Random Number Generator."
Comment: "No" is a curious response to a "What are…" question.
Comment: This does not answer the question. Output from generative AI suspected.


Is $\hat t$ orthogonal to the tangent space of the spatial hypersurface?

Question: For a 3-D manifold ($r,\theta,\phi$) and sub-manifold (2-sphere)($\theta,\phi$) , $\hat r$ is orthogonal to both the 2-sphere and tangent space associated with each point of the 2-sphere.
Similarly for 4-D manifold($r,\theta,\phi,t$) ,and sub-manifold(hypersurface)($r,\theta,\phi$) if $\hat t$ is orthogonal to the hypersurface(space like) for which the metric becomes $$ds^2=g(t)dt^2+f(t)\delta_{ij}\gamma_{ij}dx^idx^j$$(no cross terms between  $t$ and $x^{is}$)where $x^i$ are the spatial coordinates ,is it necessary that $\hat t$ is also orthogonal to the tangent space associated with each point of the hypersurface??
Answer: The components of the metric tensor are defined as $g_{\mu \nu} = \partial_\mu \cdot \partial_\nu$, where $\cdot$ is the scalar product and $\partial_\mu$ is a coordinate basis vector.
If a metric has no off-diagonal terms, the coordinate basis vectors are othogonal to each other.
Comment: Yes it is but my question is if $\hat t$ is orthogonal to spatial hypersurface ,then whether $\hat t$ will also be orthogonal to tangent space associated with each point of the spatial hypersurface??
Comment: The tangent space to each point of the spacelike hypersurface is made up of the coordinate bases associated to the coordinates $(r, \theta, \phi)$. A vector, in this case $\hat t$, is orthogonal to a hypersurface, if it is orthogonal to the tangent space of the hypersurface. It is a definition.


Are there two verses anywhere in Tanakh with the same words but different cantillation?

Question: Are there two pesukim anywhere in Tanakh which contain exactly the same words, but which have different cantillation? I am particularly interested in cases where the different cantillation causes the meanings of the two verses to be different; however, given the fact that I have not been able to even find such a case in Tanakh, I will be happy to see an example even if the meaning is not substantively changed by the difference in cantillation.
Comment: I also vote to close as a duplicate of [How many pesukim appear multiple times in Tanach](https://judaism.stackexchange.com/questions/35345/how-many-pesukim-appear-multiple-times-in-tanach)
Comment: @DoubleAA I don't think this question is a duplicate of that question. Granted an answer to this one would be included in that list, but it is a very long list and not easily checked.
Comment: All verses with same words https://judaism.stackexchange.com/q/35345/759 I think this should be closed as a duplicate of that. Any verse here would be included there. Just check the references. I'm also not sure if you're counting a verse in Tehillim also writed in Shmuel, for instance
Comment: how about mayim adirim in shmos and shoftim
Answer: I went through the list of repeated verses from this answer. Besides verses that appear both in Psalms and in the other 21 books (see there for the list), which will obviously have different cantillation (the 21 books use a different cantillation system than Job, Proverbs, and Psalms), there is exactly one example with a cantillation difference between the verses: Exodus 26:2 and Exodus 36:9, and they differ only in the first word.

שמות כו, ב
אֹ֣רֶךְ ׀ הַיְרִיעָ֣ה הָֽאַחַ֗ת שְׁמֹנֶ֤ה וְעֶשְׂרִים֙ בָּֽאַמָּ֔ה וְרֹ֙חַב֙ אַרְבַּ֣ע בָּאַמָּ֔ה הַיְרִיעָ֖ה הָאֶחָ֑ת מִדָּ֥ה אַחַ֖ת לְכׇל־הַיְרִיעֹֽת׃
שמות לו, ט
אֹ֜רֶךְ הַיְרִיעָ֣ה הָֽאַחַ֗ת שְׁמֹנֶ֤ה וְעֶשְׂרִים֙ בָּֽאַמָּ֔ה וְרֹ֙חַב֙ אַרְבַּ֣ע בָּֽאַמָּ֔ה הַיְרִיעָ֖ה הָאֶחָ֑ת מִדָּ֥ה אַחַ֖ת לְכׇל־הַיְרִיעֹֽת׃

If you discount differences of matres lectiones, you'll have a few more verse duplicates (like Ps 105:1 vs Chron 1:16:8). I don't know if you'll find another example among that extended list.
Comment: And wouldn't you believe it, it was literally the last example I checked.


How to morph between two images as an animation?

Question: Say a portrait is in color, and you duplicate it but in black-and-white. How to create an animation as .png using Gimp that cycles between the two images by gradually morphing them together in a loop back-and-forth? Online morphing editor doesn't have an option to save the output.
Comment: if this is for the web, you can uses css filters: `filter: grayscale(100%);` and javascript to alter the percentage vale. just one image.
Answer: There's a plugin for GIMP called G'MIC* which has an animated Morph feature as well as many other filters. It also works in Photoshop and Krita.
Once installed it's located at Filters > G'MIC Qt > Deformations > Morph (interactive).   Instructions appear in the Window of the plugin.  Basically you set it up by applying points to a source image on one layer, and then move them to  a target layer.  For example, this is a horse to cow morph. When you've finished placing all your points hit Q, and it will make the animation.
For something like a colour to black and white morph which is even simpler, you wouldn't need to add these points, and it will just create something like a tween between the two image layers.

Here's the morph animation

*Note: I have no affiliation with G'MIC. Also for animation on the web better to export as GIF. PNG itself is not an animation format, although there is an APNG format, not sure how well supported it is, especially in older browsers.
Here's another example made with the same filter, this one just has four layers to start with, the first is colour, second B&W, third B&W, and the fourth colour. This gives the effect of going from colour to black and white, then back to colour.
Here is the layer arrangement

Now run the Morph (interactive) filter in G'MIC, make sure to set it to "all layers", hit OK, and then close two little preview Windows that open. That will initiate the filter.

To Export do File > Export As, type a new file name and end with the file extension .gif.  Click Export, and choose "as animation", then hit Export
Comment: Steps for where gmic comes in for the steps of approach 2 (manually make 4 layers)?
Comment: Yes, but you only need one colour image, and one black and white image. The others are just duplicates.  Right click the layer, and select Duplicate Layer. I used four layers so that the transitions are of equal duration.
Comment: No i mean where does Gmic come in
Comment: @user610620 - after making the four layers, you run the G'MIC Morph Interactive filter. Sorry I though it was obvious. I've added an explanation to the answer.
Answer: You can't have an animated PNG, there is an APNG format but no well supported. If you want an animation in Gimp, it's either

GIF: very well supported, but limited to 256 colors and no partial opacity,
WebP: supported by all browsers now (but server software may not handle them correctly), has no color or opacity limit, and can do lossless (PNG-like) or lossy (JPEG-like) compression.

For your problem:

Duplicate the image layer, and desaturate it to obtain a grayscale copy
Create N copies of the color layer, and interleave N copies of the grayscale layer (with grayscale on top)
Set the opacity of each grayscale layers to decreasing values
Merge down the grayscale layers into the color layer
Duplicate all layers except first and last and put then on top, in reverse order.

Now,

Steps 2-4 above can be done with the progressive-merge script that you will find here (once installed, it will appear at the bottom of the Image menu in the toolbar)(this script creates a new image)
Step 5 can be done using the mirror-layers script that you'll find at the same place, and which is documented here.

Note: you have to work in "RGB" mode (not color-indexed) because during the construction phase you need partial layer opacity and this isn't supported in color-indexed images. When you export to GIF, the image is automatically color indexed but there are no options. Doing the conversion explicitly before export (Image > Mode > Indexed) gives more options (especially dithering ones).
Comment: Can imgur use webp? Has anybody tested?
Comment: Imgur doesn't support uploads of WebP as far as I can tell. Which is weird, considering that the same Imgur will sometimes reencode your GIF as a WebP.


Quantum thermodynamics: better than classical?

Question: I am wondering about the use of the so-called quantum thermodynamics and its theoretical advantage: can quantum machines outperform the classical analogues (supposing of course the absolute temperature is NOT zero)?
Comment: What is meant by "outperform"?
Answer: tl;dr: The main theoretical advantage of quantum thermodynamics is that it describes systems that classical thermodynamics just can't describe.

You ask whether quantum thermodynamics is or will be better than classical thermodynamics. This seems to be similar to the question whether quantum computation can be better than classical computation - but sadly, I don't think it is.
Classical thermodynamics only works for large systems with a large number of degrees of freedom. It is just not applicable on small scales. The central definitions of thermodynamics such as "work" or "temperature" are fuzzy at best in small systems with only a few degrees of freedom.
Quantum thermodynamics is just a new theory that (often) tries to describe small systems with only a few degrees of freedom in terms that relate to classical thermodynamics.
Thus you can't really compare the two as they work in different realms, although quantum thermodynamics should condense to classical thermodynamics for large systems. Some authors find quantum systems that seem to "outperform" classical systems, but this is nonsensical, because classical thermodynamics just doesn't apply. They only "outperform" if you make a few assumptions about how thermodynamics could be extended to small systems.
But then, why quantum thermodynamics? For many reasons, for instance:

How does it emerge? In particular: Quantum processes are ultimately reversible, classical thermodynamics has mainly irreversible processes. How do those come about?
We increasingly need knowledge of thermodynamics at small scales (think of computer systems for instance). Although there are other tools to investigate these problems, the language and tools from thermodynamics are nice to have, so we'd like to apply them at these scales, too.
Despite the huge success of equilibrium thermodynamics, non-equilibrium thermodynamics still offers plenty of open questions. In contrast to classical thermodynamics, you'll find a lot of quantum thermodynamics papers talking about dynamics. For instance, people like to study thermalization (the process towards equilibrium) a lot. This is just simpler in small systems than it is in large systems.
A lot of quantum thermodynamics actually describes open quantum systems which are studied on their own for various good reasons. People discovered that the classical language of thermodynamics provides a different view so that you can reinterpret certain results and work out different problems that can eventually help to understand open quantum systems better.

And these are just some reasons. Naturally, when a field is very young, there are a lot of "low hanging fruit" which attracts a lot of people and creates a lot of results, not all of which are sound.
Answer: To answer your question I must first clarify some ideas!
Engines transform some form of energy, such as thermal, chemical, mechanical, or electrical energy into useful work. Their efficiency, namely, the ratio of the output work to the input energy, is restricted to 1 at most by energy conservation. Engines converting mechanical energy into work may, in principle, approach unit efficiency. By contrast, the efficiency of heat-to-work conversion in a cyclic heat engine that operates between cold and hot thermal baths is independent of the specific design and limited by the universal Carnot bound. This bound follows from the second law of thermodynamics under the reversibility condition. Over the past two decades, extensive studies of thermal machines in the quantum domain have sought to reveal either fundamentally new aspects of thermodynamics or unique quantum advantages compared to their classical counterparts. The study has shown a remarkable similarity with macroscopic thermodynamical results, thus raising the issue of what is quantum in quantum thermodynamics.
What we have seen is that quantum thermodynamic machines do not rely on quantumness or they are truly quantum, exhibit "quantum advantage" but do not contradict the second law of thermodynamics. By "quantum advantage" I want to mean that some results are the thermodynamical equivalence of all engine types in the quantum regime of small action with respect to Planck's constant. They have the same power, the same heat, and the same efficiency, and they even have the same relaxation rates and relaxation modes.
Yet, despite the great progress achieved, both theoretically and experimentally, the potential of quantum thermal machines for useful quantum technology applications only begins to unfold.


update crypto-config.yaml file and update in the network

Question: Is there a way to update the crypto-config.yaml file and then update it over the network without bringing the network down in hyperledger fabric 1.4.
Comment: It depends on what you're trying to achieve. What changes do you want to do in crypto-config.yaml?
Comment: I am making changes to the crypto-config.yaml while the network is still running. So i will need to re-generate the crypto-config folder right?
Comment: Does my post answers your question?
Answer: If you want to extend your existing fabric network like adding a new peer, then first create artifacts for it.
Adding a new peer:

Increase the peer count in crypto-config.yaml by increasing the value of Template.
Generate certificates for new peer nodes using cryptogen extend --input="crypto-config" --config=config.yaml

where,
--input="crypto-config"  The input directory in which existing network place
--config=CONFIG          The configuration template to use

Add the docker configuration for the new peer and CouchDB(if statedb=couchdb), then run docker-compose -f docker-compose-new-peer.yaml up -d new_couchdb_container new_peer_container.

You won't have to bring down the whole network to add a new peer node.
Refer to this for more information on how to add a new peer.
Comment: You can always create fabric identities using fabric-node-sdk if you're using SDK. Otherwise, you can do it using `fabric-ca-client` binary which is available in fabric-ca container.
Comment: But if while creating the network initially we mention the number users in the crypto-config.yaml. But later on if we would want to add more users than the once we mentioned would the farbric-node-sdk
Comment: So for example bellow is the part of my crypto-config.yaml file:
  - Name: Org2
    Domain: org2.example.com
    EnableNodeOUs: true
    Template:
      Count: 2
    Users:
      Count: 1

So the count of users is 1. And i went ahead and enrolled 1 user. Now i would like to add more new users. Do i need to create the channel artifacts and crypto file again?


What's the difference in closure style

Question: There are two popular closure styles in javascript. The first I call anonymous constructor:
new function() {
  var code...
}

and the inline executed function:
(function() {
  var code...
})();

are there differences in behaviour between those two? Is one "better" over the other?
Answer: Both cases will execute the function, the only real difference is what the return value of the expression may be, and what the value of "this" will be inside the function.
Basically behaviour of
new expression

Is effectively equivalent to
var tempObject = {};
var result = expression.call(tempObject);
if (result is not an object)
    result = tempObject;

Although of course tempObject and result are transient values you can never see (they're implementation details in the interpreter), and there is no JS mechanism to do the "is not an object" check.
Broadly speaking the "new function() { .. }" method will be slower due to the need to create the this object for the constructor.
That said this should be not be a real difference as object allocation is not slow, and you shouldn't be using such code in hot code (due to the cost of creating the function object and associated closure).
Edit: one thing i realised that i missed from this is that the tempObject will get expressions prototype, eg. (before the expression.call) tempObject.__proto__ = expression.prototype
Answer: @Lance: the first one is also executing. Compare it with a named constructor:
function Blah() {
    alert('blah');
}
new Bla();

this is actually also executing code. The same goes for the anonymous constructor...
But that was not the question ;-)
Answer: They both create a closure by executing the code block. As a matter of style I much prefer the second for a couple of reasons:
It's not immediately obvious by glancing at the first that the code will actually be executed; the line looks like it is creating a new function, rather than executing it as a constructor, but that's not what's actually happening. Avoid code that doesn't do what it looks like it's doing!
Also the (function(){ ... })(); make nice bookend tokens so that you can immediately see that you're entering and leaving a closure scope. This is good because it alerts the programmer reading it to the scope change, and is especially useful if you're doing some postprocessing of the file, eg for minification.
Answer: Well, I made a page like this:

Surprisingly enough (to me anyway) it alerted both "method 1" and method 2".  I didn't expect "method 1" to be alerted.  The difference was what the values of a and b were.  a was the function itself, while b was the string that the function returned.
Answer: Yes, there are differences between the two.
Both are anonymous functions and execute in the exact same way. But, the difference between the two is that in the second case scope of the variables is restricted to the anonymous function itself. There is no chance of accidentally adding variables to the global scope.
This implies that by using the second method, you are not cluttering up the global variables scope which is good as these global variable values can interfere with some other global variables that you may use in some other library or are being used in a third party library.
Example:

In the above code the output is something like:

Hello Inside Function
  Hello Outside Function
  World Inside Function

... then, you get an error as 'b' is not defined outside the function!
Thus, I believe that the second method is better... safer!
Comment: -1 This is due to omitting "var" before "a" making it global and is unrelated to the question.

What's the difference in closure style


SharePoint 2010 - Documents Opening Slowly in Office 2010 & 2013

Question: Recently Documents have been opening extremely slowly on computers that are on the immediate network from the SharePoint servers. It is happening in Office 2010 and Office 2013. At times it can be about 30 seconds after confirming to open the document before it launches the appropriate application. Interesting to note, a computer that is not on the domain but is accessing via VPN is able to open the same documents instantaneously. Documents are coming from a document library and are only Office files. The problem does not seem to occur on .PDF or Image files that are held in the same library.
Thus far:

Attempted Fiddler to look into authentication issues. - None found
Ran Developer tools on IE11 to try to narrow down a particular script
that hangs - None Found
Disabled McAfee on both server and workstation to rule out on access
scanning causing issues - No Resolution
Updated Content Databases and installed latest hotfixes on SharePoint
Farm
Verified latest version of Office 2010 and Office 2013 are installed
Lowered the settings for Office Upload Tool to removing caching and
duplicate files being held.
Unchecked "Auto Detect Proxy" in IE

Any assistance or ideas would be great, I've run out of ideas.
Answer: I know there are some issues with certain antiviruses. But If you're using Windows Vista/7 or above, you might be having problems because there are dots in your SharePoint URL (go figure :))
This fix worked for me
http://www.sharepointboris.net/2010/03/windows-7vista-trouble-with-sharepoints-explorer-view-and-office-documents-freezing-or-prompting-for-user-credentials/


Cartan-Hadamard Theorem

Question: Can someone point out the gap in this argument. Consider a simply-connected Lie group with the (-)-connection. This connection is flat and so the sectional curvatures are zero. Then, by the Cartan-Hadamard theorem and simple-connectedness, the Lie group must be diffeomorphic to ${\Bbb R}^n$. However, I don't think that this is correct without an addition assumption of solvability or nilpotency. What's wrong here?
Comment: Which flat connection do you have in mind?  E.g. if $G = SU(2)$, which is $S^3$ topologically, then the $G$-invariant metric is just
the standard spherical metric, which is not flat.  More generally, if $G$ is not abelian, then non-trivial commutators in $G$ will correspond to non-trivial curvature for the Levi--Civita connection on $G$.
Comment: Emerton, the connection I had in mind was the (-)-connection (the minus connection). However, as you've all pointed out, the theorem applies to a Levi-Civita connection. Thanks.
Answer: As Emerton pointed out, you need to be careful about the connection.  Cartan-Hadamard theorem is a statement  involving the curvature of the Levi-Civita connection  determined by some metric.
If $G$ is a Lie group equipped with a bi-invariant metric $h$, then this metric  induces  a metric $\langle-,-\rangle$ on the Lie algebra $T_1G$.   Given two unit orthogonal  vectors $X,Y\in T_1G$ that span a plane $\pi\subset T_1G$, then the sectional curvature of $h$ at $1$ along the plane $\pi$ is  given by
$$ K_1(\pi)=\frac{1}{4}\langle\;[x,y],[x,y]\;\rangle$$.
We see  from the above equality that the sectional curvature everywhere $\leq 0$ iff  the  Lie algebra is Abelian.
For  metrics on $G$ which are only  left invariant the computations of curvatures are a bit more complicated   and you can find more details in   John Milnor's paper, Curvatures of left invariant metrics on Lie groups, Adv. in Math., vol. 121(1976), p. 293-329.
Comment: Thanks Liviu for your helpful response. I suspected that it wasn't enough to just have a connection but didn't know what was missing.
Answer: Your connection is not Riemannian; it has torsion, so cannot be the Levi-Civita connection of any Riemannian metric. The Cartan-Hadamard theorem isn't even true in Lorentzian geometry, and so you wouldn't expect it for a flat connection which isn't torsion free.
Comment: Thanks Ben. I didn't look at the Cartan-Hadamard theorem close enough to see that it refers to a Levi-Civita connection.

Cartan-Hadamard Theorem


Who cut off Zephyr's arm?

Question: After watching One Piece Film: Z it was stated during the movie that a pirate cut off Zephry's arm and killed most of his crew of Marines in trainging. This pirate was later invited to be one of the Shichibukai. Is there any source that states which one of the Shichibukai that it was? I was unable to find anything on his wiki page I thought that maybe Oda might have stated it somewhere else.
Answer: The answer hasn't been officially stated, but we do have elements that allow us to narrow the Shichibukai down.
According to Volume 1000, the pirate who cut off Z's arm was promoted to a Shichibukai "one year ago", which means during the timeskip. This rules out any of the original seven as well as Blackbeard, and only leaves Buggy, Trafalgar Law, and Edward Weevil.
From there, only speculation can be used, as no further official details have been revealed. Since Buggy is relatively weak even in the present day, compared to Z who was already Admiral-level when his arm was cut, it can be assumed he didn't do it, unless he got extremely lucky.
Still according to Volume 1000:

Zephyr became an Admiral at age 38, during Gol D. Roger and Edward
  Newgate's golden age. By this time, he had become very popular with
  his subordinates. He got married, and a year later, his son was born.
Zephyr's happiness was ended prematurely when a pirate murdered his
  wife and son three years later. Zephyr wanted to resign from the
  Marines, but he was eventually persuaded to stay as an instructor. He
  trained many cadets, most of whom would ascend the Marines bureaucracy
  in both power and status.
Twenty-three years after the death of his loved ones, Zephyr's arm was
  cut off by a pirate who had a Devil Fruit power, and his entire
  division was massacred with only Ain and Binz surviving.

(Source: One Piece Wikia article on Zephyr)
This means Z's arm was cut off nine years ago, which means in turn that Law was around 17 years old. While it is likely Law was strong even back then, it is unlikely that he was the one who did it, as Z was already a former Admiral, and Law couldn't defeat Vergo until present day, after Vergo became Vice-Admiral.
This leaves Weevil, whose past is still largely unknown and whose strength is immense, as the most likely man to have cut off Z's arm, but until there is official proof to confirm or deny anything, it can only remain speculation at this point.
Comment: unless he got extremely lucky... Buggy is always lucky I think...
Answer: We haven't met the Warlord that took Zephyr's arm yet. These are the Warlords after the time skip:

Dracule Mihawk
Donquixote Doflamingo
Boa Hancock
Trafalgar D. Water Law
Buggy The Clown
Edward Weevil
???

However, as of chapter 908, it's revealed that,

 Bartholomew Kuma lost his Shichibukai title during the time skip and became a slave to the Celestial Dragons. Since Doflamingo & Law have both lost their titles as well, there are only 4 Warlords we know of.

I'm guessing Oda did things this way so that no one can narrow down the answer once we meet the 3 remaining Shichibukai.
Answer: I think it should be Doflamingo. Doflamingo's powers can easily cut of Z's hand and the government wouldn't want someone who cut off an admiral's hand to become a shichibukai. And Doflamingo had threatened the government to make him a shichibukai, hence I think it most likely would be Doflamingo.

Who cut off Zephyr's arm?


Why does Russia require international companies to store their data on servers in country?

Question: Why does Russia require international companies to keep user data on servers within the country?
Comment: Generally, on this site, we can address questions about *what* the law says, but questions about *why* it says it are off topic.  Sometimes questions like that are a good fit at http://politics.stackexchange.com, but be sure to read their [topic guidelines](http://politics.stackexchange.com/help/on-topic) before posting.
Answer: Simply because it makes it an easy matter for the Russian government to gain access to the data on those servers in the event it chooses to.  I don't think Vladimir Putin would hesitate for one second about using force to seize them if he were to get it in his head to, which could never happen if the computers were outside the country.  If the servers were located outside of Russia then Russia would have to rely on the willing cooperation of both foreign companies and governments to obtain any information residing on the servers, which I think would be pretty much a non-starter.
Comment: My biases say your answer is correct, but it is worded in a very political way which ignores other possibilities and vilifies Russia.  Other countries justify similar (but usually not as draconian) laws under the guise of consumer protection (ie preventing data falling into hands of big-bad other country spying - particularly taking into account the US Patriot Act).  It could also be used as a way to increase jobs in Russia buy forcing big providers to buy up and use local cloud services, while at the same time reducing the size of expensive Internet connections.
Comment: You're correct in all that you say, but the OP asked specifically about Russia, not countries in general.  As for "villifying" Russia, it would be naive to assume their intentions were so cavalier toward job creation and ignore the elephant in the room, which would be the government's desire to control and easily access data.  I could attribute less evil intent to their actions, but that would be naive in the face of how they've acted (DNC hack, etc.) when it comes to data.  Other countries do the same, but the OP asked about Russia in particular.


Mass scales in See-saw mechenism

Question: Are both types of Majorana masses $$\mathcal{L}^L_M=-\frac{m_L}{2}[\overline{(\psi_L)^c}\psi_L + \overline{\psi_L}(\psi_L)^c]$$ and $$\mathcal{L}^R_M=-\frac{m_R}{2}[\overline{(\psi_R)^c}\psi_R + \overline{\psi_R}(\psi_R)^c]$$ $SU(2)\times U(1)$ invariant? If not, then both the masses must arise by $SU(2)\times U(1)$ symmetry breaking and both the mass scales are fixed by electroweak symmetry breaking scale. Right? Then why does one take $m_R>>m_L$ in see-saw mechanism? Why should we assume $m_R$ is around the GUT scale?
Answer: In this context, the right-handed neutrino is a singlet under the Standard Model gauge groups. Only the right-handed neutrino is allowed a Majorana mass. The left-handed term is not gauge invariant. If the SM and right-handed neutrino fields were embedded into a Grand Unified gauge group, the right-hand term would break that symmetry. It is expected therefore that $m_R\sim m_{GUT}$.
Comment: The left-hand is an SU(2) doublet with nonzero U(1) hypercharge. The right hand is a singlet. The Major an a masses don't contain $\sim\psi^*\psi$, but $\sim\psi\psi$, so they are not invariant.
Comment: Why do you say that the left-handed term is not gauge invariant but the right-handed is? @innisfree

Mass scales in See-saw mechenism


How to create your own domain name from your IP and map/sync that with DNS server?

Question: Is there any way to create your own domain name instead of purchasing???
Comment: Not entirely. You can get a free one but more of a sub domain. Check out afraid.freedns.org and noip.com
Answer: The Internet Corporation for Assigned Names and Numbers (ICANN) is the international governing body that has responsibility managing the Domain Name System (DNS). Basically they sell the rights for registering domain names to corporations (click here for a full list of domain registrars). You can become a registrar, but it's probably not something you want to do if you're only after registering a few domain names.
Some solutions that might work locally (on your home / office network):

You could set up a DNS server on your network.
You could also edit <code>/etc/hosts</code> but that will only work on the computers you do it on. If you are managing a large number of computers, consider using a DNS server instead.

Or you could check out services that provide free DNS services, such as no-ip.com, as mentioned in the comments.
Finally, there are illegal solutions which will land you in jail in short order, a very bad deal instead of paying $2 or so.
Comment: Ooo that means I don't have rights to create my own domain name of my IP... and how Go Daddy and big rocks and other provid us domain name for our IP??
Comment: I've edited my answer to give some enlightenment on how the domain registration system works.
Comment: No problem. (Added a new more things.)


any tool for java object to object mapping?

Question: I am trying to convert DO to DTO using java and looking for automated tool before start writing my own. I just wanted to know if there any free tool available for the same.
Comment: Here is an article with different frameworks and performance comparison. https://www.baeldung.com/java-performance-mapping-frameworks
Comment: Jackson (the JSON library) has a method `new ObjectMapper().convertValue(...)`. Jackson also has support for annotations and annotation-mixins so I find it a very good option.
Comment: I readed all answers from this article, and decided to use [`MapStruct`](https://github.com/mapstruct/mapstruct) :)
Answer: There are some libraries around there:

Commons-BeanUtils: ConvertUtils -> Utility methods for converting String scalar values to objects of the specified Class, String arrays to arrays of the specified Class.
Commons-Lang: ArrayUtils -> Operations on arrays, primitive arrays (like int[]) and primitive wrapper arrays (like Integer[]).
Spring framework: Spring has an excellent support for PropertyEditors, that can also be used to transform Objects to/from Strings.
Dozer: Dozer is a powerful, yet simple Java Bean to Java Bean mapper that recursively copies data from one object to another. Typically, these Java Beans will be of different complex types.
ModelMapper: ModelMapper is an intelligent object mapping framework that automatically maps objects to each other. It uses a convention based approach to map objects while providing a simple refactoring safe API for handling specific use cases.
MapStruct: MapStruct is a compile-time code generator for bean mappings, resulting in fast (no usage of reflection or similar), dependency-less and type-safe mapping code at runtime.
Orika: Orika uses byte code generation to create fast mappers with minimal overhead.
Selma: Compile-time code-generator for mappings
JMapper: Bean mapper generation using Annotation, XML or API (seems dead, last updated 2 years ago)
Smooks: The Smooks JavaBean Cartridge allows you to create and populate Java objects from your message data (i.e. bind data to) (suggested by superfilin in comments). (No longer under active development)
Commons-Convert: Commons-Convert aims to provide a single library dedicated to the task of converting an object of one type to another. The first stage will focus on Object to String and String to Object conversions. (seems dead, last update 2010)
Transmorph: Transmorph is a free java library used to convert a Java object of one type into an object of another type (with another signature, possibly parameterized). (seems dead, last update 2013)
EZMorph: EZMorph is simple java library for transforming an Object to another Object. It supports transformations for primitives and Objects, for multidimensional arrays and transformations with DynaBeans  (seems dead, last updated 2008)
Morph: Morph is a Java framework that eases the internal interoperability of an application. As information flows through an application, it undergoes multiple transformations. Morph provides a standard way to implement these transformations. (seems dead, last update 2008)
Lorentz: Lorentz is a generic object-to-object conversion framework. It provides a simple API to convert a Java objects of one type into an object of another type. (seems dead)
OTOM: With OTOM, you can copy any data from any object to any other object. The possibilities are endless. Welcome to "Autumn". (seems dead)
Comment: Another option for Java 8+: http://erchu.github.io/bean-cp/ (disclaimer: I'm the author of this project)
Comment: Commons-Convert seems not just dormant but completely gone now ...
Comment: @TmTron: Done and I edited the answer to remove the strike and reference the repo URL (since the main page still references 0.7.5)
Comment: none of the list supports annotation :(
Comment: Actually, if you want to add Moo to your list, then I can remove my answer, since your answer is clearly far more complete. ;)
Comment: @RN. Dozer supports annotation since version 5.3.2 (it didn't when you wrote your comment, but nice to know for people who are looking up this answer).
Comment: One more options is http://jtransfo.org/. this allows you to define the mapping using annotations on the TO. It has the additional feature of allow optional conversion of fields based on tags which are passed when doing the conversion.
Comment: Thanks. But it would be even more useful if this answer was split into multiple single-framework answers. In that case votes would show their actual popularity.
Comment: Wouldn't consider Smooks since it's itroducing more problems. As i can see it's not developing, also it has no support of 3rd party frameworks (like JodaTime). Exception handling is awfull and doesn't provide meaningfull explanations. It's almost impossible to find even simple solutions for your problems (looks like developer don't use it much)
Comment: Another one to add to the list https://github.com/amgohan/zebra/ :
DIY objects mapping and use zebra for unified way to inject mappers.

for the sake of performance, you do objects mapping manually and don't know how organize your mappers. Zebra come with a simple and unified way to :
- create your mappers
- manage one way and reverse mapping in one class
- register your mappers and reuse them anywhere in your application
- manage deep mapping
Comment: Another option is jTransfo (http://jtransfo.org).
jTransfo uses annotations on the DTO objects. It has good integration with Spring Framework, CDI and Hibernate. It also has some specific features which can help for security.
See also: https://www.parleys.com/tutorial/quickie-jtransfo-converting-between-transfer-domain-objects
Comment: You can also use Bull https://github.com/HotelsDotCom/bull
Answer: You could try Dozer.

Dozer is a Java Bean to Java Bean
  mapper that recursively copies data
  from one object to another. Typically,
  these Java Beans will be of different
  complex types.
Dozer supports simple property
  mapping, complex type mapping,
  bi-directional mapping,
  implicit-explicit mapping, as well as
  recursive mapping. This includes
  mapping collection attributes that
  also need mapping at the element
  level.
Comment: A very very long time after, I come to make an update, I hope my comment will be read : Now Dozer seems to be a dead, and a good option is to use MapStruct, it's easy (support annotations), fast (no reflection) and seems secure (at the moment). This is included in the @Pascal Thivent list although, but I advise it (even if I had some problems by using it along with lombok).
Comment: Dozer seems revived with version 6: https://mvnrepository.com/artifact/com.github.dozermapper/dozer-core
Comment: [The project is currently not active and will more than likely be deprecated in the future. If you are looking to use Dozer on a greenfield project, we would discourage that. If you have been using Dozer for a while, we would suggest you start to think about migrating onto another library, such as: mapstruct, modelmapper](https://github.com/DozerMapper/dozer)
Answer: Another one is Orika - https://github.com/orika-mapper/orika

Orika is a Java Bean mapping framework that recursively copies (among other capabilities) data from one object to another. It can be very useful when developing multi-layered applications.
Orika focuses on automating as much as possible, while providing customization through configuration and extension where needed.
Orika enables the developer to :

Map complex and deeply structured objects
"Flatten" or "Expand" objects by mapping nested properties to top-level properties, and vice versa
Create mappers on-the-fly, and apply customizations to control some or all of the mapping
Create converters for complete control over the mapping of a specific set of objects anywhere in the object graph--by type, or even by specific property name
Handle proxies or enhanced objects (like those of Hibernate, or the various mock frameworks)
Apply bi-directional mapping with one configuration
Map to instances of an appropriate concrete class for a target abstract class or interface
Handle reverse mappings
Handle complex conventions beyond JavaBean specs.

Orika uses byte code generation to create fast mappers with minimal overhead.
Comment: you could provide a few words about orika - what makes it different from the others
Comment: It's probably much faster than Dozer - dozer is quiet slow.
Comment: It seems Orika is discontinued.
Answer: My ModelMapper is another library worth checking out. ModelMapper's design is different from other libraries in that it:

Automatically maps object models by intelligently matching source and destination properties
Provides a refactoring safe mapping API that uses actual code to map fields and methods rather than using strings
Utilizes convention based configuration for simple handling of custom scenarios

Check out the ModelMapper site for more info:
http://modelmapper.org
Answer: Use Apache commons beanutils:

static void copyProperties(Object dest, Object orig)
  -Copy property values from the origin bean to the destination bean for all
  cases where the property names are the
  same.

http://commons.apache.org/proper/commons-beanutils/
Comment: yeh,but properties that are in the source bean, but do not in the destination bean are simply ignored. Thanks anyways Pablojim :) I think I have to go with Dozer since we have some property names different for DO and DTO :(
Comment: Fair enough - I didn't know this... Pascal's list was pretty impressive!
Answer: There is one more Java mapping engine/framework Nomin: http://nomin.sourceforge.net.
Answer: I suggest you try JMapper Framework.
It is a Java bean to Java bean mapper, allows you to perform the passage of data dynamically with annotations and / or XML.
With JMapper you can:

Create and enrich target objects
Apply a specific logic to the mapping
Automatically manage the XML file
Implement the 1 to N and N to 1 relationships
Implement explicit conversions
Apply inherited configurations
Answer: I'm happy to add Moo as an option, although clearly I'm biased towards it:
http://geoffreywiseman.github.com/Moo/
It's very easy to use for simple cases, reasonable capable for more complex cases, although there are still some areas where I can imagine enhancing it for even further complexities.
Answer: You can also try mapping framework based on Dozer, but with Excel mapping declaration. They've got some tools and additional cool features.
Check at http://openl-tablets.sf.net/mapper


Violin peg is stuck, won't move at all

Question: My problem isn't that the pegs are slipping or loose, but that they're stuck. I am afraid I'll break it if I pull too hard. Please help.
Comment: Probably really obvious, put did you trying pushing in and then turning?
Answer: First thing: pegs are relatively cheap, even including the cost of getting them fitted by a luthier (which you absolutely must do if replacing a peg).  So start, as LP suggests, by trying a little bit of dehumidification (NOT an oven!!) to see if that helps.  Then use a wood-jawed clamp or soft-mouth pliers to apply more torque and see if you can twist the peg loose. Make sure your other hand is holding the peg-box so that the torque doesn't transfer to the box -to - neck joint.
Don't bother trying to drill out the peg, because again there's significant risk of damaging the violin itself.  Let the luthier work his "magic."
One last thing: don't get creative and try dripping oil or  the kinds of solvents used to free up frozen metal screws in machines.  Those will damage the violin wood.
Answer: If this is a valuable instrument then it's certainly best if you let a professional luthier fix it. They know how to unstick pegs safely and to treat them so they will have just the right amount of friction.
What I personally would do – but have never done with a violin, so take it with a grain of salt – is hammer the peg out from the other side. To do this, rest the violin head sideways on a thin piece of wood, e.g. a ruler sitting on its edge on a stack of books. The violin body is best placed on a pillow. Make sure the ruler doesn't fall over – either span it in an F-clamp, or let somebody else hold the ruler and violin in place while you're aiming on the peg. The ruler should touch the violin head right next to the peg in question. The peg itself should "hang in the air". Make sure the height of the book-stack is so that the violin neck is horizontal.

Then you need a wood pin to transmit the hammer force onto the peg. One of those pencil-thick ca. 4 cm long ones that are used to stick furniture together would work well, or you can saw off a similar piece from an actual pencil. The lid of a felt-tip could also be usable, but it can't be too soft plastic.
For the blow itself – on my cello I would use an actual rubber hammer, but for violin it's probably better to try it with the handle of a butter knife. Don't be tempted to use something blunter that you can't properly aim with (such as the bottom of a glass or a stone) – it's safest for the violin if the blow is with something light but fast (because that minimises the ratio of momentum to energy).
Comment: "One of those pencil-thick ca. 4 cm long ones that are used to stick furniture together" is called a **dowel**. You can buy packs of them in DIY and some hradware stores.
Comment: I would not recommend hammering -- ever - because the risk of secondary damage to the pegbox is too great.
Comment: @CarlWitthoft rather expected that comment from someone who's not a physicist! –The point being, although the word "hammer" certainly looks scary next to "violin", it actually does a very good job of concentrating the force only where you need it. So, the risk is mainly in missing the peg.
Comment: @leftaroundabout  As a professional repair technician and luthier, I would not recommend attempting to hammer the peg out from the end.  Without examination there is no way to tell why the peg(s) are stuck, and an attempt to dislodge the peg from the narrow end, across the gap of the peg box through two points of contact would be dangerous, especially for someone with no experience working on delicate instruments.  If it looks like someone has been putting rosin on the pegs to keep them from slipping, I use a special heat pad and a peg clamp to heat and rotate the peg.
Comment: @leftaroundabout  whatever gave you the Idea I'm not a physicist ?   Which I am, FWIW.    Force concentration is not my concern: it's how to properly cradle the pegbox so that it's held fast  **and** in a way which eliminates torquing from the hammer blow as well as avoiding any possible crush damage.
Answer: Sometimes a day in a dryer environment will release it.
If woodworking is your skill, you might even drill out the peg.   But be careful.  The peg is expendable, cheap to replace.  But you don't want to split the peg box or damage the peg hole.
Can you get it to an expert?
Answer: There are only a few reasons why your pegs would be stuck and feel like they are locked in position. If rosin or peg drops have been applied in an attempt to make the pegs slip less and they have been sitting for a long time the rosin can act like a glue and keep the pegs from moving freely.
If you have a "budget" instrument that has painted pegs rather then hardwood pegs, the paint can bond to the peg box wood, especially when there is extra humidity, heat, or time.
The peg holes or the pegs may also be slightly out of round, causing locking because of the oblong shape.
To free the pegs you need to apply a good amount of force. If you keep the rotation of the peg along the axis of the peg you should be safe from splitting or damaging the peg box. Make sure you don't apply pressure sideways on the peg. Twist and pull in a straight line directly away from the peg box.  You can use a sharp yank and pull to break any adhesion the peg may have in the peg holes.
If you can't get a good grip on the pegs, you can use a piece of leather or a thick layer of fabric with a pair of pliers to grab the peg head and apply leverage. Grab the peg and twist and pull outward from the peg box in the loosening direction, usually towards the violin body over the top, but check that your strings are wound the correct direction.
A sharp attack in the loosening direction should free the pegs from the box. If the pegs deform or flex when you attempt this and don't loosen, stop and seek professional repair.
Answer: You could try using pencil lead on the stuck pegs. Just scribble a little on the peg as close as you can to where it meets the instrument, and the graphite will help reduce friction. That's what my orchestra teacher always used on the stuck cello pegs, worked like a charm and didn't damage the instrument. Even if this doesn't work to get the peg unstuck, do it before putting the peg back in to prevent the problem from happening again.

Violin peg is stuck, won't move at all


Algorithms for minimizing Moore automata

Question: Brzozowski's algorithm can be extended to Moore automata but its time complexity is exponential in general. Is there any other algorithm for minimization of Moore automata? What are the running times of these algorithms if any?
Comment: Welcome to SE Computer Science. Since you apparently did not yet read
the presentation of the site, you should know that it is a cooperative
work, based on technical exchange between users asking questions and
users who provide answers or comments. Thus it is consider proper to
answer users asking for more details in comments, to upvote good
answers or good comments (or other interesting questions or answers
that you read), and ultimately to accept the answer you consider best
for your questions by clicking the "check sign" (like a V) of the left
of the chosen answer.
Comment: Which Brzozowski's algorithm are you referring to? The one using  derivatives of regular expressions?
Comment: Was the answer any use to you?
Answer: The original DFA minimization algorithm was actually designed for Moore Machines, guided by their apparently more observable behavior.
But the algorithm presented here is a reconstruction from the DFA minimization,
since I discovered the historical evidence after the fact.
After Wikipedia (with some notational changes):

A Moore machine can be defined as a 6-tuple $(Q, q_0, \Sigma, \Pi, \delta, \gamma)$ consisting of the following:

a finite set of states $Q$
a start state (also called initial state) $q_0$ which is an element of $Q$
a finite set called the input alphabet $\Sigma$
a finite set called the output alphabet $\Lambda$
a transition function $\delta : Q \times \Sigma \rightarrow Q$ mapping a state and the input alphabet to the next state
an output function $\gamma : Q \rightarrow \Pi$ mapping each state to the output alphabet

From this definition, a Moore machine is a deterministic finite state
transducer.
I have no reference for minimization of Moore automata. However it
seems not too hard to imagine an algorithm, derived from the algorithm used for
deterministic finite state automata.
The idea in DFA minimization is based on the Myhill-Nerode
characterization of regular languages.

Given a language $L$, and a pair of strings $x$ and $y$, define a
    distinguishing extension to be a string $z$ such that exactly one of
    the two strings $xz$ and $yz$ belongs to $L$. Define a relation
    $R_L$ on strings by the rule that $x R_L y$ iff there is no
    distinguishing extension for $x$ and $y$. It is easy to show that
    $R_L$ is an equivalence relation on strings, and thus it divides the
    set of all strings into equivalence classes.
The Myhill-Nerode theorem states that $L$ is regular if and only if
    $R_L$ has a finite number of equivalence classes, and moreover that
    the number of states in the smallest deterministic finite automaton
    (DFA) recognizing $L$ is equal to the number of equivalence classes
    in $R_L$.

Indeed each state $q$ of the smallest DFA is such that $W_q$ as
defined above is one of the equivalence classes for the relation $R_L$.
For a non-minimal DFA for the regular language $L$,
it is easy to show that each set $W_q$ contains
strings that all belong to a same equivalent class with respect to
$R_L$.
Hence, the minimization of the DFA actually consists of merging states
(considered as sets of equivalent strings), whenever it is shown that
two distinct states contain equivalent strings.
Two reasonably fast algorithms exists for that purpose, Moore
algorithm (1956) which is in time $O(n^2)$ and Hopcroft's algorithm
(1971) in time $O(n\log n)$.
The extension to Moore automata is best understood in redefining the
equivalence relation as $R_T$ for a transducer $T$. The relation $R_L$
was concerned with whether future input would lead equivalently to an
accepting state. The $R_T$ equivalence relation of Moore automata is
concerned with whether future input will produce the same output.
Hence, given a transducer $T$, and two strings $x$ and $y$, we define a
distinguishing extension to be a string $z$ such that $T(xz)=T(x)u$
and $T(yz)=T(y)v$ with $u\neq v$, i.e. such that the output behaviour
of the transducer differs for $z$ depending on whther it is following
$x$ or $y$.
Again, $R_T$ is an equivalence relation, dividing all strings in
$\Sigma^*$ into equivalence classes. In the case of a Moore machine,
these classes will again correspond to state of the minimal
transducer.
The following algorithm mimics the Moore algorithm for DFA minimisation.
We define an initial partition $\mathcal P$ of $Q$  into classes of states $S_e$ as follow:
$\forall e\in\Pi:\; S_e=\{q\in Q\mid \gamma(q)=e\}$
Then we split the classes in $\mathcal P$ as follows:
repeat successively for each class of states $S$, until none
  changes
$\ \ $ repeat $\forall a\in\Sigma,\;$
$\ \ \ \ $ If $ \exists S'\in \mathcal P,\; \forall q\in S,\;
\delta(q,a)\in S'$  then do nothing
$\ \ \ \ $ else split $S$ into subsets $S_i$ such that
$\ \ \ \ \ \ $ for each
  subset $S_i$,  there is a different class $S'\in \mathcal P$ such that $ \forall q\in S_i,\;
\delta(q,a)\in S'$
$\ \ \ \ \ \ $ (the subsets $S_i$ replace $S$ in $\mathcal P$)
When there is no class left that needs to be split, the remaining
classes of states will form the states of the minimal Moore
machine.
By construction, all states in a class have the same output which is
the output for the class.
Similarly, for any input $a\in\Sigma$, all states in a class go to some
state in the same other class, which defines the transition function
for the minimal Moore machine.
Complexity analysis:
Let $n=|Q|$ be the number of states, and $s=|\Sigma|$ the size of the input alphabet.
The main loop is executed at most $n$ times, since each iteration must
split at least one class of states, and each class contains at least
one state. Each iteration of the loop examines each state a finite
number of times, and in proportion to the number of input symbols. Hence the complexity of the algorithm is $O(sn^2)$,
the same as that of the DFA minimization algorithm that served as a guideline
for this one.
I do not have any reference for this minimization of Moore
machines. Possibly it is included in his paper:

Moore, Edward F (1956). "Gedanken-experiments on Sequential Machines". Automata Studies, Annals of Mathematical Studies (Princeton, N.J.: Princeton University Press) (34): 129-153.

This paper is the main reference introducing Moore Machines. It is also the reference for Moore's DFA minimization algorithm. It should thus be surprising if the adaptation of the algorithm to the
minimization of Moore Machines were not at least suggested in that
paper. I did check the paper, and the version of the minimization
algorithm that is presented is actually for Moore machines, not for
DFA. The paper is well written, but the style of the time makes it a
bit harder to read. It is interesting to see that many of the ideas of the Myhill-Nerode theory of Finite State Machines are already sketched in this paper.
The more recent $O(sn\log n)$ algorithm due to John Hopcroft (1971) should be similarly adaptable to Moore machines. It is not clear that there was any reason to publish this adaptation anywhere, and the Hopcroft paper seems to have no reference to Moore machines.
Comment: @Raphael  A reference ... Well, you are lucky, I redesigned the algorithm, because I do not have access to a library. But since you asked for a reference, I got you one. You should like it. But I am not sure I would use it for teaching.
Comment: @Raphael The paper is interesting in its presentation that attempts to be very
intuitive, more operational than algebraic. I do not remember all
details of the contribution of Myhill and Nerode (two years later in
1958), and I did not read the paper carefully enough (I rather skimmed
it) but I am wondering if the theory should not be attributed to Moore
as well.
Answer: A version of Brzozowski's algorithm using derivatives of regular expressions
is given in [2], Chapter 12, Section 4, where it is credited to
[4]. See [1] and [3] for the more general case of subsequential transducers (the terminology is a bit outdated and the term sequential transducer is probably more appropriate nowadays).
[1] C. Choffrut, Minimizing subsequential transducers: a survey, Theoret. Comp. Sci. 292 (2003), 131–143.
[2] S. Eilenberg, Automata, Languages and Machines, vol. A, Academic Press, 1974.
[3] J.-E. Pin, A tutorial on sequential functions. (Slides)
[4] G. N. Raney, Sequential functions, JACM 5 (1958), 177–180.
Comment: @D.W. Thanks for the edit. Just perfect.
Answer: Brzozowski's algorithm is a bad starting point (if you are concerned with asymptotic worst-case runtime). Even Wikipedia tells you as much:

As Brzozowski (1963) observed, reversing the edges of a DFA produces a non-deterministic finite automaton (NFA) for the reversal of the original language, and converting this NFA to a DFA using the standard powerset construction (constructing only the reachable states of the converted DFA) leads to a minimal DFA for the same reversed language. Repeating this reversal operation a second time produces a minimal DFA for the original language. The worst-case complexity of Brzozowski's algorithm is exponential, as there are regular languages for which the minimal DFA of the reversal is exponentially larger than the minimal DFA of the language,[6] but it frequently performs better than this worst case would suggest.

The algorithm has exponential worst-case runtime even on DFA because it computes an automaton for the reverse, which may have to be exponentially large. So your problem does not come from the extension to transducers.
Try to adapt another DFA-minimisation algorithm.


What is the purpose of this grounding screw in a plastic electrical box?

Question: Upon inspecting my light bulb socket in the garage of my new construction home (2018), I found a random grounding screw which wasn't wired to anything but attached to some bar. Does anyone know what the grounding screw and the bar it's attached to is for? In fact, the ground wire wasn't connected to anything.
Comment: it doesn't really need a ground, so it's not hooked up to anything. a fixture you touched or that had exposed metal could make use of the wire/bar later.
Answer: The bare ground wire in the electrical box is supposed to connect to the green screw on that short metal bar. The body of the light fixture is meant to be grounded through the mounting screw that goes into that metal bar. Do be aware that this technique of grounding the light fixture would have been the technique used in older installations. These days a light fixture will have a separate green or bare grounding wire that can be connected directly to the bare copper wire in the electrical box.
You may want to inspect that old light fixture and see if there is an existing screw or mounting hole to which you can add a separate grounding wire. You would then connect this added wire to the bare ground wire in the electrical box.
Comment: Many simple porcelain and plastic ceiling fixtures, that have no metal cases, have no grounding screws.
Comment: @bib - I know. There is nothing in what I said: "You may want to inspect that old light fixture and see if there is an existing screw or mounting hole to which you can add a separate grounding wire" that says they have to add a grounding wire at all.
Comment: This is a new construction house, I'm curious if that changes anything since you only reference older installations. The porcelain fixture has no grounding mounting points, so I guess it's grounded via that screw that secures the fixture to the box?
Comment: @TomS I wouldn't count on that.  "Via the screws" is only a valid grounding path if (by cause of tightening the screw) two metal surfaces are clamped together flush, hard and without contamination (rust, paint, those little plastic squares that capture the screws etc.)  Grounding via the threads of a screw (or to be more precise, the screw-head) is not allowed.
Answer: In the case where you're daisy-chaining multiple boxes together, that terminal block would be used to bind the grounding conductors of all the cables together, along with the grounding wire of the lighting fixture, if it had one.
Comment: I see no terminal block/grounding bar in there...
Comment: The metal strip on the left appears to have room for a second grounding screw to be installed.


in Android if OS kills my application, will getIntent() return the Intent with the same extras?

Question: After my application has been restored, of course.
or I have to store everything at onSaveInstanceState()?
Answer: This conversation seems to answer it: http://groups.google.com/group/android-developers/browse_thread/thread/f47af26b696af2e2. Look for the post starting with "Yes and no" and the few before it.
The answer is in the positive: yes, after restart of an Activity shut down by the OS, getIntent() will return an Intent with the same extras as the original.
Nevertheless, if some Android expert could confirm, I'd be glad to hear that. :)
Answer: Sobear,
The answer for that is "no, it does not". There are a number of different reasons for this. First, let's rehash how an Activity works (I know you know this, but I am illustrating a point).

In order to start an Activity, an Intent is created. This intent can be from an App Icon on the Home screen, from a component of your App that is currently running, or even from another component of another App provided they have permission to launch it.
The Intent gets sent to Android, and Android tries to resolve it by sending it to an App, or by querying the user if it cannot resolve by itself.
When the App starts, it holds onto the Intent that started it to allow for security checks, back tracking, etc. It allows the developer and user to make sure that this is what they really want to do... This Intent remains throughout the lifecycle of the Activity and anything else that the Activity passes it to.
User does some stuff, gets distracted and moves onto other Activities. The App still continues on until memory is low.
Memory gets low and Android kills the Activity. Activity loses the Intent (unless it was saved somehow).
User sees that the Activity died and decides to restart. Android creates a new Intent to start the Activity -> go back to step 1.

Since a new Intent was required to restart the app, the old intent is no longer keyed to the Activity. As to whether or not it is collected into Garbage, I'm not sure when this happens, but it is not accessible. If storing your Extras is your concern, there is only one way to do this (several possible implementations, of course). The Intent and Extras must be stored in some way. This will not affect the getIntent() function, but you COULD create a personal getOriginalIntent() function to base it on. From there, there are a number of options... For instance, you could restart the Activity with the Original Intent and THEN getIntent() would work it...
FuzzicalLogic
Comment: But i have tested if activity gets killed the os automatically save the extras for you and pass back with the call `getIntent().getExtras()`
Answer: Well, you can always do a simple experiment yourself, by turning "don't keep activities" flag on, in developer options.
If that flag is on, whenever you exit the application (say, click the home button), the OS will kill the activity, and when you return to your app, the previous activity will be recreated.
My experiments told me that getIntent() will always have the same data after the recreation of the activity.


What's so good about question 11583: Should I go back to therapy?

Question: I had a therapist for a year but they did nothing but waste my time and annoy me because of a state law. Should I try again? How?
Was closed for being off-topic, but at the moment of writing already has 2 reopen votes. Am I missing something? Has our policy of we don't do 'should I' questions changed while I was eating dinner? Do we no longer close questions that need professional help?
Comment: I saw this too and have no idea why it has any reopen votes. I would love for anyone to explain, because as it currently stands it's not appropriate on a couple different fronts (unless the rules changed while I was at lunch).
Comment: I voted to delete and the question is now deleted. You're right, this question having two reopen votes very much affects the quality of IPS.Se.
Comment: given the reaction that the last question asking why a question was closed, I wouldn't expect the people who voted to reopen to be forthcoming.
Comment: @RichardU I don't really get the first part... did you perhaps miss a word?
Comment: @Tinkeringbell it's possible.  I've gotten very little sleep last night.
Comment: @Tinkeringbell Sorry....  better now.  What I meant is that I doubt you'll get a response from whoever voted to reopen.
Comment: It's not reopened. Seeing merely two reopen votes isn't a cause for concern.
Comment: @NVZ enjoy being happy, carefree and not taking things serious. Two reopen votes means two people disagreeing with the closure and those people haven't left a comment so there's no feedback for the closevoters to know what they did wrong, or what is wrong with the policies as they are discussed on meta now. It means there isn't a community consensus and that's concerning enough for me.
Answer: Since this still hasn't had any guesses I'm going to throw out a guess that some these votes are stemming from users who have enough reputation to do so now but don't actively participate in meta conversations enough to know that this question is very much off topic.
Sometimes I feel that people vote to close when they don't know how to answer a question and vote to open when they think they could say something useful, instead of voting based on site guidelines.
Answer: Since I am not one of the re-openers I can only theorize.
I have noticed that a lot of Stack Exchange users get excessively lenient as soon as it turns out OP is a child or is trying to help a child. Helping OP gets more important than rules and regulations. It may be a factor here.
Answer: You ask what is so good about that question?
It is a question of someone with an important personal problem looking for an answer. A good answer could possibly change the life of the OP in a significant way.
We have here all the time questions like: how can I ask this girl out or how can I talk to her etc. Some of these questions are skillfully asked to fit exactly the rules of this site. But if they would not get any answers nothing important would happen or not happen. They are not really important.
For me it seems the therapy question is important and it is a real challenge for the OP. Wouldn't we feel better if we could help the OP to find a good answer?
And that's the answer to your question: It is an important question and a good answer might make a big difference in the life of the OP.
Edit: I find it amazing that I have lots of down votes for this answer. It is an answer. Maybe not the answer you like to read but it is an answer why some people think this is a good question. If you don't like to hear answers which don't fit what you expect why do you ask?
Comment: Voting is how we show whether we agree with posts on Meta. The large number of downvotes here (generally) implies that the voters do not agree with your assessment. It's important to have answers that speak to both ends of the spectrum (and places in between) but to me, the voting here says "we think that your position is the wrong position for this site to be in and it shouldn't be policy here".
Comment: I'd have to downvote this, because I disagree that the question is good based on the meta's we have here, and the fact that you call it a 'personal problem' already makes it clear that it isn't about Interpersonal Skills. I have to say I do appreciate you stepping forward and explaining why you thought it a good question though, that helps. It seems whatever is currently decided on meta is out of line with how you feel about what would make a good question for this site, so I hope you keep contributing your views on that :)
Comment: @Tinkeringbell: My point is it is an interesting and important question. That is my personal opinion about the question as a question - not about how this question is suitable for this site or how this question is according to the rules here. Personally I don't care if I am in line with what is decided on meta or not. A person needs help, he get's help here, that is what counts - at least in my opinion.
Comment: I appreciate the willingness to help, I really do. But this site is in beta, we'll have to develop a scope, and it would be nice if that scope is on meta, and people act like it. People need help, but would you go to StackOverflow and ask them to decide whether you should visit a therapist? According to your logic, all problems should be welcome here, which would undermine the SE system of having sites devoted to a certain topic.
Comment: Have you ever read [this](https://meta.stackexchange.com/a/243701/369802)? Are you in any way equipped to make decisions as important as one about therapy? What if you gave the wrong advice? What if you make the wrong decision for a random person whose circumstances you don't know?
Comment: @Tinkeringbell: I have years of experience with therapy. I know it's good to get professional help and therapy. I get your point about wrong advise. People should be careful what they answer. And readers should not just accept anything other people write. At the end it's the OP's decision what he/she does. That's always like this. This site gives possible answers, never the one and only answer which the OP has to follow. We are not responsible is someone does something wrong and we should not feel responsible about that.


PHP - Can Connect to SQL Server 2008R2 with sqlsrv_connect but not with PDO - why?

Question: I've been trying to connect to a SQL Server 2008R2 database using PDO in PHP, using this syntax:
<code>$conn = new PDO('sqlsrv:Server=xxxxxx;Database=xxxxx', 'xxxxx', 'xxxxx');
</code>
but each time, I try to run a query, I get "exception 'PDOException' with message 'SQLSTATE[08001]: [Microsoft][SQL Server Native Client 11.0]Named Pipes Provider: Could not open a connection to SQL Server [2]. '"
But when I try using
<code>$serverName = "xxxxx";
$connectionInfo = array( "UID"=>"xxxx",
                "PWD"=>"xxxx",
                "Database"=>"xxxxx");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
</code>
The query is successful.
My PHPinfo() shows that sqlsrv is enabled in PDO drivers and the fact that sqlsrv_connect is working would seem to suggest that it's not a firewall or port opening issue. Username and password are identical in both cases.
Can anyone help suggest where I should be looking to get the PDO working, as I'd prefer to do it this way for consistency?
Comment: You can accept your own answer a day or two after posting.
Answer: AAAARGHH, it was a syntax error in my PDO statement. Changed everything to lower case and it worked. Sorry, StackOverflow!
Comment: The answer would be more helpful if you explain what upper case stuff was causing the issue.


ThunderBolt to Mini Display port

Question: Is it possible to connect a Macbook Air 2013 to Macbook Pro 2009 through a thunderbolt cable in order to transform the latter to a second Display ?
Answer: It's not possible for you to use either of your MacBook's as a second (external) display. Apple only allow the use of iMac's as secondary displays using a mode called "Target Display Mode".
No matter the use of ThunderBolt, Mini DisplayPort or any number of adapters you won't be able to achieve the result your looking for.
However there are several applications that do enable you to theoretically achieve this over the network (Air Display, AirParrot, MaxiVista, ScreenRecycler etc...) but none are a true replacement for a physical secondary display.
External link: Target Display Mode FAQ
Answer: According to Apples documents it is not capable on another Macbook.  It is called Target Display Mode and is supported on certain models of iMacs.  You can try third party apps that will turn an old computer into a second monitor.  I used the third party app "Air Display" and can say it worked great on Mavericks. (Haven't used in Yosemite).  It is a cost to download the app.
Apple Target Display Mode
AirDisplay

ThunderBolt to Mini Display port


Can a bullet shot through a glass make a clean hole?

Question: One can often see (hopefully only in the movies) that a bullet shot through a pane of window glass leaves a hole in it, but overall the glass is left largely intact. However, a low-speed projectile, e.g., a stone thrown into a window would probably shatter the glass completely. Is there a critical speed below which a bullet would shatter the whole window pane instead of piercing a hole?
Comment: I think only treated glass (e.g., multiply laminated panes) will have the hole after a bullet is fired while untreated glass will shatter as well. Do you have any examples of rocks & bullets being fired upon the *same* sheet of glass with the effect you describe?
Comment: Speed does matter: http://journals.aps.org/prl/abstract/10.1103/PhysRevLett.110.174302
Comment: I think this PRL paper is very relevant, it says, "At low speeds (below 65 m/s for h=1mm), radial cracks extend until they reach the sides of the plate. At high impact speeds, the petals delimited by the radial cracks break to form circumferential cracks resembling the conical cracks characteristic of Hertzian fracture."
Answer: The main factor you should consider is impulse: if the force acts for a longer interval of time, it causes greater fractures in your glass. If it acts for a shorter interval of time, it causes less fractures.
Again, it depends on the material of the glass and the projectile you are using.


Is childish behaviour OK at workplaces?

Question: Is excitement and childish behavior ok if I am a hard worker? Does it impact my career even if there are no obstacles in way of working and it does not effect my productivity? I complete all my assignments & tasks on time.
Comment: Specifically, this depends very much on the culture where you work. I love working in startups because I can be childish at times and nobody will think badly of me. When I worked in insurance brokerage, childishness was largely a no-go, even though it was a very progressive team.
Comment: This question appears to be off-topic because it is about regulations or agreements that are company-specific and don't have universally applicable answers.
Comment: What's your question here? This sounds like a rant and does not really have a specific, answerable question right now. The answer basically depends on "what is childish behavior" as well as "what is your company culture" and "what cultural norms do you have."
Comment: I liked the question, but it needs to be more specific. Exemplify what you consider a childish behavior.
Answer: IMHO, one of the most important things in a workplace/career is the ability to understand your environment AS WELL as completing all your assignments and tasks on time. You need to be able to judge an office/workplace and know what is and is not acceptable based on your colleagues, managers, clients. Just being able to do the work will get you so far but understanding your environment is just as important
I am in no way saying you just need to blend in, but knowing what is and isnlt acceptable is your responsibility and should be an inate skill.
High fiving the person sat next to you when you've just secured a multi million pound sale may be acceptable. High fiving the manager because you just found out he's sleeping with his secretary may not.
You probably want to extend your question to give an example of the excitement and childish behaviour
Answer: If you are working you are an adult and you should leave childish behavior behind. Yes it can affect your career. There are many things of far more of importance to the workplace if you want to get pay raises or promotions or stay employed than just doing your work on time which is after all the minimal expectation.
So since you didn't give any examples of the childish behavior I can give some and how I might expect most comapnies to respond.
Tantrums - you usually can only get away with these if you are in a high power position. So the CEO or  the VP can have a tantrum but the average worker cannot.
Excitement  - usually enthusiasm is considered ok. However, you need to tone it down if the other employees are not receacting similarly.
Whining about doing things you don't want to do - Generally gets you labeled as uncooperative and will result in lower pay raises and fewer opportuinituies to do the interesting work and will reduce chances of promotion. No one like s working with a whiner, so they won't put you into the best positions unless you havea skill no one else has and they can't find someone to replace you. This execption would apply to far less than 1% of the workforce.
Ignoring manager instructions because you don't want to do the task or want to do things your own way- A quick route to getting fired most places.
Ignoring workplace administrative rules you don't like including doing timesheets or coming in late. Making your manager find you annoying is usually not a smart move in the workplace. You have to be extra special to avoid having this stuff come back to haunt you in many workplaces. You may get away with this for awhile, but you will be first on the lay off list and get lower payraises and performance appraisals many places. If the only thing the manager ever hears about you is that you didn;t do something, then he already has a negative imporession of you and you wil have to work twice as hard to erase it.
Playing games instead of working - only works long term if you are really, really far more productive than anyone else in the group or have a naive manager. The smart manager will see that you need to have far more work assigned to you and make sure it happens. There are some start-ups where this is acceptable behavior, but this often changes once they start to grow up and be a big company. A few tech companies manage to retain this, but not many and almost never in any other business sector.
Answer: It entirely depends on what's acceptable at your work-place, and if the behaviour is detrimental or seen by customers. Overall, just know that there's a big difference between being childish and being fun - the former being unacceptable.
Using myself as an example, I'm one of the individuals who always gets introduced to customers because I'm by far the most professionally-presented people in my office, but at the same time I'm the 'fun' guy at the office.
We have whiteboards which I draw quick cartoons, I've designed entire 'gag' posters and hung them in my managers office (one of which featuring slugs attempting to use our products), I entertain my co-workers - and they all love it; 10/10 tone and demeanour every review. They tell me every time I'm the bar for T'n'D.
What's important is to keep work first, and I know what's appropriate when. Everyone knows that if I'm going to a meeting or working it's time to be serious. If you have something to be doing then do it first and foremost. Be professional and courteous, don't do anything that impacts someone elses ability to work. Know that you're being paid to do a job, so keep it to your breaks and off the clock.
Overall, I think it's important that you do everything you can to keep the environment positive and professional. If you have 10 extra seconds to brighten someone day then do it! But anything more is too much; know the difference between being fun and being childish.

Is childish behaviour OK at workplaces?