Wikipedia:Reference desk/Archives/Computing/2010 July 9

Computing desk
< July 8 << Jun | July | Aug >> July 10 >
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.


July 9 edit

Applying a filter to a layer mask in Photoshop Elements 8 edit

In Photoshop Elements 8, can you apply filters to a layer mask? --173.49.9.164 (talk) 01:50, 9 July 2010 (UTC)[reply]

Well, I did find this. Chevymontecarlo - alt 14:43, 9 July 2010 (UTC)[reply]

New wiki edit

What would it take for someone to build a new Wikipedia? (I don't have definite plans to do so at this time, I'm just curious about what it took Jimbo Wales to build this whole thing.) 67.170.215.166 (talk) 02:55, 9 July 2010 (UTC)[reply]

One would need a web server (like Apache) with PHP (a server-side programming language), MySQL (a database language), and MediaWiki (the software that runs the whole thing.) 75.2.138.84 (talk) 04:08, 9 July 2010 (UTC)[reply]
...and millions of volunteers with spare time on their hands. Astronaut (talk) 08:29, 9 July 2010 (UTC)[reply]
Not just volunteers, but volunteers willing to spend their time deleting vandalism. If it wasn't for all the tools to quickly and painlessly delete vandalism on Wikipedia, the entire project would fail. -- kainaw 12:21, 9 July 2010 (UTC)[reply]
According to your retirement post on another thread, you're looking for a Wikipedia-like project that is not so "extreme left-wing, cosmopolitan, pro-Soviet, pro-Third World, and anti-American/anti-Israel". You might like to check out Conservapedia, which is definitely none of those things. --Sean 16:38, 9 July 2010 (UTC)[reply]
Actually, I already did; the problem is, it's extremely biased the other way, toward an extremely right-wing Christian fundamentalist point of view, and also doesn't seem to have a lot of info outside those topics. What I hope to do eventually is to create a wiki that's somewhere in between the two: it would have information on a wide variety of topics, and would present politically charged topics from a pro-American and pro-Western but (hopefully) non-partisan POV, representing all views in the political mainstream while excluding as much as possible those views that promote Marxism, jihad, or a world government or which denigrate Western civilization and in particular the United States. I could personally help with the first part by creating articles about all topics that I'm knowledgeable on (i.e. Earth sciences/Meteorology, Earth sciences/Geology, Chemistry/pretty much everything, Technology/everything except computers, History/American history, History/History by nation/Russian history, History/Military history, History/Biography/American presidents, History/Biography/American scientists and Scientists by nationality, History/Biography/American inventors and Inventors by nationality, History/Biography/American aviators and Pioneers of flight, History/Biography/American musicians, Arts/Literature, Arts/Music, and Arts/Film). As for the second part, I don't really know how to achieve that, but perhaps it could be possible to somehow restrict edits from those regions where there's widespread anti-Americanism? And as far as volunteers are concerned, I think that would depend in part on an effective advertising campaign to promote the new wiki. Well, what do y'all think of this idea? 67.170.215.166 (talk) 01:58, 10 July 2010 (UTC)[reply]
What do I think? It's an idea that's been tried before that has not gone anywhere. --mboverload@ 03:07, 10 July 2010 (UTC)[reply]
In fact this idea seems even less likely to succeed. For all conservapedia's criticism, and altho they do require registration and real names at least they generally AFAIK only restrict and ban editors because of behaviour (well sometimes in a bit of a random way) and not geographical origin. Nil Einne (talk) 03:58, 10 July 2010 (UTC)[reply]
Speaking of mandatory registration, I think it's actually a good idea that will help maintain the new wiki's pro-American character without requiring any geographical-based restrictions. And, it will also help prevent vandalism. So what do y'all think of that? 67.170.215.166 (talk) 00:27, 11 July 2010 (UTC)[reply]
Vandalism maybe. But why do you think mandatory registration will help maintaining a "pro-American" character? I also find it very unlikely that its possible to combine "pro-American" and "non-partisan". --Stephan Schulz (talk) 13:43, 11 July 2010 (UTC)[reply]
I wasn't asking you -- based on your past comments (on the ref desk and elsewhere (such as your "evil empire" comment from not so long ago), I know you're very much pro-Third World and anti-American, and therefore your views and those of like-minded people will certainly have to be excluded from this new project. Indeed, my primary purpose in getting a new wikipedia underway (and yes, I've recently started preliminary planning) is to stop people like you from dominating the discussion about American history, culture and politics. 67.170.215.166 (talk) 00:25, 12 July 2010 (UTC)[reply]
Good luck in your intellectual Gulag. If you have some time left from excluding inconvenient facts and opinions (what an American virtue...I can see Jefferson spinning in his grave), you might want to read Zero sum game, though. --Stephan Schulz (talk) 09:30, 12 July 2010 (UTC)[reply]
Hey SS, how are things going in the Fourth Reich? 67.170.215.166 (talk) 00:31, 13 July 2010 (UTC)[reply]
Just so you know, SS, I've reviewed the transcripts of some of our past "discussions", and there's one thing I'd like to know: Just who the bloody hell ARE you to complain about me excluding blatant anti-Americanism from my proposed new wiki when YOU YOURSELF had accused me of trolling and soapboxing and threatened to have me banned about a year ago because I said that all Afghans are evil savages (which is no more hateful, and has a lot more evidence going for it, than your calling the United States an "evil empire")? You call my idea an "intellectual gulag" because I wouldn't let people like you spew hatred of the American Way on that new wiki, and yet here on Wikipedia you yourself are one of the bluecaps enforcing political correctness! SS, you're one of the biggest hypocrites I've ever seen, either on line or in person -- you would've really been at home in the US Congress (except that you'd get thrown out during this year's elections and replaced with someone more honest). And as for "excluding inconvenient facts and opinions", are you trying to make a case that the views and opinions of savages, evildoers, and crazy lunatics deserve to be included alongside the views of upstanding, civilized people?! I'm absolutely sure that even Jefferson (libertarian as he was) wouldn't stand for that kind of "dialogue"! God save America from "intellectual" hypocrites like you! 67.170.215.166 (talk) 00:18, 14 July 2010 (UTC)[reply]
Well, the first version was equally sophisticated, but at least had the quality of brevity. --Stephan Schulz (talk) 00:01, 15 July 2010 (UTC)[reply]
I'm curious. Can the OP provide a couple of examples of articles which they believe "promote Marxism, jihad, or a world government or which denigrate Western civilization and in particular the United States"? Astronaut (talk) 05:45, 10 July 2010 (UTC)[reply]
I can think of quite a few: for example the article American exceptionalism devotes a huge amount of space to debunking American nationalism, and precious little space for the views of its supporters; similarly, War on Terror has a large section devoted to criticizing American intervention while largely ignoring America's successes in fighting terrorism. These are just the first two examples that come to my mind, I'm sure there are others. 67.170.215.166 (talk) 00:27, 11 July 2010 (UTC)[reply]

Does anyone know why the page didn't work anymore?-Henswick (talk) 07:59, 9 July 2010 (UTC)[reply]

Well, like with any site like this, it might've been deleted, moved or the URL is wrong. The site also could be down for repairs/fixes or improvements. However, this seems to be a similar official site. Chevymontecarlo - alt 14:46, 9 July 2010 (UTC)[reply]

is it possible to program new gestures via macbook pro trackpad? edit

Is there a built-in way to program new gestures into the macbook pro trackpad (ie change meaning of 2-3-or 4-fingered swipes in various directions). thanks. —Preceding unsigned comment added by 84.153.202.156 (talk) 11:43, 9 July 2010 (UTC)[reply]

By the way, for any questions concerning Mac/Apple products, you can always search Mroogle. It searches through the Macrumors forums, which is quite extensive. Sorry I couldn't give you a proper answer to this, but I would say probably yes, but only with a lot of work (hacks etc). There may be an app for that somewhere out there though. Chevymontecarlo - alt 14:50, 9 July 2010 (UTC)[reply]
Built-in, no, but there is an excellent third party program you can download: BetterTouchTool. I use it myself, and it definitely makes the trackpad incredibly more useful. It has a large number of gestures you can use (with more added almost every time an update is released) and you can even define gestures for individual programs. 173.66.161.221 (talk) 22:30, 9 July 2010 (UTC)[reply]

PSTN Gateway in CISCO technology edit

Hi all, I need to know the core functionality of a PSTN gateway that is used in a stand alone deplyment of CISCO VOICE PORTAL. How it is used? What are the protocol structures ad messages it uses? and Anything else that one knows. Kindly answer in the most detailed way possible.

Thanks and regards C Pathak —Preceding unsigned comment added by 121.242.118.17 (talk) 12:40, 9 July 2010 (UTC)[reply]

The chances are that it will interconnect to the PSTN using ISDN over T1 or E1 lines. These multiplex the voice channels using time division multiplex. One of the time slots is for signalling, and would use Q.921 at layer 2 and Q.931 at layer 3. Graeme Bartlett (talk) 00:48, 10 July 2010 (UTC)[reply]

Python CGI script edit

I have a problem running Python CGI scripts: it does not run this line:

form = cgi.FieldStorage()

although I've imported the CGI module. It always respond with the message no attribute FieldStorage in cgi module.

And since we are at it, how do I call Python functions within a Python cgi script? For example, how to I have a text field to input text and a button to save said text into file x? Or a button and a text field to display the results of a query to a database in the same cgi page?--Quest09 (talk) 16:34, 9 July 2010 (UTC)[reply]

That should work fine, unless somehow you're importing some weird module called cgi but that isn't what it should be. Try the following (by running this in the interpreter manually, rather than invoking from the webserver):
    import cgi
    dir(cgi)
and you should see 'FieldStorage' as on of the members. -- Finlay McWalterTalk 17:19, 9 July 2010 (UTC)[reply]

Photo site edit

I recently came back from a conference, and I'd like to start or use a site that allows people from the conference to upload photos to the site and have them displayed in a gallery. It would be best not to force them to make a new account. Suggestions please? I have a list of all registered participants, and maybe that could be used for spam prevention or as passkeys.Mac Davis (talk) 17:06, 9 July 2010 (UTC)[reply]

What I would do is start a new Facebook account (in order to segregate this conference activity from your personal Facebook account), upload the photos into an album, set your privacy preferences so that your photos are viewable by friends only, and then send friend invites to all of the e-mail addresses in your list. People who already have Facebook accounts just have to accept the invite in order to see all the photos. People who don't have a Facebook account will have to sign up for one, is the only disadvantage. One benefit of this scheme is that the amount of effort you will have to expend is low. Comet Tuttle (talk) 18:18, 9 July 2010 (UTC)[reply]
Sorry, but it's actually in violations of the Facebook terms to create multiple accounts, see section 4, part 2. However, your idea could still work using the one personal account and applying privacy settings when adding the people as friends, but that is a bit messy to have to do this and the other people might not want to do this. Although you can create a limited "business" account, this can only be done within the terms if you don't already have a personal account. It's not possible to create both. Well... it is of course very possible to create multiple account, but if Facebook find out they'd be within their rights to suspend/delete BOTH accounts. ZX81 talk 18:57, 9 July 2010 (UTC)[reply]
1. How is this messy? In particular, how is this messier than any other solution? 2. You don't know that the querent has a Facebook account in the first place. 3. Your interpretation of section 4, part 2, differs from mine. I never said the new account had to be a "personal profile". 4. Has Facebook ever even deleted a single account under this policy? Comet Tuttle (talk) 19:33, 9 July 2010 (UTC)[reply]
1) I was referring to having it under your normal Facebook account since multiple accounts aren't allowed and it's fiddly/messy having to create different permissions to allow friends access to some things, but not everything else. It's not impossible, it's just... messy. 2) I don't know that the original poster has an existing account, I was replying to your post where YOU had assumed they did and I was informing you (and in turn them) that this is against the terms of Facebook. To quote what you said: What I would do is start a new Facebook account (in order to segregate this conference activity from your personal Facebook account). 3) I don't really see how it's possibly to interpret "You will not create more than one personal profile." any other way, however if you want it explained further, please see their larger explanation here which also says about you can't have a business profile and a personal profile. I mentioned business profile previously to clarify that regardless of the profile type you can only have 1 in total. 4) I have no idea if they've ever deleted a profile for that rule, but I don't feel it's good advice if the reference desk gives out suggestions which are in violation of the terms of another site hence my speaking up in the first place and trying to be helpful by correcting your misinformation. ZX81 talk 20:43, 9 July 2010 (UTC)[reply]
I dispute that the above is against Facebook's terms of use or terms of service. The second profile doesn't have to be a "personal profile". Comet Tuttle (talk) 17:08, 12 July 2010 (UTC)[reply]
Hello. I don't care if Facebook doesn't want one person to have two accounts. I will proceed to doing whatever I like with my own computer. Thank you for the idea Comet Tuttle, but many people are older than 50 and would not like to create a Facebook account. I've been building an idea, but I'm still looking for solutions. Mac Davis (talk) 23:11, 9 July 2010 (UTC)[reply]
Actually, it's their site. Not your computer. --mboverload@ 03:02, 10 July 2010 (UTC)[reply]
If you want to use an existing site, Flickr has support for group-private images (info). If you want to host it yourself, I believe phpalbum is quite popular. -- Finlay McWalterTalk 23:16, 9 July 2010 (UTC)[reply]
I've used http://www.wikispaces.com/ to host a holiday diary and photos. It works a bit like Wikipedia, but the markup is not as sophisticated. Free accounts allow up to 2GB of storage. However, users would have to sign up and be invited to join your wikispace if you want them to be able to contribute to the gallery. Astronaut (talk) 07:02, 10 July 2010 (UTC)[reply]

