Wikipedia:Reference desk/Archives/Computing/2008 October 17

From Wikipedia, the free encyclopedia
Computing desk
< October 16 << Sep | October | Nov >> October 18 >
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 17[edit]

Error[edit]

Sometimes, when I log into my computer, I get a message saying something like "This application failed to initialise properly (0c00000142). Click OK to terminate the application.". I do so, then the computer stops loading. How can I fix this problem? 58.165.17.100 (talk) 02:02, 17 October 2008 (UTC)[reply]

Excellent question. I have seen the same problem.
Best answer is that the application failing to start is Explorer.
I used to fix it by hitting control-alt-delete then using the FileRun command and typeing explorer.
Then I found out in a routine virus scan, a trojan horse. I had to back up all the data, and reinstall everything from scratch. I backed up the entire system, just after I installed the OS with the 134 updates. Then after I installed all the applications, I backed up the system again. Lo and behold, the trojan came back. Backed up the current data, reloaded the System backup with Applications, and The trojan is gone.
I would first check the integrity of the OS with a command. ( Ill post it here later)
Then make sure you have all the updates for your computer installed.
It may be time to reload your operating system. Like me, if you do you should
Backup the drive after you get all of the OS loaded and
Backup the drive after you get all of your applications loaded.
You now have a temporary fix, and the path for a more permanent fix. Best of luck. 99.185.0.29 (talk) 06:15, 18 October 2008 (UTC)--[reply]
OK. Big secret here: I use firefox almost excusesivly, and my IE homepage is set for
[1]
It turned up this article about re-installing Internet Explorer, which I think you might be able to save yourself some time.
[2]
Please follow up. 99.185.0.29 (talk) 06:23, 18 October 2008 (UTC)--[reply]

HTML question[edit]

The code <h1>ABC</h1><h4>ABC</h4> puts the first ABC on a different line than the second ABC.

Is there code that will create the font size difference without creating a line break? Thanks. Wanderer57 (talk) 03:29, 17 October 2008 (UTC)[reply]

Don't use h# codes to create font differences. They are for headers. There are ways to make them stop making a line break but if all you want is font size changes there are better ways to do that, like this: <font size=+2>ABC</font><font size=-1>ABC</font>. --98.217.8.46 (talk) 03:33, 17 October 2008 (UTC)[reply]
Specifically, H tags are Header tags - they're kind of like in books, where the text splits and some bold text provides like a mini-chapter title/break? So of course they'd be on their own lines. HTML tags *shouldn't* describe how things look - it should describe how things flow ("these are paragraphs, this is a headline, this is separate from that..."). Of course, since we tend to make all things of a category look the same (for example, chapter titles all tend to be larger then chapter *text*) the association works there. To get to the point, try using CSS (although previous responder's text also works). Something like <SPAN style="font-weight: bold;">ABC</SPAN> would be along the lines of what you're looking for. I highly recommend w3.org and browse to the HTML 4.0 and CSS 1.0 standards (as starting points). 98.169.163.20 (talk) 03:47, 17 October 2008 (UTC)[reply]
<span style="font-size: 20pt">20pt text</span><span style="font-size: 14pt">14pt text</span> --wj32 t/c 22:52, 17 October 2008 (UTC)[reply]
<h1 style="display: inline;">ABC</h1><h4 style="display: inline;">ABC</h4> --70.254.87.166 (talk) 03:26, 18 October 2008 (UTC)[reply]

Mediawiki template problem[edit]

I'm trying to make a template on some other wiki that provides a convenient way to add a link to Wikipedia. My current code is this:

