Wikipedia:Reference desk/Archives/Computing/2008 June 27

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Computing desk
< June 26 << May | June | Jul >> June 28 >
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.

June 27[edit]

Open Source Audio Recorder (copies from yesterday)[edit]

I'm not talking about Audacity or anyything like that... I need something that records the sounds coming from your computer. As in the exact same audio that comes out is recorded. Does anyone know of a software like this?

PS. I would prefer that it has the ability to use a lossless codec, such as AIFF. PwnerELITE (talk) 23:01, 25 June 2008 (UTC)

Listen to your inner self. You are talking about audacity if you have a compatible audio card so that you can select stereo mix or mono mix from the input source in the input dropdown menu. I mean, seriously, what's wrong with Audacity? Is there a specific reason you do not want to use it? You might find a fork, if you let us know exactly why you do not want to use Audacity (for example, if you are on a first generation macbook, stereo mix and mono mix are not available in the drop down menu in the default installation). Please don't take my remarks personally. I just want to help. However, I think (for most people), Audacity fits the bill well enough. Kushal (talk) 23:49, 25 June 2008 (UTC)
I think he didn't know you could do that. I certainly didn't. Thanks! (I was about to suggest running a cable from the output to the input when I was edit conflicted). « Aaron Rotenberg « Talk « 00:01, 26 June 2008 (UTC)
Yorokonde! Kushal (talk) 03:44, 26 June 2008 (UTC)
I.. Didn't know you could do that... but haveing looked at my program, I can't find the input drop-down! Could you help me? PwnerELITE (talk) 22:56, 26 June 2008 (UTC)
Try the upper right corner. Most likely, it is currently set on "Microphone". « Aaron Rotenberg « Talk « 00:02, 27 June 2008 (UTC)
Correction: on smaller screen resolutions, it will be in the toolbar in the second row. « Aaron Rotenberg « Talk « 00:05, 27 June 2008 (UTC)
Strange, my microphone is the only one there... no stereo mix at all...PwnerELITE (talk) —Preceding comment was added at 00:31, 27 June 2008 (UTC)
I think this is the most frequently asked question on the audacity forums. Apparently it depends a lot on the capabilities of your soundcard. Check out their howto: [1]. Indeterminate (talk) 03:03, 27 June 2008 (UTC)
The "stereo mix" option was removed from a lot of sound card drivers to prevent copyright circumvention. I had a Dell laptop where I downloaded an older version of the driver, to get the stereo mix option. JeremyMcCracken (talk) (contribs) 16:49, 29 June 2008 (UTC)

Linux kernel 0.01 (part 2)[edit]

Im trying to learn how a simple OS works by going through linux 0.01 however I am already lost. For now Ill start off with what seems the simplest to me: in the 'lib' directory all of the files are very short and Im not sure if they are syntactically corrrect. Are they? can you give me a brief overview of what they do? -- (talk) 05:48, 27 June 2008 (UTC)

There may be better places to look for good programming ideas, but this will be fun anyway... first of all, note that kernels have to deal with architecture-specific stuff, so they always contain some assembly code in addition to C. This ancient Linux kernel contains more assembly code than necessary in some places, and that may be what's confusing you.
Or maybe you're confused because you don't understand the "__asm__" syntax that is used for inline assembly in GNU C. It's not just a matter of putting assembly code directly in the middle of a C function. You also specify which C variables and expressions should be loaded to/from whichs registers before/after the assembly code is run; and you specify what other registers are modified by the assembly code, so the compiler can merge your hand-written assembly code seamlessly with the assembly code it generates. The details of the syntax are in the GCC manual ( The __asm__ thing is so complicated it's like a whole separate language which you'll have to learn even if you already understand both C and i386 assembly.
Also, it looks like the lib directory is userspace stuff. Like the core, system-dependent part of libc. The syscall stubs. This stuff doesn't really belong in the kernel, but there is some blurring of the kernelspace/userspace boundary in init/main.c which apparently made it necessary. There was no /sbin/init yet at this stage of Linux history.
Hope this helps --tcsetattr (talk / contribs) 07:54, 27 June 2008 (UTC)
If you want to learn how an OS works I would suggest studying MINIX. It was designed just for this purpose. The book Operating Systems Design and Implementation contains the whole code, heavily commented, together with high-level explanations. Linux is just too much of a mess for use as a learning tool. Morana (talk) 14:36, 27 June 2008 (UTC)

