Wikipedia:Reference desk/Archives/Computing/2008 June 27
|< 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.|
- 1 June 27
- 1.1 Open Source Audio Recorder (copies from yesterday)
- 1.2 Linux kernel 0.01 (part 2)
- 1.3 Regular expresions
- 1.4 Looking for a Firefox add-on: "profile switcher"
- 1.5 PHP CLI: asynchronous communication
- 1.6 Facebook IM in Adium stable?
- 1.7 .ogg conversion software
- 1.8 HTML color question
- 1.9 Free automatic mail forwarding service
- 1.10 HD File System Format
Open Source Audio Recorder (copies from yesterday)
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?
- 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 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: . Indeterminate (talk) 03:03, 27 June 2008 (UTC)
Linux kernel 0.01 (part 2)
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? --126.96.36.199 (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 (http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Extended-Asm.html). 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)
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.
There are several articles where the bot is going to remove a link, and each link starts with  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 http://www.markprindle.com is identified?? and what would the regular expression be??
Do you understand what im asking?? If i can clarify anything ill try to.
- The "^" metacharacter, as in "^[http://www.markprindle.com", 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 markprindle.com but not the second part of the link, so say its " markprindle.com/test" 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 "^.http://www.markprindle.com" - 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 "[http://www.markprindle.com" will occur right at the beginning of the line ? Extetrnal link lines sometimes start with "*" or "* ". Maybe you really want to look for "http://www.markprindle.com" 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 "markprindle.com" 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) [http://www.markprindle.com/can.htm#out 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 markprindle.com 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.
- 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) [http://www.markprindle.com/can.htm#out 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"
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 https://addons.mozilla.org/ and search there. --grawity 12:31, 27 June 2008 (UTC)
- It's built-in to firefox, but hidden.  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)
PHP CLI: asynchronous communication
(...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)
- 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.188.8.131.52 (talk) 16:32, 27 June 2008 (UTC)
Facebook IM in Adium stable?
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)
.ogg conversion software
Does anyone know of a free piece of software that will convert various music formats into .ogg, or for that matter, any other format?
- 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
- #eae8d3 --—— Gadget850 (Ed) talk - 17:20, 27 June 2008 (UTC)
- Check out the magnificent Firebug for finding out these kinds of things. --Sean 18:58, 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.
Free automatic mail forwarding service
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, 184.108.40.206 (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)
HD File System Format
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)