~ overflow ~

Archive for April, 2010

Fixing Windows Vitual PC Slow Network

by z3n on Apr.27, 2010, under windows

Problem:

Windows Virtual PC Network is slow.

Solution:

- On the host computer, backup the Registry, just in case, and then:

- Run Registry Editor (regedit.exe) and select the following key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

- Create new DWORD value named DisableTaskOffload and set its value to 1.

- Restart the computer.

Yes this is a ripoff article!!!

Source:

http://www.softblog.com/2009-12/slow-network-virtual-pc-windows-7/

Leave a Comment :, , , , , more...

Windows Live Messenger Error 80048821

by z3n on Apr.24, 2010, under Tips & Hints, windows

Problem:

After upgrading to the new windows live messenger you find out that you can’t connect to it anymore, no matter what and how you try it simply gives you Error: 80048821. Seeking for help at microsoft using crypt error message only gives you a bunch of useless answers.

Solution:

Despite from the solutions posted on the source link, that didn’t worked for me, i saw a comment on the very same page that said to try the login all in CAPS. That was what fixed the issue.

Source:

MSN-Errors

1 Comment :, , , , , more...

UTF8 Conversion Functions

by z3n on Apr.24, 2010, under Coding, Tips & Hints

Problem:

There are many issues when you run across a non utf8 string and even worse a mixed variable, that could or couldn’t be utf8 at same time.

Solution:

Based on my previous postings i’ve improved my utf8 functions taking as referral this great post.

define('_is_utf8_split',5000);

function utf8_encode_array(&$x) {
	if (is_array($x)) {
		foreach ($x as &$v) // loop through arrays and/or items
			$v=utf8_encode_array($v);
		return $x;
	} else // not array
		return !is_utf8($x) ? utf8_encode($x) : $x;
}
function to_utf8($x) { // v1.01
	/*
		This function will convert a string or an array to utf8.
		The input can have mixed encodings.

		-- 100424
	*/
	if (!is_utf8($x)) {
		if (is_array($x)) {
			foreach ($x as &$v) {
				$v=to_utf8($v);
			}
		} else {
			$x=utf8_encode($x);
		}
	}
	return $x;
}
function is_utf8($string) { // v1.03
	if (is_array($string)) {
		foreach ($string as $v) {
			if (is_utf8($string))
				return true;
		}
		return false;
	} elseif (strlen($string) > _is_utf8_split) {
		// Based on: http://mobile-website.mobi/php-utf8-vs-iso-8859-1-59
		for ($s=$i=0,$j=ceil(strlen($string)/_is_utf8_split);$i < $j;$i++,$s+=_is_utf8_split) {
			if (!is_utf8(substr($string,$s,_is_utf8_split)))
				return false;
		}
		return true;
	} else {
		// From http://w3.org/International/questions/qa-forms-utf-8.html
		return preg_match('%^(?:
				[\x09\x0A\x0D\x20-\x7E]            # ASCII
			| [\xC2-\xDF][\x80-\xBF]             # non-overlong 2-byte
			|  \xE0[\xA0-\xBF][\x80-\xBF]        # excluding overlongs
			| [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}  # straight 3-byte
			|  \xED[\x80-\x9F][\x80-\xBF]        # excluding surrogates
			|  \xF0[\x90-\xBF][\x80-\xBF]{2}     # planes 1-3
			| [\xF1-\xF3][\x80-\xBF]{3}          # planes 4-15
			|  \xF4[\x80-\x8F][\x80-\xBF]{2}     # plane 16
		)*$%xs', $string);
	}
}
function _r_json($x) {
	$x=utf8_encode_array($x);
	echo json_encode($x);
}
Leave a Comment :, , , , more...

How to detect if a string is utf8 on php?

by z3n on Apr.24, 2010, under Coding, Tips & Hints

Problem:
During the debug of utf8 strings i came across a string that could or not be a utf8 strings, thanks to IE. There’s no such function as is_utf8 or a specific function to detect if a string is actually utf8.

Solution:

define('_is_utf8_split',5000);

