Jump to content

Wikipedia:Reference desk/Archives/Computing/2009 November 19

From Wikipedia, the free encyclopedia
Computing desk
< November 18 << Oct | November | Dec >> November 20 >
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 19

[edit]

Utilities with an API?

[edit]

Electricity company Powershop is beta testing an API. [1] Anyone know of another electricity/gas/water/etc company that also offers an API? F (talk) 05:57, 19 November 2009 (UTC)[reply]

Can a "server" be used as a normal computer?

[edit]

Sometimes second-hand desktop computers that are described as "servers" are available. Can these be used as normal ordinary computers without any problems? 78.144.197.46 (talk) 11:04, 19 November 2009 (UTC)[reply]

They may have strange hardware (dual/quad CPU? ECC memory? SCSI?) that are hard and/or expensive to find replacement for if they died, be in a different form factor to normal PC (rack mount or full tower), and can be really loud. But otherwise there aren't really any obstacles in using them as normal computers. The server/client distinction isn't very distinct anymore. --antilivedT | C | G 11:20, 19 November 2009 (UTC)[reply]
Antilived is right about nice server hardware (example), but my guess is that the vast majority of machines used as "servers" (file and print servers for offices, largely) are just regular light-duty PCs. --Sean 12:27, 19 November 2009 (UTC)[reply]
None of my servers have accelerated graphics cards. So, they are not capable of displaying much in the way of an acceptable graphical desktop. However, a graphics card would be a cheap addition to the server considering that if I sold one at half the price I paid for it, it would still be well over $5k. I don't see why anyone would spend money on graphics for a server. Perhaps they want it to impress a passing janitor by showing a 3D pipes screensaver. -- kainaw 13:20, 19 November 2009 (UTC)[reply]
Kainaw, you might be interested in GPGPUs, which are becoming increasingly common in commercial and scientific compute clusters. However, many of these systems have GPUs without a video-out capability, so it's a moot point. Also, although it was listed as "esoteric server hardware" above, ECC memory is almost ubiquitous on desktops by now (I think). Nimur (talk) 15:45, 19 November 2009 (UTC)[reply]
I've got a used server, a Dell PowerEdge 1600, running CentOS. It has a used 15" screen that has an acceptable GUI for server-like things, administration tasks, and learning about Linux. But I don't use it much and avoid leaving it on long term because it is noisy as hell. Astronaut (talk) 17:45, 19 November 2009 (UTC)[reply]
I don't think ECC is particularly common on desktops. It's rather expensive and commonly unsupported by motherboards. I wouldn't exactly call it 'esoteric server hardware' and there are definitely some desktops which use (particularly those sold as workstations for professional use rather then for home computing or typical office use) it but I wouldn't say it's close to ubiquitious either. Nil Einne (talk) 10:53, 20 November 2009 (UTC)[reply]

There's nothing really preventing using a normal computer as a server or vice versa. It's practically just about what programs it is used to run: servers run services, normal computers run clients. Nevertheless, to be able to better perform their role, servers usually have faster processors, more memory, and more hard drive space than normal computers. On the other hand, their capabilities for direct computer-to-human IO such as graphics are usually much poorer, if they have any at all - servers usually only need to be directly interacted with to do system maintenance. JIP | Talk 20:11, 19 November 2009 (UTC)[reply]

Eg some servers don't have a sound card.F (talk) 02:06, 20 November 2009 (UTC)[reply]

