Wikipedia:Reference desk/Archives/Computing/2011 November 3
Computing desk | ||
---|---|---|
< November 2 | << Oct | November | Dec >> | November 4 > |
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. |
November 3
[edit]Inherent Ambiguity in Context Free Grammars
[edit]Is there an algorithm for determining whether or not a context free grammar is inherently ambiguous? If not is there a reason in principle why one can't exist? SlakaJ (talk) 02:20, 3 November 2011 (UTC)
- It's an undecidable problem, so no such algorithm can exist. See ambiguous grammar#Recognizing ambiguous grammars. Unfortunately, I don't know of any intuitive proof of its undecidability. Conservative approximations do exist, however. Paul (Stansifer) 02:41, 3 November 2011 (UTC)
Backwards E, revisited
[edit]Referring back to this question, I asked library staff like User:Kainaw said to do. The E appeared three times today. The first time it didn't stay around long enough for me to get someone. The second time it was there until I got a message on screen saying I had 10 minutes left. I made the mistake of clicking on that message to get rid of it, because the E also disappeared. The third time, I found someone, and he said he didn't know what it was and had never seen it before. He moved the mouse, and the E moved up when he moved it up, down when he moved it down, right when he moved it right, etc. but it disappeared when he clicked on "Back".
So much for "ask library staff".Vchimpanzee · talk · contributions · 14:06, 3 November 2011 (UTC)
- So, the library staff has never seen in before. Nobody here has ever seen it before (as stated previously). Getting an answer to this question will be about as difficult as me trying to get an answer to something like, "What is that purple thing I see out my window?" It is not reasonable to expect anyone to have an answer. -- kainaw™ 14:14, 3 November 2011 (UTC)
- I'm pretty sure that (1) that's the sky; and (2) it's not purple, it's blue, and this is a known issue. Nimur (talk) 18:50, 3 November 2011 (UTC)
- At least now you can't say I didn't ask library staff.Vchimpanzee · talk · contributions · 14:42, 3 November 2011 (UTC)
- I asked someone else. She didn't know what it was, and when I asked how I could send a screen shot, she said since it was just the cursor, I probably couldn't. This computer has IE but I don't know what version. When I click on something, at the bottom of the screen there is a row of green squares in the middle of the page. When the backwards E is showing up, that row of green squares is halfway across the area it is supposed to fill up just before it disappears, which is what normally happens. The person on the library staff described that as "loading". Normally, these green squares disappear quickly. And after being granted three extensions of 20 minutes each, my time really is up now.Vchimpanzee · talk · contributions · 15:02, 3 November 2011 (UTC)
Next time you see it press Prt Scr on the keyboard, paste the image into MSPaint, and upload it to a image host such as imgur. AvrillirvA (talk) 15:02, 3 November 2011 (UTC)
- Worth a go, but print screen doesn't usually capture the mouse pointer. Some useless information: backwards E means there exists. Card Zero (talk) 15:09, 3 November 2011 (UTC)
- Some screen capture programs can, but may not be a good idea to try running extra programs on library computers. Anyway a simple solution which may work is if you have any sort of phone which can take photos, use that. If your phone lacks autofocus or some sort of macro fuction it may not be that clear but could still be worth a shot. Of course, make sure it's not forbidden to take photos in the library first. Nil Einne (talk) 15:56, 3 November 2011 (UTC)
- Are there libraries in the free world that forbid photographs? Comet Tuttle (talk) 16:52, 3 November 2011 (UTC)
- I should clarify my comment was poorly phrased. I meant make sure you can take photographs not just in the library but where you were (computer room?) and whether you needed permission. In that regard, it depends what you mean by the 'free world' since it's easy to find plenty of libraries which request you get permission or limit where you can photograph. These may be for a variety of reasons including copyright concerns, privacy of patrons and staff, convience of patrons and staff, physical protections of the material etc. If your definition of the 'free world' includes the UK or the US, then yes these things do happen there. E.g. [1] (search for British library) which also seems to be supported by [2]; [3] [4]; [5]; [6] (see the second paragraph); [7]; [8]. Some of these may be more to do with the buildings or collections and so not seem relevant but if you were in a library where you were aware of restrictions on photography, it's likely advisable and polite to check with the staff even though it seems unlikely they'll complain about a single photo of your computer screen particularly when you have a resonable explaination for why you're taking it. Also while unsourced (but I've heard it elsewhere before), our article says all camera phones sold in Japan and South Korea need an audible noise, presuming this is true it may conflict with any requirements that patrons and their equipment should stay fairly silent in certain parts of various libraries. Nil Einne (talk) 21:51, 3 November 2011 (UTC)
- Are there libraries in the free world that forbid photographs? Comet Tuttle (talk) 16:52, 3 November 2011 (UTC)
- VChimpanzee, you were asked in the previous thread but did not reply: Is there a particular website this happens at? What URL are you visiting when you see this? Maybe one of us can visit that URL and get the behavior to reproduce. Comet Tuttle (talk) 16:56, 3 November 2011 (UTC)
- This morning the only site where I saw this was Bing search. I did think about the phone idea too late to do anything, but I'd have to ask one of the many annoying people carrying around a cell phone, because I chose not to be one of them. There may have been other sites, but I didn't pay attention at the time. However, the problem only happens on the one computer (so far). It may be two weeks before I get back thereVchimpanzee · talk · contributions · 17:15, 3 November 2011 (UTC)
- Oh, and before anyone suggests it, I did see an hourglass on other occasions, so that's not it.Vchimpanzee · talk · contributions · 17:29, 3 November 2011 (UTC)
- This morning the only site where I saw this was Bing search. I did think about the phone idea too late to do anything, but I'd have to ask one of the many annoying people carrying around a cell phone, because I chose not to be one of them. There may have been other sites, but I didn't pay attention at the time. However, the problem only happens on the one computer (so far). It may be two weeks before I get back thereVchimpanzee · talk · contributions · 17:15, 3 November 2011 (UTC)
- Well, I don't see anything like this using bing.com this morning in IE9. (I had been hoping it was a little browser cursor trick like this page does to your cursor. So that's not it.) Next thing to try: Go to Control Panel -> Mouse -> Pointers; this is a scrolling list that lets you customize what the cursor looks like when different things are happening. Maybe someone customized the library computer to use a different ".cur" animated cursor when the computer is doing a certain thing. Comet Tuttle (talk) 18:12, 3 November 2011 (UTC)
Thanks. I'll try that last one in two weeks when I go back to that library, if I get that same computer. It's less likely if I have bills to pay, as I will, since opening time for the library is also opening time for at least one of the places I pay bills. If not then, it'll be after Thanksgiving.
As for the requirement to be quiet, at that library, that ship has sailed. The genie is out of the bottle. Finding someone with a cell phone is no problem since they're always talking on them.Vchimpanzee · talk · contributions · 22:22, 3 November 2011 (UTC)
Linux prints purple instead of blue
[edit]I've been looking at a Fedora Linux box with CUPS. It has multiple printer drivers all pointing to a Dell 5100cn laser printer. It can print through port 9100 or lpd. I've tried every setting I can find. It insists on printing blues as purple. I printed on multiple other machines (Windows and Mac) and blue comes out blue. I believe this is a problem with CUPS, but I don't see color settings in CUPS. Any ideas of a good place to look? -- kainaw™ 17:01, 3 November 2011 (UTC)
- Does this happen when printing from multiple programs? If so, could you name a couple you have tried? Looie496 (talk) 17:19, 3 November 2011 (UTC)
- It is happening with acroread. I tried okular and it came out blue. So, it is a setting inside of adobe acrobat reader. Unfortunately, Okular doesn't render these correctly, so I'll have to mess around with acroread to see if I can figure out what's wrong. Thanks. -- kainaw™ 17:32, 3 November 2011 (UTC)
- Just a followup... Tried acroread on other Linux machines with different flavors of Linux and printing to different printers. Acroroead consistently prints the wrong colors. Using a different PDF reader produces correct colors. This is clearly a bug in acroread. Leave it to Adobe to have trouble working with PDF documents. -- kainaw™ 17:52, 3 November 2011 (UTC)
- A bit of Googling finds that the problem is probably an acroread bug related to rendering of pdfs that use transparency. There is a workaround but it varies slightly depending on which program produced the pdf. Looie496 (talk) 18:00, 3 November 2011 (UTC)
- It is a cascading problem. Acroread cannot handle transparencies and color at the same time. Inkscape (which is being used to produce the graphics) and FPDF (which is being used to compile the graphics and data together) cannot produce a PDF that doesn't have transparencies. So, I'm going to work on the easier problem of cleaning up the PDF so Okular or Evince can load the documents without messing up the wrapping text. For some reason, they show the wrapped text upside down. -- kainaw™ 18:26, 3 November 2011 (UTC)
Python book, full of pictures, not "for dummies"
[edit]I saw a Python book, but lost the reference. It was full of pictures, and was not one of those "for dummies" nor "absolute beginners." It was something for the absolute beginner thou (obviously). Any ideas what series it might be? 88.9.210.218 (talk) 17:03, 3 November 2011 (UTC)
- Maybe Dive into python? Or one of the others listed here? 130.88.99.231 (talk) 18:20, 3 November 2011 (UTC)
- It was from the Head First Programming series. Thanks. 88.9.210.218 (talk) 20:02, 3 November 2011 (UTC)
How to change screen mode in Personal Paint?
[edit]I just found out that the Amiga Forever CD-ROM which I bought already in the late 1990s includes a full copy of Personal Paint version 7.1. When I start it, I am presented with a HiRes Laced screen with 8 colours. Selecting "Environment -> Switch" from the File menu gives me a HiRes Laced screen with 16 colours. Selecting the menu option again goes back to the original screen. The Amiga is supposed to be able to use a maximum of 256 colours out of a palette of 16,777,216 hues. I also have Deluxe Paint version 5 on the same system, which I originally bought from a software store way back in the middle 1990s, and it is fully able to use a 256-colour HiRes Laced screen under E-UAE. So there is no technical reason Personal Paint couldn't either. So I must simply be missing how to configure screen modes in Personal Paint. Can anyone help me? JIP | Talk 19:30, 3 November 2011 (UTC)
- All I can think of is that you need to be sure your computer display is currently set to show more than 256 colors (figuring they need a few more for menus and such). Do you know how to do this ? It might also help if you go with a low resolution screen, say 800×600, in case it reserves a low amount of memory for each pane, and can't handle both high res and a high number of colors at once. Also try turning off the HiRes mode within the program. StuRat (talk) 20:38, 4 November 2011 (UTC)
- The environment of the host Linux system can display full 24-bit colour natively, and the emulated Amiga system is fully capable of displaying 256 colours out of 16,777,216 hues natively. The emulated Amiga system has 256 megabytes of memory, which is one-sixteenth of the host Linux system's memory, and by Personal Paint's standards, much more than it could imagine ever needing. It turned out that I just didn't know how to use the program. All I had to do was press "i" to open the image format request window, which Deluxe Paint opens right at the start, but Personal Paint requires additional input to open. JIP | Talk 22:42, 5 November 2011 (UTC)
- OK, glad you found the answer. I will mark this Q resolved. StuRat (talk) 23:05, 5 November 2011 (UTC)
Original image of "Lenna"?
[edit]Is it possible to somehow get to see the original picture of Lena Söderberg in the Playboy magazine, which was used to generate the famous test image "Lenna"? I know Lena Söderberg's pictures are available in the Playboy Cyber Club, but I have no interest in signing up for it just to see one picture. JIP | Talk 19:46, 3 November 2011 (UTC)
- Does the external link that states it contains the "uncropped original image" not provide the original, uncropped image? --LarryMac | Talk 20:48, 3 November 2011 (UTC)
- LarryMac is right on this: you can click through to the full-image. 88.9.210.218 (talk) 23:12, 3 November 2011 (UTC)
- The link to the full pic is on the Lenna article page; here you go, boys. Textorus (talk) 19:27, 5 November 2011 (UTC)
- LarryMac is right on this: you can click through to the full-image. 88.9.210.218 (talk) 23:12, 3 November 2011 (UTC)
imagemagick
[edit]imagemagick uses the filename extension to determine the image output format. How do I tell it to output as jpg without naming the file "example.jpg"? Say I want to name it "example.exe" or have no extension at all, but still have the file be in jpg format. 82.43.90.142 (talk) 21:13, 3 November 2011 (UTC)
- convert foo.jpg png:bar converts a JPG to a PNG called bar with no extension. -- Finlay McWalterჷTalk 21:21, 3 November 2011 (UTC)
- There's also
-format
¦ Reisio (talk) 21:25, 3 November 2011 (UTC)
- Or, if in a program, you can output it with the JPG extension and then rename it with a system call. But I should ask, why would you want to create a JPG file without the appropriate extension ? This is bound to cause problems both with humans readers and programs. StuRat (talk) 20:26, 4 November 2011 (UTC)