Jump to content

Wikipedia:Reference desk/Archives/Computing/2007 September 14

From Wikipedia, the free encyclopedia
Computing desk
< September 13 << Aug | September | Oct >> September 15 >
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.


September 14

[edit]

SQL Function CAST question.

[edit]

SQL> select order_date,(cast(order_date as timestamp) - cast(current_timestamp as timestamp)) from TABLE_X limit to 1 row;

%SQL-F-INTNOTQUAL, Interval expression not qualified

Why is it returning an error?

Going on similar lines, what do i do if i want to find the age of a person today, from a table which has birthdate of a person, using current_timestamp? —Preceding unsigned comment added by 203.5.155.234 (talk) 03:25, 14 September 2007 (UTC)[reply]

Check out the datediff function for your dialect of SQL. In my version this computes a difference of dates in various units. RJFJR 14:32, 14 September 2007 (UTC)[reply]

Would somebody please tell me...

[edit]

...how VLC can have a 7 minute MP3 playing with 7k of memory consumption and 0% cpu, but it takes Vista Sidebar 80 megabytes of memory and 12% cpu constantly to display the system time, a calender, and CPU consumption?! What are those little gadgets written in? --frotht 04:14, 14 September 2007 (UTC)[reply]

MS WIndows is mostly written in C++, if I recall correctly. VLC is written in C. As for why, I suspect only Microsoft knows. --h2g2bob (talk) 08:11, 14 September 2007 (UTC)[reply]
Planned obsolescence, of course! The slower it runs, the more people need to upgrade, the more money the hardware people get, and the crappier they can write their code so they can lay off some more programmers! --antilivedT | C | G 08:30, 14 September 2007 (UTC)[reply]
I believe Sidebar Gadgets are written with XML/HTML/Javascript, so they're essentially little web pages. As for the performance comparison, I don't know. It's certainly not a C vs. C++ issue.
I find your numbers for VLC to be very suspect. No running program can really use 0% CPU, so I suspect that it's offloading the MP3 decoding to a different chip (i.e., your soundcard probably has an MP3 decoder built in). 7K of memory is way low. When I run vlc, it uses 11MB of memory, with 7KB of shared memory, so perhaps you were looking at that figure. --Sean 15:25, 14 September 2007 (UTC)[reply]
I can also verify that vlc uses 0% cpu, with 99% still visible under System Idle Process, meaning that no other application is using cpu cycles either. As opposed to WMP which uses up to 15 - 20% cpu to play the same file. Though cpu usage does of course vary depending on the file type. --69.118.235.97 15:31, 14 September 2007 (UTC)[reply]
Yes, it says 0% CPU on mine, too. What I meant is that even though it's using near zero on the main CPU, it's probably using most of the CPU time on the sound card, which isn't reflected in top or whatever. --Sean 15:44, 14 September 2007 (UTC)[reply]
Realtime MP3 decoding really does take much less than 1% of a modern CPU. It might well appear as 0% usage if everything gets rounded to the nearest percentage point. (And there's not much reason to offload it.) As for the original question, I doubt that even Microsoft would release a program that was intended to run all the time and that used a noticeable fraction of the CPU. There must be something else going on here (like a bug). The memory usage is probably mostly shared DLLs -- at least I'd hope so. -- BenRG 16:41, 14 September 2007 (UTC)[reply]
No, it's a well documented phenomenon. Check out the windows marketplace linked from the "Add Gadgets" dialog in sidebar. Half the gadget reviews are along the lines of "I'm trying to keep my sidebar CPU consumption below 15%, yours adds just 2% too much sorry!" --frotht 21:08, 14 September 2007 (UTC)[reply]

This is what I call a bloat. but unfortunately, this is a problem with free software too. Notice how Ubuntu needs at least 256 MB RAM and 4 4 GB hard disk as a minimum. This is not nearly as bad as Windows Vista, but it still is a problem. —Preceding unsigned comment added by Multipleidentitynumberthree (talkcontribs) 16:28, 14 September 2007 (UTC) --Do not click me! 16:29, 14 September 2007 (UTC) (sorry hit alt-s too soon.[reply]

Not really, if you're looking for an OS to run on very minimum-spec machines, Damn Small Linux would be a better choice, since its goals are minimalism, whereas Ubuntu's objective is ease of use and productivity. Splintercellguy 16:54, 14 September 2007 (UTC)[reply]

oddness

[edit]

I just updated Firefox, and now all of a sudden when I visit Wikipedia, it looks like this, all big, bold, and bloated! What do you suppose happened to my settings? It looks normal on all other websites btw, so I'm really at a loss to explain this myself. Nothing amiss in my content tab either, Arial Black, 16 pts. --69.118.235.97 14:19, 14 September 2007 (UTC)[reply]

That is Arial Black! Try changing it to Arial in your Content tab — Matt Eason (Talk &#149; Contribs) 14:27, 14 September 2007 (UTC)[reply]
Ah.. you're right, don't know how that happened. Must have changed that by accident. I guess I don't know my font styles as well as I think I do (: Thanks!--69.118.235.97 14:29, 14 September 2007 (UTC)[reply]
No problem :) — Matt Eason (Talk &#149; Contribs) 14:33, 14 September 2007 (UTC)[reply]

Bioshock demo

[edit]

Whenever I try to run it it comes up with "Bioshock.exe has encountered a problem and needs to close. We are sorry for the inconvenience." which is singularly unhelpful. What should I try doing which might make it work? —Preceding unsigned comment added by 84.68.35.79 (talk) 15:05, 14 September 2007 (UTC)[reply]

Try the bioshock support page. -- kainaw 15:18, 14 September 2007 (UTC)[reply]

None of the things on there are helpful, as it is the demo and it comes up with a generic error message. I'm thinking my computer just isn't good enough to run it, although it's not obviously old and bad at doing stuff. —Preceding unsigned comment added by 84.68.35.79 (talk) 16:26, 14 September 2007 (UTC)[reply]

Error codes and other exception information would help. Splintercellguy 16:52, 14 September 2007 (UTC)[reply]

That's the problem- it only comes up with a generic error message that says nothing about what the problem might be. Should I post dxdiag data? I suspect my computer might not meet the system requirements, but I am unsure. —Preceding unsigned comment added by 84.68.35.79 (talk) 17:27, 14 September 2007 (UTC)[reply]

Have you considered comparing your computer's specs with the system requirements? --24.147.86.187 01:09, 15 September 2007 (UTC)[reply]
I get this problem when trying to run it off the start menu. Try making a shortcut on the desktop or running the executable directly. -Wooty [Woot?] [Spam! Spam! Wonderful spam!] 21:03, 15 September 2007 (UTC)[reply]

Try this website to confirm that your PC can run the game. If it can't, that's most likely the problem. · AndonicO Talk 00:47, 17 September 2007 (UTC)[reply]

list plugins

[edit]

Is there any way to get windows to produce a list of all browser plugins installed on IE? --69.118.235.97 15:07, 14 September 2007 (UTC)[reply]

I found it under Internet Options, Programs, Manage Add-ons. --69.118.235.97 15:10, 14 September 2007 (UTC)[reply]

What's this?

[edit]

Anyone have any idea what this is? I'm wondering if it's safe to disable it. --69.118.235.97 15:18, 14 September 2007 (UTC)[reply]

A quick Google search tells me it belongs to Microsoft Office.--69.118.235.97 15:19, 14 September 2007 (UTC)[reply]

No idea, sorry. Can I assume you are on Internet Explorer on MS Windows? --16:41, 14 September 2007 (UTC) --Do not click me! 16:41, 14 September 2007 (UTC)[reply]

I already followed this up on my own, and it seems to be related to Microsoft Office, as indicated in the above <span> tags.--69.118.235.97 16:53, 14 September 2007 (UTC)[reply]

Odd

[edit]

The Google toolbar for Firefox doesn't seem to have the option of disabling the Search History? Where as the Google toolbar for IE does? --69.118.235.97 15:54, 14 September 2007 (UTC)[reply]

Does this information help? --LarryMac | Talk 17:19, 14 September 2007 (UTC)[reply]
First thing I tried, unfortunately deleting the search history isn't the same as disabling it. Deleting it is basically just the same as clearing your browser history, what I want is to not have the page history on the toolbar at all. --69.118.235.97 17:52, 14 September 2007 (UTC)[reply]
I understood that; there is a section in the page I linked that says "To disable this feature in Mozilla Firefox 2", which seems to address what you want. --LarryMac | Talk 18:02, 14 September 2007 (UTC)[reply]
Thanks! I must have missed it the first time around.--69.118.235.97 18:04, 14 September 2007 (UTC)[reply]
Odd, the box I need to check off is in gray and seems to be uncheckable. Click "Clear Now"... and make sure the box next to "Saved Form and Search History" is checked --69.118.235.97 18:08, 14 September 2007 (UTC)[reply]

Brightness adjustment on laptops

[edit]

Has anyone ever encountered a problem where, after placing a laptop in sleep or hibernate mode, and later turning it back into active mode, the brightness adjustment function doesn't work? On random occasions, after I turn my laptop back to active mode, I will sometimes notice that pressing the FN plus Home/End buttons to turn brightness up or down, the brightness refuses to change. Thank you --24.211.242.80 16:13, 14 September 2007 (UTC)[reply]

What make and model laptop? — Matt Eason (Talk &#149; Contribs) 18:58, 14 September 2007 (UTC)[reply]

news section posting

[edit]

i've just taken over running a website one of the things i want to do to make it easier to edit is alter the news section. basicilay we have a news page with the full news text and also on every page we have a column on the right hand side of the page which has a news in brief (best way to describe it) now currently you have edit both sections manually which is a pain. is there a way to get the stuff in the column to update automatically say posting first 2 lines and header for the 3 most recent articles? i'm using tribal CMS and have limited access to alter server side settings--Colsmeghead 17:55, 14 September 2007 (UTC)[reply]

If tribal doesn't support it, then no. Unless you want to open up the code and write a quick hack to do the job.. but you can't if you have limited server access. --frotht 23:50, 14 September 2007 (UTC)[reply]

cleaning my laptop

[edit]

what is a safe and effective way to remove dust, smudges etc from my laptop screen without scratching or ruining it in anyway? preferably without buying any special cleaning cloths... —Preceding unsigned comment added by 128.101.53.182 (talk) 20:57, 14 September 2007 (UTC)[reply]

I use the back of my index finger to clean off dust (my thinkpad screen has a very dry matte surface that doesn't get smudged), and a special cleaning cloth to get everything else every few months. But I'm extremely careful and my screen very rarely gets anything but dust on it. I haven't had to clean my new LCD monitor yet.. I tried to wipe off a speck of dust with the back of my finger and it's definately not matte finished.. i left a nasty smudge. You can always use a microfiber cloth, or sometimes I use my underwear since it has a high "thread count" or whatever the equivalent is for clothes --frotht 22:30, 14 September 2007 (UTC)[reply]
Just water and a microfiber cloth is the best and safest way. -- Diletante 16:36, 15 September 2007 (UTC)[reply]
Window cleaner should be OK for oily smudges. StuRat 19:25, 18 September 2007 (UTC)[reply]
Some LCD screens react poorly to some window cleaners (don't recall the particular ones right now). It is, however, generally safe to put about 1mL of water or isopropyl alcohol onto a microfiber cloth, and wipe gently in one direction. The microfiber cloth on its own may also be sufficient. Freedomlinux 21:40, 20 September 2007 (UTC)[reply]

Bad audio while CD drive is running

[edit]

hey there everyone. For some reason, while my CD drive is spinning anything, the audio on my PC gets all skippy and jumpy. All the audio drivers etc are up to date. I use iTunes to play back stuff, and I have an IDE HDD and CD drive, would changing these to SATA do anything worth while? Thanks! Jackacon 21:54, 14 September 2007 (UTC) (yes I know I forgot to sign, thanks auto bot!)[reply]

Sounds like a problem with DMA. Make sure your CD drive is set to use DMA. --Mdwyer 23:13, 14 September 2007 (UTC)[reply]

Checked that, it's still bad. Thanks anyhoo! Jackacon 23:35, 15 September 2007 (UTC)[reply]

I'm thinking vibrations from the hard disk are causing an intermittent connection with some loose component on, or connector to, the sound card. If so, you may lose sound altogether soon. StuRat 19:23, 18 September 2007 (UTC)[reply]

P=NP

[edit]

I don't understand why this is such a difficult problem. Obviously there are countless problems that are easy to verify but computationally hard to solve... It seems like common sense to me that P can not always = NP. Can someone explain this? --frotht 22:26, 14 September 2007 (UTC)[reply]

Mathematics and computer science is not about using common sense. It is about getting a computer to solve something for you in a rigorous fashion (or doing it yourself and demonstrating with math). Tons of things are common sense to a human brain but are impossible for computers to do at this point (I can glance at a room and immediately tell how many things within it would be considered "living" by most people, for example, but it would be pretty damned hard to codify that in a rigorous fashion for a computer algorithm). P=NP is a classic computer science programming question, it teaches one how to be a lithe programmer with things which are easy for the brain to grasp but very tough to get a computer to grasp. As such, such things are indicative of the sorts of things one must do if you want to make a computer think like a person. In any case, the entire point is that its "difficulty" is determined by its computational difficulty to solve — that's all anyone means by calling it "difficult." --24.147.86.187 01:04, 15 September 2007 (UTC)[reply]
Take for example the problem of determining if a number is prime (primality test). It has been known for a while that it is in NP (which is itself somewhat tricky to show). But only in 2002 was it proven that PRIMES is in P. It is not at all obvious. What if other problems are this way? --Spoon! 02:26, 15 September 2007 (UTC)[reply]

The question is: Is it hard for our computers to solve these problems because they are genuinely hard tasks, or just because we used the wrong programs? To prove that they are genuinely hard, you have to prove that no possible program could solve them easily. That is difficult, because there is an infinite number of possible programs. —Preceding unsigned comment added by 84.187.11.201 (talkcontribs) 01:39, 15 September 2007

Right. If I recall there is a whole branch of theoretical computer science devoted to trying to find computationally hard problems; last I checked in with a buddy of mine who does it, they haven't really found one yet, but are still looking. --24.147.86.187 12:32, 15 September 2007 (UTC)[reply]
No, no, we have found lots of definetely hard problems. See for example Post correspondence problem, EXPTIME and PSPACE (the respective complete problems). What we are looking for is a problem harder than P *and still in NP*. —Preceding unsigned comment added by 84.187.34.84 (talk) 00:46, 16 September 2007 (UTC)[reply]