Jump to content

Wikipedia:Reference desk/Archives/Computing/2011 December 20

From Wikipedia, the free encyclopedia
Computing desk
< December 19 << Nov | December | Jan >> December 21 >
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.


December 20

[edit]

Should I give up trying RegExp?

[edit]

I am doubting if RegExp can do this job or not. The job is clearing all lines which contain non-letter characters. For instance, there are three lines as below:

abc def
abcdef
abc123def

then the job is deleting the line"abc def" and "abc123def" because they have non-letter characters (spaces and numbers). Using RegExp to mark only-letter lines is very easy, just write like "^[a-z]+$", but doing the contrary seems impossible...at least I can't figure out at this moment... By the way, this is just a simple example. The real one has more than 10,000 lines and the positions of non-letter characters are not regular.--Capim Dourado (talk) 04:29, 20 December 2011 (UTC)[reply]

The regexp [^a-z] should work (Assuming that you know that the input it all ASCII. If your input might contain Unicode, it looks like many regular expression engines support \P{L} to represent any non-letter character in Unicode.). It will match any non-letter character, so the only strings it won't match are those composed entirely of letters. If you want the regex to match the whole line-containing-a-non-letter, you can change it to ^.*[^a-z].*$ or ^.*\P{L}.*$
Also, on a pedantic note, the blank line does consist entirely of letters, but your example regexp doesn't match it. If you wish to treat the empty string the same way you treat lines that have non-letter characters, you can write (^.*[^a-z].*$)|(^$). Paul (Stansifer) 05:10, 20 December 2011 (UTC)[reply]
Great, you're so right. Thanks for your help and technical advices.--Capim Dourado (talk) 05:58, 20 December 2011 (UTC)[reply]

