From Wikipedia, the free encyclopedia
Computing desk
< March 12 << Feb | March | Apr >> March 14 >
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 13 Information

Error Flash.ocx

A message keeps comming up on my computer that says ERROR "Could not find file flash.ocx" it is driving me crazy because it comes up every ten minutes, I click "ok" or X to close it but it keeps comming back. Anybody know how to make it stop??-- ChesterMarcol 00:58, 13 March 2007 (UTC) reply

You may need to re-install Flash [1]. —The preceding unsigned comment was added by Splintercellguy ( talkcontribs) 01:50, 13 March 2007 (UTC). reply
It could be that the OCX just isn't registered. If the file is on your machine (usually C:\WINDOWS\system32\Macromed\Flash) go to Start then Run and type cmd and press enter. Then type:
 regsvr32 C:\WINDOWS\system32\Macromed\Flash\Flash.ocx
That should be the ocx registered. If you still have problems, or the ocx isn't on your machine, then reinstalling Flash as Splintercellguy suggested should be enough to fix it. Johnnykimble 11:31, 13 March 2007 (UTC) reply

net.net

How come when you go to the domain name "net.net" [2], it just has a blank page with the text "This space intentionally left blank"? What is the purpose of this mysterious website? -- Candy-Panda 05:34, 13 March 2007 (UTC) reply

I suspect it's probably a reserved domain like the ones in rfc 2606 -- froth t 06:49, 13 March 2007 (UTC) reply
www.example.org is a good example of this. Johnnykimble 10:16, 13 March 2007 (UTC) reply
Could just be a joke or something... Think outside the box 11:31, 13 March 2007 (UTC) reply
Whois says it's registered to GoDaddy, who then sub-registered it to domains by proxy. Domains by Proxy won't say who is ultimately behind this mysterious message. The Internet Archive shows it was previously used mainly as link farms. In short, there's nothing special about the domain, it's probably just under construction or something. -- h2g2bob 18:04, 13 March 2007 (UTC) reply

What's going on with the RealVNC website? -- froth t 07:14, 13 March 2007 (UTC) reply

I dunno. Maybe they forgot to pay their bills? -- Spoon! 07:51, 13 March 2007 (UTC) reply

Whiule you await their website you could look at tightvnc or ultraVNC. GB 01:45, 14 March 2007 (UTC) reply

Disabled network adapters

After going through several VMware products, I'm flooded with a dozen different "tunneling adapters" when I do ipconfig /all. They're listed as "Disabled" and I don't see them in the windows network connections applet. How do I remove them altogether? -- froth t 08:07, 13 March 2007 (UTC) reply

Are they listed in the device manager under 'Network Adapters'? Johnnykimble 11:16, 13 March 2007 (UTC) reply
IPconfig /release should do it. Here's what the help says:
> ipconfig /release *Con* ... release all matching connections,
eg. "Local Area Connection 1" or
"Local Area Connection 2"
JoshHolloway 17:50, 13 March 2007 (UTC) reply
They're not listed under Network Adapters, and /release only releases the IP address for that connection, it doesn't remove the connection entirely -- froth t 18:14, 13 March 2007 (UTC) reply
Figured it out. In case anyone's curious: http://www.tech-recipes.com/windows_installation_tips504.html -- froth t 18:52, 13 March 2007 (UTC) reply

System Requirements for Ubuntu

What are the minimum (and recommended) system requirements for running Ubuntu (the latest version 6.10). I have an old computer that my younger sister uses so I need an OS that is very simple to use and similar enough to the Windows environment that she is familiar with. If I remember correctly, its system specifications are Pentium III 486MHz Processor, 256MB RAM and 40GB Hard Drive. I'd guess that it also has Integrated Graphics and Sound. -- AMorris (talk) (contribs) 10:21, 13 March 2007 (UTC) reply

That should be adequate, based on experience and also from this Ubuntu Installation Guide. Ayecee 10:29, 13 March 2007 (UTC) reply
It should basicaly work on anything, i got it to run on my old computer that ran Microsoft 98 se -- jake 01:25, 16 March 2007 (UTC) reply
Consider Xubuntu, a distribution based on the lighter Xfce environment. -- Ouro ( blah blah) 07:01, 14 March 2007 (UTC) reply

advanatges and disadvantages of for loop in java programming

what are the advantages and disadvantages of for loop in java programming? 202.53.8.210 12:48, 13 March 2007 (UTC) reply

Advantages: Can count intrinsically, very fast iteration, all-in-one loop structure.
Disadvantages: It doesn't do your homework for you.
Droud 12:57, 13 March 2007 (UTC) reply

While I agree this is probably a homework question, one of disadvantages may be that when you write the code, you may accidentaly make it an infinite loop. If you meant to write:

    for(int i = 1; i > -5; i--)
         {
              System.out.println(i);
         }

and you accidentaly wrote:

    for(int i = 1; i > -5; i++)
         {
              System.out.println(i);
         }

