Wikipedia:Reference desk/Archives/Computing/2009 August 8

= August 8 =

Context T9?
Do any existing T9 predictive text entry systems take previous words into account to help decide which word is most likely (e.g. interpret 46 as "in" if the previous word is "come", but as "go" if it's "let's")? Neon Merlin  06:03, 8 August 2009 (UTC)


 * As far as I know, most predictive text systems only use lexical analysis, so they don't do any analysis on the syntax level. They certainly could, but it'd drastically increase the size of the "dictionary" database, since the developers would have to add data about which words would be likely to follow or precede each word in the dictionary. Right now, size of the predictive text engine might be more important than relevance of word suggestions, but that'll probably change as phone memory keeps increasing. Just my two cents; there are probably lots of opinions. Indeterminate (talk) 10:57, 8 August 2009 (UTC)

No-cost spreadsheets that reference data by name rather than by cell address?
I understand that Lotus Improv, Javelin of Javelin Software, and Quantrix could do this, although Quantrix is the only one still available. Are there any freeware or other no-cost spreadsheets that can do this please? 84.13.197.233 (talk) 15:02, 8 August 2009 (UTC)
 * Would the ability to name addresses do ie naming A1 as "tax" and then being able to use tax as a variable? Both calc and excell can do this. (calc is the free one)  (You could put the variable cells somewhere 'off to one side'..)83.100.250.79 (talk) 15:17, 8 August 2009 (UTC)

Master Pages in InDesign
When I create a 10 page document in CS3 for the PC, I place a text frame into the master page. I want to see an editable text field in each of the pages I can flow text into. However, when I go to the document, although the pages pallette tells me each page has a text frame (the little blue dotted line) none of the text boxes are selectable. Obviously I can select them in the master page, but if I type anything in, the text will appear on each page.

So how do I get editable text boxes. The master page text frames were created in the Doc Setup dialogue with the Master Text Frame option, so don't bother suggesting that!

Thanks

80.229.160.127 (talk) 17:05, 8 August 2009 (UTC)


 * You're using master pages wrong, me thinks. You can't create an element on a master page and then edit it when you are out of master pages. Master pages are for things like page numbers, headings at the top of each page, etc. They aren't for putting editable text fields, they aren't for putting things that vary with each page. I don't use Master Text Frame myself; googling it shows it to be a somewhat curious and tempermental feature, which might be related to your problem as well. --98.217.14.211 (talk) 18:06, 8 August 2009 (UTC)


 * So if I make a document with 100 pages, I have to draw a new text box for each one? 80.229.160.127 (talk) 19:54, 8 August 2009 (UTC)


 * Hi. Just hold down the the CTRL and SHIFT keys while double-clicking on the frame with the type tool, and you will be able to type into each frame individually.--IndexOutOfBounds (talk) 22:19, 8 August 2009 (UTC)


 * Ah, I should have known it would be something like that. Although none of them threaded, I still had to load them all individually, but no great chore, I suppose. Thanks 80.229.160.127 (talk) 01:12, 9 August 2009 (UTC)

php ereg_replace
I'm looking for a way to convert a string into a html self link using the php "ereg_replace" expression. So for example, if I wanted to convert: --link

into

--link

where "link" can be anthing, such as

--cats

and it will convert to:

--cats

Thanks so much for your help! —Preceding unsigned comment added by 82.43.91.128 (talk) 17:12, 8 August 2009 (UTC)
 * It would probably help if you can guarantee that the "link" is always followed by a space or newline or something - can be assume a space> —Preceding unsigned comment added by 83.100.250.79 (talk) 19:38, 8 August 2009 (UTC)
 * I don't know PHP, but the regex (in Perl) you would be:

s,--(\w+), --$1,g;
 * so it's probably similar. That assumes "anything" means alphanumeric characters plus underscore.  --Sean 20:28, 8 August 2009 (UTC)


 * I've just tried and it doesn't work :( But thank you anyway. I'm really clueless with php, if someone with some php knowledge could convert this to php or something I would be eternally grateful —Preceding unsigned comment added by 82.43.91.128 (talk) 23:53, 8 August 2009 (UTC)
 * I don't really know PHP, not sure if \w even works on PHP
 * I think quotes need to be 'escaped' eg \"
 * string$ is the string$ containing your html file..
 * This will only replace the first instance, I think the function ereg_replace returns 0 if it didn't find a string to match. So you might need to do it several times in a loop until the function=0 - if so this creates a problem since it will be attempting to replace the second --name after the href.
 * I think it will be something like this:(corrected 3 times)

while ( ereg ( "--(\w+)", string$ ) ) { string% = ereg_replace ( "--(\w+)", "--\\1" , string$ ); }


 * The while replaces all the instances of --name (several times in a loop until the function=0)
 * this may create a problem since it will be attempting to replace the second --name after the href. If this is the case you need to do something like this:

ereg_replace ( "--(\w+)", "GG\\1" , string$ ) for all instances of --name, followed by a second loop of: ereg_replace ( "GG(\w+)", "--\\1" , string$ ) for all instances of GGname (if you don't do this you can see why it can go wrong)


 * Surely someone will be along soon who knows PHP, what I suggest it experimenting, and building up until you can do the whole thing eg start with try seeing if you can replace "--file" with "--newfile" and build up from there. Remember that PHP doesn't do "lazy matching" (see manual), also get a PHP manual (online somewhere) and check the control codes it uses for regular expressions.83.100.250.79 (talk) 00:23, 9 August 2009 (UTC)

OK, I'll be the "someone who knows PHP", since I program it for a living.
 * 1) As the user above says, reading the manual can be a good head-start. In PHP's case, go to php.net; there are often useful tips from other programmers on the "notes" section on each page. A handy trick is that any function can be looked up by going to php.net/some_function - e.g. php.net/ereg_replace.
 * 2) PHP has (at least) 2 regular expression engines. I would recommend you use the PCRE ("Perl-Compatible Regular Expressions") functions, which are often faster and more powerful than the "POSIX Extended" type. It's possible, though unlikely, that older versions of PHP won't have the PCRE regex module installed, but in the latest version the POSIX functions have been marked as deprecated.

Using the PCRE function (preg_replace), your code would be something like this: Where the pattern  means "match 2 dashes, then 1 or more 'word' characters, capturing the word characters" and the replacement string   references the captured characters as.

The equivalent using  would be this: Where the only real differences are that there's no handy "word" short-hand, so I've put in the equivalent  (which would work for PCRE as well), and the format for backreferences is   rather than.

Hope this helps. -- IMSoP (talk) 18:14, 9 August 2009 (UTC)
 * YES!!! That's perfect! THANK YOU!

Yes, thanks, it was starting to niggle me what the answer was too :) I've added a resolved tag