On OSX 10.4.11, the iPhoto has been corrupted. How do I get a free restoration? ("Updates" won't work.)

[edit]

I tried explaining to Mom that I'm not an Apple person so I wouldn't know about this as much as I would with a Windows application. Therefore, I am learning as I go.

I just need to know where and how I can get a free restoration of the iPhoto that works on mom's current mac's OS. By default, does the purchase of the mac (from about 2006 or 2007) come with an iPhoto CD? (Hopefully I could find it.) But whether or not I can find it, is there a different way to restore the iPhoto? It's critical for her job, so please help soon. Thanks! --99.191.252.5 (talk) 04:56, 20 December 2011 (UTC)[reply]

How to select the GPU card for my PC spec?

[edit]

Hi friends, my PC config is Pentium D 3ghz\FSB 833MHz, memory is Transcend DDR2 2gb\FSB 677MHz, Seagate 500GB HDD,Mobo is Intel G965 RY (some 5 yrs old) and finally SMPS with 250 Watts. Prev, I had 8600 GT and was doing just okay when i was playing with 1076x768(GTA4 = just 15~20 fps), but when I bought HD monitor, things changed, 8600 GT could not survive a bit, meanwhile the card was damaged.

1. To buy a new card, possibly say Geforce GTX 550ti or GTX 560ti or maybe Radeon 6850. Any brand like xfx,palit,asus are ok, No OC req.

2. Cost-effective, say if 6850 loses by just say 6 or 8 FPS compared to 560 GTX, then I'd rather go for 6850 HD itself!...I'm least worried about losing few FPS...

3. what wouldbe the SMPS rating I might need to buy (safer side)?. I dont have any special cooling fans or so, just 1dvd drive,1 HDD and 1 low power chasis fan

I just need decent FPS say 25 to 35 at HD resolution for most of the games and that is sufficient and also I don't bother about reducing some details if it slows a bit, like no AA or AF

Since my CPU is slow,at I am not sure which of these cards may match my spec and get me good performance. I cannot afford to change my CPU\Mobo\RAM. Please suggest accordingly, your help is very much appreciated...!!! Thanks — Preceding unsigned comment added by Balan rajan (talkcontribs) 08:23, 20 December 2011 (UTC)[reply]

Sorry that this is only a partial answer, but I think you're going to need a much bigger power supply. 250W is now incredibly low and the GTX 560ti requires a minimum of a 500W PSU (although it only uses up to 170W by itself). You don't really want to load your power supply up the maximum either because the majority of them won't be able to sustain it for long periods of time and it'll just blow, potentially damaging other circuits if it wasn't built very well.  ZX81  talk 03:27, 21 December 2011 (UTC)[reply]
One place to compare graphics cards is at [1], which typically has prices as well as some sort of arbitrary "performance" number, which probably correlates at least somewhat well with how many frames per second you'll get on a given game. One good place to look at how cards do when playing games is Tom's Hardware. For example, here they review the 550 TI (along with some other cards) on several games. It appears to me that it holds up quite well even at higher resolutions on most games, but that's up for you to decide. If you have a particular card in mind, you can search for reviews of it, and they'll probably have done a comparison at some point. Tom's also has the Best Graphics Card for the Money, which has pretty good recommendations. Also, remember that there is a lot of ground between your current card and the three you mentioned - some intermediate card might be sufficient for you. Would the considerably cheaper and somewhat less power-hungry Radeon 5670 suffice for you? Quoting the comparison, it has "Exceptional 1680x1050 performance in most games, 1920x1200 in most games with lowered detail"
One problem, as you alluded to, is that they typically use higher end processors than you have. Conventional wisdom is that, with most games today, the processor is much less important than the Graphics card in gaming. You're processor is a bit older, but I wouldn't consider it too terrible for gaming. I don't have a lot of experience there, though, so take that with a grain of salt.
I agree with ZX81 though - if you want to get any of the video cards you mentioned, you'll certainly need to upgrade your power supply (the 560 TI and 6850 recommend a 500 W supply, the 550 TI a 400 W. [2] [3] [4]). You can find all of these recommended values at Nvidia's and AMD's websites. My impression is that these numbers are a little conservative - especially with your other components, you could probably get away with numbers a little bit smaller, as long as you get a well-built and reliable model. Power supplies aren't terribly expensive, so you could probably get one without too much trouble. Buddy431 (talk) 22:52, 21 December 2011 (UTC)[reply]


Thanks about the tom's hardware link Buddy431, but my concern is in all of the reviews,benchmarking items (CPU, mobo,etc) are high end just to avoid bottle necks. So while making decision for our own system configuration, it looks quite difficult to estimate even though too many reviews are floating around the internet....

Thanks guys!, As for as SMPS rating, I'd then rather prefer 550 W (probably from Antec\coolmaster) instead to give some breathing space as you all suggested!. But,honestly my worry is Cards like GTX 560 Ti couldbe an overkill for a slow processor like Pentium D as of my case. What's the point of buying a 560 ti in this case, If CPU's gonna be a bottle neck which is however gonna stuck at some point and limit GPU from maxing out?.In such case, the performance of 560 ti might almost, not exactly might match 550ti or other such cards of this range. Is my understanding correct?....

Why I'm putting this is, in one of the forums, I read somewhere stating,"If your CPU is slow, you should prefer GTX 560 ti instead of 550 ti, it will help a lot". I just want to know if this is all true?. Can a faster GPU helps overcome a slow CPU?. It's all costly lessons for which I cannot make any mistakes this time as I did for 8600GT!


I'm basically a PC fan, and don't like much of console series. But for the buying costs and all these confusions, PS3 seems an easy pick-up...!

Any idea guys?.. — Preceding unsigned comment added by Balan rajan (talkcontribs) 05:53, 22 December 2011 (UTC)[reply]

wikicommons

[edit]

How does one move a file to a new name? alt shift M works for talk but not for a file. Kittybrewster 14:02, 20 December 2011 (UTC)[reply]

Do you mean that you want to move a file on Commons from one name to another? Or do you want to move a file on en:wp to Commons? If you mean the first one, you simply can't do it — you don't have the filemover right at Commons. If you want to have filemover, please go to Commons:Requests for rights and request it there; it's quite a simple process. Two quick comments: (1) Files here at Wikipedia also cannot be moved from one title to another without the filemover right; you can request it at Wikipedia:Requests for permissions. (2) Commons already has a help desk, so questions like this are better suited over there. Nyttend (talk) 17:53, 20 December 2011 (UTC)[reply]

Publishing my "decay" program

[edit]

When I get my X11 port of my original Amiga "decay" program in good enough shape, how would I go about publishing it? I'd like to publish it as open source or something, so that people can look at the code and submit modifications to it. I don't plan on being very active in maintaining the program, because I already have a for-pay job in computer programming and I'd like to concentrate on that, but I figure that if I get submissions by e-mail (I don't actively follow any other channels), I'll eventually publish them. I already published the original Amiga program to Aminet several years ago, but I think I only ever published the executable binary, not the source code. I'd like to publish that as well now, but can I publish it along with the X11 port? Another way would be to make another publication to Aminet, this time with the source code. There is, however, one more question with publishing the programs a open source. I couldn't figure out myself on how to make X11 access the root window at a pixel-by-pixel level, so User:Finlay McWalter helped me by copying the code from somewhere. Everything else is my own work. Does this accept its licence status? JIP | Talk 18:44, 20 December 2011 (UTC)[reply]