Regular expresions[edit]


, someone helped me figure it out. Thanks Printer222 (talk) 15:37, 27 June 2008 (UTC)

Im new to programing, im trying to figure all this stuff out. I started using AWB but now im trying to get more advance and trying to teach myself python.

Any how, im trying to create somthing using AWB, for [request].

There are several articles where the bot is going to remove a link, and each link starts with [2] but the second part is always different and links to different pages.

So using a regualr expression could i make it so that any line of text that begins with is identified?? and what would the regular expression be??

Do you understand what im asking?? If i can clarify anything ill try to.

This is really just an exercise to try and improve my knowledge of programming. Cheers Printer222 (talk) 09:46, 27 June 2008 (UTC)

The "^" metacharacter, as in "^[", would seem to fit the bill here - see regular expression and regular expression examples for more information. Gandalf61 (talk) 10:28, 27 June 2008 (UTC)

I just can't seem to get it working. I type it in exactly as you wrote it above and it comes up as an error 'Unterminated [] set, so i add another ] to the end, and it doesn't do anything. I tried putting the ^ inside the so like this [^] and it did somthing wierd, removing some characters and taking out the spaces. Maybe its an issue with Auto Wiki Browser??.

If i take out all the []and the ^ it just takes out the but not the second part of the link, so say its "" it will just have /test. This is what is meant to happen, but im trying to figure out how to take the whole link out. Printer222 (talk) 12:03, 27 June 2008 (UTC)

Okay, you might need to drop the "[" as "'Unterminated [] set" probably means it is being interpreted as a metacharacter. Try "^." - the "." will match any character at the beginning of the line, but that should be good enough for what you want.
Also, thinking about it, are you sure that "[" will occur right at the beginning of the line ? Extetrnal link lines sometimes start with "*" or "* ". Maybe you really want to look for "" anywhere in the line ?
Then remember that you once you have found a match, you wwant AWB to delete the whole line, not just delete the matched characters (which is what is happening when you successfully remove "" but leave "/test" behind). No idea how you tell AWB to do this - you need an AWB expert here. Perhaps try the AWB talk page. Gandalf61 (talk) 12:48, 27 June 2008 (UTC)

I've probably really confused you. I should have told you the whole story, i was trying to isolate the issues to make it easier, but it looks like ive made it harder.

In every article im trying to fix through a bot (probably quicker to manually do it but this is good for me to try and understand different aspects of programing), there is the line (this is one whole line) "* Mark Prindle (6/10) [ link]"

With /10 part is different in every article and the end part after the / is different. If i type the whole line into the find and replace function of AWB it wont work at all, and wont make any changes. If i just type the first half of the line (the mark Prindle part and the /10) it will replace it as instructed So i thought if i can get it to do that, i can break the line into 2 and then have another part which gets rid of the link. But because each link is different thats when i needed to use the ^ thing.

So in answer to the question, no does not start at the begining of the line, its in the middle. So thats why the ^ is probably not working. And yes, if i could get AWB to find the first part of the line and delete the whole line it would solve all the problems. I will post a message of the AWB talk page, this probably isnt worth the fuss that it is causing though, some one could easily create a bot that does this probably using python or somthing, but i thought i would see if i could tackle it using AWB.

Shows you the lack of my programing ability. Ive just started learning python.

Sorry for confusing every one if i have, cheers Printer222 (talk) 13:25, 27 June 2008 (UTC)