The latter would be an exampel of an infinate loop because the integer i is 1 and will always be greater than -5 if you count up for each iteration. And when you see that the CMD window is going crazy and you never get the prompt to press any key, you have to move your mouse to the x and exit out the window. I eally don't believe that this is a major disadvantage as the advantages far outwiegh it. If you wated to write the same code without a for loop, you be looking at something like this:

    int 1 = 1;
    
    System.out.println(i);
    
    i = i - 1;                   // or i--
    
    System.out.println(i);
    
    i = i - 1;
    
    System.out.println(i);
    
    i = i - 1;
    
    System.out.println(i);
    
    i = i - 1;
    
    System.out.println(i);
    
    i = i - 1;
    
    System.out.println(i);
    
    i = i - 1;
    
    System.out.println(i);


As you can see it is MUCH easier to write the for loop than have to write it over and ovr and over again. Just imagine if you had to make it in the 100's or something liek that. There. Even though I'm on Spring Break, I still do people's homework for them... 14:21, 13 March 2007 (UTC)

You've simply described the utility of iteration in general, not the particular advantages of using the for construct. -- mattb @ 2007-03-13T14:27Z
Don't forget that the syntax of the for construct itself can be quite useful in certain cases:
 for (StringTokenizer st = new StringTokenizer("Some String"); st.hasMoreTokens(); System.out.println(st.nextToken()));
That's a rather extreme case where the body of the for loop is empty, but when enumerating through records or performing some similar operation, a for loop can be used in place of a while loop. This use though is normally more a matter of style than anything else. Johnnykimble 15:42, 13 March 2007 (UTC) reply

A nice trick is making an infinite loop with for (;;). -- h2g2bob 16:59, 13 March 2007 (UTC) reply

I don't know about Java, but FOR loops in C are excellent ways of keeping tidy your variable declaring sections. Don't want to make a bunch of variables you'll never use later? Just make them in your FOR loop, keep them local, then forget about them. - Wo o ty  Woot?  contribs 03:55, 14 March 2007 (UTC) reply

I think a problem with this question is that there are two kinds of for loops in Java. There is of course the for that was mentioned above, and there is also the enhanced for loop. But obviously since the questioner didn't make the distinction, I don't think there is a issue in ambiguity. I'll go hide back in my hole now. -- Ķĩřβȳ Ťįɱé Ø 04:19, 14 March 2007 (UTC) reply

Well, in most languages, foreach application, there's an appropriate looping construct ;-).
Atlant 12:27, 14 March 2007 (UTC) reply

Best Note-Taking Program, take two

I got some answers when I asked this question a couple days ago, but after I responded with another question, attention seemed to wane. So I'm asking that second question again. Are there any suggestions for a (hopefully free) note-taking program that might include in-document links (so that I could click, say, on "Napoleon" in my notes and it would take me to the section I had designated), easy timelines, simple formatting, all for WINDOWS XP? Thanks, Sashafklein 15:13, 13 March 2007 (UTC) reply

In Microsoft Word 2003 onwards (and maybe before that, not sure) you can add comments - will this suffice? Insert -> Comment :). You can add links and text etc to a line or a single word/paragraph. JoshHolloway 17:47, 13 March 2007 (UTC) reply

The best way to take notes is to just have one big text file. You can edit it in vi or MS Word or whatever you feel comfortable in. Everything will be in one place you won't lose, it will be easy to move from computer to computer, it's easy to backup, easy to search, etc. I've done this for years, and never regretted it. -- TotoBaggins 22:42, 13 March 2007 (UTC) reply

Way to not answer the question at all! -- 24.147.86.187 01:56, 14 March 2007 (UTC) reply

Whats the best home console?

Whats the best home console? —The preceding unsigned comment was added by 209.7.9.211 ( talk) 16:00, 13 March 2007 (UTC). reply

