Wikipedia:Reference desk/Archives/Computing/2007 August 23

From Wikipedia, the free encyclopedia

Computing desk
< August 22 << Jul | August | Sep >> August 24 >
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.


Contents

[edit] August 23

[edit] Digging info about an ELF file

I was sent a C program, but didn't get the source code, just a precompiled ELF executable (grmpff). I can't seem to run it on my Linux computer (the program is called "abc"):

-bash: ./abc: cannot execute binary file

Are there commands I could use on the file to extract information about for which processor and operating system it was compiled, what libraries it needs etc., to try to figure out what would be needed for me to be able to run it? —Bromskloss 07:39, 23 August 2007 (UTC)

file is a good start. What does it report about abc?
Ah, there we have something.

abc: ELF 32-bit MSB executable, SPARC, version 1 (SYSV), dynamically linked (uses shared libs), not stripped

My computer has an x86, not SPARC. —Bromskloss 09:04, 23 August 2007 (UTC)
Looks like you'll need a SPARC then ;) —Preceding unsigned comment added by 203.49.213.95 (talk • contribs) 09:54, 23 August 2007
or an emulator that can emulate SPARC; but it would probably be easier to ask the person to send a Linux x86 executable instead. --131.215.159.28 20:56, 24 August 2007 (UTC)

[edit] Question Related to VBA in MS Excel

My question is regarding using VBA in MS Excel. I have an Excel sheet which has data in 3 columns A, B & C. Column A has some names, Column B has data (date of birth) in Date format & Column C has the age in number format. The data in the sheet is like:


Column A Column B Column C
Name DOB Age ROW1
ABC 21-Aug-01 6 ROW2
XYZ 11-Jun-03 4 ROW3
RST 15-Dec-06 1 ROW4

This sheet has a command button also which has the following coding in it:

Private Sub cmd_butt1_Click()

 Dim i As Integer
 For i = 2 To 6     'iterates through rows
     MsgBox ("Row ID: " & i & " value: " & Cells(i, 2).Value) 'displays row number and the 
     value in that cell of column 2 i.e; column B.
     'Output will be like: "Row ID: 2 value: 21-AUG-01"
 Next

End Sub

My question is that now if I delete Column A from the sheet and make the following changes in the above code:

MsgBox ("Row ID: " & i & " value: " & Cells(i, 1).Value)

because now after deletion of column A, column B should have the column index as 1.

When I execute the code by clicking the command button cmd_butt1, it displays the following output:

     Row ID: 2 value: ABC

i.e; it shows the value of column A which I have deleted already whereas it should now take column B as Column A i.e; rowindex should be 1 and not 2.

Also how can I get the number of rows which are having some data. Like above worksheet has data in only 4 rows.


Are you sure you've deleted Column A not just just hidden it? The behaviour you describe seems impossible if you have. Does the column header of the dates say "A" or "B"?
There are various ways to get the "number of rows containing data". Depending on exactly what you need you could use one of the following (see Help for details)):
  • the UsedRange property of the worksheet
  • The COUNTA() worksheet function, which tells you how many cells in a range are not blank - you can use it in VBA as Application.CountA()
  • ActiveSheet.UsedRange.SpecialCells(xlCellTypeLastCell)
Hope this helps AndrewWTaylor 15:27, 25 August 2007 (UTC)

[edit] Are there any public domain wiki engines/softwares?

I'm seeking a public domain Wiki engine that operates in PHP and that I can install on my own server. Do you know of any? Guroadrunner 12:21, 23 August 2007 (UTC)