Executing bash at start-up edit

Hello! I'm pretty new to Linux, and I want to be able to execute a bash file every time my computer starts up, to schedule a shutdown, like this:

#shutdown -h 22:00

Two related questions:

(1) How do I schedule this one-lined bash script to run at every start-up? Do I just need to move it to a special directory (home computer, so I have root privileges)? I'm assuming a shutdown scheduled this way could still be canceled with #shutdown -c.
(2) Whenever I schedule a shutdown from the terminal, it blocks until the shutdown time. Is there a simple way to call shutdown (or any other blocking command) and return immediately without compiling some C code to run it on another thread?

Thanks!--el Aprel (facta-facienda) 19:23, 9 July 2010 (UTC)[reply]

The easiest thing to do, to achieve just what you want, is to create a (root) cronjob that runs at 22:00 and does a shutdown -h now -- Finlay McWalterTalk 19:26, 9 July 2010 (UTC)[reply]
More generally, you create init scripts in /etc/init.d and link to them from the relevant /etc/rcX.d directories (which are run by init as the system changes runlevel as it starts). This (which works on a start/restart/stop cycle) is intended for starting things like daemons or running things on the runlevel change - in your case cron is the better option. -- Finlay McWalterTalk 19:37, 9 July 2010 (UTC)[reply]
Re: "is there a simple way to call shutdown (or any other blocking command) and return immediately ...". Have you tried running it in the background?
# shutdown -h 22:00 &
-- 124.157.197.248 (talk) 14:34, 10 July 2010 (UTC)[reply]
Thanks for both of your answers! Very helpful.--el Aprel (facta-facienda) 20:43, 10 July 2010 (UTC)[reply]
If you will be using the command line shell much (hooray and good for you), running process in the background can be very useful. Read the Bash manpage to learn more about "&", control-Z, bg, fg, and jobs. -- 110.49.193.230 (talk) 01:00, 14 July 2010 (UTC)[reply]