Subjective though this question is...For me it would be the PS2. I suspect that once I upgrade to a next-gen it will be the PS3, however many will argue the great games/power of Xbox and Nintendo's Wii are better than a PS3. You could say a PC is the best as it is upgradeable/can play thousands of games and can be used for other things besides computing. I would choose a PS3 if I had the money (indeed if it was released in my country), but it is personal preference - nothing more. ny156uk 17:19, 13 March 2007 (UTC) reply
Windows Power Shell! At least, that's what I thought you meant by console. Johnnykimble 17:39, 13 March 2007 (UTC) reply
You're kidding right? -- froth t 18:18, 13 March 2007 (UTC) reply
Bash doesn't let me at the .Net CLR. So no! Johnnykimble 18:40, 13 March 2007 (UTC) reply
I've used powershell and I've found its insistence on object-oriented everything is incredibly frustrating and counter-productive. Once you learn the idiosyncrasies and tricks of bash it's much more efficient than a type-consistent shell could ever be. Also what's the appeal of .NET for you? It's an interesting deployment model and microsoft has some phenomenal development tools for it but it slows things down and the MSIL middleman is hardly portable across anything but x86 to amd64.. all the prewritten code doesn't seem worth the efficiency hit. Heck, even the C++ standard library is more efficient -- froth t 18:48, 13 March 2007 (UTC) reply
It's my job! I'm a developer on a large enterprise application for Microsoft environments. I understand your point if you're writing embedded software or maybe some small application with only a few thousand source files, but when you see huge clients that have been developed over a number of years in C++ and compare them with newer ones written in C++ or C# .net, I think the benefits are fairly obvious. Johnnykimble 19:12, 13 March 2007 (UTC) reply
Actually I have to agree that the Monad ilk is pretty darn cool (doubleplusgood if you're a .NET developer). It's a shell for programmers rather than Unix neckbeards and doesn't make you want to gouge your eyes out like that other "shell for programmers". Anyway, there's no excuse not to use the lovely Z shell if free *nix and Bourne syntax is your thing... -- mattb @ 2007-03-13T21:15Z
I'm in complete agreement as well. As someone who learned programming using object-orientated languages (well, I started using qBASIC, but I moved on pretty quickly), the more OO the better. I think Windows Power Shell has some really fantastic ideas, and they've implemented it well. I love bash, but it is getting somewhat dated nowadays, and Windows Power Shell rethinks those concepts marvelously. Oskar 15:13, 14 March 2007 (UTC) reply
Bah, that's the kind of thinking that's making 7-CD game installs. There are better ways of managing a lot of code than putting it all in libraries -- froth t 06:32, 14 March 2007 (UTC) reply
You seem to be against the notion of abstraction layers in general. You know, there's more to programming than code density and speed. As was pointed out last time you made a comment like this, abstraction generally increases productivity and reduces development cost for many applications. The notion that it's cost-effective to write all software in assembly (or C for that matter) is ridiculous. It's equally silly to discount the utility of libraries just because it's faster to pull all the byte code you need into one big blob. -- mattb @ 2007-03-14T16:05Z
Of course it's more cost-effective and easier to use C#, but Real Programmers don't write in FORTRAN.. er C#. -- froth t 16:43, 14 March 2007 (UTC) reply
If you're willing to go back in time a bit I recommend the N64, which has many of the video games that have been considered the greatest ever. The PS2 has guitar hero and final fantasy. The gamecube has metriod prime and zelda- my personal fav system for that generation. The xbox has.. basically nothing good that PC doesn't also have, especially since Halo 2 will be released for vista in 2 weeks. The best value for your money is definately the PC (and if you have a lot of it you can get a PC that lets you play games that look much better than any next-gen console game) but if you can't afford one then I recommend an older game system like N64 or even super nintendo. The next-generation systems are ridiculously expensive and I see nothing that I want- the wii is an absurd idea (I still can't figure out why people buy it), the ps3 is laughably expensive, and the xbox360 is an imitation-PC. At the very least wait for the prices to go down and some actual games to come out. -- froth t 18:41, 13 March 2007 (UTC) reply
The best console right now is anything with a 8800GTX ;) - Wo o ty  Woot?  contribs 19:34, 13 March 2007 (UTC) reply
What's absurd about the Wii? I think it's a great console. The question here is really too braod, you have to give at least a little insight of what you want. Do you share the system with your kids? Do you want multiplayer? Are you a serious gamer? The device which I have played the most, not even a console, is the nintendo DS! It sold heaps of units and there are heaps of great games for it, you can keep it in your pocket and play it anywhere. Vespine 21:55, 13 March 2007 (UTC) reply
Personally I tend to buy consoles a generation or two behind. I'm not a big fan of spending US$50 for a videogame.. Being a little behind the times won't buy you much nerd cred, but my Super Nintendo games are still every bit as fun as they were fifteen years ago (yikes, has it been that long?!?). Heck, I have a Pacman machine that is still every bit as fun to play as it was when it dominated the arcade industry. -- mattb @ 2007-03-13T22:05Z
I think it's absurd because of the controller- motion control is a stupid idea. Apparently it sells so nintendo made the right move, but they lost me as a customer -- froth t 06:18, 14 March 2007 (UTC) reply
Hey don't knock it till you try it! Mix Lord 06:59, 19 March 2007 (UTC) reply

Saving Video

How do i save streaming video from the net onto my comp if there is no option such as save. Like from sites like utube etc. Just that i want to have some trailers available offline. Do i have to go into temporary internet files and do something? —The preceding unsigned comment was added by 61.95.191.49 ( talk) 17:17, 13 March 2007 (UTC). reply

It depends on how the video is streamed.
For Windows/Quicktime/Real streaming, there's a list of software that can do download them here. VLC media player is one free one that can save these. [3] -- Interiot 18:11, 13 March 2007 (UTC) reply
This question should be in the FAQ or something, it gets asked every couple of weeks. Vespine 21:50, 13 March 2007 (UTC) reply
Loads of tools will get you .flv's from YouTube - UnPlug, Ook video ook, Javamoya, Videodownloader, Youtube-dl, Vixy,... the list goes on forever. -- h2g2bob 07:21, 14 March 2007 (UTC) reply
Safari's nice extension is called [4]CosmoPod. I have my preferences set so it downloads the .flv, but also converts it to mpg Mαc Δαvιs ( How's my driving?) ❖ 19:22, 14 March 2007 (UTC) reply

Statistics on Use of Traditional Browsers vs. Mobile Devices for Simple Web Transactions

Would appreciate statistics (by geographic regions if possible) on use of traditional browsers (laptop, desktop) vs. mobile devices for simple web transactions such as text messaging. —The preceding unsigned comment was added by Jessjas ( talkcontribs) 17:25, 13 March 2007 (UTC). reply

Office 2007

Hi! I have a serial key of office 2007 full version. I used it to convert my trial version to a full version but had to recover my laptop due to something and thus install offive again. Now when i use the key, it says that the number of attempts of this key has expired. Do i have to buy a new key or can i do something like search in my registry and do something? —The preceding unsigned comment was added by 61.95.191.49 ( talk) 17:28, 13 March 2007 (UTC). reply

