Wikipedia:Reference desk/Archives/Computing/2011 July 3

From Wikipedia, the free encyclopedia
Computing desk
< July 2 << Jun | July | Aug >> July 4 >
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 3[edit]

I need a reputable tool to end my PC errors. If ErrorEnd isn't one, what is?[edit]

If you've heard of ErrorEND, it's supposed to find a good assortment of PC errors that either slow down my computer, or compromise how some software runs.

I'm having a hard time finding reviews on ErrorEND. What can you find on this alleged tool to fix errors on my PC? Should I fork over my funds to upgrade it to a fully-workable version?

If it's not something I should have, what should I have instead? Also, if there are free options, please feel free to list those as well. (Please, just so long as they're reputable. Thanks.) --70.179.165.67 (talk) 08:19, 3 July 2011 (UTC)[reply]

We need to know what kind of errors your PC is getting, before we can recommend a fix. StuRat (talk) 08:34, 3 July 2011 (UTC)[reply]
What sticks out a lot is that I keep failing to install 4 updates of Windows Update:
  • System Update Readiness Tool for Windows 7 (KB947821)
    • Error code: 80070003
  • Windows 7 Service Pack 1 (KB976932)
    • Error code: 0x800f080d (800F080D)
  • Security Update for Microsoft Office 2007 System (KB2509488)
    • Error code: 80070663
  • Update for Microsoft Office 2007 System (KB2539530)
    • Error code: 80070663
When I searched these codes, it brought me to some tech support wiki page that offered the solution to download/purchase ErrorEND. I figured that I may find a free alternative instead, which is another reason why I approached you all. --70.179.165.67 (talk) 12:47, 3 July 2011 (UTC)[reply]
80070003 is COR_E_DIRECTORYNOTFOUND: "The specified path couldn't be found." 80070663 is ERROR_PATCH_PACKAGE_OPEN_FAILED: "This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package." 800F080D was not found by the Microsoft error lookup tool that I used. These are impressively unhelpful.
This is worth a try (I found it by searching for 80070003). You can also download Windows 7 SP1 bypassing Windows Update, and that might, if you're lucky, fix the problem with the other updates. You would probably want one of the last two files, "...-X86.exe" for 32-bit or "...-X64.exe" for 64-bit.
I wasn't able to find the ErrorEnd-recommending page that you mentioned, but there are a lot of web sites out there that serve millions of autogenerated pages saying "Are you having problems with X? Try Y" where X is culled from some database of search terms and Y is the dodgy product being marketed. Some are designed to resemble wikis, like this one. See also this previous ref desk thread. -- BenRG (talk) 18:27, 3 July 2011 (UTC)[reply]
There are an amazing number of these "registry fixing" programs out there. I'm not sure why. I guess there are enough gullible buyers to keep them all in business. CCleaner is a free tool from a fairly reputable company that does similar stuff. As far as I can tell it's as useless as the other tools of this kind, but perhaps it will do something for you. -- BenRG (talk) 08:44, 3 July 2011 (UTC)[reply]
I use CCleaner whenever I remove a program— it has helped when I have an install issue when I upgraded from trial software to a full version. Registry cleaners are over-rated, but can help in certain situations. I have a laptop with Windows 7 that gives a 0x800f080d whenever I install SP1. I have gone through all the troubleshooting with no joy and plan to nuke and pave soon. ---— Gadget850 (Ed) talk 02:42, 4 July 2011 (UTC)[reply]

I use Linux ¦ Reisio (talk) 23:39, 5 July 2011 (UTC)[reply]

Running a 32-bit .dll on a 64-bit Windows system.[edit]

Hi. I've got an application that I wrote some time back (in Java), that had a small separate .dll for reading hardware directly (keyboard and joystick). Upon running this on my new Win 7 64-bit PC I get a Java error: "Can't load IA 32-bit .dll on a AMD 64-bit platform". I've got the .dll source code somewhere (I hope!), so I could probably recompile it, but it would probably be more sensible in the long run to do things a different way, and eliminate the .dll. In the meantime, is there a quick work-around to load the .dll in some way, just so I can see whether the rest of the application works? (Hopefully it will, but I may have done something daft...). Thanks AndyTheGrump (talk) 20:03, 3 July 2011 (UTC)[reply]

