Wikipedia:Reference desk/Archives/Computing/2010 June 20

= June 20 =

Window Media Player
Is there some way I can adjust the contrast, brightness etc. of the movie on WMP ? Jon Ascton   (talk)  05:45, 20 June 2010 (UTC)
 * The latest Windows Media Player allows you to right-click the playing video, choose "Enhancements", then "Video settings" to change these settings. Alternatively, you can change the settings on your monitor. PleaseStand (talk) 09:39, 20 June 2010 (UTC)


 * Of course I know that ! Tried it, did'nt work  Jon Ascton    (talk)  01:54, 24 June 2010 (UTC)

Laplace transform C++ libraries
I am trying to make a circuit simulator using C++. Can anybody tell me if there are any libraries available that can do laplace transforms, using C++? 59.93.207.169 (talk) 06:39, 20 June 2010 (UTC)


 * There are symbolic algebra systems for C++, and there are numerical integration packages for C++. Which do you need?  Here is some code in C# for a numerical Laplace transform, Numerical Laplace Transforms and Inverse Transforms in C#.  (After a cursory scan, I think most of that code would work in C++, with minor symbolic/syntactic tweaks).  It's worth noting that I think you are on the "wrong track" if you're trying to make a circuit simulator and need to compute a Laplace transform explicitly.  Few numerical algorithms, especially circuit simulators, use the Laplace transform, because the more computationally-efficient FFT can do the job "most of the time."  More commonly, instead of actually performing or computing the Laplace transform, you really just want to perform pole-zero analysis (like if you are making a Bode plot - so you don't actually ever need to compute the Laplace transform for the circuit in question.  You need to structure your circuit simulator so that it is "operating" in the Laplace domain - i.e., understands the meaning of a pole and a zero - and uses that to generate the output (typically, a time-domain "transient response" or a frequency spectrum plot).  Nimur (talk) 16:44, 20 June 2010 (UTC)


 * And I forgot to mention - if you want inverse Laplace transforms, be sure to do partial fraction decomposition first, so that you always end up with a sum of second-order Laplace-domain terms. This will simplify your life greatly - every inverse-transform will be a simple sum of decaying cosines and will be "free" (computationally) to compute.  Partial fraction decomposition will probably be some horrible linear operation on your coefficient matrix (i.e., An Efficient Parallel Algorithm for the Solution of a Tridiagonal Linear System of Equations ("This particular computation is of general interest because it is an efficient method for evaluating partial fraction expansions and linear difference equations in parallel)".  Nimur (talk) 16:57, 20 June 2010 (UTC)


 * I just wanted to second Nimur's comment -- you might want to consider going about this another way. Symbolic math libraries exist, and some can do Laplace transforms of specific forms of equations (like polynomials), it's not really practical to build a large circuit simulator this way.  But as a kind of broader comment on this approach, the utility of both the Laplace transform and Fourier transform methods depend on your circuit being more or less linear.  As soon as you want to add things like diodes, transistors, or realistic circuit elements, everything falls apart.  I would recommend instead considering learning about the numerical solution of systems of ODEs (Numerical ordinary differential equations), which let you directly transform a set of differential equations into a system you can solve numerically.  Specifically, SPICE (the transient part of it) solves a system of differential equations with constraints (Differential algebraic equation), some of which may be nonlinear.  This involves a nonlinear root finding algorithm (like Newton's method) and an implicit numerical ODE solver using something like backward Euler.  A good general introduction to the numerical solution of ODEs can be found here: An Introduction to Numerical Analysis for Computational Fluid Mechanics.  A collection of more advanced papers and a thesis specifically devoted to simulation of nonlinear circuits is here: .     And of course, you can always refer to the SPICE source code, which already does all of this. 128.12.174.253 (talk) 18:07, 20 June 2010 (UTC)

Windows XP Firewall - no exceptions ever
I was surprised to find that even with the "no exceptions" option ticked, I could still see webpages. The help information says "When you select Don’t allow exceptions, you can still send and receive e-mail, use an instant messaging program, or view most Web pages"!

What would happen if I kept "no exceptions" ticked all the time? The only thing I do is surf the internet with Firefox, nothing else. Thanks 92.28.240.72 (talk) 15:43, 20 June 2010 (UTC)
 * Yes you can see webpages = because you (I the home computer) requested it. Generally the firewall blocks external computers from requesting info on your computer.


 * If you leave 'no exceptions' on then you won't be able to do things like file sharing on a network etc. To see what the effect will be look at the exceptions listed in the exeptions tab eg control panel>>security>>firewall>>exceptions tab. If you're not on a network of computers (or don't use the network), and you're not using things like remote desktop or printer sharing then selecting no exceptions might not make any difference to you. (I'm not sure if firefox needs an exception to get data or not). If firefox isn't listed on the exceptions there will be no effect - since XP firewall only blocks incomming stuff (and asking for a webpage is outgoing) I don't see why the XP firewall would affect basic browsing at all.77.86.115.161 (talk) 16:24, 20 June 2010 (UTC)


 * The Windows XP Firewall was designed to only block unsolicited incoming traffic. It doesn't block outbound traffic or incoming traffic that is a response to a previous outbound request, so almost all your applications should connect to the internet just fine. Only programs that would ever need an "exception" to work correctly are the ones that create a listening socket for incoming connections - such as a web server.(ref) You can install a third-party firewall (e.g. Zone Alarm) if you want tighter control over applications connecting to the internet. Arloz (talk) 16:42, 20 June 2010 (UTC)


 * It is important to emphasize the way that Internet sockets are designed. One socket allows communication between two endpoints (your computer and a server).  Communication may flow in both directions.  Windows Firewall (and most other default firewalls) block attempts to open sockets that are initiated outside your computer - but the firewall is not configured to block "communication".  If your computer initiates the socket by connecting to a server, then data may flow in both directions.  This is a common misconception about firewalls - by default, they do not prevent connections to the outside network.  All they do is prevent connections that are initiated by the outside network.  This is also why a firewall is useless if your machine is already compromised by malicious software. If you want more elaborate control over all communication (irrespective of who opened the socket), then you need a more sophisticated firewall (e.g. a firewall with a packet analyzer to apply some control to the type of communications).  That might be called a "Protocol-based intrusion detection system or a "Network intrusion detection system", (or it might just be called part of the "firewall").  Such software could be part of a commercial or open-source security suite.  In my opinion, such protection is unnecessary for a home computer, so long as you know what software is running on your machine. Nimur (talk) 17:09, 20 June 2010 (UTC)

Thanks, in summary does the above mean I can keep "no exceptions" ticked all the time without any problems, if I only do web browsing? 92.24.178.183 (talk) 20:05, 20 June 2010 (UTC)
 * Firewall with no exceptions should not interfere with most stuff you access on the web through a browser. It is possible that certain web-based or browser-based stuff (I'm thinking Flash games, for example) might occasionally break.  Windows Firewall can inform you when a program requests access and has been blocked - so if you want, you can configure this setting.  Nimur (talk) 20:19, 20 June 2010 (UTC)

Arin.net's WHOIS isn't being helpful. Please help me find the origin of my dad's IP Addresses.
For Father's Day, I decided to email Dad, who is contracting overseas. He didn't tell me where he was located, so I went to the "Show Original" section of his message sent to me and tried to copy/paste these IP addresses onto the ARIN WHOIS search. It keeps returning IANA, from Marina Del Rey, CA. (I see something about a "BLACKHOLE" in that listing, as well.)

Not being satisfied by IANA, because MDR is obviously not where Dad is, I need extra help here.

Now, as the entire "SHOW ORIGINAL" view would be too overbearingly full of raw text to show you, I'll just paste all the unknown IPs I was able to sift out of the message:

(IP info starts)
Received: by 10.216.160.8 with SMTP id t8cs47884wek; Sun, 20 Jun 2010 03:41:32 -0700 (PDT) Received: by 10.224.44.102 with SMTP id z38mr2274034qae.32.1277030491302; Sun, 20 Jun 2010 03:41:31 -0700 (PDT)

Received: from web63405.mail.re1.yahoo.com (web63405.mail.re1.yahoo.com {69.147.97.45}) by mx.google.com with SMTP id g42si8721156qca.50.2010.06.20.03.41.29; Sun, 20 Jun 2010 03:41:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of (redacted email address) designates 69.147.97.45 as permitted sender) client-ip=69.147.97.45; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of (redacted email address) designates 69.147.97.45 as permitted sender) smtp.mail=(redacted email address); dkim=pass (test mode) header.i=@yahoo.com


 * This mail header merely indicates that your dad used Yahoo Mail's webmail interface. There is not locatable information about where the computer was located that accessed that webmail interface.  (In fact, Yahoo Mail specifically works to ensure that you cannot retrieve such information from the email headers).  This mail header will not help you locate the place where the human who sent this mail was sitting - it contains no useful information about that.  Nimur (talk) 19:02, 20 June 2010 (UTC)

(IP info ends; my message continues)
Now, I just did a search on that 69.147.xx.xx IP and it was of the server that processed Dad's email. What's left is that 10.216.xxx.x IP and the 10.224.xx.xxx IP. What other ways can you think of that'll help me find where Dad is just from those two IPs, and that will not turn up IANA/MDR again? Also, when you search for those two IPs in a different way, how did you, and what results did they turn up this time?

Thanks, --Let Us Update Dusty Articles 18:51, 20 June 2010 (UTC)


 * 10.x.x.x is a private IP address - it is part of the "internal LAN" at Yahoo Mail that processed this message. Nimur (talk) 19:04, 20 June 2010 (UTC)


 * Are you sure you've included all the IP info, in particular all the "received:" headers? Many webmail providers like Yahoo and Hotmail used to include the sender's IP, I think they did it for accountability reasons to try and discourage spam etc. I thought from Nimur's message maybe they stopped and no longer included it (like Google who never did) but I just tried with a Yahoo account and it did include my IP address so while it's possible it varies depending on server you use or something, and perhaps there's some way to turn it off or if you father has Yahoo Mail Pro it may not include it; I would look again carefully first. Be aware that these may be below other headers like domainkeys: which were added after the first received: header (there may also be some headers above other headers but newer headers tend to go to the top I think). You could always include the full headers on your talk page or user page or a subpage thereof.
 * Incidentally your father may not have told you, but have you asked? Nil Einne (talk) 20:23, 20 June 2010 (UTC)

Outputting known waveform
I decided to put off the previous project I mentioned here and try something else. What is the simplest possible way of:

(1) outputting a custom waveform (i.e. one whose amplitude vs. time relationship I define)? (2) reading raw values from the microphone at a pre-defined rate and putting the results into an array?

I'm using Windows XP, with Microsoft Visual C++. I'm reading Microsoft's documentation on waveform generation, and I'll understand it eventually, but I don't need anything that elaborate. --Bowlhover (talk) 19:45, 20 June 2010 (UTC)


 * "Simplest way" depends heavily on your expertise, experience, and technical requirements. Most likely, it sounds like you plan to use a soundcard for the hardware step.  In that case, Simple DirectMedia Layer, an opensource library and API that works on Windows, will be a pretty simple, direct access to the media layer.  You will be able to fill an audio buffer with your waveform data and push it out to the sound output port (to a speaker or any other device).  If you have more critical requirements for the latency, accuracy, and sampling time, you may find that Microsoft Windows' audio driver layers are unsuitable.  In that case, you can consider switching to a different hardware option, like a dedicated DAC: this one from National Instruments costs over a thousand dollars.  There are others with fewer features, depending on your needs.   Nimur (talk) 20:08, 20 June 2010 (UTC)


 * If you Google "DirectSoundRecording.SoundRec" there are a number of how-tos for this. --Phil Holmes (talk) 15:12, 21 June 2010 (UTC)

&#55298;&#56576;&#55298;&#56577;
How can I go from something like the title to a string in Python? I don't know what the representation is called, so I'm having trouble finding resources. 70.162.12.102 (talk) 22:05, 20 June 2010 (UTC)


 * I think it's called Hexadecimal. 82.43.90.93 (talk) 22:10, 20 June 2010 (UTC)
 * It is probable that those hexadecimal values are unicode codes, or some other character encoding. Here is some information for python: Unicode.  You can parse the integers from that string and then place the values into a string buffer using your preferred encoding; and then you simply need to give that string buffer to a program that knows how to interpret said encoding.  (Most modern text-editors know about lots of encodings, but unicode (UTF-8) is probably your best option.  Nimur (talk) 23:19, 20 June 2010 (UTC)


 * It looks like decimal representation of UTF encoding of Phoenician alphabet characters. The first two values that you mentioned would form the letter Aleph, and in Python that would be . The next two form Bet, and so on.


 * 55298 decimal is D802 in hex.
 * 56576 is DD00.


 * UTF-16: 0xD802 0xDD00 is "Aleph"


 * I hope that helps.  Chzz  ► 23:57, 20 June 2010 (UTC)
 * It's called Numeric character reference. --Spoon! (talk) 02:25, 21 June 2010 (UTC)