If you bought the key legitimately you can call Microsoft and they'll fix it for you. Vespine 21:48, 13 March 2007 (UTC) reply
If it were me I would download a crack and serial off of TPB and disallow office internet access. But that could be too risky for you. Mαc Δαvιs ( How's my driving?) ❖ 19:21, 14 March 2007 (UTC) reply
Oh is that's what's going on with my installation? I think my iso might have the crack built in.. wireshark says that every 45 seconds or so my computer sends a dozen office activation requests to nowhere -- froth t 12:10, 15 March 2007 (UTC) reply

Getting rid of "Wireless network connection is now connected" bubble

Is there any way to disable the stupid "Wireless network connection is now connected" bubble that pops up from the wireless connection icon in the system tray? It pops up every time I start my laptop from sleep/hibernate and doesn't go away until I click it. I don't want to get rid of the icon, just the connection notification. Cheers — Matt Eason ( Talk &#149; Contribs) 17:42, 13 March 2007 (UTC) reply

There's no way you can disable the balloon notification if you have the icon enabled; however, it might be possible to stop the network card hibernating along with the rest of your hardware during sleep mode. I don't have a wireless adapter myself, so if there's no obvious Windows option to do this, you might find one in the BIOS which you can usually get to by pressing F2 or DEL when your computer is starting up. Be careful changing settings in the BIOS though, don't change anything you're not familiar with. As far as I'm aware, wireless adapters on laptops use a lot of battery power, so if you did stop the adapter powering down during hibernation, you might find you're battery usage during hibernation to be higher than normal. Johnnykimble 17:54, 13 March 2007 (UTC) reply

Microsoft PowerPoint (or generally, Office) measurement units

I have Microsoft Office. Specifically, PowerPoint. I'm making a project in PowerPoint, but the idiotic program measures everything in inches (which is not conducive to a sprite comic). I searched in vain for a way to convert it to pixels, but could find none. And this is a general question, about Microsoft Office in general. Thanks for your help (I hope this question wasn't too badly written). 69.81.50.3 22:00, 13 March 2007 (UTC) reply

Head to your windows control panel, select regional settings, find the tab with regional options, click customise, click the numbers tab, and change the measurement system to metric. Thats for XP, for other windows some of these steps will be omitted. Apply all the change and restart powerpoint. GB 01:37, 14 March 2007 (UTC) reply

Um, the metric system is not the same thing as pixel counts, at all. -- 24.147.86.187 01:52, 14 March 2007 (UTC) reply
I don't think PowerPoint can work in terms of pixels, as it considers slides to be "pages" (as would be printed in a printer) and because of this works in terms of DPI settings, and so the pixel count will hypothetically change with every computer you use it on. Now I don't to be totally useless here and cast aspersions on the whole project, but why are you trying to use PowerPoint for this? It is not the sort of thing it will be very good at -- personally I would make the whole thing in Photoshop or something similar and then import the final files into Powerpoint. But that's just me!-- 24.147.86.187 01:52, 14 March 2007 (UTC) reply

Plotting Titration Curves

I have some titration data I collected in a lab and would like to use it to add a proper titration curve to the Titration article. Everything I did is in Excel, but I'm not sure if taking screenshots of a graph in it is the best way to do things, are there any free graphing utilities that are usable in Windows that could give me a better plot, maybe even export to SVG? Atropos235 23:12, 13 March 2007 (UTC) reply

This question was originally posted at Wikipedia:Reference desk/Science#Plotting Titration Curves. -- JWSchmidt 23:21, 13 March 2007 (UTC) reply


From Excel you can export the file to HTML. The chart will turn up as a .gif image in a subdirectory. From here you can open the picture in the Microsoft office picture manager, or pixia or other picture editor and export it or save it as .png format which is acceptable to Wikipedia. In the past I also used PowerPoint for this purpose as it can save directly to .png format. You can copy and past the chart to PowerPoint. GB 01:28, 14 March 2007 (UTC) reply

Converting the graph in Excel to a raster image is trivial for me, I would like to make it look better than Excel can, and/or save it in a vector graphics file. Atropos235 01:46, 14 March 2007 (UTC) reply


Getting Excel graphs into SVG is very hard. You can copy and paste it into Illustrator, or you can re-create the graph and export it as SVG in OpenOffice, but in both cases you will have to do a lot of editing since neither look very good. So at the moment... not a whole lot better than just making a raster of it, unless you are willing to basically re-draw most of it. -- 24.147.86.187 01:51, 15 March 2007 (UTC) reply

Creating code

Hi, I want to learn how to create code (pref. C++), like to start a program on my computer at a set time, but i can't find anywere to go on the internet, could someone please help me? -- 210.54.78.132 03:33, 15 March 2007 (UTC) reply

There's time(), which returns the number of seconds since the Unix epoch. To find out what that is for any date or time, use mktime(). Do searches for time.h (the C header file for this), this looks a good site. To run the command, system() is easy (there are newer alternatives tho). If you're looping all the time try putting sched_yield() in the loop (which will lessen the processor time it uses) and/or renice the process. -- h2g2bob 10:07, 16 March 2007 (UTC) reply
From Wikipedia, the free encyclopedia
Computing desk
< March 12 << Feb | March | Apr >> March 14 >
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 13 Information

Error Flash.ocx

A message keeps comming up on my computer that says ERROR "Could not find file flash.ocx" it is driving me crazy because it comes up every ten minutes, I click "ok" or X to close it but it keeps comming back. Anybody know how to make it stop??-- ChesterMarcol 00:58, 13 March 2007 (UTC) reply

You may need to re-install Flash [1]. —The preceding unsigned comment was added by Splintercellguy ( talkcontribs) 01:50, 13 March 2007 (UTC). reply
It could be that the OCX just isn't registered. If the file is on your machine (usually C:\WINDOWS\system32\Macromed\Flash) go to Start then Run and type cmd and press enter. Then type:
 regsvr32 C:\WINDOWS\system32\Macromed\Flash\Flash.ocx
That should be the ocx registered. If you still have problems, or the ocx isn't on your machine, then reinstalling Flash as Splintercellguy suggested should be enough to fix it. Johnnykimble 11:31, 13 March 2007 (UTC) reply

net.net

How come when you go to the domain name "net.net" [2], it just has a blank page with the text "This space intentionally left blank"? What is the purpose of this mysterious website? -- Candy-Panda 05:34, 13 March 2007 (UTC) reply

I suspect it's probably a reserved domain like the ones in rfc 2606 -- froth t 06:49, 13 March 2007 (UTC) reply
www.example.org is a good example of this. Johnnykimble 10:16, 13 March 2007 (UTC) reply
Could just be a joke or something... Think outside the box 11:31, 13 March 2007 (UTC) reply
Whois says it's registered to GoDaddy, who then sub-registered it to domains by proxy. Domains by Proxy won't say who is ultimately behind this mysterious message. The Internet Archive shows it was previously used mainly as link farms. In short, there's nothing special about the domain, it's probably just under construction or something. -- h2g2bob 18:04, 13 March 2007 (UTC) reply

What's going on with the RealVNC website? -- froth t 07:14, 13 March 2007 (UTC) reply

I dunno. Maybe they forgot to pay their bills? -- Spoon! 07:51, 13 March 2007 (UTC) reply

Whiule you await their website you could look at tightvnc or ultraVNC. GB 01:45, 14 March 2007 (UTC) reply

Disabled network adapters

After going through several VMware products, I'm flooded with a dozen different "tunneling adapters" when I do ipconfig /all. They're listed as "Disabled" and I don't see them in the windows network connections applet. How do I remove them altogether? -- froth t 08:07, 13 March 2007 (UTC) reply

Are they listed in the device manager under 'Network Adapters'? Johnnykimble 11:16, 13 March 2007 (UTC) reply
IPconfig /release should do it. Here's what the help says:
> ipconfig /release *Con* ... release all matching connections,
eg. "Local Area Connection 1" or
"Local Area Connection 2"
JoshHolloway 17:50, 13 March 2007 (UTC) reply
They're not listed under Network Adapters, and /release only releases the IP address for that connection, it doesn't remove the connection entirely -- froth t 18:14, 13 March 2007 (UTC) reply
Figured it out. In case anyone's curious: http://www.tech-recipes.com/windows_installation_tips504.html -- froth t 18:52, 13 March 2007 (UTC) reply

System Requirements for Ubuntu

What are the minimum (and recommended) system requirements for running Ubuntu (the latest version 6.10). I have an old computer that my younger sister uses so I need an OS that is very simple to use and similar enough to the Windows environment that she is familiar with. If I remember correctly, its system specifications are Pentium III 486MHz Processor, 256MB RAM and 40GB Hard Drive. I'd guess that it also has Integrated Graphics and Sound. -- AMorris (talk) (contribs) 10:21, 13 March 2007 (UTC) reply

That should be adequate, based on experience and also from this Ubuntu Installation Guide. Ayecee 10:29, 13 March 2007 (UTC) reply
It should basicaly work on anything, i got it to run on my old computer that ran Microsoft 98 se -- jake 01:25, 16 March 2007 (UTC) reply
Consider Xubuntu, a distribution based on the lighter Xfce environment. -- Ouro ( blah blah) 07:01, 14 March 2007 (UTC) reply

advanatges and disadvantages of for loop in java programming

what are the advantages and disadvantages of for loop in java programming? 202.53.8.210 12:48, 13 March 2007 (UTC) reply

Advantages: Can count intrinsically, very fast iteration, all-in-one loop structure.
Disadvantages: It doesn't do your homework for you.
Droud 12:57, 13 March 2007 (UTC) reply

While I agree this is probably a homework question, one of disadvantages may be that when you write the code, you may accidentaly make it an infinite loop. If you meant to write:

    for(int i = 1; i > -5; i--)
         {
              System.out.println(i);
         }

and you accidentaly wrote:

    for(int i = 1; i > -5; i++)
         {
              System.out.println(i);
         }

The latter would be an exampel of an infinate loop because the integer i is 1 and will always be greater than -5 if you count up for each iteration. And when you see that the CMD window is going crazy and you never get the prompt to press any key, you have to move your mouse to the x and exit out the window. I eally don't believe that this is a major disadvantage as the advantages far outwiegh it. If you wated to write the same code without a for loop, you be looking at something like this:

    int 1 = 1;
    
    System.out.println(i);
    
    i = i - 1;                   // or i--
    
    System.out.println(i);
    
    i = i - 1;
    
    System.out.println(i);
    
    i = i - 1;
    
    System.out.println(i);
    
    i = i - 1;
    
    System.out.println(i);
    
    i = i - 1;
    
    System.out.println(i);
    
    i = i - 1;
    
    System.out.println(i);


As you can see it is MUCH easier to write the for loop than have to write it over and ovr and over again. Just imagine if you had to make it in the 100's or something liek that. There. Even though I'm on Spring Break, I still do people's homework for them... 14:21, 13 March 2007 (UTC)

You've simply described the utility of iteration in general, not the particular advantages of using the for construct. -- mattb @ 2007-03-13T14:27Z
Don't forget that the syntax of the for construct itself can be quite useful in certain cases:
 for (StringTokenizer st = new StringTokenizer("Some String"); st.hasMoreTokens(); System.out.println(st.nextToken()));
That's a rather extreme case where the body of the for loop is empty, but when enumerating through records or performing some similar operation, a for loop can be used in place of a while loop. This use though is normally more a matter of style than anything else. Johnnykimble 15:42, 13 March 2007 (UTC) reply

A nice trick is making an infinite loop with for (;;). -- h2g2bob 16:59, 13 March 2007 (UTC) reply

I don't know about Java, but FOR loops in C are excellent ways of keeping tidy your variable declaring sections. Don't want to make a bunch of variables you'll never use later? Just make them in your FOR loop, keep them local, then forget about them. - Wo o ty  Woot?  contribs 03:55, 14 March 2007 (UTC) reply

I think a problem with this question is that there are two kinds of for loops in Java. There is of course the for that was mentioned above, and there is also the enhanced for loop. But obviously since the questioner didn't make the distinction, I don't think there is a issue in ambiguity. I'll go hide back in my hole now. -- Ķĩřβȳ Ťįɱé Ø 04:19, 14 March 2007 (UTC) reply

Well, in most languages, foreach application, there's an appropriate looping construct ;-).
Atlant 12:27, 14 March 2007 (UTC) reply

Best Note-Taking Program, take two

I got some answers when I asked this question a couple days ago, but after I responded with another question, attention seemed to wane. So I'm asking that second question again. Are there any suggestions for a (hopefully free) note-taking program that might include in-document links (so that I could click, say, on "Napoleon" in my notes and it would take me to the section I had designated), easy timelines, simple formatting, all for WINDOWS XP? Thanks, Sashafklein 15:13, 13 March 2007 (UTC) reply

In Microsoft Word 2003 onwards (and maybe before that, not sure) you can add comments - will this suffice? Insert -> Comment :). You can add links and text etc to a line or a single word/paragraph. JoshHolloway 17:47, 13 March 2007 (UTC) reply

