Category Archives: How To’s

How to Hide Android WebView Highlight Border (or change it’s color)

Here's one that had me at a loss for a long time that I just figured out. You can easily remove the highlight border (the border that comes up when an element is focused) or change it's color in a WebView with CSS! The WebKit-specific property "-webkit-tap-highlight-color" is what you're looking for.

The following line will disable it on a page completely:

* {
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);	
}

rgba() is just like rgb(), but it takes a 4th parameter for opacity. It's my belief that this would probably work for iPhone WebView's as well, since both Chrome and Safari are based off of WebKit.

[ad]

How to fix linux not sending mail problem: Sendmail stat=Deferred: Connection refused by [127.0.0.1]

I recently experienced a problem where my server was not sending mail from the PHP mail() function or the command line "mail" function. After looking through /var/log/maillog, I was able to see that the local 127.0.0.1 mail server was refusing the connection. Some Google searching landed me at the following thread, where the third post did the trick:

http://www.howtoforge.com/forums/showthread.php?t=16246

[ad]

How To Convert Large XML Files to CSV

[ad]

I usually struggle with converting very large XML files to other formats just because they are in a dynamic format and most programs you find run out of memory before properly parsing them.¬†Well, I’m happy to say, I found a FAST and EASY solution. Of course this will work for small files as well as big files.

You’ll want to grab a copy of the msxsl command line utility from Microsoft.

After you’ve got that, you’ll need to setup a XSL file to tell the program how to format your file. If you’re unfamiliar with XSL, you can familiarize yourself here.

After you’ve got your XSL file created, it’s a simple command line entry:

msxsl xml_file.xml xsl_file.xsl -o output_file.csv

The following is a sample XML and XSL file that I used.

XML File:

	
		772500
		Tue, 20 Jan 2009 16:28:08 CST
		Tue, 20 Jan 2009 16:51:01 CST

			61951
			The Hills Season 1

		773000
		Tue, 20 Jan 2009 16:28:08 CST
		Tue, 20 Jan 2009 16:53:54 CST

			61926
			Hogan Knows Best Season 2

		775500
		Thu, 22 Jan 2009 14:49:12 CST
		Thu, 22 Jan 2009 14:51:35 CST

			62068
			Carlos Mencia 2007

			1402
			Comedy Central

XSL File (Creates tab-delimited file)


	

How to access your cell phone voicemail from another phone


This is certainly no new news, but I’m fairly sure many aren’t aware of this simple feature.

Say you left your phone at home and you were expecting a call, but your friend remembered his phone — tough luck, right? ¬†Nope (obviously, or I wouldn’t have made this post).

Here’s what you can do…just pick up any phone and do the following:

  1. Dial your 10-digit wireless number.
  2. Press the * key when you hear your personal greeting.
  3. Enter your personal passcode.
  4. Follow the voice prompts.

How To: Create a Simple Visual “Loading” Effect

If you've got a script that takes a while to load and want to make your user aware that everything is alright, then this tool is for you. The idea is simple – display the message before the labor intensive part of the script runs, and then using CSS after the labor intensive part of the script, hide the message. If you're using a language that provides a buffer (ASP for instance), make sure you turn the buffer off first, or this won't have any effect. (eg. Response.Buffer = False) Example (See it in action):

<?php
ini_set('implicit_flush', 'on');

echo '<p id="loading_msg"><img src="http://img520.imageshack.us/img520/4950/loadingvp7.gif" alt="" style="vertical-align: middle;" /> Loading...</p>';

// Code that takes forever here, could of course be any language
sleep(5); // Only for demonstration

echo '<script type="text/javascript">
window.onload = init;

function init() {
	document.getElementById("loading_msg").style.display = "none";
}
</script>';
echo '<p>Woohoo, five seconds passed.</p>';

require_once('includes/trackers.inc.php');
?>