<?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>Artur's Blog &#187; web development</title>
	<atom:link href="http://artur.marnik.net/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://artur.marnik.net</link>
	<description>past, present and future in web development</description>
	<lastBuildDate>Tue, 04 Oct 2011 14:37:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to use SVN on 1and1 account</title>
		<link>http://artur.marnik.net/how-to-use-svn-on-1and1-account/</link>
		<comments>http://artur.marnik.net/how-to-use-svn-on-1and1-account/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 21:16:44 +0000</pubDate>
		<dc:creator>Artur</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[1and1]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[version control]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://artur.marnik.net/?p=24</guid>
		<description><![CDATA[When creating a project it is always wise to use some version control program.
I prefer to use SVN it is<a href="http://artur.marnik.net/how-to-use-svn-on-1and1-account/" class="searchmore">Read the Rest...</a><div class="clr"></div>]]></description>
			<content:encoded><![CDATA[<p>When creating a project it is always wise to use some version control program.</p>
<p>I prefer to use SVN it is fast, easy to use and its support is build in in NetBeans IDE. Since I use hosting at 1and1 I tried to install my own SVN repository there. It is very easy and it worked almost instantly.</p>
<p>First step: create svn repository on the server.</p>
<p>Just SSH to your account and create a new directory and svn repository in it:</p>
<p>cd /<br />
mkdir svn<br />
svnadmin create /kunden/homepages/&#8230;&#8230;/htdocs/svn</p>
<p>to get a full path to your home directory call &#8220;pwd&#8221; command and replace &#8230;&#8230;. with your information</p>
<p>Now your svn repository is set up &#8211; we can procees to the second step: netbeans configuration</p>
<p>from putty download page (<a rel="nofollow" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">here</a>) get plink.exe and place it in c:\Program Files\Putty\ (you can choose different path)<br />
now in your Project window right click on your project name and select Versioning-&gt;Import into subversion repository<br />
for Repository URL select svn+ssh:// and enter:svn+ssh://your.domain.com/kunden/homepages/&#8230;&#8230;./htdocs/svn (same path that you have used for svnadmin command)<br />
then as Tunnel Command enter: C:/Program Files/Putty/plink.exe -l ssh_username -pw ssh_password<br />
click Next<br />
now in &#8220;Repository Folder&#8221; enter desired name like &#8220;my_project&#8221;<br />
enter a message &#8211; for example &#8220;initial import&#8221;<br />
click Next again<br />
after a while you will be prompted what files you want to import &#8211; usually you want to import whole project so just click Finish</p>
<p>And you are done &#8211; enjoy your SVN on 1and1 account</p>
<p>the only thing that I don&#8217;t like is having open text password for my ssh account in netbeans &#8211; it I find a way to hide somewhere I will share it with you</p>
]]></content:encoded>
			<wfw:commentRss>http://artur.marnik.net/how-to-use-svn-on-1and1-account/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>resize an image function</title>
		<link>http://artur.marnik.net/resize-an-image-function/</link>
		<comments>http://artur.marnik.net/resize-an-image-function/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 03:34:48 +0000</pubDate>
		<dc:creator>Artur</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://artur.marnik.net/?p=21</guid>
		<description><![CDATA[I wrote this function long time ago and I have used it so many since then. I decided to publish<a href="http://artur.marnik.net/resize-an-image-function/" class="searchmore">Read the Rest...</a><div class="clr"></div>]]></description>
			<content:encoded><![CDATA[<p>I wrote this function long time ago and I have used it so many since then. I decided to publish it.</p>
<p>You can find plenty of similar functions but this one is a little bit different. As a parameter you specify new MAX dimensions so image will be scaled based on its height or width. I believe I have enough comments in the code.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code"><pre class="php php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> resize<span style="color: #009900;">&#40;</span><span style="color: #000088;">$source_image</span><span style="color: #339933;">,</span> <span style="color: #000088;">$target_image</span><span style="color: #339933;">,</span> <span style="color: #000088;">$new_width</span><span style="color: #339933;">,</span> <span style="color: #000088;">$new_height</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">// get current size</span>
  <span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$width</span><span style="color: #339933;">,</span> <span style="color: #000088;">$height</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #990000;">getimagesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$source_image</span><span style="color: #009900;">&#41;</span>;
&nbsp;
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$width</span> <span style="color: #339933;">&gt;</span> <span style="color: #000088;">$new_width</span> || <span style="color: #000088;">$height</span> <span style="color: #339933;">&gt;</span> <span style="color: #000088;">$new_height</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$scale1</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$width</span> <span style="color: #339933;">/</span> <span style="color: #000088;">$new_width</span>;
    <span style="color: #000088;">$scale2</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$height</span> <span style="color: #339933;">/</span> <span style="color: #000088;">$new_height</span>;
&nbsp;
    <span style="color: #666666; font-style: italic;">// check if we should scale using width or height</span>
    <span style="color: #000088;">$scale</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$scale1</span> <span style="color: #339933;">&gt;</span> <span style="color: #000088;">$scale2</span> ? <span style="color: #000088;">$scale1</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$scale2</span>;
&nbsp;
    <span style="color: #666666; font-style: italic;">// make sure we scale correctly</span>
    <span style="color: #000088;">$new_height</span> <span style="color: #339933;">=</span> <span style="color: #990000;">floor</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$height</span> <span style="color: #339933;">/</span> <span style="color: #000088;">$scale</span><span style="color: #009900;">&#41;</span>;
    <span style="color: #000088;">$new_width</span> <span style="color: #339933;">=</span> <span style="color: #990000;">floor</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$width</span> <span style="color: #339933;">/</span> <span style="color: #000088;">$scale</span><span style="color: #009900;">&#41;</span>;
&nbsp;
    <span style="color: #666666; font-style: italic;">// Load</span>
    <span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> imagecreatetruecolor<span style="color: #009900;">&#40;</span><span style="color: #000088;">$new_width</span><span style="color: #339933;">,</span> <span style="color: #000088;">$new_height</span><span style="color: #009900;">&#41;</span>;
    <span style="color: #000088;">$source</span> <span style="color: #339933;">=</span> imagecreatefromjpeg<span style="color: #009900;">&#40;</span><span style="color: #000088;">$source_image</span><span style="color: #009900;">&#41;</span>;
&nbsp;
    <span style="color: #666666; font-style: italic;">// Resize</span>
    imagecopyresampled<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thumb</span><span style="color: #339933;">,</span> <span style="color: #000088;">$source</span><span style="color: #339933;">,</span> <span style="color:#800080;">0</span><span style="color: #339933;">,</span> <span style="color:#800080;">0</span><span style="color: #339933;">,</span> <span style="color:#800080;">0</span><span style="color: #339933;">,</span> <span style="color:#800080;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$new_width</span><span style="color: #339933;">,</span> <span style="color: #000088;">$new_height</span><span style="color: #339933;">,</span> <span style="color: #000088;">$width</span><span style="color: #339933;">,</span> <span style="color: #000088;">$height</span><span style="color: #009900;">&#41;</span>;
&nbsp;
    <span style="color: #666666; font-style: italic;">// Save the file at 95% quality</span>
    imagejpeg<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thumb</span><span style="color: #339933;">,</span> <span style="color: #000088;">$target_image</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">95</span><span style="color: #009900;">&#41;</span>;
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// image small already - don't resize</span>
    <span style="color: #990000;">copy</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$source_image</span><span style="color: #339933;">,</span> <span style="color: #000088;">$target_image</span><span style="color: #009900;">&#41;</span>;
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://artur.marnik.net/resize-an-image-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why should you use jQuery</title>
		<link>http://artur.marnik.net/why-should-you-use-jquery/</link>
		<comments>http://artur.marnik.net/why-should-you-use-jquery/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 00:46:44 +0000</pubDate>
		<dc:creator>Artur</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://artur.marnik.net/?p=7</guid>
		<description><![CDATA[If you ask me one year ago &#8220;have you seen jQuery&#8221; my answer would be &#8220;have you seen what?&#8221;
If you<a href="http://artur.marnik.net/why-should-you-use-jquery/" class="searchmore">Read the Rest...</a><div class="clr"></div>]]></description>
			<content:encoded><![CDATA[<p>If you ask me one year ago &#8220;have you seen jQuery&#8221; my answer would be &#8220;have you seen what?&#8221;</p>
<p>If you ask me six months ago I would say &#8220;I heard about it but I don&#8217;t see any benefit in using it. I know javascript well enough to write my own code&#8221;.</p>
<p>And I was sooooo WRONG.</p>
<p>I just finished small project for my friend <a title="Jardins des reves" href="http://ogrody.marnik.net" target="_blank">www.jardinsdesreves.pl</a> and I decided to give it a try.<br />
The benefit: my js file is only <strong>170</strong> lines long.</p>
<p>I just want to show you couple benefits of this wonderfull framework.</p>
<p><strong>FORMS</strong>:</p>
<p>I have never seen a simpler way to submit forms via ajax.</p>
<p>Just look at the simple example:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="html4strict html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;hidden&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;id&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;2&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;hidden&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;save&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;1&quot;</span>&gt;</span>
  Title: <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;form_title&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">br</span>&gt;</span>
  Content: <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">textarea</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;form_content&quot;</span> <span style="color: #000066;">cols</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;25&quot;</span> <span style="color: #000066;">rows</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;8&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">textarea</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;button&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Save changes&quot;</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sendForm('text_save.php');&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="javascript javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> sendForm<span style="color: #009900;">&#40;</span>post_url<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #003366; font-weight: bold;">var</span> request <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;form&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">serialize</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>;
  $.<span style="color: #660066;">post</span><span style="color: #009900;">&#40;</span>post_url<span style="color: #339933;">,</span> request<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    formResponse<span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span>;
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> formResponse<span style="color: #009900;">&#40;</span>resp_data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#message&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span>resp_data<span style="color: #009900;">&#41;</span>;
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>As you can see jQuery does all job for us.<br />
There is only one requirement &#8211; each form element needs to have a name (not id).</p>
<p><a title="serialize" href="http://docs.jquery.com/Ajax/serialize" target="_blank">serialize()</a> function does great job and will post all form to &#8216;text_save.php&#8217; where we can do processing and show response to the user.</p>
<p>In the next article I will show you how to use great jQuery plugin &#8216;ajaxfileupload.js&#8217; to upload files.</p>
]]></content:encoded>
			<wfw:commentRss>http://artur.marnik.net/why-should-you-use-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>no &#8220;Hello world&#8221; today</title>
		<link>http://artur.marnik.net/no-hello-world-today/</link>
		<comments>http://artur.marnik.net/no-hello-world-today/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 03:25:00 +0000</pubDate>
		<dc:creator>Artur</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[hello world]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://artur.marnik.net/?p=3</guid>
		<description><![CDATA[This is just a beginning.
I hope to find enough time to write some articles about web development (PHP, Javascript, CSS,<a href="http://artur.marnik.net/no-hello-world-today/" class="searchmore">Read the Rest...</a><div class="clr"></div>]]></description>
			<content:encoded><![CDATA[<p>This is just a beginning.</p>
<p>I hope to find enough time to write some articles about web development (PHP, Javascript, CSS, Flex &#8230;) and my hobby photography.</p>
<p>I spend a lot of time writing code and even more time googling around for help and solutions. I know how difficult it is to find something useful. That&#8217;s why on my blog I will post only useful information and I will try not to copy anything that is already posted on other blogs.</p>
<p>Don&#8217;t expect to find a new post every day but if you have any questions or comments to my articles I will respond ASAP</p>
<p>Lets get started <img src='http://artur.marnik.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://artur.marnik.net/no-hello-world-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

