<?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></description>
	<lastBuildDate>Sat, 28 Jan 2012 11:25:21 +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>Mailing List with Mailman and Phishing warning in Gmail</title>
		<link>http://www.yellowjug.com/how-to/gmail-phishing-alert-mailman-mailing-lists-spf-record/</link>
		<comments>http://www.yellowjug.com/how-to/gmail-phishing-alert-mailman-mailing-lists-spf-record/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 09:36:55 +0000</pubDate>
		<dc:creator>Alberto Betella</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Posts in ENGLISH]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[Headers]]></category>
		<category><![CDATA[Mailing List]]></category>
		<category><![CDATA[Mailman]]></category>
		<category><![CDATA[Phishing]]></category>
		<category><![CDATA[SPF]]></category>

		<guid isPermaLink="false">http://www.yellowjug.com/?p=647</guid>
		<description><![CDATA[Gmail recently added a new anti-phishing feature that seems to not like too much mailing lists managed with Mailman (hosting providers often integrate this software in their control panel). Several e-mails sent through those mailing lists are now &#8220;flagged&#8221; with the following warning: This message may not have been sent by: sendername@gmail.com Learn More Report [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-662" title="gmail phishing alert" src="http://www.yellowjug.com/blog/wp-content/uploads/2011/12/gmail-phishing-70x300.jpg" alt="Gmail phishing alert" width="70" height="300" />Gmail recently added a new anti-phishing feature that seems to not like too much mailing lists managed with <a title="Mailman" href="http://www.list.org/" target="_blank">Mailman</a> (hosting providers often integrate this software in their control panel).</p>
<p>Several e-mails sent through those mailing lists are now &#8220;flagged&#8221; with the following warning:</p>
<p style="padding-left: 30px;"><span style="color: #0000ff;">This message may not have been sent by:</span></p>
<p style="padding-left: 30px;"><span style="color: #0000ff;"><em>sendername</em>@gmail.com Learn More Report Phishing</span></p>
<p>I currently have a couple of mailing list hosted by my personal server: due to the popularity of Gmail, this systematically displayed message is quite annoying, and tends to &#8220;alarm&#8221; some users of the mailing list.</p>
<p>If you are hosting a mailing list in your server, and you experience the same issue, here is a simple solution&#8230;</p>
<p>As <a title="Phishing Alerts by Gmail" href="http://mail.google.com/support/bin/answer.py?hlrm=it&amp;ctx=mail&amp;answer=185812" target="_blank">Google recommends in the Gmail support section</a>, you can create an SPF (Sender Policy Framework) record to your domain, so your mailing list will be authenticated.</p>
<p>To create an SPF record for your domain, access the Control Panel (e.g. CPanel) provided by your Hosting Company:</p>
<ol>
<li>Go to the section where you can edit the DNS (e.g. <a title="Edit DNS in Cpanel to add SPF record to your domain" href="http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/AdvancedDnsEditor" target="_blank">In Cpanel, &#8220;DNS -&gt; Advanced DNS zone editor&#8221;</a>)</li>
<li>Add a new TXT record where the record name will be <span style="color: #ff6600;"><strong>yourdomain.com.</strong></span> (NB. Do not add any <em>www</em> prefix, just the domain name and don&#8217;t forget the . after your domain name, it&#8217;s important!)</li>
<li>In the TXT Data field, write: <strong><span style="color: #ff6600;">v=spf1 ip4:123.456.789.000 ~all</span></strong> (don&#8217;t forget to replace the IP in this example with your real IP)</li>
<li>Leave the default value in the field TTL</li>
</ol>
<p>(Needless to say/repeat, replace <strong>yourdomain.com</strong> with your domain name, and <strong>123.456.789.000</strong> with the IP of your server).</p>
<p>That&#8217;s it. There are different possible values you can add to your SPF record, they may be more or less &#8220;permissive&#8221; (e.g. emails sent just from some subdomains etc&#8230;). However the aforementioned example should work for everyone, if you need something more specific then <a title="SPF record on Wikipedia and external links" href="http://en.wikipedia.org/wiki/Sender_Policy_Framework" target="_blank">start from here and follow the links</a>.</p>
<p>It may take a while to have these changes to your DNS propagated worldwide (up to 48 hours), then, once the SPF record in your domain is active, the email sent through your mailing list(s) won&#8217;t display any more the phishing warning in Gmail. That&#8217;s it :)</p>
<p><strong>How to check whether your SPF record works correctly?</strong></p>
<ul>
<li>Go here, for example: <a href="http://www.kitterman.com/spf/validate.html" target="_blank">http://www.kitterman.com/spf/validate.html</a></li>
</ul>
<ul>
<li>Write your domain name in the field &#8220;<strong>Domain name:</strong>&#8221; (do not put any <em>www</em>., use just the domain name and the extension e.g. <em>yourdomain.com</em>) and press &#8220;<strong>Get SPF record (if any)</strong>&#8220;.</li>
<li>If the result is positive you&#8217;ll have a response which will look like &#8220;<em>The TXT records found for your domain are:</em>&#8221; etc&#8230; (the page will also display a validation of the record). Otherwise, you&#8217;ll obtain this error &#8220;<em>No type SPF records found</em>.&#8221; (This may mean that there is something wrong in your SPF record, or that your DNS are not propagated yet).</li>
</ul>
<p>There is also a way to check whether your SPF record is active and works properly. You can enter Gmail and <a title="Show original headers in emails in Gmail" href="http://mail.google.com/support/bin/answer.py?answer=22454" target="_blank">give a look to the headers</a> of the emails sent through your mailing list.</p>
<p>The headers of the e-mails sent to a mailing list whose domain doesn&#8217;t have an SPF record, report a section similar to this one:</p>
<p style="padding-left: 60px;"><em>Received-SPF: neutral (google.com: 184.154.xxx.xxx is neither permitted nor denied by best guess record for domain of <em>mailing-list@yourdomain.com</em>) client-ip=184.154.xxx.xxx;</em></p>
<p>While an active SPF record in your domain would produce the following header:</p>
<p style="padding-left: 60px;"><em>Authentication-Results: mx.google.com; spf=pass (google.com: domain of mailing-list@yourdomain.com designates 184.154.xxx.xxx as permitted sender) smtp.mail=mailing-list@yourdomain.com; dkim=neutral (body hash did not verify) header.i=@gmail.com</em></p>
<p>Thus avoiding the annoying Phishing warning in the Gmail webmail interface.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yellowjug.com/how-to/gmail-phishing-alert-mailman-mailing-lists-spf-record/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Esercizi sui fogli di calcolo: Openoffice Calc ed Excel</title>
		<link>http://www.yellowjug.com/software/esercizi-sui-fogli-di-calcolo-openoffice-calc-ed-excel/</link>
		<comments>http://www.yellowjug.com/software/esercizi-sui-fogli-di-calcolo-openoffice-calc-ed-excel/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 15:14:45 +0000</pubDate>
		<dc:creator>Alberto Betella</dc:creator>
				<category><![CDATA[Articoli in ITALIANO]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[calc]]></category>
		<category><![CDATA[esame]]></category>
		<category><![CDATA[esercizi]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[fogli di calcolo]]></category>
		<category><![CDATA[openoffice]]></category>
		<category><![CDATA[soluzioni]]></category>
		<category><![CDATA[spreadsheet]]></category>

		<guid isPermaLink="false">http://www.yellowjug.com/?p=628</guid>
		<description><![CDATA[Tempo fa avevo confezionato una serie di esercizi progressivi sui fogli di calcolo (Openoffice Calc ed Excel) per la preparazione all&#8217;esame di informatica degli studenti dell&#8217;Università di Bergamo. Ho deciso di metterli a disposizione di tutti coloro che desiderino migliorare le proprie conoscenze sui fogli di calcolo. E&#8217; possibile scaricare liberamente tali esercizi in versione [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript">// <![CDATA[
 google_ad_client = "pub-9276347993669457"; /* 468x60, YJ - Top Posts */ google_ad_slot = "0430528840"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script></p>
<p>Tempo fa avevo confezionato una serie di esercizi progressivi sui fogli di calcolo (Openoffice Calc ed Excel) per la preparazione all&#8217;esame di informatica degli studenti dell&#8217;<a href="http://www.unibg.it/" target="_blank">Università di Bergamo</a>.</p>
<p><img class="alignright size-full wp-image-643" title="Esercizi e Soluzioni Fogli di Calcolo Openoffice ed Excel" src="http://www.yellowjug.com/blog/wp-content/uploads/2011/02/Immagine-3.png" alt="" width="184" height="105" />Ho deciso di metterli a disposizione di tutti coloro che desiderino migliorare le proprie conoscenze sui fogli di calcolo.</p>
<p>E&#8217; possibile scaricare liberamente tali esercizi in <a href="http://www.yellowjug.com/blog/wp-content/uploads/2011/02/Openoffice_Esercizi_Fogli_Di_Calcolo_2010.zip">versione Openoffice Calc</a> oppure in <a href="http://www.yellowjug.com/blog/wp-content/uploads/2011/02/Excel_Esercizi_Fogli_Di_Calcolo.zip">versione Excel</a> (esportata dall&#8217;originale in Openoffice): il file contiene tutti gli esercizi in ordine progressivo, comprensivi di suggerimenti, unitamente alle soluzioni finali in un foglio separato, che serviranno a verificare i propri risultati.</p>
<p>Il materiale qui distribuito è rilasciato attraverso una licenza <a href="http://creativecommons.org/licenses/by-nc-nd/3.0/" target="_blank">Creative Commons By-Nc-Nd</a>, e secondo tali criteri va utilizzato.</p>
<p>Di seguto una lista delle tematiche trattate:</p>
<ul>
<li>operazioni aritmetiche elementari</li>
<li>somme e calcolo dei totali</li>
<li>calcolo della media e dei valori massimi e minimi</li>
<li>operatori di confronto</li>
<li>operazioni su celle ed aree contigue o non contigue</li>
<li>ordinamento dati e creazione di grafici</li>
<li>calcolo percentuali</li>
<li>calcolo percentuali e proporzionalità</li>
<li>funzioni, arrotondamenti decimali e grafici</li>
<li>gestione ed elaborazione dei dati</li>
<li>gestione bilancio</li>
<li>utilizzo riferimenti assoluti</li>
<li>moltiplicazioni, riferimenti relativi e assoluti</li>
<li>formule, proporzionalità, percentuali e riferimenti assoluti</li>
</ul>
<p><strong>Scarica gli esercizi:</strong></p>
<ul>
<li><a href="http://www.yellowjug.com/blog/wp-content/uploads/2011/02/Openoffice_Esercizi_Fogli_Di_Calcolo_2010.zip">Versione Openoffice Calc</a> &#8211; CONSIGLIATO [File compresso ZIP, 96KB]</li>
<li><a href="http://www.yellowjug.com/blog/wp-content/uploads/2011/02/Excel_Esercizi_Fogli_Di_Calcolo.zip">Versione Excel</a> [File compresso ZIP, 20KB]</li>
</ul>
<p>Puoi scaricare Openoffice.org, suite d&#8217;ufficio libera e gratuita (comprendente foglio di calcolo, programma di videoscrittura, presentazioni etc&#8230;) all&#8217;indirizzo <a href="http://www.openoffice.org/" target="_blank">http://www.openoffice.org</a>.</p>
<p><script type="text/javascript">// <![CDATA[
 google_ad_client = "pub-9276347993669457"; /* 468x60, YJ - Top Posts */ google_ad_slot = "0430528840"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yellowjug.com/software/esercizi-sui-fogli-di-calcolo-openoffice-calc-ed-excel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>1</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>