Windows XP edit

Anyone know what svchost does and what happens if it is terminated?--88.104.92.169 (talk) 19:28, 9 July 2010 (UTC)[reply]

See this link. Comet Tuttle (talk) 19:30, 9 July 2010 (UTC)[reply]
See svchost.exe --Spoon! (talk) 06:33, 10 July 2010 (UTC)[reply]

What is trending and why should I care? edit

Every time I go to my Yahoo email it says something or someone is "trending". That is how I found out one celebrity had died, but why should I care?Vchimpanzee · talk · contributions · 19:36, 9 July 2010 (UTC)[reply]

I think it means that lots of people are searching for whatever the "trending" topic is. Like google trends 82.43.90.93 (talk) 20:16, 9 July 2010 (UTC)[reply]
Yahoo still has its own search engine.Vchimpanzee · talk · contributions · 20:23, 9 July 2010 (UTC)[reply]
I figured it out. There is a place to click for "Help" and at first I thought I'd have to go through that complex process they have, but there's a place to type in your question and if someone has answered, it's there.
The answer given by Yahoo Answers is that it refers to Twitter.Vchimpanzee · talk · contributions · 21:04, 9 July 2010 (UTC)[reply]
what it is: a measure of what a whole lot of people are looking at
why you should care: you shouldn't. --Ludwigs2 18:08, 10 July 2010 (UTC)[reply]