Of course they can, although the more a computer serves, the bigger a target for crackers and malware it becomes, and the slower it runs. Any computer can be used as a server. Server is actually a very broad term. Programs are often called "servers." They serve other programs on your computer -- either in- or out-of-process, other computers, or you. The software -- not the hardware -- makes a computer into a server, and if you just want to use a "server" to browse the Internet or edit photos, then maybe you should just shut down all those server programs. My Windows XP Professional machine can be made into a server by turning on the FTP service. Then, it'd technically be an FTP server. It also has a Telnet service that I can turn on. Then, it'd be both an FTP and a Telnet server. I can also install IIS from the Windows XP CD to make it into a web server, as well. These server processes can all be accessed from the Internet (assuming a firewall or router doesn't block them). So, if you don't want to turn off the server processes in your computer, then at least make sure they're up to date with the latest security patches. I would never browse the Internet on a server computer that's being used for anything important. For example, if you accidentally browse to a malicious web site using an e-mail server, and that site hijacks your computer, then that site could then use your machine to send out spam. And if you have a domain name, then that domain name could be become blacklisted by Yahoo!, G-mail, and Hotmail if it sends out too much spam.--Drknkn (talk) 11:16, 20 November 2009 (UTC)[reply]

Characters support

[edit]

Currently I'm unable to see the characters of Wikipedias in the following languages: Japanese, Chinese, Korean, Cantonese, Gan, Amharic, Wu, Burmese, Classical Chinese, Sinhalese, Hakka, Tibetan, Oriya, Lao, Old Church Slavonic (the Glagolitic alphabet only), Gothic, Cherokee, Tigrinya, Dzongkha, Sichuan Yi. Could you tell me how I can download and install such fonts so I can see all those characters, or at least the most important ones? Thank you. --62.204.152.181 (talk) 11:23, 19 November 2009 (UTC)[reply]

Instruction for east asian languages: Help:Multilingual_support_(East_Asian) , more broad information (also links for other languages) are in Help:Multilingual_support. Lukipuk (talk) 12:12, 19 November 2009 (UTC)[reply]
Thank you very much, everything has been considered here. But I still can't find the Glagolitic alphabet. --62.204.152.181 (talk) 18:43, 19 November 2009 (UTC)[reply]
There seems to be a variation on this same question every few weeks. Check here for fonts with glyphs to display Glagolitic. 220.233.133.226 (talk) 04:50, 20 November 2009 (UTC)[reply]

Picture of the Day screensaver

[edit]

Is there a way to set up a series of Picture of the Day pictures as a screensaver? How can you download all the Pictures of the Day? If such a screensaver can be made for your own personal PC, can it display on the next time starting where it left off from the last time assuming you have hundreds of pictures available for a screensaver or slide show? 64.138.237.101 (talk) 12:05, 19 November 2009 (UTC)[reply]

1) Sure. 2) For past ones, go to Wikipedia:Picture of the day/Archive and start downloading. For future pictures of the day, you would need to write or buy a program that downloads the current one each day from Wikipedia:Picture of the day. That would be quite easy to do (just a few lines of Perl or similar). 3) That depends on your screensaver software, and I didn't fully understand the question, but I'm sure you could find something that worked like you want. --Sean 12:38, 19 November 2009 (UTC)[reply]

Open Excel files in "Page break preview" mode as default

[edit]

I have to check and pdf a vast number of Excel files. I want to save myself (and the mouse) some wear and tear by opening them in "Page break preview' mode. Is it possible to do this? If it makes any difference I can do this task on either a Mac running 10.5.8 or a Windows box running XP Pro.   pablohablo. 12:47, 19 November 2009 (UTC)[reply]

Meaning of leet?

[edit]

The edit summary for this edit is "This Gallia Co.. village is spelled Centreville; QR6U 9 ]\=)". Does "QR6U 9 ]\=)" or "QR6U 9 ]\=" have a meaning in leet, or is this something else? Nyttend (talk) 15:00, 19 November 2009 (UTC)[reply]

Nope its just spam.Accdude92 (talk to me!) (sign) 15:30, 19 November 2009 (UTC)[reply]
It doesn't look like leet to me.

smoke stream

[edit]

Question moved to Science Desk by Falconusp t c

Posting a python script in Wikipedia

[edit]

Hi there, I've got a python script for making SVG maps that I think might be useful to other editors, but I can't figure out how to present it properly in Wikipedia. I'm sure I've seen "example code" before on the site that comes up in a little box, but I can't find an example to copy off of at the moment... Could anyone tell me how to display code in a little box or whatever? Thanks a lot, TastyCakes (talk) 17:01, 19 November 2009 (UTC)[reply]

Take a look at the markup in some other questions here. For example WP:RD/C#A script language for doing things with blocks of text?. You will probably want to try something like: <source lang="python">...</source>. Astronaut (talk) 17:39, 19 November 2009 (UTC)[reply]
That's perfect, thanks a lot! It even colours the text properly. I hadn't noticed the questions using them above, I guess that would have been a smarter place to start ;) TastyCakes (talk) 20:15, 19 November 2009 (UTC)[reply]

Model View Controller in ASP.NET

[edit]

I'm trying to wrap my head around the MVC design pattern in .NET. I just read Implementing Model-View-Controller in ASP.NET from MSDN. It starts with a non-MVC example where all code in the ASPX file (read: no code behind and no business layer). It then goes on to separate out the code into 3 files: the ASPX file (view), the ASPX.CS code behind (controller), and finally a .CS business class (model). What confuses me is that this is pretty much how most ASP.NET applications have been written since .NET 1.0. Visual Studio creates the code behind by default - you kind of have to go out of your way not to use a code-behind. As for the business class, people have been seperating their UI from their business logic since VB5 days. Is this really how MVC is supposed to work, or is there something more? 216.142.208.222 (talk) 20:13, 19 November 2009 (UTC)[reply]