Try checking out the Comparison of wiki software article. -- JSBillings 12:38, 23 August 2007 (UTC)
Media Wiki, the software which Wikipedia uses, is freely available. Google for it or click the link on the bottom right of every page. JoshHolloway 12:56, 23 August 2007 (UTC)
Wait, the engine for Wikipedia is public domain? All I'm trying to avoid is being stuck into a situation that the engine is GFDL, which may mean I would need to license the content I put on my wiki into the GFDL. Guroadrunner 17:05, 23 August 2007 (UTC)
Mediawiki is open source, but not public domain. I'm pretty sure that the licensing applies only to the code, and not to the content. You are free to apply any license you'd like the to content of your wiki. Just like editing a file in Microsoft Word doesn't make your document the property of Microsoft. --Mdwyer 17:17, 23 August 2007 (UTC)
MediaWiki is not public domain. It is also not GFDL. It is GPL. I am not a lawyer. But it's my understanding that the GPL cannot put any restrictions on your content. It's entirely possible to use GPL software to handle proprietary data, this happens all the time or else no one would ever use Linux. 69.95.50.15 17:19, 23 August 2007 (UTC)
Good to know. I will further this question along at another part of the Wiki RefDesk by asking if GPL for an engine has any licensing affect of the content put in the Wiki itself (but I think the above answers cover that) -- I already think I'll use either PmWiki or one of the others that operate with ease. Guroadrunner 23:32, 23 August 2007 (UTC)
GPL puts no restrictions on what you do with the content created by the GPL's software. The license only dictates how you can distribute/modify the software itself. --24.147.86.187 23:37, 23 August 2007 (UTC)
The more people who affirm this, the more I feel secure with building a web site using someone else's Wiki engine under the GPL (I don't know how to build my own Wiki engine). Guroadrunner 00:02, 24 August 2007 (UTC)
You're right to avoid the GPL like the plague (because it is one) but your wiki's content is safe from its clutches. It's only when you're writing code that incorporates GPL'd code that you need to start worrying. --frotht 21:22, 24 August 2007 (UTC)
I think calling it a plague is a bit much. Free software is generally a good thing, and I think viral licensing is not a bad idea, though there ought to be developed protocols for combining free licenses a bit better. --24.147.86.187 21:54, 24 August 2007 (UTC)
Yep, there are plenty of GPL game ENGINES where the CONTENT (areas, characters, items) are copyrighted. I can think of around half a dozen off the top of my head. In short, it's the software that's GPL, not the content --lucid 21:29, 24 August 2007 (UTC)

[edit] iPod transfer

I didn't get a definitive answer the first time, so I'll just ask again. Is there any way to transfer all of the music and videos from an iPod to a new computer? I know there's a method that's described on the Apple web site, but it requires having the old computer. Is there some other way?--The Ninth Bright Shiner 14:55, 23 August 2007 (UTC)

The files on the iPod are simply hidden files, in the usual way that the Mac OS GUI and Unix hide files. Through the terminal, use the shell and unhide them, or grab any of several utilities off the web that will do it for you. Once their unhidden, they can be accessed from the iPod just like any other files you've placed there.
Atlant 15:51, 23 August 2007 (UTC)
Yeah, just make sure your windows explorer is rigged to view hidden files and you should be fine. The file names, however, will be a bunch of gibberish, but the artist titles, song titles, etc, will still be stored within the mp3 file.
--Cacofonie 21:28, 23 August 2007 (UTC)
Wow! That was really simple! The songs aren't registering in iTunes until I try to play them, but hey, go through a few folders a day and the whole library will be back! Thanks a lot! Big problem number one, annihilated!--The Ninth Bright Shiner 23:25, 23 August 2007 (UTC)
Probably an even easier way that should work, including allowing you to keep all playlists, song names, etc in iTunes is to set your library to an external hard drive (iTunes will handle the transfer of all files for you). Then on the new computer, copy necessary database files from the old iTunes folder to the new iTunes folder, set your library to be the same external drive, plug in the iPod and sync away. Note that I'm making the assumption that you already have the stuff on a hard drive accessible through iTunes, not just on the iPod; if that assumption is wrong, then just ignore me ;) . --jjron 01:50, 24 August 2007 (UTC)
Having just reread the question again, I think my assumption is wrong. However, in future, keeping at least a backup of your library on an external drive is a good idea. --jjron 01:53, 24 August 2007 (UTC)
If you're on a Mac, Senuti is a very good program; it will even copy over the play counts and ratings from your iPod. --M1ss1ontomars2k4 17:02, 26 August 2007 (UTC)

[edit] "Adobe Printshop Software"

Is their a such software as Adobe Printshop and if there is where can I buy one (tell me websites and stores, if you would)?

--Writer Cartoonist 15:31, 23 August 2007 (UTC)

I don't think that's an Adobe title. The Print Shop is a package from Broderbund that has been around for years and years; there is a link to the publisher's site in the article. --LarryMac | Talk 18:20, 23 August 2007 (UTC)
There isn't such a title listed at List of Adobe software. Why do you want the software? What do you expect to do with it, if you do not know it even exists? --24.147.86.187 23:34, 23 August 2007 (UTC)