Though this is resolved for the OP, there wasn't really a solution presented for other interested readers, so I'd like to provide some tips. When you are searching for a literal string, remember to escape (using a backslash: \) any characters that have special meaning in a regular expression, such as period (.), question mark (?), asterisk (*), plus (+), caret (^), parentheses, and square brackets ([]). For parts that aren't literal, the regular expression will have to use some of these special characters to specify what can appear there. And if you are searching for a whole line, you may need a caret (^) and dollar sign ($) depending on the regular expression library and function you are using. Often you'll want to allow for variable whitespace in some places as well, and explicitly mark whitespace with an escape sequence like \s (again depends on the specific kind of RE library you are using, the whitespace options you have active, whether there might be different whitespace characters than a plain space--such as tab--etc.).
So assuming that the literal text was actually:
* Mark Prindle (6/10) [ link]
this RE might work:
Whether you allow a single space character, any number, at least one, what numbers you allow, etc., are going to depend on whether there is any variance in the text you are searching for and how careful you want to be to avoid a false positive. --Prestidigitator (talk) 18:34, 27 June 2008 (UTC)

Looking for a Firefox add-on: "profile switcher"[edit]

Problem: At work I dock my laptop and connect through the company LAN. We access the 'net through a proxy server. When I get home I plug in a USB 3G modem and browse without the proxy server. I'd like an add-on that can change the "Tools>Options>Advanced>Network>Settings" options with one button. e.g. something that lets you store two or even n "settings profiles" as it were and quickly toggle between them. Google hasn't helped. I'm hoping some WPian is already using such an add-on and could recommend one? FF3 on WinXP if that makes a difference. Thanks! Zunaid©® 10:46, 27 June 2008 (UTC)

Try FoxyProxy. --grawity 11:17, 27 June 2008 (UTC)
FoxyProxy is a web-based proxy, I think we're misunderstanding each other. At work I connect to the net through the company proxy server ("Tools>Options>Advanced>Network>Settings>Manual Proxy Configuration" with our company's proxy server details in the required fields). When I get home I just want to change the setting to "No proxy" without jumping through 8 button presses. Its likely I'll have to do this setting change twice every day between home and work. Zunaid©® 12:18, 27 June 2008 (UTC)
And that's exactly what FoxyProxy does. Unless I'm confusing it with something else, but I really used an add-on that creates proxy server profiles (direct, Tor SOCKS, SSH SOCKS, etc) and it has a fox in its name. Open and search there. --grawity 12:31, 27 June 2008 (UTC)
Oh dear. I was thinking of Proxy Foxy, a proxy website I've sometimes used. My apologies :$ I'll try both of you guys' suggestions. Thanks! Zunaid©® 13:26, 27 June 2008 (UTC)
It's built-in to firefox, but hidden. [3] Basically, run firefox.exe -P to start the profile manager. The link I provided has a lot of info. (edit: moved this) Indeterminate (talk) 12:40, 27 June 2008 (UTC)
But those profiles switch everything - bookmarks, history, addons - not just proxy settings. --grawity 15:31, 27 June 2008 (UTC)
yep they change everything, that's more if you were two different users using the same browser. FoxyProxy works just fine thanks, though its massively more powerful than what I'm using it for. Zunaid©® 08:15, 28 June 2008 (UTC)

PHP CLI: asynchronous communication[edit]

(...or whatever it's called.)

In CLI PHP, is there a way to a) wait for data from socket connection and b) wait for stdin input, both at the same time?

Note: CLI PHP is the command-line version. (Websites are created in CGI PHP.)

--grawity 12:21, 27 June 2008 (UTC)

In my experience, stdin in PHP is blocking. Even checking to see if there are characters available on stdin causes it to block. The only method I would imagine to work would be to not use PHP's access to stdin. Instead, you must write your own non-blocking access to stdin and call it as an executable function. Your program should return null if there is nothing on stdin or a character (or string) if there is something. Then, you can check a socket, check stdin, check a socket, check stdin in a repeating loop. -- kainaw 12:38, 27 June 2008 (UTC)
Does PHP have the select function? --Tardis (talk) 13:26, 27 June 2008 (UTC)
For streams and sockets only. --grawity 15:30, 27 June 2008 (UTC)
You can treat stdin like any other stream. Get the underlying stream for stdin and use it in select. If that doesn't work, like the poster above, consider functions and some kind of loop. +1 points if PHP has callback/threading capability. Haven't touch PHP in a while but this is how I would do it. (talk) 16:32, 27 June 2008 (UTC)