Hash calculator + cracker edit

Is there a free program for Mac and Windows that can compute hashes (from various algorithms) from a text string or file, and can also attempt to crack any hash (back to a text string), i.e. using brute force, wordlists, etc.? Thanks, Samwb123T (R)-C-E 21:48, 9 July 2010 (UTC)[reply]

The ones I have seen use rainbow tables, like Ophcrack. --Mr.98 (talk) 22:11, 9 July 2010 (UTC)[reply]
No, no, no. I'm talking about something like this, with the added ability of being a hash calculator (from a file or a text string), too. Samwb123T (R)-C-E 22:17, 9 July 2010 (UTC)[reply]

Practical DSP book recommendation edit

Can anyone recommend a textbook on digital signal processing that has some decent coverage of reduction to practice (that is that it has robust coverage showing DSP in C, assembly, and/or discrete logic). I'm also interested in programming on dedicated DSP architectures, and implementations using DSP-helper cpu instructions like multiply-accumulate, SSE, and Altivec. While I'm initially thinking of doing stuff for audio (spectral analysis, filters, effects, synthesis) I'd be interested in image or video applications too. The DSP books I've looked at in my local academic bookshop have little or no code, and while the calculus and signal theory is instructive, I'm left unclear about how to actually build a thing that does stuff. The extensive bibliography in the Wikipedia digital signal processing article doesn't really help in this regard, and the hideous cost of DSP books disinclines me to experiment. 87.113.148.221 (talk) 22:46, 9 July 2010 (UTC)[reply]

