<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>The Darshan's Weblog</title>
	<atom:link href="http://thedarshan.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://thedarshan.wordpress.com</link>
	<description>"Spero di non incrementare inutilmente l'entropia dell'universo"</description>
	<lastBuildDate>Sat, 07 Nov 2009 22:26:12 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>it</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='thedarshan.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/6cf0f8a7a8b0b006015537ece7b9bbdf?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>The Darshan's Weblog</title>
		<link>http://thedarshan.wordpress.com</link>
	</image>
			<item>
		<title>Programmazione, compiti svolti 1/3</title>
		<link>http://thedarshan.wordpress.com/2009/11/07/programmazione-compiti-svolti-13/</link>
		<comments>http://thedarshan.wordpress.com/2009/11/07/programmazione-compiti-svolti-13/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 21:31:00 +0000</pubDate>
		<dc:creator>thedarshan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[massimo30]]></category>
		<category><![CDATA[programmazione]]></category>
		<category><![CDATA[unipa]]></category>

		<guid isPermaLink="false">http://thedarshan.wordpress.com/?p=352</guid>
		<description><![CDATA[Publico i miei svolgimenti di alcuni esami di programmazione da 9cfu del corso di ingegneria informatica di Palermo sperando che siano utili a qualcuno.
Le implementazioni sono tutte in C++ ANSI, l&#8217;ambiente di sviluppo usato e Dev-Cpp (non perché mi piacesse&#8230;semplicemente era l&#8217;IDE che avrei usato durante l&#8217;esame e quindi era bene che mi abituassi alle [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=352&subd=thedarshan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Publico i miei svolgimenti di alcuni esami di programmazione da 9cfu del corso di ingegneria informatica di Palermo sperando che siano utili a qualcuno.</p>
<p>Le implementazioni sono tutte in C++ ANSI, l&#8217;ambiente di sviluppo usato e Dev-Cpp (non perché mi piacesse&#8230;semplicemente era l&#8217;IDE che avrei usato durante l&#8217;esame e quindi era bene che mi abituassi alle sue stranezze, adesso è un ambiente passabile ma la versione 4 che usavo era orrenda). inoltre uso il più possibile le STL (il mio corso non prevedeva la scrittura di strutture di dati)</p>
<p>Tipicamente nei compiti uso un file main, un file di header con tutti i prototipi e un file cpp con tutte le implementazioni, genericamente non è una buona idea ma per cose così piccole è inutile fare le cose in maniera scalabile</p>
<h2>Testo del compito</h2>
<blockquote><p><strong>PROGRAMMAZIONE (9 CFU)<br />
SIMULAZIONE DI UNA BATTUTA DI CACCIA.<br />
</strong>Scrivete un programma per la simulazione di una battuta di caccia in base alle specifiche sotto riportate.<br />
La battuta di caccia si svolge in una riserva, che per semplicità si suppone quadrata e di dimensione 3000&#215;3000, nella quale sono presenti 50 lepri e 10 cinghiali inizialmente disposti in posizione casuale e con direzione di moto casuale.<br />
I cinghiali si muovono in linea retta con velocità costante di 2,5 m/s fino a quando non raggiungono il confine della riserva; in questo ultimo caso cambiano direzione in maniera casuale.<br />
Le lepri si muovono a intermittenza. Si muovono in linea retta con velocità di 4m/s e direzione casuale per 5 secondi, poi stanno fermi per cinque secondi, poi si muovono per altri 5 secondi con una nuova direzione casuale e così via.<br />
Nella riserva sono anche presenti 3 cacciatori che vengono inizializzati in posizione casuale e non si muovono durante la simulazione. Quando un animale si trova a distanza inferiore a 25 m da un cacciatore viene catturato.<br />
Alla fine della battuta di caccia (dopo 7200 secondi) stampate il numero di cinghiali e di lepri catturate da ciascun cacciatore.</p></blockquote>
<h2>Diagramma UML della mia soluzione</h2>
<div class="wp-caption aligncenter" style="width: 488px"><a href="http://www.thedarshan.netsons.org/img/pub/UML_Caccia.png"><img title="Diagramma UML" src="http://www.thedarshan.netsons.org/img/pub/UML_Caccia.png" alt="Diagramma UML" width="478" height="344" /></a><p class="wp-caption-text">Diagramma UML, (clicca per lo zoom)</p></div>
<h2>Codice della soluzione</h2>
<h3>Header (caccia.h)</h3>
<pre class="brush: cpp;">
#ifndef CACCIA
#define CACCIA
#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;list&gt;
using namespace std;
class point{public:
       int riga;
       int colonna;
       point();
       point(int r,int c){riga=r;colonna=c;};
       string ToString();
};

class Animale{public:
      Animale(string nome,float veocita);
      Animale(string nome,point posizione,float angolazione,float velocita){
                     this-&gt;nome=nome;this-&gt;velocita=velocita;
                     this-&gt;posizione=posizione;this-&gt;angolazione=angolazione;
                     };
      string nome;
      virtual point muovi(long tempo)=0;
      point posizione;
      float angolazione;
      float velocita;
};

class Lepre:public Animale{public:
      Lepre():Animale(&quot;Lepre&quot;,4.0f){};
      Lepre(point posizione,float angolazione):
                  Animale(&quot;Lepre&quot;,posizione,angolazione,4.0f){
                  this-&gt;posizione=posizione;
                  this-&gt;angolazione=angolazione;
                  };
      virtual point muovi(long tempo);
};

class Cinghiale:public Animale{public:
      Cinghiale():Animale(&quot;Cinghiale&quot;,2.5){};
      Cinghiale(point posizione,float angolazione):
                  Animale(&quot;Cinghiale&quot;,posizione,angolazione,2.5){
                  this-&gt;posizione=posizione;
                  this-&gt;angolazione=angolazione;
                  };
      virtual point muovi(long tempo);
};

class Cacciatore{public:
      static const int vista=250;
      Cacciatore(list&lt;Animale*&gt; &amp;animali,string nome=&quot;&quot;){this-&gt;nome=nome;this-&gt;animali=&amp;animali;this-&gt;lepri=0;this-&gt;cinghiali=0;}
      Cacciatore(list&lt;Animale*&gt; &amp;animali,string nome,point posizione);
      void spara();
      list&lt;Animale*&gt; *animali;
      string nome;
      point posizione;
      int angolazione;
      int lepri;
      int cinghiali;
};

class Campo{public:
      list&lt;Animale*&gt; animali;
      list&lt;Cacciatore*&gt; cacciatori;
      static const int righe=3200;
      static const int colonne=3200;
};
float distanza(point,point);
#endif
</pre>
<h3>Codice delle classi (caccia.cpp)</h3>
<pre class="brush: cpp;">
#include &quot;caccia.h&quot;
#include &lt;cmath&gt;
#include &lt;cstdlib&gt;
#include &lt;cstdio&gt;
#include &lt;sstream&gt;
#define pi 3.141592654
using namespace std;
float distanza(point da ,point a){
      int ascisse=da.riga-a.riga;
      int ordinate=da.colonna-a.colonna;
      return sqrt(ascisse*ascisse + ordinate*ordinate);
};

point::point(){
               this-&gt;riga=rand()%Campo::righe;
               this-&gt;colonna=rand()%Campo::colonne;
};

string point::ToString(){
        stringstream temp;
        temp&lt;&lt;&quot;[&quot;&lt;&lt;riga&lt;&lt;&quot;,&quot;&lt;&lt;colonna&lt;&lt;&quot;]&quot;;
        return temp.str();
       };

Animale:: Animale(string nome,float velocita){
          this-&gt;nome=nome;
          this-&gt;posizione=point::point();
          this-&gt;angolazione=(rand()%360)*((2*pi)/360);
          this-&gt;velocita=velocita;
          //cout&lt;&lt;posizione.ToString()&lt;&lt;endl;
};

point Lepre::muovi(long tempo){
     tempo=tempo%10;
     //cout&lt;&lt;tempo&lt;&lt;&quot; &quot;;
      if(tempo&gt;5){
                  angolazione=(rand()%360)*((2*pi)/360);
                  posizione.riga+=(int)(velocita*sin(angolazione));
                  posizione.colonna+=(int)(velocita*cos(angolazione));
                  if(posizione.riga&gt; Campo::righe)posizione.riga=Campo::righe;
                  if(posizione.colonna&gt; Campo::colonne)posizione.colonna=Campo::colonne;
                  if(posizione.riga&lt; 0)posizione.riga=0;
                  if(posizione.colonna&lt; 0)posizione.colonna=0;
                  };
return posizione;
};

point Cinghiale::muovi(long tempo){
     posizione.riga+=(int)(velocita*sin(angolazione));
     posizione.colonna+=(int)(velocita*cos(angolazione));
     if((posizione.riga&gt;Campo::righe || posizione.colonna&gt;Campo::colonne)
        ||(posizione.riga&lt;0 ||posizione.colonna&lt;0)
     ){
                          if(posizione.riga&gt; Campo::righe)posizione.riga=Campo::righe;
                          if(posizione.colonna&gt; Campo::colonne)posizione.colonna=Campo::colonne;
                          if(posizione.riga&lt; 0)posizione.riga=0;
                          if(posizione.colonna&lt; 0)posizione.colonna=0;
                          angolazione=(rand()%360)*((2*pi)/360);
     };
     return posizione;
};

void Cacciatore::spara(){
     //int n=0;
     for(list&lt;Animale*&gt;::iterator from = animali-&gt;begin();
        from != animali-&gt;end();
        ++from//,cout&lt;&lt;++n&lt;&lt;endl
        )if(distanza(posizione,(*from)-&gt;posizione)&lt;vista){
            if((*from)-&gt;nome==&quot;Lepre&quot;){this-&gt;lepri++;
                                       cout&lt;&lt;nome&lt;&lt;&quot;: Ucciso una lepre ho!     &quot;;
                                       }else{this-&gt;cinghiali++;
                                       cout&lt;&lt;nome&lt;&lt;&quot;: Ucciso un  cinghialo ho! &quot;;
                                       };
            cout&lt;&lt;(*from)-&gt;posizione.ToString()&lt;&lt;endl;
            delete (*from);
            animali-&gt;erase(from);//se si cancella un valore l'teratore salta
            return;
        };
};

Cacciatore::Cacciatore(list&lt;Animale*&gt; &amp;animali,string nome,point posizione){
                             this-&gt;nome=nome;
                             this-&gt;animali=&amp;animali;
                             this-&gt;lepri=0;
                             this-&gt;cinghiali=0;
                             this-&gt;posizione=point::point();
};
</pre>
<h3>Codice del main (main.cpp)</h3>
<pre class="brush: cpp;">
#include &lt;cstdlib&gt;
#include &lt;iostream&gt;
#include &lt;ctime&gt;
#include &quot;caccia.h&quot;
using namespace std;

int main(int argc, char *argv[])
{
    srand((unsigned int)time(NULL));
    int a;
    Campo campo;
    campo.cacciatori.push_back(new Cacciatore(campo.animali,&quot;Qui'&quot;));
    campo.cacciatori.push_back(new Cacciatore(campo.animali,&quot;Quo'&quot;));
    campo.cacciatori.push_back(new Cacciatore(campo.animali,&quot;Qua'&quot;));
    for(a=0;a&lt;10;a++){campo.animali.push_back(new Cinghiale());};
    for(a=0;a&lt;50;a++){campo.animali.push_back(new Lepre());};
    for (a=0;a&lt;7200;a++){
//        cout&lt;&lt;a&lt;&lt;&quot; &quot;;
        for(list&lt;Animale*&gt;::iterator from = campo.animali.begin();
                                     from != campo.animali.end();
                                     ++from
                                     )(*from)-&gt;muovi(a);

        for(list&lt;Cacciatore*&gt;::iterator from = campo.cacciatori.begin();
                                     from != campo.cacciatori.end();
                                     ++from
                                     )(*from)-&gt;spara();
    };
    system(&quot;PAUSE&quot;);
    return EXIT_SUCCESS;
}
</pre>
<p style="text-align:center;">
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedarshan.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedarshan.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedarshan.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedarshan.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedarshan.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedarshan.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedarshan.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedarshan.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedarshan.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedarshan.wordpress.com/352/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=352&subd=thedarshan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thedarshan.wordpress.com/2009/11/07/programmazione-compiti-svolti-13/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b38d49d538414927cd1c01ba4f49a135?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thedarshan</media:title>
		</media:content>

		<media:content url="http://www.thedarshan.netsons.org/img/pub/UML_Caccia.png" medium="image">
			<media:title type="html">Diagramma UML</media:title>
		</media:content>
	</item>
		<item>
		<title>Facebook e la politica (estera)</title>
		<link>http://thedarshan.wordpress.com/2009/10/16/facebook-e-la-politica-estera/</link>
		<comments>http://thedarshan.wordpress.com/2009/10/16/facebook-e-la-politica-estera/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 10:14:32 +0000</pubDate>
		<dc:creator>thedarshan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[afganistan]]></category>
		<category><![CDATA[censura]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[politica]]></category>

		<guid isPermaLink="false">http://thedarshan.wordpress.com/?p=335</guid>
		<description><![CDATA[Mezzora fa tentavo di linkare su facebook questa pagina
http://www.timesonline.co.uk/tol/news/world/Afghanistan/article6877142.ece
E&#8217; l&#8217;articolo del Times che suppone che i servizi segreti italiani pagassero le milizie talebane per evitare attacchi.

L&#8217;url era bannata e facebook non mi permetteva ne di pubblicarlo ne di inviarlo dalla chat, così ho usato TinyUrl per cambiare l&#8217;url e aggirare il filtro, così facendo riesco [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=335&subd=thedarshan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Mezzora fa tentavo di linkare su facebook questa pagina</p>
<p><a href="http://www.timesonline.co.uk/tol/news/world/Afghanistan/article6877142.ece">http://www.timesonline.co.uk/tol/news/world/Afghanistan/article6877142.ece</a></p>
<p>E&#8217; l&#8217;articolo del Times che suppone che i servizi segreti italiani pagassero le milizie talebane per evitare attacchi.</p>
<p style="text-align:center;"><img class="aligncenter size-full wp-image-348" title="Segnalata" src="http://thedarshan.files.wordpress.com/2009/10/segnalata.jpg?w=500&#038;h=250" alt="Segnalata" width="500" height="250" /></p>
<p>L&#8217;url era bannata e facebook non mi permetteva ne di pubblicarlo ne di inviarlo dalla chat, così ho usato TinyUrl per cambiare l&#8217;url e aggirare il filtro, così facendo riesco a pubblicare l&#8217;url ma 5 minuti dopo il mio account viene sospeso &#8220;per comportamenti sospetti&#8221;</p>
<p><span id="more-335"></span></p>
<blockquote><p>Suspicious activity has been detected on your Facebook account and it has been temporarily suspended as a security precaution. It is likely that your account was compromised as a result of entering your password on a website designed to look like Facebook. This type of attack is known as phishing.</p></blockquote>
<p><img src="http://www.thedarshan.netsons.org/img/pub/Ban2.jpg" alt="" width="479" height="237" /></p>
<p>Spero si tratti di sospetti di Phishing per aver usato tinyurl o qualcosa del genere, perché altrimenti si tratterebbe di censura, seguendo la procedura di riattivazione l&#8217;account si riattiva&#8230;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedarshan.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedarshan.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedarshan.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedarshan.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedarshan.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedarshan.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedarshan.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedarshan.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedarshan.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedarshan.wordpress.com/335/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=335&subd=thedarshan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thedarshan.wordpress.com/2009/10/16/facebook-e-la-politica-estera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b38d49d538414927cd1c01ba4f49a135?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thedarshan</media:title>
		</media:content>

		<media:content url="http://thedarshan.files.wordpress.com/2009/10/segnalata.jpg" medium="image">
			<media:title type="html">Segnalata</media:title>
		</media:content>

		<media:content url="http://www.thedarshan.netsons.org/img/pub/Ban2.jpg" medium="image" />
	</item>
		<item>
		<title>Ricavare il numero di una permutazione (ranking)</title>
		<link>http://thedarshan.wordpress.com/2009/09/24/ricavare-il-numero-di-una-permutazione-ranking/</link>
		<comments>http://thedarshan.wordpress.com/2009/09/24/ricavare-il-numero-di-una-permutazione-ranking/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 17:06:37 +0000</pubDate>
		<dc:creator>thedarshan</dc:creator>
				<category><![CDATA[Informatica]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[algoritmi numerici]]></category>
		<category><![CDATA[algoritmica]]></category>
		<category><![CDATA[algoritmo]]></category>
		<category><![CDATA[Factoradic]]></category>
		<category><![CDATA[iterativo]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Lehmer]]></category>
		<category><![CDATA[lehmer code]]></category>
		<category><![CDATA[ordinamento lessicografico]]></category>
		<category><![CDATA[permutazione specifica]]></category>
		<category><![CDATA[permutazioni]]></category>
		<category><![CDATA[ranking]]></category>

		<guid isPermaLink="false">http://thedarshan.wordpress.com/?p=331</guid>
		<description><![CDATA[questo articolo è la continuazione del articolo sulla determinazione di una specifica permutazione e affronta il problema inverso:

determinare la posizione di una specifica permutazione nell&#8217;insieme delle permutazioni ordinate lessicograficamente.
Ancora qualcosa sull&#8217;interpretazione dei codici di Lehmer
I singoli termini del codice di Lehmer si possono anche interpretare come il numero di elementi che si trovano &#8220;al posto [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=331&subd=thedarshan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>questo articolo è la continuazione del <a href="http://thedarshan.wordpress.com/2009/09/19/determinare-una-specifica-permutazione-dallinsieme-delle-permutazioni/">articolo</a> sulla determinazione di una specifica permutazione e affronta il problema inverso:<br />
<strong><br />
determinare la posizione di una specifica permutazione nell&#8217;insieme delle permutazioni ordinate lessicograficamente.</strong></p>
<h2 style="text-align:left;">Ancora qualcosa sull&#8217;interpretazione dei codici di Lehmer</h2>
<p>I singoli termini del codice di Lehmer si possono anche interpretare come il numero di elementi che si trovano &#8220;al posto sbagliato&#8221;, cioè il numero di elementi minori dell&#8217;elemento preso in esame che si trovano alla sua destra (e che quindi violano l&#8217;ordinamento crescente degli elementi).</p>
<p>Applicando questo teorema è possibile ricavare il codice di Lehmer di una permutazione e dal codice ricavare la posizione della permutazione.</p>
<h2>Generazione del codice di Lehmer</h2>
<p><em>&#8220;i singoli elementi del codice di Lehmer sono costituiti dal numero di elementi minori dell&#8217;elemento che si trovano alla sua destra&#8221;</em></p>
<pre class="brush: java;">
    public static int[] inverseLehmer(int[] v){
        int n=v.length;
        int[] lh=new int[n];
        lh[n-1]=0;
        for (int a=0; a&lt;n-1; ++a){
            int i = 0;
            for (int b=a; b&lt;n; ++b)
                if ( v[b]&lt;v[a] ) i++;
            lh[a] = i;
        }
        return lh;
    }
</pre>
</p>
<h2>Calcolo della posizione della permutazione (conversione da factoradic a numero)</h2>
<pre class="brush: java;">
    public static int rank(int[] permutazione){
        int[] l=inverseLehmer(permutazione);
        int f=1;
        int r=0;
        int n=permutazione.length;
        for(int a=1;a&lt;(n+1);a++){
            r=r+f*l[n-a];
            f=f*a;
        }
        return r;
    }
</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedarshan.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedarshan.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedarshan.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedarshan.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedarshan.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedarshan.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedarshan.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedarshan.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedarshan.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedarshan.wordpress.com/331/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=331&subd=thedarshan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thedarshan.wordpress.com/2009/09/24/ricavare-il-numero-di-una-permutazione-ranking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b38d49d538414927cd1c01ba4f49a135?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thedarshan</media:title>
		</media:content>
	</item>
		<item>
		<title>Determinare una specifica permutazione dall&#8217;insieme delle permutazioni</title>
		<link>http://thedarshan.wordpress.com/2009/09/19/determinare-una-specifica-permutazione-dallinsieme-delle-permutazioni/</link>
		<comments>http://thedarshan.wordpress.com/2009/09/19/determinare-una-specifica-permutazione-dallinsieme-delle-permutazioni/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 16:26:41 +0000</pubDate>
		<dc:creator>thedarshan</dc:creator>
				<category><![CDATA[Informatica]]></category>
		<category><![CDATA[algoritmi numerici]]></category>
		<category><![CDATA[algoritmica]]></category>
		<category><![CDATA[algoritmo]]></category>
		<category><![CDATA[Factoradic]]></category>
		<category><![CDATA[iterativo]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Lehmer]]></category>
		<category><![CDATA[lehmer code]]></category>
		<category><![CDATA[ordinamento lessicografico]]></category>
		<category><![CDATA[permutazione specifica]]></category>
		<category><![CDATA[permutazioni]]></category>
		<category><![CDATA[semplice]]></category>

		<guid isPermaLink="false">http://thedarshan.wordpress.com/?p=283</guid>
		<description><![CDATA[questo articolo è la continuazione del articolo precedente sulle permutazioni.
Potrebbe essere necessario determinare una singola permutazione dall&#8217;insieme delle permutazioni ordinate e inutile determinarle tutte.
Questo problema è più complicato del caso precedente e prima di continuare vorrei rendere noto che l&#8217;articolo non è frutto delle mie conoscenze universitarie o di conoscenze direttamente connesse che mi sono [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=283&subd=thedarshan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>questo articolo è la continuazione del <a href="http://thedarshan.wordpress.com/2009/06/30/un-semplice-algoritmo-iterativo-per-listare-le-permutazioni-di-un-insieme-di-elementi/">articolo precedente sulle permutazioni</a>.</p>
<p>Potrebbe essere necessario determinare una singola permutazione dall&#8217;insieme delle permutazioni ordinate e inutile determinarle tutte.<br />
Questo problema è più complicato del caso precedente e prima di continuare vorrei rendere noto che l&#8217;articolo non è frutto delle mie conoscenze universitarie o di conoscenze direttamente connesse che mi sono servite per esse, questo non per attribuirmi un particolare merito ma per attribuire un particolare demerito alla mia università.</p>
<p>Come si affronta questo problema? ogni informatico sano di mente scarterebbe nel giro di un paio di secondi la possibilità di generare tutte le permutazioni fino a quella cercata (ma non preoccupatevi&#8230;se non avete scartato entro due secondi potete comunque laurearvi in molte università e dire in giro di essere degli ingegneri del software).</p>
<p>Dunque, riformuliamo il problema: <strong>come fare per determinare una specifica permutazione in tempo costante o quantomeno proporzionale al numero di elementi del dominio?</strong></p>
<p>La soluzione risiede nell&#8217;uso dei <em>factoradic </em>(termine che non so proprio come tradurre in italiano)<br />
<span id="more-283"></span></p>
<h2>I Factoradic</h2>
<p>Di solito un numero viene rappresentato come un polinomio di potenze della base</p>
<p><img src='http://s1.wordpress.com/latex.php?latex=1936%3D%5Cmathbf%7B1%7D%5Ccdot+10%5E%7B3%7D%2B%5Cmathbf%7B9%7D%5Ccdot+10%5E%7B2%7D%2B%5Cmathbf%7B3%7D%5Ccdot+10%5E%7B1%7D%2B%5Cmathbf%7B6%7D%5Ccdot+10%5E%7B0%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='1936=\mathbf{1}\cdot 10^{3}+\mathbf{9}\cdot 10^{2}+\mathbf{3}\cdot 10^{1}+\mathbf{6}\cdot 10^{0}' title='1936=\mathbf{1}\cdot 10^{3}+\mathbf{9}\cdot 10^{2}+\mathbf{3}\cdot 10^{1}+\mathbf{6}\cdot 10^{0}' class='latex' /></p>
<p>inquanto le potenze dei primi n numeri costituiscono una base che permette di rappresentare univocamente un numero con un polinomio.</p>
<p>Anche i fattoriali dei primi n numeri costituiscono una base , quindi è possibile rappresentare univocamente un numero come polinomio dei fattoriali della base</p>
<p><img src='http://s2.wordpress.com/latex.php?latex=1936%3D%5Cmathbf%7B2%7D%5Ccdot+6%21+%2B+%5Cmathbf%7B4%7D%5Ccdot+5%21+%2B+%5Cmathbf%7B0%7D%5Ccdot+4%21+%2B+%5Cmathbf%7B2%7D%5Ccdot+3%21+%2B+%5Cmathbf%7B2%7D%5Ccdot+2%21%2B+%5Cmathbf%7B0%7D%5Ccdot+1%21&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='1936=\mathbf{2}\cdot 6! + \mathbf{4}\cdot 5! + \mathbf{0}\cdot 4! + \mathbf{2}\cdot 3! + \mathbf{2}\cdot 2!+ \mathbf{0}\cdot 1!' title='1936=\mathbf{2}\cdot 6! + \mathbf{4}\cdot 5! + \mathbf{0}\cdot 4! + \mathbf{2}\cdot 3! + \mathbf{2}\cdot 2!+ \mathbf{0}\cdot 1!' class='latex' /></p>
<p>questa rappresentazione è detta <em>factoradic. </em>L&#8217;univocità di questa rappresentazione è garantita dal fatto che la somma dei primi n fattoriali moltiplicati per il loro indice è sempre il fattoriale successivo meno 1.</p>
<p><img src='http://s3.wordpress.com/latex.php?latex=%5Csum_%7Bi%3D0%7D%5E%7Bn%7D+%7Bi%5Ccdot+i%21%7D+%3D+%7B%28n%2B1%29%21%7D+-+1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sum_{i=0}^{n} {i\cdot i!} = {(n+1)!} - 1' title='\sum_{i=0}^{n} {i\cdot i!} = {(n+1)!} - 1' class='latex' /></p>
<p>caratteristica fondamentale dei factoradic è il costistuire un codice che permette di associare al numero <em><strong>n</strong></em> rappresentato la <em><strong>n<span style="font-style:normal;"><span style="font-weight:normal;">-esima permutazione dell&#8217;insieme degli elementi della base, questo &#8220;codice di traduzione&#8221; viene chiamato codice di Lehmer</span></span></strong></em></p>
<table border="0" cellspacing="0" rules="NONE">
<col width="86"></col>
<col width="86"></col>
<col width="104"></col>
<tbody>
<tr>
<td width="86" height="17" align="CENTER"><strong><span style="font-family:'Times New Roman';">n</span></strong></td>
<td width="86" align="CENTER"><strong><span style="font-family:'Times New Roman';">Factoradic</span></strong></td>
<td width="104" align="CENTER"><strong><span style="font-family:'Times New Roman';">Permutazione</span></strong></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">0</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">0000</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 1,2,3,4 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">1</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">0010</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 1,2,4,3 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">2</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">0100</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 1,3,2,4 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">3</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">0110</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 1,3,4,2 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">4</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">0200</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 1,4,2,3 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">5</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">0210</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 1,4,3,2 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">6</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">1000</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 2,1,3,4 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">7</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">1010</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 2,1,4,3 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">8</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">1100</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 2,3,1,4 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">9</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">1110</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 2,3,4,1 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">10</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">1200</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 2,4,1,3 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">11</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">1210</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 2,4,3,1 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">12</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">2000</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 3,1,2,4 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">13</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">2010</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 3,1,4,2 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">14</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">2100</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 3,2,1,4 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">15</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">2110</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 3,2,4,1 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">16</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">2200</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 3,4,1,2 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">17</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">2210</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 3,4,2,1 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">18</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">3000</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 4,1,2,3 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">19</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">3010</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 4,1,3,2 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">20</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">3100</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 4,2,1,3 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">21</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">3110</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 4,2,3,1 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">22</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">3200</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">[ 4,3,1,2 ]</span></td>
</tr>
<tr>
<td height="17" align="LEFT"><span style="font-family:'Times New Roman';">23</span></td>
<td align="LEFT"><span style="font-family:'Times New Roman';">3210</span></td>
<td style="text-align:left;"><span style="font-family:'Times New Roman';">[ 4,3,2,1 ]</span></td>
</tr>
</tbody>
</table>
<h2 style="text-align:left;">Interpretazione dei codici di Lehmer, generazione della permutazione associata</h2>
<p style="text-align:left;"><em><strong><span style="font-style:normal;"><span style="font-weight:normal;">Dal factoradic si può ottenere la permutazione invertendo i singoli elementi  o i segmenti della permutazione di base [1,2,3,4] con gli elementi a destra  usando l&#8217;elemento del codice di Lehmer come lunghezza del segmento da spostare.</span></span></strong></em></p>
<p style="text-align:left;"><em><strong><span style="font-style:normal;"><span style="font-weight:normal;">Per esempio </span></span></strong></em></p>
<ul>
<li><em><strong><span style="font-style:normal;"><span style="font-weight:normal;">il codice </span></span><span style="font-style:normal;"><span style="font-weight:normal;">0110</span></span></strong></em><em><strong><span style="font-style:normal;"><span style="font-weight:normal;"> indica che, partendo dalla permutazione di base, si deve invertire l&#8217;elemento 2 e poi l&#8217;elemento 3 ottenendo la permutazione [1,3,4,2]<br />
</span></span></strong></em></li>
<li><em><strong><span style="font-style:normal;"><span style="font-weight:normal;">il codice 0200 indica di invertire l&#8217;elemento 2 e il successivo (</span></span><span style="font-style:normal;"> </span><span style="font-style:normal;"><span style="font-weight:normal;">il numero due indica questo: due elementi di uno e NON un elemento di due</span></span></strong></em><em><strong><span style="font-style:normal;"><span style="font-weight:normal;">) ottenendo [1,4,2,3]<br />
</span></span></strong></em></li>
</ul>
<h2 style="font-size:1.5em;">Algoritmo per la generazione di un Factoradic</h2>
<p>l&#8217;algoritmo di generazione è molto semplice: le singole componenti vengono calcolate con l&#8217;operatore modulo</p>
<pre class="brush: java;">
        public static int[] factoradic(int numero, int base){
            assert (base&gt;1 &amp;&amp; numero &gt;= 0 );
            int[] f = new int[base];
            for (int j = 1; j &lt;= base; ++j)
            {
            f[base-j] = numero % j;
            numero /= j;
            }
            return f;
        }
</pre>
<p>è lo stesso tipo di algoritmo che si usa per convertire un numero decimale in una base diversa, si va dividendo il numero per la base e i resti delle divisioni vanno a costituire il numero nella base di arrivo, solo che in questo caso la base non è costante ma decresce.</p>
<h2>Dal Factoradic alla permutazione</h2>
<p>il codice va inserito nella classe definita nel post precedente</p>
<pre class="brush: java;">
    public int[] permutazione(int n){
        int[] lehmer=MyMath.factoradic(n, len);
        int a;
        //creo la permutazione di base
        for (a = 0; a &lt; len; a++)elementi[a] = a + 1;
        //applico il codice
        for (a = 0; a &lt; len; a++){
            if(lehmer[a]==1)
                //caso banale, mi limito a fare uno swap
                swap(a, a+1);
            else if(lehmer[a]&gt;1){
                //caso generico, sposto un segmento
                int k=lehmer[a]+a;
                int buffer=elementi[k];
                while(k&gt;a){
                    swap(k-1,k);
                    k--;
                }
                elementi[a]=buffer;
            }
        }
        return elementi;
    }
</pre>
<h2>Generazione di permutazioni casuali</h2>
<p>Dando come input alla funzione precedente un numero casuale compreso nel numero di permutazioni si ottiene ovviamente una permutazione casuale</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedarshan.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedarshan.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedarshan.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedarshan.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedarshan.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedarshan.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedarshan.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedarshan.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedarshan.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedarshan.wordpress.com/283/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=283&subd=thedarshan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thedarshan.wordpress.com/2009/09/19/determinare-una-specifica-permutazione-dallinsieme-delle-permutazioni/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b38d49d538414927cd1c01ba4f49a135?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thedarshan</media:title>
		</media:content>
	</item>
		<item>
		<title>How Much Is Your Blog Worth?</title>
		<link>http://thedarshan.wordpress.com/2009/08/28/how-much-is-your-blog-worth/</link>
		<comments>http://thedarshan.wordpress.com/2009/08/28/how-much-is-your-blog-worth/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 13:21:29 +0000</pubDate>
		<dc:creator>thedarshan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[technorati]]></category>
		<category><![CDATA[valore]]></category>
		<category><![CDATA[vaneggiamenti]]></category>

		<guid isPermaLink="false">http://thedarshan.wordpress.com/?p=265</guid>
		<description><![CDATA[ho trovato una strana applicazione che valuta il valore di un blog non so bene in base a quale algoritmo (suppongo c&#8217;entrino il numero di volte che viene citato da tecnorati)


My blog is worth $1,129.08.
How much is your blog worth?

wow, forse vale la pena di spenderci qualcosa e spostarlo su uno spazio di hosting completo.
Peccato [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=265&subd=thedarshan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>ho trovato una strana applicazione che valuta il valore di un blog non so bene in base a quale algoritmo (suppongo c&#8217;entrino il numero di volte che viene citato da tecnorati)</p>
<div style="border:1px solid #cccccc;background-color:white;width:115px;text-align:center;padding:0 0 10px;">
<p style="margin:0;"><a href="http://www.business-opportunities.biz/"><img style="border:0;" src="http://images.business-opportunities.biz/blogworth/gw.jpg" alt="" /></a><br />
<span style="font-size:11px;">My <a href="http://thedarshan.wordpress.com/">blog</a> is worth <strong>$1,129.08</strong>.</span><br />
<span style="font-size:10px;"><a href="http://www.business-opportunities.biz/projects/how-much-is-your-blog-worth/">How much is your blog worth?</a></span></p>
<p><a style="border:0;" href="http://www.technorati.com/"><img style="border:0;" src="http://technorati.com/pix/tech-logo-embed.gif" alt="" /></a></div>
<p>wow, forse vale la pena di spenderci qualcosa e spostarlo su uno spazio di hosting completo.</p>
<p>Peccato che il sito non offra un codice dinamico che lo ricalcola in tempo reale&#8230;magari mentre leggete il post il blog vale molto di più (o magari no&#8230;)</p>
<p>ecco il link <a href="http://www.business-opportunities.biz/projects/how-much-is-your-blog-worth/">http://www.business-opportunities.biz/projects/how-much-is-your-blog-worth/</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedarshan.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedarshan.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedarshan.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedarshan.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedarshan.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedarshan.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedarshan.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedarshan.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedarshan.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedarshan.wordpress.com/265/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=265&subd=thedarshan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thedarshan.wordpress.com/2009/08/28/how-much-is-your-blog-worth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b38d49d538414927cd1c01ba4f49a135?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thedarshan</media:title>
		</media:content>

		<media:content url="http://images.business-opportunities.biz/blogworth/gw.jpg" medium="image" />

		<media:content url="http://technorati.com/pix/tech-logo-embed.gif" medium="image" />
	</item>
		<item>
		<title>Un semplice algoritmo iterativo per listare le permutazioni di un insieme di elementi</title>
		<link>http://thedarshan.wordpress.com/2009/06/30/un-semplice-algoritmo-iterativo-per-listare-le-permutazioni-di-un-insieme-di-elementi/</link>
		<comments>http://thedarshan.wordpress.com/2009/06/30/un-semplice-algoritmo-iterativo-per-listare-le-permutazioni-di-un-insieme-di-elementi/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 22:32:31 +0000</pubDate>
		<dc:creator>thedarshan</dc:creator>
				<category><![CDATA[Informatica]]></category>
		<category><![CDATA[algoritmi numerici]]></category>
		<category><![CDATA[algoritmica]]></category>
		<category><![CDATA[algoritmo]]></category>
		<category><![CDATA[iterativo]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[ordinamento lessicografico]]></category>
		<category><![CDATA[permutazioni]]></category>
		<category><![CDATA[semplice]]></category>

		<guid isPermaLink="false">http://thedarshan.wordpress.com/?p=239</guid>
		<description><![CDATA[Spesso quando si lavora su algoritmi che hanno come dati di ingresso una lista di elementi si ha la necessità di testarne il comportamento su tutte le permutazioni possibili dell&#8217;insieme di ingresso.
L&#8217;algoritmo seguente è probabilmente il più semplice algoritmo iterativo per listare le permutazioni di un insieme di elementi, l&#8217;algoritmo analizza semplicemente la permutazione attuale [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=239&subd=thedarshan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Spesso quando si lavora su algoritmi che hanno come dati di ingresso una lista di elementi si ha la necessità di testarne il comportamento su tutte le permutazioni possibili dell&#8217;insieme di ingresso.</p>
<p>L&#8217;algoritmo seguente è probabilmente il più semplice algoritmo iterativo per listare le permutazioni di un insieme di elementi, l&#8217;algoritmo analizza semplicemente la permutazione attuale per ricavarne la prossima basandosi sul fatto che le permutazioni devono seguire un ordinamento lessicografico (nel caso numerico qui analizzato ogni permutazione deve essere la minima permutazione maggiore di quella corrente)</p>
<pre class="brush: java;">
    public boolean prossima() {
        int i = len - 1;
        while (i&gt;0 &amp;&amp; (elementi[i - 1] &gt;= elementi[i])) {
            i--;
        }
        if(i==0)return false;
        int j = len;
        // (i-1) è l'elemento trovato con il ciclo precedente
        while (elementi[j - 1] &lt;= elementi[i - 1])j--;
        swap(i - 1, j - 1);
        i++;
        j = len;
        //inverto gli elementi tra i due elementi scambiati
        while (i &lt; j) {
            swap(i - 1, j - 1);
            i++;
            j--;
        }
        return true;
    }
</pre>
<p>considerando la permutazione come un vettore di n elementi numerici l&#8217;algoritmo determina la permutazione successiva nel seguente modo:</p>
<ol>
<li><em>a partire dall&#8217;ultimo elemento scorre l&#8217;array cercando il primo elemento preceduto da un elemento minore</em></li>
<li><em>se non esiste si è giunti all&#8217;ultima permutazione possibile e l&#8217;algoritmo deve terminare</em></li>
<li><em>se esiste ricomincia a scorrere il vettore dalla fine cercando il primo elemento maggiore all&#8217;elemento trovato al punto1</em></li>
<li><em>si invertono gli elementi trovati al <strong>punto1</strong> e al <strong>punto3</strong></em></li>
<li><em>se lo scambio non è avvenuto tra elementi di livello minimo (l&#8217;ultimo e il penultimo) si ripristina l&#8217;ordinamento interno invertendo le posizioni degli elementi che si trovano tra l&#8217;elemento trovato al <strong>punto1</strong> e quello trovato al <strong>punto3</strong></em></li>
</ol>
<p>l&#8217;algoritmo è molto semplice e molto generico ma non è efficiente, infatti il fatto di dover analizzare a ogni iterazione la struttura attuale del vettore ne incrementa di molto la complessità.</p>
<p>Un modo per rendere molto più efficiente l&#8217;algoritmo è quello di dotare l&#8217;algoritmo di un altro vettore che contiene dati sulla struttura attuale del vettore degli elementi in modo da poter determinare velocemente la prossima permutazione.</p>
<p>Un altro miglioramento notevole si può ottenere evitando che a uno scambio debba seguire una ristrutturazione del vettore, entrambe queste ottimizazioni sono implementate nell algoritmo di Johnson–Trotter</p>
<p>Ho realizzato un applet che usa questo algoritmo <a title="applet permutazioni" href="//www.thedarshan.netsons.org/permutazioni.php">qui</a></p>
<p><span id="more-239"></span></p>
<h2>Codice completo</h2>
<p>Il generatore di permutazioni</p>
<pre class="brush: java;">
package darshan.snippet;

public class SimplePermutator {
    public int elementi[];
    public int len;

    public SimplePermutator(int n) {
        elementi = new int[n];
        for (int a = 0; a &lt; n; a++)elementi[a] = a + 1;
        this.len=n;
    }

    private void swap(int a, int b){
        int t=elementi[a];
        elementi[a]=elementi[b];
        elementi[b]=t;
    }

    public boolean prossima() {
        int i = len - 1;
        while (i&gt;0 &amp;&amp; (elementi[i - 1] &gt;= elementi[i])) {
            i--;
        }
        if(i==0)return false;
        int j = len;
        while (elementi[j - 1] &lt;= elementi[i - 1])j--;
        swap(i - 1, j - 1);
        i++;
        j = len;
        while (i &lt; j) {
            swap(i - 1, j - 1);
            i++;
            j--;
        }
        return true;
    }

    @Override
    public String toString(){
        return Array_util.dump(elementi);
    }
}
</pre>
<p>il resto del codice</p>
<pre class="brush: java;">
public class Main {
    public static void main(String[] args) {
        SimplePermutator p=new SimplePermutator(5);
        System.out.println(&quot;Using &quot;+p.getClass().getName());
        do{System.out.println(p.toString());}while(p.prossima());
    }
}
</pre>
<pre class="brush: java;">
package darshan.snippet;

public abstract class Array_util {
 static public String dump(int[] elementi) {
 StringBuffer e = new StringBuffer();

 if (elementi.length &gt; 0) {
 e.append(&quot;[ &quot; + elementi[0]);

 for (int i = 1; i &lt; elementi.length; i++) {
 e.append(&quot;,&quot;);
 e.append(elementi[i]);
 }
 }
 e.append(&quot; ]&quot;);
 return e.toString();
 }

}
</pre>
<div id="_mcePaste" style="overflow:hidden;position:absolute;left:-10000px;top:692px;width:1px;height:1px;">package darshan.snippet;public class SimplePermutator extends Array_util {<br />
public int elementi[];<br />
public int len;public SimplePermutator(int n) {<br />
elementi = new int[n];<br />
for (int a = 0; a &lt; n; a++)elementi[a] = a + 1;<br />
this.len=n;<br />
}private void swap(int a, int b){<br />
int t=elementi[a];<br />
elementi[a]=elementi[b];<br />
elementi[b]=t;<br />
}public boolean prossima() {<br />
int i = len &#8211; 1;<br />
while (i&gt;0 &amp;&amp; (elementi[i - 1] &gt;= elementi[i])) {<br />
i&#8211;;<br />
}<br />
if(i==0)return false;<br />
int j = len;<br />
while (elementi[j - 1] &lt;= elementi[i - 1])j&#8211;;<br />
swap(i &#8211; 1, j &#8211; 1);<br />
i++;<br />
j = len;<br />
while (i &lt; j) {<br />
swap(i &#8211; 1, j &#8211; 1);<br />
i++;<br />
j&#8211;;<br />
}<br />
return true;<br />
}@Override<br />
public String toString(){<br />
return Array_util.dump(elementi);<br />
}<br />
}</div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedarshan.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedarshan.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedarshan.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedarshan.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedarshan.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedarshan.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedarshan.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedarshan.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedarshan.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedarshan.wordpress.com/239/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=239&subd=thedarshan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thedarshan.wordpress.com/2009/06/30/un-semplice-algoritmo-iterativo-per-listare-le-permutazioni-di-un-insieme-di-elementi/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b38d49d538414927cd1c01ba4f49a135?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thedarshan</media:title>
		</media:content>
	</item>
		<item>
		<title>Facebook e l&#8217;era degli &#8220;asocial&#8221; network</title>
		<link>http://thedarshan.wordpress.com/2009/06/19/facebook-e-lera-degli-asocial-network/</link>
		<comments>http://thedarshan.wordpress.com/2009/06/19/facebook-e-lera-degli-asocial-network/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 13:10:45 +0000</pubDate>
		<dc:creator>thedarshan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[asocial]]></category>
		<category><![CDATA[censura]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[social network]]></category>

		<guid isPermaLink="false">http://thedarshan.wordpress.com/?p=225</guid>
		<description><![CDATA[Riporto per intero una discussione che ho fatto su facebook e che a un certo punto è stata troncata (spero per problemi di comunicazione), la riporto con tutti gli errori di battitura, mi limito a togliere i nomi degli utenti sostituendoli con le iniziali. mancano almeno due commenti che sono spariti (spero per problemi di [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=225&subd=thedarshan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Riporto per intero una discussione che ho fatto su facebook e che a un certo punto è stata troncata (spero per problemi di comunicazione), la riporto con tutti gli errori di battitura, mi limito a togliere i nomi degli utenti sostituendoli con le iniziali. mancano almeno due commenti che sono spariti (spero per problemi di comunicazione)</p>
<p><em><strong>EDIT</strong> (15:29):  i commenti saltati sono almeno 3 e uno non è mio&#8230;quindi comincio a dubitare dei problemi di comunicazione&#8230;</em></p>
<p><!-- 		@page { size: 21cm 29.7cm; margin: 2cm } 		P { margin-bottom: 0.21cm } 		H3 { margin-bottom: 0.21cm } --></p>
<blockquote>
<h3><span style="color:#0000ff;">VLS</span></h3>
<h3 style="padding-left:30px;">facebook non è fatto per condividere&#8230;<br />
non è un vero social network&#8230;<br />
è un estensione digitale delle chiacchiere da bar. un gigantesco bar multimediale dove parli con gente che in realtà non conosci</h3>
<p style="margin-bottom:0;">
<div id="comments_box_5348994079285504728" dir="ltr">
<div id="feed_comments_target_5348994079285504728_202124800164" dir="ltr">
<div id="feed_comments_5348994079285504728_202124800164" dir="ltr">
<div id="comment_5348994079285504728_202124800164_2632100" dir="ltr">
<div id="comment_box_5348994079285504728_202124800164_2632100" dir="ltr">
<p style="margin-bottom:0;"><span style="color:#0000ff;">IC</span> alle 13.29 del 19 giugno</p>
<div id="text_expose_id_4a3b8a95b6ff80647551168" dir="ltr">
<p style="margin-bottom:0;padding-left:30px;">diciamo ke è anke un modo per 						fare &#8221; curtigghiu &#8220;!!</p>
</div>
</div>
</div>
<div id="comment_5348994079285504728_202124800164_2632438" dir="ltr">
<div id="comment_box_5348994079285504728_202124800164_2632438" dir="ltr">
<p style="margin-bottom:0;"><span style="color:#0000ff;">VLS</span> alle 13.58 del 19 giugno</p>
<div id="text_expose_id_4a3b8a95b7cc48887215318" dir="ltr">
<p style="margin-bottom:0;padding-left:30px;">dico che è ESCLUSIVAMENTE un 						modo per fare curtigghiu.<br />
I gruppi sono inutilizzabili, 						perche uno finisce per averne troppi e non seguirne nessuno, 						anche perche non hanno notifiche ne rss.</p>
<p style="padding-left:30px;">E&#8217; tutto basato 						sulla bacheca dove i commenti scivolano via spinti da altro 						curtigghiu, è impossibile farci una discussione seria e 						duratura (che duri il tempo necessario per svilupparsi).<br />
Comincio a pensare che il prodotto 						qualità*quantità dei siti sia costante&#8230;lo diceva umberto 						eco molti anni fà prima che si cominciasse a parlare di 						web2.0</p>
<p style="margin-bottom:0;padding-left:30px;">E una degenerazione: prima un sito lo aveva solo 						chi sapeva gestirlo, poi si sono diffusi i blog dove anche chi 						non saprebbe creare o gestire un sito piò averne uno e poi 						sono arrivati questi social network &#8220;asociali&#8221; dove 						anche chi è troppo lagnuso per avere un blog può scrivere e 						avere un feedback anche se scrive banalità.<span style="color:#0000ff;"> </span></p>
<p style="margin-bottom:0;"><span style="color:#0000ff;">MS</span> alle 14.00 del 19 giugno</p>
</div>
</div>
</div>
<div id="comment_5348994079285504728_202124800164_2632460" dir="ltr">
<div id="comment_box_5348994079285504728_202124800164_2632460" dir="ltr">
<div id="text_expose_id_4a3b8a95b8df92a62646262" dir="ltr">
<p style="margin-bottom:0;padding-left:30px;">W il bar!</p>
<p style="margin-bottom:0;">
</div>
</div>
</div>
</div>
</div>
</div>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">
</blockquote>
<p style="margin-bottom:0;">
<p style="margin-bottom:0;">un ultima cosa, nel caso ci fosse qualche lettore non bilingue:</p>
<p style="margin-bottom:0;"><em><span style="font-family:Verdana;"><a href="http://www.geocities.com/vocabolariosicilianoitaliano/C.html"><span style="color:#ff0000;">Curtìgghiu</span></a> cortile, vicolo; 2. fig chiasso; 3. fig. pettegolezzo</span></em><strong><span style="font-family:Verdana;"><br />
</span></strong></p>
<p style="margin-bottom:0;">
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedarshan.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedarshan.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedarshan.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedarshan.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedarshan.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedarshan.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedarshan.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedarshan.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedarshan.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedarshan.wordpress.com/225/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=225&subd=thedarshan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thedarshan.wordpress.com/2009/06/19/facebook-e-lera-degli-asocial-network/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b38d49d538414927cd1c01ba4f49a135?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thedarshan</media:title>
		</media:content>
	</item>
		<item>
		<title>Michela Vittoria Brambilla è un ministro del Turismo competente</title>
		<link>http://thedarshan.wordpress.com/2009/05/12/michela-vittoria-brambilla-e-un-ministro-del-turismo-competente/</link>
		<comments>http://thedarshan.wordpress.com/2009/05/12/michela-vittoria-brambilla-e-un-ministro-del-turismo-competente/#comments</comments>
		<pubDate>Tue, 12 May 2009 17:25:42 +0000</pubDate>
		<dc:creator>thedarshan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[berlusconi]]></category>
		<category><![CDATA[brambilla]]></category>
		<category><![CDATA[confcommercio]]></category>
		<category><![CDATA[crescita]]></category>
		<category><![CDATA[destra]]></category>
		<category><![CDATA[economica]]></category>
		<category><![CDATA[economico]]></category>
		<category><![CDATA[giovani]]></category>
		<category><![CDATA[governo]]></category>
		<category><![CDATA[hard]]></category>
		<category><![CDATA[imprenditori]]></category>
		<category><![CDATA[interesse]]></category>
		<category><![CDATA[italia]]></category>
		<category><![CDATA[michela]]></category>
		<category><![CDATA[ministro]]></category>
		<category><![CDATA[nazionale]]></category>
		<category><![CDATA[nazionali]]></category>
		<category><![CDATA[politiche]]></category>
		<category><![CDATA[presidente]]></category>
		<category><![CDATA[prostitute]]></category>
		<category><![CDATA[puttane]]></category>
		<category><![CDATA[sesso]]></category>
		<category><![CDATA[silvio]]></category>
		<category><![CDATA[sviluppo]]></category>
		<category><![CDATA[turismo]]></category>
		<category><![CDATA[turistiche]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[vittoria]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://thedarshan.wordpress.com/?p=209</guid>
		<description><![CDATA[Di solito non parlo di politica in questo blog, ma questa è un occasione speciale
Il trenta aprile sul televideo rai si poteva leggere questo:
Il ministro della Difesa non fa nomi,ma il collega Calderoli precisa; &#8220;Romani, Urso e Castelli saranno viceministri&#8221;.
I nomi li avrebbe fatti Berlusconi al Consiglio dei ministri, dicendo che presto diventerebbe ministro Michela [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=209&subd=thedarshan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Di solito non parlo di politica in questo blog, ma questa è un occasione speciale</p>
<p>Il trenta aprile sul televideo rai si poteva leggere questo:</p>
<blockquote><p>Il ministro della Difesa non fa nomi,ma il collega Calderoli precisa; &#8220;Romani, Urso e Castelli saranno viceministri&#8221;.<br />
I nomi li avrebbe fatti Berlusconi al Consiglio dei ministri, dicendo che presto diventerebbe ministro Michela Vittoria Brambilla, ora sottosegretario al Turismo.<br />
Il governo ha deciso che il referendum sulla legge elettorale per le politiche si terrà il 21 giugno.</p>
<p>Novità in vista per il governo.&#8221;E&#8217; stato annunciato che ci sarà un nuovo ministro e tre viceministri&#8221;, dice La Russa,dopo il Consiglio dei ministri nel quale Saglia è stato nominato sottosegretario allo Sviluppo economico al posto di Martinat, morto a marzo.</p></blockquote>
<p>mmm, Michela Vittoria Brambilla&#8230; dove l&#8217;ho già vista&#8230;ah si&#8230;in quel canale sul digitale terrestre&#8230;perche sono troppo giovane per aver visto questo programma</p>
<p><span style="text-align:center; display: block;"><a href="http://thedarshan.wordpress.com/2009/05/12/michela-vittoria-brambilla-e-un-ministro-del-turismo-competente/"><img src="http://img.youtube.com/vi/FtUXaCh-whM/2.jpg" alt="" /></a></span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedarshan.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedarshan.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedarshan.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedarshan.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedarshan.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedarshan.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedarshan.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedarshan.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedarshan.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedarshan.wordpress.com/209/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=209&subd=thedarshan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thedarshan.wordpress.com/2009/05/12/michela-vittoria-brambilla-e-un-ministro-del-turismo-competente/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b38d49d538414927cd1c01ba4f49a135?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thedarshan</media:title>
		</media:content>

		<media:content url="http://img.youtube.com/vi/FtUXaCh-whM/2.jpg" medium="image" />
	</item>
		<item>
		<title>Eseguire calcoli matematici con Octave online</title>
		<link>http://thedarshan.wordpress.com/2009/04/03/eseguire-calcoli-matematici-con-octave-online/</link>
		<comments>http://thedarshan.wordpress.com/2009/04/03/eseguire-calcoli-matematici-con-octave-online/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 12:06:44 +0000</pubDate>
		<dc:creator>thedarshan</dc:creator>
				<category><![CDATA[Informatica]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[calcoli]]></category>
		<category><![CDATA[matematica]]></category>
		<category><![CDATA[matlab]]></category>
		<category><![CDATA[octave]]></category>
		<category><![CDATA[online octave]]></category>

		<guid isPermaLink="false">http://thedarshan.wordpress.com/?p=204</guid>
		<description><![CDATA[Octave nasce come clone open source di Matlab, come il programma a cui è ispirato permette di eseguire calcoli numerici anche complessi e come il programma a cui è inspirato (e anche di più)  è goffo e inutile per il calcolo simbolico.
Ho trovato un sito molto utile che permette di eseguire degli script di Octave [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=204&subd=thedarshan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://www.gnu.org/software/octave/"><img class="alignleft" title="logo octave" src="http://www.gnu.org/software/octave/images/sombrero.jpg" alt="" width="266" height="148" /></a>Octave nasce come clone open source di Matlab, come il programma a cui è ispirato permette di eseguire calcoli numerici anche complessi e come il programma a cui è inspirato (e anche di più)  è goffo e inutile per il calcolo simbolico.</p>
<p>Ho trovato un sito molto utile che permette di eseguire degli script di Octave online, la cosa può rivelarsi molto utile quando capita di dover eseguire calcoli complessi da computer in cui non è installato alcun tipo di software del genere.</p>
<p>Il sito è questo: <a title="Online Math Calculator" href="http://www.online-utility.org/math/math_calculator.jsp">Online Math Calculator</a>, nel caso non fosse diponibile esiste anche <a href="http://lavica.fesb.hr/octave/octave-on-line_en.php">questo.</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedarshan.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedarshan.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedarshan.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedarshan.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedarshan.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedarshan.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedarshan.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedarshan.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedarshan.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedarshan.wordpress.com/204/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=204&subd=thedarshan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thedarshan.wordpress.com/2009/04/03/eseguire-calcoli-matematici-con-octave-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b38d49d538414927cd1c01ba4f49a135?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thedarshan</media:title>
		</media:content>

		<media:content url="http://www.gnu.org/software/octave/images/sombrero.jpg" medium="image">
			<media:title type="html">logo octave</media:title>
		</media:content>
	</item>
		<item>
		<title>il pesce d&#8217;Aprile di Youtube</title>
		<link>http://thedarshan.wordpress.com/2009/04/01/il-pesce-daprile-di-youtube/</link>
		<comments>http://thedarshan.wordpress.com/2009/04/01/il-pesce-daprile-di-youtube/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 22:24:02 +0000</pubDate>
		<dc:creator>thedarshan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aprile]]></category>
		<category><![CDATA[capovolto]]></category>
		<category><![CDATA[invertito]]></category>
		<category><![CDATA[pesce]]></category>
		<category><![CDATA[pesce d'aprile]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://thedarshan.wordpress.com/2009/04/01/il-pesce-daprile-di-youtube/</guid>
		<description><![CDATA[Oggi youtube ha fatto un pesce d&#8217;aprile meraviglioso
si vede tutto al contrario
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=202&subd=thedarshan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Oggi youtube ha fatto un pesce d&#8217;aprile meraviglioso</p>
<div id="attachment_201" class="wp-caption alignnone" style="width: 510px"><img class="size-full wp-image-201" title="youtube" src="http://thedarshan.files.wordpress.com/2009/04/youtube.jpg?w=500&#038;h=375" alt="pesce d'aprile" width="500" height="375" /><p class="wp-caption-text">pesce d&#39;aprile</p></div>
<p>si vede tutto al contrario</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thedarshan.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thedarshan.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thedarshan.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thedarshan.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thedarshan.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thedarshan.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thedarshan.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thedarshan.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thedarshan.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thedarshan.wordpress.com/202/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thedarshan.wordpress.com&blog=2352018&post=202&subd=thedarshan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thedarshan.wordpress.com/2009/04/01/il-pesce-daprile-di-youtube/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b38d49d538414927cd1c01ba4f49a135?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thedarshan</media:title>
		</media:content>

		<media:content url="http://thedarshan.files.wordpress.com/2009/04/youtube.jpg" medium="image">
			<media:title type="html">youtube</media:title>
		</media:content>
	</item>
	</channel>
</rss>