Jump to content

Wikipedia:Reference desk/Archives/Computing/2007 May 12

From Wikipedia, the free encyclopedia
Computing desk
< May 11 << Apr | May | Jun >> May 13 >
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.


May 12

[edit]

Parser function help

[edit]

Here is my code:

{{#switch:{{{1}}} | online = <span style="color:green;"> Online [[Image:ButtonGreen.png|20px]]</span> | away = <span style="color:orange;"> Away [[Image:ButtonOrange.svg|20px]]</span> | busy = <span style="color:#FF0000;"> Busy [[Image:ButtonRed.svg|20px]]</span> | str = <span style="color:#FF0000;"> Wikistressed [[Image:Wikistress3D_v3.gif|20px]]</span> }} ---- <center><span style="font-size:8pt;">[[{{fullurl:{{FULLPAGENAME}}|action=purge}} purge]] / [[http://en.wikipedia.org/w/index.php?title=User_talk:Spebi&action=edit&section=new contact]]</span></center>

I want when {{{1}}} is set to busy, the contact link disappears. If you could reply on my talk page or on here, that would be appreciated. Thanks in advance, –Spebi 00:07, 12 May 2007 (UTC)[reply]

Invoke a java program

[edit]

I downloaded a program GoGui [1] so that I could play a Computer Go program called Crazy Stone [2].

I am running Windows XP, and I can't seem to run GoGui. The documentation page [3] states that "GoGui can be invoked with the command: java -jar gogui.jar [options] [file]" and I don't know where to enter the command.

In general, how does one invoke a java program? Djbaniel 20:44, 11 May 2007 (UTC)[reply]

Just type that string in the Run box. Splintercellguy 20:52, 11 May 2007 (UTC)[reply]
However, Windows XP does not have Java installed "out of the box." You may need to visit www.java.com to download the current package for Windows. If you go to that page, you should see a link near the top that says "Do I have Java?" Click on that and go from there. --LarryMac | Talk 20:55, 11 May 2007 (UTC)[reply]
Thank you LarryMac, I actually do have Java installed, but I can't seem to get to a command prompt from within Java (and don't know if that is exactly what I'm supposed to do, and don't know if the part of the string "[options] [file]" calls for something for me to input). Feel free to try it if you are interested, or please let anyone know who might be. Again the link is [4] Best, Djbaniel 22:35, 11 May 2007 (UTC)[reply]
Just open the Run dialog box, and type the string. Any docs come with your JAR? Splintercellguy 22:59, 11 May 2007 (UTC)[reply]
Thank you Splinter, I left you a message on your talk page... I tried that, it didn't work. Please check it out for yourself if you are interested (there are docs, see link) [5] Best, Djbaniel 23:30, 11 May 2007 (UTC)[reply]
"java" is your program, "-jar" is a switch telling it to compile from a .jar file, and gogui.jar is that file. So you will need to put "gogui.jar" in the same directory as the command "java", and then navigate to that directory within the command line (type in "cmd" at the run screen to drop into that), and then type in the command line "java -jar gogui.jar". --24.147.86.187 00:30, 12 May 2007 (UTC)[reply]
Thank you so much, that worked! Then it took me a while to figure out that I had to change the board size to 9x9 for Crazy Stone to run from within GoGui. Thank you again! Djbaniel 04:43, 12 May 2007 (UTC)[reply]
If you installed Java, you can also simply click on the file "gogui.jar" in the file explorer or drag "gogui.jar" to the desktop to create a link there. --68.149.170.14 00:58, 8 June 2007 (UTC)[reply]

Hard Disk Compatibility

[edit]

I have an oldish (vintage 2001) Gateway desktop that I need to get a new internal hard disk for. How can I tell whether a HD from (say) Amazon is compatible with my machine? Tugbug 00:25, 12 May 2007 (UTC)[reply]

Looking in your manual, or an online manual or service manual would help. Otherwise, does it look like the one you've got has a standard ATA cable attaching it to the motherboard? If so, most any ATA (aka IDE, ATAPI, PATA) hard disk should work. Because ATA-6 was only approved in 2000, the motherboard might only support ATA-5. Practically, that means you can't use a capacity greater than 128GB. But again, you need to check the manual, or look for one online. -- Consumed Crustacean (talk) 01:45, 12 May 2007 (UTC)[reply]
To amplify talk's point, you can buy a hard disk bigger than 128 GB and your Gateway will probably operate it, but no matter how big the disk is, the Gateway will probably think it's 128 GB; capacity beyond that point will be wasted. If you really want a bigger disk, you may need to install a disk controller card in your computer. If yo do that, buy one that works with the newer, easier-to-cable Serial ATA bus rather than your existing Parallel ATA bus. This will also give you better compatibility with any future computer that eventually replaces the Gateway.
Atlant 00:51, 13 May 2007 (UTC)[reply]
Actually you may be able to access the whole partition in XP SP1 or later (or another OS with LBA48 support). However you should make sure your boot partition is 128 GB or smaller as otherwise the partition may suddenly fail to boot one day (happened to a comp of a friend) Nil Einne 11:21, 13 May 2007 (UTC)[reply]

Thanks, everyone. Tugbug 18:17, 14 May 2007 (UTC)[reply]

External Hard Drive

[edit]

Hello, I have an external hard drive case and I am going to buy a new hard drive. I was wandering if I should partition it if I plan on using it for file storage, and if yes, how can i partition it when it is in my external case. Thank you,--(Aytakin) | Talk 01:01, 12 May 2007 (UTC)[reply]

You may want to read the article on disk partitioning. You have to have at least one partition to use it no matter what. Whether you want more than one partition is up to you, though on an external storage hard drive it's probably not incredibly useful. You can partition it as you always partition things, through some disk partitioner like fdisk, Windows' Logical Disk Manager, GParted, OS X's Disk Utility, etc. -- Consumed Crustacean (talk) 01:31, 12 May 2007 (UTC)[reply]

Forum software

[edit]

I was not expecting there to be so much software available for forums but unfortunately 90% seems to be written in PHP. Is it possible to simply upload this to either a Windows or a Unix based server and it will run without the need for doing anything else or will a server site administrator have to reset everything (permissions, etc.) for the software to run? 71.100.2.43 03:23, 12 May 2007 (UTC)[reply]

The web server needs to support PHP, and there would probably be instructions that came with your forum package. Splintercellguy 16:03, 12 May 2007 (UTC)[reply]
And most http daemons do indeed support PHP. You can probably change permissions, etc. as needed with your FTP client. YOu will probably need a databse too. As Splintercellguy said, there will probably be step by step instructions in your chosen forum pacakage. -- Diletante 16:08, 12 May 2007 (UTC)[reply]

Matrix inversion

[edit]

What was the largest full matrix ever inverted? How long did it take? deeptrivia (talk) 04:14, 12 May 2007 (UTC)[reply]

Such questions aren't usually the best ones to ask, because we know the complexity of matrix inversion algorithms, so we can just look it up and get an approximation of how many steps it would take. IIRC, the complexity of naive inversion is the same as Gaussian elimination, O(n^3) (see Gaussian elimination and Big-O notation), so a 30 by 30 matrix will take approximately 30^3 steps to invert. Take a processor which can perform 1 step in x units of time and you have a rough estimate of how long it would take. However, there are memory concerns to keep in mind as well, plus swapping and VM overheads as well. Theoretically you could invert an extremely large matrix, but predicting how long it would take would mean having to take into account stuff involving the operating system and how fast it managed memory, but you would have a baseline estimate in the computational complexity of the algorithm used. (Coincidentally, you can do better than O(n^3) -- IIRC the best algorithm out there is O(n^2.2)). You also have to ask yourself why one would want to invert gigantic matrices anyway -- the chances are there's a better way of handling the problem. —The preceding unsigned comment was added by 149.135.125.155 (talk) 04:31, 12 May 2007 (UTC).[reply]

I meant, who is the current record holder for having inverted the biggest matrix. deeptrivia (talk) 04:45, 12 May 2007 (UTC)[reply]

I don't know, but it doesn't have any real "interesting" implications, so I think it may be doubtful that anyone is pursuing this. There is no new knowledge to be potentially gained by inverting matrices. Contrast this to testing Riemann zeta zeros or finding Mersenne primes because there are interesting results that may be revealed by performing the respective computations. Then again, I could be wrong. —The preceding unsigned comment was added by 149.135.125.155 (talk) 04:55, 12 May 2007 (UTC).[reply]
What new knowledge is gained by stacking a larger house of cards than any other, or batting an infinitescimally higher average than the previous record? The point is to keep track of the best ever, not learn something. I wonder if Guiness has gotten in on this. Black Carrot 05:30, 12 May 2007 (UTC)[reply]
Best ever what? Computer? There are much more useful and and accurate ways of judging computing power. Algorithm? Inverting large matrices isn't going to prove an algorithm's efficiency. I mean, this is all really ridiculous if you generalize. What about the biggest value of x2 attained? Calculating successively smaller and accurate values of exp(x) as x gets small? Mathematics is about doing things that are interesting and useful, and is about learning things, and merely inverting large matrices is not interesting or useful as far as I can see, and we learn nothing at all by doing it. Developing new algorithms to invert matrices is interesting, useful, and educational, but that's not what you are talking about. —The preceding unsigned comment was added by 149.135.125.155 (talk) 06:20, 12 May 2007 (UTC).[reply]
Usually you don't build massive, expensive computers only in order to break a silly record that very few people will ever know or care about. -- Consumed Crustacean (talk) 06:17, 12 May 2007 (UTC)[reply]
Additionally there is no reason to keep track of this record vs. "who has run the biggest for/next loop?" What would it be a test of? Processor speed? That can be measured directly. Time to waste? Who cares about that? There's no talent involved and no implications, so no record. --24.147.86.187 14:56, 12 May 2007 (UTC)[reply]
The longest For would be windows ME with all its runaway loops ;) --frotht 06:52, 15 May 2007 (UTC)[reply]
I have just inverted the Ackermann(10000) by Ackermann(10000) identity matrix in my head. I claim this record! Algebraist 17:51, 12 May 2007 (UTC)[reply]