I use the Windows OpenGL function  to create characters to display in my three-dimensional world. However, it takes more than one second for the function to return. Is there any faster way to draw three-dimensional text in OpenGL in Windows? --Andreas Rejbrand (talk) 17:33, 8 August 2009 (UTC)


 * You could try calling GetGlyphOutline and converting to 3D yourself. The WINE source of wglUseFontOutlines might be helpful. -- BenRG (talk) 10:59, 9 August 2009 (UTC)


 * Yes, that might be a way to achieve better performance. --Andreas Rejbrand (talk) 19:42, 9 August 2009 (UTC)

HP Pavilion dv6386: Forgot BIOS logon password
I have forgotten the BIOS logon password on my HP Pavilion dv6386 computer. I have tried to disconnect the CMOS battery for a few seconds, but then I was surprised to learn that the computer's BIOS still remembered the password. Perhaps the password is stored in a non-volatile memory, or there might be third power source somewhere. Or, perhaps it wasn't the CMOS battery I disconnected, after all (although it sure looked like a battery...). Is there anything I can do? I am afraid that HP has been careful to design a secure system, so there might not be much to do. --Andreas Rejbrand (talk) 17:45, 8 August 2009 (UTC)
 * This page says remove the battery for 700 seconds - maybe it's worth trying again.83.100.250.79 (talk) 18:30, 8 August 2009 (UTC)
 * The same page also mentions 'master bios passwords' - probably time to ring up HP (or the bios maker)?83.100.250.79 (talk) 18:31, 8 August 2009 (UTC)
 * If you still get stuck it's worth mentioning - the motherboard manufacturer, and the bios manufacturer.
 * There's a lot of advice via "bios forgotten password" search, but all mostly useless with out knowing the bios type.83.100.250.79 (talk) 18:36, 8 August 2009 (UTC)
 * Unplug the system, remove the laptop battery if relevant, and remove the button battery on the motherboard for like 15 minutes and your BIOS password will have been removed. You won't need to contact the manufacturer. Rjwilmsi  08:46, 9 August 2009 (UTC)
 * I will try to have the battery disconnected for a longer time. Thanks. --Andreas Rejbrand (talk) 19:41, 9 August 2009 (UTC)
 * To help make it go a little faster, disconnect all those things, then hit the power button. This should force anything that's holding power to drain a lot faster, but I'd say you should wait a minimum of 5-10 minutes. 63.135.50.109 (talk) 22:30, 9 August 2009 (UTC)
 * Yes, I always do that. --Andreas Rejbrand (talk) 23:49, 9 August 2009 (UTC)
 * Now I disconnected the battery for half an hour, and the BIOS forgot everything! Thank you! --Andreas Rejbrand (talk) 14:53, 10 August 2009 (UTC)

