<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>CoryBorrow.Blog();</title>
	<atom:link href="http://cborrow.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://cborrow.wordpress.com</link>
	<description>Blog posts on C#, .NET, PHP, Games, and more.</description>
	<lastBuildDate>Tue, 15 Mar 2011 01:20:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='cborrow.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>CoryBorrow.Blog();</title>
		<link>http://cborrow.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://cborrow.wordpress.com/osd.xml" title="CoryBorrow.Blog();" />
	<atom:link rel='hub' href='http://cborrow.wordpress.com/?pushpress=hub'/>
		<item>
		<title>SoundBox, another mp3 player.</title>
		<link>http://cborrow.wordpress.com/2011/03/08/new-audio-player/</link>
		<comments>http://cborrow.wordpress.com/2011/03/08/new-audio-player/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 00:58:06 +0000</pubDate>
		<dc:creator>Cory Borrow</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Desktop Development]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://cborrow.wordpress.com/?p=87</guid>
		<description><![CDATA[I started a new personal project, a little Mp3 player, it simple, does not have a lot of controls, visualaztions, and all the rest of everything found with most media players now a days. I just wanted something that would &#8230; <a href="http://cborrow.wordpress.com/2011/03/08/new-audio-player/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cborrow.wordpress.com&amp;blog=509271&amp;post=87&amp;subd=cborrow&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I started a new personal project, a little Mp3 player, it simple, does not have a lot of controls, visualaztions, and all the rest of everything found with most media players now a days. I just wanted something that would play my music.</p>
<p>This audio player is capable of playing other file types but I have set it to only find and play Mp3&#8242;s. The way it works is when started it scans your &#8220;My Music&#8221; folder for any and all Mp3&#8242;s you may have lying around in there and puts them into a large list, after which just waits for you to hit play.</p>
<p>It features Play/Pause, Prev/Next, Mute/Volume Down/Volume Up, and Shuffle. It displays the song title, the artist and the current play time.</p>
<p>As for visuals it currently looks like this.</p>
<p><a href="http://cborrow.files.wordpress.com/2011/03/capture.png"><img src="http://cborrow.files.wordpress.com/2011/03/capture.png?w=300&#038;h=99" alt="" title="SoundBox" width="300" height="99" class="alignnone size-medium wp-image-88" /></a></p>
<p>The name of this audio player is SoundBox. I will release a build as well as the source shortly, I just want to clean up the source some and maybe finish making a halfway decent icon.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cborrow.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cborrow.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cborrow.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cborrow.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cborrow.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cborrow.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cborrow.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cborrow.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cborrow.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cborrow.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cborrow.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cborrow.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cborrow.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cborrow.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cborrow.wordpress.com&amp;blog=509271&amp;post=87&amp;subd=cborrow&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cborrow.wordpress.com/2011/03/08/new-audio-player/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5f1f7db404b48762af074c094d5fac9a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cborrow</media:title>
		</media:content>

		<media:content url="http://cborrow.files.wordpress.com/2011/03/capture.png?w=300" medium="image">
			<media:title type="html">SoundBox</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP BlahFramework</title>
		<link>http://cborrow.wordpress.com/2010/09/21/php-blahframework/</link>
		<comments>http://cborrow.wordpress.com/2010/09/21/php-blahframework/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 01:01:20 +0000</pubDate>
		<dc:creator>Cory Borrow</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://cborrow.wordpress.com/?p=78</guid>
		<description><![CDATA[An update of sorts to my last post, where I said that I would be finishing up on my little framework project then posting it on something like github or the likes. I went ahead and posted it up there &#8230; <a href="http://cborrow.wordpress.com/2010/09/21/php-blahframework/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cborrow.wordpress.com&amp;blog=509271&amp;post=78&amp;subd=cborrow&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>An update of sorts to my last post, where I said that I would be finishing up on my little framework<br />
project then posting it on something like github or the likes.<br />
I went ahead and posted it up there anyway.<br />
I&#8217;ll be updating as I go along and such.</p>
<p>If you want to check it over or check it out you can do so  <a href="http://github.com/cborrow/BlahFramework">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cborrow.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cborrow.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cborrow.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cborrow.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cborrow.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cborrow.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cborrow.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cborrow.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cborrow.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cborrow.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cborrow.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cborrow.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cborrow.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cborrow.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cborrow.wordpress.com&amp;blog=509271&amp;post=78&amp;subd=cborrow&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cborrow.wordpress.com/2010/09/21/php-blahframework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5f1f7db404b48762af074c094d5fac9a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cborrow</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP Stuff : My database class</title>
		<link>http://cborrow.wordpress.com/2010/09/21/php-stuff-my-database-class/</link>
		<comments>http://cborrow.wordpress.com/2010/09/21/php-stuff-my-database-class/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 18:53:07 +0000</pubDate>
		<dc:creator>Cory Borrow</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://cborrow.wordpress.com/?p=64</guid>
		<description><![CDATA[PHP Stuff : My database class. When developing websites I usually have a database class of my own that I use, I have a new one that I am starting to create now and it is quite simple to use. &#8230; <a href="http://cborrow.wordpress.com/2010/09/21/php-stuff-my-database-class/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cborrow.wordpress.com&amp;blog=509271&amp;post=64&amp;subd=cborrow&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>PHP Stuff : My database class.</p>
<p>When developing websites I usually have a database class of my own that I use,<br />
I have a new one that I am starting to create now and it is quite simple to use.</p>
<p>Such as a simple query with a single where statement.</p>
<pre>
<code>
include "Database.php";
$db = new Database("localhost", "user", "pass", "dbname");
$db-&gt;connect();

$db-&gt;where("age", 18, WhereOperator::$MoreThan)
	-&gt;where("age", 25, WhereOperator::$LessThan)
	-&gt;orWhere("age", 45, WhereOperator::$Equal)
	-&gt;select("persons");

$row = $db-&gt;fetch();
</code>
</pre>
<p>Pretty simple huh? I like how it works.<br />
As for the <code>WhereOperator</code> there are a few operators you can use as you<br />
can see in the <code>WhereOperator</code> class.</p>
<pre>
<code>
class WhereOperator
{
    public static $Equal = 0;
    public static $Like = 1;
    public static $LessThan = 2;
    public static $MoreThan = 3;
    public static $LessThanOrEqual = 4;
    public static $MoreThanOrEqual = 5;
    public static $NotEqual = 6;
    public static $In = 7;
    public static $NotIn = 8;
    public static $Contains = 9;
    public static $NotContains = 10;
    public static $Between = 11;
    public static $NotBewteen = 12;
    public static $BeginsWith = 13;
    public static $NotBeginsWith = 14;
    public static $Contains = 15;
    public static $NotContains = 16;
    public static $NotLike = 17;
    public static $IsNull = 18;
    public static $IsNotNull = 19;
}
</code>
</pre>
<p>I&#8217;ll have this class posted up later after I get everything finished up, it<br />
is going to be part of a small framework I am working on for myself.</p>
<p>The framework is really just a little personal project something to have<br />
fun with, but it may get used in a couple of sites I&#8217;ll post the code<br />
of that on sourceforge or github or something of the like, until then&#8230;<br />
high ho silver away&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cborrow.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cborrow.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cborrow.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cborrow.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cborrow.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cborrow.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cborrow.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cborrow.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cborrow.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cborrow.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cborrow.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cborrow.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cborrow.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cborrow.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cborrow.wordpress.com&amp;blog=509271&amp;post=64&amp;subd=cborrow&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cborrow.wordpress.com/2010/09/21/php-stuff-my-database-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5f1f7db404b48762af074c094d5fac9a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cborrow</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamic getter&#8217;s and setter&#8217;s in PHP</title>
		<link>http://cborrow.wordpress.com/2010/09/18/dynamic-getter-and-setters-in-php/</link>
		<comments>http://cborrow.wordpress.com/2010/09/18/dynamic-getter-and-setters-in-php/#comments</comments>
		<pubDate>Sat, 18 Sep 2010 05:10:12 +0000</pubDate>
		<dc:creator>Cory Borrow</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://cborrow.wordpress.com/?p=48</guid>
		<description><![CDATA[Anyone who has done almost any PHP that required your to make a class of some sort probably also had to create getters and setters. If you happen to have a lot of properties that need to have getters and &#8230; <a href="http://cborrow.wordpress.com/2010/09/18/dynamic-getter-and-setters-in-php/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cborrow.wordpress.com&amp;blog=509271&amp;post=48&amp;subd=cborrow&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>
Anyone who has done almost any PHP that required your to make a class<br />
of some sort probably also had to create getters and setters. If you happen<br />
to have a lot of properties that need to have getters and setters it can become<br />
bothersome, however using PHP&#8217;s __call magic method this can be cut down to<br />
just a small snippet of code, here&#8217;s how.<br />
PHP&#8217;s __call magic method allows method&#8217;s that do not exist in your class to be<br />
called, so for instance let&#8217;s say you have the class.</p>
<pre>
<code>
&lt;?php
	class Foo {
		public function Hello() {
			echo "Hello, world!";
		}

		public function __call($name, $args) {
			echo "Calling method {$name}";
		}
	}
?&gt;
</code>
</pre>
<p>
Now if you where to call <code>Foo::Hello();</code> you would get &#8220;Hello, world!&#8221; printed<br />
to your browser, however calling something like <code>Foo::Bar();</code> would cause PHP<br />
to send the method name and arguments to your __call method as your class<br />
does not have an actual method name Bar. So how can we use this to our<br />
advantage? Lets see.</p>
<p>
I am creating a new project and I have this class which will have many properties,<br />
some stored in an array some actual variables and I need to create getters and setters<br />
for all of them, what to do. Well with the help of the __call magic method it is as easy<br />
as this.</p>
<pre>
<code>
class Foo
{
    private $test;
    private $test2;
    private $bar;

    public function __construct()
    {
        $this-&gt;test = "";
        $this-&gt;test2 = "";
        $this-&gt;bar = array();
        $this-&gt;bar['str'] = " world!";
    }

    public function __call($name, $args)
    {
        if(preg_match("/get/i", $name))
        {
            //Set the entire method name to lowercase so we don't have to mess around with
            //anything incase camel case or C# like method names are being used.
            $name = strtolower($name);
            //Find the start and length of the get / set in the method.
            $pos = strpos($name, "get") + strlen("get");
            //Strip the get / set from the getter / setter method.
            $name = substr($name, $pos, strlen($name) - $pos);

            //Create a new reflection object from this class.
            $reflection = new ReflectionClass($this);
            $props = $reflection-&gt;getProperties(ReflectionProperty::IS_PRIVATE | ReflectionProperty::IS_PROTECTED);

            //Loop through all the properties that we found.
            foreach($props as $prop)
            {
                //Check if it is an array so we can search the keys in an array instead of the
                //name of the property.
                if(is_array($this-&gt; {$prop-&gt;getName()}))
                {
                    //So it's an array, does our array contain a key with the name
                    //that we are looking for?
                    if(key_exists($name, $this-&gt; {$prop-&gt;getName()}))
                        return $this-&gt; {$prop-&gt;getName()} [$name];
                }
                //If it is not an array then does that name match the name we are looking for?
                else if($prop-&gt;getName() == $name)
                    return $this-&gt;$name;
            }
            return null;
        }
        //Do almost the same thing as in the get option get here but we will be setting a value
        //not retreving one.
        else if(preg_match("/set/i", $name))
        {
            $name = strtolower($name);
            $pos = strpos($name, "set") + strlen("set");
            $name = substr($name, $pos, strlen($name) - $pos);
            $value = "";

            //Make sure we actually have an argument in there.
            if(count($args) &gt;= 1)
                $value = $args[0];

            $reflection = new ReflectionClass(__CLASS__);
            $props = $reflection-&gt;getProperties(ReflectionProperty::IS_PRIVATE | ReflectionProperty::IS_PROTECTED);

            foreach($props as $prop)
            {
                if(is_array($this-&gt; {$prop-&gt;getName()}))
                {
                    if(key_exists($name, $this-&gt; {$prop-&gt;getName()}))
                        $this-&gt; {$prop-&gt;getName()} [$name] = $value;
                }
                else if($prop-&gt;getName() == $name)
                    $this-&gt;$name = $value;
            }
        }
    }
}

$foo = new Foo();
$foo-&gt;setTest("Hello,");
echo $foo-&gt;getTest(); //Prints "Hello,"
echo $foo-&gt;getStr(); //Prints " world!"
</code>
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cborrow.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cborrow.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cborrow.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cborrow.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cborrow.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cborrow.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cborrow.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cborrow.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cborrow.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cborrow.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cborrow.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cborrow.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cborrow.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cborrow.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cborrow.wordpress.com&amp;blog=509271&amp;post=48&amp;subd=cborrow&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cborrow.wordpress.com/2010/09/18/dynamic-getter-and-setters-in-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5f1f7db404b48762af074c094d5fac9a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cborrow</media:title>
		</media:content>
	</item>
		<item>
		<title>Quick PHP Functions : preg_match_count, starts_with</title>
		<link>http://cborrow.wordpress.com/2010/03/29/quick-php-functions-preg_match_count-starts_with-path_combine/</link>
		<comments>http://cborrow.wordpress.com/2010/03/29/quick-php-functions-preg_match_count-starts_with-path_combine/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 02:13:31 +0000</pubDate>
		<dc:creator>Cory Borrow</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://cborrow.wordpress.com/?p=40</guid>
		<description><![CDATA[Here are a couple more quick php functions for you, something you can throw in your common.php file and be used in the future if ever need be. Click the function names which link to the code stored at Smipple.net &#8230; <a href="http://cborrow.wordpress.com/2010/03/29/quick-php-functions-preg_match_count-starts_with-path_combine/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cborrow.wordpress.com&amp;blog=509271&amp;post=40&amp;subd=cborrow&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here are a couple more quick php functions for you, something you can throw in your common.php file and be used in the future if ever need be.</p>
<p>Click the function names which link to the code stored at Smipple.net</p>
<p><strong><a href="http://www.smipple.net/snippet/coryborrow/preg_match_count">preg_match_count</a></strong>, takes a pattern, an input string, and returns the amount of times your pattern appears in the string.</p>
<pre>
<code>
preg_match_count("&lt;[^&gt;]*&gt;", "&lt;p&gt;&lt;span&gt;test&lt;/span&gt;&lt;/p&gt;"); //Returns 4
</code>
</pre>
<p><strong><a href="http://www.smipple.net/snippet/coryborrow/starts_with">starts_with</a></strong>, returns true or false if your input string starts with your needle.</p>
<pre>
<code>
starts_with("testing", "test"); //Returns true
starts_with("testing", "ing"); //Returns false
</code>
</pre>
<p>That&#8217;s all I got for now, hopefully I have something more to post then just small bits of simple code in the future.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cborrow.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cborrow.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cborrow.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cborrow.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cborrow.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cborrow.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cborrow.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cborrow.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cborrow.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cborrow.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cborrow.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cborrow.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cborrow.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cborrow.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cborrow.wordpress.com&amp;blog=509271&amp;post=40&amp;subd=cborrow&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cborrow.wordpress.com/2010/03/29/quick-php-functions-preg_match_count-starts_with-path_combine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5f1f7db404b48762af074c094d5fac9a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cborrow</media:title>
		</media:content>
	</item>
		<item>
		<title>Quick PHP Functions : str_remove</title>
		<link>http://cborrow.wordpress.com/2009/12/16/quick-php-function-str_remove/</link>
		<comments>http://cborrow.wordpress.com/2009/12/16/quick-php-function-str_remove/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 03:53:53 +0000</pubDate>
		<dc:creator>Cory Borrow</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://cborrow.wordpress.com/?p=28</guid>
		<description><![CDATA[I had a need for a simple function to remove a portion of a string similar to how it is done with most functions in string libraries such as .NET&#8217;s String.Remove. Using the function is as simple as $str = &#8230; <a href="http://cborrow.wordpress.com/2009/12/16/quick-php-function-str_remove/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cborrow.wordpress.com&amp;blog=509271&amp;post=28&amp;subd=cborrow&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I had a need for a simple function to remove a portion of a string similar to how it is done with most<br />
functions in string libraries such as .NET&#8217;s String.Remove.</p>
<p>Using the function is as simple as</p>
<pre>
<code>
$str = str_remove($str, 10, 2);
</code>
</pre>
<p>and here is the implementation.</p>
<pre>
<code>
if(!function_exists('str_remove')) {
	function str_remove($str, $startOffset, $length) {
		$endPos = ($startOffset + $length);
		$strLeft = substr($str, 0, $startOffset);
		$strRight = substr($str, $endPos, strlen($str) - $length);
		$newStr = $strLeft . $strRight;
		return $newStr;
	}
}
</code>
</pre>
<p>You could also shorten this a couple of lines by using <a href="http://us2.php.net/manual/en/function.substr-replace.php">substr_replace</a>.</p>
<pre>
<code>
if(!function_exists('str_remove')) {
	function str_remove($str, $startOffset, $length) {
		$newStr = substr_replace($str, "", $startOffset, $length);
		return $newStr;
	}
}
</code>
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cborrow.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cborrow.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cborrow.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cborrow.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cborrow.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cborrow.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cborrow.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cborrow.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cborrow.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cborrow.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cborrow.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cborrow.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cborrow.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cborrow.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cborrow.wordpress.com&amp;blog=509271&amp;post=28&amp;subd=cborrow&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cborrow.wordpress.com/2009/12/16/quick-php-function-str_remove/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5f1f7db404b48762af074c094d5fac9a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cborrow</media:title>
		</media:content>
	</item>
		<item>
		<title>MyLaunch &#8211; A application / whatever else launcher.</title>
		<link>http://cborrow.wordpress.com/2009/11/13/mylaunch-a-application-whatever-else-launcher/</link>
		<comments>http://cborrow.wordpress.com/2009/11/13/mylaunch-a-application-whatever-else-launcher/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 22:06:01 +0000</pubDate>
		<dc:creator>Cory Borrow</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Desktop Development]]></category>

		<guid isPermaLink="false">http://cborrow.wordpress.com/?p=17</guid>
		<description><![CDATA[You may have seen or used application launchers on diffrent platforms such as Quicksilver on Mac OSX Gnome Do or Linux or Launchy on Windows / Linux. Well I have used launch before, as well as a couple of other &#8230; <a href="http://cborrow.wordpress.com/2009/11/13/mylaunch-a-application-whatever-else-launcher/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cborrow.wordpress.com&amp;blog=509271&amp;post=17&amp;subd=cborrow&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You may have seen or used application launchers on diffrent platforms such as <a href="http://docs.blacktree.com/quicksilver/what_is_quicksilver">Quicksilver</a> on Mac OSX <a href="http://do.davebsd.com/">Gnome Do</a> or Linux or <a href="http://www.launchy.net/">Launchy</a> on Windows / Linux.</p>
<p>Well I have used launch before, as well as a couple of other app launchers but never really found exactly what I wanted, so I made my own, firstly because I can make it how I want it, and secondly it&#8217;s a good learning experince.</p>
<p>MyLaunch looks similar to launchy however acts more like quicksilver or gnome do in the sense that you type a action and a argument to send to the action.</p>
<p>So if I wanted to start notepad I would type run notepad. If I wanted to search google I would type google mysearch or lets say I wanted to open Explorer into a certin directory well I can type win C:\mydir and open explorer there.</p>
<p>The run command is the only one built it by default the other two I listed google and win are added using plugins, which you can create your self using and .NET language.</p>
<p>So how about some screenshots now.</p>
<p>This is MyLaunch while typing in Notepad, you can see it completion the word notepad.</p>
<p><img class="alignnone size-full wp-image-19" title="MyLaunch ready to launch Notepad." src="http://cborrow.files.wordpress.com/2009/11/mylaunch1.png?w=584" alt="MyLaunch ready to launch Notepad."   /></p>
<p>This is MyLaunch while typing google for a google search, as you can see it completes these words as well.</p>
<p><img class="alignnone size-full wp-image-20" title="MyLaunch completion a action" src="http://cborrow.files.wordpress.com/2009/11/mylaunch2.png?w=584" alt="MyLaunch completion a action"   /></p>
<p>It&#8217;s a pretty simple launcher, but can be quite powerful with plugins. It&#8217;s also<br />
just how I like it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cborrow.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cborrow.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cborrow.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cborrow.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cborrow.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cborrow.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cborrow.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cborrow.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cborrow.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cborrow.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cborrow.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cborrow.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cborrow.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cborrow.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cborrow.wordpress.com&amp;blog=509271&amp;post=17&amp;subd=cborrow&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cborrow.wordpress.com/2009/11/13/mylaunch-a-application-whatever-else-launcher/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5f1f7db404b48762af074c094d5fac9a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cborrow</media:title>
		</media:content>

		<media:content url="http://cborrow.files.wordpress.com/2009/11/mylaunch1.png" medium="image">
			<media:title type="html">MyLaunch ready to launch Notepad.</media:title>
		</media:content>

		<media:content url="http://cborrow.files.wordpress.com/2009/11/mylaunch2.png" medium="image">
			<media:title type="html">MyLaunch completion a action</media:title>
		</media:content>
	</item>
		<item>
		<title>C# Remove flickering in MDI applications.</title>
		<link>http://cborrow.wordpress.com/2009/11/13/c-remove-flicker-in-mdi-applications/</link>
		<comments>http://cborrow.wordpress.com/2009/11/13/c-remove-flicker-in-mdi-applications/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 17:24:52 +0000</pubDate>
		<dc:creator>Cory Borrow</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Desktop Development]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://cborrow.wordpress.com/?p=6</guid>
		<description><![CDATA[If you have ever been working with MDI applications, and while to MDI windows are while the MDI windows are maximized and you switch you see a flicker of the windows. Well below is a simple quick fix for solving &#8230; <a href="http://cborrow.wordpress.com/2009/11/13/c-remove-flicker-in-mdi-applications/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cborrow.wordpress.com&amp;blog=509271&amp;post=6&amp;subd=cborrow&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you have ever been working with MDI applications, and while to MDI windows are while the MDI windows are maximized and you switch you see a flicker of the windows.</p>
<p>Well below is a simple quick fix for solving this issue.</p>
<p>So firstly lets define some constants that we will be using.</p>
<pre>
<code>
const int WM_NCPAINT = 0x85;
const int WM_SIZE = 0x05;
</code>
</pre>
<p>Now override the WndProc method in the MDI child window(s).</p>
<pre>
<code>
protected override void WndProc(ref Message m)
{
    if (m.Msg == WM_NCPAINT)
    {
        if(this.WindowState == FormWindowState.Maximized)
            return;
    }

    if (m.Msg == WM_SIZE)
    {
        if (this.WindowState == FormWindowState.Maximized)
            return;
    }

     base.WndProc(ref m);
}
</code>
</pre>
<p>and viola your flickering issues are gone.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cborrow.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cborrow.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cborrow.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cborrow.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cborrow.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cborrow.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cborrow.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cborrow.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cborrow.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cborrow.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cborrow.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cborrow.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cborrow.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cborrow.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cborrow.wordpress.com&amp;blog=509271&amp;post=6&amp;subd=cborrow&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cborrow.wordpress.com/2009/11/13/c-remove-flicker-in-mdi-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5f1f7db404b48762af074c094d5fac9a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cborrow</media:title>
		</media:content>
	</item>
	</channel>
</rss>
