Wikipedia:Reference desk/Archives/Computing/2009 October 26

Computing desk
< October 25 << Sep | October | Nov >> October 27 >
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.


October 26 edit

FrontPage edit

Is FrontPage (Extensions server side) compatible with Office FrontPage 2003 client? 71.100.9.185 (talk) 17:31, 26 October 2009 (UTC)[reply]

FrontPage 2003 prefers to publish using Windows SharePoint Services, but it can publish to a server running the 2002 FrontPage Server Extensions, but you won't necessarily be able to use all the built in features of FrontPage 2003. ZX81 talk 01:00, 27 October 2009 (UTC)[reply]

C Programming Question edit

#include<stdio.h>
void main()
{
  char s[]={'c','h','e','t','a'};
  char t[]={'k','u','m','a','r'};
  
  printf("%s",t);
  printf("%s",s);
return();
}

/*How the character is stored in stack and how this work in stack please specify '\0' also please send me detail. —Preceding unsigned comment added by R.K.Rahu (talkcontribs) 18:12, 26 October 2009 (UTC)[reply]

You want me to specify the null? Ok. Null.
Seriously, it looks like you are trying to learn how to use c strings. -- kainaw 19:26, 26 October 2009 (UTC)[reply]
I couldn't make head or tail out of your question. But anyway, your program won't even compile. return is a keyword, not a function, so what you have is actually not a call to "return()", but instead return returning "()", which is illegal C syntax. Fixing that, your program causes undefined behaviour, because you are calling printf() to print strings that aren't null-terminated. This causes printf() to happily tread past the end of your char arrays, searching for a null terminator, and it is looking for it in memory you don't own, thereby causing undefined behaviour. (Technically void main() is undefined behaviour too, but it works under most modern compilers. The missing null terminators, OTOH, are a very serious bug and will almost certainly crash your program.) The "" version of writing char arrays is a better idea. I'll leave it up to you to figure out why, on the chance this is homework. JIP | Talk 20:12, 26 October 2009 (UTC)[reply]
The problem here is that all strings in C and C++ need to be terminated with a zero byte (a 'null', a '\0' character). If you had declared your strings as:
 char s[]="cheta" ;
 char t[]="kumar" ;

...then the compiler would have supplied the null bytes automatically - but because you set the two arrays character-by-character, it doesn't do that...so doing it your way, but adding a zero byte by hand gives you:

 char s[]={'c','h','e','t','a', 0 };
 char t[]={'k','u','m','a','r', 0 };

...it's easier to do it the way I did it though - less chance of you forgetting the zero on the end - less typing - more legible!

And yeah - "return" isn't a function - you don't need the brackets. Just return; would have done just fine.

SteveBaker (talk) 03:11, 27 October 2009 (UTC)[reply]
"You don't need" is more like "you mustn't have", in other words, "needless" is more like "wrong". "return();" is illegal syntax in all C-derived languages I know of - C, C++, C# and Java. JIP | Talk 20:20, 27 October 2009 (UTC)[reply]
It appears that the instructor for this student is expecting the student to use '\0' for the null character, not just 0. Often, students are required to use specific terms to demonstrate that they know what they are doing. '\0' is clearly a character. 0 is a number. We know that they are the same. A learning student may be still in the "how the hell can something be a character and a number at the same time!?!?!?" phase. -- kainaw 03:52, 27 October 2009 (UTC)[reply]

Code for evaluating coefficients edit

I need to evaluate the coefficients of a polynomial expressed in factor form: f(x)= (x+A)(x+B)(x+C)...(x+Z). Here, A, B,..Z will be contained in an array P[] and the number of factors will be variable. Is there any libraries available to do this ? 218.248.80.114 (talk) 19:07, 26 October 2009 (UTC)[reply]

This is a common for loop homework problem. Use a for loop to iterate through the array. -- kainaw 19:29, 26 October 2009 (UTC)[reply]
Well, I dont think that finding the coefficient of nth power of x in f(x) will be possible by 'a' for loop..And this isn't a homework. Thanks. 218.248.80.114 (talk) 19:53, 26 October 2009 (UTC)[reply]
if you have f(x)= (x+A)(x+B)(x+C)...(x+Z) and you want to multiply out those factors so it's in the form f(x)=3x3 -9x2 +4x -6 and then report 3,-9,4,and -6 as coefficients, then that is indeed mostly a for loop. If you want to go the other way then polynomial factorization is the place to look. -- Finlay McWalterTalk 20:24, 26 October 2009 (UTC)[reply]

Color scheme on a mac is inverted edit

My school has a mac, dont know what type, but the color scheme is inverted, how do you undo it? —Preceding unsigned comment added by Accdude92 (talkcontribs) 19:18, 26 October 2009 (UTC)[reply]

Probably with Command-Option-Control-8. --Tardis (talk) 19:27, 26 October 2009 (UTC)[reply]

3D Buildings in Google Earth edit

hi, when i download a 3D building into google earth from the google 3D warehouse, save it etc, when i come back to it after a day or two closing down the computer it just goes gray and the rendering will not come back not matter what i do, refreshing, restarting google earth etc. Anyone know how to solve the problem? (Vista, latest g. earth)

thanks, --Abc26324 (talk) 19:50, 26 October 2009 (UTC)[reply]

Chinese spam edit

For the past few months, practically all the spam I've been getting is in the form of a fabricated online newsletter, with all the links pointing to some Chinese site (the domain name is always in the form www.something.cn). Is there any way I can set Evolution on Fedora Linux up to apply an automatic filter so that if the message contents contain the string ".cn", the message is automatically marked as junk mail? JIP | Talk 20:01, 26 October 2009 (UTC)[reply]

How to fine-tune Google? edit

This is a problem specifically related to the use of Google (UK) as a research tool for investigating places (especially villages) in England. If the name of a location, no matter how small, is supplied as the search term Google returns hundreds of pages that seem to be dynamically generated, each of which is a directory or advertising page of some type, such as florists, hairdressers, letting agencies, hotels, even when there are none at all at the location. It is often quite a trawl to find any results that are useful (to me). Is there any way at all of excluding these, or can you recommend a different search engine? Jan1naD (talkcontrib) 22:08, 26 October 2009 (UTC)[reply]

I presume you are looking for websites created locally by local people. I have the same problem constantly, that there are so many commercial link-strewn web pages that claim to be community sites but are not. My strategy using Search Engines would be to specify a domain name that corresponds to the name you are looking for (in Google you enter " Walberton site:walberton.* ") on the basis that a local community webmaster will have registered a relevant domain name ( like http://saltdean.info or http://badsey.net ). Of course, some of the time you will be swamped with other meanings of the place name. Another strategy would be to go to the web site of the relevant District Council and look for a page of links to parish council sites or local community bodies. Or do the same with the local newspaper. Sussexonian (talk) 10:01, 27 October 2009 (UTC)[reply]

hack a CD R-W drive? edit

Isn't there any possible way to read a CD and copy every bit and burn it as is onto another CD? This would bypass any copyprotect code and copy any CD format because it's copying the CD bit for bit. This probably breaks a few laws but it seems so simple to do. Any utilities out there? -- penubag  (talk) 23:19, 26 October 2009 (UTC)[reply]

I'm afraid it's not quite that simple. A lot of the time the "copy protection" is actually a physical media "defect" or a non-compliant CD format and copying all the data won't copy the actual errors with the CD itself. There's more information in this in our article CD/DVD_copy_protection. ZX81 talk 00:50, 27 October 2009 (UTC)[reply]
Or you can make an image of the original and burn it onto another CD as an image file. That way all the "defects" are preserved (with appropriate software), but it'd require a virtual drive mounting software. --antilivedT | C | G 04:31, 27 October 2009 (UTC)[reply]
Quite correct, antilived. Alcohol 120% is an example of such software that is actually aware of most types of copy protection, even physical ones. My mounting tool of preference would be Daemon Tools. Sandman30s (talk) 18:16, 27 October 2009 (UTC)[reply]

Just use something like UltraISO. Make a disk image from the CD, then burn it onto the new blank disk? —Preceding unsigned comment added by .isika (talkcontribs) 11:04, 27 October 2009 (UTC)[reply]

So according to antilived and sandman, it would work, and copy all the physical defects ZX81 mentioned?-- penubag  (talk) 08:20, 28 October 2009 (UTC)[reply]
It would appear so yes and I'm glad to have learnt something today! I knew that you could copy a CD including the "defects" to an image file and emulate the copy protection, but I was unaware it was actually possible to burn it back to a real disc (as per the original question). ZX81 talk 13:22, 29 October 2009 (UTC)[reply]
This won't work with most copy protection schemes because they're specifically designed to defeat it. -- BenRG (talk) 14:02, 29 October 2009 (UTC)[reply]

Ubuntu Live CD On USB edit

Is it possible to get a 'live CD' of Ubuntu (or other Linux) and run it from a USB without installing anything on my computer (Vista). The reason I don't want to install anything is because I don't want to partition my disk, only to find that I can't connect to the internet via wifi because Ubuntu (may) not recognize my wireless card. Therefore, what I am looking for is something that can be bootable from a USB and not take up any space on my PC (except perhaps for files saved - if that is at all possible). I have a 5GB USB stick. --KageTora - SPQW - (影虎) (talk) 23:26, 26 October 2009 (UTC)[reply]

You can certainly do that from within Ubuntu (USB Startup Disk Creator) if you have access to a machine with Ubuntu installed. Otherwise UNetbootin seems to be able to do what you want in Windows. --antilivedT | C | G 04:29, 27 October 2009 (UTC)[reply]

(kinda urgent!) Geocities pages still up..? edit

Hi. If any Geocities pages are still viewable, does it mean that they're from Geocities Plus users, or is there still some time left until all normal Geocities pages are wiped out? I want to know if I have to warn some people ASAP or not... --Kreachure (talk) 23:40, 26 October 2009 (UTC)[reply]

I'm sorry, but you're too late. Yes, the only pages that are left are Plus users, all "free" users were deactivated nearly 24 hours ago now. I appreciate it doesn't help you, but they did actually announce this back in April (example of a site that reported on it) ZX81 talk 00:45, 27 October 2009 (UTC)[reply]
Although it's too late to warn people, it looks like some free GeoCities websites are still available, though likely not for long. It's still the evening of October 26 where I am, and both my and my sister's free GeoCities websites are still available as of right now. --Bavi H (talk) 01:48, 27 October 2009 (UTC)[reply]
(My and my sister's websites are free Yahoo GeoCities websites with URLs of the form www.geocities.com/yahoo_id, not legacy GeoCities websites with neighborhood URLs, in case anyone is tracking GeoCities's demise and cares to distinguish between the two.) --Bavi H (talk) 02:03, 27 October 2009 (UTC)[reply]

Thanks. Kreachure (talk) 02:37, 27 October 2009 (UTC)[reply]

Don't forget to try the Internet Archive, and also search engines' cached versions of Geocities pages. -=# Amos E Wolfe talk #=- 09:30, 27 October 2009 (UTC)[reply]
(It's now the evening of October 27, and they're both gone now.) --Bavi H (talk) 23:25, 27 October 2009 (UTC)[reply]