Wikipedia:Reference desk/Archives/Computing/2011 September 23

Computing desk
< September 22 << Aug | September | Oct >> September 24 >
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.


September 23

edit

How to write an abstract in LaTeX

edit

Dear Wikipedians:

I am nearing the end of writing my paper. I need to write an abstract. What is the LaTeX tag used for writing abstracts? I am having a really hard time finding it and would like your help.

Thanks,

76.68.7.220 (talk) 02:03, 23 September 2011 (UTC)[reply]

\begin{abstract}
\end{abstract}
... and the document class has to support it. for example, of the standard classes, article and report do, but book does not.
KarlLohmann (talk) 02:27, 23 September 2011 (UTC)[reply]
In future, you might want to give LyX a go. Graphical Latex frontend, makes you look like you went through all the pain of figuring out the language, without the actual pain. Nevard (talk) 03:32, 23 September 2011 (UTC)[reply]
If the paper is for submission to a journal, LaTeX's abstract environment might not give you what you want -- I often just create a section* and title it "Abstract". Looie496 (talk) 14:56, 23 September 2011 (UTC)[reply]

javascript help: variable of radio button selection

edit

example code:

<form name="favcolour">
<input type="radio" id="thecolour" name="thecolour" value="yellow" /> Yellow
<input type="radio" id="thecolour" name="thecolour" value="red" /> Red
<input type="radio" id="thecolour" name="thecolour" value="blue" /> Blue
<input type="radio" id="thecolour" name="thecolour" value="green" /> Green
<input type="Submit" value="Submit" onClick="submit_the_form();">
</form>

what variable would the selection be stored for use in the submit_the_form function? tried document.getElementByID("thecolour").value and document.forms[0].thecolour.value and document.favcolour.thecolour.value. — Preceding unsigned comment added by 203.116.187.1 (talk) 09:17, 23 September 2011 (UTC)[reply]

First — they should never all have the same id. That instantly makes it so that getElementById is not going to retrieve useful information in this case. They should have the same name, however.
Secondly — with Javascript, you need to cycle over all of the inputs and figure out which one has its .checked property set to "true". See example #1 on this page. Note that if you submitted this form just regularly, it would submit only the single name/value that is selected. --Mr.98 (talk) 11:36, 23 September 2011 (UTC)[reply]

Downloading Gmail from corporate account

edit

Hi everyone,

I need to download all of my old e-mails from my corporate Gmail account, as I am about to leave said corporation. I have full permission to do this (nothing remotely sensitive there), but I cannot figure out how to do it. Traditional Gmail downloaders don't work because it's a corporate-type account, and even with the Google Apps instructions on downloading emails (using SSL and particular ports for the POP/SMTP servers, etc.), I can't get it to work.

I don't suppose anyone would have experience with this issue, or could help me out?

Many thanks! 220.233.107.108 (talk) 10:43, 23 September 2011 (UTC)[reply]

What I did was:
  1. Get Thunderbird and add the GMail account to it.
  2. Create a local folder called "My Old Email".
  3. Drag the entire Inbox and Sent folders to the new local folder.
Then, I can look at the email anytime I like - even if I'm not connected to the Internet. Another, very slightly more complicated, option is to create a personal GMail account and use Thunderbird to drag email from the old Gmail account to the new one. -- kainaw 13:32, 23 September 2011 (UTC)[reply]
Not to change the subject (he says as he changes the subject) but what is a recommended gmail download method from a personal gmail account? Thanks, Wanderer57 (talk) 18:47, 23 September 2011 (UTC)[reply]
getmail 69.171.160.21 (talk) 23:23, 23 September 2011 (UTC)[reply]
Thunderbird might be the easiest option. It can handle both Google Apps and Gmail accounts and you can drag and drop emails between accounts to move them to a personal account. --Hard Boiled Eggs [talk] 04:56, 24 September 2011 (UTC)[reply]
And you can use Thunderbird to drag emails to a local folder on your computer. -- kainaw 17:10, 25 September 2011 (UTC)[reply]

Printing JPEG files in MS Word

edit
  Resolved

I've scanned a passport photo and it's saved on my computer as a .jpeg file. I have to complete a form that requires a photo so, instead of printing the form and glueing the photo on, I thought I'd scan the photo and insert it into the form. The form is an MS Word 2010 file. I clicked on the photo box, went to the insert tab, and clicked picture. I selected the photo and it appeared in the Word document. I resized it and it looked great. When I went to print the form, my printer just spits out a blank piece of paper. If I delete the photo then the Word file prints no problem. I can also print the .jpeg file on its own in MS Paint or Windows Photo Viewer. It's just when the image file is inserted into the Word file that the form won't print. Any suggestions? Fly by Night (talk) 17:54, 23 September 2011 (UTC)[reply]