.NET Framework SDK Folder
I'm running Windows Vista and I have the .NET Framework v3.5 with SP1. I seen a lot of sites talk about different tools and resources in C:\Program Files\Microsoft.NET\FrameworkSDK or some location like that. The thing is though I cannot find it. Can someone tell me where it is located, if I need to install something extra, or if the location of the resources has been changed and they've been moved. --Melab±1 &#9742; 20:13, 8 August 2009 (UTC)
 * The chance is that you have the ".net runtime", which lets you run ".net" programs, but not the ".net software developement kit" which lets you create programs as well. For free you can get http://www.microsoft.com/express/ "visual studio express edition", or pay and get a more expensive version.
 * There are also separate products for c++, c# etc. which you can download.
 * (aside - I know you have Vista)If you're on XP there's a chance you don't have the .net framework either - it can be got via windows update, but if you download the sdk it's automatically included.83.100.250.79 (talk) 20:24, 8 August 2009 (UTC)
 * Microsoft Visual Studio83.100.250.79 (talk) 20:30, 8 August 2009 (UTC)
 * alternatively just do a search for "SDK" to see if it's in there. (I mean search your hard disk drive using the search tool) 83.100.250.79 (talk) 20:37, 8 August 2009 (UTC)
 * I did but it didn't find it. --Melab±1 &#9742; 01:19, 9 August 2009 (UTC)
 * You need to download one of the Microsoft Visual Studio development kits then, if you want access to it.83.100.250.79 (talk) 01:21, 9 August 2009 (UTC)


 * See . --wj32 t/c 06:16, 9 August 2009 (UTC)

Windows Mobile Open Source or not?
Please resolve a dispute between friends! Rixxin (talk) 22:53, 8 August 2009 (UTC)


 * No, it's not; see Windows Mobile. Bar a few odds-and-sods, nothing Microsoft has produced is open source, and WM is becoming one of their crown jewels, something they're going to keep a tight grip on. Google's Android system, an equivalent to WM, is a combination of open source and free software. -- Finlay McWalter • Talk 23:30, 8 August 2009 (UTC)