Wikipedia:Reference desk/Archives/Computing/2010 May 30
Computing desk | ||
---|---|---|
< May 29 | << Apr | May | Jun >> | May 31 > |
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 30
[edit]whats a good free thing to rip youtube vids
[edit]whats a good free thing to rip youtube vids —Preceding unsigned comment added by Tom12350 (talk • contribs) 00:52, 30 May 2010 (UTC)
- If you mean "extract audio", then http://www.listentoyoutube.com/ might interest you. --Rajah (talk) 00:55, 30 May 2010 (UTC)
i mean video. wasent there a free firefox extension that did that? —Preceding unsigned comment added by Tom12350 (talk • contribs) 01:27, 30 May 2010 (UTC)
- There are lots and lots of them, you can browse all these: [1] (Not every add-on there is for downloading videos from flash players, but many of them are.) I use downloadhelper (which is at the top of the top downloads section on that page). Haven't used it on youtube for a few months, but it worked last time. 81.131.66.87 (talk) 01:39, 30 May 2010 (UTC)
- Another suggestion: I find that the simple little standalone program YouTube Downloader works more consistently and effectively than anything else I've tried. « Aaron Rotenberg « Talk « 02:07, 30 May 2010 (UTC)
- I use the Firefox add-on 1-Click YouTube Video Downloader - it offers a small choice of formats to download. 92.15.12.12 (talk) 13:15, 30 May 2010 (UTC)
- I hate it when people don't use correct grammar on the 'net... Chevymontecarlo 17:18, 30 May 2010 (UTC)
http://www.keepvid.com is excellent. ╟─TreasuryTag►stannary parliament─╢ 19:28, 30 May 2010 (UTC)
- the method I use is to simply go into your browser's cache folder and copy the file from there, and rename it with the extension .avi. You have to be quick though, usually a few seconds after a youtube video is finished loading, the file disappears from the folder. 198.161.203.6 (talk) 00:18, 1 June 2010 (UTC)
wxwidgets wxAutomationObject::CreateInstance in MultiThread programme
[edit]When I use wxAutomationObject::CreateInstance to create an excel application in another thread it always failed to create it My code is like this
if(!excelObj.CreateInstance(wxT("Excel.Application")))
{ wxMessageBox(wxT("错误"),wxT("创建Excel对象失败!"),wxOK); return 0; } But it's OK when using in single thread programme. Why? Anybody can help me? —Preceding unsigned comment added by Mm0635 (talk • contribs) 01:35, 30 May 2010 (UTC)
MySQL - Schrödinger's tables
[edit]Explain this one (anonymized):
> mysql --user=root --password=[...] databasename Welcome to the MySQL monitor. [...] Server version: 5.1.40-community MySQL Community Server (GPL) mysql> show tables; +----------------------+ |Tables_in_databasename| +----------------------+ |table_name | +----------------------+ 1 row in set (0.02 sec) mysql> describe table_name; ERROR 1146 (42S02): Table 'databasename.table_name' doesn't exist mysql> create table table_name (firstName VARCHAR(20), lastName VARCHAR(30), dateOfBirth DATE); ERROR 1050 (42S01): Table 'table_name' already exists mysql> exit Bye >mysqldump --user=root --password=[...] --quick databasename > dump.sql mysqldump: Got error: 1146: Table 'databasename.table_name' doesn't exist when using LOCK TABLES
Perhaps a bit of context is in order. I'm running these commands on a server that I inherited but did not set up. It is not absolutely critical that I get access to this data right now, but the weird behavior piqued my interest enough to warrant asking. All the Google suggestions I've found are irrelevant or useless. (Missing .frm files? Nope, they're all there - they're all InnoDB tables. Permissions? Nope, running as root. Case sensitive filesystem? Nope, Windows XP. Recreate everything from scratch? Nice suggestion when I can't see the data to begin with.) « Aaron Rotenberg « Talk « 01:40, 30 May 2010 (UTC)
- Have you attempted to see how this behaves using, say, phpMyAdmin? --rocketrye12 talk/contribs 14:01, 30 May 2010 (UTC)
- phpMyAdmin lists the number of tables as being the correct number in one place, zero in another place, and vomits up the same error from MySQL when trying to create the tables.
I also tried copying the .frm files to my laptop, but my instance of MySQL gives the exact same error messages. Clearly, the tables are corrupt in some manner. The original developer might have been working on a different architecture than what the current server is using, or some such thing.I wish I could post the tables for examination, but the confidentiality of the data prohibits me from doing so. « Aaron Rotenberg « Talk « 21:40, 30 May 2010 (UTC)
- phpMyAdmin lists the number of tables as being the correct number in one place, zero in another place, and vomits up the same error from MySQL when trying to create the tables.
- Eh, scratch that one part. I just found a bunch of pages through Google explaining how InnoDB data files can get out-of-sync and cause all sorts of weird problems like this. I guess I'll play with it some more and come back if I'm still stumped. « Aaron Rotenberg « Talk « 21:59, 30 May 2010 (UTC)
- I've never seen that before, and "out-of-sync" seems to explain this. Keep us posted. --rocketrye12 talk/contribs 14:12, 31 May 2010 (UTC)
Localization
[edit]In [2], I removed " " replacing with " ". Look at
"groups in Japan and South Korea"
compared with
"groups in Japan and South Korea"
What is the first space?174.3.121.27 (talk) 03:17, 30 May 2010 (UTC)
- It is a Unicode U+3000 "ideographic space" used with Chinese, Japanese, and Korean (CJK) characters. PleaseStand (talk) 04:32, 30 May 2010 (UTC)
- CJK characters are always fixed width, and a typical space character (in English) is considered "half-width", i.e. it occupies the space of only half a character. Half-width spaces are used (though there is usually no need for spaces), but whenever characters are meant to be aligned (as they are in most writing), the "full-width" space is used, along with full-width commas, periods, quotation marks, etc. 210.165.30.169 (talk) 01:42, 2 June 2010 (UTC)
Downloading large number of attachments
[edit]I have a Gmail account with over a thousand emails containing 1-20 attachments each. Gmail has a nice feature that lets you download all the attachments in an email zipped in one file with a single click. Is there a way to download ALL attachments from ALL emails without going through them one by one? Its okay if I have to download a POP/IMAP mail client. I tried a few clients already, and none of them have a good way (or manual work-around that I know of) of quickly collecting all the thousands of attachments. Please help! I need to download all the thousands of pictures in over a thousand emails to one folder within a few days! —Preceding unsigned comment added by 209.148.211.113 (talk) 06:59, 30 May 2010 (UTC)
- You're on the right track with IMAP; that seems to be your best bet. Though I have never used this myself, you can try this Macro Editor for Mozilla Thunderbird. Connect Thunderbird to Gmail through IMAP, and you could write a macro to achieve this goal. OR This Thunderbird extension looks promising, see this article. (Oh the power of a google search!)--rocketrye12 talk/contribs 14:12, 30 May 2010 (UTC)
Little Sister's voice in Bioshock 2
[edit]Does anyone know where Bioshock 2 keeps the files for the Little Sister's voice? I would like to hear what she says without any other sounds or anything. Xjmmlpsufmboe (talk) 10:17, 30 May 2010 (UTC)
- it's probably deep down in the game files somewhere, perhaps in something like 'media' or 'sound'. Chevymontecarlo 19:47, 30 May 2010 (UTC)
- It could also be attached to other sounds in one big file, rather than separate ones, so you might not be able to dig down and get it individually. Chevymontecarlo 19:48, 30 May 2010 (UTC)
- Not to be annoying here, but if you honestly have no idea for this particular game, you really shouldn't answer. --Mr.98 (talk) 22:24, 30 May 2010 (UTC)
- Thanks for the help, but "somewhere deep, probably in sound" doesn't give me much to work from :/ Xjmmlpsufmboe (talk) 12:54, 31 May 2010 (UTC)
- Yes, I should stop posting stupid comments like that, sorry :( Chevymontecarlo 16:23, 2 June 2010 (UTC)
- Thanks for the help, but "somewhere deep, probably in sound" doesn't give me much to work from :/ Xjmmlpsufmboe (talk) 12:54, 31 May 2010 (UTC)
- In short: It's not going to be easy, or fun. They're stuck in a bunch of .fsb files in bioshock/content/Sounds_windows/. Look here for some insight, but don't get your hopes too high up; some people have trouble with these instructions, apparently. http://forums.2kgames.com/forums/showthread.php?s=b439256fce29c0885e04df54fb5b0e95&p=149174#post149174 Riffraffselbow (talk) 08:48, 4 June 2010 (UTC)
computing the system
[edit]how to create in a software explain briefly and with the examples —Preceding unsigned comment added by Kumarselva482 (talk • contribs) 15:03, 30 May 2010 (UTC)
Please do your own homework.
- Welcome to Wikipedia. Your question appears to be a homework question. I apologize if this is a misinterpretation, but it is our aim here not to do people's homework for them, but to merely aid them in doing it themselves. Letting someone else do your homework does not help you learn nearly as much as doing it yourself. Please attempt to solve the problem or answer the question yourself first. If you need help with a specific part of your homework, feel free to tell us where you are stuck and ask for help. If you need help grasping the concept of a problem, by all means let us know.
- Your question is also not very clear. So, what software is required, what are its requirements, what will it be used for, which environment is specified (ie. which hardware, operating system, peripherals, etc.), how long a timescale do you have to write the software, and so on? Astronaut (talk) 15:07, 30 May 2010 (UTC)
Firefox and IE7
[edit]I've just downloaded Firefox. I am running out of hard-drive room. Can I safely delete (remove) IE7? (I have transferred all the data across that I need/want.) Will such removal have any effect on my use of Outlook? Thanks for you help. Bielle (talk) 16:11, 30 May 2010 (UTC)
- No, if you remove IE it shouldn't affect Outlook, because it just uses your Internet connection, not IE itself. On a PC, you can try 'add/remove programs' in the Control Panel to try and remove it (At least on Windows XP anyway, not sure about the newer operating systems as they may have been messed around with/changed since then). Chevymontecarlo 17:16, 30 May 2010 (UTC)
- Actually, you will find it in 'add/remove Windows components' section of 'add/remove programs. Mxvxnyxvxn (talk) 18:10, 30 May 2010 (UTC)
- Thanks for correcting me. It's been ages since I last used Windows so I am not longer familiar with it as much as I used to be. Chevymontecarlo 19:46, 30 May 2010 (UTC)
Thanks for your help. Bielle (talk) 22:06, 30 May 2010 (UTC)
- Actually, you cannot remove IE, but you can revert IE back to version 6. IE is built into Windows. Unchecking that box in the Add/Remove Windows Components just removes it from the Start Menu. Reverting to a previous version or removing it from the Start Menu won't save very much space at all.
- If you want to save space, then delete all the hidden $NtUninstall folders from the Windows folder. Also disable hibernation and turn off System Restore. Then, delete the old system restore point, and empty the C:\Documents and Settings\[your user name]\Local Settings\Temp folder. These actions will save several gigabytes of hard-drive space.
- Go to My Computer → Tools → Folder Options → View → Show Hidden Files and Folders to display the hidden folders mentioned above.--Best Dog Ever (talk) 22:19, 30 May 2010 (UTC)
- Have you tried CCleaner? It is an excellent disk cleanup tool and will likely find plenty of junk files you never use which will free up a good bit of space. Just mind what it deletes as although none of it is really irreplaceable, it may be inconvenient to you if you like keeping old browser histories and such. But you can alter what it cleans up within the program with ease via the list of checkboxes. It also details what it has found so that you can be sure of what you're deleting before it is lost.
- Might also be a good practice to go through your add/remove programs (which CCleaner also has built into it, in "Tools->Uninstall") and delete any programs you do not use anymore. Just be sure when you uninstall a program that you know what it was used for as you can delete some drivers in this way, thus making certain computer components unusable until you reinstall them. -Amordea (talk) 01:34, 31 May 2010 (UTC)
- You can set the Options of Ccleaner and the programs below not to delete browser histories if that's what you like. Regarding removing programs, my rule is that its OK to delete freeware programs that you can easily download again from the internet, but not to delete programs you have to pay for, particularly those required for repair, or system drivers. 92.28.254.179 (talk) 10:26, 31 May 2010 (UTC)
- You may be able to remove a lot of garbage from your HD to free up space. Ccleaner as suggested above, also CleanUp!, both freeware. Duplicate Cleaner, also freeware, will find lots of duplicated (but non-system) files. In XP you can click My Computer, then right-click Local Disk and choose Properties. Click Disk Cleanup to compress files. When this presents its results, I recently found that if you select Options you can reduce the number of days that software has to be inactive before it is compressed, which frees a lot more space when you run Disk Cleanup again. Be careful what you delete with Disk Cleanup. 92.28.254.179 (talk) 10:19, 31 May 2010 (UTC)
Hard drive recommendations
[edit]Hi guys, I'm considering backing up my iTunes library of 3.87 G onto some sort of external hard drive. As I'm using a Mac I'm thinking of using Time Machine to set it up. Is this OK to use and also what sort of hard drive should I get? I'm thinking that my library will definitely grow as I buy and add more music to my library so I was thinking of a hard drive with loads of storage. If so, what particular manufacturer and what have been your experiences with external hard drives. Thanks and I appreciate the advice :) Chevymontecarlo 17:13, 30 May 2010 (UTC)
- How much is the hard drive going to be moved? If you want a portable hard drive and are going to be transporting it a lot (e.g. if your Mac is a laptop and you want to take your music with you) I would recommend a Freecom Toughdrive - the actual hard drive is sandwiched between two soft rubber pads in these drives and Freecom claims they can withstand a drop from six feet onto a concrete floor. That's pointless though if all your hard drive is going to do is sit on your desk. 131.111.185.68 (talk) 18:10, 30 May 2010 (UTC)
- First off, any hard drive can be formatted for Macs. But if you want to use the built in software, than it has to support Macs in the tech requirements. As 131 said, you need to know how to take care of hard drives, or get one that is protected. Portable drives are physically smaller, run at slower speeds, and are smaller. (They still should be about 50 times more than your current collection.) Larger drives are cheaper per gigabyte and run faster, but they are larger and need external power. Maybe get a flash drive- they are tiny and should give you enough space (get a 16GB?). I don't know if that is enough for you though. By the way, when it comes to reviews on hard drives, every customer with a hard drive that fails will post a review. Most drives don't fail so quickly, and you don't know if the character banged the drive while it was reading/writing. As for reliable companies, I believe EVERYONE has a different opinion. My favorites are Seagate and Toshiba. Mxvxnyxvxn (talk) 18:20, 30 May 2010 (UTC)
- Okay, thanks. The drive will probably stay on my desk 99% of the time. Chevymontecarlo 19:45, 30 May 2010 (UTC)
- Time Machine works fine for this task. I don't think you'll need anything more as far as software goes. My own collection is about 26 G. Dismas|(talk) 19:59, 30 May 2010 (UTC)
- Okay, thanks. The drive will probably stay on my desk 99% of the time. Chevymontecarlo 19:45, 30 May 2010 (UTC)
- First off, any hard drive can be formatted for Macs. But if you want to use the built in software, than it has to support Macs in the tech requirements. As 131 said, you need to know how to take care of hard drives, or get one that is protected. Portable drives are physically smaller, run at slower speeds, and are smaller. (They still should be about 50 times more than your current collection.) Larger drives are cheaper per gigabyte and run faster, but they are larger and need external power. Maybe get a flash drive- they are tiny and should give you enough space (get a 16GB?). I don't know if that is enough for you though. By the way, when it comes to reviews on hard drives, every customer with a hard drive that fails will post a review. Most drives don't fail so quickly, and you don't know if the character banged the drive while it was reading/writing. As for reliable companies, I believe EVERYONE has a different opinion. My favorites are Seagate and Toshiba. Mxvxnyxvxn (talk) 18:20, 30 May 2010 (UTC)
- I would look at newegg.com or frys.com and just choose whatever drive is within your budget. 1.5TB drives can be had for around $99. Despite what Mxvxnyxvxn said, I would read the newegg reviews and steer clear of the lower reviewed ones. Comet Tuttle (talk) 20:38, 30 May 2010 (UTC)
- If you're only backing up music, I would go with a flash drive as well. It's more portable and hardy. If you go with hard drives, I personally rank Western Digitals first, followed by Seagate. Used to be reverse, but I've had less WDs fail on me in the span of 15 years (1) than Seagates (2 at home and 2 at work). --Wirbelwindヴィルヴェルヴィント (talk) 00:39, 31 May 2010 (UTC)
- Just to throw in my two bits here, but in my experience Western Digital has tended to be the best. However, my longest-lasting hard drive has been a 40GB Seagate which I got 8 years ago and it stayed on nearly that whole time and it is still going strong. I've also heard of a couple of (rare) stinkers from Western Digital too (which I wish I could reference but I have no idea now where I saw them and have personally never experienced a bad WD model), so I'd have to say it really depends on the specific model. So in the end, I'd support what Comet Tuttle above said and parrot him in that you should read the reviews before making a purchase and take these brand recommendations mostly as a general guideline as to what brands to narrow your search down by. -Amordea (talk) 01:50, 31 May 2010 (UTC)
- Perhaps I should explain what I meant. I've seen excellent drives from Seagate and Western Digital with bad reviews. I will also note that I sell these things (average 5 a month). Yes, stay away from the bad companies. But the good companies also have some bad reviews. Take a look on newegg and see. How many did they sell that had no problem? Every person who purchased a dud will review it. I only didn't want the OP to be scared away by those reviews. But nobody said anything wrong here, as far as I can see! And the junk will have REALLY bad reviews. Mxvxnyxvxn (talk) 03:23, 31 May 2010 (UTC)
- Well, yeah, there will always be bad reviews. On iTunes there are some terrible reviews of music I love, and there's some positive reviews. Thanks for your help. Chevymontecarlo 04:45, 31 May 2010 (UTC)
- A quick statistic from the computer shop I work at: in an average 12 months, we have maybe 1 dead Seagate come in, 4-5 dead Samsungs, and about 10 dead Western Digitals. This seems fairly consistent year-on-year. Xjmmlpsufmboe (talk) 13:04, 31 May 2010 (UTC)
If you only need to back up 3.87 G of data, you could put that on a DVD-RW 82.44.55.254 (talk) 16:10, 31 May 2010 (UTC)
- That's a nice idea :) I could have a hard drive, DVD, and cloud backup and then I'd be fine if one of them fails. Chevymontecarlo 16:26, 2 June 2010 (UTC)
Best practice for async mysql queries
[edit]Hello! I'm working with a website that needs to make several asynchronous queries to a mysql database on the server. I'm doing this with PHP and AJAX. What's the best practice for this? Should I call mysql_connect()
once when the user accesses the page, and store the returned connection as a global variable to use while the users stays on the page? Or should I call mysql_connect()
every point in time when the user requests queries from the database? If the former is the best option, should I close the connection when the user leaves the page? How would I do that? As you can probably tell, I'm new to a lot of this. I'd appreciate any suggestions. Thank you!--el Aprel (facta-facienda) 18:41, 30 May 2010 (UTC)
- One more question: Is there a way to use UTF-8 encoding in column names in mysql? I see there is multiple charset support for entries into tables, but I haven't found any references for how to use characters outside the default latin1 encoding for column names. Thank you!--el Aprel (facta-facienda) 22:54, 30 May 2010 (UTC)
- Best practice here is to limit the number of mysql_connect queries as much as possible. This is for two reasons: (1) performance, you can and will see load times skyrocket on high traffic sites. While your site/page may not be very high traffic, it never hurts to be scalable and plan for spikes. (2) Ease of configuration. Multiple MySQL connects can make configuration messy if you are directly entering DB host and username/password details, that is, unless you are using "global" configuration variables. I use the term global loosely though, as you can define variables correctly in the right included files so that they act global but are not global, when it comes to configuration. Long story short: open the DB connection once when the user enters the page, reference it multiple times, then close the connection (similar to what you alluded to). You store it in a session variable, in addition to a global variable.--rocketrye12 talk/contribs 14:20, 31 May 2010 (UTC)
- Thanks! Can a mysql connection timeout, or once I open it, it will stay connected for as long as the user's on the page? Also, how do I know when the user is leaving the page so I can close it? Is there some kind of HTML event that fires?--el Aprel (facta-facienda) 17:05, 31 May 2010 (UTC)
- The default connection close time for a standard mysql_connect is 8 hours. This is governed by global php configuration, and may differ based on your webhost/server config. If you have no sure-fire way of discerning a person is leaving the page, it is okay to not force a mysql_close and it will close in time. I do not not know of any close-page event (but there may be) --- and with connection pooling this should have limited impact.
- Also, on a sidenote, I may have to rescind my suggestion of putting a mysql connection into a session variable as now that I think about it this may not function as expected. But the answer to your question still stands: best practice is to limit the mysql connections physically and logically. --rocketrye12 talk/contribs 00:25, 1 June 2010 (UTC)
- Thanks! Can a mysql connection timeout, or once I open it, it will stay connected for as long as the user's on the page? Also, how do I know when the user is leaving the page so I can close it? Is there some kind of HTML event that fires?--el Aprel (facta-facienda) 17:05, 31 May 2010 (UTC)
- Best practice here is to limit the number of mysql_connect queries as much as possible. This is for two reasons: (1) performance, you can and will see load times skyrocket on high traffic sites. While your site/page may not be very high traffic, it never hurts to be scalable and plan for spikes. (2) Ease of configuration. Multiple MySQL connects can make configuration messy if you are directly entering DB host and username/password details, that is, unless you are using "global" configuration variables. I use the term global loosely though, as you can define variables correctly in the right included files so that they act global but are not global, when it comes to configuration. Long story short: open the DB connection once when the user enters the page, reference it multiple times, then close the connection (similar to what you alluded to). You store it in a session variable, in addition to a global variable.--rocketrye12 talk/contribs 14:20, 31 May 2010 (UTC)