<includeonly>
[http://en.wikipedia.org/wiki/{{{1}}} {{{2|{{{1}}} }}}]
</includeonly>
<noinclude>
Includes a link to Wikipedia.

Usage: <nowiki>{{wp|page title|optional:link-text}}</nowiki&rt;

Appearance: {{Wp|Hello}}
</noinclude>

But it returns an extra trailing space and newline that cause formatting problems such as this:

This is some random content. This is

more random content.

This is a new paragraph.

What am I doing wrong here? And what's this thing on Wikipedia like in Template:imdb title? --antilivedT | C | G 04:22, 17 October 2008 (UTC)[reply]

I'm fairly certain that interwiki-links to wikipedia are installed by default in mediawiki. Try making a link like this: [[wikipedia:Some wikipedia article]]. You can set these up according to this guide Belisarius (talk) 05:18, 17 October 2008 (UTC)[reply]
As for the trailing space, I don't know a lot about mediawiki templates, but have you tried putting the <noincludes> on the same line as the relevant portion of the template? That might be causing it to insert a space (I have no idea, really, but it's my best guess Belisarius (talk) 05:21, 17 October 2008 (UTC)[reply]
Hmm never knew Mediawiki has that by default, guess that renders my template a bit useless. But still I'm curious on why it does the trailing space thing. You mean having <noinclude>Includes a link to Wikipedia. instead of my current code? Nope, still gives me the trailing space. --antilivedT | C | G 05:42, 17 October 2008 (UTC)[reply]
I believe the line breaks are being included as part of the content. A common technique in template definitions is to wrap the newlines into comments like:
<includeonly><!--
-->[http://en.wikipedia.org/wiki/{{{1}}} {{{2|{{{1}}} }}}]<!--
--></includeonly><!--
--><noinclude>
...
This is equivalent to:
<includeonly>[http://en.wikipedia.org/wiki/{{{1}}} {{{2|{{{1}}} }}}]</includeonly><noinclude>
...
Hope this helps. -- Tcncv (talk) 05:52, 17 October 2008 (UTC)[reply]
Ahh ok adding the comments solved the problem. Thanks a lot. --antilivedT | C | G 06:19, 18 October 2008 (UTC)[reply]

assigning variables in class declaration (outside methods)[edit]

I found out it's possible in JAVA and C# (I don't think in C++). But has the class to be static? If not, are the assignments performed by the constructor? T.I.A. --Ulisse0 (talk) 08:42, 17 October 2008 (UTC)[reply]

In C#, you can assign values to class variables outside of the constructor. The end result is that it is assigned in the class constructor. If the class variable is static, then it is assigned when the class gets loaded into memory (at least that's my guess). If the whole class is static there is no class constructor. --wj32 t/c 08:58, 17 October 2008 (UTC)[reply]
Initializers for instance fields in Java are executed and assigned to the fields before the body of the constructor is run. So it is kind of as if the assignments are performed at the beginning of every constructor. Initializers for static fields are executed and assigned when the class is loaded. I don't understand what you mean by a "class" being "static". C++ also has a mechanism for initializing members, but it is syntactically and semantically different; the initializers for bases and members in C++ are placed after the arguments and before the body; I will not go into the full details of that here. --Spoon! (talk) 09:05, 17 October 2008 (UTC)[reply]
Thank you both! In C# a class can be declared static, indicating that it contains only static members. I don't think this syntax exists in Java. --Ulisse0 (talk) 09:13, 17 October 2008 (UTC)[reply]
For the record, in Java that syntax exists but instead denotes a non-inner member class which isn't associated with any instance of its containing class. --Tardis (talk) 16:55, 20 October 2008 (UTC)[reply]

HTML form: unchecked value[edit]

How do I set a default unchecked value for a checkbox so if I left it unchecked, it returns something such as '0'?

value = "1" only sets the checked value.

If there's no way to do it in HTML, I can work out a clumsy PHP solution. -- Toytoy (talk) 09:39, 17 October 2008 (UTC)[reply]

This link [3] has a solution to your exact problem. —Preceding unsigned comment added by 129.188.33.26 (talk) 16:37, 17 October 2008 (UTC)[reply]

moving websites[edit]

More and more websites have moving parts on them such as GIF animations. They irritate me and hinder my visual concentration. Is there some way to "freeze" a website when I just want to read the text? --Lova Falk (talk) 10:30, 17 October 2008 (UTC)[reply]

If you use firefox there is an extension you can get that disables many adverts which should significantly cut down on the gifs and flash files you see. It is called Adblock plus, and I'd link you to it but my college firewall blocks the google search, but googling it will give you a link. 88.211.96.3 (talk) 11:01, 17 October 2008 (UTC)[reply]

For your convenience, here is a link. -=# Amos E Wolfe talk #=- 12:10, 17 October 2008 (UTC)[reply]
In firefox hiting the Escape key will freeze all gif animations. I don't know about flash-based animations.APL (talk) 13:56, 17 October 2008 (UTC)[reply]
You could use a Firefox plug-in like Flashblock to kill any flash animations you don't explicitly click on. APL (talk) 13:58, 17 October 2008 (UTC)[reply]
Thank you all so much!!! I downloaded adblockplus and it works like a dream. Calm sites for sore eyes. Thank you! Lova Falk (talk) 09:19, 18 October 2008 (UTC)[reply]

Skype[edit]

How can one edit/delete interlocutor's message in Skype? 89.236.214.174 (talk) 11:39, 17 October 2008 (UTC)[reply]

Thunderbird Junk[edit]

How do I set Thunderbird to automatically send all my junk mail to my junk folder? I have set my junk filters, but I still get the mail, only with a green basket next to them. Do I always have to do it manually?--ChokinBako (talk) 14:04, 17 October 2008 (UTC)[reply]

In the "properties" sheet for the specific account, in the "junk settings" section, check "move new junk messages to" box and pick the destination. -- Finlay McWalter | Talk 14:13, 17 October 2008 (UTC)[reply]
Yes, but I've done that. It is not automatic, though, i.e. when mail arrives it doesn't just go in there anyway. I have to 'run junk mail controls', each time I get some. I'm asking how to get it done automatically.--ChokinBako (talk) 14:34, 17 October 2008 (UTC)[reply]
Whoops, OK, my bad. Thanks!--ChokinBako (talk) 14:37, 17 October 2008 (UTC)[reply]

Is the open source Java spelling API "Jazzy" dead? What about the alternatives?[edit]

Resolved

Is the open source Java spelling package Jazzy [4] project dead, it seems to have had no activity since 2005?

What are the alternatives like? Has anyone used JOrtho [5]?

Update: I have found a web page[6] detailing the statuses and options and giving another alternative. -- Q Chris (talk) 15:28, 18 October 2008 (UTC)[reply]

Sync phone with Google Calendar[edit]

How do I synchronize my Nokia 3220 with Google Calendar? I've tried Gcalsync and Icalsync, but both tell me my phone isn't supported. (I can't do it through a PC, because I don't have a Pop-Port cable and the phone doesn't have Wi-Fi or Bluetooth.) NeonMerlin 14:46, 17 October 2008 (UTC)[reply]

If you have unlimited texting, a low-tech, stop gap solution would be to have Google send you text notifications. Not even close to perfect an answer, though. :( Kushal (talk) 17:40, 17 October 2008 (UTC)[reply]

Youtube Insight demographic and gender identification[edit]

How does Youtube's Insight determine the age and gender of a viewer? I am amazed how the data in this [7] was collected ... Any ideas? Kushal (talk) 15:27, 17 October 2008 (UTC)[reply]

I THINK you can choose a gender when you create an account. Dendodge|TalkContribs 15:33, 17 October 2008 (UTC)[reply]
How would that be representative of the vast number of viewers who Google can identify only by IP address? Kushal (talk) 17:41, 17 October 2008 (UTC)[reply]
Same way that any polling service works. Polls aren't taken of an entire group; a small sample is taken that's large enough to represent a good cross-section of the group, but small enough to actually work with. Polls for determining public opinion about the government, for example, only take the opinions of a few hundred (or thousand) people, not all how many ever million there are in a country. --Alinnisawest,Dalek Empress (extermination requests here) 17:57, 17 October 2008 (UTC)[reply]
You specify your gender and age (or you don't, or you lie) when you create an account. The Insight program would be more accurate if it had a "unknown" possibility. --140.247.240.69 (talk) 18:33, 17 October 2008 (UTC)[reply]
But if anyone lies, I'm sure they always get caught. Dar-Ape 05:06, 18 October 2008 (UTC)[reply]

scjp1.5 certification[edit]

i got certified two months bac but havnt received the certicate yet.where do they mail it from?.Is it from America or any other country? —Preceding unsigned comment added by 59.93.5.47 (talk) 17:16, 17 October 2008 (UTC)[reply]

Java problem[edit]

I'm trying to draw a grid of images but for some odd reason I can't even draw two images properly...

Here's my code:

Grid.java

 package test;
 
 import java.awt.event.WindowAdapter;
 import java.awt.event.WindowEvent;
 
 import javax.swing.JFrame;
 
 public class Grid {
 	public static void main(String[] args) {
 		JFrame f = new JFrame("Grid");
 		
 		f.addWindowListener(new WindowAdapter(){
 			public void windowClosing(WindowEvent e) {
 				System.exit(0);
 			}
 		});
 		
 		f.add(new Cell("/path/to/test.png", 0, 0));
 		f.add(new Cell("/path/to/test.png", 64, 0));
 		f.pack();
 		f.setVisible(true);
 		f.setSize(320, 240);
 	}
 }

Cell.java

 package test;
 
 import java.awt.*;
 import java.awt.event.*;
 import java.awt.image.*;
 import java.io.*;
 import javax.imageio.*;
 import javax.swing.*;
 
 public class Cell extends Component {
 	private BufferedImage img;
 	private int x;
 	private int y;
 	private Dimension size=new Dimension();
 	
 	public void paint(Graphics g) {
 		g.drawImage(this.img, this.x, this.y, this);
 	}
 	
 	public Cell(String url, int x, int y) {
 		try {
 			this.img = ImageIO.read(new File(url));
 		}
 		catch (IOException e) {
 			//?
 		}
 		
 		this.x=x;
 		this.y=y;
 		this.size.setSize(this.img.getWidth(), this.img.getHeight());
 	}
 	
 	public Dimension getPreferredSize() {
 		return this.size;
 	}
 }

However, when I run the program, it only displays the image at (64,0) - it doesn't display the image at (0,0): http://img413.imageshack.us/img413/5954/pandora004jx6.png

Does anyone know why?

Thanks in advance. x42bn6 Talk Mess 16:13, 17 October 2008 (UTC)[reply]

You're not using the LayoutManager properly. You don't set one, so the JFrame defaults to having a java.awt.BorderLayout(). If you .add() something to a BorderLayout without an additional constraint, it gets put in the centre position. You're adding two things, so the second one gets put in the centre too, hiding the first one. So, before your two f.add() calls, call f.setLayout(new GridLayout(3,3)); -- Finlay McWalter | Talk 17:51, 17 October 2008 (UTC)[reply]
Generally speaking, you may find java specific forums ([8], [9]) to be more helpful than this RD with program analysis questions. Dar-Ape 05:01, 18 October 2008 (UTC)[reply]
I know, but I knew it was something really stupid and I didn't want to bother registering. Thanks, anyway. x42bn6 Talk Mess 10:00, 18 October 2008 (UTC)[reply]

Home Network - Extension from question above[edit]

A question above got me thinking. Is it possible to have a home network without access to internet? I have a router (and I do have internet), but let's just say I didn't have internet (or the phone line that came with it), but just the hole in the wall where the telephone goes, a router, and two PCs. Would this be possible, like a sort of intranet?--ChokinBako (talk) 18:02, 17 October 2008 (UTC)[reply]

Sure, the internet connection just allows systems connected to your router to talk to other machines. Pull out your phone cable and you have an isolated intranet. Note that if you only have two PCs you can connect them together directly (if they're reasonably modern) without the router altogether (although you need to manually take care of setting their IP addressing info, something that is often done automatically by the internet router). -- Finlay McWalter | Talk 18:11, 17 October 2008 (UTC)[reply]

previewing pages in Internet Explorer[edit]

Is there any easy way to see how a page will render in Internet Explorer 6 and 7 without actually running IE6 or IE7? I'm on a Mac so it's really a pain to have to boot up a virtualizer or another computer to see how my pages will (poorly) render in IE. (Firefox is pretty consistent across platforms.) I'd love it if there was some sort of clever program or webpage that could duplicate IE's many flaws in a way that I could just say "show me how this looks in IE6/7" without all the hassle of actually having IE on a computer. (The other difficulty is that I have IE7 on my virtualizer so I have to actively seek out machines with IE6 on them to see what it looks like too, as it doesn't look like I can install IE6 and IE7 at the same time?). Any ideas? --140.247.240.69 (talk) 18:25, 17 October 2008 (UTC)[reply]

Upload it to a temporary online location (one hidden from normal view) and use http://browsershots.org/ -- Finlay McWalter | Talk 18:29, 17 October 2008 (UTC)[reply]
Re running IE6 and 7 on the same machine/virtual machine - I use IETester for this — Matt Eason (Talk &#149; Contribs) 22:02, 17 October 2008 (UTC)[reply]
You can also use the Firefox extension IEtab, but only if you're already on windows :/ Dar-Ape 04:56, 18 October 2008 (UTC)[reply]
You can install multiple versions of IE on the same computer using this installer, which isolates each version with its own DLLs, and seems to be a pretty good simulation. (Although I wouldn't trust it for testing complex JavaScript, for instance). - IMSoP (talk) 16:08, 18 October 2008 (UTC)[reply]

Location of Mac system updates when downloading/Privilege problems in System Update[edit]

I'm trying to update to Mac OSX 10.5.5, listed in Software Update as "Mac OS X Update Combined." Before it has had any time to download (never mind install), I get the error:

"The update “Mac OS X Update Combined” can’t be saved. You do not have appropriate access privileges. The Installer package has been moved to the Trash. To try again, open the package from the Finder."

Thing is, it's not in the trash, and I am an admin. What can I do about this? It has downloaded part of the update earlier today, can I go and delete the remains?

My name is anetta (talk) 18:33, 17 October 2008 (UTC)[reply]

I don't know how to fix this problem, but try downloading it from Apple's website [10]. This is also useful if the install crashes half-way (as it did for me). --wj32 t/c 22:50, 17 October 2008 (UTC)[reply]
Nice problem. You are admin, and you have admin priveldges, but the updater doesn't think so? Time to boot your computer from its install disk, and run a full check permissions.
Remember the GOAL is to have the updater run all the way through with out errors. ( i.e. download the file, and run the updater until it says 'Updater sucessfull' 99.185.0.29 (talk) 06:19, 18 October 2008 (UTC)--[reply]

Onyx will check and fix permissions for you.--ChokinBako (talk) 10:40, 18 October 2008 (UTC)[reply]

You cannot install Mac OS X Update on this volume. This volume does not meet the requirements for this update. ...is what I get after downloading it manually. Even though it's a brand new installation, and the "About this Mac" lists it is 10.5.5. It would be nice to know the requirements for the update, but this [11] doesn't say what it needs.My name is anetta (talk) 16:06, 18 October 2008 (UTC) And there's 28GB of free space.My name is anetta (talk) 16:38, 18 October 2008 (UTC)[reply]

That was interesting. It seems to work now. Why it has decided to work, I don't know - but it has, and I am quite happy with that. Thanks wj32, 99.185.0.29 and ChokinBako for your efforts. My name is anetta (talk) 14:17, 19 October 2008 (UTC)[reply]