The best way to take notes is to just have one big text file. You can edit it in vi or MS Word or whatever you feel comfortable in. Everything will be in one place you won't lose, it will be easy to move from computer to computer, it's easy to backup, easy to search, etc. I've done this for years, and never regretted it. -- TotoBaggins 22:42, 13 March 2007 (UTC) reply

Way to not answer the question at all! -- 24.147.86.187 01:56, 14 March 2007 (UTC) reply

Whats the best home console?

Whats the best home console? —The preceding unsigned comment was added by 209.7.9.211 ( talk) 16:00, 13 March 2007 (UTC). reply

Subjective though this question is...For me it would be the PS2. I suspect that once I upgrade to a next-gen it will be the PS3, however many will argue the great games/power of Xbox and Nintendo's Wii are better than a PS3. You could say a PC is the best as it is upgradeable/can play thousands of games and can be used for other things besides computing. I would choose a PS3 if I had the money (indeed if it was released in my country), but it is personal preference - nothing more. ny156uk 17:19, 13 March 2007 (UTC) reply
Windows Power Shell! At least, that's what I thought you meant by console. Johnnykimble 17:39, 13 March 2007 (UTC) reply
You're kidding right? -- froth t 18:18, 13 March 2007 (UTC) reply
Bash doesn't let me at the .Net CLR. So no! Johnnykimble 18:40, 13 March 2007 (UTC) reply
I've used powershell and I've found its insistence on object-oriented everything is incredibly frustrating and counter-productive. Once you learn the idiosyncrasies and tricks of bash it's much more efficient than a type-consistent shell could ever be. Also what's the appeal of .NET for you? It's an interesting deployment model and microsoft has some phenomenal development tools for it but it slows things down and the MSIL middleman is hardly portable across anything but x86 to amd64.. all the prewritten code doesn't seem worth the efficiency hit. Heck, even the C++ standard library is more efficient -- froth t 18:48, 13 March 2007 (UTC) reply
It's my job! I'm a developer on a large enterprise application for Microsoft environments. I understand your point if you're writing embedded software or maybe some small application with only a few thousand source files, but when you see huge clients that have been developed over a number of years in C++ and compare them with newer ones written in C++ or C# .net, I think the benefits are fairly obvious. Johnnykimble 19:12, 13 March 2007 (UTC) reply
Actually I have to agree that the Monad ilk is pretty darn cool (doubleplusgood if you're a .NET developer). It's a shell for programmers rather than Unix neckbeards and doesn't make you want to gouge your eyes out like that other "shell for programmers". Anyway, there's no excuse not to use the lovely Z shell if free *nix and Bourne syntax is your thing... -- mattb @ 2007-03-13T21:15Z
I'm in complete agreement as well. As someone who learned programming using object-orientated languages (well, I started using qBASIC, but I moved on pretty quickly), the more OO the better. I think Windows Power Shell has some really fantastic ideas, and they've implemented it well. I love bash, but it is getting somewhat dated nowadays, and Windows Power Shell rethinks those concepts marvelously. Oskar 15:13, 14 March 2007 (UTC) reply
Bah, that's the kind of thinking that's making 7-CD game installs. There are better ways of managing a lot of code than putting it all in libraries -- froth t 06:32, 14 March 2007 (UTC) reply
You seem to be against the notion of abstraction layers in general. You know, there's more to programming than code density and speed. As was pointed out last time you made a comment like this, abstraction generally increases productivity and reduces development cost for many applications. The notion that it's cost-effective to write all software in assembly (or C for that matter) is ridiculous. It's equally silly to discount the utility of libraries just because it's faster to pull all the byte code you need into one big blob. -- mattb @ 2007-03-14T16:05Z
Of course it's more cost-effective and easier to use C#, but Real Programmers don't write in FORTRAN.. er C#. -- froth t 16:43, 14 March 2007 (UTC) reply
If you're willing to go back in time a bit I recommend the N64, which has many of the video games that have been considered the greatest ever. The PS2 has guitar hero and final fantasy. The gamecube has metriod prime and zelda- my personal fav system for that generation. The xbox has.. basically nothing good that PC doesn't also have, especially since Halo 2 will be released for vista in 2 weeks. The best value for your money is definately the PC (and if you have a lot of it you can get a PC that lets you play games that look much better than any next-gen console game) but if you can't afford one then I recommend an older game system like N64 or even super nintendo. The next-generation systems are ridiculously expensive and I see nothing that I want- the wii is an absurd idea (I still can't figure out why people buy it), the ps3 is laughably expensive, and the xbox360 is an imitation-PC. At the very least wait for the prices to go down and some actual games to come out. -- froth t 18:41, 13 March 2007 (UTC) reply
The best console right now is anything with a 8800GTX ;) - Wo o ty  Woot?  contribs 19:34, 13 March 2007 (UTC) reply
What's absurd about the Wii? I think it's a great console. The question here is really too braod, you have to give at least a little insight of what you want. Do you share the system with your kids? Do you want multiplayer? Are you a serious gamer? The device which I have played the most, not even a console, is the nintendo DS! It sold heaps of units and there are heaps of great games for it, you can keep it in your pocket and play it anywhere. Vespine 21:55, 13 March 2007 (UTC) reply
Personally I tend to buy consoles a generation or two behind. I'm not a big fan of spending US$50 for a videogame.. Being a little behind the times won't buy you much nerd cred, but my Super Nintendo games are still every bit as fun as they were fifteen years ago (yikes, has it been that long?!?). Heck, I have a Pacman machine that is still every bit as fun to play as it was when it dominated the arcade industry. -- mattb @ 2007-03-13T22:05Z
I think it's absurd because of the controller- motion control is a stupid idea. Apparently it sells so nintendo made the right move, but they lost me as a customer -- froth t 06:18, 14 March 2007 (UTC) reply
Hey don't knock it till you try it! Mix Lord 06:59, 19 March 2007 (UTC) reply

