Jump to content

Wikipedia:Reference desk/Archives/Computing/2015 October 7

From Wikipedia, the free encyclopedia
Computing desk
< October 6 << Sep | October | Nov >> October 8 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


October 7

[edit]

Keep track of changes on local file (one user)

[edit]

How can I keep track of changes on a local file (like .emacs, or other config file)? What I am doing now is making copies of it when I change something (in case it does not work, I pull the back-up). Would learning about git make sense or is it overkill? Could this be dealt with a couple of cli commands? --YX-1000A (talk) 00:44, 7 October 2015 (UTC)[reply]

If it's a small file, then what you are doing (making "full image backups") is probably best. Where this method becomes problematic is if you have huge files with frequent minor updates. In this case, all those backup copies take up too much space, and you might consider "incremental backups", which only store the changes since the last full image backup. But, if you can avoid the complexity this involves and stick with full image backups alone, all the better. StuRat (talk) 03:56, 7 October 2015 (UTC)[reply]
The full-bore solution is to use a version control system like git, yes. It might be overkill for small, simple files, but small, simple files have a tendency to grow into large, complex ones over time. I'm moderately familiar with emacs, and I know that hardcore users tend to develop extremely complex .emacs files over time. Many such users manage their .emacs with a VCS. And if you are doing or intend to start doing serious programming, you'll need to become very familiar with VCS anyway --71.119.131.184 (talk) 04:17, 7 October 2015 (UTC)[reply]
emacs does backups, including numbered backups (one for each save.) Using distributed VCS-s like git for config files sounds a bit overkill-y (at home, anyway), but that's not to dissuade you from learning it. There's also the option, as StuRat rightly said, of making daily incremental snapshots of the FS with something like backintime, which uses rsync. Making them onto external storage guards against user error and hardware failure alike and is a bit like crude versioning Asmrulz (talk) 04:26, 7 October 2015 (UTC)[reply]
Three-way comparison. This is what WP does in displaying difference of revisions and works on text files only. Using file systems, You need to grap the rights an owners and make an differential backup, managing versions if changes were saved to the file, see version control. --Hans Haase (有问题吗) 11:53, 11 October 2015 (UTC)[reply]

Unitary Transformation

[edit]

Is there (or, when is there) any unitary transformation that "changes" the probabilities (not only the phases) of the states? That is, where are fixed, and (and not only a phase change, i.e, not only ), and , and maybe . (This question generalizes my prior question)31.154.92.179 (talk) 06:04, 7 October 2015 (UTC)[reply]

There is none. Proof: I'll write z'xy for the z' associated with a particular value of x and y. By linearity,
so . Then, much like last time, we have
which reduces to . -- BenRG (talk) 07:34, 7 October 2015 (UTC)[reply]
A beautiful proof, again! Thank you very much! 80.246.139.106 (talk) 09:14, 7 October 2015 (UTC)[reply]

Unitary Transformation (in the last time, I guess)

[edit]

Is there any unitary transformation that satisfies ? (i.e, it swaps and , and writes some data, , if needed). 31.154.92.179 (talk) 13:49, 7 October 2015 (UTC)[reply]

Oppss... Seems that it's only "Not" on the first qubit... Thanx however :) — Preceding unsigned comment added by 31.154.92.179 (talk) 19:23, 7 October 2015 (UTC)[reply]

This what I wanted to ask:

Is there some unitary transformation that satisfies ? (again, it swaps and ).
I know that no unitary transformation satisfies , since it's the identity on and on , and non-identity on their sum - contradicting linearity. But I don't know if when we add at the end, this transformation exists?132.66.201.186 (talk) 09:16, 8 October 2015 (UTC)[reply]
I think a similar counterargument still works when z is added: we have , so, e.g., which can't equal for any . -- BenRG (talk) 21:29, 8 October 2015 (UTC)[reply]
(For the purpose of thinking intuitively about this, it may help to imagine superpositions as classical probability distributions. is like a probabilistic choice between and . The gate "sees" one or the other, not both. This is essentially what linearity means. The gate can't produce output that combines a (or b) with (c or) d because it can't see both of them. I don't think this qualifies as a proof but it may be helpful in understanding what unitary transformations are likely to exist.) -- BenRG (talk) 21:53, 8 October 2015 (UTC)[reply]
I'd tried to show that it's always the same , and hadn't succeeded... Thank you for the proof and for your explanation! 31.154.92.193 (talk) 11:07, 9 October 2015 (UTC)[reply]

How to make layers translucent in GIMP?

[edit]

I have a question about GIMP. I want to paste a layer on top of another layer, but I want the pasted layer to be translucent, so that the pixels in the pasted part end up being a half-and-half mix of those of the original layer and those of the pasted layer. In other words, I want the pasted layer to have a 50% opacity instead of 100%. How can I do this? JIP | Talk 18:35, 7 October 2015 (UTC)[reply]

In the layer dockable, select the layer you want to change, and (below its mode dropdown) is a layer opacity slider. -- Finlay McWalterTalk 18:53, 7 October 2015 (UTC)[reply]
GIMP is not always intuitive but this is might be what your after. >http://www.google.co.uk/url?q=http://www.gimp.org/tutorials/Layer_Masks/&sa=U&ved=0CBQQFjAAahUKEwiJ6O7ohbHIAhXFrD4KHdpSAHE&usg=AFQjCNHaBzSNIcTqK8OCfEVUII75okCoxQ < --Aspro (talk) 19:07, 7 October 2015 (UTC)[reply]
Layer masks aren't the right solution here; too complicated. Finlay is right, just adjust the opacity of the floating layer in the Layers dialog, before anchoring it. Looie496 (talk) 19:15, 7 October 2015 (UTC)[reply]
BTW, what you describe is 50% transparency, which is not the same as translucency. Translucent materials let the light through from behind, but blur it, as in frosted glass used in some bathroom windows for privacy. StuRat (talk) 04:18, 9 October 2015 (UTC)[reply]
In the right tool window, select the layer and shift its transparency bar to Your favorite value. Handling transparency inside the layer or picture, select picture, mode, RGB to skip the pictures default color palettes. This comed with GIF, TIFF PNG, and so on. JPG does not support transparency. Next, add the transparency channel. If it is not possible, select and mark a part outside the visible or needed part of the picture. In the menu choose colors, select change color to transparency, choose the favorite color You want to change to the layer below or background, select Ok. The transparency channel is added and the selected part became applied of Your settings. In the right tool window, layers can be lined up by drag and drop. An animated GIF can created by using the layers as flip book. --Hans Haase (有问题吗) 11:36, 11 October 2015 (UTC)[reply]

HI there, I have on my macbook 2000 contacts on my iphone also, and I would like to know,

[edit]

how I can sort them, that I will have shown users which have registered there number on FaceTime / apple-ID. Searching every of 2000 accounts each for each by hand is really a hard way. --Hijodetenerife (talk) 20:11, 7 October 2015 (UTC)[reply]

What I think OP is asking is: I have 2000 contacts. How can I sort out those who I also have FaceTime contact info for. And if I'm right, you can't. That's according to the three iPhone users in the room with me now. Dismas|(talk) 00:04, 8 October 2015 (UTC)[reply]
I agree that I don't think it's possible with the default iOS contacts management. But OP could look into other apps. Here [1] is a suggestion, and links to a few alternatives, and I think it's likely that one of them will do what OP asks. SemanticMantis (talk) 14:43, 8 October 2015 (UTC)[reply]