How long is this going to take?

If you are like me you've got a command line script that has to process through thousands of things and you like know how far along it is and how much longer it is going to take. Today I crated this general function to help me monitor the status of where I am with my process and I though making some type of timer would be cool too. Have fun with it.

So to use this function you just need to pass it

$i: Current number you are processing (in my case an array so 0 really is 1
$c: Total number of items to do
$m: any type of message or item number that is being processed

RackSpace Cloud Hosting Questions

I've started seeing that I get lots of hits fror people search for things such as cPanel, RackSpace Cloud, Plesk and other hosting related topics revolving around moving to the RackSpace Cloud Sites and Server solutions. If you think this is a good solution for you and your sites I'd be happy to answer any questions that someone has. If you are looking for someone to manage your hosting solution with these new types of accounts it would be my privilege to help you find a solution that works best for you.

Topic Replies with keywords in mind

I was searching for a solution today and I couldn't find anything using the keywords I though matched what I needed to find. So once I found the solution or atleast something to help I made sure to include the statement I was searching for. Maybe next time someone else won't have to look as hard as I did.

Which leads me to another topic. If you post a question online and you find the answer please go back and let everyone know what that solution was.

Extracting Microsfoft Excel CSV in PHP

I deal with lots of data. Data that people want extracted from our product database into their custom format and also they want us to manipulate their data. What I've done here is take the MS Excel CSV file which only wraps text in quotes if it has a comma in it. Hope it helps to import MS Excel CSV into a standard PHP array.

<?php

$file = './test.csv';
updateFile( $file );

function updateFile( $fileName )
{
	$F = fopen( $fileName, 'r' );
	//	get header of file
	$header = fgets( $F, 1024 );
	$header = trimLine( $header );
	$header = csvExtract( $header );
	

Special Characters in XML

At work I've always had problems when people copy and paste from word into PeopleSoft because I've then used that data to populate XML files for other people to use. I've been automating everything in regards to generating these files so instead of manually editing the special characters for (R) and (TM) I've had to get inventive. Below is the code I've come up with this to remove the special character to the registration symbol into an XML UTF-8 symbol that will display correctly on the web. If I ever have to include more characters I'll keep updating this post.

  

Drupal: The start of an new adventure

BombDrop.net has had many faces over the years. Starting out on the eve of the Iraq War to count down when the first bombs would drop and now a placeholder for DNS subdomains. No more will this be just a placeholder for grander things.

Syndicate content
Powered by Drupal, an open source content management system