Saving Video

How do i save streaming video from the net onto my comp if there is no option such as save. Like from sites like utube etc. Just that i want to have some trailers available offline. Do i have to go into temporary internet files and do something? —The preceding unsigned comment was added by 61.95.191.49 ( talk) 17:17, 13 March 2007 (UTC). reply

It depends on how the video is streamed.
For Windows/Quicktime/Real streaming, there's a list of software that can do download them here. VLC media player is one free one that can save these. [3] -- Interiot 18:11, 13 March 2007 (UTC) reply
This question should be in the FAQ or something, it gets asked every couple of weeks. Vespine 21:50, 13 March 2007 (UTC) reply
Loads of tools will get you .flv's from YouTube - UnPlug, Ook video ook, Javamoya, Videodownloader, Youtube-dl, Vixy,... the list goes on forever. -- h2g2bob 07:21, 14 March 2007 (UTC) reply
Safari's nice extension is called [4]CosmoPod. I have my preferences set so it downloads the .flv, but also converts it to mpg Mαc Δαvιs ( How's my driving?) ❖ 19:22, 14 March 2007 (UTC) reply

Statistics on Use of Traditional Browsers vs. Mobile Devices for Simple Web Transactions

Would appreciate statistics (by geographic regions if possible) on use of traditional browsers (laptop, desktop) vs. mobile devices for simple web transactions such as text messaging. —The preceding unsigned comment was added by Jessjas ( talkcontribs) 17:25, 13 March 2007 (UTC). reply

