Wikipedia:Reference desk/Archives/Computing/2006 September 11

< September 10 Computing desk archive September 12 >
Humanities Science Mathematics Computing/IT Language Miscellaneous 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 at one of the pages linked to above.
< August September October >


September 11

edit

Visual Basic 6, INet control, and firewalls

edit

Hi,

I have created a program on Visual Basic 6 that uses an INet control, both to load the source code from webpages, and to upload pages to a server. Although the program works fine with all firewalls disabled, a number of firewalls (including the Windows Firewall) block key functions of the program, but only partially. For example, Norton stops the control loading all of the source code, cutting it off part way through, and a number of firewalls stop the INet control making uploads to the server, in one case allowing the program to delete the file it was supposed to be overwriting, but then not allowing it to replace the file with the new one. While the program works with all firewalls disabled, this is obviously not a very workable solution. I have tried adding the program to the allow lists of the firewalls etc., but this does not solve the problem. Does anyone have any suggestions?

Thanks. TomPhil 00:07, 11 September 2006 (UTC)[reply]

Some fire wall programs will block traffic on all ports except for ports that you have given explicit permission. I suggest trying different values for the LocalPort and RemotePort properties of the control and see if you get the same results. One possible solution would be to try using port 80 used by HTTP as most fire walls will allow this by default. Also, if you are using a FTP solution the fire wall may be blocking access to ports 20 and 21. Ryan Roos 03:06, 21 September 2006 (UTC)[reply]

African Adventure

edit

Can you install the African Adventure and the Endangered Species expansion packs for Zoo Tycoon 2 and get the features of both? 71.30.197.252 00:41, 11 September 2006 (UTC)[reply]

I would assume so. Is there some reason why you wouldn't be able to? --Optichan 15:44, 13 September 2006 (UTC)[reply]

Computer Freeze

edit

I have a modem attached to my computer, and I use dail-up internet. Therefore, my telephones and my computer are connected to the same telephone line that goes through my house. The problem is, that, whenever someone calls, and the computer is turned on (but not connected to the internet) the computer freezes. It immediatly freezes when someone calls. What am I to do to solve this problem? My modem is a ESS ES56H-PI Data Fax Modem.--Codell [ TalkContrib. ] 01:41, 11 September 2006 (UTC)[reply]

You probably have the "Wake up on Modem" settings enabled on your BIOS, or modem driver. This can sometimes cause this problem. To access the BIOS and check, you will need to hit a key just when you turn on your computer (when it POSTS)...this key is usually the Delete, F1, F12 or Esc key. Once in the BIOS, look for the "Wake up on Modem" setting and diable it...also disable "Wake up on LAN" if you are not using that as well. If the problem lays in the driver and you are using Windows, go to Device Manager (Press Win-key + Pause/Break; then click on the Hardware tab) and find your modem, and look at the propeties of it. It may have additional configuration options, you will need to find the right one. Ronaldh 13:19, 11 September 2006 (UTC)[reply]

Do you have call waiting? If so, you should have your modem disable it while it's dialing up. In most cases, this can be done by dialing *70. If you have Windows, it should let you specify numbers to dial before dialing the number. Shardsofmetal [ TalkContribs ] 02:06, 22 September 2006 (UTC)[reply]

Internal Speaker

edit

Is there any way that I can set my internal PC speaker to be my default computer speaker for anything? By internal PC speaker, I mean that speaker that clicks and beeps while the computer is starting up.--Codell [ TalkContrib. ] 02:54, 11 September 2006 (UTC)[reply]

I can remember some utilities back in the MS-DOS days that could handle playing a bunch of standard formats (like .WAV and possibly .midi) through the PC speaker (one of the utilities had a name something like WEPLANE, meaning WE PLAy NEthing) though I've never heard of such a utility for newer Windows systems.  freshofftheufoΓΛĿЌ  03:29, 11 September 2006 (UTC)[reply]
Some on-board sound chips use the PC speaker when no external speakers are connected (e.g. the Fujitsu Siemens computers at my workplace and my Sun Ultra 5). I remember my good old Pro AudioSpectrum 16 could also do that (you had to connect the PC speaker to the card), but I doubt any modern sound cards can. —da Pete (ばか) 08:19, 11 September 2006 (UTC)[reply]
I think it would much to do with the motherboard as well as the soundcard, and using the PC speaker as an alternative sound output is a feature not typical to modern components - you'll have your work cut out for little gain here I'm afraid. 62.232.224.36 09:48, 11 September 2006 (UTC)[reply]
Here's your answer: http://support.microsoft.com/kb/q138857/
It's even still supported by Microsoft!  freshofftheufoΓΛĿЌ  10:16, 11 September 2006 (UTC)[reply]
It's still supported by Microsoft for windows 95/98/me, not NT/2000/XP/Vista. See the discussion Wikipedia:Reference desk/Computing#audio drivers and directsound for a discussion on how it works, why support was dropped, and why it was a stupid idea anyway. -- Finlay McWalter | Talk 21:17, 13 September 2006 (UTC)[reply]

