<?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>Web Design &#38; Development</title>
	<atom:link href="http://www.mediaart.lt/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mediaart.lt</link>
	<description>Mediaart provides professional website design and web development services.</description>
	<lastBuildDate>Mon, 23 Apr 2012 10:11:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Remove duplicate values from an array in PHP</title>
		<link>http://www.mediaart.lt/web-development/remove-duplicate-values-from-an-array-in-php/</link>
		<comments>http://www.mediaart.lt/web-development/remove-duplicate-values-from-an-array-in-php/#comments</comments>
		<pubDate>Mon, 23 Apr 2012 10:11:59 +0000</pubDate>
		<dc:creator>Tomas</dc:creator>
				<category><![CDATA[mediaart]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[array_unique]]></category>
		<category><![CDATA[duplicate values]]></category>
		<category><![CDATA[PHP array]]></category>
		<category><![CDATA[Programing]]></category>

		<guid isPermaLink="false">http://www.mediaart.lt/?p=160</guid>
		<description><![CDATA[Today&#8217;s chalenge: How to remove the duplicate values from a PHP array? after short search i found solution array_unique. How this function works: &#60;?php $input = array(1, 2, 2, 3, 3, 4); $result = array_unique($input); var_dump($result); ?&#62; will output: array(4) { [0]=&#62; int(1) [1]=&#62; int(2) [3]=&#62; int(3) [5]=&#62; int(4) } Remember: Output of array_unique() will [...]]]></description>
			<content:encoded><![CDATA[<p>Today&#8217;s chalenge: How to remove the duplicate values from a PHP array?</p>
<p>after short search i found solution <strong>array_unique</strong>.</p>
<p>How this function works:<br />
<code><br />
&lt;?php </code></p>
<p><code>$input = array(1, 2, 2, 3, 3, 4); </code></p>
<p><code>$result = array_unique($input); </code></p>
<p><code>var_dump($result); ?&gt;<br />
</code><br />
will output:<br />
<code>array(4) {<br />
[0]=&gt; int(1)<br />
[1]=&gt; int(2)<br />
[3]=&gt; int(3)<br />
[5]=&gt; int(4)<br />
}</code></p>
<p><strong>Remember:</strong> Output of <strong>array_unique()</strong> will have the same key of input array.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mediaart.lt/web-development/remove-duplicate-values-from-an-array-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Currents app updated !</title>
		<link>http://www.mediaart.lt/web-development/google-currents-app-updated/</link>
		<comments>http://www.mediaart.lt/web-development/google-currents-app-updated/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 07:19:43 +0000</pubDate>
		<dc:creator>Tomas</dc:creator>
				<category><![CDATA[google]]></category>
		<category><![CDATA[mediaart]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://www.mediaart.lt/?p=153</guid>
		<description><![CDATA[US people have been able to use the Google Currents app to read various websites with magazine-style layout. Now other countries can finally get in on the act as well. Google has release version 1.1 of the app for Android and iOS. New version makes the service available worldwide with support for 44 languages, adds [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft  wp-image-155" style="margin: 5px;" title="google_currents_feature" src="http://www.mediaart.lt/wp-content/uploads/2012/04/google_currents_feature-300x175.png" alt="" width="180" height="105" /></p>
<p>US people have been able to use the Google Currents app to read various websites with magazine-style layout.</p>
<p>Now other countries can finally get in on the act as well. Google has release version 1.1 of the app for Android and iOS.</p>
<p>New version makes the service available worldwide with support for 44 languages, adds a number of other improvements:</p>
<ul>
<li>the ability to select which editions have images for offline reading</li>
<li>instant online sync</li>
<li>translation for 38 languages</li>
<li>promised 7X performance boost</li>
</ul>
<p>And the best &#8211; app is completely free, and adapts the layout to suit both phones and tablets.</p>
<p>Scan QR code below to download it for the platform of your choice.</p>
<p><img class="alignleft size-medium wp-image-154" title="currents" src="http://www.mediaart.lt/wp-content/uploads/2012/04/currents-300x300.png" alt="" width="300" height="300" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mediaart.lt/web-development/google-currents-app-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML to PHP array</title>
		<link>http://www.mediaart.lt/programming/xml-to-php-array/</link>
		<comments>http://www.mediaart.lt/programming/xml-to-php-array/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 13:13:08 +0000</pubDate>
		<dc:creator>Tomas</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[Shop]]></category>

		<guid isPermaLink="false">http://www.mediaart.lt/?p=149</guid>
		<description><![CDATA[Some times when working in PHP you need a way to convert an XML document into a serializable array. If you ever tried to serialize() and then unserialize() a SimpleXML or DOMDocument object, you know what I’m talking about. Assume the following XML snippet: &#60;tv&#62; &#60;show name="The Simpsons"&#62; &#60;husband&#62;Homer&#60;/husband&#62; &#60;wife&#62;Marge&#60;/wife&#62; &#60;kid&#62;Bart&#60;/kid&#62; &#60;kid&#62;Lisa&#60;/kid&#62; &#60;kid&#62;Maggie&#60;/kid&#62; &#60;/show&#62; &#60;/tv&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Some times when working in PHP you need a way to convert an XML document into a serializable array. If you ever tried to serialize() and then unserialize() a SimpleXML or DOMDocument object, you know what I’m talking about.</p>
<p>Assume the following XML snippet:</p>
<p><code>&lt;tv&gt;<br />
&lt;show name="The Simpsons"&gt;<br />
&lt;husband&gt;Homer&lt;/husband&gt;<br />
&lt;wife&gt;Marge&lt;/wife&gt;<br />
<code> &lt;kid&gt;Bart&lt;/kid&gt;<br />
<code>&lt;kid&gt;Lisa&lt;/kid&gt;</code><br />
&lt;kid&gt;Maggie&lt;/kid&gt;</code><br />
&lt;/show&gt;<br />
&lt;/tv&gt;</code></p>
<p>I found quick but little dirty way to do convert such axml document to an array, using type casting and JSON functions. After this i can ensure there are no exotic values that would cause problems when unserializing:<br />
<code><br />
&lt;?php<br />
$a = json_decode(json_encode((array) simplexml_load_string($tv)),1);<br />
?&gt;</code></p>
<p>After this we get:<br />
<code><br />
</code></p>
<pre>Array
(
    [show] =&gt; Array
        (
            [@attributes] =&gt; Array
                (
                    [name] =&gt; <code>The Simpsons</code>)</pre>
<pre>            [<code>husband</code>] =&gt; <code>Homer</code>
            [<code>wife</code>] =&gt; <code>Marge</code>
            [kid] =&gt; Array
                (
                    [0] =&gt; Bart
                    [1] =&gt; Lisa
                    [2] =&gt; <code><code>Maggie</code></code>
                )
        )
)</pre>
<p>DONE!</p>
<pre></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.mediaart.lt/programming/xml-to-php-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MIT launchesApp Inventor public Beta</title>
		<link>http://www.mediaart.lt/web-development/mit-launchesapp-inventor-public-beta/</link>
		<comments>http://www.mediaart.lt/web-development/mit-launchesapp-inventor-public-beta/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 13:30:00 +0000</pubDate>
		<dc:creator>Tomas</dc:creator>
				<category><![CDATA[google]]></category>
		<category><![CDATA[mediaart]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.mediaart.lt/?p=143</guid>
		<description><![CDATA[the Android apps creation tool is no longer being managed by Google. MIT worked up its own version. Now you can go and log into the MIT App Inventor with valid Google ID. App Inventor lets you develop applications for Android phones using a web browser and either a connected phone or emulator. The App [...]]]></description>
			<content:encoded><![CDATA[<p>the Android apps creation tool is no longer being managed by Google. MIT worked up its own version.</p>
<p>Now you can go and log into the MIT App Inventor with valid Google ID.</p>
<p>App Inventor lets you develop applications for Android phones using a web browser and either a connected phone or emulator. The App Inventor servers store your work and help you keep track of your projects.</p>
<p>You build apps by working with:</p>
<ul>
<li>The App Inventor Designer, where you select the components for your app.</li>
<li>The App Inventor Blocks Editor, where you assemble program blocks that specify how the components should behave. You assemble programs visually, fitting pieces together like pieces of a puzzle.</li>
<li>Your app appears on the phone step-by-step as you add pieces to it, so you can test your work as you build. When you&#8217;re done, you can package your app and produce a stand-alone application to install.</li>
</ul>
<p><iframe src="http://www.youtube.com/embed/8ADwPLSFeY8" frameborder="0" width="500" height="315"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mediaart.lt/web-development/mit-launchesapp-inventor-public-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting date in PHP from yyyymmdd to yyyy mm dd format</title>
		<link>http://www.mediaart.lt/programming/converting-date-in-php-from-yyyymmdd-to-yyyy-mm-dd-format/</link>
		<comments>http://www.mediaart.lt/programming/converting-date-in-php-from-yyyymmdd-to-yyyy-mm-dd-format/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 09:23:30 +0000</pubDate>
		<dc:creator>Tomas</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.mediaart.lt/?p=138</guid>
		<description><![CDATA[I have dates in the following format (yyyymmdd, 18751104, 19140722) and i need normal date (yyyy mm dd, 1875 11 04, 1914 07 22). 1. first you can use strtotime and date functions (this will fail with dates before the Unix epoch at the start of 1970. ) &#60;?php // prints 1995 Oct 12 echo [...]]]></description>
			<content:encoded><![CDATA[<p>I have dates in the following format (yyyymmdd, 18751104, 19140722) and i need normal date (yyyy mm dd, 1875 11 04, 1914 07 22).</p>
<p>1. first you can use <strong>strtotime</strong> and <strong>date</strong> functions (<em>this will fail with dates before the Unix epoch at the start of 1970.</em> )<code><br />
&lt;?php<br />
// prints 1995 Oct 12<br />
echo date("Y M d", strtotime("19951012"));<br />
?&gt;</code></p>
<p>2. Alternative which will work with dates before 1970<br />
<code>&lt;?php // Returns the year as an offset since 1900, negative for years before<br />
$parts = strptime("18951012", "%Y%m%d");<br />
$year = $parts['tm_year'] + 1900; // 1895<br />
$day = $parts['tm_mday']; // 12<br />
$month = $parts['tm_mon']; // 10 ?&gt; </code></p>
<p>3. simple method &#8211; <strong>date_parse_from_format</strong></p>
<pre><code>&lt;?php $parsed_date = date_parse_from_format('Ymd', $date); ?&gt; </code></pre>
<p>4. <strong>substr</strong> because it&#8217;s probably the lightest way to do it</p>
<pre><code>mktime(substr($date, 0, 4), substr($date, 4, 2), substr($date, 6, 2));
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.mediaart.lt/programming/converting-date-in-php-from-yyyymmdd-to-yyyy-mm-dd-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delete default input value on click</title>
		<link>http://www.mediaart.lt/programming/delete-default-input-value-on-click/</link>
		<comments>http://www.mediaart.lt/programming/delete-default-input-value-on-click/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 21:16:18 +0000</pubDate>
		<dc:creator>Tomas</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.mediaart.lt/?p=133</guid>
		<description><![CDATA[I hate this task: &#8220;Delete default value of an input text on click&#8220;. Many times i use code like this &#60;input type="text" value="email@email.com" name="email" onblur="if (this.value == '') {this.value = 'email@email.com';}" onfocus="if (this.value == 'email@email.com') {this.value = '';}" /&#62; Forget about this! I would recommend you try HTML5 solution below which uses the placeholder attribut. [...]]]></description>
			<content:encoded><![CDATA[<p>I hate this task: &#8220;<em>Delete default value of an input text on click</em>&#8220;. Many times i use code like this</p>
<p><code>&lt;input type="text" value="email@email.com" name="email"<br />
 onblur="if (this.value == '') {this.value = 'email@email.com';}"<br />
 onfocus="if (this.value == 'email@email.com') {this.value = '';}" /&gt;<br />
</code></p>
<p>Forget about this! I would recommend you try HTML5 solution below which uses the <em>placeholder</em> attribut.</p>
<p><code>&lt;input name="Email" type="text" value="" placeholder="email@email.com" /&gt;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mediaart.lt/programming/delete-default-input-value-on-click/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Friendly and high quality fuel</title>
		<link>http://www.mediaart.lt/web-development/friendly-and-high-quality-fuel/</link>
		<comments>http://www.mediaart.lt/web-development/friendly-and-high-quality-fuel/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 22:02:35 +0000</pubDate>
		<dc:creator>Tomas</dc:creator>
				<category><![CDATA[mediaart]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[Shop]]></category>

		<guid isPermaLink="false">http://www.mediaart.lt/?p=125</guid>
		<description><![CDATA[How do you heat your home? If that is wood pellets &#8211; you are about to visit the right place www.greenpellets.nl. The goal of the project is to provide Dutch people with environmentally friendly and high quality fuel for pocket friendly prices. More to come.]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-127" title="logo-green" src="http://www.mediaart.lt/wp-content/uploads/2011/11/logo-green.gif" alt="" width="221" height="121" align="left" />How do you heat your home? If that is wood pellets &#8211; you are about to visit the right place <a href="http://www.greenpellets.nl">www.greenpellets.nl</a>. The goal of the project is to provide Dutch people with environmentally friendly and high quality fuel for pocket friendly prices. More to come.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mediaart.lt/web-development/friendly-and-high-quality-fuel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google+ launches Pages for businesses</title>
		<link>http://www.mediaart.lt/web-development/google-launches-pages-for-businesses/</link>
		<comments>http://www.mediaart.lt/web-development/google-launches-pages-for-businesses/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 22:25:29 +0000</pubDate>
		<dc:creator>Tomas</dc:creator>
				<category><![CDATA[google]]></category>
		<category><![CDATA[mediaart]]></category>

		<guid isPermaLink="false">http://www.mediaart.lt/?p=116</guid>
		<description><![CDATA[Google opened up Google+ to business. It&#8217;s calling Google+ Pages. Google+ Pages appears to be little difference between a Page and an individual account. You&#8217;re able to add Pages to any of your regular Circles. Page owners are able to post and take part in Hangouts. Pages turn up in Google search results. Company&#8217;s introduced [...]]]></description>
			<content:encoded><![CDATA[<p>Google opened up Google+ to business.<br />
<iframe width="500" height="284" src="http://www.youtube.com/embed/8Ccf5GxM7vg" frameborder="0" allowfullscreen></iframe><br />
It&#8217;s calling Google+ Pages. Google+ Pages appears to be little difference between a Page and an individual account.<br />
You&#8217;re able to add Pages to any of your regular Circles. Page owners are able to post and take part in Hangouts.<br />
Pages turn up in Google search results. Company&#8217;s introduced a new Direct Connect and lets you search specifically for Google+ Pages.<br />
Both features are rolling out starting today.</p>
<p><iframe width="500" height="315" src="http://www.youtube.com/embed/NY8L_SzNr70" frameborder="0" allowfullscreen></iframe></p>
<p>P.S. my first google+ page <a href="https://plus.google.com/u/0/b/118273329524901353395/" target="_blank">MediaArt</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mediaart.lt/web-development/google-launches-pages-for-businesses/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Grand Theft Auto V &#8211; Trailer &#8211; 11/02/11</title>
		<link>http://www.mediaart.lt/web-development/grand-theft-auto-v-trailer-110211/</link>
		<comments>http://www.mediaart.lt/web-development/grand-theft-auto-v-trailer-110211/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 16:06:38 +0000</pubDate>
		<dc:creator>Tomas</dc:creator>
				<category><![CDATA[mediaart]]></category>

		<guid isPermaLink="false">http://www.mediaart.lt/?p=114</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://www.rockstargames.com/videos/embed/8001" width="480" height="270" frameBorder="0" scrolling="no"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mediaart.lt/web-development/grand-theft-auto-v-trailer-110211/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>about nerds</title>
		<link>http://www.mediaart.lt/web-development/about-nerds/</link>
		<comments>http://www.mediaart.lt/web-development/about-nerds/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 09:10:26 +0000</pubDate>
		<dc:creator>Tomas</dc:creator>
				<category><![CDATA[mediaart]]></category>

		<guid isPermaLink="false">http://www.mediaart.lt/?p=110</guid>
		<description><![CDATA[I visited with my boss, and a client whose website I’m going to do. The client had met my boss before, but not me. So, my boss introduced me: Boss: Well, this is the guy who’s doing your website, Bob. Client: Hi there! So you’re the nerd, right? &#160; from: clientsfromhell.net]]></description>
			<content:encoded><![CDATA[<p>I visited with my boss, and a client whose website I’m going to do. The client had met my boss before, but not me. So, my boss introduced me:</p>
<p><strong>Boss:</strong> Well, this is the guy who’s doing your website, Bob.<br />
<strong>Client:</strong> Hi there! So you’re the nerd, right?</p>
<p>&nbsp;</p>
<h6>from: clientsfromhell.net</h6>
]]></content:encoded>
			<wfw:commentRss>http://www.mediaart.lt/web-development/about-nerds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