Logical equation reduction

[edit]

Is anyone familar with the Harvard Chart Method of logical equation reduction and if so do you know whether it has been written in the form of distributed processing program? 71.100.2.43 04:37, 12 May 2007 (UTC)[reply]

Video card

[edit]

I am looking to buy a low end video card for gaming, with at least 4 texture units. The Geforce 6 Series and Radeon R300 are baseline chipsets, but I would be willing to pursue a more powerful card.

My computer has an AMD Sempron 3000+ (1.9 GHz) with 1024 MB of RAM (or 960 MB, as 64 MB are currently used for integrated graphics). I want to use my AGP 4x slot for the card.

On a related note, will a video card that is AGP 8x compatible work fine in my AGP 4x slot? I believe that this will be fine, but the card will perform with reduced potential (i.e. only to the potential afforded by the 4x slot). − Twas Now ( talkcontribse-mail ) 09:36, 12 May 2007 (UTC)[reply]

Check the section on compatibility in the AGP article. It looks like the biggest concern with compatibility is the voltage signaling. —Mitaphane ?|! 15:25, 12 May 2007 (UTC)[reply]
It is generally not wise to worry about raw specs like the number of texture units a card have. You should instead look at reviews comparing the card's performance in games. Feature set should also be considered although to be honest, I wouldn't worry about it too much at the low end since it's like you would have to use minimal settings anyway so feature set won't make much of a difference. Ultimately, it depends greatly on what your needs are. A 6600 or 7600 or similar mid range ATI card should be enough for a resonable res and without having to turn everything off for most current and perhaps 1-2 year future games. A 6200 or 7300 or similar low end card would probably mean a low res with most things off or on minimal. Bear in mind if you have a LCD monitor using any res other then the native might be a bit crappy. It also depends on what sort of games your talking about. If your just talking about light gaming like the Sims your needs are far less then if you want to play S.T.A.L.K.E.R. or Supreme Commander or other more demanding (and unoptimised?/poorly designed?) games Nil Einne 16:02, 12 May 2007 (UTC)[reply]
I am talking about Everquest II. Upon trying to run the demo, an error message pops up telling me I need a video card with at least 4 texture units. − Twas Now ( talkcontribse-mail ) 19:11, 12 May 2007 (UTC)[reply]