You can't mix 32-bit code (the DLL) and 64-bit code (the Java runtime) in the same address space. You'll have to recompile the DLL, use the 32-bit Java runtime, or write a separate 32-bit program (in any language) that loads the DLL and talks with the Java process by some IPC mechanism. -- BenRG (talk) 22:38, 3 July 2011 (UTC)[reply]
Thanks - I was beginning to suspect as much. I think using the 32-bit runtime sounds the simplest solution for now - The only C++ compiler I have available is the free MS Visual C one, which doesn't compile 64-bit apps. AndyTheGrump (talk) 23:00, 3 July 2011 (UTC)[reply]
Yup, that did the trick (and my Java app seems to work :-) ). I'm running it from a .bat file, so I just used the full path to the 32-bit Java.exe to run it ("C:\Program Files (x86)\Java\jre6\bin\java" -jar "D:\D Scratch\MyVeryIffyJavaApp.jar"). AndyTheGrump (talk) 23:59, 3 July 2011 (UTC)[reply]

scan& record[edit]

I would like to know if there is anything out there to scan and then record info from barcodes. i have ~ 1500 dvd's and I would like to record them to computer(their titles, etc)173.53.32.89 (talk) 21:19, 3 July 2011 (UTC)[reply]

You want a barcode reader? --KägeTorä - (影虎) (TALK) 00:05, 4 July 2011 (UTC)[reply]
A barcode reader would be necessary but not sufficient. The only information in the barcode is the number that you see written beneath it. It would also be necessary to have software that can look up the number and pull down the desired information. Looie496 (talk) 00:33, 4 July 2011 (UTC)[reply]
The problem is that those were likely applied by retailers, each of whom use their own numbering system, and, if some are many years old, those bar codes may not be supported by their current systems. So, you would need to have access to all those retailer's current and past databases, which they aren't likely to grant. StuRat (talk) 00:42, 4 July 2011 (UTC)[reply]
I don't think that's right -- I think the bar codes are a property of the DVD and there is a universal numbering systems for DVDs. It's possible to get information about a DVD by searching on the web for the numbers printed at the bottom of the barcode. Looie496 (talk) 00:50, 4 July 2011 (UTC)[reply]
Note also the barcodes that are on most products aren't unique to the retailer. They are usually EAN-13 containing a Global Trade Item Number. The vast majority of products in Europe and North America (well at least the US and Canada) and Australia+New Zealand contain such a barcode since retailers require it. In the past some retailers may have added their own seperate barcode but AFAIK in said countries this practice has mostly died out. Note even when retailers add their own barcodes the products will usually still contain an EAN-13 because the manufacturer hope to sell their products to a wider market including retailers who expect it. Well I'm not sure about the US, but considering they invented the Universal Product Code it would surprise me if retailers still added their own barcodes or if many products were sold without either a UPC or EAN-13. Home brands and brands or products unique to a retailer will of course not be found in other retailers (although will still usually contain an EAN-13) but for non home brands you will often find the same product with the same barcode across different retailers. (The barcodes may vary depend on things like the place of manufacture.) Of course this doesn't mean it's easy to find what the product is based on the EAN-13, AFAIK there's no universal database and based on my tests with a phone barcode scanner the public that databases do exist contain rather few products. Nil Einne (talk) 12:02, 4 July 2011 (UTC)[reply]

Most will have their titles available in the filesystem (how your computer OS will know to name it 'HARRY_POTTER…', etc.) you need only backup with an application that is semi-not-awful. ¦ Reisio (talk) 23:45, 5 July 2011 (UTC)[reply]

implementing a subset of SQL[edit]

as a learning exercise, I'd like to implement a subset of SQL as a C++ program, or, more specifically, I'd like you to do it. Then I'll just paste it into a file and run it with gcc. Could you give me a 40-200 line C++ program like that? It doesn't have to be optimized or do any file i-o, I'm just wondering about how you parse the sql commands at all, and what these rows and columns and joins and whatnot, how that might possibly relate to C++. Is it something where you have to have an "engine" you write that continually parses new sql statements (like a BASIC interpreter) or can you make it more optimized than that? I guess I'm saying that I'm really really struggling with basic database concepts and it would be an immense help if I got a toy implementation in C++, so that I can translate the thing to something I already know. I began this post in a somewhat flippant way, but I really can't write the sql parser by myself! I am NOT getting these database concepts enough :) Thanks... --188.29.120.206 (talk) 23:18, 3 July 2011 (UTC)[reply]