Office 2007

Hi! I have a serial key of office 2007 full version. I used it to convert my trial version to a full version but had to recover my laptop due to something and thus install offive again. Now when i use the key, it says that the number of attempts of this key has expired. Do i have to buy a new key or can i do something like search in my registry and do something? —The preceding unsigned comment was added by 61.95.191.49 ( talk) 17:28, 13 March 2007 (UTC). reply

If you bought the key legitimately you can call Microsoft and they'll fix it for you. Vespine 21:48, 13 March 2007 (UTC) reply
If it were me I would download a crack and serial off of TPB and disallow office internet access. But that could be too risky for you. Mαc Δαvιs ( How's my driving?) ❖ 19:21, 14 March 2007 (UTC) reply
Oh is that's what's going on with my installation? I think my iso might have the crack built in.. wireshark says that every 45 seconds or so my computer sends a dozen office activation requests to nowhere -- froth t 12:10, 15 March 2007 (UTC) reply

Getting rid of "Wireless network connection is now connected" bubble

Is there any way to disable the stupid "Wireless network connection is now connected" bubble that pops up from the wireless connection icon in the system tray? It pops up every time I start my laptop from sleep/hibernate and doesn't go away until I click it. I don't want to get rid of the icon, just the connection notification. Cheers — Matt Eason ( Talk &#149; Contribs) 17:42, 13 March 2007 (UTC) reply

There's no way you can disable the balloon notification if you have the icon enabled; however, it might be possible to stop the network card hibernating along with the rest of your hardware during sleep mode. I don't have a wireless adapter myself, so if there's no obvious Windows option to do this, you might find one in the BIOS which you can usually get to by pressing F2 or DEL when your computer is starting up. Be careful changing settings in the BIOS though, don't change anything you're not familiar with. As far as I'm aware, wireless adapters on laptops use a lot of battery power, so if you did stop the adapter powering down during hibernation, you might find you're battery usage during hibernation to be higher than normal. Johnnykimble 17:54, 13 March 2007 (UTC) reply

Microsoft PowerPoint (or generally, Office) measurement units

I have Microsoft Office. Specifically, PowerPoint. I'm making a project in PowerPoint, but the idiotic program measures everything in inches (which is not conducive to a sprite comic). I searched in vain for a way to convert it to pixels, but could find none. And this is a general question, about Microsoft Office in general. Thanks for your help (I hope this question wasn't too badly written). 69.81.50.3 22:00, 13 March 2007 (UTC) reply

Head to your windows control panel, select regional settings, find the tab with regional options, click customise, click the numbers tab, and change the measurement system to metric. Thats for XP, for other windows some of these steps will be omitted. Apply all the change and restart powerpoint. GB 01:37, 14 March 2007 (UTC) reply

Um, the metric system is not the same thing as pixel counts, at all. -- 24.147.86.187 01:52, 14 March 2007 (UTC) reply
I don't think PowerPoint can work in terms of pixels, as it considers slides to be "pages" (as would be printed in a printer) and because of this works in terms of DPI settings, and so the pixel count will hypothetically change with every computer you use it on. Now I don't to be totally useless here and cast aspersions on the whole project, but why are you trying to use PowerPoint for this? It is not the sort of thing it will be very good at -- personally I would make the whole thing in Photoshop or something similar and then import the final files into Powerpoint. But that's just me!-- 24.147.86.187 01:52, 14 March 2007 (UTC) reply

Plotting Titration Curves

I have some titration data I collected in a lab and would like to use it to add a proper titration curve to the Titration article. Everything I did is in Excel, but I'm not sure if taking screenshots of a graph in it is the best way to do things, are there any free graphing utilities that are usable in Windows that could give me a better plot, maybe even export to SVG? Atropos235 23:12, 13 March 2007 (UTC) reply

This question was originally posted at Wikipedia:Reference desk/Science#Plotting Titration Curves. -- JWSchmidt 23:21, 13 March 2007 (UTC) reply


From Excel you can export the file to HTML. The chart will turn up as a .gif image in a subdirectory. From here you can open the picture in the Microsoft office picture manager, or pixia or other picture editor and export it or save it as .png format which is acceptable to Wikipedia. In the past I also used PowerPoint for this purpose as it can save directly to .png format. You can copy and past the chart to PowerPoint. GB 01:28, 14 March 2007 (UTC) reply

Converting the graph in Excel to a raster image is trivial for me, I would like to make it look better than Excel can, and/or save it in a vector graphics file. Atropos235 01:46, 14 March 2007 (UTC) reply


Getting Excel graphs into SVG is very hard. You can copy and paste it into Illustrator, or you can re-create the graph and export it as SVG in OpenOffice, but in both cases you will have to do a lot of editing since neither look very good. So at the moment... not a whole lot better than just making a raster of it, unless you are willing to basically re-draw most of it. -- 24.147.86.187 01:51, 15 March 2007 (UTC) reply

Creating code

Hi, I want to learn how to create code (pref. C++), like to start a program on my computer at a set time, but i can't find anywere to go on the internet, could someone please help me? -- 210.54.78.132 03:33, 15 March 2007 (UTC) reply

There's time(), which returns the number of seconds since the Unix epoch. To find out what that is for any date or time, use mktime(). Do searches for time.h (the C header file for this), this looks a good site. To run the command, system() is easy (there are newer alternatives tho). If you're looping all the time try putting sched_yield() in the loop (which will lessen the processor time it uses) and/or renice the process. -- h2g2bob 10:07, 16 March 2007 (UTC) reply

Videos

Youtube | Vimeo | Bing

Websites

Google | Yahoo | Bing

Encyclopedia

Google | Yahoo | Bing

Facebook