<?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>Redline Solutions - Custom Web site and App Development for WordPress, iPhone, iPad, Android, HTML5 and more</title>
	<atom:link href="http://redlinesolutions.co/feed/" rel="self" type="application/rss+xml" />
	<link>http://redlinesolutions.co</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 03 May 2012 01:19:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Configuring PHP 5.3 correctly on GoDaddy</title>
		<link>http://redlinesolutions.co/configuring-php-5-3-correctly-on-godaddy/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=configuring-php-5-3-correctly-on-godaddy</link>
		<comments>http://redlinesolutions.co/configuring-php-5-3-correctly-on-godaddy/#comments</comments>
		<pubDate>Tue, 27 Mar 2012 14:29:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://redlinesolutions.co/?p=274</guid>
		<description><![CDATA[Shared hosting plans like GoDaddy have their pros and cons.  One of the major disadvantages is the default setting for PHP are not what you would ideally want or expect.  We'll walk you through a few of the problems and solutions we've encountered with setting up PHP on GoDaddy 4GH Linux hosting accounts. <a href="http://redlinesolutions.co/configuring-php-5-3-correctly-on-godaddy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s face it&#8230; GoDaddy is not the best choice as a hosting partner (or any shared hosting plan for that matter).  However, it&#8217;s inexpensive and well marketed, so there will be clients that choose GoDaddy for their hosting needs.</p>
<p>If you have a web product on GoDaddy, most likely it&#8217;s in the form of a PHP website.  After you&#8217;ve uploaded the site, you&#8217;ll probably encounter a few issues with how PHP is configured on GoDaddy Linux 4GH accounts.  Here&#8217;s a list of questions and their answers:</p>
<ul>
<li><a href="#version5_3">Why is PHP not running as version 5.3?</a></li>
<li><a href="#configurephp">How do I configure my PHP settings?</a></li>
<li><a href="#displayerrors">Why are PHP errors displayed on the web page?</a></li>
<li><a href="#errorlogs">How do I get access to error logs?</a></li>
</ul>
<p id="version5_3"> </p>
<p>Q:  <strong>Why is PHP not running as version 5.3?</strong></p>
<p>A:  The default version as of this writing is 5.2.  To change this you have two options:</p>
<p>1. Go to the &#8216;Programming Languages&#8217; section of the GoDaddy Dashboard, select PHP, then select the version of PHP you would like to use.  Then &#8216;Update&#8217;.  This will take about 20 minutes to go into effect.</p>
<p><a href="http://support.godaddy.com/help/3937?locale=en">http://support.godaddy.com/help/3937?locale=en</a></p>
<p>2. Within your .htaccess file add..</p>
<pre> AddHandler x-httpd-php5-3 .php</pre>
<p>This will take effect immediately.</p>
<p id="configurephp"> </p>
<p>Q.  <strong>How do I configure my PHP settings?</strong></p>
<p>A.  GoDaddy hosts their own php.ini file in their /web/conf/ path.  However you cannot edit this file, so the alternative is to copy the php.ini from this location and place it in your web root path (html directory).  For php5, name it php5.ini.</p>
<p>You might wonder if the configuration settings take effect immediately.  They unfortunately do not.  What you will need to do is go to your hosting panel, find the &#8216;System Processes&#8217; panel, then click the &#8216;End Web&#8217; button.  This will stop the local configuration of Apache for your hosting and it will restart as soon as you load a new web page.  To confirm, you can create a file with phpinfo() in your web root to test that the configuration file is in use.</p>
<p id="displayerrors"> </p>
<p>Q.  <strong>Why are PHP errors displayed on the web page?</strong></p>
<p>A.  By default this is enabled but can be turned off.  This is configured within your custom php.ini as created above.  Just make the following change below and restart the web processes.</p>
<pre>display_errors = Off</pre>
<p id="errorlogs"> </p>
<p>Q.  <strong>How do I get access to error logs?</strong></p>
<p>A.  There&#8217;s a few things you&#8217;ll need to do.  To enable Apache logs, go to your hosting panel, find the &#8216;Error Logs&#8217; section, and click &#8216;Update&#8217;.  This will enable Apache to log any errors.  The error logs will be found in a directory called &#8216;error_logs&#8217; at the root level, but not within your web root.  You can then access them via SSH or File Manager.</p>
<p><a href="http://support.godaddy.com/help/article/1197">http://support.godaddy.com/help/article/1197</a></p>
<p>The second step is to enable PHP logging.  Edit your php.ini and restart the web processes with the following settings.</p>
<pre>log_errors = On</pre>
<pre>error_log = [path to your log file] </pre>
<p>That should do it!  Hope this has saved you some time and effort.</p>
]]></content:encoded>
			<wfw:commentRss>http://redlinesolutions.co/configuring-php-5-3-correctly-on-godaddy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to use an external screen (video out) in an Apple IPad application</title>
		<link>http://redlinesolutions.co/how-to-use-an-external-screen-video-out-in-an-apple-ipad-application/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-use-an-external-screen-video-out-in-an-apple-ipad-application</link>
		<comments>http://redlinesolutions.co/how-to-use-an-external-screen-video-out-in-an-apple-ipad-application/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 21:39:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[video out]]></category>

		<guid isPermaLink="false">http://redlinesolutions.co/?p=291</guid>
		<description><![CDATA[A short tutorial on building iOS apps that use video out features.  This tutorial focuses on the original iOS 3.2 SDK video out API. <a href="http://redlinesolutions.co/how-to-use-an-external-screen-video-out-in-an-apple-ipad-application/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Accessing a secondary screen is a new feature as of Apple IPhone OS v3.2. The short story is that you can now create an application that displays to a video screen along with the standard display screen on the IPad. Not many developers are aware of this feature, but chances are if you are reading this, you would definitely like to know how to write an application that can use this feature. So let’s not keep you waiting… let’s dive into a quick tutorial.</p>
<p><strong>Requirements:</strong></p>
<ul>
<li>Download the XCode 3.2 or higher SDK</li>
<li>A real IPad device (no simulation is available)</li>
<li>An Apple brand video out cable</li>
<li>Knowledge of Objective-C and UIKit IPhone libraries</li>
<li>An external video display (TV or LCD)</li>
</ul>
<p><strong>Background:</strong></p>
<p>First off, this new API is only available on the IPad using XCode 3.2 or higher.  You might find references on the web to <a href="http://www.touchcentric.com/blog/archives/3">a previously undocumented API</a> for the IPhone OS (2.2.1 to 3.1.3) that allows for “video out” in applications.  That code will not work on the IPad and has been replaced by this new official API.</p>
<p>The second thing to note is that accessing the external screen is not based on “mirroring”.  The output that you see on the IPad is not automatically replicated to the secondary screen. The idea behind the API is that the application developer has full control over how to draw to the external display screen and it’s not based in hardware or is a simple bitblit copy.  You as the developer must set up a new area to draw to on the second display and render your application into it.</p>
<p>The new changes to the SDK that enable video our are fairly simple and straightforward.  Two Objective-C Cocoa Touch classes, UIScreen and UIWindow, have the additional functionality to make the code very easy to integrate into your existing code base.</p>
<p><strong>Code:</strong></p>
<p>For the code, I am assuming you understand Cocoa Touch and the UIKit classes.  Namely that you already use UIWindow and UIView to display your user interface.</p>
<p><strong>Step 1. Determine if an external display screen is available<br /></strong></p>
<p>To begin, you’ll typically need to know if the external display is connected to the device.  You can perform this check at the start of your application.</p>
<pre>NSArray* arrScreens = [UIScreen screens];
int numberOfScreens = [arrScreens count];
bool isExternalDisplayConnected = (numberOfScreens &gt; 1);
</pre>
<p>However a better method would be to use the [notifyScreenConnected] notification message.  I will not show this method here, but will update the tutorial with this solution at a later time.</p>
<p>Once our secondary display is available, then the UIScreen array will contain more than one entry.  The first entry is the primary display on the IPad.  The second entry is the external display.  We will need a refence to this screen.</p>
<pre>UIScreen* videoScreen = NULL;
videoScreen = (UIScreen*) [arrScreens objectAtIndex: 1];
</pre>
<p><strong>Step 2. Create secondary UI<br /></strong></p>
<p>Now we need to create a new UIWindow and any other necessary views.  We can create them conditionally when we know the external screen is connected.</p>
<pre>CGRect rect;
UIView* videoView;
if (isExternalDisplayConnected &amp;&amp; videoScreen != NULL)
{
    rect = [videoScreen bounds];
    window = [[UIWindow alloc] initWithFrame: rect];
    window.screen = videoScreen;
    videoView = [[UIView alloc] initWithFrame:rect];
    videoView.layer.anchorPoint = CGPointMake(0.0f, 0.0f);
    videoView.layer.position = CGPointMake(0.0f, 0.0f);
    [window addSubview: evView];
    [window makeKeyAndVisible];
}
</pre>
<p>Note that there is nothing particularly different about creating a new UIWindow and UIView here.  The only difference is setting the screen property of the window object to the new video screen.  This is what allows the window to display on the external screen as opposed to the default IPad screen.  Also take note that the size of the external screen is determine by looking at the bounds property of the video screen.  I’ve set the new window and view to be the size of the external display so that it will appear full sized.</p>
<p>You should create any necessary subviews that your application would need to display on the external display and attach them to the primary view as necessary.  This may involve loading any views from an application Bundle.</p>
<p><strong>Step 3. Update your display</strong></p>
<p>If you application needs to refresh itself, remember that you must refresh both the main window’s views AND the external window’s views.  For the external screen view above, refreshing the UI would be a standard call.</p>
<pre>[ videoView setNeedsDisplay ];
</pre>
<p><strong>Step 4. Destroy UI when display disconnects</strong></p>
<p>During your application’s lifecycle, you can poll the UIScreen screens array to see if the screen has disconnected or use the system notification when the display is not longer connected.  When the screen is disconnected, you should cease drawing to the screen and clean up any UIWindows and UIViews that you have created along the way for that window.  This allows you to start again from step 1 to repeat the cycle if the same or a new external display with a different resolution is re-connected to the IPad while the application is running.</p>
<p><strong>Other Considerations</strong>:</p>
<p>As you can see, you will need two UI trees to render your application on two screens.  The system UI thread will deal with the redraw of the screens on each display.  If you have a game application or other application that needs to constantly refresh its user interface, then the application may need to render twice to keep the external screen up to date.  This all depends on the nature of your application.  You can decide to only refresh one screen, whether it is the internal or the external one.  However if you choose to refresh both displays, your application will certainly take more time and frame rates will be lower than rendering to only one display.</p>
<p>The importance of checking that the display is connected will help with this performance consideration.  Preventing any extraneous drawing updates to the windows when the screen is not connected will certainly improve your applications performance.</p>
<p>You can control the video modes of the external display by using the videoModes property of the UIScreen object.  You can then choose which video mode to use for that screen.  By default, the highest resolution video mode is enabled.</p>
<p>Also take note the secondary display will not receive any form of user input and it will not have a status bar.</p>
<p><strong>Project demo:</strong></p>
<p>You can take a look at <a href="http://redlinesolutions.co/products/waiting">“Waiting&#8230;”</a>, a sample IPad application that uses the internal and external screen simultaneously.  It synchronously draws to both displays to make for an interactive experience on the IPad and for visual presentation displayed through a digital projector.</p>
<p>That wraps up things for this tutorial!  I hope it was helpful and gives you some insight to using this feature in one of your own applications.</p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://redlinesolutions.co/how-to-use-an-external-screen-video-out-in-an-apple-ipad-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