I'd post it on GitHub (or one of the similar services). The only thing I cribbed was the GC setup, which is such a set of normal parameters that I doubt anyone can say they really wrote it (but I'm not a lawyer, so don't trust me). -- Finlay McWalterTalk 19:02, 20 December 2011 (UTC)[reply]
How do I go about posting a new project on GitHub? I have already used it to download programs, but I'd like a brief tutorial on posting my own. JIP | Talk 19:30, 20 December 2011 (UTC)[reply]
GitHub has a "bootcamp" on their homepage. -- Finlay McWalterTalk 19:36, 20 December 2011 (UTC)[reply]

CUPS-PDF and real printers

[edit]

After installing cups-pdf, the file /etc/cups/cups-pdf.conf contains the following entry regarding the output file location:

### Key: Out
##  CUPS-PDF output directory
##  special qualifiers:
##     ${HOME} will be expanded to the user's home directory
##     ${USER} will be expanded to the user name
##  in case it is an NFS export make sure it is exported without
##  root_squash!
### Default: /var/spool/cups-pdf/${USER}

Out ${HOME}/PDF

Is there any way to stream the PDF data to a network port, rather than into a file? The netcat and rlpr commands are available, if that helps. The reason is that I have a networked printer that accepts PDF print jobs (and prints them OK), but trying to feed it Postscript or PCL messes with the output: margins are off, colors are wrong, in short, I'm fed up with fiddling with all these settings when I see that passing the PDF to the printer just works. So far I'm manually copying the data to the printer once the PDF has been created, but I'd like to eliminate that step. The printer accepts the PDF both via TCP printing (port 9100) and LPR (port 515). -- 188.105.129.82 (talk) 18:56, 20 December 2011 (UTC)[reply]

As a hack, you could have a script monitor that directory (e.g. watch it with inotify or just poll it with cron) and have the script print and then delete PDF "jobs" it sees. -- Finlay McWalterTalk 19:08, 20 December 2011 (UTC)[reply]
This feels so... dirty. -- 188.105.129.82 (talk) 19:26, 20 December 2011 (UTC)[reply]
Laziness is a virtue; the time you could have spent doing it "right" is time you can now spend doing something fun. -- Finlay McWalterTalk 19:33, 20 December 2011 (UTC)[reply]
Hedonist. ;-) I found the "right" solution myself, though - all you have to do is change the destination to lpd://printerip/QueueName or socket://printerip:9100/ ... I didn't expect that to work with the CUPS-PDF virtual printer, given its name, but it seems that the PDF generating part and the file storing part do not depend on each other. Yay! -- 188.105.129.82 (talk) 22:06, 20 December 2011 (UTC)[reply]

no recovery email came to my email address

[edit]

aljamerson I thought my email was redacted or redacted or redacted here is my number too redacted. Please help. — Preceding unsigned comment added by 76.186.49.141 (talk) 18:57, 20 December 2011 (UTC)[reply]

Your personal contact data has been redacted. Don't expect anyone from here to call or even mail you. All answers will be here, but we need more precise data on the situation. Can you give any more details as to i. e. where the recovery e-mail should come from? --Ouro (blah blah) 19:13, 20 December 2011 (UTC)[reply]

20% of the time developing own new ideas

[edit]

The Dilbert cartoon of yesterday went along the line that in Google a guy were allowed to spend 20% of the time developing his own new ideas, however, he had to work 60 hours. Conclusion: it only sounds good in theory. Which is the real situation in Google? Are they as cynical as other companies normally are or do they deserve their prestige as non-evil employer? 88.8.69.150 (talk) 22:04, 20 December 2011 (UTC)[reply]

I'm pretty sure I've run into a fair number of things Google ended up actively pushing that were derived from personal projects, though I don't remember any to point you at. I think it's a waste of time ranking companies by order of niceness, though. Google like all companies (and all things, generally) is at risk of deterioration over time, however; it's a fairly new company still, compared to others with comparative clout. ¦ Reisio (talk) 01:07, 21 December 2011 (UTC)[reply]
Also, Google is very large. I expect that different parts of it feel like totally different companies to work for. Certainly, different of their services feel like they were developed by different companies. Paul (Stansifer) 02:24, 21 December 2011 (UTC)[reply]
Gmail started as a 20% project (ref). -- BenRG (talk) 05:24, 21 December 2011 (UTC)[reply]
A relevant article on this here, though dating from 2008. A pertinent comment: "Google’s 20% time is more of an attitude and culture than a rule. First, hourly time isn’t tracked there, so there’s no way to enforce or even know what percentage of time people are spending on side projects". --jjron (talk) 16:30, 23 December 2011 (UTC)[reply]

Broken graphics card?

[edit]

Hi