Thanks!--Codell [ TalkContrib. ] 21:10, 13 September 2006 (UTC)[reply]

One option to play WAV files through the PC speaker's internal digitized sound is a program called "NuSound", which I picked up from somewhere on the Internet (I forget where, possibly inside a ZIP file listed at http://cd.textfiles.com ).
As it is a DOS program, you will want to get DOSBox to effectively use it optimally. DOSBox has a function that emulates the PC speaker (and AdLib, Soundblaster, Gravis UltraSound, etc. cards). --Guroadrunner 05:51, 14 September 2006 (UTC)[reply]

how to develope a non english site

edit

Hi, I would like to develop a web site in Hindi [Indian language]. i would like to use dynamic fonts. so that the visitor are not bothered to download and install the fonts. any help will be appreciated. reply to - (read the notice above about not including your email address!)

You have to assume, at the very least, that people browsing your website have Hindi support installed on their computer. There should be one or more Hindi fonts that are considered "standard" with Hindi versions of Windows, and if there is a handful, you can basically switch between all of them without worrying about incorrectly displaying text on most browsers. Someone else will have to help you if you must include less popular or non-standard Hindi fonts on your page; it is possible to display them "dynamically", but it's a rather involved proccess.  freshofftheufoΓΛĿЌ  10:22, 11 September 2006 (UTC)[reply]

Simple OOT stuff

edit

I've never been that good at programming in good object oriented form, and I've got a very simple question for someone who's more used to organizing class inheritances than I am (basically not at all).

I'll use Tetris as an example. There is a Piece class which inherits from Origin (all pieces have the same origin coordinates) and uses the Block class for each of x blocks in the piece. A lot of the specifications for this implementation of Tetris are loaded from a file when the program is first run, e.g. number of blocks per piece and the configuration of the blocks in each of those pieces.

Piece contains a few functions, like createPiece(int type) and movePiece(Coord xy), and an array of Blocks. When createPiece() is run (essentially initialization of an instance of Piece), the Block array is initialized according to the configuration of blocks for type that was specified in the file that was loaded (and parsed) when the program was first run.

Now, if my problem isn't evident, I'm not sure how to handle the config. settings here; I don't know where they fit in. Should they be global variables for the program (is that the most reasonable solution)? Or should they be inherited, included in some other way that I haven't thought of? Or should the configuration settings be passed as a parameter every time they are needed? Thanks in advance for any help.  freshofftheufoΓΛĿЌ  04:35, 11 September 2006 (UTC)[reply]

class Piece inherits Origin ()
  Block [cfg.blockLimit()] blockArray;
  
  createPiece (int type)
    blockArray = cfg.stdBlockPos (type)
  end createPiece

end class Piece

Here's some pseudocode where I've used a global class (or structure) to store the configuration settings.  freshofftheufoΓΛĿЌ  04:46, 11 September 2006 (UTC)[reply]