Parsing the commands doesn't have much to do with database concepts. Writing language parsers is a very specialized task -- many of them are written using special tools such as Lex and Yacc. I don't specifically know what software the available SQL parsers are written with, but whatever it is, the source code is likely to look unpleasant. Our article on parsing may help to give you a conceptual overview. Looie496 (talk) 00:44, 4 July 2011 (UTC)[reply]
couldn't you give me a toy 100-200 or 300 line C++ program that is almost kind of like a database in some rudimentary way? So I can at least get started in understanding something... 188.28.160.38 (talk) 01:42, 4 July 2011 (UTC)[reply]
You're not going to find a 200 line DBMS. If you want to look at something that is relatively small compared to most database systens, I'd take a look at the source code for SQLite, which is written in C. Still, you are talking something on the order of 100K lines of code, rather than 200. Your request simply isn't satisfiable. You're going to need to dive into a bigger body of code if you want to see how a database system works. ~ Mesoderm (talk) 01:59, 4 July 2011 (UTC)[reply]
Sorry, but I'm 100% sure you're wrong. There is SOME interesting subset of sql that you could put in 200 lines. It doesn't have to really be a DBMS or an RDBM or an RDMB or whatever that stuff is. All it has to do is present SOMETHING to me, so I have more than NOTHING, which is what I have now. 188.29.88.52 (talk) 05:30, 4 July 2011 (UTC)[reply]
No, I'm not wrong, as I'm sure an extensive search for a 200 line SQL engine will convince you. However, perhaps if you explain what problems you are having with SQL, somebody here could point you to a better way of figuring it out than trying to write an SQL engine on your own. Which SQL concepts are you having problems with? ~ Mesoderm (talk) 05:46, 4 July 2011 (UTC)[reply]

This research article discusses teaching relational algebra concepts via an interactive programming environment. However, their implementations were in Visual FoxPro and Turbo Prolog, and thus unlikely to be readable for a C++ programmer. 130.188.8.10 (talk) 10:12, 4 July 2011 (UTC)[reply]

I can imagine what you are asking from two different points of view. Do you mean you want to write a simple RDBMS system that will parse some standard SQL statements and actually work like a database; and do all that in a few hundred lines of C++? - Like the others have said, I would agree that is very probably impossible in such a small space. Alternatively, are you looking for a fleshed-out example that uses a particular RDBMS's API to achieve some specific aim, something that is longer then the short examples given in RDBMS manuals? Astronaut (talk) 11:08, 4 July 2011 (UTC)[reply]
If I were interested in implementing a basic SQL database, the SQL part is the last thing I'd do. In order:
  1. I'd write the storage engine, which is in essence a key-value store. Probably the easiest thing to do for that is a hash table (a simply in-memory hashtable will run to a dozen lines of code or so, with as much again to bulk load and save the whole thing to a file; a toy implementation doesn't need concurrency, ACID, or robustness). Or you could use Berkeley DB, which is in essence a fancy persistent hash table. That gives you the logical equivalent of SELECT * FROM foo (and the equivalent INSERT)
  2. Then I'd implement the schema, which is another table (or two), which stores the names and types of the fields of a given table. That allows you to construct a function that takes the name of a table and returns a type/name structure. Armed with that, you can parse the raw value stored in the hashtable and get a meaningful typed tuple from it. With that you can logically implement SHOW TABLES and SHOW COLUMNS, and in particular SELECT bar,zork,zap FROM foo
  3. To show it was useful you really need to be able to do a simple inner join. A toy implementation might only do joins on column equality, in which case a (perhaps inefficient) implementation is very simple.
  4. To get test data in, and results out, I'd need some utility functions like CREATE TABLE
  5. At this point I'd have a basic data store and a bunch of C functions like db_select(table,[fields]) and db_join_equal(tableA,tableB,fieldA,fieldB). That's a basic database API. To make it a SQL database you need to parse a string containing a SQL command. For a very simple toy language (where you brook no variation) you can probably do that with a few lines of code; if you planned to support a fuller SQL subset later you'd probably think about a parser generator like yacc. Either way, that turns stuff like "SELECT foo FROM bar;" into a few calls to your database API (one to find the table, one to retrieve its schema, a loop to pull each row and a schema-aware operation to extract foo only from each row).
-- Finlay McWalterTalk 11:21, 4 July 2011 (UTC)[reply]