Can you save it as a PDF and print the PDF? My guess is that Word is somehow giving instructions to your printer that are confusing it. --Mr.98 (talk) 20:15, 23 September 2011 (UTC)[reply]
Have you checked yourself to see if it's possible? As far as I can tell, it isn't. That was one of the first things I tried. It would be nice to receive tried and tested advice and not just blind guess work. Fly by Night (talk) 22:27, 23 September 2011 (UTC)[reply]
On my machines, I've never had trouble embedding JPEGs in Word files and printing them as PDFs or regular files. So yes, it is tried and tested. I'm trying to help you here; I can't psychically tell what you've already done or haven't done. The more snippy you are with people trying to answer, the less likely they are to try and help you. --Mr.98 (talk) 17:31, 24 September 2011 (UTC)[reply]
Insert a text box, then insert the image into the text box. ---— Gadget850 (Ed) talk 22:39, 23 September 2011 (UTC)[reply]
It's already in a text box. When I said "I clicked on the photo box…" I meant that I clicked on a text box where the photo should be glued to the print out. Fly by Night (talk) 23:02, 23 September 2011 (UTC)[reply]
This might be relevant http://word.mvps.org/faqs/drwgrphcs/invisiblegraphics.htm ---— Gadget850 (Ed) talk 03:19, 24 September 2011 (UTC)[reply]
There is no problem with any of the printer drivers that I use in Word 2000, but I haven't tried it in Word 2010. It sounds like a miscommunication between Word and your printer driver. Have you tried an alternative driver? Have you brought the text box to the front? (Sorry I don't have Word 2010 to test its behaviour.) We can't test your form for you because we don't have a copy. Perhaps there are some hidden restrictions built in? You could always get round these by saving the completed form as an image (without photo) then adding the photo to the image, either in Word or in photo software. Gadget850's link gives lots of suggestions, but did you misunderstand the suggestion to "Insert a text box"? This is not the same as clicking the box for the picture, it is an extra layer. Dbfirs 09:59, 24 September 2011 (UTC)[reply]

I finally managed to do it. I inserted text boxes as suggested, but that didn't work. In the end, I opened the image in MS Paint, dragged a selection box around it, the cut-and-pasted the image directly into the Word document. It printed first time. It shows why so many people hate MS Windows. If you use their own insert image option then it won't print. You end up having to resort to ad hoc solutions. Thanks to everyone for their help, and sorry if I came across a grumpy. I was getting annoyed because it wouldn't work. Fly by Night (talk) 17:46, 25 September 2011 (UTC)[reply]

Glad to hear that you managed to print, even if the method had to be a "last resort". I assume you meant dislike of MS Word rather than Windows, since Paint runs under Windows. Just as a matter of interest, did the picture show under print preview? I've found, like you, that MS Word can occasionally be frustratingly awkward, but there are usually ways round the problems. Possibly in this case the problem was in the original form? Have you had a similar problem with other documents? I wonder if the size of the original scan was causing the problem? Dbfirs 10:03, 26 September 2011 (UTC)[reply]

Machine-assisted translation?

edit

Does any machine-translation software exist that will present all valid literal translations for an ambiguous phrase or clause, and allow the user to choose which one makes sense in case the heuristical guess is wrong? NeonMerlin 18:19, 23 September 2011 (UTC)[reply]

Yes. I use that for turning doctor's notes into ICD and CPT codes. First, it identifies every possible usage for every word. Then, it puts those into usages into sentences and compares that to a library to see which ones appear to be most reasonable. Then, it goes back and uses synonyms to generalize the original text to get the basic concept of noun-verb structure. Again, using another library, it sees which generalized sentences make most sense. Finally, it picks the one that makes the most sense and sees if that matches up with a medical code. I could stop it at any point and have a user insert human intelligence into it if I wanted. Further, I'm not the only one who has written this type of software. Many people have written software to perform encoding of plain text. I don't think anyone offers the software for sale. -- kainaw 18:51, 23 September 2011 (UTC)[reply]
Google Translate will do this, too, although the functionality is a bit limited. If you hover your mouse over one of the translated words, it will highlight the corresponding phrase from the source language, and then offer you some alternative translations. For example, check out some of its other choices for "I do not like" here. Spanish speaker may enjoy how much Google mangled the translation of this simple sentence.--el Aprel (facta-facienda) 21:12, 23 September 2011 (UTC)[reply]
True, but there's no way to check whether the combination chosen is valid. For example, I tried "Filium nautae Romani in agris videmus" (an example from Wheelock's Latin 7th ed). Nautae could be plural, but then it would be vocative (or nominative, if the verb was third-person) and couldn't be modifying "filium", and that's how we know there's only one sailor. In the real world, there may be a grammatical error in the source text, but a valid parsing is still more plausible than an invalid one. Generating and literally translating all possible readings and telling the user which ones are grammatical is the easy part for a computer; reliably choosing the most sensible one given that information is the easy part for a human. NeonMerlin 21:38, 23 September 2011 (UTC)[reply]