Jump to content

Wikipedia:Reference desk/Archives/Computing/2012 April 21

From Wikipedia, the free encyclopedia
Computing desk
< April 20 << Mar | April | May >> April 22 >
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.


April 21

[edit]

LZMA2 Data Compression - PCIe ASIC

[edit]

  I'm looking for a PCIe card with an ASIC for LZMA2 Data Compression. Do such cards currently exist, and which manufacturers make them? Vickreman.Chettiar 03:24, 21 April 2012 (UTC)[reply]

There are certainly chips for that. I don't know about pcie boards around them. Try hifn.com for possibilities. 64.160.39.210 (talk) 08:54, 23 April 2012 (UTC)[reply]

Zedo

[edit]

Zedo is an ad serving tech company. The article pans it for being "spyware". The real problem (from my personal opinion and any quick Internet search) is that it is annoying. However, it is hard to sift through standard search results since everything about the company is from nonRS forum's or the company itself (primary). Has anyone seen anything from a neutral RS simly stating "people feel x about Zedo"?

Disclaimer: I have made fun of Jimbo for his efforts on this article even though I do agree that "spyware" is a little extreme.Cptnono (talk) 04:58, 21 April 2012 (UTC)[reply]

What are the disadvantages of object-oriented programming?

[edit]

Compared to other paradigms such as functional programming? — Preceding unsigned comment added by 220.255.1.71 (talk) 05:14, 21 April 2012 (UTC)[reply]

If you told us what was wrong with the 2 million + hits you get if you google "disadvantages of object-oriented programming", we could tailor our answers to your needs. HenryFlower 13:58, 21 April 2012 (UTC)[reply]

It requires the programmer to model something, rather than allowing the programmer to just do something. If the programmer is any smart, they realize that modelling something becomes very useful, very, very fast. But if they're just in a hurry, know exactly what steps they want a computer to do, and don't have complex data that they want to pigeonhole into an object hierarchy, then an object-oriented approach could be a disadvantage. 188.6.94.248 (talk) 14:52, 21 April 2012 (UTC)[reply]

Do you mean object-oriented programming as usually practiced in industry (e.g. Java, C#, C++, etc.), or object-oriented programming in theory (e.g. Smalltalk)? They're pretty different from each other, in part because the designs of industry languages are often bogged down with performance concerns. Paul (Stansifer) 15:52, 21 April 2012 (UTC)[reply]
Since it's a major change, involving a lot or retraining of programmers and rewriting of code, the question comes up of whether the benefits justify such a large investment. For comparison, look at Blu-Ray versus standard-def DVDs. Yes, Blu-Ray is better. But, is it enough better to justify scrapping all your current DVDs and DVD players to upgrade it all to Blu-Ray ? Most people don't think so. StuRat (talk) 16:33, 21 April 2012 (UTC)[reply]
Most programmers are already used to OO programming (starting with C++ and Delphi ages ago). My experience is that rewriting code from scratch every now and then (like every 4 years) actually saves costs when compared to maintaining old code. My company has a pretty huge software package containing well over 500k lines of code and redesigning its modules from scratch instead of hacking new features into them is 80% of what we do (leaving 20% for fixing smaller bugs). Joepnl (talk) 21:21, 24 April 2012 (UTC)[reply]
That approach just isn't possible in many industries, with huge volumes of legacy code. Rewriting that every 4 years would require 10x the staff they have on hand. StuRat (talk) 16:11, 25 April 2012 (UTC)[reply]

Syncing Firefox add-on data

[edit]

I use two different Firefox installations on a regular basis (three if you count my smartphone). So I've installed Firefox Sync, which did a great job of synchronizing my: cookies, bookmarks, history, and list of add-ons. However, it did not copy the data within the add-ons themselves between my installations, which means my I cannot use StumbleUpon without goofing up my counter, I cannot sync my NoScript data, my Adblock Plus data is not synchronized (which is obnoxious because I have data in there about blocking Facebook because I don't want them tracking me everywhere tyvm), my customized AutoPager data is no good, and I have to login all over again for TinEye. Is there a way to automatically sync this data between installations? Magog the Ogre (talk) 07:30, 21 April 2012 (UTC)[reply]