Opera, wheres the "Page info" thing

[edit]

I recently switched from FireFox to opera, but i miss that thing in firefox where u could go tools > page info > media, and you could download embedded files easily from there instead of hunting though the source code. Also my bookmarks are all in the wrong order since importing them. What gives?

Thanks Plegrfcw 15:19, 12 May 2007 (UTC)[reply]

I don't think Opera has a similar feature to that. There is the links panel, but I'm not sure if it achieves the same thing (I've not used the Firefox function). As for your bookmarks, Opera arranges them in alphabetical order and I don't think you can arrange them any other way. The folks at the Opera forums are generally pretty helpful, you might get a better answer asking there. →Ollie (talkcontribs) 17:34, 12 May 2007 (UTC)[reply]
If you go to Bookmarks -> Manage Bookmarks then you can rearrange them, or View -> Sort By Created. This is how Firefox sorts them, to my knowledge. :) JoshHolloway 10:15, 13 May 2007 (UTC)[reply]

can't find my Google calendar

[edit]

I set up Google Calendar using my native e-mail address, and also set up another one using my gmail address. I also let Firefox remember my password for the native e-mail address (intentionally) and I guess for the gmail address as well, because here's what happened:

I had a Favorites link to the calendar but deleted it unintentionally. When I clicked on the calendar icon on the Google web site ("even more") It took me directly to the (empty) gmail version. I went into Firefox and deleted all the Google-related remembered passwords. But clicking on the Google Calendar icon still took me to the gmail version. Deleted all the remembered passwords. Same story.

