Wikipedia:Reference desk/Archives/Computing/2007 August 18#writing to a wiki, best practices

{{#ifeq:{{PAGENAME}}|Special:Undelete| |{{#if:{{{nosubst|}}}|

}} {{#ifeq:{{NAMESPACE}}|Wikipedia|{{#switch:{{NAMESPACE}}|= |
}}|{{error:not substituted|Archive header}}
}}}} {{#if:{{{nosubst|}}}|
}}
width = "100%"
colspan="3" align="center" | Computing desk
width="20%" align="left" | < August 17

! width="25%" align="center"|<< Jul | August | Sep >>

! width="20%" align="right" |{{#ifexist:Wikipedia:Reference desk/Archives/Computing/2007 August 19|August 19|Current desk}} >

align=center width=95% style="background: #FFFFFF; border: 1px solid #003EBA;" cellpadding="8" cellspacing="0"
style="background: #5D7CBA; text-align: center; font-family:Arial; color:#FFFFFF;" | Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is {{#ifexist:Wikipedia:Reference desk/Archives/Computing/2007 August 28|an archive page|a transcluded archive page}}. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.

__TOC__

= August 18 =

windows action on highlight

Is it possible to have something done when text is highlighted, system-wide (not just in a web browser or word processor but anytime on the windows system a piece of text is highlighted) ie without further user input (such as right-clicking on the highlighted text).

Thank you!

84.0.126.202 00:03, 18 August 2007 (UTC)

:Short answer: sure. It's just a function of the window manager (it's doing the highlighting/selecting). So: if the wm doesn't do what you want, just modify it. [http://www.x.org/wiki/] [http://www.gnome.org/] [http://kde.org/] Heheheh. Saintrain 21:13, 18 August 2007 (UTC)

:: That's so not an answer!!!! grrr >:| 84.0.158.159 17:32, 20 August 2007 (UTC)

writing to a wiki, best practices

Hi:

Is there such a thing as "Best Practices" for writing to a wiki?

Thanks.

72.19.150.123 00:36, 18 August 2007 (UTC)

: Wikipedia is an encyclopedia, so articles should generally be about encyclopedic stuff and in an encyclopedic tone. See Wikipedia:Your first article and Wikipedia:Guide to writing better articles. --h2g2bob (talk) 03:51, 18 August 2007 (UTC)

:: While Wikipedia is a wiki, wiki is not Wikipedia. —Preceding unsigned comment added by 203.49.213.95 (talkcontribs)

::: True, there would be different answers for PenguinWiki and Conservapedia than here. Each wiki site has it's own house rules. See wiki for differences between wiki and Wikipedia --h2g2bob (talk) 14:55, 18 August 2007 (UTC)

:The Wikipedia:Manual of Style provides alot of guidance on best practices for writing encyclopedia articles. -- Diletante 16:18, 20 August 2007 (UTC)

Screensaver as video?

Dynamic Scoreboard/Table

I'm wondering what is the best way to make a scoreboard with data that can be changed dynamically with an external file. I have done a bit of research and have found out that I could use the DataGrid component in , but I am having trouble figuring out the best way I could use it (or something else) to display that data.

The data would probably be inputted to Excel and will have a set number of columns and rows. At this stage I think saving as a CSV file would work the best, however I am having trouble displaying it on flash properly. There will probably be around 100 rows for all the different teams and the columns would be team number, name, rank and score.

I would be really grateful if anyone has any ideas. I have a moderate knowledge of Flash. Another idea I had was to use a database and make a frontend but I don't know any good resources that would should me how. I am using Adobe Flash CS3.

Thanks!

Ronaldh 02:48, 18 August 2007 (UTC)

:This is different from what you are doing, but if you know how to write a program, all you have to do is change the .exe to the screensaver extension (I forget exactly what that is) and put it in the Window's screensaver folder. I believe that this works with any program - there are instructions on exactly what to do on the internet. --Falconus 03:22, 24 August 2007 (UTC)

handicaps

If you don't have two functional hands (or long-enough fingers), how do you get Ctrl Alt Del or, for that matter, any shifted character (other than capital letters)? Presumably there have been numerous solutions over the decades. —Tamfang 03:11, 18 August 2007 (UTC)

:In Windows, there's a utility called StickyKeys. Press the shift key five times, and then click "OK". It will allow you to hold down control, alt, shift, or the Windows key, without actually holding them down. I think the feature at least dates back to Windows 95 through XP (not sure about Vista, but I don't see why it wouldn't be there). –Pakman044 03:22, 18 August 2007 (UTC)

::(edit conflict) It's called Sticky Keys, and it's included in Windows. Hit Shift five times in a row fast. You can then hit shift, the windows logo, ctrl, and alt one at a time, or shift and then a letter to get the capital. (Pakman: It is in Vista) --(Review Me) R ParlateContribs@ (Let's Go Yankees!) 03:25, 18 August 2007 (UTC)

:: MacOS has Sticky Keys too. On a related note, I used to sometimes find that my mouse wouldn't click, and eventually figured out that by repeatedly tapping Shift or Control in a futile attempt to get the machine's attention when it was thrashing I activated Easy Access (i think). Problem went away when I disabled that feature in System Preferences. —Tamfang 06:15, 24 August 2007 (UTC)

:There are also one handed keyboards in existence, although I'm not sure if they take that into the design. if nothing else, get paperweights! --Lucid 04:21, 18 August 2007 (UTC)

Ah yes, the dreaded sticky keys alert. This should teach you not to have the shift button binded to a frequent action in a computer game. Is there any way to disable it?--Funnyguy555 15:20, 20 August 2007 (UTC)

:Yes, open the control panel on the subject "Accessibilty" or whatever it is in your version of Windows, goto the Keyboard tab, selete "Settings" for each of the three different options and unselect the "Use shortcut" option. OK out of all the dialogs boxes and restart if you want to be on the safe side. 68.39.174.238 22:03, 21 August 2007 (UTC)

To the original asker, you can also use On Screen Keyboard, which lets you click keys like Ctrl and Alt on an visual keyboard and they will stay "stuck". This doesn't work, unfortunately, for Control-Alt-Delete. 68.39.174.238 22:03, 21 August 2007 (UTC)

USB flash drive in linux

When copying files to a USB flash drive in linux (specifically slackware), how do you insure that the files have actually been written to the disk at that moment in time, rather than being stored in RAM before unmounting the drive? Think outside the box 14:06, 18 August 2007 (UTC)

:Well when you unmount it all the stuff will be written to disk. --Spoon! 16:47, 18 August 2007 (UTC)

::But of course if you yank it out without unmounting it, it might not be.

::You can type sync to force disks to be written without unmounting them. (I think sync still works in Linux, tho I'm not quite 100% sure...) —Steve Summit (talk) 17:34, 18 August 2007 (UTC)

:::Thanks Steve Summit, I'll try that. By the way, I type sync in Console, right? Think outside the box 13:55, 20 August 2007 (UTC)

::::Right.

::::If your flash drive has an activity light on it, you can confirm what's happening. If you copy a big file to it, you'll see a tiny bit of activity. If you unmount the drive a few seconds later, you'll see a bunch more activity, as all the deferred writing completes. Or, if you copy a big file to the drive, and then wait 30 seconds or so (without unmounting the drive or doing anything), you should see a bunch of activity as Linux decides it had better complete those deferred writes just to be on the safe side. Or, if you copy a big file to the drive and a few seconds later type sync, you should see a bunch of activity just then. Finally, after copying a big file, and then either typing sync or waiting 30 seconds for an automatic flush to happen, when you then unmount the drive, you should see little or no activity, and the unmount should complete faster, too. (Even if you don't have an activity light on the drive, you can get clues as to what's going on just by looking at how long things take.) —Steve Summit (talk) 16:43, 20 August 2007 (UTC)

graphics cards

Is there a 'human limit' on the power of graphics cards above which it becomes pointless to further improve the performance (ie taking into account diminishing returns and the limits of what people can actually perceive on a screen)?

If so do how near to that limit are we?

I'm thinking in terms of a point at which further developement on improving performance stops because there is no market for more powerful cards..87.102.92.28 14:52, 18 August 2007 (UTC)

:Even if we reach the point where no further improvement can be perceived, it's likely that some market will still exist, just because higher-than-average specs bring bragging rights (and an implicit claim to being able to tell the difference). NeonMerlin 18:44, 18 August 2007 (UTC)

:There is also the issue of the limitations of the monitor. It doesn't much matter if you can provide 1000 frames per second to the monitor, if it can only display 100 frames per second. Personally, I can see "flicker" in an all-white screen at 60 frames per second, so I would say the human limit is a bit above that. As for color depth, 24 bits seems the same as 32 bits, to me, so I suspect we've hit the limit there. For number of pixels, 1600×1200 is the highest res I'd want on a 19 inch screen (or 1920×1080 for a wide-screen monitor). If I can get a large screen monitor, though, I'd love to have higher resolutions available on those. For example, if I could double the monitor's diagonal size, to 38 inches, and thus quadruple it's area, I'd like to have a 3200x2400 pixel standard or 3840x2160 pixel widescreen display. StuRat 21:16, 18 August 2007 (UTC)

::24 bits and 32 bits have exactly the same amount of bits (8) to each colour, just that in 32 bits an 8 bit alpha channel is added. Some things, such as ray-tracing which are used in some major feature films to produce photo-realistic renders, is extremely computing intensive, and with new effects such as sub-surface scattering that will put even more load onto a future graphics card. Then if you want 3D vision (stereo rendering), you need twice that, and then anti-aliasing will increase it even more. In short, we are no where near the hypothetical perception limit in humans, we aren't that simple minded. --antilivedT | C | G 11:11, 19 August 2007 (UTC)

Amarok scoring

In Amarok, is it possible to have all scores decay exponentially each night so that songs that haven't been played recently will have lower scores? Also, is it possible to adjust the scores when updated play counts are loaded off an iPod? NeonMerlin 14:53, 18 August 2007 (UTC)

Transparent Overlay

I've been designing a web page for a client, and she's worried about people right-clicking and downloading her images. I can stop them right-clicking, but as my client's on a mac she's painfully aware of the limitations of that particular approach. A friend of mine mentioned I could position a transparent gif over the image so they'd only download a useless gif - how do I position this to be on top of the image I want? Do I need to use CSS with that, and if so, what's the tag look like? I'm used to basic HTML, Javascript, Java, and Perl, but somehow I never picked up much about CSS (and I've yet to need it, it's amazing how few features people need these days). Kuronue 19:24, 18 August 2007 (UTC)

:You should encourage your client to not worry about that so much. Any scheme you come up with will be easily defeatable at best, and screw up the delivery of the content to the end-user at worst. What is the consequence of people downloading her images to their desktops? Who cares? Why worry about it? All you are going to do is irritate genuine visitors, and anyone who wants the image will quickly be able to view the source and grab it that way, or just take a screenshot (both of which can defeat the Amazon.com/Google Books attempts, which were created by people who were REALLY trying to subvert just such an attempt. If they can't make something modestly fool proof, I doubt anyoe can.) Downloading the image should not be something to fear — if it is, don't put the image up. If you are worried about subsequent re-use of the image, put up some nasty copyright notices and then issue DMCA take down requests everytime one pops up that you don't want. This isn't something that has a technical solution, and you are doing your client a disservice if you do not explain that to her. --24.147.86.187 19:43, 18 August 2007 (UTC)

:If you client insists on this anyway, and you feel like billing them for useless work, here's how I would do it:

::

::

::

:Then in the stylesheet, fill the #container with a single-pixel transparent .gif as its image, have it tile it across the container. That probably will work though I haven't tested it (it might just fill the background of the div). Again, I doubt that would deter anyone from getting the image. --24.147.86.187 19:46, 18 August 2007 (UTC)

::That will not work, since the img element is above the div and therefore it will show up above the div. You can, however, do the reverse, setting the real image as the background of the div and a transparent img on top of that div, but that's really cumbersome for you and quite useless on anyone with more than moderate computer knowledge. There is no way of actually protecting the images that's fool proof, for your methods I could just save the page and all the graphics will end up in a folder next to the html file. --antilivedT | C | G 02:27, 19 August 2007 (UTC)

:I agree that this won't keep anyone from stealing the image. They can always just use Print Screen (on a Windows PC) and then paste it into Microsoft Paint. Some methods that others have used to display an image, and yet protect it, are as follows:

::1) Provide a low res image on the web site for free, and make people send you money before you let them see the full res image. They could still steal it then and give it away to others for free (illegally), but at least you will have gotten some money out of them first.

::2) Add an annoying "watermark" across the image, with the name of your web site, for example, and only show them the good image once they have paid for it. The same comment applies to them stealing the image after they pay to see it.

::3) Only show them a part of the image at once. There are programs that will let people stitch them together into one big image, but that's a lot of work and most people won't go through that trouble. StuRat 20:52, 18 August 2007 (UTC)

:Also — if you restrict my ability to right-click, or anything else that has to do with my browsing, I'm going to be pissed off, as an end user. Maybe I want to view the layout source and don't give a damn about the images? Maybe it is how I am used to reloadin a page? Maybe I am viewing the page in a way that doesn't normally have forward and back buttons and I need to scroll in this way? Etc. etc. I would heavily advise against restricting user input or anything like that if you want to have good relations with your client base — all it does is throw up barriers that impede people who might actually be interested in the page, and have a high chance of going wrong (incompatibilities with old browsers, possibility that your javascript will crash the browser, etc.). --24.147.86.187 22:10, 18 August 2007 (UTC)

: If the enduser has access to the HTML source, they can simply download the image by snipping out the image URL and manually entering that in the browser, as well.

:: It's not always quite that simple. Some sites check the HTTP-Referer and only serve up images if they appear to be on behalf of the page they're supposed to be part of. In that case, you need a way to fake the referer. —Steve Summit (talk) 00:28, 19 August 2007 (UTC)

::: It's not that more difficult to fake the referer, though; create your own HTTP request with a faked referer and then capture the output. It is, however, more difficult than manually downloading the image.

:::: Referer checking doesn't do anything to prevent people from downloading the image from the web page itself. --antilivedT | C | G 02:27, 19 August 2007 (UTC)

: The only reasonably effective scheme I've seen used to prevent someone from saving off a copy of an image is one employed by a sports event photography company (one of those things where you ran in a mass event and afterward typed your bib number into a website; they found all the images that contained you, showed you them, and offered to sell you paper prints). They mandated that you download a (windows only) plugin. The plugin downloaded the images in an encrypted format (breaking sniffing and saving-proxy attacks) and it displayed them using a DirectX surface (breaking the print-screen attack). Short of someone taking a lot of effort to reverse engineer the plugin there wasn't a way to save the images. But in the process they'd alienated a great proportion of their customer base - only Windows users could access the photos, and many (most now, I'd hazard) will just refuse to download and install a plugin for this one purpose (or couldn't, because it was a work machine or they lacked the technical confidence to do so). So while they'd succeeded in their goal of not having their images copied, in the process they'd taken their business model out behind the chemical sheds and shot it. The more effective a DRM scheme is, the more inflexible it becomes, and the more the customer feels like you're treating him like a dirtbag. For these cases I always say to people "upload the image at only a modest quality and size, say 640x480 (which will give a representative view of what the final product is like without giving away the farm) and sell your multimegapixel images from that". -- Finlay McWalter | Talk 13:21, 19 August 2007 (UTC)

::Even using a DirectX surface can be captured in a screenshot if you disable hardware video support (which isn't hard). --24.147.86.187 06:51, 20 August 2007 (UTC)

Thanks for the info, guys. I've told her multiple times that there's no real way to get around image-stealing, and suggested that she watermark her images instead (low-res and pieces of images don't work because this is her online portfolio she uses to attract customers to her photography business, so she needs it to look good), but if the client wants an almost-useless overlay image, then that's what the client gets, as I bill by the hour and am more than happy to spend extra time and thus get extra $$, and on the plus side that'd let me remove the annoying anti-right-click script which never really worked that well anyway (anyone on a mac, or using firefox, can still manage to snag the images, but in firefox you get an annoying popup that still doesn't actually disable anything, but she surprised me by emailing me the script and requesting it be put up, so I did). Kuronue | Talk 15:51, 19 August 2007 (UTC)

:Well, that's sad. She should be so lucky that someone would bother to steal her images and post them around. Put a watermark on the bottom with her name and URL, and then you can practically encourage people to pass them around. She won't lose money and might gain customers. But alas, how short-sighted people are. --24.147.86.187 06:51, 20 August 2007 (UTC)

::I'd put the watermark in the middle, not at the bottom, so that thieves can't trim the watermark off and resell the pic as their own. StuRat 10:25, 20 August 2007 (UTC)

What is the ruby syntax construct with a colon and square brackets

Take a look at the following Ruby code:

rhash = {"color" => "red"}

rhash[:color] = 'blue' ### <- what is being assigned to here?

puts rhash["color"] ### "red"

puts rhash[:color] ### "blue"

Where can I look to find the documentation for this syntax and what it's doing? rhash[:color]. I see this notation in ruby sample code, but I can't find the documentation for it. NoClutter 19:50, 18 August 2007 (UTC)

: It's called a symbol. Using :a_symbol as a reference is like using "a_quoted_thing". Using symbols is encouraged, as it only stores the text of the symbol in one place and just provides pointers to it; rather than storing the same text string over and over. As you see using :whatever and "whatever" is different. Google for "ruby symbol" for all the salacious details --h2g2bob (talk) 23:21, 18 August 2007 (UTC)

Can't play starcraft

I installed StarCraft on my laptop, which runs on 1280x800 widescreen and has windows vista. I opened starcraft and it said it was 'unable to switch video modes. to correct this problem, please set desktop area to 640x280 and color palette to 256 colors.'

How do I do this? the lowest my monitor goes is 800x600

:See if you can run the game in windowed mode instead of full screen. It is usually a rather hidden command-line option. -- Kainaw(what?) 21:37, 18 August 2007 (UTC)

::[http://teamliquid.net/forum/viewmessage.php?topic_id=50034 This link] offers a program that they claim will put Starcraft in windowed mode. Alternatively, you may try connecting a monitor to your notebook, it may support more video modes that way. 69.95.50.15 18:56, 20 August 2007 (UTC)

I'm not sure if Windows Vista has this feature, but you could try running it in compatibility mode. To do this in Windows XP (likely the same if Vista has this feature), right click, go to properties, click the "Compatibility" tab, and select your settings. MalwareSmarts 21:59, 18 August 2007 (UTC)

::I've heard of several complaints from many users about game compatibility with Windows Vista, like in Need For Speed Carbon, which is said to crash on Vista. Either downgrading to XP or waiting for Service Pack One might be the cure for that... Blake Gripling 00:45, 21 August 2007 (UTC)

VMWare question

Hi:

If I run Linux in VMWare on Windows XP. Can I access my Winmodem from Linux as a ordinary /dev/modem serial driver which is mapped to the emulated COM3 port provided by the Winmodem driver running in Windows?

Regards,

74.116.223.48 20:39, 18 August 2007 (UTC)

:Yes, it should work. (It possibly might map to something else than /dev/modem) -Yyy 10:50, 19 August 2007 (UTC)

::Thanks Yyy! 74.12.36.60 16:08, 19 August 2007 (UTC)

:If Linux can deal with whatever hardware VMware emulates as the modem, then you should have no problem with Linux. VMware just needs to be able to deal with the actuall modem. 68.39.174.238 23:15, 21 August 2007 (UTC)

Is there a freeware equivelent to Adobe Flash?

Just wondering. Has to be compatible with Windows XP. MalwareSmarts 21:57, 18 August 2007 (UTC)

:Nothing that really works yet, no. SVG as a format could someday compete with Flash in some respects, but as of now, it really can't. And personally I doubt it will ever really be able to replace Flash, unless they are going to built up something as comprehensive as Actionscript inside it. And I don't think there are any freeware Flash editors—the closest thing might be OpenLaszlo, which uses it own format but can convert to SWF. --24.147.86.187 21:58, 18 August 2007 (UTC)

:: Gnash and OSFlash[http://osflash.org/] are available as open source SWF players, but often (in my experience with them) fail to work correctly, especially with video. These are reverse engineered: Adobe release the specs for SWF for creating SWF files only (hence OpenOffice.org can create them), but not for reading (which means no players. Adobe release Macromedia Flash Player for Windows, OSX and Linux, which are all good for playing SWF <= 8. See also SWF. For web applications, a mixture of CSS and JavaScript can replicate some functionality, depending on need. Alternatively, make it an executable (there must be some vector graphics libraries out there). --h2g2bob (talk) 22:33, 18 August 2007 (UTC)

::: No, I didn't mean a flash player, I mean an animation software similar to Adobe Flash MalwareSmarts 01:59, 19 August 2007 (UTC)

Wikiwix

hum.. Wikiwix - so what is the relationship? if any? --Fredrick day 22:02, 18 August 2007 (UTC)

:: ok that is gone, so [http://www.techcrunch.com/2007/05/19/the-mysterious-wikiwix/ this] might be useful for some context. --Fredrick day 22:03, 18 August 2007 (UTC)

::According to their FAQ page, "(c) Linterweb 2007 - Wikiwix is a search engine that provides a comprehensive search within Wikipedia articles developped by Linterweb. Linterweb is a French company specialized in search engines, and is also the publisher of the Wikipedia 0.5 DVD". So it is a Wikipedia search engine by a company which is working with the Wikimedia Foundation to publish Wikipedia on a DVD. So there is some connection, I guess—Linterweb redirects to the History of Wikipedia article and discusses the deal. Heavens knows Wikipedia could use a better search engine. --24.147.86.187 22:05, 18 August 2007 (UTC)

What does "www3" means in web address like www3.nationalgeographic.com?

What does "www3" means in web address like www3.nationalgeographic.com?

: It probably means they have multiple web servers, either to share the load, or to distribute different parts of their site. —Steve Summit (talk) 22:53, 18 August 2007 (UTC)

::www3 is a subdomain of nationalgeographic.com. Different subdomains are often (but not always) on different physical computers (web servers). This technique can be used to divide a domain name into parts, such as wikipedia.org into en.wikipedia.org and fr.wikipedia.org. It is often used to reduce load on any one server by placing different parts of a site on different servers. For example, images on Wikipedia are located on the server upload.wikimedia.org, so if the image server crashes or runs slow then the rest of Wikipedia is unaffected.

:: Your computer matches web addresses with IP addresses - the actual computer's location - by asking special servers what name matches what address. This is the internet's domain name system (DNS).

:: www.nationalgeographic.com is at IP address 207.24.89.108, while news.nationalgeographic.com is at 207.24.89.110, indicating they are two separate computers. www3.nationalgeographic.com is also located at 207.24.89.110, so is shared with "news". "www3" responds to my HTTP requests with a redirect (HTTP 302 Found) to "www". --h2g2bob (talk) 23:10, 18 August 2007 (UTC)

:::Note that of course there's more than one server hosting upload.wikimedia.. --frotht 04:42, 22 August 2007 (UTC)