You can simply copy the contents of your profile directory into another profile directory and basically have the same everything, as for actually syncing these... a dynamic solution would probably be overkill, you could probably just replace your Firefox shortcut with one that first transfers the data over a network and then starts Firefox (or any number of scheduled transfer solutions you like). If all the installations are on the same local network (and therefore have virtually no latency reaching one another), you could just have one installation and mount it over the network for the other two, eliminating the need to deliberately sync altogether. ¦ Reisio (talk) 17:28, 21 April 2012 (UTC)[reply]

Download page with wget

[edit]
Resolved

I'm trying to save this url with wget using the --page-requisites function. The webpage is downloaded correctly, as are the css and banners, but the image thumbnails are not. I have tried everything I can think of and it simply will not downloaded the image thumbnails (for example, http://desuchan.net/desu/thumb/1231032526187s.jpg). I experience the exact same problem using httrack as well, so this does not appear to be a wget specific error. Does anyone have any idea why it is failing like this? The page appears to display perfectly in Firefox, IE, and Opera. It's driving me crazy ComputerQuestion (talk) 12:23, 21 April 2012 (UTC)[reply]

What thumbnails? When I visited that URL I saw no thumbnails - just a banner. I use IE 9. Astronaut (talk) 13:50, 21 April 2012 (UTC)[reply]
This is how it looks in Firefox. I've highlighted the thumbnails in red boxes. Why does it display differently on IE 9? Could this be why wget is unable to download the page properly? ComputerQuestion (talk) 14:33, 21 April 2012 (UTC)[reply]

Try HTTrack, maybe? ¦ Reisio (talk) 17:35, 21 April 2012 (UTC)[reply]

"I experience the exact same problem using httrack as well, so this does not appear to be a wget specific error." ComputerQuestion (talk) 18:17, 21 April 2012 (UTC)[reply]

Sorry. That is odd. In the interim you could just scrape them out (curl | grep). ¦ Reisio (talk) 18:58, 21 April 2012 (UTC)[reply]

It looks like the main part of the page appears within an HTML comment <!-- -->, perhaps by accident. The problem comment starts with <div class="globalannounce"><!--. A little bit later there's a --!> (note the incorrect !), which seems to be the intended end of that comment. On my computer, Firefox and Chrome interpret this as the end of the HTML comment, but Internet Explorer and Opera keep going until they get to --> <a href="http://validator.w3.org/check?uri=referer">, which is near the end of the page. Wget and HTTrack are probably also obeying the correct HTML comment markers and missing the main part of the page. --Bavi H (talk) 19:17, 21 April 2012 (UTC)[reply]
(Ha ha. If you actually click on the W3C validator icon at the bottom of that page, it tells you the same thing. I might have saved a lot of debugging time trying that first!) --Bavi H (talk) 19:26, 21 April 2012 (UTC)[reply]
Piping through tidy could possibly help you automate it in such a case. ¦ Reisio (talk) 19:46, 21 April 2012 (UTC)[reply]

Mystery solved, thanks everyone ComputerQuestion (talk) 20:13, 21 April 2012 (UTC)[reply]

Changing a laptop case cover

[edit]

I am not very good with computers, but I have a cracked cover/lid on my HP Pavillion. I found a replacement on ebay. Now, how do I change them out. I see a series of screws around the screen side, so I assume I need to take them out. Is there anything I need to be aware of before proceeding with this. Thanks. — Preceding unsigned comment added by Azcatlv (talkcontribs) 20:48, 21 April 2012 (UTC)[reply]

I strongly recommend getting hold of the workshop manual relating to your specific laptop model. A quick Google suggests that these are freely available. The screen is usually surrounded by all sorts of ancillary bits and pieces such as WiFi antennae, microphones, cameras etc. and their associated wiring. Normally, these are attached to the outer surface of the lid so the screws you see just hold the bezel round the screen in place.86.168.2.185 (talk) 21:43, 21 April 2012 (UTC)[reply]
One warning is that the guts of a laptop tend to be far more fragile than a desktop. So, separate the lid very slowly, watching the inside as you open it, and stop if you feel even a little resistance. StuRat (talk) 21:50, 21 April 2012 (UTC)[reply]
Unfortunately, modern consumer electronics have something in common with the TARDIS: They are bigger on the inside than on the outside. I recently tried to clean the inside of my camera, and had trouble putting it back together even though the only thing I removed before giving up was the back cover. --Stephan Schulz (talk) 23:12, 21 April 2012 (UTC)[reply]

