Friday, June 12, 2009

Formatting messages to look like twitter messages in php

Basically suppose you have twitter message in plain text form and you may want to display it on a webpage with all @names pointing to twitter profiles and links to apporpriate pages

just use the following php function

function formatTweet($tweet)
{
//select hyperlinks
$text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",
"\\0", $tweet);
$text = ereg_replace("@([a-zA-Z0-9_]+)","@\\1",$text);
return $text;
}

Tuesday, March 17, 2009

working sigmatel audio on windows 7

Unlucky me, despite hearing every where that windows 7 supports all hardware, my sigmatel sound card on intel 945 got stuck,I got all devices as disconnected except for my digital output which was actually disconnected. No worries i installed vista drivers and off it worked, until i upgraded to build 7057. Now the vista driver setup won't work saying windows 7 as incompatible, manually installing drivers didn't work. After searching on millions of sites finally i found these drivers
http://www.x-drivers.com/catalog/drivers/sound_cards/companies/sigmatel/models/stac9223/wrong_code/wrong_code/6245.html#

finally i have a working audio. hope the post helps you too
update:http://downloadmirror.intel.com/15519/eng/AUD_allVista_5713.7_PV_IAS_v29.exe
these work too