<?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/"
	>

<channel>
	<title>Aaron Gadberry &#187; Computers</title>
	<atom:link href="http://www.gadberry.com/aaron/category/computers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gadberry.com/aaron</link>
	<description>Help - v. helped, helpÂ·ing, helps</description>
	<lastBuildDate>Thu, 02 Sep 2010 13:42:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Facebook Phonebook</title>
		<link>http://www.gadberry.com/aaron/2010/07/09/facebook-phonebook/</link>
		<comments>http://www.gadberry.com/aaron/2010/07/09/facebook-phonebook/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 14:39:17 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://www.gadberry.com/aaron/?p=211</guid>
		<description><![CDATA[Yesterday I saw a status message set to: *WARNING**Go to the top right of your screen, click Account &#38; then click Edit Friends. Go to the left side of your screen and click Phonebook. Everyone’s phone # is being published. Please repost (sic) to let your friends know of this change in security, so that [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I saw a status message set to:</p>
<blockquote><p>*WARNING**Go to the top right of your screen, click Account &amp; then click Edit Friends. Go to the left side of your screen and click Phonebook. Everyone’s phone # is being published. Please repost (sic) to let your friends know of this change in security, so that they can remove their phone numbers or change their privacy settings…</p></blockquote>
<p>I went and checked out my <a href="http://www.facebook.com/friends/?phonebook">Phonebook</a> and noticed that all the phone numbers in there were from Facebook friends that had them listed in their profiles.  I think it&#8217;s not so bad for Facebook to organize the information that people have made available to me already.  Apparently this is a pretty old feature I had just never seen.  False alarm.  Nothing to see here.</p>
<p>Then I saw this message at the top of the screen.</p>
<blockquote><p>To learn more about Phonebook or to delete any contacts imported from your phone, click here.</p></blockquote>
<p><span id="more-211"></span><br />
From my phone?!?  Click&#8230;</p>
<blockquote><p>Facebook Phonebook displays contacts you have imported from your phone, as well as your Facebook friends. If you would like to remove your mobile contacts from Facebook, you need to disable the feature on your mobile phone and visit this page.</p></blockquote>
<blockquote><p>Remove Imported Contacts</p>
<p>When you import contacts into Facebook from your email, mobile, or instant messaging service, we may use this information to create friend suggestions for you and your friends. We also display these contacts in your Facebook Phonebook.</p>
<p>If you choose to remove your imported contacts, they will no longer appear in your Phonebook and friend suggestions may be less relevant to you and your friends.</p>
<p>To remove all imported contacts, please make sure to disable the Facebook synchronization feature on your phone first, if you have ever enabled it. Then, click the &#8216;Remove&#8217; button below.</p></blockquote>
<p>It turns out that Facebook is uploading contact information from your phone and storing the phone numbers.  I can&#8217;t find any official information about this beyond what I posted above.  Within Phonebook though, it looks to me as if imported numbers have a phone icon, while profile numbers list MOBILE or HOME, etc.</p>
<p>This information is not being formally added to profiles, but it is obviously associated with accounts.  Why is this upsetting?  Because Facebook has my phone number, you know that one I intentionally left off Facebook.  I see no options to view or remove this information.  I can&#8217;t even see what they have on me.  It wouldn&#8217;t surprise me if Facebook is collecting other contact data from phones, such as email address, physical address, birthday, messenger screennames, and other contact information that most phones store.</p>
<p>I checked a friend&#8217;s Phonebook and Blackberry®, and several phone numbers had been imported.  In the Blackberry® Facebook app there is a setting under Options to disable the syncing of Contacts.  I do not know if it is enabled by default.</p>
<p>After some more searching it looks like not all phones with a Facebook app are syncing this information.  I have an HTC Hero with an Android Facebook App and a HTC Facebook App and I have Sync Contacts checked, however none of the phone numbers in my Phonebook came from my phone.  They are all listed on profiles.  I&#8217;m sure eventually Facebook will upgrade their android app to sync as well.</p>
<p>If anyone has any information about other phones, or better Facebook apps that can enable a one way only sync, please post in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gadberry.com/aaron/2010/07/09/facebook-phonebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Teather a Laptop to a Sanyo PRO-700 for Internet via Bluetooth</title>
		<link>http://www.gadberry.com/aaron/2008/08/29/teather-a-laptop-to-a-sanyo-pro-700-for-internet-via-bluetooth/</link>
		<comments>http://www.gadberry.com/aaron/2008/08/29/teather-a-laptop-to-a-sanyo-pro-700-for-internet-via-bluetooth/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 14:53:21 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://www.gadberry.com/aaron/?p=172</guid>
		<description><![CDATA[After 7 calls and 2.5 hours on hold with Sprint I have finally done it. It was really not that difficult, I just needed the special number to dial (#777) to make it happen. For the rest of you here is a step by step guide. Turn bluetooth on for the PC and the phone [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gadberry.com/aaron/wp-content/uploads/2008/08/pro700.png"><img src="http://www.gadberry.com/aaron/wp-content/uploads/2008/08/pro700-300x235.png" alt="" title="pro700" width="300" height="235" class="alignright size-medium wp-image-171" /></a></p>
<p>After 7 calls and 2.5 hours on hold with Sprint I have finally done it.<br />
It was really not that difficult, I just needed the special number to dial (#777) to make it happen.<br />
For the rest of you here is a step by step guide.</p>
<ol>
<li>Turn bluetooth on for the PC and the phone (Menu, Settings, Bluetooth, On)</li>
<li>Add the computer as a trusted device on the phone (Shouldn&#8217;t be necessary but it seems to not work without this configured first)</li>
<ol>
<li>On the phone visit Menu, Settings, Bluetooth, Trusted Devices, Add New</li>
<li>Choose search.  Select your PC name from the list and choose &#8220;Add to Trusted&#8221;</li>
<li>Enter a NUMERIC pin on the phone. Press Done</li>
<li>The System Tray on the PC will pop up with a pair request.  Click on it and enter the code you just entered on the phone.  Press OK.</li>
<li>Name the device on the phone (or leave it the same) and press OK</li>
</ol>
<li>Make the phone visible (Menu, Settings, Bluetooth, Visibility, Visible for 3 min.)</li>
<li>Open My Bluetooth Places on the PC (Right click on Bluetooth System Tray Icon)</li>
<li>Choose Bluetooth Setup Wizard link on the left of My Bluetooth Places.</li>
<li>Choose &#8220;I know the service I want to use and I want to find a Bluetooth device that provides that service&#8221; and press Next.</li>
<li>Choose &#8220;Dial Up Networking&#8221; and press next.</li>
<li>Choose the icon representing your phone and press next.</li>
<li>Press &#8220;Configure&#8221;</li>
<li>Press &#8220;Configure&#8221; again</li>
<li>Put in the phone number #777 and press Ok twice.  Press Finish</li>
<li>Bubble will appear from System Tray asking about pairing.  Click on it.</li>
<li>Enter an security code using NUMBERS and press Ok</li>
<li>Phone will alert you of an attempted pairing.  Choose Yes, enter the security code you just made up and then choose ok.</li>
<li>Connection will succeed and Dial Up Networking dialog will appear on the computer.</li>
<li>Username and password should be empty and phone number should be #777.  Press Dial</li>
<li>It should connect.  Your phone will ask you if you want to accept the connection.  Say yes</li>
<li>The phone screen will change to read Data Connection.</li>
<li>Your computer is online!</li>
</ol>
<p>Other things you can do to improve your experience&#8230;</p>
<ul>
<li>Turn on auto-accept on the phone for the trusted device</li>
<li>Stop the PC from asking you the username, password and phone number by&#8230;
<ol>
<li>Right click on the phone in the My Bluetooth Places screen and choose properties</li>
<li>Choose Configure, then the options tab</li>
<li>Uncheck prompt for name and password and prompt for phone number</li>
<li>Choose OK and then OK again</li>
</ol>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.gadberry.com/aaron/2008/08/29/teather-a-laptop-to-a-sanyo-pro-700-for-internet-via-bluetooth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use NULLS FIRST in TOPLink Expression API Ordering</title>
		<link>http://www.gadberry.com/aaron/2008/01/22/use-nulls-first-in-toplink-expression-api-ordering/</link>
		<comments>http://www.gadberry.com/aaron/2008/01/22/use-nulls-first-in-toplink-expression-api-ordering/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 01:37:36 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.gadberry.com/aaron/2008/01/22/use-nulls-first-in-toplink-expression-api-ordering/</guid>
		<description><![CDATA[There is no specific method for NULLS FIRST (default is NULLS LAST), but you can still accomplish this through the expression api. You can simply append some sql to the end of your ordering field expression and it will take care of it for you. For example, if you are ordering by the name then [...]]]></description>
			<content:encoded><![CDATA[<p>There is no specific method for NULLS FIRST (default is NULLS LAST), but you can still accomplish this through the expression api.</p>
<p>You can simply append some sql to the end of your ordering field expression and it will take care of it for you.</p>
<p>For example, if you are ordering by the name then this would put the nulls last (default):</p>
<div class="code_box"><code>query.addOrdering(builder.get("name"));
</code></div>
<p>This code could be ammended into the following to put nulls first:</p>
<div class="code_box"><code>query.addOrdering(builder.get("name").postfixSQL("NULLS FIRST"));
</code></div>
<p>It&#8217;s that easy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gadberry.com/aaron/2008/01/22/use-nulls-first-in-toplink-expression-api-ordering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find the Difference Between two Java Dates (Calendars)</title>
		<link>http://www.gadberry.com/aaron/2007/08/17/find-the-difference-between-two-java-dates-calendars/</link>
		<comments>http://www.gadberry.com/aaron/2007/08/17/find-the-difference-between-two-java-dates-calendars/#comments</comments>
		<pubDate>Fri, 17 Aug 2007 20:40:58 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.gadberry.com/aaron/2007/08/17/find-the-difference-between-two-java-dates-calendars/</guid>
		<description><![CDATA[Well the first question to ask is what unit do you want the difference in. This is one of the reasons many people stick to incremental date math instead of math returning an int. Lets say you want to do a basic age calculation. How old is Joe? His birthday is 7/29/1981. Well you could [...]]]></description>
			<content:encoded><![CDATA[<p>Well the first question to ask is what unit do you want the difference in.  This is one of the reasons many people stick to incremental date math instead of math returning an int.</p>
<p>Lets say you want to do a basic age calculation.  How old is Joe?  His birthday is 7/29/1981.  Well you could subtract 1981 from today, then determine if he had a birthday this year, which could mean comparing everything up to the milliseconds.  The problem is, such a calculation is not as accurate as it would seem.  This style method fails to preserve the validity of the passing of leap years, leap seconds, etc.  If you asked how many days old Joe is then your answer would be something like 365 * (current &#8211; 1981) + number of days this year &#8211; number of days between Jan 1 and July 29.  Well you forgot a few leap days in there, at least 5.<br />
<span id="more-106"></span><br />
I don&#8217;t know about you, but inaccurate results bug me.  So I went about researching the correct way to solve this problem.  Turns out that adding through the Calendar add method preserves these little nuances.  The way to solve this is to increment one date until it passes the second date, counting the times it is incremented.</p>
<p>What?!?  But it will take forever to count the number of days that passed between Joe&#8217;s birthday and today!  What if I needed to know the number of hours, seconds, or even worse, milliseconds?  Well we can build in some optimization just for that.</p>
<p>The method I wrote has the following signature <span class="code_line"><code>CalendarUtils.difference(Calendar c1, Calendar c2, int unit);</code></span>.  To figure out Joe&#8217;s age we would call it with something like <span class="code_line"><code>CalendarUtils.difference(birthday, today, Calendar.YEAR);</code></span>.</p>
<p>Enough with the small talk.  Here&#8217;s the code.  It happens to be part of an open source project I work on, <a href="http://code.google.com/p/jexel/">JExel</a>.  Here is the most recent, complete <a href="http://jexel.googlecode.com/svn/Expression/src/com/gadberry/utility/CalendarUtils.java">CalendarUtils.java</a>.</p>
<div class="code_box"><code>
public static long difference(Calendar c1, Calendar c2, int unit) {

	differenceCheckUnit(unit);

	Map&lt;Integer, Long&gt; unitEstimates = differenceGetUnitEstimates();

	Calendar first = (Calendar) c1.clone();
	Calendar last = (Calendar) c2.clone();

	long difference = c2.getTimeInMillis() - c1.getTimeInMillis();

	long unitEstimate = unitEstimates.get(unit).longValue();
	long increment = (long) Math.floor((double) difference / (double) unitEstimate);
	increment = Math.max(increment, 1);

	long total = 0;

	while (increment &gt; 0) {
		add(first, unit, increment);
		if (first.after(last)) {
			add(first, unit, increment * -1);
			increment = (long) Math.floor(increment / 2);
		} else {
			total += increment;
		}
	}

	return total;

}

private static Map&lt;Integer, Long&gt; differenceGetUnitEstimates() {
	Map&lt;Integer, Long&gt; unitEstimates = new HashMap&lt;Integer, Long&gt;();
	unitEstimates.put(Calendar.YEAR, 1000l * 60 * 60 * 24 * 365);
	unitEstimates.put(Calendar.MONTH, 1000l * 60 * 60 * 24 * 30);
	unitEstimates.put(Calendar.DAY_OF_MONTH, 1000l * 60 * 60 * 24);
	unitEstimates.put(Calendar.HOUR_OF_DAY, 1000l * 60 * 60);
	unitEstimates.put(Calendar.MINUTE, 1000l * 60);
	unitEstimates.put(Calendar.SECOND, 1000l);
	unitEstimates.put(Calendar.MILLISECOND, 1l);
	return unitEstimates;
}

private static void differenceCheckUnit(int unit) {
	List&lt;Integer&gt; validUnits = new ArrayList&lt;Integer&gt;();
	validUnits.add(Calendar.YEAR);
	validUnits.add(Calendar.MONTH);
	validUnits.add(Calendar.DAY_OF_MONTH);
	validUnits.add(Calendar.HOUR_OF_DAY);
	validUnits.add(Calendar.MINUTE);
	validUnits.add(Calendar.SECOND);
	validUnits.add(Calendar.MILLISECOND);

	if (!validUnits.contains(unit)) {
		throw new RuntimeException(
				"CalendarUtils.difference one of these units 
				Calendar.YEAR,
				Calendar.MONTH,
				Calendar.DAY_OF_MONTH,
				Calendar.HOUR_OF_DAY,
				Calendar.MINUTE,
				Calendar.SECOND,
				Calendar.MILLISECOND."
				);
	}
}

public static void add(Calendar c, int unit, long increment) {
	while (increment &gt; Integer.MAX_VALUE) {
		c.add(unit, Integer.MAX_VALUE);
		increment -= Integer.MAX_VALUE;
	}
	c.add(unit, (int) increment);
}

</code></div>
<p>You can find the JUnit test cases I run this method through <a href="http://jexel.googlecode.com/svn/Expression/tests/com/gadberry/utility/CalendarUtilsTests.java">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gadberry.com/aaron/2007/08/17/find-the-difference-between-two-java-dates-calendars/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>JExel &#8211; Java Based Expression Language Parser</title>
		<link>http://www.gadberry.com/aaron/2007/07/26/jexel-java-based-expression-language-parser/</link>
		<comments>http://www.gadberry.com/aaron/2007/07/26/jexel-java-based-expression-language-parser/#comments</comments>
		<pubDate>Fri, 27 Jul 2007 03:35:02 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.gadberry.com/aaron/2007/07/26/jexel-java-based-expression-language-parser/</guid>
		<description><![CDATA[I have published a pet project of mine online recently. After looking at many different project hosting sites I resolved on google code. It seems to have a great interface and amount of space available. The project is called JExel, and is a Java based expression language parser. It&#8217;s not complex to utilize, and can [...]]]></description>
			<content:encoded><![CDATA[<p>I have published a pet project of mine online recently.  After looking at many different project hosting sites I resolved on google code.  It seems to have a great interface and amount of space available.</p>
<p>The project is called JExel, and is a Java based expression language parser.  It&#8217;s not complex to utilize, and can be the perfect plugin library for usage in your larger Java application.  JExel parses string expressions to an object result.  It comes with native boolean, math, string and date functionality.</p>
<p>A boolean expression utilization would look something like <span class="code_line"><code>Expression.evaluateToBoolean("true AND false");</code></span> and, in this case, would return a <span class="code_line"><code>new Boolean(false);</code></span>.</p>
<p>Of course there are also included methods <span class="code_line"><code>evaluateToDouble(String)</code></span> and <span class="code_line"><code>evaluateToString(String)</code></span>.</p>
<p>Additionally there is a plain <span class="code_line"><code>evaluate(String)</code></span> method that returns an Argument.  You can then call getObject() on the resulting Argument and get the actual Object result.</p>
<p>You can expand on the included operators, and write your own to accomplish your own task.  You can provide a Resolver which can resolve string variables found in the expression via your own needs.  Say you had an expression like <span class="code_line"><code>Expression.evaluateToDouble("path/to/variable + otherVariable");</code></span>.  This means if you provide a resolver then you can gain variable resolution relevant to your own project.  Maybe path/to/variable is translated into &#8220;6&#8243; and otherVariable is translated into &#8220;4&#8243;.  Then the result would be 10.</p>
<p>Have fun!  <a href="http://code.google.com/p/jexel/">Start Exploring JExel</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gadberry.com/aaron/2007/07/26/jexel-java-based-expression-language-parser/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Inject Build Time (timestamp) Property Using Maven</title>
		<link>http://www.gadberry.com/aaron/2007/05/28/inject-build-time-timestamp-property-using-maven/</link>
		<comments>http://www.gadberry.com/aaron/2007/05/28/inject-build-time-timestamp-property-using-maven/#comments</comments>
		<pubDate>Mon, 28 May 2007 19:49:04 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.gadberry.com/aaron/2007/05/28/inject-build-time-timestamp-property-using-maven/</guid>
		<description><![CDATA[In your pom.xml you have the ability to turn on resource filtering that replaces variables in resource files with actual values. These are useful for things like ${pom.name} and ${pom.version}. Your pom.xml section would look something like this&#8230; &#60;build&#62; &#60;resources&#62; &#60;resource&#62; &#60;directory&#62;src/main/resources&#60;/directory&#62; &#60;filtering&#62;true&#60;/filtering&#62; &#60;/resource&#62; &#60;/resources&#62; &#60;/build&#62; And your properties file could contain something like these [...]]]></description>
			<content:encoded><![CDATA[<p>In your pom.xml you have the ability to turn on resource filtering that replaces variables in resource files with actual values.  These are useful for things like ${pom.name} and ${pom.version}.  Your pom.xml section would look something like this&#8230;</p>
<div class="code_box"><code>&lt;build&gt;
  &lt;resources&gt;
    &lt;resource&gt;
      &lt;directory&gt;src/main/resources&lt;/directory&gt;
      &lt;filtering&gt;true&lt;/filtering&gt;
    &lt;/resource&gt;
  &lt;/resources&gt;
&lt;/build&gt;
</code></div>
<p>And your properties file could contain something like these</p>
<div class="code_box"><code># Build Time Information
APPLICATION.NAME=${pom.name}
APPLICATION.VERSION=${pom.version}</code></div>
<p><span id="more-103"></span><br />
There is a list of available properties that you can use here <a href="http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide">http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide</a></p>
<p>Onto the difficult part.  There is no automatic variable that references a current timestamp for use as a buildtime property.  I want a buildtime property available to my webapp so I can see very easily when the currently deployed version was built.</p>
<p>Here is how I accomplished it (it wasn&#8217;t that hard).<br />
There are a few steps to this.</p>
<ol>
<li>Put a placeholder in the properties file.</li>
<li>Replace the placeholder with a timestamp at build time</li>
<li>Remove the updated file to allow the file to be refreshed at the next build time</li>
</ol>
<p>Step 1: Add a property such as <span class="code_line"><code>APPLICATION.BUILDTIME=HOLDER</code></span></p>
<p>Step 2: Include an ant execution in your build.  This is not extremely difficult.  Place a plugin in the plugins tag in the POM.</p>
<div class="code_box"><code>
&lt;plugin&gt;
  &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
  &lt;executions&gt;
    &lt;execution&gt;
      &lt;id&gt;set-build-time&lt;/id&gt;
      &lt;phase&gt;process-sources&lt;/phase&gt;
      &lt;configuration&gt;
        &lt;tasks&gt;
          &lt;tstamp&gt;
            &lt;format property="timestamp" pattern="yyyy/MM/dd HH:mm:ss z"/&gt;
          &lt;/tstamp&gt;
          &lt;replaceregexp byline="true"&gt;
            &lt;regexp pattern="APPLICATION\.BUILDTIME=HOLDER" /&gt;
            &lt;substitution expression="APPLICATION.BUILDTIME=${timestamp}" /&gt;
            &lt;fileset dir="src/main/resources/pathToPropertyFileDirectory" includes="*.properties" /&gt;
          &lt;/replaceregexp&gt;
        &lt;/tasks&gt;
      &lt;/configuration&gt;
      &lt;goals&gt;
        &lt;goal&gt;run&lt;/goal&gt;
      &lt;/goals&gt;
    &lt;/execution&gt;
  &lt;/executions&gt;
&lt;/plugin&gt;
</code></div>
<p>This will do a regular expression find and replace on HOLDER with the timestamp.</p>
<p>Step 3: I am using continuum so I must clean up my files before continuing.  I use a post cleanup method, and it looks something like this.  I put this under the profiles tag.</p>
<div class="code_box"><code>&lt;profile&gt;
  &lt;id&gt;cleanProperties&lt;/id&gt;
  &lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
        &lt;executions&gt;
          &lt;execution&gt;
            &lt;id&gt;cleanProperties&lt;/id&gt;
            &lt;phase&gt;package&lt;/phase&gt;
            &lt;goals&gt;
              &lt;goal&gt;run&lt;/goal&gt;
            &lt;/goals&gt;
            &lt;configuration&gt;
              &lt;tasks&gt;
                &lt;delete dir="./src/main/resources/pathToPropertyFileDirectory" /&gt;
              &lt;/tasks&gt;
            &lt;/configuration&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;
&lt;/profile&gt;</code></div>
<p>As a final note, do not forget to include the profile when you build your project.  The flag is -P.</p>
<p>And there you have it.  Since it is a POST cleanup you may have to build twice for it to operator properly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gadberry.com/aaron/2007/05/28/inject-build-time-timestamp-property-using-maven/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Convert XviD to IPOD</title>
		<link>http://www.gadberry.com/aaron/2007/05/05/convert-xvid-to-ipod/</link>
		<comments>http://www.gadberry.com/aaron/2007/05/05/convert-xvid-to-ipod/#comments</comments>
		<pubDate>Sun, 06 May 2007 01:40:47 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://www.gadberry.com/aaron/2007/05/05/convert-xvid-to-ipod/</guid>
		<description><![CDATA[After searching high and low today I have found the best way to convert XviD videos to the format used by the 30GB Video IPOD. The programs I decided against were&#8230; Media Coder APlus Video to IPOD Videora IPOD Converter StaxRip The program I went with was&#8230;3GP Converter. This program is very simple and fast [...]]]></description>
			<content:encoded><![CDATA[<p>After searching high and low today I have found the best way to convert XviD videos to the format used by the 30GB Video IPOD.  The programs I decided against were&#8230;</p>
<ul>
<li><a href="http://mediacoder.sourceforge.net/">Media Coder</a></li>
<li><a href="http://www.tomp4.com/">APlus Video to IPOD</a></li>
<li><a href="http://www.videora.com/en-us/Converter/iPod/">Videora IPOD Converter</a></li>
<li><a href="http://www.planetdvb.net/staxrip/">StaxRip</a></li>
</ul>
<p>The program I went with was&#8230;<a href="http://www.videohelp.com/tools/3GP_Converter">3GP Converter</a>.</p>
<p>This program is very simple and fast both to install (unzip and run setup, choose English, choose Ipod) and to use (choose a format, an output folder, and the files).</p>
<p>Here are some guides.</p>
<ul>
<li><a href="http://www.geocities.com/jk2000_at_pa_dot_net/avi_iPod.htm">http://www.geocities.com/jk2000_at_pa_dot_net/avi_iPod.htm</a></li>
<li><a href="http://www.tagworld.com/ssj2_goha/PostDetail.aspx?id=8d1b3912-3d83-49b2-abc5-28d6f26e67a8">http://www.tagworld.com/ssj2_goha/PostDetail.aspx?id=8d1b3912-3d83-49b2-abc5-28d6f26e67a8</a></li>
</ul>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gadberry.com/aaron/2007/05/05/convert-xvid-to-ipod/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hosting Issues</title>
		<link>http://www.gadberry.com/aaron/2007/02/19/hosting-issues/</link>
		<comments>http://www.gadberry.com/aaron/2007/02/19/hosting-issues/#comments</comments>
		<pubDate>Tue, 20 Feb 2007 00:36:17 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Server Management]]></category>

		<guid isPermaLink="false">http://www.gadberry.com/aaron/2007/02/19/hosting-issues/</guid>
		<description><![CDATA[Sorry to everyone out there. I&#8217;ve had some major downtime issues the past 3-4 days. I really like my host but 3 days downtime is enough that I think I&#8217;m going to switch. Update:I have decided to stay with my host. They have been very good in the areas of support, and that is very [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry to everyone out there.  I&#8217;ve had some major downtime issues the past 3-4 days.  I really like my host but 3 days downtime is enough that I think I&#8217;m going to switch.</p>
<p>Update:I have decided to stay with my host.  They have been very good in the areas of support, and that is very valuable with my customized needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gadberry.com/aaron/2007/02/19/hosting-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing Stylesheets Dynamically</title>
		<link>http://www.gadberry.com/aaron/2006/02/22/changing-stylesheets-dynamically/</link>
		<comments>http://www.gadberry.com/aaron/2006/02/22/changing-stylesheets-dynamically/#comments</comments>
		<pubDate>Thu, 23 Feb 2006 05:24:10 +0000</pubDate>
		<dc:creator>Paradochs</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.gadberry.com/aaron/2006/02/22/changing-stylesheets-dynamically/</guid>
		<description><![CDATA[Introduction If you are one of those select few who have multiple stylesheets for their website, then this article is for you. On the other hand, whether you know CSS or not, this might be a good way for you to learn. I know of 4 ways to change between styles dynamically in a page. [...]]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>If you are one of those select few who have multiple stylesheets for their website, then this article is for you. On the other hand, whether you know CSS or not, this might be a good way for you to learn.<br />
I know of 4 ways to change between styles dynamically in a page. They are listed below with some code examples.</p>
<p><span id="more-94"></span></p>
<h3>My Experience</h3>
<p>Originally I created my website using only HTML and tables. That meant long and ugly code, plus it was terrible to maintain. I learned enough CSS to rewrite my page using only CSS and HTML without attributes or tables. This gave me the power to have only content in my HTML, separated by &lt;div&gt; tags. When designing the HTML of a page so that it can be redesigned using CSS, throw in as many &lt;div&gt;&#8217;s as you want. Think of it like object oriented programming: You don&#8217;t want to define a whole slew of pieces all on the same level. You want a container class, sections, parts, etc. Don&#8217;t be afraid of how many &lt;div&gt;&#8217;s you have, just name them well (using ID or class).<br />
Once I had finished rewriting my page so that it looked identical to the original, I decided to overhaul the look of the page. I searched for some designs that I liked, and found a couple that I thought would work. I took the original stylesheet and modified it piece by piece to get a totally different design. This way is easier because you don&#8217;t have to rewrite the entire stylesheet class by class, just modifying, adding, and deleting attributes and values.<br />
At this point I got too excited about it and wrote a total of five styles for my page. I wanted people to see all of them, so I came up with some ways to swap between the styles. I set up a voting script so that the style with the most votes automatically becomes the default. While adding more styles is fun and you learn quite a bit about design of CSS and HTML while doing it, it becomes very difficult to add a section to your page, because you have to add it to all your stylesheets also. (In most cases).<br />
Here are the different ways I know of to change between styles dynamically.</p>
<h3>Multiple &lt;link&gt; Tags in Header</h3>
<p>If you put multiple &lt;link&gt; tags with names, Firefox will be able to switch between them using the dropdown menu. When I did this, it worked perfectly for Firefox only. IE displayed different parts of the page in different styles (obviously it didn&#8217;t work) and also there was no way to switch. I ruled out this option for now until IE catches up to Firefox. (Therefore this will never be a viable option)   :)</p>
<div class="code_box"><code>
&lt;link rel='stylesheet' type='text/css' href='first.css' title='First'&gt;
&lt;link rel='stylesheet' type='text/css' href='second.css' title='Second'&gt;
&lt;link rel='stylesheet' type='text/css' href='third.css' title='Third'&gt;
</code></div>
<h3>Using PHP and GET Variables</h3>
<p>This is the best (most stable) way that I&#8217;ve implemented so far. When a page is loaded, simply pull the GET variable &#8220;style&#8221; out of the address bar. If there isn&#8217;t one, then set the variable equal to a default style. Use that variable as the stylesheet filename.<br />
The problem with this is that you have to use PHP or some other script language to implement it. If you already are using one then it is not a problem at all. Another problem is that you have to add the <span class="code_line"><code>"?style=whatever.css"</code></span> dynamically to all of your internal links. Basically, any time you click on a link, it has to have the stylesheet GET variable at the end of the line. This can also be done with PHP, but not too easily, especially if you already are using GET variables. There is an example of code below. </p>
<div class="code_box"><code>
&lt;?php
	if(isset($_GET[style]))
		$style = $_GET[style];
	else if(!isset($_SESSION[style]))
		$style = "default.css";
	echo "
	&lt;link rel='stylesheet' type='text/css' href='$style' title='Current'&gt;
	";
?&gt;
</code></div>
<h3>Using PHP, GET Variables and Sessions</h3>
<p>This is the same concept as the idea above, but instead of having the GET variable on every single page and link, simply set up a script that, if the GET variable is set, sets a session variable with the value of the GET variable. Then when you create your &lt;link&gt; tag, you simply use the session value as the filename.<br />
The drawbacks similar to above because you have to use a scripting language to set the session variable and echo it back to the &lt;link&gt; tag. The upside is that you don&#8217;t have to change any of your links. To change between two styles all you have to have is a link with <span class="code_line"><code>href="?style=whatever.css"</code></span>. That will reload the current page with the style of whatever.css.<br />
Here&#8217;s how I implemented it. This code didn&#8217;t work very well for me, but did work sometimes.</p>
<div class="code_box"><code>
&lt;?php
	session_start();
	if(isset($_GET[style]))
		$_SESSION[style] = $_GET[style];
	else if(!isset($_SESSION[style]))
		$_SESSION[style] = "default.css";

	echo "
	&lt;link rel='stylesheet' type='text/css' href='$_SESSION[style]' title='Current'&gt;
	";
?&gt;
</code></div>
<h3>Using PHP, GET Variables and Cookies (The best and most stable way)</h3>
<p>This is the best and cleanest way I&#8217;ve found so far. There is no GET variable in every address, and it has worked perfectly for me so far. It is basically the same as the idea above with session variables. Set a cookie to the default stylesheet filename. If there is a GET variable, set the cookie to it instead. When the &lt;link&gt; is set, use the cookie variable to fill in the filename. This works great for me and hasn&#8217;t broken yet. The cookie will stay set, so when a user returns to the page, the latest style the user has chosen is displayed by default. The only minor bug is if your stylesheets change order or you add some. The index might be off and they will view a different page by default the first time they return.<br />
The cookie name can NOT be &#8220;STYLE&#8221;. Firefox accepts it, but it won&#8217;t work in IE. </p>
<div class="filename">functions.php</div>
<div class="code_box"><code>
&lt;?php
	function setCurrentStyle($styleSheets)
	{
		$styleIndexToUse = 0;

		if(!isset($_COOKIE["MYSTYLE"]))
		{
			if(isset($_SESSION["MYSTYLE"]))
			{
				$styleIndexToUse = $_SESSION["MYSTYLE"];
			}
			else
			{
				$styleIndexToUse = 0;
			}
		}
		else
		{
			$styleIndexToUse = $_COOKIE["MYSTYLE"];
		}

		echo "&lt;link href='stylesheets/$styleSheets[$styleIndexToUse][cssname]' rel='stylesheet' type='text/css' /&gt;";
	}
?&gt;
</code></div>
<p>This is the page that changes the stylesheet index. Simply create a link like <span class="code_line"><code>&lt;a href="setstyle.php?SETSTYLE=0" title="Blue Haven"&gt;Blue Haven&lt;/a&gt;</code></span>. Changing the &#8220;0&#8243; and &#8220;Blue Haven&#8221; to whatever you want the style to be.</p>
<div class="filename">setstyle.php</div>
<div class="code_box"><code>
&lt;?php

	// SET COOKIE FOR 1 YEAR
	if(isset($_REQUEST["SETSTYLE"]))
	{
		if(setcookie("testcookie",true))
		{
			setcookie("MYSTYLE",$_REQUEST["SETSTYLE"],time()+31622400);
		}
		else
		{	
			$_SESSION["MYSTYLE"]=$_REQUEST["SETSTYLE"];
		}
	}

	// RETURN TO CALLER PAGE
	header("Location: ".$_SERVER["HTTP_REFERER"]);
?&gt;
</code></div>
<h3>Conclusion</h3>
<p>These are the only ways that I have come up to switch the style of a page. Either you can have it work in Firefox only, or you&#8217;re going to have to use a few scripts. If anyone else has any good ideas, I&#8217;d be grateful and I will add them to this list. Leave them as comments or email me. Please send code if you have it also.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gadberry.com/aaron/2006/02/22/changing-stylesheets-dynamically/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Plesk and vhost.conf</title>
		<link>http://www.gadberry.com/aaron/2006/02/09/plesk_vhost/</link>
		<comments>http://www.gadberry.com/aaron/2006/02/09/plesk_vhost/#comments</comments>
		<pubDate>Thu, 09 Feb 2006 18:04:55 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Server Management]]></category>

		<guid isPermaLink="false">http://www.gadberry.com/aaron/2006/02/09/plesk_vhost/</guid>
		<description><![CDATA[Wondering how to create a good vhost.conf? Well you&#8217;ve come to the right place. Plesk automatically updates httpd.include for each domain, making changes to this file only temporary. You don&#8217;t want to use this file if you need to make changes to Apache&#8217;s config on the fly, such as php&#8217;s open_basedir values per domain. Instead [...]]]></description>
			<content:encoded><![CDATA[<p>Wondering how to create a good vhost.conf?  Well you&#8217;ve come to the right place.</p>
<p>Plesk automatically updates httpd.include for each domain, making changes to this file only temporary.  You don&#8217;t want to use this file if you need to make changes to Apache&#8217;s config on the fly, such as php&#8217;s open_basedir values per domain.</p>
<p>Instead you will want to use a vhost.conf file.  This file will be placed inside your domain&#8217;s conf directory, usually found at <span class="code_line"><code>/var/www/vhosts/yourdomain.com/conf</code></span>.  Create a file called vhost.conf in whatever editor you prefer.  I use joe.</p>
<p>You can now put in any Apache configuration options like you would into httpd.include.  In my case I wanted to do three things, give my site access to <span class="code_line"><code>/php/includes</code></span>, add a <span class="code_line"><code>mod_rewrite</code></span> rule, and tell Apache to follow symlinks.</p>
<p><span id="more-92"></span><br />
Here is my resulting vhost.conf file.</p>
<div class="code_box"><code>&lt;Directory /var/www/vhosts/yourdomain.com/httpdocs/&gt;
php_admin_value open_basedir "/var/www/vhosts/yourdomain.com/httpdocs:/php/includes"
&lt;/Directory&gt;

Options +FollowSymLinks
RewriteEngine on
RewriteRule /ministries/(.*)\.php$ /ministries/ministry.php?url=$1
</code></div>
<p>You can see the first three lines take care of the additional base directory for php, the line after the empty one takes care of following symlinks, and the last two lines turn on the rewrite engine and add a rule to it.</p>
<p>Save your file and we&#8217;re almost done.  This is the part that everyone forgets, you need to tell Plesk to update it&#8217;s information.  See your httpd.include file will soon have an include for your vhost.conf, but it doesn&#8217;t yet.  Plesk has to realize it&#8217;s there and then add the include.  The command to reconfigure Plesk for one site is <span class="code_line"><code>/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com</code></span> or the command I use reconfigures all sites, <span class="code_line"><code>/usr/local/psa/admin/bin/websrvmng -a</code></span>.</p>
<p>After running that there is no need to restart Apache or any other service.  Your changes should have taken effect already.</p>
<p>As always, feel free to comment if you have more suggestions or questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gadberry.com/aaron/2006/02/09/plesk_vhost/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
	</channel>
</rss>