function is_utf8($string) { // v1.01
	if (strlen($string) > _is_utf8_split) {
		// Based on: http://mobile-website.mobi/php-utf8-vs-iso-8859-1-59
		for ($i=0,$s=_is_utf8_split,$j=ceil(strlen($string)/_is_utf8_split);$i < $j;$i++,$s+=_is_utf8_split) {
			if (is_utf8(substr($string,$s,_is_utf8_split)))
				return true;
		}
		return false;
	} else {
		// From http://w3.org/International/questions/qa-forms-utf-8.html
		return preg_match('%^(?:
				[\x09\x0A\x0D\x20-\x7E]            # ASCII
			| [\xC2-\xDF][\x80-\xBF]             # non-overlong 2-byte
			|  \xE0[\xA0-\xBF][\x80-\xBF]        # excluding overlongs
			| [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}  # straight 3-byte
			|  \xED[\x80-\x9F][\x80-\xBF]        # excluding surrogates
			|  \xF0[\x90-\xBF][\x80-\xBF]{2}     # planes 1-3
			| [\xF1-\xF3][\x80-\xBF]{3}          # planes 4-15
			|  \xF4[\x80-\x8F][\x80-\xBF]{2}     # plane 16
		)*$%xs', $string);
	}
}  

Notes:

According to some posts on php and this specific posting, there’s a bug that happens on strings bigger than 5000 chars, this function will split those strings and test their parts.

1 Comment :, , , , more...

Link to Windows Live Messenger Web

by z3n on Apr.24, 2010, under windows

Problem:

Can’t find link to generate Windows Live Messenger web configs to generate a html to link your msn into a page or something.

Solution:

http://settings.messenger.live.com/Applications/CreateHtml.aspx

Leave a Comment :, , , , , more...

How to create a virtual hard disk (vhd) from a real hard disk

by z3n on Apr.22, 2010, under Tips & Hints, windows

Problem:

Since i upgraded to windows 7 i miss some features from old windows, like running old IEs in order to have page development compliant. So i’ve found out about windows virutal pc which is basically a older windows emulator, since i have an old version of windows already installed i though, why not simple convert it to a vhd , so no need to reinstall?

Solution:

So, windows virtual pc don’t offer that option, you need to start from scratch. But then i found this sysinternals program:

Disk2vhd

which solved it all.

Leave a Comment :, , , , more...

Note about uploading multibyte filename files (japanese filenames)

by z3n on Apr.20, 2010, under Notes

Uploading multibyte filenames files is a issue, it depends of the origin and destination OS support and not only that but majority of the program you are uploading from. Usually i use smartftp, however, it really sucks on that matter, it simply ruins the encodings.

Use FILEZILLA instead. Don’t even try to move , rename or touch multibyte files with smartftp!

Leave a Comment :, , , , , more...

Windows 7 Aero Glass Extras

by z3n on Apr.20, 2010, under Tips & Hints

So, i was tired of windows xp, not only due the massive bugs it tends to fall into after lots of updates, but because it can’t take advantage of the new directXs.

Now on windows 7 i found out about the aero and glass, all nice and cool, although it don’t work on everything and not how i want, so i collected a few programs/mods/plugins to make things look better, i might be updating this post as i find more decent/usable in real life mods.

Here’s a screen:

windows 7 aero glass screen

and the mods:

Command Line / Prompt Aero Glass – Glass CMD for Vista

PuTTY Aero Glass – PuTTY Glass Transparency Patch

Firefox Addon (usable one) – All-Glass for Firefox

Leave a Comment :, , , more...

umount note

by z3n on Apr.20, 2010, under Linux Happyness, Tips & Hints

I had to umount a drive but it wasn’t working, not even with -f (force) option.

So i looked man pages and found out about lazy option (-l) which solved the issue;


umount -l /path/to/mount/point
Leave a Comment :, , , more...

Blue Soleil 6.4.249

by z3n on Apr.16, 2010, under Tips & Hints

Problem:

Alright, this is not the type of posting you would probably see on this blog so much, since this is no warez blog.

What happens is that blue soleil is really annoying software, not only because they DON’T allow old registered users to upgrade for free, but also because the program itself sucks. Since my bluetooth device ONLY works with blue soleil i must have this working with that crappy program.

Solution:

On windows 7, the version they provided me, 1.6 simply don’t work, also many things are wrong with that version, basically you can only have the most primitive bluetooth access working without crashing it. I can’t upgrade for free, and the trial only gives me 2mb of data transferred. Windows 7 native bluetooth support is a joke, so i’m not commenting it.

After searching a lot i’ve found several versions of the 6.4.xxx none of they worked, no torrents worked and the cracks were useless.

Until i found 6.4.249 on a hidden comment somewhere.

Here’s the link to download the working version (32/64 bit, Windows 7 tested).

Oh so cool, now i can use my headphones again!

1 Comment :, , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!