Populate a MySQL database automatically

[edit]

I have that website (PHP, MySQL,...) which also includes an interface to populate the database (uploading images, text, pdf files,..). This is fine, if I want to upload a couple of items, however for large amounts of data it is a bit tiresome, so I would like to automate this task. What is the best way to do that? For instance I could imagine to drop all files (jpg, pdf, txt) that belong together in a directory, and just to run a script that uploads the files, extracts the information from the txt files and puts them in their proper place in the database. Are there some tools which would help me in creating such scripts or am I on my own? bamse (talk) 21:02, 21 April 2012 (UTC)[reply]

It really depends on the exact setup of the database; I doubt there is anything out there that can do this sort of thing automatically. (I assume by "that website" you mean phpMyAdmin?) Are you really storing JPEGs and other binary data in the database as data? That is a somewhat problematic way to use the database and unnecessarily taxing (usually you don't store actually images in the database, you store a link to the image and have the image uploaded to the server). --Mr.98 (talk) 21:44, 21 April 2012 (UTC)[reply]
By "that website" I did mean a website (in this case a sales portal which has images of items, descriptions of items, etc. stored in a database). I do use phpmyadmin to administrate the database though as I know virtually nothing about MySQL syntax. That's why I was looking for an automatic way, kind of like a "batch phpmyadmin". And yes, the images are not directly stored in the database, but they are located in an image folder and links to the images are stored in the database. So the script/tool I am looking for should copy images to that image directory and write the links into the database among others. Would probably be a good idea to check whether images with the same filename already exist, before overwriting them. bamse (talk) 07:35, 22 April 2012 (UTC)[reply]
OK, that clarifies things a bit. One possibility would be to make something like an Excel file of all of the data and import it via phpMyAdmin directly, skipping the interface. In my experience this is a lot faster than doing it all through interfaces. --Mr.98 (talk) 14:38, 22 April 2012 (UTC)[reply]
Thanks, will check out the excel import. Does it allow to import to several tables at once? bamse (talk)
There are commands you can use programmatically, too. ¦ Reisio (talk) 16:35, 22 April 2012 (UTC)[reply]
Do you mean SQL scripts or something else? bamse (talk) 12:08, 24 April 2012 (UTC)[reply]

Slow laptop/ task manager

[edit]
Resolved

For about a month, our Windows 7 laptop was very slow. Yesterday I looked under Task Manager, the CPU column of the Processes tab, and it was showing that usually less than 5% of the CPU was being used, adding all of the processes. However, the Performance tab showed 60-70% CPU usage. I ran the full scan of Microsoft Safety Scanner and it removed three things. Then I rebooted and now it is OK.

But my question is: how can something be using up that much of the CPU according to the Performance tab, yet not show up in the Processes tab? Bubba73 You talkin' to me? 21:21, 21 April 2012 (UTC)[reply]

Bad programming? Did you check the box at the bottom that said 'show processes from all users'? ¦ Reisio (talk) 23:12, 21 April 2012 (UTC)[reply]
There are ways for evil programs to hide themselves from Task Manager. Looie496 (talk) 00:03, 22 April 2012 (UTC)[reply]
Unfortunately, the "all users" was not checked on the laptop (it is checked on my desktops). I wish it had been on so maybe I could have seen what was causing the problem. Bubba73 You talkin' to me? 01:53, 22 April 2012 (UTC)[reply]
Malware can disguise itself as an innocuous process, but can't hide CPU usage (not that I'm aware of, anyway). -- BenRG (talk) 03:59, 22 April 2012 (UTC)[reply]
Well, the obvious way for malware to hide CPU usage is to replace Task Manager with a hacked version. I'm not expert enough in Windows to know if there is a less intrusive way of doing it. Looie496 (talk) 17:48, 22 April 2012 (UTC)[reply]
I know this doesn't answer your question, but under normal usage (i.e., not scientific computing), processor usage has very little relationship with perceived speed. Memory size and memory usage control the degree to which the machine is swapping, which does have a huge effect on performance. Of course, the processes that were taking up lots of CPU may have also been taking up lots of memory. Paul (Stansifer) 05:14, 22 April 2012 (UTC)[reply]
The memory use was not particularly high - only the CPU usage. Bubba73 You talkin' to me? 15:27, 22 April 2012 (UTC)[reply]