I think I might have knackered my graphics card & I hope some one might be able to advise me. I was experiencing some black screen crashes after a couple of minutes of starting to play a new game. I'd had a similar problem before and was able to solve it by cleaning out the dust from the graphics card heat sink and fan. I tried doing the same thing this time and took my new hoover to the card. When I reassembled the machine the monitor wouldn't recognise that the PC had been turned on (it stayed in powersave mode) but I could hear windows starting. I think some new beeps are made by the internal speaker shortly after powering up. I don't have another graphics card I can try to determine if that is my problem. I'd left my computer in to a repair shop to diagnose the problem. I heard nothing from them for a couple of days; when I chased them up they told me they'd have to carry out an advanced diagnostic which would cost €40. I called to the shop again and learned they didn't even have another graphics card in the shop to diagnose the problem. Can anyone give me any guidance as to what to do? Thanks Stanstaple (talk) 23:32, 20 December 2011 (UTC)[reply]

If you aren't getting a display it's going to be pretty much impossible to diagnose anything without either another graphics card or another computer to try it it. If you can hear windows booting up, you are correct in assuming it is highly likely that the graphics card is the issue, however I wouldn't put it at 100%. I'm guessing you've tried re-seating the card and blowing out the slot on the motherboard? Is it a pcie card? Do you have a second slot on the motherboard to try it in? Vespine (talk) 23:40, 20 December 2011 (UTC)[reply]
I'd say it's likely enough that it's a bad graphics card to be worth the risk of buying another, assuming you can't get hold of one for a test. After all, a new graphics card will probably cost less than their overpriced diagnostic, which won't even fix it. I agree with the advice to pull it out and put it back in, first, though, as in my experience they often don't go all the way into the slot the first time. StuRat (talk) 23:45, 20 December 2011 (UTC)[reply]
I agree. Buy a new graphics card. You can get them pretty cheap, depending on the quality you want. If your machine's old enough to have burnt out its current card, I doubt you'll need to spend much. Check out Video Card Benchmarks to get a rough comparison between performance level of cards, because the marketing and numbering of video cards makes relying on the model or series a rather unreliable way to judge performance. I've had video cards go wrong in a few ways. Sometimes, they won't overheat and shut down (which is what it sounds like yours might have been doing) but they'll develop problems that manifest in weird ways. For instance, polygons won't terminate and so you'll get a giant polygon that extends to the horizon, or you'll see vertical lines develop that move with some logic within the program (as opposed to lines that stay fixed). Shadowjams 00:39, 21 December 2011 (UTC)[reply]
The thing is I don't think I actually burned out the card through usage. I did have black screen crashes while playing some moderately taxing games, but the problem never manifested itself otherwise. My feeling is that I wrecked it while trying to clean it. The card was a GT220 and it wouldn't be particularly cheap to replace, given that I'm not sure that that's the problem in the first place, i don't want to take that gamble without knowing the likelihood that it would solve the issue. My current theories are that I could have damaged it either electro-statically or, that by driving the fan via the hoover, I generated a current that damaged the card. I can see no obvious signs of physical damage to the card. But might the problem be something else (I obviously don't want to spent €100 on a card that does nothing to help; I use my PC as my TV, Hi-Fi, general entertainment centre, don't like being without it.) Are my guesses plausible or are there any other scenarios that would explain the case as described? Thanks again for your input. Stanstaple (talk) 19:42, 21 December 2011 (UTC)[reply]
The spark from your hand damaging it seems possible. If you removed the card to clean it, you may have bent or broken one of the pins, too, but that should be visually apparent. Try buying the card from a brick-and-mortar store which allows returns, that way you will get it sooner and won't be out any money if it's not the card after all. Make sure they allow returns even if you open all the packaging, many stores don't. If they ask why you are returning it, say "it didn't work in my PC", which would be pretty much true if you still have a black screen with it.
Also, let me ask, how are you entering this info here ? You must have access to another PC, so could you "borrow" it's graphics card for the test ? StuRat (talk) 03:22, 22 December 2011 (UTC)[reply]

First of all to my knowledge, rotating the fan by your hand cannot damage for sure, because they have reverse current protection, no matter how fast you spin up\down.

Second, your static could've caused the problem, unless you touched the CHIP (removing heatsink,fan), also provided conditions of low humidity (air conditioned\over hot) ESD cannot happen. Because u might be frequently touching PC chasis, so u lose all static charges.

I too had problems like card detection failure resulting in standby mode, but windows keeps booting. However I had on-board gpu which helped me identify. I would advice you to clean the PCIe slot and try it once again. Also, try adjusting your card after you insert in, since your card might be not getting power from on-board because of improper sitting. For your info, I got my card working after trying out some 6 to 7 insertions and tests....

Is your GPU card's fan spining? or is it dead too?...If it is not spinning, possibilities are a short circuit\no power. If it spins, couldbe improper sitting or damage in chipset — Preceding unsigned comment added by Balan rajan (talkcontribs) 06:20, 22 December 2011 (UTC)[reply]