So how can I get to the Google calendar login screen in order to enter my native e-mail address and password?

I've searched Google and Firefox help to no avail. Hope you can help! --Halcatalyst 16:15, 12 May 2007 (UTC)[reply]

Can't you just click the 'Sign out' link on the top-right of Google Calendar (or https://www.google.com/calendar/logout), or am I missing something? — Matt Eason (Talk &#149; Contribs) 16:30, 12 May 2007 (UTC)[reply]
Yes! Thank you. I feel dumb. But better to feel dumb that not to be able to access my calendar. <vent> I have had enormous problems over the last month after I [unwillingly] switched from XP to Vista. Not that this particular problem had anything to do with Vista. The functionality I needed most, but didn't have most of the time during my troubles, was Calendar. I missed several meetings and appointments. That's why I switched from Outlook to Google. </vent> --Halcatalyst 16:54, 12 May 2007 (UTC)[reply]

If you have to pick the first best N items from a list...

[edit]

So I have an unsorted array, a number(N), and have to pick the first N best from the unsorted list, how do you do that? I'm doing it by sorting first and then picking the first few but is there a different way? Thanks, Jeffrey.Kleykamp 17:10, 12 May 2007 (UTC)[reply]

I had a program that needed to do this a while back (it was for evolutionary programming). The best solution I could think of was to make an array of size N and variables called lowest lowestpos. First I set lowest to zero and made lowestpos arbitrary (<N). Then I iterated over the unsorted array. Every time I found a number greater than the lowest I would place it into the array in the place of the lowest and then search that array for the smallest one and update lowest and lowestpos. It's only faster for certain sized arrays. For example if u want the biggest two from a set of 1000 then it's faster. If you want the biggest 800 from 1000 then sorting is probably faster (if you use a well made sort that is). BrokenSegue 17:44, 12 May 2007 (UTC)[reply]
Yup. If you find the biggest N out of a list of N by that method, you are essentially doing insertion sort, which is O(N2), much slower than the O(N log N) you get from a good sorting algorithm. That suggests a rule of thumb: If you want to find the best K from a list of N, do the array method if K is less than sqrt(N), and sort otherwise. Tugbug 17:52, 12 May 2007 (UTC)[reply]
Agreed, here is untested psuedocode to find the highest N numbers from an unsorted array of array of UNSORTED_ARRAY_NB elements:
    DO I = 1 TO N
      SOLUTION_ARRAY(I) = UNSORTED_ARRAY(I)
    ENDDO
! Sort SOLUTION_ARRAY in descending order (not shown).
    DO J = N+1 TO UNSORTED_ARRAY_NB
      DO I = 1 TO N
        IF (UNSORTED_ARRAY(J) .gt. SOLUTION_ARRAY(I)) THEN
          DO K = N TO I+1 STEP -1
            SOLUTION_ARRAY(K) = SOLUTION_ARRAY(K-1)
          ENDDO
          SOLUTION_ARRAY(I) = UNSORTED_ARRAY(J)
          GOTO 100
        ENDIF
      ENDDO
100 ENDDO
StuRat 18:17, 12 May 2007 (UTC)[reply]
Thanks Jeffrey.Kleykamp 17:54, 12 May 2007 (UTC)[reply]
You could use heapsort that uses a max-heap and stop after extracting the highest N elements. Alternatively, you could find the Nth largest element using the selection algorithm and then you can use that as the pivot to partition (using the partition algorithm in quicksort) the list into the items smaller than it and larger than it. The latter method only takes , where n is the length of the list. The former method can be implemented in . --Spoon! 20:46, 12 May 2007 (UTC)[reply]

Text file <-Firefox browsing history?

[edit]

Is there any utility or add-on that will automatically export all of my browsed links for a day to a text file for later review? The little "tree view" Ctrl+H feature is cute, but extremely limiting as to what I can do as far as saving all the links I followed in a given day. NoClutter 19:20, 12 May 2007 (UTC)[reply]

Search Mozilla Add-ons. --h2g2bob (talk) 03:40, 13 May 2007 (UTC)[reply]