Mac malware

[edit]

I never used to worry about viruses or malware with my mac, and truthfully I haven't noticed any problems but I have seen lately in a few disparate places that macs more and more are subject to infections, even if nowhere on the scale of PCs. Are there any free programs anyone recommends I run to see if I have anything and/or something that I should have running in the background? Or is what I've read bunk?--108.54.17.230 (talk) 22:51, 21 April 2012 (UTC)[reply]

Comparison of antivirus software, wouldn't worry about it too much. ¦ Reisio (talk) 23:11, 21 April 2012 (UTC)[reply]
Great page. I guess I'll try avast! Thanks — Preceding unsigned comment added by 108.54.17.230 (talk) 02:48, 22 April 2012 (UTC)[reply]
To clarify, a decent antivirus app won't bog down your computer (even the free versions, usually), and even if you personally aren't ever at risk of something nasty, it can help to protect Windows users from files you might redistribute. A lot of antivirus software providers will tell you any platform is unsafe (which is technically true but realistically of course not so much), and they frequently like to pretend things like tracking cookies are the same as a malicious virus or trojan (even in these days when people willingly join facebook and surf around everywhere still logged into it). The other day I removed AVG from a Windows install because it was setting off alarms every time some poorly programmed application used a lot of memory. Just keep it in perspective. ¦ Reisio (talk) 16:40, 22 April 2012 (UTC)[reply]

Can I delete Restore Points manually?

[edit]

On my WinXP system, I seem to have accumulated approx 75 restore points going back to the first of this year. It's literally thousands of files, and my weekly full scan spends about 20% of its time in C:SystemVolumeInfo (where I think it's highly unlikely to find any viruses...)

Accessories > System Restore doesn't have a "remove old restore points" option. Can I do it myself? Clearly there's a naming convention, and a date modified; can I just delete all the January and February directories? Or is it more complicated than that?

Thanks! --DaHorsesMouth (talk) 23:06, 21 April 2012 (UTC)[reply]

Good writeup here. --LarryMac | Talk 23:47, 21 April 2012 (UTC)[reply]

Feedback:

  • Lockergnome advises using Disk Cleanup > More Options, which gives you no control over how many restore points to delete -- it kills ALL of them except the last. Not so sure that's a good idea.
  • One commenter on that page advised using CCleaner > Tools, which I have now also tried.
  • Prior to doing so, I had 75 directories named RPxxx (where xxx ranged from 646 to 719), containing about 14000 files. Each directory's "date last modified" matched up with the restore point date.
  • After deleting January and February RPs, I have 13000 files in the same 75 directories, and the date last modified for the January and February directories (which are still there) are all now TODAY.

Ergo, I'm not sure it actually worked.

I'm not ungrateful for LarryMac's very prompt response, but I'm still open to other suggestions, if there are any. --DaHorsesMouth (talk) 00:22, 22 April 2012 (UTC)[reply]

Those directories' modification date is today because they were modified today (by deleting files from them). The other directories haven't been modified since the day they were created. I'm not sure why deleting two months of restore points (out of four) only got rid of 1000 files (out of 14000), but I suspect it's because files that haven't changed between restore points are stored only once. I don't know why CCleaner didn't remove the directories, but I wouldn't worry about that.
If your computer is working and virus-free, I think you may as well delete all of the old restore points since you're unlikely to need them. If you don't want to do that, and your only complaint is that your virus scanner is spending a lot of time under c:\System Volume Information, you could just exclude that path from the scan.-- BenRG (talk) 03:47, 22 April 2012 (UTC)[reply]