Wikipedia:Reference desk/Archives/Computing/2011 March 10
Computing desk | ||
---|---|---|
< March 9 | << Feb | March | Apr >> | March 11 > |
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. |
March 10
[edit]Regex gurus
[edit]I'll admit that it's not my strongest skill. :) Anyone know what the find/replace regex would be for this?
[http://www.example.com*]
→[http://www.example.com*]{{deadlink=date}}
I'm looking for * to match anything, or nothing, so it would catch all possible links, like
[http://www.example.com]
[http://www.example.com Some site]
[http://www.example.com Lookatme!!]
Et cetera. Is this possible? Avicennasis @ 00:14, 4 Adar II 5771 / 10 March 2011 (UTC)
- You seem to be familiar with globbing syntax, where
*
stands for "zero or more characters". In regular expressions,.
stands for "one character of any kind", and*
stands for "the previous thing, zero or more times in a row." So what you want is.*
to match anything (including zero characters). Note that you'll have to escape the[
,]
, and.
, by putting a backslash in front of them. (though you can skip escaping the dot if you're not worried about[http://wwwoexampleocom Some site]
). Paul (Stansifer) 02:12, 10 March 2011 (UTC)
- Ah, gotcha. So, since I'm not expecting any links missing the dots, I won't worry about escaping them. so, I'm looking at something like
[http://www.example.com.*]
→[http://www.example.com.*]{{deadlink=date}}
- Is that right? (If it helps, I have a job planned with WP:AWB.) Thanks for the reply and the help! Avicennasis @ 19:02, 4 Adar II 5771 / 10 March 2011 (UTC)
- Ah, gotcha. So, since I'm not expecting any links missing the dots, I won't worry about escaping them. so, I'm looking at something like
- You probably want
\[http://www\.example\.com(.*)\]
→[http://www.example.com\1]{{deadlink=date}}
- or simply
(\[http://www\.example\.com.*])
→\1{{deadlink=date}}
- The parentheses capture a sequence of characters and the
\1
copies the first (leftmost) captured sequence. You also need a backslash before[
since it has a special meaning otherwise, and I backslashed the dots as well for robustness. You don't need those backslashes on the right hand side because those characters have no special meaning there. Be warned that there are variations in this quasi-standard regex syntax, and one of the things that often varies is the\1
. -- BenRG (talk) 20:42, 10 March 2011 (UTC)- AWB uses the Microsoft regex engine which is largely (excluding backtracks and lookforwards) identical to the POSIX one (I think). In other words it's pretty much like perl. Grep and sed require you to escape a lot more characters but I think that's really bash in most cases.
- You probably want
- But to the point... I actually think for AWB purposes this would work best: (\[http://www\.example\.com).*?\]. The non greedy version will stop at the first ], which is what I think the wikimedia engine does... although I could be very wrong about that. You should ask at the WP:AWB/T talk page... I used to frequent it a lot more... but there are some regex masters there. Shadowjams (talk) 09:04, 12 March 2011 (UTC)
Android versions
[edit]Why were some phone companies promising and delivering 2.2 upgrades long after 2.3 came out? Also, many new phones were being released with 2.2 after 2.3 was available? — Preceding unsigned comment added by Roberto75780 (talk • contribs) 05:40, 10 March 2011 (UTC)
- Due to security issues that had potential to harm the phone companies, the phone companies wanted all 2.1 phones upgraded to 2.2. No such flaws are known in 2.2. So, the phone companies are not demanding an upgrade to 2.3. Because the upgrades are not demanded, the phone manufacturers have no reason to spend resources on developing and testing the upgrade. -- kainaw™ 13:36, 10 March 2011 (UTC)
Additional UI packs
[edit]Why do just about all of the manufacturers making Android powered phones bloat there phones with UI packs that replace built in functionality. Isn't Android a complete software package that doesnt need anything except the drivers added to it? Some, like HTC's are so overwhelming the phone doesnt even resemble the stock android at all. whats the point? it just slows down updates and costs tons to develop. — Preceding unsigned comment added by Roberto75780 (talk • contribs) 05:42, 10 March 2011 (UTC) \
- Because more people like it than dislike it? General Rommel (talk) 08:18, 10 March 2011 (UTC)
- More likely to do with branding and being able to advertise unique features or whatever than a strict polling. But I don't know. --Mr.98 (talk) 13:11, 10 March 2011 (UTC)
What plugin is required for this web video, please?
[edit]Hi. Would someone be willing to take a look at this web page from the University of Haifa? It's in English, but I'm running Linux and my penguins can't figure out what Firefox plugin in needed to play the video embedded on the page. When I click on the help, it's in Hebrew, and mine's a little rusty ;-) I'd be grateful for the help; I just want to note whatever plugin is necessary when I include it as an external link in an article. – OhioStandard (talk) 12:55, 10 March 2011 (UTC)
- It's an ActiveX plug-in to run a WMV file. Maybe try this plugin for Firefox? I've never tried to get those to work on a non-Windows system, personally. --Mr.98 (talk) 13:10, 10 March 2011 (UTC)
- It does work for me (Opera and FF, not Chrome or Konqueror), but I honestly don't know which package is responsible for the plugin (it plays in an embedded instance of Totem, by the looks of it). At the worst case, you can figure out the media link (search the page source for mms) and have VideoLAN play it - in this case vlc mms://vod4.haifa.ac.il/p/ac/3062.wmv -- Finlay McWalter ☻ Talk 13:21, 10 March 2011 (UTC)
- Thank you, Mr. 98. Thanks, Finlay. Helpful information from both of you. Finlay, I'm especially pleased to know to search for "mms"; I had no idea. The link you provided here does play for me via Totem ( an A/V player ), but I evidently don't have Totem accessible from within my FF browser. I'm not much concerned about that, I apparently don't come across .wmv media often at all in my travels across the web, since I hardly ever have a problem playing anything. But rather than fuss around for an hour or ten trying to "install" a player/codec or whatever the right term is, and getting it to run properly, I think I'll just stick with searching the page source for "mmv", to find the target file, and play it as you've shown me how to do, here. Many thanks! – OhioStandard (talk) 16:22, 10 March 2011 (UTC)
- Quick add-on, for Mr. 98: The link you provided to mediawrap looks tempting; I might try it. Anything A/V (including flash) has cost me hours and hours in the past, to get working properly when I've modified my stock (Ubuntu) configuration, but it does look promising. Thank you for taking the trouble to track it down for me. I wouldn't have really known what to look for. :-) – OhioStandard (talk) 16:27, 10 March 2011 (UTC)
- WFM with gecko-mediaplayer ¦ Reisio (talk) 23:16, 11 March 2011 (UTC)
E-Com mobile TC-300
[edit]I have been trying to connect this mobile to my laptop thro' USB. But "the phone is not detected" is the mess I receive. But thro the same port the phone gets charged. The company and the dealer did not help. I found many users have the same problem. Can anybody suggest a remedy? —Preceding unsigned comment added by 59.92.30.56 (talk) 14:12, 10 March 2011 (UTC)
- You mean T-Com (part of T-Mobile), not E-Com? Sorry I can't help any. --Colapeninsula (talk) 15:20, 10 March 2011 (UTC)
- I suppose the port is active for other purposes, i.e. that other devices are detected when you plug them in? It's possible to have a port deactivated in BIOS or via other configuration settings, I know. Probably the first thing you thought of, though, I'd guess. Good luck. – OhioStandard (talk) 16:31, 10 March 2011 (UTC)
Can I run Sims 3 on this system
[edit]Intel(R) Pentium(R) D CPU 2.80GHz
1.2 GB Ram
Intel(R) 82865G Graphics Controller
Video ram: 96
3D : yes
Pixel shader NO
RahulText me 17:28, 10 March 2011 (UTC)
- Well considering the The Sims 3#Development article clearly says "support for Pixel Shader 2.0" I would say no (let's not even worry about how much worse then a FX 5900 or ATI 9500 the 865G is). Even modern IGPs are fairly weak in 3D, Intel integrated graphics chipsets in particularly have never been particularly good in 3D, and the 865G is very old now so really when it comes to any 3D game released in the past 3-4 years I wouldn't count on it even without looking at the requirements. Nil Einne (talk) 17:43, 10 March 2011 (UTC)
waererewraawer
[edit]hyw od omes eoplep erersev het ettlrse fo verey yllsblea? Hist rutyl akesm on enses hyw eoplep od hist? —Preceding unsigned comment added by 64.90.250.34 (talk) 17:44, 10 March 2011 (UTC)
- Checked - nothing on Google Scholar about this. If you have an example of a place where this is common, please refer to that. Otherwise, "why do people do...." is not a question that can be answered here. -- kainaw™ 17:47, 10 March 2011 (UTC)
- Might be related to this bit that gets tossed around the net now and then:
more info here: [1] SemanticMantis (talk) 18:53, 10 March 2011 (UTC)Arocdnicg to rsceearch at Cmabrigde Uinervtisy, it deosn’t mttaer in waht oredr the ltteers in a wrod are, the olny iprmoatnt tihng is taht the frist and lsat ltteer are in the rghit pcale. The rset can be a toatl mses and you can sitll raed it wouthit pobelrm. Tihs is buseace the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe.
- Note: That meme did not come from Cambridge. It was from a PhD candidate many years ago, but slowly changed to include Cambridge as it got forwarded over and over in emails. -- kainaw™ 19:06, 10 March 2011 (UTC)
CascadingDropDown problem
[edit]I found a way to modify the context key string of CascadingDropDown
in JavaScript, but now I'm facing a different problem. The actual context in the context key depends on text entered by the user, which isn't known yet when the page first loads. It was pretty easy to put the input into the context key of the CascadingDropDown
when it has been entered, but making the CascadingDropDown
act on it is more difficult. Changing the selection of the CascadingDropDown
's parent dropdown works, but I would want to avoid that. The only way seems to be to call the CascadingDropDown
's _onParentChange()
function directly, but having looked at its source code, it appears that the function intentionally aborts if it finds that the parent dropdown hasn't really changed. It appears that the only way is to modify the actual CascadingDropDown
source code so that it no longer does this. This poses two issues: (1) What if we, or our customers, suddenly decide to upgrade to a newer version of the AJAX Control Toolkit? This would break the hack. (2) Am I even allowed to do this, or does Microsoft have some nasty licence restriction that will get me in trouble for this? JIP | Talk 18:24, 10 March 2011 (UTC)
Parts of PDF print too pale to read
[edit]I want to print off this PDF http://www.re-bol.com/rebol.pdf in sections. But although the black text prints OK, the blue text prints too pale to read. Is there any way I could change it all to black text please, or otherwise make the blue text print darker? I am using Windows XP. Thanks 92.28.241.148 (talk) 21:24, 10 March 2011 (UTC)
- I have done this in the past by altering my print settings to print black & white only. This may not be what you want, but it has served my needs in the past. On my XP machine, with my printer, I do this by choosing "Print" as usual, then clicking the "Preferences" button, then clicking the "Paper/Quality" tab; then clicking "Black & White*. Comet Tuttle (talk) 21:52, 10 March 2011 (UTC)
Sorry I forgot to add that my printer is already set to do b&w; the colour cartridge ran out long ago. Is there any way of changing the whole PDF to black and white, for example? Thanks 92.24.186.163 (talk) 12:10, 11 March 2011 (UTC)
I've discovered that the problem was my printer setting having somehow changed itself from the default of printing in b&w, to printing in colour. Thanks 92.24.186.163 (talk) 13:58, 11 March 2011 (UTC)