Facebook IM in Adium stable?[edit]

is facebook IM available in the stable release version of Adium yet? or is it yet in beta? If it is available in the stable release, could you tell me how to add my facebook on adium? thanks . Kushal (talk) 16:16, 27 June 2008 (UTC)

It'll be in the next release.--droptone (talk) 16:57, 27 June 2008 (UTC)
Thanks. Kushal (talk) 20:28, 27 June 2008 (UTC)

It seems 1.2.6 still does not have Facebook support. Kushal (talk) 01:51, 3 July 2008 (UTC)

.ogg conversion software[edit]

Does anyone know of a free piece of software that will convert various music formats into .ogg, or for that matter, any other format?

Thanks. —Preceding unsigned comment added by (talk) 17:02, 27 June 2008 (UTC)

Audacity. --LarryMac | Talk 17:06, 27 June 2008 (UTC)
VLC Mac Davis (talk) 18:15, 27 June 2008 (UTC)
WinLAME --Russoc4 (talk) 01:39, 29 June 2008 (UTC)

HTML color question[edit]

What's the background color on the left and right sides of this page? That light brown color. I'd like to recreate it but need the HTML color value. Thanks, Dismas|(talk) 17:09, 27 June 2008 (UTC)

#eae8d3 --—— Gadget850 (Ed) talk - 17:20, 27 June 2008 (UTC)
Thanks! Dismas|(talk) 17:44, 27 June 2008 (UTC)
Check out the magnificent Firebug for finding out these kinds of things. --Sean 18:58, 27 June 2008 (UTC)
That would be Firebug (Firefox extension), not the insect or pyromaniac. Although the insect can be rather magnificent as well. --LarryMac | Talk 19:09, 27 June 2008 (UTC)
Firebug is great, but was no help on this— those edges are background images. I copied the image into Paint Shop Pro and use the eyedropper tool. --—— Gadget850 (Ed) talk - 19:56, 27 June 2008 (UTC)

If you have a modern Macintosh, it includes Digital color meter, a tool that can identify the color of any pixel on the screen.

Atlant (talk) 22:18, 27 June 2008 (UTC)

Or just take a screenshot and use the eyedropper. --antilivedT | C | G 22:26, 27 June 2008 (UTC)
KDE also has KColorChooser that lets you get the RGB of any pixel on the screen (without doing a screenshot). -- kainaw 22:35, 27 June 2008 (UTC)
In the X Window System, there's xmag. Any version more "modern" than 1991. --tcsetattr (talk / contribs) 22:39, 27 June 2008 (UTC)
Thanks for the Digital Color Meter suggestion. I do have a Mac but could not remember the name of the program and was in a bit of a rush. I'll try to remember that for next time. Dismas|(talk) 11:46, 28 June 2008 (UTC)

Free automatic mail forwarding service[edit]

I would like to automatically forward incoming emails from one of my Yahoo accounts to another. I've used izymail, but the trial has expired, and would like to know if another service like this exists for free and/or for an indefinite time. Does anyone have any ideas for this type of thing? Thanks, (talk) 23:26, 27 June 2008 (UTC)

I believe Yahoo will do it for you for free. Check your mail options. Mac Davis (talk) 19:24, 29 June 2008 (UTC)
Not unless you have Yahoo! mail plus. However, there is a service that allows you to download your mail by http requests. Please watch this space for more information (hopefully). Kushal (talk) 16:11, 30 June 2008 (UTC)

HD File System Format[edit]

I have an external USB HDD (120Gb, so not just a pen drive). I need to format it so that both Windows (XP/Vista) and MacOSX computers will be able to both read and write to/from it. Which file system should I format it as? Cheers, JoeTalkWork 23:40, 27 June 2008 (UTC)

Obviously FAT32. If you can get NTFS to work in leopard then go with NTFS.--Yousifnet (talk) 02:17, 28 June 2008 (UTC)

Ah, I was thinking along the lines of FAT32. How difficult is it to get NTFS to work in Leopard? Cheers, JoeTalkWork 12:25, 28 June 2008 (UTC)