Jump to content

Wikipedia:Reference desk/Archives/Computing/2007 June 11

From Wikipedia, the free encyclopedia
Computing desk
< June 10 << May | June | Jul >> June 12 >
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.


June 11

[edit]

Python for

[edit]

You know how in Python you can do this:

>>> [i==1 for i in [0,1]]
[False, True]

? What's this use of for called? To be clear, what I don't get is when and how you can use "for", outside what I understand as a normal "for" loop. Thanks. --87.194.21.177 00:09, 11 June 2007 (UTC)[reply]

Might be a simple use of list comprehension. --Spoon! 00:13, 11 June 2007 (UTC)[reply]
Hey thanks that's it. Found some documentation now I know what it's called. It's pretty cute. Thanks again. --87.194.21.177 00:19, 11 June 2007 (UTC)[reply]

MS Access: DLookup and updating queries

[edit]

(Those who don't use Access should probably avoid this one, as it has a lot of program-specific jargon)

I am running a lot of VBScript in MS Access and it is adding new entries to a table and then trying to use a DLookup to get information out of them immediately afterwards. But instead of getting the right value I am just getting Null, indicating that the Dlookup is probably trying to get at the data before the recordset has updated, or something like that.

Originally I was adding the new data with an SQL "INSERT" query but I figured maybe that was too fast for Access and it needed something with a concrete Update command. So I did it in a standard DAO way, opening a new recordset, .AddNew, then .Update. But I still run into the same problem.

Any idea what is causing this, if not an update issue? Or does the .Update not necessarily solve it? It seems silly not to be able to manually update the recordset and have it readily available for use whenever I want it with a DLookup. --24.147.86.187 02:53, 11 June 2007 (UTC)[reply]

  • Nevermind! I figured it out. It had nothing to do with what I thought it was. I didn't realize it was adding the entries with an extra period appended onto them and as a consequence it couldn't find them when it didn't look for that period. Stupid mistake. --140.247.152.49 16:19, 11 June 2007 (UTC)[reply]

Mixing video?

[edit]

What is the result when two analog composite video signals are mixed additively as though they were audio? NeonMerlin 03:32, 11 June 2007 (UTC)[reply]

Assuming they are time-synchronized, for NTSC and PAL, you get the "mix" that you'd expect. For SECAM, the color carrier is FM and you can't mix multiple sources while still maintaining a valid color signal. I'm pretty sure our SECAM article states this.
If the two video signals are not time synchronized, you get garbage.
Atlant 11:38, 11 June 2007 (UTC)[reply]
By "the mix that I'd expect," do you mean a double-exposure effect, as though with additive RGB? And would it be as bright as the sum of the inputs or as bright as the average of the inputs? NeonMerlin 01:21, 13 June 2007 (UTC)[reply]
Double-exposure. Average (if the mixer is actually mixing 50% of source A and 50% of source B). (The ratio is usually variable, of course).
Atlant 23:58, 16 June 2007 (UTC)[reply]

Is how is binary represented?

[edit]

Some Wikipedia articles such as : http://en.wikipedia.org/wiki/Ascii The binary 'translation' from ASCII to Binary contains only 7 characters (a = 1100001). In other sites, Binary 'translation' is shown to have 8 characters (a = 01100001). (see : http://www.theskull.com/javascript/ascii-binary-list.html) I would like to find out which type is 'accepted' as the correct one. And why there is even a lack of a extra zero for some Binary 'translation'.

ASCII is a 7 bit code, so it's only appropriate to show 7 digits. The second page you cite isn't showing ASCII (despite its name), it's showing an 8-bit character code which adds lots of non-ascii characters, mostly with the 8th bit set. -- Finlay McWalter | Talk 04:32, 11 June 2007 (UTC)[reply]
Yes, these are usually called "extended ASCII characters", and there isn't a standard for them as far as I'm concerned. — Kieff | Talk 05:01, 11 June 2007 (UTC)[reply]
There isn't a very standard standard but there are standards --frotht 05:12, 11 June 2007 (UTC)[reply]
Yep, nothing we can call "the definitive extended ASCII". — Kieff | Talk 05:40, 11 June 2007 (UTC)[reply]
I would certainly call ISO-Latin 1 "the definitive extended ASCII", or at least the closest thing to definitive that we have. Not only is it (or close variants like Windows-1252) used throughout Western Europe, the Americas, and Africa, it defines the first 256 characters of Unicode and is the default encoding for the HTTP protocol. 84.239.133.38 17:56, 12 June 2007 (UTC)[reply]

Back in the days when all studly computer hackers could read paper tape, the eighth bit was commonly used as a parity bit for error detection. Nowadays, when computers no longer make errors, the eighth bit has been hijacked to extend the character set(s).

Atlant 11:44, 11 June 2007 (UTC)[reply]

I have some doubts that we can make the "Nowadays" distinction. Do you mean to say 7 bit ASCII isn't still being used in dialup on modems? Root4(one) 20:47, 11 June 2007 (UTC)[reply]
You need an emergency recalibration of your sarcasm detector. ;-)
Atlant 11:59, 12 June 2007 (UTC)[reply]
Many MTAs won't accept anything but 7-bit ascii, in fact, the RFCs say that unless the server specifically says in the banner that it can handle 8-bit characters, the client must encapsulate any 8 bit data in a 7 bit form. (RFC 1652 I believe) -- JSBillings 22:03, 11 June 2007 (UTC)[reply]
The standard version of ASCII is the 7-bit set shown at ASCII. The character set listed on the website mentioned in the question is really "Latin-1" or ISO/IEC 8859-1. --Bavi H 22:18, 11 June 2007 (UTC)[reply]