It seems to me you're doing things in a rather odd way, which might be why things don't quite make sense to you. Firstly - if you're creating a new Piece object, have a constructor (that's what they're for), not a general createPiece method. Secondly your inheritance heirarchy is weird - in general class inheritance is thought to mean an "is a" relationship (not a "has a"). So if you made a subclass of piece that was LshapedPiece then that's a sensible subclass, as LshapedPiece is-a Piece. But Piece isn't an Origin (it doesn't make sense in English, so it doesn't make sense in code). Rather the origin is a parameter that's passed to the constructor. The Piece's current location, its orientation, its colour, and the configuration of its blocks should all be stored in instance member variables (like you have the block array now). In this case I'd question whether there's enough separate info in a block to justify it being its own class instance - it derives most if not all of the info you need to draw it or decide if it's collided from Piece, so making a separate Block class might just be overkill. -- Finlay McWalter | Talk 11:18, 11 September 2006 (UTC)[reply]
Thanks for the response! I made Piece a subclass of Origin only because some of the literature I used for reference a while ago made a point of creating all shapes as subclasses of points, because a) they are both bound essentially to a single x,y coord, b) they will use the same methods for translation, etc., c) the shapes simply add to the point's methods, which it claims classifies a shape as a "kind-of" point at the class level, and "is-a" point when they're actually initiated as objects. It was general OOT literature mind you, and not an actual programming guide in any real language, so it might be a little weak on the practical side, though it's all I've had to work with, so I have no way of knowing! (yet.)
As for Block... well it's obviously not written in the pseudocode, but I imagine it would have methods like "drawBlock()" and "setBlockColor()", and inherit the DrawableObject class or something like that. Do you think it makes more sense to include these methods too in the Piece class description? I'll admit that I was trying to make this as OO as possible, for no real reason except that's what I expect people would expect me to do, it being implemented in an OO language! But if that's not a good idea, then maybe I'm more confused than I thought I was D  :!
I still have no idea what I should do with all the variables I pulled from the config file : (.  freshofftheufoΓΛĿЌ  12:24, 11 September 2006 (UTC)[reply]
As to config files whch turn into global data, you probably want a single object (e.g. of class Game) which stores that stuff. So things like score, high score, and preferences that came from the config file would be in there. You can just declare a class Game and remember to only make one instance of it (or make it non-instanciable, and just keep everything in class-member variables) or you can use the Singleton pattern which makes sure there's only one instance of that class. The secret is class-member variables and class-member functions (denoted in the Java and C# implementations on that page with static), which means that they apply to the class and not to a specific instance of the class. Or, if you're using an OO language which isn't as pure as Java, you can just declare a global variable ("pure OO" languages are strict - they don't allow anything to exist outside a class or object). -- Finlay McWalter | Talk 13:37, 11 September 2006 (UTC)[reply]
OK, thanks a lot!  freshofftheufoΓΛĿЌ  13:54, 11 September 2006 (UTC)[reply]

lilypond code problems

edit

Can someone please tell me whats wrong with the code below? Thanks!