You can look at application notes from some of the DSP manufacturers. These will often give simple complete programs that do something useful and explain how to make it work on their chip. Texas Instruments is one company that has made this, but I am sure there are others. The basic inside the loop functions are reasonably simple, and the complications arise when starting off, trying to minimize latency, changing or selecting the values (for multiplication) to use, in the optimum way, timing synchronisation. I would suggest starting with writing a program that gets input from one file and outputs it to another. THen on a PC you can try inputting and outputting to a sound card in real time, then yo don't have the complication of programming an external chip. Graeme Bartlett (talk) 23:45, 9 July 2010 (UTC)[reply]
This much I can do. What I'm wanting to do is the actual processing of the data. I don't know, for example, how to build a lowpass filter from FFT or DFT, or how to implement an FFT with SSE. 87.112.40.94 (talk) 23:51, 9 July 2010 (UTC)[reply]
FFTW is a free and open-source implementation of an efficient algorithm that takes full advantage of ugly details of modern computers (there are compiler directives for many common computer architectures, including Intel-based PCs with SSE). FFTW has a documentation page, and a chapter called Implementing FFTs in Practice inside the online textbook Fast Fourier Transforms. One of the best places to learn algorithms for computing coefficients for filters is the Mathworks filter reference documentation. Each type of algorithm is documented; most of the code is written in the MATLAB language and can be easily converted to C. If you do not have MATLAB, GNU Octave is a free alternative and all its algorithms are open-source and free software. It sounds like you are more interested in architecture optimizations than numerical algorithms; so you should also see the specific application notes for the DSP or processor you are programming for. Of course, sometimes "optimization" is secondary to correct functionality. But if you need help coming up with how to generate the FIR constants, when in doubt, consult Numerical Recipes. www.nr.com has most of the content available for free in C and FORTRAN. There are reference algorithms for ... everything. Nimur (talk) 00:53, 10 July 2010 (UTC)[reply]
Here is a white-paper from Intel called FIR Filter Algorithm Implementation Using Intel® SSE Instructions -Optimizing for Intel® Atom™ Architecture. You can find similar results by searching for your favorite architecture or algorithm like so: Google-searching for Nehalem FIR on Intel's website. This will turn up results for loads of processors. Nimur (talk) 00:58, 10 July 2010 (UTC)[reply]