favicon location

[edit]

I am trying to find the cache of favicons on my computer. Does anyone know where Firefox (on Fedora) stores them? --Kainaw (talk) 11:59, 11 June 2007 (UTC)[reply]

AFAIK, it's on the disk cache together with everything else. --cesarb 20:00, 11 June 2007 (UTC)[reply]
Doing "file favicon.ico" says "MPEG stream" or something weird like that, so doing a "find ~/.mozilla -type f | xargs file | grep MPEG" should get you started on finding which cache files are favicons. --TotoBaggins 22:11, 11 June 2007 (UTC)[reply]
Type about:cache in your address bar and hit enter. This is your cache "folder". I don't think Firefox stores its cache in a folder. Opera does, though, and it's not a "special" folder like IE, so it's pretty cool... — Kieff | Talk 00:00, 12 June 2007 (UTC)[reply]
Firefox does store your cache in a folder, called ~/.mozilla/firefox/random junk/Cache, but the file names are all numbers. about:cache shows you where the folder is, and should also allow you to find the corresponding file names (for some reason, all I looked at are showing as "none" on mine). --cesarb 02:07, 12 June 2007 (UTC)[reply]
I have Linux and Firefox. I cannot find those little ico files anywhere. Perhaps it gets them fresh each time you visit a site. Youth in Asia 02:24, 12 June 2007 (UTC)[reply]

rdesktop on Cygwin

[edit]

Does rdesktop run on Cygwin? (And before you ask, I can't use Microsoft's RDP client for Windows because it doesn't offer the equivalent of the "-n" option in rdesktop to pretend to be a different computer.) --131.215.167.225 20:19, 11 June 2007 (UTC)[reply]

If you can get X running on Cygwin, it should.

Wikipedia IRC

[edit]

Hello, I frequently go on the #wikipedia or other wikipedia related IRC channel but every time I attempt to start a discussion I am referred to as a troll. This has happened on 2 separate occasions and I have no idea what a troll is, why I am being referred to one and how I can start a conversation in a silent chat room without being referred to as a troll. thanks for your time Lmc169 21:06, 11 June 2007 (UTC)[reply]

Maybe they mean Troll (Internet) or Wikipedia:Troll? -- JSBillings 22:00, 11 June 2007 (UTC)[reply]
they mean Troll (Internet)Lmc169 15:31, 12 June 2007 (UTC)[reply]
You might want to suggest that they read the WP:BITE behavioral guideline, "Don't Bite The Newcomers." -- JSBillings 18:19, 12 June 2007 (UTC)[reply]
Well, are you starting the conversation with something that sounds like trolling? That would easily explain it. Friday (talk) 18:11, 12 June 2007 (UTC)[reply]

un-associate extension in Vista

[edit]

Hi, I am using Windows Vista. I've accidentally associated a file with a program (by checking the always open with the program box when opening the file). I know I can go to Control Panel -> Default Programs -> Associate a file type or protocol with a program, to change the association to open with another program. But how do I remove the association altogether (without having it associate with something else)? Because this file type is gibberish, and just happen to be part of the name of the file and has nothing to do with what kind of file it actually is. --Spoon! 22:24, 11 June 2007 (UTC)[reply]

Try right clicking the file, hover over "open with", when the menu pops out, hit "default program". I'm pretty sure it acts differently than the way you tried. --(Review Me) R ParlateContribs@(Let's Go Yankees!) 00:18, 12 June 2007 (UTC)[reply]
The "Open With" box does not contain anything called "Default program". --Spoon! 04:21, 12 June 2007 (UTC)[reply]