\version "2.9.17"
\header {
    title = "Honor Guard March"
    instrument = "Trombone"
    composer = "R.M. GEISLER"
}
\relative c {
}
{ \clef bass\time 2/4\ bes4\accent\ f g8 f8 ees4\accent c'8 bes8 }

Log:

# -*-compilation-*-
Changing working directory to `C:/Documents and Settings/Owner/My Documents/lilypond'
Processing `C:/Documents and Settings/Owner/My Documents/lilypond/honor guard march for trombone11.ly'
Parsing...
C:/Documents and Settings/Owner/My Documents/lilypond/honor guard march for trombone11.ly:9:21: error: syntax error, unexpected "\\C[haracter]"
{ \clef bass\time 2/4
                     \ bes4\accent\ f g8 f8 ees4\accent c'8 bes8 }
C:/Documents and Settings/Owner/My Documents/lilypond/honor guard march for trombone11.ly:9:34: error: syntax error, unexpected "\\C[haracter]"
{ \clef bass\time 2/4\ bes4\accent
                                  \ f g8 f8 ees4\accent c'8 bes8 }
C:/Documents and Settings/Owner/My Documents/lilypond/honor guard march for trombone11.ly:9:0: error: errors found, ignoring music expression
{ \clef bass\time 2/4\ bes4\accent\ f g8 f8 ees4\accent c'8 bes8 }

--hello, i'm a member | talk to me! 05:46, 11 September 2006 (UTC)[reply]

real VNC

edit

Hi

On the VNC Server there is an annoying little white icon that is displayed down in the taskbar that turns black when soneone is connected to the server.... is thre any way at all i can remove this.... i did the best i could by hiding it so that it would only display if you expand the taskbar (clicking the arrow) yet after a day or two it just came back... ive been told by numerous people that there should be an option in the server properties that removes this icon but i have checked.... there is no option to remove it..... im guessing because this is the main way that that the server is suutdown (right clicking the icon in the taskbar) .... this is not a problem for me though because i hae set a registry string in the run key that makes the server run on startup.... the server is never closed.....if i want it to be closed all i do is delete the key.... anyone have any ideas at all????????? much apreciatedpulo 10:49, 11 September 2006 (UTC)[reply]

I haven't used it for a while, but the trick is to enable it as a windows service (you are using windows, correct?). Go to the start meny, find the RealVNC folder, and there should be an option that says something like "Register RealVNC as a service" or something. Oskar 22:25, 11 September 2006 (UTC)[reply]
RealVNC doesn't allow you to remove the taskbar icon because they don't want it used as spyware/trojan. You can check out some other branches of VNC that do allow it such as Tight VNC. LinguistAtLarge 04:34, 27 September 2006 (UTC)[reply]

Help with AutoWikiBrowser

edit

I am having trouble using AWB. After having set up my procedure, when I press "Start the process", I keep getting the error message "You are not enabled to use this." It then opens a window to Wikipedia:AutoWikiBrowser/CheckPage, on which I am clearly listed as a registered/enabled user. It is not a problem with my .NET framework either, as I just downloaded the most current version. Can anyone help me? --Ginkgo100 talk · e@ 20:22, 11 September 2006 (UTC)[reply]

That's happened to me before. I think the problem was that I wasn't using the current version of AWB. Is your version still supported? --Optichan 15:45, 13 September 2006 (UTC)[reply]

equation, picture, math symbols not accessible

edit

Pervasive problem, in many but not all articles, eg. article General Relativity no figures or equations are visible. Some technical articles, as well as some of Wikipedia's, print and display distorted tangles of lines (like #, but distorted) for symbols inconsistently, so tangle for "nabla" might take different forms on different lines. Example is lower case "sigmas" on line "Greek" in box below this entry box look like mosquitos. I'm using RH-9 and Mozilla. Default browser settings. I'm computer newby. Thanks- dave ----20:48, 11 September 2006 (UTC)~~

That is indeed somewhat strange - what operating system (Mac, Windows...) are you using? And, pardon my ignorance, what is RH-9?
So if I understand correctly, the greek text in the box below the edit window (characters like α, μ, π and ω) don't display correctly. That would indicate that you have a problem with your installed fonts - do you have a unicode font (like Arial Unicode MS) installed on your computer? (if you're running Windows, go to Start Menu -> Settings -> Control Panel -> Fonts) — QuantumEleven 08:11, 12 September 2006 (UTC)[reply]
Just for general information, "RH-9" is Red Hat Linux version 9. --Tardis 14:58, 12 September 2006 (UTC)[reply]
try going to my preferences --> Math --> Always render PNG. see it that fixes it. Jon513 12:53, 12 September 2006 (UTC)[reply]

Will a bluetooth mobile phone appear on the mac os x desktop as a drive?

edit

I am going to be buying a bluetooth phone that will probably be compatible with isync and i'd like to know if when the phone is paired up with my mac, will the phone appear as a drive on the mac desktop? thanks! 70.80.66.195 20:59, 11 September 2006 (UTC)[reply]

Coloured pixels in black text

edit
 
Supposedly black text contains more coloured pixels than black.

On my computer, under Windows XP, Mozilla Firefox renders anti-aliased black-on-white text using orange, purple, red, blue and beige pixels. What purpose does this serve? When I first noticed it, I thought it was an artifact of my screen (an LCD runnning its native resolution of 1280x1024), but I was able to see it very clearly in a magnified screen shot, part of which is shown at right. If it helps any, the left side of a stroke seems to have a warm cast while the right has a cold cast. NeonMerlin 21:47, 11 September 2006 (UTC)[reply]

See subpixel rendering and ClearType. Basically, it increases readability. You can turn it off in your monitor settings (appearance tab -> advanced I believe). Cheers! Oskar 22:19, 11 September 2006 (UTC)[reply]
Ahh, sorry, not "Advanced", but "Appearance tab" -> "Effects". Oskar 22:22, 11 September 2006 (UTC)[reply]
The different colors make it easier to read; it is smoother. Try making something you scan in monochrome—it looks like poo poo. — [Mac Davis] (talk) (Desk|Help me improve)
Very technical term there, Mac :). —Daniel (‽) 19:29, 12 September 2006 (UTC)[reply]
Wow, cool! JianLi 01:16, 16 September 2006 (UTC)[reply]

amaroK not playing

edit

er yay, another linux newbie question. amaroK isn't playing my mp3s. I know I have sound, because the startup and shutdown sounds play. What am I doing wrong? And why isn't the screen changing resolution when I move the slider and click Apply? ~ct.e 22:55, 11 September 2006 (UTC)[reply]

and it now doesn't connect to the network! might be a dhcp problem, not sure. ~ct.e 00:08, 12 September 2006 (UTC)[reply]
What distro are you using? Have MP3s ever worked? --Optichan 15:43, 13 September 2006 (UTC)[reply]