MVC is just a formalization of a specific software architecture paradigm, using a particular set of terminology to refer to the proper separation of presentation and implementation. The concept has existed at least since the design of object oriented languages, and even earlier, simply in the form of modularity. Our Model–view–controller has a history section, if you're interested in how the concept evolved. Nimur (talk) 23:59, 19 November 2009 (UTC)[reply]
You speak with the refreshing sweetness and untrammeled innocence of someone who has never slogged through a million lines of:
if (park_disk_head() != SUCCESS)
   popup_warning_window("Hi, this is your device driver. Your disk is in poor repair. "
                        "Shall I dial YoyoDyne Support on your modem and order a replacement?");
--Sean 15:18, 20 November 2009 (UTC)[reply]

Windows Media Player does not stop playing

[edit]

I can open a file on my computer - a podcast, for example - using Windows Media Player and, despite closing the player using the upper right X button, the file continues to play. Has anyone else noticed this? What can I do to stop this? --Blue387 (talk) 20:44, 19 November 2009 (UTC)[reply]

Yes, this is a common problem. One solution, of course, is to kill the wmplayer.exe process. --Andreas Rejbrand (talk) 21:35, 19 November 2009 (UTC)[reply]
That is, press Ctrl+Shift+Esc, open the tab named "Processes", select "wmplayer.exe" by pressing the "w" key a few times, and then press the "Delete" key. --Andreas Rejbrand (talk) 22:53, 19 November 2009 (UTC)[reply]

Vtable table

[edit]

In compiled object-oriented programs, under what circumstances if any will a table mapping classes to their vtables be created, and what is such a table called? NeonMerlin 20:53, 19 November 2009 (UTC)[reply]

Virtual method table says "To avoid this overhead, compilers usually avoid using vtables whenever the call can be resolved at compile time." So a virtual-method indirection is created only when some code is being compiled when the compiler doesn't know what the actual class a given object will be at compile time. That's when you're invoking a virtual (overridable) method on an object declared as a non-final (base-able) class. I don't think they're calling anything fancier than "vtable" or "virtual method table". -- Finlay McWalterTalk 22:11, 19 November 2009 (UTC)[reply]
Vtables by definition are implementation defined, so there won't be a single answer to your question. They are perhaps best known in C++ implementations, in which the thing you describe is unlikely to exist as there is no reason for it: C++ has very little introspection ability and is not particularly dynamic, so the class-to-vtable relationship is known at compile time and there is no reason to have a separate table to find the vtables. In C++ you never ask at runtime, "I have this class, please give me a pointer to one of its virtual methods*", and you never say "I have this class, please replace one of its virtual methods with this other method". A vtable's only role in a static language like C++ is to map objects to their virtual methods, which is a different thing entirely. YMMV with other languages. --Sean 15:05, 20 November 2009 (UTC)[reply]
*Footnote: C++'s bletcherous pointer to member function misfeature looks like you're doing this, but it's really just a way to give a type to an individual virtual member function, and still looks at the object's pointer to vtable at the time of the call. --Sean 18:42, 20 November 2009 (UTC)[reply]

Fakeroot

[edit]

If the Linux fakeroot command weren't designed with a way to detect it, could the application still detect that it wasn't really running as root? If so, how? NeonMerlin 20:57, 19 November 2009 (UTC)[reply]

fakeroot doesn't try very hard - it doesn't really implement open and creat properly; so you can go fakeroot touch /root/foo and it fails. Even if it did implement a faked filesystem (using chroot and lots of hard links, or a UnionFS overlay) fakeroot would still be detectable. Notice it works by intercepting the dynamic link to libc. If you make a system call directly (using SYSENTER rather than calling the appropriate libc function) and do something that only root can do (like creat("/root/foo", O_RDWR) then that skips the fake environment that fakeroot established, calling straight to the real kernel, which will know that you're not really root, and will return EACCESS. I guess fakeroot could be further enhanced by rewriting child programs to patch out SYSENTER, but that opens yet more worm cans. fakeroot really is only for goofing around with stuff that wishes it was root; it's not a proper jail, and isn't trying to be one. -- Finlay McWalterTalk 22:02, 19 November 2009 (UTC)[reply]