[edit] Cron Executing PHP Script

I have a few PHP scripts that I use to create caches or to parse external websites. I tried to set them up to run as cron jobs, but they don't appear to be working. This is a sample of the crontab -l output:


*/15 * * * *,1,2,3,4,5,6 php -f /home/badgmup1/titans.php > /dev/null

* * * * *,1,2,3,4,5,6 php -f /home/badgmup1/players.php > /dev/null

0 * * * * php -f /home/badgmup1/dev_pull.php&dev=0 > /dev/null


The scripts themselves modify a database to do their dirty work - the output is irrelevant. They are all in the crontab of the user that owns the scripts. However, I have discovered that they don't seem to be running - or are failing during execution. Does anything look obviously wrong with any of the syntax? -- Sapph42 17:32, 23 August 2007 (UTC)

Cron doesn't exec your .login, .profile, or other login scripts when it runs. This means it is often missing some environment variables or paths. Try it again without the /dev/null and see what gets emailed to you. Check the system logs to see if cron was unable to start your task (is bin/php really in the path, or do you need to specifiy it explicitly in the crontab?) --Mdwyer 18:30, 23 August 2007 (UTC)
For titans and players, I get this from cron: 'No input file specified.'. For another one I have that runs dev_pull.php&fetch, I get '/bin/sh: fetch: command not found
No input file specified.'
Looks like my php syntax is wrong. Quotes perhaps? -- Sapph42 19:02, 23 August 2007 (UTC)
Even with quotes - 'No input file specified.'. -- Sapph42 19:08, 23 August 2007 (UTC)
The line with & needs to be quoted, because the shell interprets it. Can you get rid of the ampersand completely? Your cron entries are very odd. What is the point of having *,1,2,3,4,5,6 as the day of the week, that just means it'll run every day in addition to monday through saturday, redundant. -- JSBillings 10:32, 24 August 2007 (UTC)
I noticed that after I pasted it in. I found out there were two issues involved. The main was that apparently scripts executed through the CLI do not take GET variables. The line had to be adjusted to say (for instance): 0 * * * * php -f /home/badgmup1/www/dev/dev_pull.php dev 0 > /dev/null. The CLI delimits arguments by spaces, and they are loaded into $_SERVER['argv']. The second issue is that I had the incorrect path. :|. -- Sapph42 11:02, 24 August 2007 (UTC)

[edit] gsmarena.com

which country does this mysterious website belong to? I call mysterious because they do not give their country or address anywhere in their website.

Its whois data lists an address in Bulgaria — Matt Eason (TalkContribs) 17:40, 23 August 2007 (UTC)

[edit] Corrupted registry on an OEM machine

Hi everyone,

I recently rebooted my Dell Inspiron 6000, to be greeted by a giant blue screen saying:

Stop: c {Registry File Failure} The registry cannot load the hive (file): \SystemRoot\System32\Config\SOFTWARE or its log or alternate

Doing some research, I happened upon this suggested, Microsoft Fix. I procured myself a HOME XP cd, booted, and used the recovery console, but the fix told me to copy c:\windows\repair\system , and this directory did not exist. System, software files are stored in the repair folder but they exist as .BAK files.

Now, XP came installed on the laptop, and is, I think an OEM-version. Is there anyway to open up those BAK files and use them? Or is there some workaround for OEM-installed computers?

I would be eternally grateful for your assistance
--Cacofonie 21:26, 23 August 2007 (UTC)

The .bak file might just be a renamed file for something else. Do you by chance have a recovery disk or partition? I had this problem two days ago and that fixed it. -Wooty [Woot?] [Spam! Spam! Wonderful spam!] 21:19, 26 August 2007 (UTC)

[edit] Forums hosting service

Can someone recommend me a more reliable hosting service than IF for my forums, I've heard Invision boards are relatively easy to bruteforce. I'd greatly appreciate it to be free. Thanks in advance.

is the best --frotht 23:26, 23 August 2007 (UTC)

And regarding brute-forcing, I don't really see the difference between Invision Power Board and vBulletin - both have security mechanisms. x42bn6 Talk Mess 10:10, 24 August 2007 (UTC)
Brute forcing what? It's not like IPB makes its password hashes public information.. --frotht 21:18, 24 August 2007 (UTC)