Wikipedia:Reference desk/Archives/Computing/2012 July 1

Computing desk
< June 30 << Jun | July | Aug >> July 2 >
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.


July 1 edit

Rotating photos to align vertical or horizontal edit

I'm looking for a (preferably free as in beer) photo editing package that will allow me to rotate an image by "drawing" a line on the photo that corresponds to the horizontal or vertical. Specifically, I've seen this functionality in Nero PhotoSnap, which was part of Nero version 6. Example use: I take photo, but the camera is not straight, so the image is not straight. With PhotoSnap I could use the mouse to "draw" a line on the picture corresponding to what should have been horizontal or vertical, eg the horizon (horizontal) or a lamppost (vertical). PhotoSnap would then rotate the picture so that the line that I drew was horizontal or vertical (which ever was closest) - and then the line would disappear, it only being used to mark the horizontal or vertical. This makes it very easy to straighten a photo, because most times when I straighten a photo I do it by checking for a horizontal or vertical reference line. I've looked at a few other photo editing programs, but I've not seen this functionality elsewhere. Some packages allow me to enter an arbitrary angle to rotate the photo, but I still have to "guess" the correct angle (eg by trial and error) - or in some cases judge by eye whether a feature in the picture is horizontal or vertical while rotating the image with the mouse - whereas PhotoSnap allowed me to simply mark where the horizontal or vertical should be. I can't believe that nobody else thought this was a really useful feature! Does anyone know of any other photo editor that can do this? Mitch Ames (talk) 12:56, 1 July 2012 (UTC)[reply]

The 'Rotate' tool in GIMP does something almost like what you're asking for. Select the 'Rotate' tool from the toolbox, and set it to Mode: Corrective (Backward), Preview: Grid. When you click on the image, a grid will appear overlaid on the picture along with a dialog box describing the rotation. (You can adjust the grid spacing in the toolbox menu if you'd prefer a finer or coarser grid.) Click and drag anywhere to rotate the grid until it lines up with a feature in your image that you want to be horizontal or vertical, then click 'Rotate' in the dialog box. Presto! TenOfAllTrades(talk) 13:33, 1 July 2012 (UTC)[reply]
Hugin can correct wavy horizons, unvertical verticals and and unhorizontal horizontals as experienced when using wide angle lenses. [1] --Aspro (talk) 13:52, 1 July 2012 (UTC)[reply]
(Not free, but just in the "some other photo editors have this, but it might not be intuitive" category, in Adobe Photoshop, you can draw a line with the ruler/measurement tool, and it will automatically take the angle from that and add it to the "rotate to arbitrary angle" function. If your photo editor does have something that can give you angle, and something that can rotate to arbitrary angles, that's a poor-man's way to do it.) --Mr.98 (talk) 14:55, 1 July 2012 (UTC)[reply]
Thanks, I shall investigate those free options. Mitch Ames (talk) 12:23, 3 July 2012 (UTC)[reply]

keep it simple edit

What is the easiest, simplest way to connect two laptops to one another. Does it matter that one runs Windows 7, and the other XP. — Preceding unsigned comment added by 101.112.115.165 (talk) 14:53, 1 July 2012 (UTC)[reply]

Are you just trying to share files between them? Setting one up as a server or "shared" drive on the same network is probably the easiest way. Here's how to do it in XP, here's a page about XP and 7 sharing in particular. --Mr.98 (talk) 15:01, 1 July 2012 (UTC)[reply]
Ethernet crossover cable AvrillirvA (talk) 16:45, 1 July 2012 (UTC)[reply]
Note that those solutions require that both laptops be on and physically connected to exchange files. Another option is to use a local file server (an external hard drive with a bit of software to manage it), so files can be copied there from each laptop while connected, and the other laptop can then access those files when the first laptop is absent or turned off.
Exchanging files via the Internet is another option, as there the physical locations of the laptops don't matter, so long as they have an Internet connection.
Combining both methods, an Internet file server can allow laptops around the world to share files, even if they aren't connected to the Internet at the same times. Emailing files as attachments to each other essentially does the same thing. StuRat (talk) 17:36, 1 July 2012 (UTC)[reply]
What I like about the shared folders option is that 1. it requires no more hardware than you probably already have; 2. it requires no more software than you probably already have; 3. it's meant to be dead easy to set up, unlike an FTP server; 4. it can let you easily preserve folder relationships (e-mailing makes this a bit harder), and 5. it doesn't require computer A to move files to intermediary computer B in order for C to then get it from B (as does a separate server, or e-mailing it), so it ought to reduce your upload/download times. But again, it will depend on what you really mean by "connect two laptops to one another" and why you're trying to do it (I assumed it was to transfer files, but that hasn't been confirmed). --Mr.98 (talk) 18:52, 1 July 2012 (UTC)[reply]

-- forbidden in XML comments edit

I tried to help a colleague at work this week, he had been given the task of fixing the configuration of an installation of one of our software products. This particular product is a C#-based Windows executable, which reads configuration from an XML file and starts up WCF services. The configuration file looked something like this:

<services>
  <!-- <service name="this"/>
  <service name="that"/> -->
</services>

I saw that the service "this" that should have been running wasn't even started, because its entry was commented out. I advised my colleague to take that line out of comments, so he wrote instead:

<services>
  <service name="this"/>
  <!-- <service name="that"/> -->
</services>

Then the program tried to start the service "this", but it failed because of database connection problems. My colleague decided to put the first line back into comments, but then he said that the program wasn't even starting up. The problem was that he had now written:

<services>
  <!-- <service name="this"/>
  <!-- <service name="that"/> -->
</services>

Which is invalid XML, because now both service lines are part of one and the same comment, and there is -- inside the comment, which XML doesn't allow. But my question is, why doesn't XML allow this? JIP | Talk 18:57, 1 July 2012 (UTC)[reply]

If memory serves, historically in SGML based languages, despite the leading <! and trailing >, comment beginnings and endings are actually just the --, and as such you cannot use -- "inside" a comment, as the second instance attempts to end the comment (and a third would attempt to start another comment). [See also: XML#Comments. And yes, this is silly, but then so is using XML, usually.] ¦ Reisio (talk) 19:35, 1 July 2012 (UTC)[reply]
My guess is this explanation is more accurate, if the absolute reality of it all matters to you :) http://www.howtocreate.co.uk/SGMLComments.html#doubledash. Unfortunately IIRC the SGML spec is not free. ¦ Reisio (talk) 19:46, 1 July 2012 (UTC)[reply]