<?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>YellowJug.com &#187; How-to</title>
	<atom:link href="http://www.yellowjug.com/category/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yellowjug.com</link>
	<description>by Alberto Betella</description>
	<lastBuildDate>Fri, 05 Feb 2010 11:29:46 +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>Software libero e licenza GPL</title>
		<link>http://www.yellowjug.com/software/software-libero-e-licenza-gpl/</link>
		<comments>http://www.yellowjug.com/software/software-libero-e-licenza-gpl/#comments</comments>
		<pubDate>Mon, 11 May 2009 11:06:53 +0000</pubDate>
		<dc:creator>Alberto Betella</dc:creator>
				<category><![CDATA[Articoli in ITALIANO]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[gnu]]></category>
		<category><![CDATA[gpl]]></category>
		<category><![CDATA[licenze]]></category>
		<category><![CDATA[software libero]]></category>
		<category><![CDATA[tesi]]></category>

		<guid isPermaLink="false">http://www.yellowjug.com/?p=330</guid>
		<description><![CDATA[Al fine di approfondire il concetto di “libertà” del software riportiamo una trascrizione del seminario tenuto da Stallman nel maggio 2005 all&#8217;università di Bologna, organizzato nell&#8217;ambito del master in “Tecnologia del Software Libero e Open Source”: “Free software means software that respects user&#8217;s freedom. It does not mean zero price software, in fact it&#8217;s not [...]]]></description>
			<content:encoded><![CDATA[<p>Al fine di approfondire il concetto di <a href="http://www.yellowjug.com/open-source/la-nascita-del-software-libero/">“libertà” del software</a> riportiamo una trascrizione del <a title="Scarica la registrazione in formato OGG della conferenza di Stallman a Bologna (maggio 2005)" href="http://www.lugob.org/modules/mylinks/singlelink.php?cid=1&amp;lid=1" target="_blank">seminario tenuto da Stallman nel maggio 2005 all&#8217;università di Bologna</a>, organizzato nell&#8217;ambito del master in “Tecnologia del Software Libero e Open Source”:</p>
<p style="padding-left: 30px;"><em>“Free software means software that respects user&#8217;s freedom. It does not mean zero price software, in fact it&#8217;s not directly about money at all, it&#8217;s about freedom, so think of free speech, not free beer [...] The software that&#8217;s available to the public, but not free software, is called proprietary software or non-free software or user subjugating software, because it keeps the users divided and helpless; divided because each one is forbidden to share, and helpless because the users don&#8217;t have the source code so they can&#8217;t change the software, they can&#8217;t even verify what it does. Free software develops in a kind of democratic society under the control of its users, proprietary software gives the developer power over the user [...] its distribution system is a system for subjugating people, for exercising power over people; and that makes it fundamentally unethical.”</em></p>
<p>Stallman attraverso la ricorrente esortazione ad intendere il termine <em>free</em> come “libertà di parola” piuttosto che “birra gratis”, chiarisce la valenza semantica di questo vocabolo che, nella lingua inglese, potrebbe dare adito ad incomprensioni; la libertà nel software non ne implica la gratuità (anche se nella maggior parte dei casi il software libero è pure gratuito).<br />
Egli definisce quattro libertà che devono essere rispettate perché un software possa essere considerato “libero”:</p>
<p style="padding-left: 30px;"><em>“To understand free software you need to understand what the freedoms are: the definition of free software is that the user has four specific freedoms, freedoms that every user of software always should have. Freedom zero is the freedom to run the program as you wish, freedom one is the freedom to help yourself, in other words the freedom to study the source code of the program and then change it to do what you wish. Freedom two is the freedom to help your neighbor; that&#8217;s the freedom to make copies and distribute to others, and freedom three is the freedom to help your community, that&#8217;s the freedom to publish modified versions so others can get the benefit of your contribution. These four freedom are all essential; in order to be free software the program must give you all of these freedoms.”</em></p>
<p>Stallman nel 1989 sintetizzò queste libertà in una licenza, la <em>GNU General Public License (GPL)</em>. Il software tutelato da tale licenza può essere liberamente utilizzato, modificato, copiato e distribuito; inoltre chi rilascia software secondo questi termini deve distribuirne il codice sorgente. Infine chiunque apporti aggiunte o miglioramenti a programmi rilasciati mediante GPL è vincolato a rendere libere le proprie modifiche.<br />
La <a href="http://www.gnu.org/licenses/gpl.html" target="_blank">General Public License</a> è scritta con un linguaggio giuridico e possiede una valenza legale, poiché registrata dalla Free Software Foundation, che ne detiene il <em>copyright</em>:</p>
<p style="padding-left: 30px;"><em>“Preamble<br />
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software&#8211;to make sure the software is free for all its users. [...] Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.<br />
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.[...]”</em></p>
<p>L’autore di un software ne detiene la paternità intellettuale, ed è un suo diritto optare per la tutela del proprio lavoro attraverso una licenza che permetta di riprodurlo, utilizzarlo e ridistribuirlo, vincolando chiunque lo modifichi a fare lo stesso.<br />
<strong>L&#8217;idea geniale che sta alla base della GPL (e di altre licenze promosse dalla FSF) consiste proprio nello sfruttamento della stessa legge sul copyright per istituzionalizzare legalmente il <em>copyleft</em>.</strong></p>
<p><span style="color: #808080;">___<br />
</span></p>
<p><span style="color: #808080;">Questo articolo è tratto dalla mia Tesi di Laurea: </span></p>
<p><span style="color: #808080;">Alberto Betella, “<em>Open Source, Free Software e Podcasting: l&#8217;esperienza di Pluriverisadio</em>”, Università degli Studi di Bergamo, A.A. 2005/2006.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yellowjug.com/software/software-libero-e-licenza-gpl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to display referer-based contents in your web pages using PHP</title>
		<link>http://www.yellowjug.com/how-to/how-to-display-referer-based-contents-in-your-web-pages-using-php/</link>
		<comments>http://www.yellowjug.com/how-to/how-to-display-referer-based-contents-in-your-web-pages-using-php/#comments</comments>
		<pubDate>Sun, 10 Jun 2007 07:43:24 +0000</pubDate>
		<dc:creator>Alberto Betella</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Posts in ENGLISH]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.yellowjug.com/php/how-to-display-referer-based-contents-in-your-web-pages-using-php/</guid>
		<description><![CDATA[In this article I&#8217;ll explain how to use PHP in order to offer your visitors targeted content based upon their referring page. PHP and CSS allow you to create a customized box which appears in a defined place of your webpages and gives help to visitors who satisfy predetermined conditions: the PHP variable $_SERVER consists [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_80" class="wp-caption alignright" style="width: 160px"><a href="http://www.yellowjug.com/blog/wp-content/uploads/2007/06/helper.png" rel="lightbox"><img class="size-thumbnail wp-image-80" title="Hintbox" src="http://www.yellowjug.com/blog/wp-content/uploads/2007/06/helper-150x150.png" alt="Hintbox" width="150" height="150" /></a><p class="wp-caption-text">Hintbox based on referer</p></div>
<p><em>In this article I&#8217;ll explain how to use PHP in order to offer your visitors targeted content based upon their referring page.</em></p>
<p>PHP and CSS allow you to create a customized box which appears in a defined place of your webpages and gives help to visitors who satisfy predetermined conditions: the PHP variable <strong>$_SERVER</strong> consists in an array containing several information. The variable <strong>$_SERVER['HTTP_REFERER']</strong> contains the referer URL (i.e. the website or webpage where the visitor comes from).</p>
<p>You can use this variable to offer a referer-based content to your visitors: for example <strong>when some visitors come from a particular URL, you can show them a box containing tips that help finding quickly what they are looking for</strong>.</p>
<p>Let&#8217;s go deeper into the matter and see a practical use of this technique&#8230;</p>
<p>First, create a css class:</p>
<blockquote><p><code>.helper {<br />
position:absolute;<br />
top: 0px;<br />
left: 0px;<br />
background-color: #CC3300;<br />
color:#FFFFFF;<br />
}<br />
</code></p></blockquote>
<p>I called the CSS class &#8220;.helper&#8221; and defined an element with absolute position (top-left), a red background and white text.</p>
<p>Now, you can use the following PHP code to display the &#8220;.helper&#8221; element defined in CSS on determined conditions. Using the PHP command <a href="http://it.php.net/eregi" target="_blank"><strong>eregi</strong></a> on the variable <strong>$_SERVER['HTTP_REFERER']</strong>, the server can look for the presence of certain terms in the referer URL:</p>
<blockquote><p><code>&lt;?php<br />
if (eregi("font",$_SERVER['HTTP_REFERER'])) {<br />
echo "&lt;div class="helper"&gt;Looking for YellowJug font?&lt;br /&gt;<br />
&lt;a href="projects/yellowjug_true_type_font/"&gt;Click here...&lt;/a&gt;<br />
&lt;/div&gt;";<br />
}<br />
?&gt;<br />
</code></p></blockquote>
<p>The human &#8220;translation&#8221; of the code above is:<br />
<strong>if</strong> the visitor&#8217;s origin is a URL which contains the term &#8220;font&#8221;, <strong>then</strong> display red a box on the top left of the webpage (the box position and colors are obviously defined in the CSS class .helper) which suggests the visitor to visit a certain link or page.</p>
<p>If the term-matching condition is not satisfied, the box simply won&#8217;t appear and won&#8217;t annoy your visitors.</p>
<p>Please consider that this technical solution can be adopted on different approaches in more elaborate contexts. These &#8220;boxes&#8221; could offer hints, tips or suggestions and can be displayed <em>ad hoc</em>, for example, when a visitor comes from a certain page or comes from a page which contains a certain term (including search engines pages).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yellowjug.com/how-to/how-to-display-referer-based-contents-in-your-web-pages-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The importance of !important in CSS</title>
		<link>http://www.yellowjug.com/web-design/the-importance-of-important-in-css/</link>
		<comments>http://www.yellowjug.com/web-design/the-importance-of-important-in-css/#comments</comments>
		<pubDate>Tue, 05 Jun 2007 05:35:07 +0000</pubDate>
		<dc:creator>Alberto Betella</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Posts in ENGLISH]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[stylesheet]]></category>

		<guid isPermaLink="false">http://www.yellowjug.com/web-design/the-importance-of-important-in-css/</guid>
		<description><![CDATA[In this article I&#8217;ll introduce the declaration !important in CSSs and explain how to use it as a &#8220;workaround&#8221; to avoid adopting IE proprietary code to obtain the max-width effect in your web pages. When a CSS propriety is specified twice, the browser will commonly use the last one. Let&#8217;s see an example: #main { [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-9276347993669457";
/* 468x60, YJ - Top Posts */
google_ad_slot = "0430528840";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<div class="mceTemp">
<dl id="attachment_84" class="wp-caption alignright" style="width: 273px;">
<dt class="wp-caption-dt"><img class="size-full wp-image-84" title="CSS" src="http://www.yellowjug.com/blog/wp-content/uploads/2007/06/css.png" alt="CSS" width="263" height="111" /></dt>
</dl>
</div>
<p><em>In this article I&#8217;ll introduce the declaration <strong>!important</strong> in CSSs and explain how to use it as a &#8220;workaround&#8221; to avoid adopting IE proprietary code to obtain the <strong>max-width</strong> effect in your web pages.</em></p>
<p>When a CSS propriety is specified twice, the browser will commonly use the last one. Let&#8217;s see an example:</p>
<blockquote><p><code><br />
#main {<br />
width:600px;<br />
width:800px;<br />
}</code></p></blockquote>
<p>In this example the browser will assign width 800 pixels to the <em>#main</em> element.</p>
<p>The declaration <em>!important</em> can be used in cascading style sheets to give priority to some parameters.</p>
<blockquote><p><code><br />
#main {<br />
width:600px !important;<br />
width:800px;<br />
}</code></p></blockquote>
<p>In the example above the browser will give priority to the first declaration and the <em>#main</em> element will be 600 pixels width.</p>
<p>So, what&#8217;s the point?<br />
<strong>Internet Explorer 6</strong> and previous versions <strong>simply ignore the declaration <em>!important</em></strong> (while IE 7 supports them) <strong>therefore we can take advantage of this issue to design a &#8220;browser-based&#8221; CSS</strong>.</p>
<p>Let&#8217;s consider, for example, the CSS proprieties <em>max-width</em> and <em>min-width</em>: these parameters specify a maximum and minimum width of a web element (such as a table or a DIV container). This is a useful feature which allows to create fluid and dynamic layouts that can be displayed correctly both in low resolutions (e.g. 640&#215;480) and in very high resolutions.<br />
Unfortunately IE 6, <a href="http://www.yellowjug.com/web-design/why-internet-explorer-is-my-worse-friend/">among other things</a>, doesn&#8217;t even support the max/min width declaration: in order to obtain the same effect under IE6 you can use a proprietary code:</p>
<blockquote><p><code>#main {<br />
max-width: 900px;<br />
<strong>width:expression(document.body.clientWidth &gt; 900? "900px": "auto" );</strong> /* IE proprietary code */<br />
}</code></p></blockquote>
<p>In this example the #main element will be rendered with a maximum width of 900px both in Firefox, Safari, Opera and Internet Explorer.<br />
Please note that <strong>the proprietary code <em>width:expression</em> is not a valid CSS declaration</strong>, so if you decide to adopt it, your stylesheet won&#8217;t respect web standards and won&#8217;t be validated.</p>
<p>However, we can use the <em>!important</em> declaration to avoid non-standard CSS expressions. Here is a &#8220;workaround&#8221; which allows to use max/min width with smart browsers and specify a fixed width for IE 6 users:</p>
<blockquote><p><code>#main {<br />
margin: 0 auto 0;<br />
max-width: 900px;<br />
min-width: 770px;<br />
width:auto !important;<br />
width:800px;<br />
}</code></p></blockquote>
<p>In the above example (you can see it in action on this website) the declaration <em>!important</em> is used to specify dynamic width attributes to browsers that support them (e.g. Firefox, Netscape, Opera, Safari and IE 7) while the width is fixed to an average value (800 pixels) for IE 6.<br />
This doesn&#8217;t solve completely the matter, but can be considered as a workaround to improve your fluid layout appearance avoiding non-standard code.<br />
<script type="text/javascript"><!--
google_ad_client = "pub-9276347993669457";
/* 468x60, YJ - Top Posts */
google_ad_slot = "0430528840";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yellowjug.com/web-design/the-importance-of-important-in-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xubuntu Linux on iMac G3</title>
		<link>http://www.yellowjug.com/how-to/xubuntu-linux-on-imac-g3/</link>
		<comments>http://www.yellowjug.com/how-to/xubuntu-linux-on-imac-g3/#comments</comments>
		<pubDate>Fri, 11 May 2007 07:08:20 +0000</pubDate>
		<dc:creator>Alberto Betella</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Posts in ENGLISH]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.yellowjug.com/mac/xubuntu-linux-on-imac-g3/</guid>
		<description><![CDATA[Today I decided to install Linux on my 500Mhz iMac G3 with 256 MB RAM. Although this mac is quite old, it can still be employed for internet surfing or as a local web/file server. Its design is terrific and the machine is compact, silent and easy to move. I am oriented on debian-based distros, [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-9276347993669457";
/* 468x60, YJ - Top Posts */
google_ad_slot = "0430528840";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<div id="attachment_90" class="wp-caption alignright" style="width: 210px"><img class="size-full wp-image-90" title="iMac G3" src="http://www.yellowjug.com/blog/wp-content/uploads/2007/05/imac_indigo.jpg" alt="iMac G3" width="200" height="200" /><p class="wp-caption-text">iMac G3</p></div>
<p>Today I decided to install <strong>Linux</strong> on my 500Mhz iMac G3 with 256 MB RAM. Although this mac is quite old, it can still be employed for internet surfing or as a local web/file server. Its design is terrific and the machine is compact, silent and easy to move.</p>
<p>I am oriented on debian-based distros, so I chose to install Xubuntu (7.04), a light linux distribution (Ubuntu-flavoured), which features Xfce desktop environment instead of Gnome or KDE (you can download Xubuntu freely from the <a href="http://www.xubuntu.org/" target="_blank">official website</a>: I downloaded the <em>Alternate</em> Install CD, which is easy to install as the Live CD version, but requires less ram).</p>
<p>The installation went smoothly and the only problem I encountered was the freezing of X server at startup; I <em>googled</em> for some information and found several posts which explained how to solve the issue changing various parameters such as monitor horizontal and vertical sync in xorg.conf, however I wasn&#8217;t able to start correctly the X server and have the graphical interface working (everything seemed extremely slow and Xfce was frozen) .</p>
<p>Eventually I found a solution and decided to post it here as Mac configurations are quite standard and someone else with this machine could run into the same problem:</p>
<ul>
<li>If X or Xfce freeze (or crash) on the first restart after installation you&#8217;ll be able to access the terminal through the shortcut <strong>ctrl+alt+F1</strong> (don&#8217;t wait too much time to access the terminal  as the mac could freeze completely and you&#8217;ll have to restart it)</li>
<li>login into the system typing your user and password, then type:<br />
<code>sudo su</code><br />
and repeat your password in order to obtain root access</li>
<li>now open xorg.conf with <em>nano</em>, a simple text editor:<br />
<code>nano /etc/X11/xorg.conf</code></li>
<li>go to the section &#8220;Module&#8221; inside xorg.conf file and place a comment adding the # symbol before the line <em>Load &#8220;dri&#8221;</em>:<br />
<code>#  Load   "dri"</code></li>
<li>Save the xorg.conf file with the shortcut <strong>ctrl+o</strong> and press <strong>Enter</strong></li>
<li>Reboot the system typing<br />
<code>reboot</code><br />
and everything magically will work :-)</li>
</ul>
<p>Disabling DRI (Direct Rendering Infrastructure) couldn&#8217;t be a very elegant solution, however, if you don&#8217;t plan to use 3D games or OpenGL applications (don&#8217;t think this iMac model would run them adequately anyway), this solution makes your old iMac G3 work like a charm and you&#8217;ll be able to perform home and office tasks such as surfing the internet, playing music or writing a document with your new brand, free operating system.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-9276347993669457";
/* 468x60, YJ - Top Posts */
google_ad_slot = "0430528840";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yellowjug.com/how-to/xubuntu-linux-on-imac-g3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
