<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1732869837318058082</id><updated>2026-07-06T14:47:47.885-07:00</updated><category term="ubuntu"/><category term="linux"/><category term="mac"/><category term="Terminale"/><category term="c++"/><category term="nerd"/><category term="comandi"/><category term="malato...terminale"/><category term="windows"/><category term="guida"/><category term="programmazione"/><category term="tecniche di programmazione"/><category term="7"/><category term="Codice Sorgente"/><category term="Seven"/><category term="algoritmi"/><category term="algoritmo"/><category term="bug"/><category term="curiosità"/><category term="hash"/><category term="hashing doppio"/><category term="icone"/><category term="photoshop"/><category term="ram"/><category term="tabelle hash"/><category term=".ico"/><category term=".png"/><category term="10.10"/><category term="22 ottobre"/><category term="3D"/><category term="Blu Ray"/><category term="Browser"/><category term="C++11"/><category term="CD"/><category term="Capacità della batteria"/><category term="CoconutBattery"/><category term="CoconutID"/><category term="Contact by number"/><category term="DVD"/><category term="DVDrip"/><category term="Digitale"/><category term="Disc"/><category term="Doom 3"/><category term="Downloads"/><category term="GB"/><category term="Global Wave"/><category term="Google Code Search"/><category term="Informazione"/><category term="Koders"/><category term="Krugle"/><category term="M-DISC"/><category term="MILLENIATA"/><category term="Motore di ricerca"/><category term="Oneric Ocelot"/><category term="Ottico"/><category term="Overwolf"/><category term="PAE"/><category term="PIPA"/><category term="Pic3D"/><category term="Pirateria"/><category term="Riconoscimento vocale"/><category term="SOPA"/><category term="Supporto"/><category term="TVOSA"/><category term="ToyCon"/><category term="Uxstyle Core"/><category term="Vario"/><category term="Vista"/><category term="Win for life"/><category term="Win for life generator"/><category term="Xp"/><category term="adblock"/><category term="adblock plus"/><category term="add on"/><category term="addon"/><category term="adjustment"/><category term="annunci pubblicitari"/><category term="aspetto"/><category term="backtracking"/><category term="blog"/><category term="blur"/><category term="cam"/><category term="cambiare"/><category term="catalogo"/><category term="cerca"/><category term="cercare per numero di telefono"/><category term="chat"/><category term="chrome"/><category term="cloudsn"/><category term="color"/><category term="colori"/><category term="compilare"/><category term="compontente aggiuntivo"/><category term="contatti"/><category term="cosenza"/><category term="creare"/><category term="dark"/><category term="diagrammi"/><category term="dinamica"/><category term="divide et impera"/><category term="dll"/><category term="dropbox"/><category term="dual channel"/><category term="editor"/><category term="eliminare"/><category term="email"/><category term="enegetico"/><category term="facebook"/><category term="film"/><category term="firefox"/><category term="flusso"/><category term="font"/><category term="formati"/><category term="fps"/><category term="game"/><category term="gaussian"/><category term="gedit"/><category term="generatore casuale di numeri"/><category term="gimp"/><category term="giochi per pc"/><category term="gnu"/><category term="gratis"/><category term="hackerstribe"/><category term="hotmail"/><category term="hue"/><category term="id Software"/><category term="indirizzamento aperto"/><category term="informatica"/><category term="informazione interna"/><category term="ipad"/><category term="iphone"/><category term="ipod touch"/><category term="kernel"/><category term="launcher"/><category term="linux day 2011"/><category term="lucidchart"/><category term="luminosità"/><category term="makefile"/><category term="manifestazione"/><category term="matrice"/><category term="mattoni"/><category term="megaupload"/><category term="mobile"/><category term="modellismo"/><category term="moltiplicazione tra matrici"/><category term="multiselezione."/><category term="muro"/><category term="notifiche"/><category term="nuovo standard ISO"/><category term="offset"/><category term="oggettistica"/><category term="opacità"/><category term="open source"/><category term="organizzazione"/><category term="personalizzazione"/><category term="problemi"/><category term="programmazione dinamica"/><category term="pubblicità"/><category term="quicksort"/><category term="rapidshare"/><category term="registrazione"/><category term="ricerche"/><category term="risparmio"/><category term="saturation"/><category term="saturazione"/><category term="scansione lineare"/><category term="scansione quadratica"/><category term="schema"/><category term="scr"/><category term="shop"/><category term="skydrive"/><category term="sort"/><category term="streaming"/><category term="sublime"/><category term="televisione"/><category term="televisore"/><category term="temi"/><category term="tessuto"/><category term="testo"/><category term="text"/><category term="texture"/><category term="tile"/><category term="tileable"/><category term="tips"/><category term="unix"/><category term="vector"/><category term="verde bianario"/><category term="vettore"/><category term="video"/><category term="wetransfer"/><category term="youtube"/><title type='text'>SaloonSoft</title><subtitle type='html'>Blog tenuto da studenti di Informatica presso l&#39;Università Della Calabria. Il blog tratta argomenti quali informatica, programmazione, curiosità e programmi.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>MizarSoft</name><uri>http://www.blogger.com/profile/09585235875998405315</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjto8AEJnge73k65dRaOjpwHDRS6Y15qThXb_xH4gOex1sfTyVBAQTawVgLlF6G6WgIj12P37cU1qqTCyu3ZcmyLwx52NjJPxZLyR9xazA-w4RpwCBXbWeyaembOES25Q/s220/LOGO.PNG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>46</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-2999755660010815444</id><published>2012-07-29T14:57:00.002-07:00</published><updated>2012-07-29T14:57:55.129-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hackerstribe"/><title type='text'>SaloonSoft si sposta!</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://profile.ak.fbcdn.net/hprofile-ak-ash2/277132_109337522440784_1876575934_n.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://profile.ak.fbcdn.net/hprofile-ak-ash2/277132_109337522440784_1876575934_n.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
SaloonSoft entra a far parte di HackersTribe! Ancora per qualche giorno saranno disponibili articoli e informazioni sul nostro blog, ma a trasferimento completato sarà tutto su HackersTribe. Il motivo del trasferimento è semplice: l&#39;unione fa la forza. Il sito hackerstribe è specializzato nel settore informatico (e tecnologico in generale) quindi è con grande piacere che faccio questo annuncio. Ovviamente tutta la nostra disponibilità e (si spera) simpatia la ritroverete lì, assieme ad altri collaboratori, altre notizie, altro codice, una community più ampia e tanto altro. Iniziate a farvi un giro su&amp;nbsp;&lt;a href=&quot;http://www.hackerstribe.com/&quot;&gt;HackersTribe&lt;/a&gt;!</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/2999755660010815444/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2012/07/saloonsoft-si-sposta.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/2999755660010815444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/2999755660010815444'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2012/07/saloonsoft-si-sposta.html' title='SaloonSoft si sposta!'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12635476657694272810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-8406572311219975357</id><published>2012-05-30T02:26:00.002-07:00</published><updated>2012-05-30T02:34:50.101-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="algoritmi"/><category scheme="http://www.blogger.com/atom/ns#" term="backtracking"/><category scheme="http://www.blogger.com/atom/ns#" term="tecniche di programmazione"/><title type='text'>Tecniche di Programmazione : Backtracking</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0Qzfk7KTLXT8KaDqv4cXqLlvsAMnZ8iUVGxe93UsRLUtMN1BKbesjhM_jEgkJX-0UZiO4BJ4P_yIObM6-dRolSAyN4L6rKUjwvm1g9y__FdEKJR6abwEm_H7NB8ce8GrkJChjLks5MxE/s1600/backtracking.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;281&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0Qzfk7KTLXT8KaDqv4cXqLlvsAMnZ8iUVGxe93UsRLUtMN1BKbesjhM_jEgkJX-0UZiO4BJ4P_yIObM6-dRolSAyN4L6rKUjwvm1g9y__FdEKJR6abwEm_H7NB8ce8GrkJChjLks5MxE/s320/backtracking.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #442424; font-size: 16px;&quot;&gt;In questo post ho cercato di scrivere quello che avevo capito di una delle tecniche di programmazione più usate, il backtracking, basandomi sugli appunti presi a lezione, informazioni sul web e alcuni libri di testo. Scusatemi per la formattazione, ma ho copiato e incollato da un documento di testo che avevo scritto e sono troppo pigro per riformattarlo a regola d&#39;arte. Per qualsiasi suggerimento o altro lasciate un commento o contattateci!&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #442424; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #442424; font-size: 16px;&quot;&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-text-decorations-in-effect: none; color: #442424; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;u&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;Principio:&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;La
tecnica del backtracking è, per certi versi, un’ottimizzazione
della ricerca esaustiva (o brute force) che prova tutte le possibili
soluzioni “sensate” di un problema. Proprio il termine “sensate”
fa la differenza con la tecnica di brute force: il backtracking pone
dei vincoli in ogni suo passo, così da far diminuire i tempi della
brute force. Dunque il backtracking elimina le strade che nel loro
stato presentano già una scorrettezza, mentre la brute force esamina
ogni combinazione possibile e verifica la sua esattezza solo dopo
aver generato la pseudo-soluzione. Questa tecnica intraprende una
strada che sembra corretta, non appena si rende conto che la
soluzione diventa scorretta, l&#39;algoritmo smette di andare avanti e
torna in uno stato precedente, quando la soluzione era ancora giusta.
Per capire bene il funzionamento del backtracking si ci può riferire
a un albero, visitato in profondità per arrivare alla soluzione,
dove a ogni livello corrispondono X nodi interni che rappresentano i
valori delle sotto soluzioni: se si arriva ad una foglia significa
che si è trovata la soluzione; se, nell&#39;andare avanti nei nodi, i
vincoli imposti risultano violati o non si può più procedere, si
ritorna al nodo padre per poter scegliere un altro figlio e quindi
intraprendere una nuova strada. Il processo si blocca se si trova una
soluzione o si provano tutte le strade disponibili senza arrivare
alla soluzione. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;Per
poter applicare il backtracking si devono verificare delle
condizioni:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;Lo
 spazio delle soluzioni dev’essere finito &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
 &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;La
 soluzione può essere rappresentata mediante soluzioni parziali&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;La
 dimensione della soluzione finale S è nota&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;Il
 valore di ogni sotto soluzione dev’essere finito&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;Introduciamo
lo pseudo-codice per il backtracking (versione ricorsiva)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;E&#39;
utile definire un tipo enumerativo per elencare i valori delle
sotto-soluzioni:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;enum
valori { MIN_VAL, MED_VAL, […] , MAX_VAL}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;Lista
che salva le sotto-soluzioni che assieme daranno la soluzione finale:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;lista
sottoSoluzioni { } &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;bool
solve ( lista sottoSoluzioni )&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; x
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Wingdings;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;ß&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;
minVal&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; while
(x &amp;lt;= MAX_VAL) {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;if
(canAdd (x,sottoSoluzioni) ) {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; add
(x,sottoSoluzioni) )&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if
( isComplete (sottoSoluzioni) )&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return
true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if
( solve(sottoSoluzioni) )&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return
true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; remove(x,sottoSoluzioni)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x
= next(x)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;  else&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;x
= next(x)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; return
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;La
funzione solve rappresenta il backtracking: parte con il primo valore
del nostro insieme che aggiunge alla lista di sotto-soluzioni se è
conforme ai nostri vincoli (dettati dalla funzione canAdd). La
funzione add ha il compito di aggiungere il nostro x alla lista delle
sotto-soluzioni. isComplete ci informa se la lista di sotto-soluzioni
è completa, dunque se abbiamo raggiunto la soluzione finale, se ciò
non dovesse accadere viene richiamata la funzione solve
ricorsivamente con la nuova lista di sotto-soluzioni aggiornata al
valore x appena aggiunto. Se ci accorgessimo che nessun valore di x è
in grado di soddisfare i vincoli e che quindi non possiamo più
continuare con questa strada, ritorniamo false che fa fallire la
condizione if (solve) e che dunque provvederà a rimuovere la x prima
inserita, dato che i suoi nodi figli non permettono di continuare
verso la soluzione (passo di backtrack, torniamo indietro modificando
l&#39;ultimo valore inserito). Il ciclo si ripete fin quando non abbiamo
provato tutti i valori possibili di x e le varie strade senza trovare
una soluzione (quindi restituendo false) o trovando una strada che ci
conduce alla risoluzione del problema(quindi restituendo true in un
qualsiasi punto del programma in cui tutte le chiamate ricorsive su
solve restituiranno true o sarà soddisfatta la chiamata a
isComplete).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;Esempio:
&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;Problema
delle otto regine&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCgjbGv1UYitdiyuCZE9Piz3KlQBtLabsTWpk7L-TSwA-Oq1padtwCF6gktg-EgJPkJ2xWx4QxsbuhTtghqmlgTILJouZ5rCEm1UPxnKypaUL6X91ecgVN6UGZnTcAASzxHtmFYfv2X10/s1600/Eight-queens-animation.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCgjbGv1UYitdiyuCZE9Piz3KlQBtLabsTWpk7L-TSwA-Oq1padtwCF6gktg-EgJPkJ2xWx4QxsbuhTtghqmlgTILJouZ5rCEm1UPxnKypaUL6X91ecgVN6UGZnTcAASzxHtmFYfv2X10/s320/Eight-queens-animation.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;i&gt;Animazione presa da Wikipedia&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;Il
problema ci chiede di sistemare otto regine in una scacchiera 8x8. La
posizione delle otto regine dev&#39;essere tale da non permettere a
nessuna regina di &quot;attaccarne&quot; un&#39;altra.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;Si
può notare che possiamo risolvere il problema provando tutte le
combinazioni possibili delle regine, ma si può ottimizzare usando il
backtracking, posizionando, cioè, le regine in modo &quot;intelligente&quot;
e non in tutti i modi possibili. Qualora una posizione non dovesse
andare più bene si torna indietro e si modifica la regina
precedente.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;Usiamo
un array di interi per rappresentare la soluzione, che avrà
esattamente 8 indici di colonna (assumiamo che gli indici di riga
siano uguali al numero della regina: regina 1 -&amp;gt; riga 1 ecc, dato
che le regine sulla stessa riga possono attaccarsi).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;Le
nostre sotto soluzioni varieranno da 1 a 8 (indici di colonna).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;Utilizziamo
un indice (ultimaPosValida) facente parte dell&#39; array di
sotto-soluzioni che ci tiene traccia dell&#39;ultima regina posizionata
correttamente.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;Applichimo
lo pseudo-codice del backtracking:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;bool
isComplete ( sottoSoluzioni )&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; return
sottoSoluzioni.ultimaPosValida == numeroRegine;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;int
next ( x )&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; return
x+1;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;void
remove ( x, sottoSoluzioni) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; sottoSoluzioni.ultimaPosValida
--;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;void
add (x, sottoSoluzioni)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; sol.ultimaPosValida
++;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; sol.valori[sol.ultimaPosValida]
= x;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;bool
canAdd (x,sol)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; int
currRig = sol.ultimaPosValida +1;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; int
currCol = x;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; for
( int precRig = 1; precRig &amp;lt; currRig; precRig ++)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;  int
precCol = sol.valori[precRig];&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;  if
( currCol == precCol OR currRig - precRig == abs ( currCol - precCol)
)   return false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; return
true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;La
funzione &lt;b&gt;canAdd&lt;/b&gt; memorizza su currRig la riga della regina che si
vuole posizionare, che sarà uguale alla riga della regina precedente
già posizionata più uno (essendo le righe uguali al numero delle
regine come detto sopra). currCol invece memorizzerà l&#39;indice della
colonna che dobbiamo &quot;verificare&quot;. Il for cicla tutte le
righe precedenti all&#39;attuale e memorizza di volta in volta le colonne
ad esse associate (in sostanza ad ogni ciclo abbiamo riga e colonna
della regina memorizzata nel nostro array di sotto-soluzioni). Con il
controllo if che segue, verifichiamo che la regina che stiamo
inserendo non sia sulla stessa colonna o su una diagonale della
regina precedente in esame ( precRig e precCol -&amp;gt; posizione regina
precedente). La formula currRig - precRig == abs (currCol - precCol)
indica proprio il controllo atto a verificare se le regine
R1(precRig,precCol) ed R2(currRig,currCol) si possono attaccare
diagonalmente. La funzione abs restituisce il valore assoluto: essa è
applicata in currCol - precCol perché non sappiamo quale delle due
colonne sia la maggiore, cosa che non si verifica per precRig e
currRig dato che sappiamo che la regina Ri avrà numero di riga
maggiore ad Ri-1 per convenzione.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;font-weight: normal; line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/8406572311219975357/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2012/05/tecniche-di-programmazione-backtracking.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/8406572311219975357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/8406572311219975357'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2012/05/tecniche-di-programmazione-backtracking.html' title='Tecniche di Programmazione : Backtracking'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12635476657694272810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0Qzfk7KTLXT8KaDqv4cXqLlvsAMnZ8iUVGxe93UsRLUtMN1BKbesjhM_jEgkJX-0UZiO4BJ4P_yIObM6-dRolSAyN4L6rKUjwvm1g9y__FdEKJR6abwEm_H7NB8ce8GrkJChjLks5MxE/s72-c/backtracking.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-1740487262790775616</id><published>2012-03-15T11:43:00.002-07:00</published><updated>2012-03-15T11:44:11.354-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="icone"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>[Ubuntu] Aggiungere icone sulle applicazioni</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpcO38MmMWQ-PpENSK7D06kT46yukjfxXruhodrHAxlZn4nriKk8eVQtneVDdlKXe7-PsBHev55uzhLjTDBBnJ4BInKT7i-gGoh_f_1hD8Dt-ucbFgX_G5J_GKFnnd8oTS2M1f-msnGEA/s1600/ubuntu.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;183&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpcO38MmMWQ-PpENSK7D06kT46yukjfxXruhodrHAxlZn4nriKk8eVQtneVDdlKXe7-PsBHev55uzhLjTDBBnJ4BInKT7i-gGoh_f_1hD8Dt-ucbFgX_G5J_GKFnnd8oTS2M1f-msnGEA/s200/ubuntu.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
In questo breve tutorial vedremo come impostare un accesso &quot;grafico&quot; alle nostre applicazioni eseguibili solo mediante terminale.&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;[NOTA: uso ubuntu 10.04, qualcosa potrebbe cambiare con le nuove versioni]&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
A volte è noioso lanciare una applicazione da terminale tutte le volte o vorremmo semplicemente lanciarla via &quot;Icona&quot; dal menù Applicazioni. In meno di 5 minuti questo diventa fattibile.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Per prima cosa rechiamoci in &lt;i&gt;Sistema &amp;gt; Preferenze &amp;gt; Menù Principale&lt;/i&gt;. Da qui possiamo scegliere dal menù a sinistra, la nostra sezione per l&#39;applicazione che vogliamo aggiungere. Cliccate su &quot;Nuova Voce&quot; e inserite i nei vari campi le informazioni opportune. Nel campo &quot;Comando&quot; va inserito esattamente il comando usato per lanciare l&#39;applicazione quando aprite il terminale (partendo dalla directory ~/ in genere). Cliccate sull&#39;immagine della molla per aggiungere l&#39;icona del programma, infine &amp;nbsp;confermate tutto ed il gioco è fatto.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;Esempio installazione&lt;b&gt; Eclipse&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
[Saltate al punto 2) se vi interessa solo l&#39;esempio di come aggiungere l&#39;icona nel menù)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
1) Eclipse è un IDE per linguaggi come C++ e Java. Scarichiamo il pacchetto dal &lt;a href=&quot;http://www.eclipse.org/downloads/&quot;&gt;sito&lt;/a&gt; ufficiale e usiamo il comando&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;tar zxvf &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;per scompattarlo. Ora notiamo che dentro la cartella Eclipse c&#39;è l&#39;eseguibile omonimo. Con un semplice doppio click o con ./eclipse nel terminale il programma parte.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;2) S&lt;/span&gt;&lt;i&gt;istema &amp;gt; Preferenze &amp;gt; Menù Principale. &lt;/i&gt;Clicchiamo la &#39;+&#39; su &#39;Applicazioni&#39;, qualora la lista fosse nascosta, e clicchiamo su programmazione (o qualunque altra categoria preferite). Click su &quot;Nuova Voce&quot;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBIqdlIskaeAugNsGwd7ttdkNTmrQDyM23AODCPt0lYz4UHHnEVisDLurKOtw6LAb9zOnsL3gs5XpYTj4q9_DUCq3ImjpkzIJXz8TTywMrqSSZbkn_1VH2jHwWD86J6KfxnXyz90svGWk/s1600/guidaIcone.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;266&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBIqdlIskaeAugNsGwd7ttdkNTmrQDyM23AODCPt0lYz4UHHnEVisDLurKOtw6LAb9zOnsL3gs5XpYTj4q9_DUCq3ImjpkzIJXz8TTywMrqSSZbkn_1VH2jHwWD86J6KfxnXyz90svGWk/s320/guidaIcone.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both;&quot;&gt;
Ora nella nuova finestra inseriamo:&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Tipo: Applicazione&lt;br /&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both;&quot;&gt;
Nome: Eclipse&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both;&quot;&gt;
Comando:&amp;nbsp;/home/vostroNome/eclipse/./eclipse&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both;&quot;&gt;
Commento: (potete lasciarlo vuoto)&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both;&quot;&gt;
[vostroNome -&amp;gt; Nome utente che usate nel sistema].&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both;&quot;&gt;
Ovviamente se la cartella di eclipse si trova in &quot;Documenti&quot; il comando sarebbe:&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both;&quot;&gt;
/home/vostroNome/Documenti/eclipse/./eclipse&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both;&quot;&gt;
Clicchiamo ora sull&#39;immagine della molla e carichiamo il file &quot;icon.xpm&quot; presente nella cartella di Eclipse.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Ecco qui la nostra nuova icona che richiamerà il comando e quindi lancerà l&#39;applicazione senza nessuno sforzo.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ-Wq7duOEV4i4F9QXbfZmZKjs5AEjWaTbRCCoYafi0TbK8hLgExRS9XsfSrwP1z3-7_buqF_0aFhMahsM4kL1eHjS-AneTT7NILkfRvX4u_kBc7PteYYcbkRMSTGuhsY6npO-Uq0bK7k/s1600/guidaIcone2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;261&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ-Wq7duOEV4i4F9QXbfZmZKjs5AEjWaTbRCCoYafi0TbK8hLgExRS9XsfSrwP1z3-7_buqF_0aFhMahsM4kL1eHjS-AneTT7NILkfRvX4u_kBc7PteYYcbkRMSTGuhsY6npO-Uq0bK7k/s320/guidaIcone2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5Zk0N2KJ1dyGQC5r4D_REFJBatjn7ctS5XPg1c0pNci5G3LHNf3Jt_ZLh046Qk2iapTbKLaWOP_eBHFM2dbsKmoIffABe8kriEQP021lvuVIIWT_O6VTuLVLS6_XnirBvJuydAjVNqrk/s1600/guidaIcone3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;222&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5Zk0N2KJ1dyGQC5r4D_REFJBatjn7ctS5XPg1c0pNci5G3LHNf3Jt_ZLh046Qk2iapTbKLaWOP_eBHFM2dbsKmoIffABe8kriEQP021lvuVIIWT_O6VTuLVLS6_XnirBvJuydAjVNqrk/s320/guidaIcone3.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/1740487262790775616/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2012/03/ubuntu-aggiungere-icone-sulle.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/1740487262790775616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/1740487262790775616'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2012/03/ubuntu-aggiungere-icone-sulle.html' title='[Ubuntu] Aggiungere icone sulle applicazioni'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12635476657694272810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpcO38MmMWQ-PpENSK7D06kT46yukjfxXruhodrHAxlZn4nriKk8eVQtneVDdlKXe7-PsBHev55uzhLjTDBBnJ4BInKT7i-gGoh_f_1hD8Dt-ucbFgX_G5J_GKFnnd8oTS2M1f-msnGEA/s72-c/ubuntu.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-6344740270886379921</id><published>2012-03-07T08:00:00.000-08:00</published><updated>2012-03-07T10:46:39.152-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="divide et impera"/><category scheme="http://www.blogger.com/atom/ns#" term="quicksort"/><category scheme="http://www.blogger.com/atom/ns#" term="tecniche di programmazione"/><title type='text'>Tecniche di Programmazione: Divide et Impera</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8pc3tO5pfVAx4dFlAygWjt8u2AX-DBex2_5WCmhH1zYqJNZUP8yWYzjJX7WL7fLiT83FKcdiI0FSnyJKb1iZcJIRjThMcJfGb22WBe9a6CUwWjpfCOJmF12W3-m0BnbBvV5O1nIRfXII/s1600/Array_maximum_-_divide_et_impera.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;167&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8pc3tO5pfVAx4dFlAygWjt8u2AX-DBex2_5WCmhH1zYqJNZUP8yWYzjJX7WL7fLiT83FKcdiI0FSnyJKb1iZcJIRjThMcJfGb22WBe9a6CUwWjpfCOJmF12W3-m0BnbBvV5O1nIRfXII/s320/Array_maximum_-_divide_et_impera.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In questo post l&#39;intenzione è quella di scrivere&amp;nbsp;uno schema della tecnica divide et impera, basandomi sugli appunti presi a lezione e sul libro di testo (Algoritmi e Strutture Dati di Demetrescu, Italiano, Finocchi edito dalla McGraw Hill). Per qualsiasi suggerimento o altro lasciate un commento o contattateci!&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt; Principio: &lt;/span&gt;Principalmente si compone di due passi: &lt;br /&gt;
Passo Divide: Dividere i dati in ingresso in due o più sottoinsiemi tramite la ricorsione. &lt;br /&gt;
Passo Impera: Risolvere il problema sui sottoinsiemi e ricombinare le varie soluzioni per ottenere la soluzione globale. Considera il problema con un approccio top-down. &lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Punti di forza&lt;/span&gt;: l&#39;efficacia aumenta se il problema è facilmente scomponibile. &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Punti di debolezza&lt;/span&gt;: Richiede uno sforzo per individuare tecniche per la decomposizione e la ricombinazione: non è immediato e banale trovare il passo Divide e il passo Impera. &lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Esempio:&lt;/span&gt; &lt;b&gt;QuickSort &lt;/b&gt;&lt;br /&gt;
Il quick sort è un algoritmo di ordinamento. Il suo funzionamento applicato ad un array è il seguente: &lt;br /&gt;
Divide: Sceglie a caso un indice x (la scelta casuale dell&#39;indice diminuisce la complessità dell&#39;algoritmo)&amp;nbsp;e partiziona la sequenza in modo tale che una sequenza contenga elementi &amp;lt;= ad Array[x] e l&#39;altra contenga elementi &amp;gt;Array[x]. (questo processo è ricorsivo) &lt;br /&gt;
Impera: unisce la sottosequenze ordinate.&lt;br /&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: normal;&quot;&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;i&gt;Procedura partition (array A, indici i, f ) → indice&lt;/i&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;x ← A[i]&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;inf ← i &lt;br /&gt;sup ← f +1 &lt;br /&gt;stop = false &lt;br /&gt;while ( !stop ) do &lt;br /&gt;do inf ← inf + 1 &lt;br /&gt;while ( inf &amp;lt;= f and A[inf] &amp;lt;= x ) &lt;br /&gt;do sup ← sup – 1 &lt;br /&gt;while ( A[sup] &amp;gt; x ) &lt;br /&gt;if ( inf &amp;lt; sup ) &lt;br /&gt;scambia ( inf , sup ) // scambia A[inf] con A[sup] &lt;br /&gt;else &lt;br /&gt;stop = true &lt;br /&gt;scambia (i , sup ) // scambia A[i] con A[sup] &lt;br /&gt;return sup &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKmDIwbQDtk88O0nnW-sDHwnMCuB4kG9RiYkAjiFqMdGp32gdKuf76GZydnMpPdgj4wPbw0mZEVrqpfXqzJZ2jpEWLTy_UJaZY_SWaWkU04eb_g63Dg9xGntPxCS2XX93RmF8z8c34Da8/s1600/200px-Partition_example.svg.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKmDIwbQDtk88O0nnW-sDHwnMCuB4kG9RiYkAjiFqMdGp32gdKuf76GZydnMpPdgj4wPbw0mZEVrqpfXqzJZ2jpEWLTy_UJaZY_SWaWkU04eb_g63Dg9xGntPxCS2XX93RmF8z8c34Da8/s1600/200px-Partition_example.svg.png&quot; /&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;i&gt;Esempio di procedura Partition [Wikipedia]&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
algoritmo quicksort (array A, indici i, f ) &lt;br /&gt;if ( i &amp;gt;= f ) &lt;br /&gt;return &lt;br /&gt;m ← partition (A,i,f) &lt;br /&gt;quicksort (A,i,m-1) &lt;br /&gt;quicksort (A,m+1,f) &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Praticamente l&#39;algoritmo si può sintetizzare così: &lt;br /&gt;
&lt;br /&gt;
Dato un array in input e due indici i ed f, rispettivamente la posizione iniziale e la posizione finale dell&#39;array (nella prima chiamata), esegui quicksort: se abbiamo più di un elemento (la condizione dell&#39;if) salvami in m il risultato della partizione del mio array attuale (l&#39;indice posizionato correttamente dopo l&#39;esecuzione di partition) e chiama la funzione quicksort (ricorsione) sulle due parti prima di m e dopo di m (le parti ancora “in dubbio”, quindi da ordinare). &lt;br /&gt;
&lt;br /&gt;
La funzione partition funziona così: &lt;br /&gt;
&lt;br /&gt;
Metti in inf l&#39;indice i e in sup l&#39;indice f; inizializza a falso la variabile booleana stop che ci dirà quando abbiamo finito la chiamata di funzione; ora: &lt;br /&gt;
→ scorri verso destra l&#39;array tramite l&#39;indice inf e fermati solo quando trovi un elemento più grande di x ( che ricordiamo è ora A[i] ) oppure se con l&#39;indice inferiore hai sorpassato ( o sei sulla stessa posizione) l&#39;indice superiore ( ho visitato tutti gli elementi ). &lt;br /&gt;
→ scorri verso sinistra l&#39;array tramite l&#39;indice sup e fermati solo quando trovi un elemento più piccolo o uguale a x. (in questo caso è ridondante inserire un controllo che si ferma se arriva all&#39;indice inf o lo supera, dato che, in caso li scorre tutti da destra, si fermerà sicuramente alla posizione i, dato che A[i] è sicuramente = ad x e ciò fa interrompere il ciclo). &lt;br /&gt;
In questo modo ci fermiamo quando A[inf] sarà maggiore di x e A[sup] sarà minore o uguale ad x. A questo punto li scambiamo, così avremo nella parte destra tutti i numeri maggiori di x e nella parte sinistra tutti i numeri minori. &lt;br /&gt;
&lt;br /&gt;
Quando l&#39;indice inf avrà superato (o raggiunto) l&#39;indice sup, significa che ho fatto tutti i confronti e dunque poniamo stop = true, che farà fermare il ciclo. L&#39;ultimo passo è quello di scambiare l&#39;elemento perno, A[i], con A[sup], il che porterà l&#39;elemento A[i] nella sua posizione finale e avrà alla sua sinistra i numeri minori o uguali e alla sua destra i numeri maggiori. &lt;br /&gt;
&lt;br /&gt;
Se come perno usiamo ogni volta il primo elemento nell&#39;array (quindi come i usiamo 0) potremmo avere il caso peggiore che A[0] sia l&#39;elemento più piccolo o più grande dell&#39;array e dunque la complessità dell&#39;algoritmo sarà O(n^2). Per rendere più efficiente la complessità, scegliamo come indice i, un numero casuale, portandola a O (n log n).&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkJ4tQEj3mWSTV_hhDxuhyphenhyphenCPfxwJdsijoe5RwznuX0_x8kJspWUQLNGMRL1FIF-okwwwkxeQbxbi7fW4KBpdlApxz1X-veoH6lWQL2MDK8e9u-Epb2m6Bnea87CDPsZ5mFwhNaRDf7rHM/s1600/Sorting_quicksort_anim.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;243&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkJ4tQEj3mWSTV_hhDxuhyphenhyphenCPfxwJdsijoe5RwznuX0_x8kJspWUQLNGMRL1FIF-okwwwkxeQbxbi7fW4KBpdlApxz1X-veoH6lWQL2MDK8e9u-Epb2m6Bnea87CDPsZ5mFwhNaRDf7rHM/s320/Sorting_quicksort_anim.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;i&gt;Quicksort. Le linee orizzontali sono gli indici scelti (pivot) [Wikipedia]&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/6344740270886379921/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2012/03/tecniche-di-programmazione-divide-et.html#comment-form' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/6344740270886379921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/6344740270886379921'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2012/03/tecniche-di-programmazione-divide-et.html' title='Tecniche di Programmazione: Divide et Impera'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12635476657694272810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8pc3tO5pfVAx4dFlAygWjt8u2AX-DBex2_5WCmhH1zYqJNZUP8yWYzjJX7WL7fLiT83FKcdiI0FSnyJKb1iZcJIRjThMcJfGb22WBe9a6CUwWjpfCOJmF12W3-m0BnbBvV5O1nIRfXII/s72-c/Array_maximum_-_divide_et_impera.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-3096645548567608087</id><published>2012-03-05T02:20:00.000-08:00</published><updated>2012-03-05T02:58:51.618-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="algoritmi"/><category scheme="http://www.blogger.com/atom/ns#" term="moltiplicazione tra matrici"/><category scheme="http://www.blogger.com/atom/ns#" term="programmazione dinamica"/><category scheme="http://www.blogger.com/atom/ns#" term="tecniche di programmazione"/><title type='text'>Tecniche di Programmazione: Programmazione Dinamica</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIz9tQbEQ70znXcY1SX65Xp5r5Jik6sE8ofks5TD6a_TMCSNLiM_I9wuEm11SNGOH4sEh9yatTsFPguzqGYdpscalVY_KgE6Yqp3RGHi1ptq38RQWb4nI1-gZYzDiM2QP0yRrS4yGPCIM/s1600/LCSTab4.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;244&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIz9tQbEQ70znXcY1SX65Xp5r5Jik6sE8ofks5TD6a_TMCSNLiM_I9wuEm11SNGOH4sEh9yatTsFPguzqGYdpscalVY_KgE6Yqp3RGHi1ptq38RQWb4nI1-gZYzDiM2QP0yRrS4yGPCIM/s320/LCSTab4.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times;&quot;&gt;In questo post ho cercato di scrivere quello che avevo capito di una delle tecniche di programmazione più note, la programmazione dinamica, basandomi sugli appunti presi a lezione e sul libro di testo (Algoritmi e Strutture Dati di Demetrescu, Italiano, Finocchi edito dalla McGraw Hill). Per qualsiasi suggerimento o altro lasciate un commento o contattateci!&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: red; font-size: small;&quot;&gt;&lt;u&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; font-family: Arial, Helvetica, sans-serif;&quot;&gt;Principio:&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Utilizzare una struttura di supporto per memorizzare alcune soluzioni parziali, mediante le quali giungeremo alla soluzione del nostro problema. L&#39;uso di &quot;tabelle&quot; di supporto è utile per evitare di ricalcolare informazioni più volte. Il nome di questa tecnica deriva proprio dalla struttura di supporto: si programma dinamicamente la soluzione finale mediante alcuni passi intermedi presenti nella tabella delle soluzioni. Un approccio che utilizza la programmazione dinamica segue alcuni passi:&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; font-family: Arial, Helvetica, sans-serif;&quot;&gt;Identificare
 i sottoproblemi e il criterio di scomposizione delle varie soluzioni&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; font-family: Arial, Helvetica, sans-serif;&quot;&gt;Creare
 una tabella di supporto che conterrà le soluzioni dei sottoproblemi
 e alcuni valori di “default”, cioè le soluzioni dei
 sottoproblemi minimi (in genere i sottoproblemi unitari o comunque i
 più immediati, di cui si dispone già la soluzione)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; font-family: Arial, Helvetica, sans-serif;&quot;&gt;Utilizzare
 le soluzioni memorizzate in precedenza per generare la soluzione
 i-esima, sino ad arrivare alla posizione/soluzione voluta.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Il problema viene scomposto in modo bottom-up, ovvero partiamo dalle soluzioni dei sottoproblemi unitari per calcolare le partizioni del problema più complesse che a loro volta ci serviranno per ottenere la soluzione al problema stesso.&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: red; font-size: small;&quot;&gt;&lt;u&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: red; font-size: small;&quot;&gt;&lt;u&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;Esempio&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;:
Minimizzare il prodotto tra matrici&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal;&quot;&gt;I metodi per moltiplicare 3 o più matrici sono più di uno e tutti si basano sulla “parentesizzazione” che adottiamo, cioè la priorità che diamo alle varie moltiplicazioni.&lt;/span&gt;&lt;/div&gt;
Moltiplicare (M1*M2) * M3, in genere, ha un costo diverso che moltiplicare M1*(M2*M3).&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
Innanzitutto analizziamo il costo di moltiplicazione tra due matrici:&lt;br /&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;algoritmo
MoltiplicaMatrici ( matrice M1, matrice M2 ) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;→&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;
matrice&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; assert
(M1.colonne == M2.righe )&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; Matrice
M3 {vuota};&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; k,
i, j &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;←&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;
0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; for
( i= 0; i &amp;lt; M1.righe; i++)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;  for
( j=0; j &amp;lt; M2.colonne; j++)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;   for
( k = 0, k &amp;lt; M1.colonne, k++)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;    M3
[i] [j] += M1[i] [k] * M2 [k] [j]  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;return
M3;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
(Nota: Due matrici si possono moltiplicare solo se il numero di colonne della prima è uguale al numero delle righe della seconda).&lt;br /&gt;
Questo semplice algoritmo agisce così:&lt;br /&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Times; line-height: 100%;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Definisci 3 indici k, i e j e inizializzali a 0. L&#39;indice i serve a scandire le righe di M1, l&#39;indice j scandisce le colonne di M2 e l&#39;indice K ci fa da contatore per far compiere esattamente M1.colonne volte (o M2.righe, che è uguale) l&#39;operazione di moltiplicazione nelle posizioni corrette delle matrici M1 ed M2.&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Times; line-height: 100%;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;&amp;nbsp;P&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;osizionati sulla riga i-esima della matrice M1; posizionati sulla colonna j-esima della matrice M2; esegui la sommatoria della moltiplicazione degli elementi M1[i][k] e M2[k][j] che di fatto significa moltiplicare, due per volta, gli elementi della riga i di M1 e gli elementi della colonna J di M2 e addizionare il loro risultato alla posizione della matrice risultato M3 nella posizione (i,j).&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times; line-height: 16px;&quot;&gt;P&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Times; line-height: 100%;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Risulterà che l&#39;elemento M3[i][j] è stato prodotto dalla sommatoria di tutti gli elementi M1[i][k] e M2[k][j] moltiplicati fra loro.&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0N946MKIn5ptnO_nPsXQDleq-eA2U59XKNtyM1uD11uPkREsOJnr5lXonFHx3hhOOP4fsQvE_2ZkgN4fr-viPXZHldHADhYMSyxSU5n_aLRG0zl8b_S0svZq3wt-VWEGHHiJ74lCL0Q0/s1600/500px-Matrix_multiplication_diagram_2.svg.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0N946MKIn5ptnO_nPsXQDleq-eA2U59XKNtyM1uD11uPkREsOJnr5lXonFHx3hhOOP4fsQvE_2ZkgN4fr-viPXZHldHADhYMSyxSU5n_aLRG0zl8b_S0svZq3wt-VWEGHHiJ74lCL0Q0/s320/500px-Matrix_multiplication_diagram_2.svg.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;i&gt;Moltiplicazione tra due matrici. [Wikipedia]&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
La complessità è di O(n^3) essendoci 3 for innestati. Dunque se L1 ed L2 sono rispettivamente il numero delle righe e il numero delle colonne di una matrice M1, L3 ed L4 indicano la stessa cosa ma su una matrice M2 con il vincolo che L2 sia uguale ad L3, avremo un costo di moltiplicazione pari a:&lt;br /&gt;
L1 x L2 x L4&lt;br /&gt;
Possiamo notare che, avendo tre matrici o più, il costo varia a seconda dell&#39;ordine di moltiplicazioni che facciamo. Ad esempio:&lt;br /&gt;
[ formato : nRighe x nColonne ]&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&lt;b&gt;M1
[100 x 300 ]&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&lt;b&gt;M2
[300 x 1000]&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&lt;b&gt;M3
[1000 x 5]&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&lt;b&gt;Analizziamo
i costi:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
(M1 x M2 ) x M3 = M1/2 x M3;&lt;br /&gt;
Ricordiamo che la matrice risultante M1/2 avrà L1 righe ed L3 colonne.&lt;br /&gt;
costoTot = costo (M1 x M2) + costo (M1/2 x M3);&lt;br /&gt;
costo (M1 x M2 ) = 100 x 300 x 1000 = 30.000.000&lt;br /&gt;
costo (M1/2 x M3) = 100 x 1000 x 5 = 500.000&lt;br /&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;div style=&quot;line-height: 100%;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times; line-height: 100%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;costoTot = 30.500.000 operazioni.&lt;/div&gt;
&lt;br /&gt;
Analogamente:&lt;br /&gt;
M1 x ( M2 x M3 ) =&lt;br /&gt;
M1 x M2/3;&lt;br /&gt;
costoTot = costo (M2 x M3 ) + costo (M1 x M2/3)&lt;br /&gt;
costo (M2 x M3) = 300 x 1000 x 5 = 1.500.000&lt;br /&gt;
costo (M1 x M2/3) = 100 x 300 x 5 = 150.000&lt;br /&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;costoTot
= 1.650.000 operazioni&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black; line-height: 100%;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;La&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;variazione dei costi dipende proprio dalle dimensioni della matrice risultato delle prime moltiplicazioni: nel primo caso abbiamo a che fare con una matrice M1/2 che ha 100 righe e 1000 colonne; nel secondo caso la matrice M2/3 ha 300 righe e 5 colonne!&lt;br /&gt;
Applichiamo una idea che segue la programmazione dinamica per calcolare il costo minore per effettuare le moltiplicazioni e quindi la giusta priorità da dare alle moltiplicazioni delle matrici.&lt;br /&gt;
Date un numero di matrici n superiore a 3, i sottoproblemi possono riguardare la moltiplicazione di una parte di questo blocco intero di matrici, ad esempio dalla matrice i alla matrice j. Come problema base, notiamo che se i fosse uguale a j, il costo sarebbe unitario e proprio uguale a 0. Dunque abbiamo trovato i valori da assegnare alla nostra struttura appoggio di programmazione dinamica: tutte le operazioni che coinvolgono la stessa matrice avranno costo 0. Ma, allargando il nostro orizzonte in vista della soluzione finale, avremo bisogno di tutti i costi per poter scegliere il migliore. Adottiamo dunque come struttura dati supporto, una matrice quadrata avente numero di righe/colonne uguale al numero di matrici che vogliamo moltiplicare. La matrice così creata avrà la diagonale principale nulla, dato che i costi di moltiplicazione delle matrici Mi e Mi è 0. In ogni altra casella (i, j) avremo la soluzione OTTIMA del problema adattato alle matrici Mi x Mi+1 x.....x Mj. Infine il passo di avanzamento nella nostra matrice di programmazione dinamica è il seguente:&lt;/div&gt;
&lt;br /&gt;
M [i,j] = M[i,r] + M[r+1,j] + Li * Lr+1 * Lj+1&lt;br /&gt;
&lt;br /&gt;
Ovvero:&lt;br /&gt;
Il costo della moltiplicazione fra le matrici [Mi x … x Mj] è uguale al costo della moltiplicazione delle matrici [Mi x …. Mr] sommato al costo della moltiplicazione delle matrici [Mr+1 x …. Mj ] sommato al costo di moltiplicazione di questi due blocchi di matrici che è appunto Li x Lr+1 x Lj+1. Spieghiamo meglio questo svolgimento: noi spezziamo il costo di moltiplicazione tra le matrici (i,j) in 2 tronconi, divisi dall&#39;indice r. Questo indice r, compreso tra i e j-1, fa sì che noi dividiamo il problema in modo tale che possiamo sommare i costi dei due pezzi ( il costo da Mi ad Mr e il costo da Mr+1 ad Mj). Infine dobbiamo sommare il costo della moltiplicazione di questi due pezzi, che è la formula detta in precedenza. (si noti che la matrice risultato del primo blocco avrà righe pari alle righe di Mi e colonne pari alle colonne della matrice Mr ; la matrice risultato del secondo blocco avrà righe pari alle righe della matrice Mr+1 e colonne pari alle colonne della matrice Mj)&lt;br /&gt;
&lt;br /&gt;
Nel nostro algoritmo dobbiamo cercare tutti i possibili valori di r, che fungerà da separatore delle moltiplicazioni; servirà, cioè, a stabilire il vero costo ottimo della moltiplicazioni delle matrici. (per capirci nell&#39;esempio precedente r valeva “2”, dato che M1 x (M2 x M3) era meglio di (M1 x M2) x M3 e dunque poniamo la separazione sulla seconda moltiplicazione).&lt;br /&gt;
R sarà calcolato trovando il minimo dei vari costi.&lt;br /&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;Algoritmo
moltiplicazioneOttima ( array InfoMatrici ) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;→&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;
intero&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; n
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;←&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;
size (InfoMatrici) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; matrice
M di n x n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; for
( i = 1 to n ) do M[i,i] &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;←&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;
0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; for
( d = 1 to ( n-1) do&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;  for
( i = 1; to (n-d) do&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;   j
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;←&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;
d +1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;   M[i,j]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;←&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;
MAX_INT&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;   for
r = i to (j-1) do&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;    M[i,j]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;←&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;
min ( M[i,j], M[i,r] + M [r+1,j] + InfoMatrici[i] * InfoMatrici[r+1]
* InfoMatrici[j+1]}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt; return M[1,n]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Ricevuto un array con le informazioni sulle matrici (nRigheM1,nColonneM1,nColonneM2,nColonneM3 […] ) l&#39;algoritmo crea la matrice M che servirà da supporto e mette a 0 i costi unitari ( M1 x M1, M2 x M2 […] quindi azzera M[i,i]). Una volta fatto questo si pone un indice d, che segnerà la diagonale, che parte da 1 e arriva ad n-1 (ad n c&#39;è uno 0, è inutile). Ad ogni ciclo di d viene fatto partire un indice i che segnerà la nostra riga corrente ed andrà da 1 fino ad n-d, cioé fino alla fine della matrice senza sforarla. L&#39;indice j parte invece dalla prima posizione utile della matrice supporto, cioè da una posizione dopo la diagonale azzerata, e sarà il nostro indice di colonna. Mettiamo il massimo intero rappresentabile ( per simboleggiare infinito) nella posizione i,j della matrice M e procediamo provando tutti gli r: così facendo calcoliamo tutti i costi partizionando l&#39;espressione in tutti i modi possibili e sovrascrivendo la cella i,j con il minore tra questi valori (quello già precedente e quello calcolato nel generico passo i).&lt;br /&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&lt;b&gt;Per
esempio nella prima chiamata&lt;/b&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
i = 1, d = 1, j = 2, r = i = 1.&lt;br /&gt;
Stiamo guardando la cella M[1][2] che rappresenta il costo della moltiplicazione tra le matrici M1 x M2. Dato che c&#39;è un unico modo per moltiplicare queste matrici, il ciclo che vede r “protagonista” ciclerà una sola volta: r è uguale ad i ed è già j-1 dato che i è 1 e j è 2. Dunque verrà posizionato nella posizione M[i,j] il valore M[i,i] + M[r+1][j] + Li * Lr+1 * Lj+1, dato che è sicuramente minore di MAX_INT. Il valore sarà M[1,1] (che è zero) + M[1,1] (che è 0 dato che r=i) + M[2,2] ( che è uguale a 0 anch&#39;esso) + il costo di queste due matrici: nRigheM1 x nColonneM1 x nColonneM2, che si possono trovare nell&#39;array contenente le info delle matrici, alle rispettive posizioni ( i, r+1 e j+1 cioé 1,2,3).&lt;br /&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;line-height: 100%; margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black; line-height: 100%;&quot;&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;&lt;b&gt;In
un generico passo&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;l&#39;algoritmo si troverà sulla riga i e confronterà i vari costi della moltiplicazione delle matrici spezzettandole su r; il costo minore rimarrà memorizzato sulla cella opportuna. Da notare che la matrice si crea dinamicamente e che tutte le informazioni utili non vengono ricalcolate, ma vengono “prelevate” dalla matrice dato che essa contiene di volta in volta i costi ottimi. Quindi se per calcolare il costo ottimo del passo i, spezzo le matrici nel punto r, cercherò i costi minimi di quelle due matrici nella tabella.&lt;br /&gt;
&lt;br /&gt;
Foto post: &lt;a href=&quot;http://www.ibm.com/developerworks/java/library/j-seqalign/index.html&quot;&gt;IBM&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/3096645548567608087/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2012/03/tecniche-di-programmazione.html#comment-form' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/3096645548567608087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/3096645548567608087'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2012/03/tecniche-di-programmazione.html' title='Tecniche di Programmazione: Programmazione Dinamica'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12635476657694272810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIz9tQbEQ70znXcY1SX65Xp5r5Jik6sE8ofks5TD6a_TMCSNLiM_I9wuEm11SNGOH4sEh9yatTsFPguzqGYdpscalVY_KgE6Yqp3RGHi1ptq38RQWb4nI1-gZYzDiM2QP0yRrS4yGPCIM/s72-c/LCSTab4.gif" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-4872953378171364155</id><published>2012-03-04T04:31:00.000-08:00</published><updated>2012-03-04T04:45:24.984-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c++"/><category scheme="http://www.blogger.com/atom/ns#" term="C++11"/><category scheme="http://www.blogger.com/atom/ns#" term="nuovo standard ISO"/><title type='text'>C++11 il nuovo standard ISO C++</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9CeJukp5YdqQXbftWiC_lpzCac3jJ2dU6KtxDLukGzuXDbCopR9YBlhGIHQCRj6FGCIAkRnm8ItvPBkef9221WOEvzQ4QrWsb6msoCfoLgqIpZMEKwcW5gTtWy3x3v5PqES-CzqnKYLA/s1600/CODE____C___by_webblaster48.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9CeJukp5YdqQXbftWiC_lpzCac3jJ2dU6KtxDLukGzuXDbCopR9YBlhGIHQCRj6FGCIAkRnm8ItvPBkef9221WOEvzQ4QrWsb6msoCfoLgqIpZMEKwcW5gTtWy3x3v5PqES-CzqnKYLA/s200/CODE____C___by_webblaster48.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Il 12 Agosto 2011 è stato approvato il nuovo standard ISO C++, C++11 (C++0x). L&#39;autore del linguaggio, Bjarne Stroustrup, considera le novità introdotte molto più significative di quelle presenti nei precedenti standard.&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Le novità toccano sia il core del linguaggio che la libreria standard, vediamo schematicamente le novità introdotte:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
CORE:&lt;br /&gt;
-espressioni lambda&lt;br /&gt;
-auto e decltype&lt;br /&gt;
-nuova sintassi di inizializzazione degli oggetti&lt;br /&gt;
-costruttori delega&lt;br /&gt;
-funzioni di default e deleted&lt;br /&gt;
-nullptr&lt;br /&gt;
-riferimenti rvalue&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
Libreria Standard:&lt;br /&gt;
-nuovi algoritmi&lt;br /&gt;
-nuove classi contenitore&lt;br /&gt;
-operazioni atomiche&lt;br /&gt;
-type traits&lt;br /&gt;
-espressioni regolari&lt;br /&gt;
-nuovi smart pointers&lt;br /&gt;
-async()&lt;br /&gt;
-una libreria multithread&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Per una completa visione delle novità, con relativi esempi, vi rimando all&#39;ottimo sito&amp;nbsp;&lt;a href=&quot;http://programmazione.html.it/articoli/leggi/3950/le-novita-di-c11-c0x/&quot;&gt;HTML.it&lt;/a&gt;&amp;nbsp;.&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/4872953378171364155/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2012/03/c11-il-nuovo-standard-iso-c.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/4872953378171364155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/4872953378171364155'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2012/03/c11-il-nuovo-standard-iso-c.html' title='C++11 il nuovo standard ISO C++'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12635476657694272810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9CeJukp5YdqQXbftWiC_lpzCac3jJ2dU6KtxDLukGzuXDbCopR9YBlhGIHQCRj6FGCIAkRnm8ItvPBkef9221WOEvzQ4QrWsb6msoCfoLgqIpZMEKwcW5gTtWy3x3v5PqES-CzqnKYLA/s72-c/CODE____C___by_webblaster48.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-701275381367480172</id><published>2012-02-28T05:57:00.000-08:00</published><updated>2012-02-28T05:57:30.224-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="algoritmo"/><category scheme="http://www.blogger.com/atom/ns#" term="diagrammi"/><category scheme="http://www.blogger.com/atom/ns#" term="flusso"/><category scheme="http://www.blogger.com/atom/ns#" term="lucidchart"/><category scheme="http://www.blogger.com/atom/ns#" term="organizzazione"/><category scheme="http://www.blogger.com/atom/ns#" term="schema"/><title type='text'>Lucidchart, diagrammi di flusso per tutti</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYN61UKLOMfqVp81pzh7W35byBen5KgcGbCdtNq99T2xrXFo6utVC67NsBZ8I6DmVIo-kEHBshA04h11CKXeci6NFnvpR3MozU3Dvz3XB52_Ge1zAeWlvC1khuvGNGTJv6SbA-MzU5nw/s1600/lucidchart_logo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;112&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYN61UKLOMfqVp81pzh7W35byBen5KgcGbCdtNq99T2xrXFo6utVC67NsBZ8I6DmVIo-kEHBshA04h11CKXeci6NFnvpR3MozU3Dvz3XB52_Ge1zAeWlvC1khuvGNGTJv6SbA-MzU5nw/s400/lucidchart_logo.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
Lucidchart è un ottimo tool online per la creazione di diagrammi di flusso, di ogni tipo e con molte funzionalità, tra cui la condivisione, che sta prendendo sempre più piede in questo periodo.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
Come ho anticipato prima Lucidchart è un sito che offre un tool online di sviluppo di diagrammi di flusso, e mette a disposizione una miriade di forme e di strumenti.&lt;br /&gt;
Una delle funzionalità più interessanti è la condivisione, cioè dopo aver creato la mia &quot;mappa&quot; io potrei invitare altre persone per fargliela consultare e potrei anche dare il permesso di modificarla arrivando ad avere un vero e proprio tavolo di lavoro su cui più persone possono intervenire allo stesso momento.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4wfvBVkHRsIfDJuS99rS7vqL2xmpkONVoPkwamAe2FY12CAeiEQr4kIFT-DTEq5tn_MNeRBkLhtO5LiHUGtcpETC9YhxbPYSzhl9c7u2rmCE9kIq_FMJiGNFmc1ttPnNBZasqF51bWA/s1600/30729cab-3bcb-df11-8b73-0200d897d049_2_full.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;350&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4wfvBVkHRsIfDJuS99rS7vqL2xmpkONVoPkwamAe2FY12CAeiEQr4kIFT-DTEq5tn_MNeRBkLhtO5LiHUGtcpETC9YhxbPYSzhl9c7u2rmCE9kIq_FMJiGNFmc1ttPnNBZasqF51bWA/s640/30729cab-3bcb-df11-8b73-0200d897d049_2_full.png&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Però ci sono delle piccole limitazioni in quanto questo strumento è a pagamento, ma si può creare liberamente un account free, che permette di suo di accedere a moltissime forme, ma ha una limitazione sul numero, infatti questo tipo di account permette di creare al massimo 60 oggetti, che a mio parere non sono nemmeno pochi e non permette l&#39;utilizzo di alcuni simboli un pò più particolari.&lt;br /&gt;&lt;br /&gt;
Un&#39;altra nota positiva sta nel fatto che in teoria si potrebbe fare una richiesta al sito per avere un account professional gratis in quanto studenti, ma purtroppo per usufruire di questa promozione bisogna avere un account mail .edu, in alternativa un professore può mandare una richiesta, direttamente dal sito, in cui chiede delle licenze gratuite per tutto il suo corso e queste avranno durata di un anno.&lt;br /&gt;&lt;br /&gt;Il link per accedere è questo&amp;nbsp;&lt;a href=&quot;http://bit.ly/zbSwTJ&quot;&gt;Lucidchart&lt;/a&gt;&lt;br /&gt;Basta una registrazione veloce e la tavola di lavoro sarà subito pronta per essere usata.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/701275381367480172/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2012/02/lucidchart-diagrammi-di-flusso-per.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/701275381367480172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/701275381367480172'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2012/02/lucidchart-diagrammi-di-flusso-per.html' title='Lucidchart, diagrammi di flusso per tutti'/><author><name>Sera</name><uri>http://www.blogger.com/profile/13989439636367415717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='22' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaWe3kZvErFzD0eigdV9Xpc3rDFOeEKkgxxj-1al5AGqrIZkrLat31AN_SzpJcNLDzH5sqt678DZLYkjKfm7mR8yQNeh5K29RvyfqZ3St6YaksA1TXhLM6SEXzOd095g/s220/Excellent-frog.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYN61UKLOMfqVp81pzh7W35byBen5KgcGbCdtNq99T2xrXFo6utVC67NsBZ8I6DmVIo-kEHBshA04h11CKXeci6NFnvpR3MozU3Dvz3XB52_Ge1zAeWlvC1khuvGNGTJv6SbA-MzU5nw/s72-c/lucidchart_logo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-8226045377377211220</id><published>2012-02-08T13:26:00.000-08:00</published><updated>2012-02-09T04:27:25.240-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".ico"/><category scheme="http://www.blogger.com/atom/ns#" term=".png"/><category scheme="http://www.blogger.com/atom/ns#" term="cambiare"/><category scheme="http://www.blogger.com/atom/ns#" term="icone"/><category scheme="http://www.blogger.com/atom/ns#" term="nerd"/><category scheme="http://www.blogger.com/atom/ns#" term="photoshop"/><category scheme="http://www.blogger.com/atom/ns#" term="ToyCon"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Il Windows delle mie brame 2 - Le icone</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjylm1SjwXRCmo5ej9wRxHvJAv9eJS9_6tIzUWnpNxEy5EGQ2YL4JPWfNNuB-vDKe5FVASqW4C4AUXrG51_E4LWyZBWqjckR8np6D5fdvC-OSIZhjg8Z1FdKHxqiyOF7Oprid4QJ6r9qcQ/s1600/img-launchers-toycon-lefreut-1207.png&quot; style=&quot;font-family: Georgia, serif; font-size: 100%; font-weight: normal;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5706908141471508210&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjylm1SjwXRCmo5ej9wRxHvJAv9eJS9_6tIzUWnpNxEy5EGQ2YL4JPWfNNuB-vDKe5FVASqW4C4AUXrG51_E4LWyZBWqjckR8np6D5fdvC-OSIZhjg8Z1FdKHxqiyOF7Oprid4QJ6r9qcQ/s200/img-launchers-toycon-lefreut-1207.png&quot; style=&quot;cursor: hand; cursor: pointer; display: block; height: 150px; margin: 0px auto 10px; text-align: center; width: 200px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-weight: normal;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-weight: normal; text-align: justify;&quot;&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Georgia, serif; font-size: 100%; font-weight: normal;&quot;&gt;Con il&lt;a href=&quot;http://saloonsoft.blogspot.com/2012/02/il-windows-delle-mie-brame-1-i-temi.html&quot;&gt; Windows delle mie brame parte &lt;/a&gt;1 abbiamo visto brevemente come migliorare in modo sostanzioso l&#39;aspetto della nostra scrivania grazie ai temi della comunità. In questo secondo post di una guida per puri narcisisti vedremo invece come  personalizzare le singole icone del nostro Windows.&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, serif; font-size: 100%; font-weight: normal;&quot;&gt;&amp;nbsp;Questa guida ha scopi decisamente modesti ma malgrado le basse aspettative dovremo avvalerci dell&#39;aiuto di due software: l&#39;ormai famosissimo Photoshop {o un qualsiasi programma di grafica ai suoi livelli} e il piccolo ToyCon {qui il &lt;a href=&quot;http://toycon.softonic.it/&quot;&gt;link&lt;/a&gt; per scaricare questo tool decisamente minuto}. Una volta che avete tutto il necessario non rimane che iniziare.&lt;br /&gt;Per prima cosa, decidete quale icona volete modificare e reperite il file immagine nella cartella del programma&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-weight: normal;&quot;&gt;
&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: 100%; text-align: left;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-weight: normal;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;225&quot; id=&quot;BLOGGER_PHOTO_ID_5706888799657134530&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYEX1CkmYxipjo1YtUJx8E5Lo6dA15dAAr37PP1A-32leaangw77MMAhjbQqRdTlWkaOWvk_Gr4t6VI-vVWmxHyJJ0KS3DlYKb4UxUqmld8t-MSkWeDMPK-0gqVxUseKDG0kQS6ISm198/s400/Immagine1.jpg&quot; style=&quot;display: block; font-family: Georgia, serif; font-size: 16px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center;&quot; width=&quot;400&quot; /&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, serif; font-size: 100%; text-align: left;&quot;&gt;{un piccolo consiglio spesso le icone essendo già pronte pe&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, serif; font-size: 100%; text-align: left;&quot;&gt;r essere usate  non sono un ottimo materiale per una sessione di Photoshop... per questo motivo vi consiglio caldamente di trovare un buon sostituto su&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, serif; font-size: 100%; text-align: left;&quot;&gt;l web. Solitamente basta cercare il nome del programma sc&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, serif; font-size: 100%; text-align: left;&quot;&gt;elto su google e non preoccupatevi se ha uno sfondo, a fine guida av&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, serif; font-size: 100%; text-align: left;&quot;&gt;remo eliminato anche quello} quindi apritela con il vostro programma di grafica.&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, serif; font-size: 100%; text-align: left;&quot;&gt; Ora lo strumento che ci aiuterà è il lazo &lt;/span&gt;&lt;span style=&quot;font-family: Georgia, serif; font-size: 100%; text-align: left;&quot;&gt;magnet&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, serif; font-size: 100%; text-align: left;&quot;&gt;ico questo perché l&#39;occhio della mia icona non è a tinta unita, in caso contrario avrei potuto usare il tool bacchetta magica, pazienza occasione in più per impratichirsi. C&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, serif; font-size: 100%; text-align: left;&quot;&gt;ome si può ve&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-weight: normal;&quot;&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;&quot;&gt;
dere dallo sfondo a scacchi la mia icona è priva di sfondo{questo è il vantagg&lt;span style=&quot;font-size: 100%;&quot;&gt;io di prenderle direttamente dalla cartella del programma}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Georgia, serif; font-size: 16px; font-weight: normal;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; text-align: center;&quot;&gt;
&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;225&quot; id=&quot;BLOGGER_PHOTO_ID_5706893066625783106&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg-p_9ut-1xXVndXMH9OLjFJsE3MwW8s1kUkRD1RbDEwPgkab1vDMUIBVvgLf6fObWMgSjt6_qvgYGZWVqKXck2XDsd5S0BSFR9wzV1js-eG4OdceV6AxUmPtfzF7RqDqDGk1pN5Tlq1M/s400/Immagine3.jpg&quot; style=&quot;display: block; font-family: Georgia, serif; font-size: 16px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px;&quot; width=&quot;400&quot; /&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;Facendo molta attenzione selezionate la parte che volete modificare {più la selezione è precisa più il risultato sarà apprezzabile!}.Per icone più complesse potete benissimo avanzare per piccole porzioni ma ricordate bene ogni valore che assegnerete alla nuova tona&lt;/span&gt;&lt;span style=&quot;text-align: left;&quot;&gt;lità cosi da non avere discrepanze nel colore. Ed eccola qui la nostra porzio&lt;/span&gt;&lt;span style=&quot;text-align: left;&quot;&gt;ne selezionata{non badate troppo alla sbavatura me ne sono accorto in un secondo momento ed è stata subito corretta!}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Georgia, serif; font-size: 16px; font-weight: normal;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; font-weight: normal; text-align: center;&quot;&gt;
&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;225&quot; id=&quot;BLOGGER_PHOTO_ID_5706894932290195970&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyKLLDnGpMZPd4BmIp4qZEktsx_GWNEAqdW4hHCnR0qL3Jy6YPSHK9Uz0Oz9tc5mp_kLk7gPexjkHc143cIK0a7HtTKep1bJtBu6Y6mQ5NQQ0bvH5uXIgmf-ikRbNgYI8YehrTMgvd918/s400/Immagine4.jpg&quot; style=&quot;display: block; font-family: Georgia, serif; font-size: 16px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px;&quot; width=&quot;400&quot; /&gt;&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Ora clicchiamo sulla voce Immagini e scorrete su regolazioni, quindi cliccate sulla penultima voce: Sostituisci colore &lt;/div&gt;
&lt;div style=&quot;font-family: Georgia, serif; font-size: 16px; font-weight: normal;&quot;&gt;
&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;225&quot; id=&quot;BLOGGER_PHOTO_ID_5706897547468789138&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5h4Zl1csEwS7w884KNOU4Tr-xOPeOVxHpoaCbexfWfzOOj8yme-CG_745NhqIIfYbP-YoIgekGH47k1fPGTde2ZZUoA3CBJdGSpnFP3hWUsJhTNQ032ykbU8bcSDQaMjZgs8JwuFz6gA/s400/Immagine5.jpg&quot; style=&quot;display: block; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center;&quot; width=&quot;400&quot; /&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; text-align: center;&quot;&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Georgia, serif; font-size: 16px; font-weight: normal; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Georgia, serif; font-size: 16px; font-weight: normal;&quot;&gt;
Ormai il più è fatto, con il primo dei tre contagocce che vi ritroverete nella schermata selezionate l&#39;area da modificare che immediatamente verrà imbiancata nell&#39;anteprima, usate gli altri due strumenti per aggiungere{il contagocce con il +}  e rimuovere{il contagocce con il -} aree alla prima in fine regolate il tutto modificando il valore di tolleranza fino a selezionare tutta l&#39;area interessata.A questo punto non rimane che modificare i valori di tonalità saturazione e luminosità fino a che non troverete la tinta che più vi aggrada{come si vede dalla prima immagine io ho una predilezione per il verde acceso}&lt;/div&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; text-align: left;&quot;&gt;
&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;225&quot; id=&quot;BLOGGER_PHOTO_ID_5706899787541746306&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2BBiLC2Ycn-QDHNdYx-maH13ekar3qglkm1wowQSWAO5MWiH_XZn5kXl5YsihA8BdkfkPHDAdYsaTWN-Pr3vD3FtoTzrx8sOOd8T-UJOKAFnFxYSL82YMmfPfOTRL-JR7tUNeTbCiwg8/s400/Immagine6.jpg&quot; style=&quot;display: block; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center;&quot; width=&quot;400&quot; /&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Georgia, serif; font-size: 16px;&quot;&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Non rimane che confermare con il tasto ok deselezionare l&#39;immagine e salvare il tutto con l&#39;estensione .png in una qualsiasi cartella. Vediamo ora come far funzionare il piccolo ToyCon., una volta spacchettato salvato ed avviato {è un semplice eseguibile, niente noiose installazioni!} dobbiamo solo preoccuparci di trascinare l&#39;immagine dell&#39;icona appena salvata nel piccolo box come nell&#39;immgine&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; text-align: left;&quot;&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-size: 100%; font-weight: normal;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Georgia, serif;&quot;&gt;
&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;225&quot; id=&quot;BLOGGER_PHOTO_ID_5706902978026559922&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ0orkNPRvzD7maqwAitDxC6D7A7wDX-iOkSSP5K9dJZp3zLXAWbBN_4iaNdcvPlC7tEjmDLYjT2g-cP0d_fEiTeS7AH6akZPJRC7vtw9Yb31K17x6LJOzoC95vR5F5W4zuIZq8myjg0k/s400/Immagine7.jpg&quot; style=&quot;display: block; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center;&quot; width=&quot;400&quot; /&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Georgia, serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
il programma si preoccuperà di fare il resto, una volta trascinato il file nella cartella in cui risiede troverete un file con lo stesso nome ma finalmente con l&#39;estensione che cerchiamo: l&#39;estensione di tipo icona! Quindi torniamo sul desktop, tasto destro sul l&#39;icona da modificare, clicchiamo su proprietà e dopo aver cliccato su cambia icona non rimane altro che cercare tramite il menù sfoglia l&#39;icona precedentemente modificata.&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Georgia, serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Georgia, serif;&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;225&quot; id=&quot;BLOGGER_PHOTO_ID_5706905413472126642&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9-1Mp8-Hac_WypQXXFMrVgBMP8gpV1B3ba0ogRvCv9Zy9Wq8mL4SLlmLBwAC2MYa-yvq0SCICwMJPf409Ds3OGX9xmibjXB2UL7jujlqe5iZ-b68JsOfYK52trPdvTA4FisCDTRKxP88/s400/Immagine8.jpg&quot; style=&quot;display: block; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px;&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Georgia, serif; font-size: 100%; font-weight: normal;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/8226045377377211220/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2012/02/il-windows-delle-mie-brame-2-le-icone.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/8226045377377211220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/8226045377377211220'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2012/02/il-windows-delle-mie-brame-2-le-icone.html' title='Il Windows delle mie brame 2 - Le icone'/><author><name>Detlef</name><uri>http://www.blogger.com/profile/07933883355604693754</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjylm1SjwXRCmo5ej9wRxHvJAv9eJS9_6tIzUWnpNxEy5EGQ2YL4JPWfNNuB-vDKe5FVASqW4C4AUXrG51_E4LWyZBWqjckR8np6D5fdvC-OSIZhjg8Z1FdKHxqiyOF7Oprid4QJ6r9qcQ/s72-c/img-launchers-toycon-lefreut-1207.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-8418673792689919212</id><published>2012-02-08T13:13:00.000-08:00</published><updated>2012-02-08T13:13:00.298-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dark"/><category scheme="http://www.blogger.com/atom/ns#" term="editor"/><category scheme="http://www.blogger.com/atom/ns#" term="enegetico"/><category scheme="http://www.blogger.com/atom/ns#" term="gedit"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="mac"/><category scheme="http://www.blogger.com/atom/ns#" term="multiselezione."/><category scheme="http://www.blogger.com/atom/ns#" term="risparmio"/><category scheme="http://www.blogger.com/atom/ns#" term="sublime"/><category scheme="http://www.blogger.com/atom/ns#" term="testo"/><category scheme="http://www.blogger.com/atom/ns#" term="text"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Sublime Text 2 ... L&#39;evoluzione di Gedit</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqIWqItfkR1ZtAi7E6AlqGYD-AlvQDhyphenhyphenpJcjzkuHV7Maqqvbrv3xpppGbIuXFKLvCjA_PpPtzhFX_gPm2nlb76eXbYEZE-Q6q8fC092Fz7xK10r8yTjNiDgU3iFinh87jBuF7_vf7oNg/s320/st2.png&quot; width=&quot;320&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
Se anche tu non puoi fare a meno di programmare con Gedit ma vorresti che in quella semplice schermata bianca ci sia giusto quel qualcosa in più che potrebbe rendere il tuo lavoro più leggero, Sublime text 2 è il sofware giusto per le tue esigenze.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
Sublime Text 2 è un editor di testo, che può sembrare un semplice editor ma non lo è. Tutto quello che manca a Gedit lui lo ha.&lt;br /&gt;
Dotato di un&#39;interfaccia asciutta e dark, questo programma rende più piacevole il lavoro, in quanto non affatica molto la vista ed è dotato di piccole migliorie che lo rendono un programma assolutamente da avere per chi è abituato a programmare in questa maniera.&lt;br /&gt;
Comnciando dalla panoramica laterale, questa è molto utile per trovare, alla buona ,parti di codice che altrimenti sarebbero nascoste chissà in quale riga.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtfcz6oRwuJN8U0UxkZAgp9FyOP1Dc-mcRLjORJNSfOBsCl98NQGfRaZsLfmZkEJG18Y3eX47s4ZcgVOVilghG5WIKkAn7d1JgEtpK9R4UPnNWmejMbsMAc7B-OXQXSC31QMl23db-uA/s1600/sublime-indy-merbivore.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtfcz6oRwuJN8U0UxkZAgp9FyOP1Dc-mcRLjORJNSfOBsCl98NQGfRaZsLfmZkEJG18Y3eX47s4ZcgVOVilghG5WIKkAn7d1JgEtpK9R4UPnNWmejMbsMAc7B-OXQXSC31QMl23db-uA/s640/sublime-indy-merbivore.jpg&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Un&#39;altra caratteristica interessante è quella di poter avere più colonne o più righe o tutte e due in cui poter aprire i nostri file e quindi poter avere magari su una colonna il nostro file .ccp e nell&#39;altra il corpo dell&#39;header cioè il .h ,o semplicemente avere due esercizi contemporaneamente aperti per prendere spunto.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLH_UjbPw7hZnV0xRNfcE2T9nUklwKxMNDBQDbiOn02QVkbKY7vv9U-wa3MsppiRZzVDl1FEfyyAtAjvpVVDAzcnbR3yjUT6-ZVqc474fPrgmxGZmEkvNe8iJ17N43UgEVo_7tM2vkXA/s1600/sublimetext2-alpha.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLH_UjbPw7hZnV0xRNfcE2T9nUklwKxMNDBQDbiOn02QVkbKY7vv9U-wa3MsppiRZzVDl1FEfyyAtAjvpVVDAzcnbR3yjUT6-ZVqc474fPrgmxGZmEkvNe8iJ17N43UgEVo_7tM2vkXA/s640/sublimetext2-alpha.png&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Ovviamente sono molti i punti a favore di questo programma, ma una cosa molto interessante è che lo si può trovare per tutte le piattaforme più importanti e quindi sia per Linux,Windows e Mac a questo indirizzo: &lt;a href=&quot;http://www.sublimetext.com/2&quot;&gt;www.sublimetext.com/2&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Qui sotto un piccolo video che mostra la multiselezione, e cioè selezionare più parti del file e cambiarle tutte in una volta:&lt;br /&gt;
&lt;div class=&quot;tutorial_image&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;iframe frameborder=&quot;0&quot; height=&quot;391&quot; scrolling=&quot;no&quot; src=&quot;http://www.screencast-o-matic.com/embed?sc=cXj0Fr3TV&quot; width=&quot;322&quot;&gt;&amp;amp;amp;lt;p&amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;amp;amp;amp;gt;
&amp;amp;amp;amp;amp;amp;amp;lt;/p&amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;lt;/p&amp;amp;amp;gt;&lt;/iframe&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/8418673792689919212/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2012/02/sublime-text-2-levoluzione-di-gedit.html#comment-form' title='4 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/8418673792689919212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/8418673792689919212'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2012/02/sublime-text-2-levoluzione-di-gedit.html' title='Sublime Text 2 ... L&#39;evoluzione di Gedit'/><author><name>Sera</name><uri>http://www.blogger.com/profile/13989439636367415717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='22' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaWe3kZvErFzD0eigdV9Xpc3rDFOeEKkgxxj-1al5AGqrIZkrLat31AN_SzpJcNLDzH5sqt678DZLYkjKfm7mR8yQNeh5K29RvyfqZ3St6YaksA1TXhLM6SEXzOd095g/s220/Excellent-frog.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqIWqItfkR1ZtAi7E6AlqGYD-AlvQDhyphenhyphenpJcjzkuHV7Maqqvbrv3xpppGbIuXFKLvCjA_PpPtzhFX_gPm2nlb76eXbYEZE-Q6q8fC092Fz7xK10r8yTjNiDgU3iFinh87jBuF7_vf7oNg/s72-c/st2.png" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-4571254264991072155</id><published>2012-02-05T02:58:00.000-08:00</published><updated>2012-02-09T03:16:09.425-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="7"/><category scheme="http://www.blogger.com/atom/ns#" term="aspetto"/><category scheme="http://www.blogger.com/atom/ns#" term="font"/><category scheme="http://www.blogger.com/atom/ns#" term="nerd"/><category scheme="http://www.blogger.com/atom/ns#" term="personalizzazione"/><category scheme="http://www.blogger.com/atom/ns#" term="Seven"/><category scheme="http://www.blogger.com/atom/ns#" term="temi"/><category scheme="http://www.blogger.com/atom/ns#" term="Uxstyle Core"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Il Windows delle mie brame 1 - I temi</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixQEitM4aqYivvxipCxu2GK2lZJdVoBx_vRqiGqAgo3zXo1gfLzX6MTcXoaFJNiQrtPxL3UBxu-afU3MpWHU3b3aDjKLO6WPwgbQmV9Of4omjWAdaGKcOesAColDhTuPjPo7cZETzna_A/s1600/windows_7_themes_6.png&quot; style=&quot;font-family: Georgia, serif;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5705613866194513858&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixQEitM4aqYivvxipCxu2GK2lZJdVoBx_vRqiGqAgo3zXo1gfLzX6MTcXoaFJNiQrtPxL3UBxu-afU3MpWHU3b3aDjKLO6WPwgbQmV9Of4omjWAdaGKcOesAColDhTuPjPo7cZETzna_A/s200/windows_7_themes_6.png&quot; style=&quot;cursor: hand; cursor: pointer; display: block; height: 148px; margin: 0px auto 10px; text-align: center; width: 200px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;Quando si passano ore davanti un monitor è opinione generale che rendere confortevole e soprattutto piacevole alla vista ciò che ci circonda può incrementare la concentrazione e rendere il lavoro meno stressante.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 100%; font-weight: normal; line-height: normal;&quot;&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 100%; font-weight: normal; line-height: normal;&quot;&gt;
Bhe non essendo un designer d&#39;interni o un esperto di taichi non posso darvi una mano su come arredare la vostra stanza di lavoro ma per quanto riguarda la scrivania del vostro Windows qualcosina si può fare:&lt;/div&gt;
&lt;div style=&quot;font-size: 100%; font-weight: normal; line-height: normal;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 100%; font-weight: normal; line-height: normal;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 100%; font-weight: normal; line-height: normal;&quot;&gt;
Parte 1: I temi &lt;/div&gt;
&lt;div style=&quot;font-size: 100%; font-weight: normal; line-height: normal;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 100%; font-weight: normal; line-height: normal;&quot;&gt;
Partiamo dal basso, chi ha detto che le cose semplici non sono efficaci? Che frase poco pensata, infatti basta davvero poco per rendere il vostro pc più accattivante una di queste idee sono appunto i temi. &lt;/div&gt;
&lt;div style=&quot;font-size: 100%; font-weight: normal; line-height: normal;&quot;&gt;
La comunità di Seven ha creato una miriade di temi per tutti i gusti ma se non si sa come agire il semplice file &quot;Theme pack per Windows&quot; diventa utile quanto un soprammobile di pessimo gusto.&lt;/div&gt;
&lt;div style=&quot;font-size: 100%; font-weight: normal; line-height: normal;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 100%; font-weight: normal; line-height: normal;&quot;&gt;
La prima fonte di temi che vi propongo è proprio il sito di Microsoft che offre una vasta gamma di temi ufficiali: &lt;span style=&quot;font-size: 100%;&quot;&gt;:&lt;/span&gt;&lt;a href=&quot;http://windows.microsoft.com/it-IT/windows/downloads/personalize/themes&quot; style=&quot;font-size: 100%;&quot;&gt;http://windows.microsoft.com/it-IT/windows/downloads/personalize/themes&lt;/a&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 100%; font-weight: normal; line-height: normal;&quot;&gt;
tutti i file scaricati non vanno registrati e per applicarli basta semplicemente cliccarli una volta terminato il download.&lt;/div&gt;
&lt;div style=&quot;font-size: 100%; font-weight: normal; line-height: normal;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 100%; font-weight: normal; line-height: normal;&quot;&gt;
Ma cosa succede se un tema scaricato da una comunità di artisti{vedi &lt;a href=&quot;http://www.deviantart.com/&quot;&gt;DeviantArt&lt;/a&gt; e siti simili} non è riconosciuto automaticamente da Windows? &lt;/div&gt;
&lt;div style=&quot;font-size: 100%; line-height: normal;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;Nessun problema, come spesso succede la comunità ha risolto anche questo piccolo intoppo: si ricorre ad una patch che permette la registrazione di temi creati da terze parti il cui nome è &lt;/span&gt;&lt;b&gt;Uxstyle Core&lt;/b&gt; {qui c&#39;è il link softonic per chi volesse scaricarla &lt;a href=&quot;http://uxstyle-core.softonic.it/&quot; style=&quot;font-weight: normal;&quot;&gt;cliccami!&lt;/a&gt;}.&lt;/div&gt;
&lt;div style=&quot;font-size: 100%; font-weight: normal; line-height: normal;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;Una volta eseguita la patch possiamo comodamente scaricare i nostri temi e installarli, dopo aver spacchettato il tema l&#39;unica operazione che dobbiamo eseguire è spostare il file o i file .theme nella cartella &lt;b&gt;C:\Windows\Resources\Themes&lt;/b&gt;. Una volta spostato nella giusta cartella basterà un click con il tasto destro su un punto vuoto della scrivania e dopo aver selezionato personalizza basterà scegliere il tema installato dalla lista che Windows ci propone, semplice vero? &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal; text-align: -webkit-auto;&quot;&gt;
Tuttavia molti artisti rilasciano anche degli stili di scrittura {i classici fonts} che se non presenti di base nel nostro pc vanno aggiunti manualmente, nulla di più facile! &lt;/div&gt;
&lt;div style=&quot;font-weight: normal; text-align: -webkit-auto;&quot;&gt;
Basta entrare nel pannello di controllo cliccare sulla voce Aspetto e Personalizzazione e quindi su caratteri, fatto questo rimane solo una cosa da fare: trascinare l&#39;eventuale file .tff del tema nella finestra. &lt;/div&gt;
&lt;div style=&quot;font-weight: normal; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: normal; text-align: -webkit-auto;&quot;&gt;
E dopo questo &quot;duro&quot; lavoro potete comodamente godervi la vostra nuova veste grafica.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/4571254264991072155/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2012/02/il-windows-delle-mie-brame-1-i-temi.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/4571254264991072155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/4571254264991072155'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2012/02/il-windows-delle-mie-brame-1-i-temi.html' title='Il Windows delle mie brame 1 - I temi'/><author><name>Detlef</name><uri>http://www.blogger.com/profile/07933883355604693754</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixQEitM4aqYivvxipCxu2GK2lZJdVoBx_vRqiGqAgo3zXo1gfLzX6MTcXoaFJNiQrtPxL3UBxu-afU3MpWHU3b3aDjKLO6WPwgbQmV9Of4omjWAdaGKcOesAColDhTuPjPo7cZETzna_A/s72-c/windows_7_themes_6.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-7075591103736509741</id><published>2012-01-29T04:13:00.000-08:00</published><updated>2012-01-29T06:11:50.535-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="7"/><category scheme="http://www.blogger.com/atom/ns#" term="dll"/><category scheme="http://www.blogger.com/atom/ns#" term="nerd"/><category scheme="http://www.blogger.com/atom/ns#" term="registrazione"/><category scheme="http://www.blogger.com/atom/ns#" term="Seven"/><category scheme="http://www.blogger.com/atom/ns#" term="Vista"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><category scheme="http://www.blogger.com/atom/ns#" term="Xp"/><title type='text'>Come registrare una DLL</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrhMW_cdi5hFWTp0-fSwlM-Q0sa8I0RhvaedJe7Jb3TRJHzQYwnVhS7OGqmSCO1cfpAJaR4-BxAM4HPLDlUj_p1y8ScuPdk3iWvfbuPDXajE4qv19uTWEMO0MCE4CVAIqfl3P-Lwmg-ec/s1600/dll_iconoo.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrhMW_cdi5hFWTp0-fSwlM-Q0sa8I0RhvaedJe7Jb3TRJHzQYwnVhS7OGqmSCO1cfpAJaR4-BxAM4HPLDlUj_p1y8ScuPdk3iWvfbuPDXajE4qv19uTWEMO0MCE4CVAIqfl3P-Lwmg-ec/s200/dll_iconoo.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Almeno una volta per quasi tutti i Windows User si sono ritrovati ad armeggiare con questi strani ma essenziali file di sistema, sto parlando delle ormai famosissime DLL. Certo aprire uno di questi file  e magari modificarne il contenuto non ha mai portato nulla di buono allo sfortunato utente tuttavia imparare come e dove registrarle è una conoscenza di cui non si può fare a meno.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In sistemi datati come XP e Vista registrare queste librerie dinamiche era decisamente facile, bastava ricorrere infatti ai semplici comandi &lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Start, Esegui&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
e successivamente scrivere nella finestra di comando la stringa:&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Regsvr32&quot;C:\Windows\System32\nomedll.dll&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Poter dire lo stesso sull&#39;ultimo prodotto di casa Microsoft non è cosi semplice invece, in ambiente seven la registrazione di una Dll è ormai una di quelle operazioni soggette a richiesta di autorizzazione quindi la lista di comandi necessari si allunga un pò:&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Start, Accessori, Tasto destro su Prompt dei comandi&lt;/b&gt; e selezioniamo &lt;b&gt;Esegui come admin . &lt;/b&gt;Dopo che sarà comparso l&#39;ormai quasi sconosciuto terminale registriamo la Dll:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
per sistemi a 32bit &lt;b&gt;Regsvr32&quot;C:\Windows\System32\nomedll.dl&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
per sistemi a 64bit &lt;b&gt;Cd\Windows\Syswow64&lt;/b&gt; successivamente ricorriamo al comando registra&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;b&gt;                                  Regsvr32 C:\&lt;/b&gt;&lt;span style=&quot;text-align: left;&quot;&gt;&lt;b&gt;nomedll.dll &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;b style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;In tutti i casi elencati è fortemente consigliato di riavviare il sistema.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/7075591103736509741/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2012/01/come-registrare-una-dll.html#comment-form' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/7075591103736509741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/7075591103736509741'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2012/01/come-registrare-una-dll.html' title='Come registrare una DLL'/><author><name>Detlef</name><uri>http://www.blogger.com/profile/07933883355604693754</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrhMW_cdi5hFWTp0-fSwlM-Q0sa8I0RhvaedJe7Jb3TRJHzQYwnVhS7OGqmSCO1cfpAJaR4-BxAM4HPLDlUj_p1y8ScuPdk3iWvfbuPDXajE4qv19uTWEMO0MCE4CVAIqfl3P-Lwmg-ec/s72-c/dll_iconoo.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-6664154109280044659</id><published>2012-01-18T12:27:00.000-08:00</published><updated>2012-01-18T12:31:57.836-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Informazione"/><category scheme="http://www.blogger.com/atom/ns#" term="PIPA"/><category scheme="http://www.blogger.com/atom/ns#" term="Pirateria"/><category scheme="http://www.blogger.com/atom/ns#" term="SOPA"/><title type='text'>End Piracy Not Liberty - contro PIPA e SOPA</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR73Am-wEDc7ZQzWUU_EH_e-i6iSY58VEXAfsYELs6IAJrBuV86hULrcLX1INkaalhTk3om_G7hmDzOWlzeQVqBhWzByvTkNKgLaOVZ14JLzUiv2l001U23RSd-BKzSo8_FXnst6P2Ij8/s1600/takeaction-500x307.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR73Am-wEDc7ZQzWUU_EH_e-i6iSY58VEXAfsYELs6IAJrBuV86hULrcLX1INkaalhTk3om_G7hmDzOWlzeQVqBhWzByvTkNKgLaOVZ14JLzUiv2l001U23RSd-BKzSo8_FXnst6P2Ij8/s320/takeaction-500x307.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
PIPA e SOPA,&lt;br /&gt;
Due acronimi che stanno per &quot;Stop Online Piracy Act&quot; e &quot;Protect Intellectual Property Act&quot;, nomi che &amp;nbsp;sembrano far sperare a qualcosa di buono. Sembrano.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Ma andiamo con ordine: come recita Wikipedia Italia, il 26 Ottobre 2011 è stata proposta alla camera dei rappresentanti degli Stati Uniti d&#39;America una legge chiamata proprio Stop Online Piracy Act e, parallelamente, giorno 24 Gennaio 2012 è prevista la discussione sulla Protect IP Act, una seconda legge. Queste leggi hanno come argomento i diritti d&#39;autore sul web, avendo come obiettivo lo smantellamento della pirateria informatica e le violazioni del diritto d&#39;autore introducendo sanzioni a chi non le dovesse seguire. Tali norme, però, sono state considerate nocive per la libertà sul web, uno dei punti di forza di colossi quali Wikipedia, Creative Commons e i blog in generale (quindi &amp;nbsp;piattaforme come WordPress/Blogger ecc). L&#39;iniziativa parte con una ideologia che dovrebbe essere corretta quella, cioè, di distruggere la pirateria informatica e in generale la gente che danneggia sul web materiale altrui, ma praticamente potrebbe sfociare nel danneggiamento di qualunque cosa violasse un diritto d&#39;autore o qualunque contenuto ritenuto inadatto. Che sia Google, Yahoo o il nostro blog, se i materiali veicolati sono protetti da copyright, si è a rischio. Pensate a Youtube e ai numerosi servizi usati quotidianamente, soprattutto a gente che ha passato degli anni a cercare di creare una sorta di sapere &quot;universale&quot;, utile alla comunità qual&#39;è il progetto che si è reso tangibile con Wikipedia.&lt;br /&gt;
Siamo sicuri che è una lotta alla pirateria e non un altro modo per controllare l&#39;informazione? Siamo sicuri che questa iniziativa non degenererà in qualcosa come il regime Cinese che controlla (anche) l&#39;informazione sul web? O è come dice Massimo Gaggi&amp;nbsp;(&lt;a href=&quot;http://www.corriere.it/cronache/12_gennaio_18/gaggi-america-serrata-wikipedia_8adb44f0-41b3-11e1-9408-1d8705f8e70e.shtml&quot;&gt;corriere.it&lt;/a&gt;):&lt;br /&gt;
&quot;Il braccio di ferro sulla protezione del copyright è, insomma, diventato una guerra a tutto campo tra Hollywood e la Silicon Valley[...]&quot;?&lt;br /&gt;
&lt;br /&gt;
Ho riportato solo una sintesi di tutto questo fenomeno, ma vi invito a documentarvi ulteriormente sui siti in fondo a questo articolo.&lt;br /&gt;
Io non sono uno scrittore e neanche un blogger accanito, amo solamente l&#39;informatica e tutto ciò che la riguarda, ma sento che, se le ripercussioni saranno simili a quanto detto e a quanto si può trovare in rete, questo passo cambierà il web. E, se pensiamo alla miriade di programmi TV, giornali e quant&#39;altro che fanno tutto tranne essere imparziali, penso che il web sia una delle poche cose rimaste pure e libere. Personalmente mi associo con Google e con lo slogan della sua raccolta firme:&lt;br /&gt;
End Piracy, Not Liberty.&lt;br /&gt;
&lt;br /&gt;
Ecco un paio di link utili:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://www.google.com/landing/takeaction/&quot; target=&quot;_blank&quot;&gt;Raccolta firme Google contro le leggi PIPA e SOPA&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://it.wikipedia.org/wiki/Wikipedia:Comunicato_del_18_gennaio_2012&quot; target=&quot;_blank&quot;&gt;Wikipedia PIPA e SOPA in dettaglio [ita]&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.1stwebdesigner.com/design/how-sopa-pipa-can-affect-you/&quot;&gt;Come SOPA/PIPA possono cambiare la nostra vita quotidiana (sul web) [eng]&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/6664154109280044659/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2012/01/end-piracy-not-liberty-contro-pipa-e.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/6664154109280044659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/6664154109280044659'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2012/01/end-piracy-not-liberty-contro-pipa-e.html' title='End Piracy Not Liberty - contro PIPA e SOPA'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12635476657694272810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR73Am-wEDc7ZQzWUU_EH_e-i6iSY58VEXAfsYELs6IAJrBuV86hULrcLX1INkaalhTk3om_G7hmDzOWlzeQVqBhWzByvTkNKgLaOVZ14JLzUiv2l001U23RSd-BKzSo8_FXnst6P2Ij8/s72-c/takeaction-500x307.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-309078638503776056</id><published>2012-01-04T08:00:00.001-08:00</published><updated>2012-01-04T08:51:33.760-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dual channel"/><category scheme="http://www.blogger.com/atom/ns#" term="nerd"/><category scheme="http://www.blogger.com/atom/ns#" term="ram"/><title type='text'>Il Sistema Dual-Channel...questo sconosciuto</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ7zESroOFNwgx2kqpE-EhOImVF0KmpmF1wpWJ7PhnbGIyWEKEuYOH2D_egTU70p3EYLarwxlKBXfW0iFUgxdfVSZT54nxMICLnjelmKJcOR-AuWpMbCIw9tW7ryjcNlNCCThFPGsQVyY/s1600/20110208170938_dual-channel.gif&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5693816939083414866&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ7zESroOFNwgx2kqpE-EhOImVF0KmpmF1wpWJ7PhnbGIyWEKEuYOH2D_egTU70p3EYLarwxlKBXfW0iFUgxdfVSZT54nxMICLnjelmKJcOR-AuWpMbCIw9tW7ryjcNlNCCThFPGsQVyY/s320/20110208170938_dual-channel.gif&quot; style=&quot;cursor: hand; cursor: pointer; display: block; height: 240px; margin: 0px auto 10px; text-align: center; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Vi è mai capitato di leggere la scheda tecnica di un pc ,che magari siete interessati ad acquistare, senza riuscire a dare un senso a tutte quelle sigle e numeri che la seguono?  Senza contare quella stranissima parola che ormai affligge la maggioranza dei pc in commercio...Dual Channel... vediamo di capire e di conoscere almeno per grandi linee il vantaggio di questa &quot;nuova&quot; {ormai esiste da un pochetto} caratteristica!&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Per capire come funziona il canale RAM in Dual Channel è necessario capire come funzioni un normalissimo canale singolo, quello che i pc hanno comunemente sfruttato e che continuano tutt&#39;ora a fare. La ram è la memoria su cui opera il pc direttamente {ad esempio i dati che servono all&#39;esecuzione di un programma vengono trasportati sulla ram} e fino all&#39;avvento del Dual Channel poteva &quot;comunicare&quot; con i vari componenti con un singolo &quot;canale&quot;. Fin qui tutto bene certo, ma con l&#39;avvento di memorie RAM sempre più capienti e veloci si è riscontrato quello che viene volgarmente definito collo di bottiglia: I dati affluiscono dalla CPU con velocità e mole crescenti ma non vengono sfruttati in tempo utile, come un ingorgo autostradale ai pressi di uno svincolo... che gran felicità ehh?&lt;br /&gt;
Citazioni automobilistiche a parte, la soluzione a questo problema è stata l&#39;aggiunta di un secondo canale di comunicazione tra CPU e RAM che permetteva di avere prestazioni migliori con costi decisamente contenuti. Per ottenere un collegamento in Dual-Channel non è sufficiente pero&#39; avere un controller memoria abilitato. Per essere applicato correttamente dobbiamo prima di tutto assicurarci che la nostra mobo supporti la tecnologia e successivamente collocare i moduli di RAM in particolari slot, solitamente colorati in modo differente{Nella nostra foto sono i banchi arancioni}. Tuttavia non basta controllare di aver allocato la memoria nel posto giusto ma bisogna controllare che le barre di memoria siano compatibili{molti sostengono addirittura identiche} tra loro in fatto di latenza.&lt;br /&gt;
Naturalmente i pc adesso hanno un minimo di tolleranza riguardo certi aspetti{possiamo dire meno &quot;schizzinosi&quot; se mi concedete il termine} e adesso non è raro trovare sistemi Dual Channel con banchi di RAM differenti tra loro, tuttavia il pc sfrutterà le caratteristiche di latenza peggiori su entrambi i banchi di memoria.&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: #fcfcfc; color: #333333; text-align: -webkit-auto;&quot;&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/309078638503776056/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2012/01/il-sistema-dual-channelquesto.html#comment-form' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/309078638503776056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/309078638503776056'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2012/01/il-sistema-dual-channelquesto.html' title='Il Sistema Dual-Channel...questo sconosciuto'/><author><name>Detlef</name><uri>http://www.blogger.com/profile/07933883355604693754</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ7zESroOFNwgx2kqpE-EhOImVF0KmpmF1wpWJ7PhnbGIyWEKEuYOH2D_egTU70p3EYLarwxlKBXfW0iFUgxdfVSZT54nxMICLnjelmKJcOR-AuWpMbCIw9tW7ryjcNlNCCThFPGsQVyY/s72-c/20110208170938_dual-channel.gif" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-3049104232018294756</id><published>2012-01-02T03:56:00.000-08:00</published><updated>2012-01-02T04:04:49.382-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Codice Sorgente"/><category scheme="http://www.blogger.com/atom/ns#" term="Google Code Search"/><category scheme="http://www.blogger.com/atom/ns#" term="Koders"/><category scheme="http://www.blogger.com/atom/ns#" term="Krugle"/><category scheme="http://www.blogger.com/atom/ns#" term="Motore di ricerca"/><title type='text'>Code Search Engine</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB5elGhyphenhyphenJ-Cz9IdE-cUxFxjwf4DGqV2ln3bxL6r-qHijD8kfxdVQBlanbM7fomeaZlIc3T_dNdH-TAgb-B1ZvtMbdgNo8yYhucidVGq0TVeW3D5LmbUzYsN6adFR-qlXPbPmqHsrcrSj0/s1600/bds_koders_logo.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;108&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB5elGhyphenhyphenJ-Cz9IdE-cUxFxjwf4DGqV2ln3bxL6r-qHijD8kfxdVQBlanbM7fomeaZlIc3T_dNdH-TAgb-B1ZvtMbdgNo8yYhucidVGq0TVeW3D5LmbUzYsN6adFR-qlXPbPmqHsrcrSj0/s320/bds_koders_logo.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Per una ricerca ottimale di classi, algoritmi, funzioni e codice sorgente in generale, esistono dei motori di ricerca sviluppati appositamente per questo scopo.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Molte volte un programmatore potrebbe cercare del codice sorgente, per confrontarsi con frammenti di codice scritti da altre persone, per vedere l&#39;implementazione, per necessità o semplicemente per servirsene in modo veloce. Esistono motori di ricerca che cercano tra molti file scritti in vari linguaggi di programmazione per trovare il codice che cerchiamo. Uno di questi è Google Code Search, che offre un&#39;ottima interfaccia per l&#39;utente e molti campi per ottimizzare la ricerca.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZszHNU64R1UxGO04F_5Tn-6fExgb1twRpP6eW7zhcl9m70bzxsKGAr69zfpZG9XIMwNXop1JV2SHtlN_b0eKsR3UHocQbJGFVsXE7WMlLp4cEvWET8x3K_Vb1ElGEruspB9_3H6GYJCQ/s1600/Schermata-2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;169&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZszHNU64R1UxGO04F_5Tn-6fExgb1twRpP6eW7zhcl9m70bzxsKGAr69zfpZG9XIMwNXop1JV2SHtlN_b0eKsR3UHocQbJGFVsXE7WMlLp4cEvWET8x3K_Vb1ElGEruspB9_3H6GYJCQ/s320/Schermata-2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;i&gt;I vari campi di ottimizzazione della nostra query su Google Code Search&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvpSrg3n4nihwGx60Sr2oWUVxMHVsRZVwVkoXKABwUuRxPyY1DN4ZWc3WwOINtXvV9lelS8wL49nZzmxmxoXpurQKtDJVWZm9mQzMPAJgsUc59e5pOku586YCOlPre7K4TFpD22_TJpxE/s1600/Schermata.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;148&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvpSrg3n4nihwGx60Sr2oWUVxMHVsRZVwVkoXKABwUuRxPyY1DN4ZWc3WwOINtXvV9lelS8wL49nZzmxmxoXpurQKtDJVWZm9mQzMPAJgsUc59e5pOku586YCOlPre7K4TFpD22_TJpxE/s320/Schermata.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;i&gt;Un esempio di risultato&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Purtoppo Google Code Search è un servizio che verrà chiuso tra un pò di tempo. Ma Google non è la sola soluzione per le nostre ricerche in ambito di programmazione: Koders e Krugle sono valide alternative.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Koders si presenta con un&#39;interfaccia più semplice rispetto a quella di Google Code Search. Funziona egregiamente e attualmente cerca tra&amp;nbsp;3,338,449,289 righe di codice open source, come recita il sito stesso.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmqWaeCKOgVEe0WzA6hnIrBOlUp3nPkTEbihJRohx9cwkWv_-xJZ497B34Gtmvz5hv_arUxvBdEekDy0MPbr3Dr4vMP2Nc62DQKMP-r7PkhMg0THQURkvtl_4UW5IYFziEJ1khxlbjlNY/s1600/Schermata-1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;148&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmqWaeCKOgVEe0WzA6hnIrBOlUp3nPkTEbihJRohx9cwkWv_-xJZ497B34Gtmvz5hv_arUxvBdEekDy0MPbr3Dr4vMP2Nc62DQKMP-r7PkhMg0THQURkvtl_4UW5IYFziEJ1khxlbjlNY/s320/Schermata-1.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Il motore di ricerca Krugle ha caratteristiche peculiari quali inserire dei frammenti di codice (&quot;snippets&quot;), data di scrittura del codice ecc. Il sito presenta anche delle versioni software (divise in Basic, Enterprise..) da poter scaricare.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Link:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;a href=&quot;http://www.google.com/codesearch&quot;&gt;Google Code Search&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;a href=&quot;http://www.koders.com/&quot; target=&quot;_blank&quot;&gt;Koders&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;a href=&quot;http://www.krugle.com/index.php&quot; target=&quot;_blank&quot;&gt;Krugle&lt;/a&gt;&amp;nbsp;[sito]&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;a href=&quot;http://opensearch.krugle.org/home/home_page/&quot; target=&quot;_blank&quot;&gt;Krugle openSearch&lt;/a&gt; [motore di ricerca]&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;a href=&quot;http://blog.html.it/02/01/2012/motori-di-ricerca-per-codice-sorgente/?utm_source=twitterfeed&amp;amp;utm_medium=twitter&amp;amp;utm_campaign=Feed%3A+Edit&quot; target=&quot;_blank&quot;&gt;Fonte&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/3049104232018294756/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2012/01/code-search-engine.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/3049104232018294756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/3049104232018294756'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2012/01/code-search-engine.html' title='Code Search Engine'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12635476657694272810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB5elGhyphenhyphenJ-Cz9IdE-cUxFxjwf4DGqV2ln3bxL6r-qHijD8kfxdVQBlanbM7fomeaZlIc3T_dNdH-TAgb-B1ZvtMbdgNo8yYhucidVGq0TVeW3D5LmbUzYsN6adFR-qlXPbPmqHsrcrSj0/s72-c/bds_koders_logo.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-8206247959925655088</id><published>2012-01-02T03:23:00.000-08:00</published><updated>2012-01-02T04:14:30.350-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cercare per numero di telefono"/><category scheme="http://www.blogger.com/atom/ns#" term="Contact by number"/><category scheme="http://www.blogger.com/atom/ns#" term="contatti"/><category scheme="http://www.blogger.com/atom/ns#" term="ipad"/><category scheme="http://www.blogger.com/atom/ns#" term="iphone"/><category scheme="http://www.blogger.com/atom/ns#" term="ipod touch"/><title type='text'>Cercare i contatti tramite numero [iDevice]</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju6i5MA0a9_jO3Swt8mr-qpoSWwEHdNg26KUB5xlwxzvjrIA7b7x1u54xypGHmr8FWQRLx_dzITLb3qw7edssRQVBCjbI2Sqi-yDqIlra3TK5p8cFY_bfiqXxUR1X8N-vR55r38zZfVTM/s1600/iPhone-OS-3.x-Contacts-app-icon.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju6i5MA0a9_jO3Swt8mr-qpoSWwEHdNg26KUB5xlwxzvjrIA7b7x1u54xypGHmr8FWQRLx_dzITLb3qw7edssRQVBCjbI2Sqi-yDqIlra3TK5p8cFY_bfiqXxUR1X8N-vR55r38zZfVTM/s200/iPhone-OS-3.x-Contacts-app-icon.jpg&quot; width=&quot;198&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
A volte è abbastanza scomodo cercare il possessore di un numero di telefono che non abbiamo memorizzato sul nostro telefono. Magari vogliamo sapere a chi corrisponde un determinato numero e abbiamo tutti i contatti salvati sull&#39;iPad o sull iPod Touch ecc..Per questo ci viene incontro l&#39;applicazione....&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
Contact By Number, sviluppata da Peter Breitling e disponibile gratuitamente sullo store di Apple. L&#39;applicazione è semplicissima da usare e molto semplice anche come interfaccia: basterà iniziare a scrivere il  numero per vedere la corrispondenza con il nostro contatto, preso direttamente dalla applicazione &quot;Contatti&quot; messa a disposizione sugli iDevice. Ho trovato questa applicazione molto utile, in quanto ho vari cellulari con varie schede e ho deciso di salvarmi tutti i numeri su &quot;contatti&quot; di Apple, aggiornando così anche il Mac. Ora anziché girarmi 2/3 telefoni in cerca del numero, posso tranquillamente usare questa applicazione. Davvero utile per chi non ha tutti i contatti memorizzati su un unico telefonino.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; line-height: 40px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
L&#39;applicazione è progettata per iPhone/iPod Touch e la potete trovare &lt;a href=&quot;http://itunes.apple.com/us/app/contact-by-number/id294325239?mt=8&quot;&gt;qui&lt;/a&gt;.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/8206247959925655088/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2012/01/cercare-i-contatti-tramite-numero.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/8206247959925655088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/8206247959925655088'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2012/01/cercare-i-contatti-tramite-numero.html' title='Cercare i contatti tramite numero [iDevice]'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12635476657694272810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju6i5MA0a9_jO3Swt8mr-qpoSWwEHdNg26KUB5xlwxzvjrIA7b7x1u54xypGHmr8FWQRLx_dzITLb3qw7edssRQVBCjbI2Sqi-yDqIlra3TK5p8cFY_bfiqXxUR1X8N-vR55r38zZfVTM/s72-c/iPhone-OS-3.x-Contacts-app-icon.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-7161758217092158305</id><published>2011-12-25T05:10:00.001-08:00</published><updated>2011-12-28T10:48:17.207-08:00</updated><title type='text'>SaloonSoft vi augura buone feste!</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr1LgBWGgJlWlR5jbGHR5hw9QRGEXSGsrRKWpJbkp1fvMHgC5onP5MGDLI9nxsTcOXi8XLKsJAWf83S5gw42VgqwkjZ6PJR8FTNpzqUFvMhYVh1fQEYXN-eKMTeqhQ7Swe7W2CL8H3wqs/s1600/Immagine.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr1LgBWGgJlWlR5jbGHR5hw9QRGEXSGsrRKWpJbkp1fvMHgC5onP5MGDLI9nxsTcOXi8XLKsJAWf83S5gw42VgqwkjZ6PJR8FTNpzqUFvMhYVh1fQEYXN-eKMTeqhQ7Swe7W2CL8H3wqs/s200/Immagine.gif&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Clicca per vedere l&#39;immagine animata!&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/7161758217092158305/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2011/12/saloonsoft-vi-augura-buone-feste.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/7161758217092158305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/7161758217092158305'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2011/12/saloonsoft-vi-augura-buone-feste.html' title='SaloonSoft vi augura buone feste!'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12635476657694272810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr1LgBWGgJlWlR5jbGHR5hw9QRGEXSGsrRKWpJbkp1fvMHgC5onP5MGDLI9nxsTcOXi8XLKsJAWf83S5gw42VgqwkjZ6PJR8FTNpzqUFvMhYVh1fQEYXN-eKMTeqhQ7Swe7W2CL8H3wqs/s72-c/Immagine.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-3907287828236020665</id><published>2011-12-22T07:43:00.000-08:00</published><updated>2011-12-23T06:46:45.794-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c++"/><category scheme="http://www.blogger.com/atom/ns#" term="dinamica"/><category scheme="http://www.blogger.com/atom/ns#" term="matrice"/><category scheme="http://www.blogger.com/atom/ns#" term="programmazione"/><category scheme="http://www.blogger.com/atom/ns#" term="vettore"/><title type='text'>Creare una matrice dinamica velocemente [c++]</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioxuPoWna3mdYOqC16DJH-i_2LX0tOjbjFbLMLtVH7ALpcM3TMqcuKU6IsVAFeUzYNud2PnK0gYY22jYmfV7mF-GvgqSMFeVwaAi5ktA8j0hXsB76ERdYFboLvnuS00CytVrOjGtYRfQ/s1600/matrice-vba.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;246&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioxuPoWna3mdYOqC16DJH-i_2LX0tOjbjFbLMLtVH7ALpcM3TMqcuKU6IsVAFeUzYNud2PnK0gYY22jYmfV7mF-GvgqSMFeVwaAi5ktA8j0hXsB76ERdYFboLvnuS00CytVrOjGtYRfQ/s320/matrice-vba.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Diciamoci la verità, le matrici dinamiche sono utilissime, e su questo non c&#39;è dubbio,&amp;nbsp; ma implementarle nel c++ non viene così naturale come per i vettori.&lt;br /&gt;
E&#39; per questo motivo che in questo articolo, tratteremo un modo semplice e veloce per creare e riempire una matrice totalmente dinamica senza mai toccare un puntatore direttamente.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
Ovviamente per far si che il nostro codice sia più semplice possibile ci avvaleremo di una libreria standard che è il &lt;b&gt;Vector&lt;/b&gt;.&lt;br /&gt;
Questa libreria, come annuncia anche il nome, ci permette di creare un vettore facilmente e senza toccare nessun puntatore, a questo penserà tutto lui.&lt;br /&gt;
Ora, ragionando, cos&#39;è una matrice? La matrice ovviamente può essere intesa come un vettore che all&#39;interno di una sua cella ha un altro vettore, quindi aiutandoci con la struttura citata sopra, potremmo usare un Vector di Vector per avere così la nostra matrice (ovviamente dinamica) e senza aver toccato nessun puntatore direttamente.&lt;br /&gt;
&lt;br /&gt;
Passiamo ora alla pratica, di seguito è riportato il codice di questa struttura opportunamente commentato per non destare altri dubbi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;Codice:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;#include &amp;lt;iostream&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;#include &amp;lt;vector&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;using namespace std;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;int main()&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;{&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int r, c;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&quot;inserisci righe e colonne&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cin&amp;gt;&amp;gt;r&amp;gt;&amp;gt;c;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; vector&amp;lt;int&amp;gt; riga(c);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; vector&amp;lt;vector&amp;lt;int&amp;gt; &amp;gt; matrice;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(int i=0; i&amp;lt; r; i++)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for(int j=0; j&amp;lt; c; j++)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cin&amp;gt;&amp;gt; riga[j];&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; matrice.push_back(riga);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp; //funzione di stampa&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(int i=0; i&amp;lt; r; i++)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for(int j=0; j&amp;lt; c; j++)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;matrice[i][j];&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;endl;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/i&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;}&lt;/i&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Spiegazione:&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; vector&amp;lt;int&amp;gt; riga(c);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; vector&amp;lt;vector&amp;lt;int&amp;gt; &amp;gt; matrice;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;&lt;br /&gt;
In questo pezzo noi stiamo dichiarando un vettore chiamato riga e abbiamo allocato &lt;b&gt;c&lt;/b&gt; posizioni vuote dove &lt;b&gt;c&lt;/b&gt; è il numero di colonne&amp;nbsp; lette da input.&lt;br /&gt;
Il secondo invece è proprio la nostra matrice che quindi sarà un vector di vector di interi (in questo esempio) e che quindi dovrà contenere un numero n di righe.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(int i=0; i&amp;lt; r; i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for(int j=0; j&amp;lt; c; j++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cin&amp;gt;&amp;gt; riga[j];&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; matrice.push_back(riga);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
  &lt;/i&gt;
&lt;br /&gt;
Questo pezzo invece è la vera e proprio lettura della matrice che viene eseguita con 2 indici, ovviamente, e nel ciclo più interno, noi leggiamo una a una le posizioni della nostra riga che abbiamo dichiarato prima.&lt;br /&gt;
Quando questo ciclo sarà terminato avremo quindi una riga letta e quindi pronta per diventare la prima (oppure la ennesima) riga della nostra matrice.&lt;br /&gt;
Per inserire quindi la nostra riga nella matrice basta usare la funzione di questa libreria che si chiama &lt;b&gt;.push_back( &amp;lt;tipo di dato scritto nella dichiarazione&amp;gt;)&lt;/b&gt; ,questa funzione viene invocata sull&#39;oggetto in cui dobiamo inserire un elemento, nel nostro caso la invochiamo sulla nostra &lt;b&gt;matrice&lt;/b&gt; che a come abbiamo dichiarato prima è un vettore che accetta vettori e quindi questo inserimento andrà a buon fine inserendo tra le parentesi il nome dell&#39;oggetto da aggiungere, nel nostro caso &lt;b&gt;riga&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ecco fatto dopo aver creato la nostra matrice questa potrà essere usata come una normale matrice statica con l&#39;accesso per doppie parentesi quadre [n][m] , quindi l&#39;utilizzo verrà più che immediato.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
  &lt;/i&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/3907287828236020665/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2011/12/creare-una-matrice-dinamica-velocemente.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/3907287828236020665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/3907287828236020665'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2011/12/creare-una-matrice-dinamica-velocemente.html' title='Creare una matrice dinamica velocemente [c++]'/><author><name>Sera</name><uri>http://www.blogger.com/profile/13989439636367415717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='22' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaWe3kZvErFzD0eigdV9Xpc3rDFOeEKkgxxj-1al5AGqrIZkrLat31AN_SzpJcNLDzH5sqt678DZLYkjKfm7mR8yQNeh5K29RvyfqZ3St6YaksA1TXhLM6SEXzOd095g/s220/Excellent-frog.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioxuPoWna3mdYOqC16DJH-i_2LX0tOjbjFbLMLtVH7ALpcM3TMqcuKU6IsVAFeUzYNud2PnK0gYY22jYmfV7mF-GvgqSMFeVwaAi5ktA8j0hXsB76ERdYFboLvnuS00CytVrOjGtYRfQ/s72-c/matrice-vba.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-6609201730095053886</id><published>2011-12-22T05:35:00.000-08:00</published><updated>2011-12-22T07:00:29.903-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chat"/><category scheme="http://www.blogger.com/atom/ns#" term="facebook"/><category scheme="http://www.blogger.com/atom/ns#" term="fps"/><category scheme="http://www.blogger.com/atom/ns#" term="game"/><category scheme="http://www.blogger.com/atom/ns#" term="giochi per pc"/><category scheme="http://www.blogger.com/atom/ns#" term="nerd"/><category scheme="http://www.blogger.com/atom/ns#" term="Overwolf"/><title type='text'>OverWolf - Stay in the game</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhGyT5Kc7zdbOMRjWplLCsJP_IYzoBk3yIk38c2BD8_0G5vuAD-dOK161UTvKz03CjqoXHuSRWO5khIJTXGdV-l3cuIC1-wz_Dur98bI-zhrrIWgIOwXbvPJANfY7CwCWTPwyhuTR0E0I/s1600/overwolf.jpg&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;200&quot; id=&quot;BLOGGER_PHOTO_ID_5688953937398721362&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhGyT5Kc7zdbOMRjWplLCsJP_IYzoBk3yIk38c2BD8_0G5vuAD-dOK161UTvKz03CjqoXHuSRWO5khIJTXGdV-l3cuIC1-wz_Dur98bI-zhrrIWgIOwXbvPJANfY7CwCWTPwyhuTR0E0I/s200/overwolf.jpg&quot; style=&quot;display: block; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center;&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Killstreak negli FpS, Drop Epici nei Mmorpg, Livello degli fps di gioco... bhè se capite almeno una di queste frasi siete un giocatore Pc proprio come il sottoscritto.&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
Quante volte vi è capitato, magari durante una partita, di voler controllare la mail o magari una semplice occhiata al socialnetwork di fiducia e quindi di dover ricorrere al fastidiosissimo Alt+Tab?&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt; &lt;/div&gt;
&lt;div&gt;
Milioni di volte... questo comando tuttavia alla lunga può risultare scomodo visto che molti pc impiegano molto tempo a riaprire la finestra di gioco una volta messa in background.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Ma ecco che ci viene in aiuto un piccolo programmino[davvero minuto... pensate l&#39;istaller pesa appena 50 Mb] dal nome intrigante: OverWolf, pensato apposta per giocatori accaniti che non possono fare a meno della loro partita quotidiana.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Lo scopo del programma altro non è che riunire in un interfaccia intuitiva e piacevole alla vista tutti i comandi sopracitati e molto altro ancora. Essendo ancora un programma in betatesting devo dire che dopo una piccola esperienza personale il programma risponde egregiamente a quasi tutte le richieste, che sia la semplice gestione di Teamspeak [indispensabile per coordinare gilde clan e tutto quello che riguarda il multiplayer] o la più complicata registrazione di gameplay che impone il più delle volte un programma esterno.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Il piccolo lupacchiotto rosso è predisposto per essere collegato a quasi tutto il mondo dei videogiochi pensati per pc include:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
- un piccolo browser&lt;/div&gt;
&lt;div&gt;
- una app per i principali socialnetwork [facebook, twitter e Msn ad esempio]&lt;/div&gt;
&lt;div&gt;
- un collegamento diretto con Skype &lt;/div&gt;
&lt;div&gt;
- un pratico indicatore per gli fps [ottimo per chi ricerca il classico compromesso tra potenza e          grafica]&lt;/div&gt;
&lt;div&gt;
- un collegamento con la chat della piattaforma Steam &lt;/div&gt;
&lt;div&gt;
- una app per Youtube &lt;/div&gt;
&lt;div&gt;
- una funzione di registrazione di video [postabili immediatamente sul web]&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
e molto altro ancora ancora tra cui la gestione di mail. &lt;/div&gt;
&lt;div&gt;
Unico neo? ancora non tutti i giochi supportano il comodissimo OverWolf tuttavia il sito degli sviluppatori [&lt;a href=&quot;http://www.overwolf.com/&quot;&gt;http://www.overwolf.com/&lt;/a&gt;] ha messo a disposizione un post dove i giocatori più fedeli possono richiedere una versione del programma adatta al gioco dei loro sogni.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/6609201730095053886/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2011/12/overwolf-stay-in-game.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/6609201730095053886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/6609201730095053886'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2011/12/overwolf-stay-in-game.html' title='OverWolf - Stay in the game'/><author><name>Detlef</name><uri>http://www.blogger.com/profile/07933883355604693754</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhGyT5Kc7zdbOMRjWplLCsJP_IYzoBk3yIk38c2BD8_0G5vuAD-dOK161UTvKz03CjqoXHuSRWO5khIJTXGdV-l3cuIC1-wz_Dur98bI-zhrrIWgIOwXbvPJANfY7CwCWTPwyhuTR0E0I/s72-c/overwolf.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-6434136685556567956</id><published>2011-12-17T13:25:00.000-08:00</published><updated>2011-12-18T02:34:35.783-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adblock"/><category scheme="http://www.blogger.com/atom/ns#" term="adblock plus"/><category scheme="http://www.blogger.com/atom/ns#" term="add on"/><category scheme="http://www.blogger.com/atom/ns#" term="addon"/><category scheme="http://www.blogger.com/atom/ns#" term="annunci pubblicitari"/><category scheme="http://www.blogger.com/atom/ns#" term="chrome"/><category scheme="http://www.blogger.com/atom/ns#" term="compontente aggiuntivo"/><category scheme="http://www.blogger.com/atom/ns#" term="eliminare"/><category scheme="http://www.blogger.com/atom/ns#" term="firefox"/><category scheme="http://www.blogger.com/atom/ns#" term="pubblicità"/><category scheme="http://www.blogger.com/atom/ns#" term="youtube"/><title type='text'>Eliminare pubblicità su YouTube</title><content type='html'>&lt;br /&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpXGU7765NgIWdWZytM_y4KJRNYzZxHd4panGmheymrRZl_YxL1BLbSX5Yyqw7i41m3QGWl_yVmxdsFsh-DDys8gTwWIs1gSU3TOTAKUh6VgX8_2rrY0CWd2yF8Y5TC4Wyn3Gi1E-1dak/s1600/adBlock.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpXGU7765NgIWdWZytM_y4KJRNYzZxHd4panGmheymrRZl_YxL1BLbSX5Yyqw7i41m3QGWl_yVmxdsFsh-DDys8gTwWIs1gSU3TOTAKUh6VgX8_2rrY0CWd2yF8Y5TC4Wyn3Gi1E-1dak/s200/adBlock.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
stanchi delle noiose pubblicità su youtube?? Volete vedere i vostri video preferiti in santa pace??&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Da oggi si può con adBlock!&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Basta infatti scaricare gratuitamente questo semplice addon che salterà automaticamente tutte le noiose pubblicità. AdBlock è disponibile sia per google chrome che per firefox in versione plus è semplicissimo da installare e non ha bisogno di alcuna modifica una volta installato infatti si avvierà da solo in automatico e eliminerà tutti gli annunci pubblicitari contenuti in molte pagine web con conseguente risparmio di banda.&lt;br /&gt;
&lt;br /&gt;
Link del download per FireFox:&amp;nbsp;&lt;a href=&quot;https://addons.mozilla.org/it/firefox/addon/adblock-plus/&quot;&gt;qui&lt;/a&gt;&lt;br /&gt;
Link del download per Chrome:&amp;nbsp;&lt;a href=&quot;https://chrome.google.com/webstore/detail/gighmmpiobklfepjocnamgkkbiglidom&quot;&gt;qui&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/6434136685556567956/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2011/12/stanchi-delle-noiose-pubblicita-su.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/6434136685556567956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/6434136685556567956'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2011/12/stanchi-delle-noiose-pubblicita-su.html' title='Eliminare pubblicità su YouTube'/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/blank.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpXGU7765NgIWdWZytM_y4KJRNYzZxHd4panGmheymrRZl_YxL1BLbSX5Yyqw7i41m3QGWl_yVmxdsFsh-DDys8gTwWIs1gSU3TOTAKUh6VgX8_2rrY0CWd2yF8Y5TC4Wyn3Gi1E-1dak/s72-c/adBlock.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-5995607144189253317</id><published>2011-12-12T11:46:00.001-08:00</published><updated>2011-12-18T09:20:20.884-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bug"/><category scheme="http://www.blogger.com/atom/ns#" term="curiosità"/><title type='text'>Il primo bug</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5bz9OcHNd64baa1HuR7UxGNDU7pZm1DX26shvJXtyg9g3CaBdVRVpkG9wdP0Ea0kddDb-_KNiovcwclp65WCX9n0IDrMOk937I1-eIpdGesqwPVAlsgIghAfAR341guBsvIJ93lSarX4/s1600/H96566k.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;251&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5bz9OcHNd64baa1HuR7UxGNDU7pZm1DX26shvJXtyg9g3CaBdVRVpkG9wdP0Ea0kddDb-_KNiovcwclp65WCX9n0IDrMOk937I1-eIpdGesqwPVAlsgIghAfAR341guBsvIJ93lSarX4/s320/H96566k.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Il noto termine &#39;bug&#39; in informatica indica un comportamento non previsto di un programma, che porta ad errori e malfunzionamenti del software. Ma come si spiega l&#39;uso di questo termine? &#39;Bug&#39; in inglese significa insetto, ed è proprio questo termine che sta alla base di questa curiosità: si dice che nel 1947 nell&#39; università di Harvard, fu trovato il motivo del malfunzionamento del computer Mark II: era proprio un insetto che si era incastrato tra i circuiti. Così, nel registro del computer fu annotata la frase&lt;br /&gt;
&lt;br /&gt;
«1545. Relay #70 Panel F (moth) in relay. First actual case of bug being found»&lt;br /&gt;
&lt;br /&gt;
Da queste parole, però, si può comprendere che il termine bug era probabilmente già stato usato per indicare un problema tecnico, si dice che fu Edison, intorno al 1870, a farne il primo uso.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
Fonti : wikipedia, c++ for everyone (Cay Horstmann)&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/5995607144189253317/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2011/12/il-primo-bug.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/5995607144189253317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/5995607144189253317'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2011/12/il-primo-bug.html' title='Il primo bug'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12635476657694272810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5bz9OcHNd64baa1HuR7UxGNDU7pZm1DX26shvJXtyg9g3CaBdVRVpkG9wdP0Ea0kddDb-_KNiovcwclp65WCX9n0IDrMOk937I1-eIpdGesqwPVAlsgIghAfAR341guBsvIJ93lSarX4/s72-c/H96566k.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-5163907640036802048</id><published>2011-12-08T03:35:00.001-08:00</published><updated>2011-12-08T07:24:15.283-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="comandi"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="mac"/><category scheme="http://www.blogger.com/atom/ns#" term="malato...terminale"/><category scheme="http://www.blogger.com/atom/ns#" term="sort"/><category scheme="http://www.blogger.com/atom/ns#" term="Terminale"/><category scheme="http://www.blogger.com/atom/ns#" term="unix"/><title type='text'>Malato... Terminale [Parte 4]</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3pRkPppQcYWf579Qm4ft_lSuLq5TtChdITKtgZiR8N4tyoxHePMLQHYttFbKVgKufUVbJw6Wj7eKYD_V9zhXWC5h3IPujeNm9TuRPUbObREQ3SyQGMFY8S3dYrTzX7D7C0jrFKmNX108/s1600/terminale+pt+4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3pRkPppQcYWf579Qm4ft_lSuLq5TtChdITKtgZiR8N4tyoxHePMLQHYttFbKVgKufUVbJw6Wj7eKYD_V9zhXWC5h3IPujeNm9TuRPUbObREQ3SyQGMFY8S3dYrTzX7D7C0jrFKmNX108/s200/terminale+pt+4.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Nella quarta parte di &quot;Malato...Terminale&quot; vedremo come utilizzare il simbolo di pipe, gestire l&#39;input e l&#39;output e ordinare semplici file.&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Nel terminale una&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;pipe&lt;/span&gt; è rappresentata dal simbolo &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt; | &lt;/span&gt;&quot;, che funge da collegamento tra due istruzioni, precisamente serve per collegare il risultato dell&#39;espressione precedente, con quella che la segue. Un &amp;nbsp;utilizzo immediato della pipe è il contatore di file presenti in una directory. Creiamo una directory Prova e popoliamola con 3 file mediante il comando Touch. Dopodiché digitiamo:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ls | wc -l&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Il comando &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;wc&lt;/span&gt; sta per &lt;b&gt;word counter&lt;/b&gt; e, come potrete vedere dal risultato di questo comando, restituisce il numero dei file contenuti nella nostra cartella. Praticamente il comando ls &quot;restituisce&quot; i file che, mediante la pipe, vengono &quot;passati&quot; al comando &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;wc&lt;/span&gt;, che li conta.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXlzIHMGphqBR2OizznuoLPxlqxImpG4PROsGl5gcCYQwVkD9PY-0YoGBNcobFiTaGbh52_NyyqdsNcodXwC9frPM8ocILRSrfsJr4B2459LFpYca4lJ4pFA5UudaPMp0cZ3TS5bka6k0/s1600/Schermata.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;281&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXlzIHMGphqBR2OizznuoLPxlqxImpG4PROsGl5gcCYQwVkD9PY-0YoGBNcobFiTaGbh52_NyyqdsNcodXwC9frPM8ocILRSrfsJr4B2459LFpYca4lJ4pFA5UudaPMp0cZ3TS5bka6k0/s400/Schermata.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;i&gt;Nell&#39;immagine vengono usati più comandi legati da &amp;amp;&amp;amp;: questo simbolo, in programmazione, corrisponde all&#39;operatore logico &quot;AND&quot;. L&#39;operazione che segue la prima viene effettuata se e solo se la prima ha avuto successo. Un&#39;altro simbolo è rappresentato con due pipe &quot;||&quot;, che nel terminale è usato per generare la seconda istruzione se la prima non ha avuto successo .&lt;/i&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
Ora vediamo come utilizzare gli input e gli output nel terminale.&lt;br /&gt;
Esaminiamo il comando &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;cat&lt;/span&gt;: questo comando serve per mostrare sullo schermo il contenuto di un determinato file.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0UWuST4LT5bryseWy1euLHnvuZ8NFDQ4sOxh7SqKytdpRbcM2nMsNCTrPmFhnabmAj_hB4BTI4RtE-DC0LpJ1E_N71xWwSwO1R14jeNcMEyCqasQm1Sah_MjFvY47FjKszZJ05VcA7HE/s1600/Schermata-12222.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0UWuST4LT5bryseWy1euLHnvuZ8NFDQ4sOxh7SqKytdpRbcM2nMsNCTrPmFhnabmAj_hB4BTI4RtE-DC0LpJ1E_N71xWwSwO1R14jeNcMEyCqasQm1Sah_MjFvY47FjKszZJ05VcA7HE/s400/Schermata-12222.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Questo avviene perché l&#39;output di default del terminale è lo schermo stesso, così come l&#39;input standard è la tastiera. Proviamo a modificare l&#39;output: scriviamo il comando cat seguito dal segno&lt;b&gt; &amp;gt;&lt;/b&gt; e dal nome di un file. Nel mio esempio&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;cat &amp;gt; KnightMovesBFSGrafi.cpp&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
Nel prompt che vi si presenterà dovreste scrivere qualsiasi cosa vogliate, terminando con control-c.&lt;br /&gt;
Se ora provate a leggere quel file, tramite cat NomeFile, ritroverete quello che avete scritto.&lt;br /&gt;
Notate che il contenuto primordiale del file è stato cancellato, quindi usate questo comando per scrivere in un file vuoto non per aggiungere nuove righe!!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8oBoFeS5pqAdMBnAV4CG2aRpQRU2NR5QT9v_xIBQFN5EmjUT65xvxFWqYzUIATlmcbzn7zFu1aElj9ataLRkQ6FSwPDWsnrT-8EJ4Gw0v0IgWdByzY7AN5IFesAahsIXF7Wvh_Yu2pc4/s1600/Schermata-2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;281&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8oBoFeS5pqAdMBnAV4CG2aRpQRU2NR5QT9v_xIBQFN5EmjUT65xvxFWqYzUIATlmcbzn7zFu1aElj9ataLRkQ6FSwPDWsnrT-8EJ4Gw0v0IgWdByzY7AN5IFesAahsIXF7Wvh_Yu2pc4/s400/Schermata-2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;i&gt;Dalla foto notate che la riga in cui compare il control-c non viene scritta, quindi il comando per uscire va scritto in una riga vuota.&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;Per poter scrivere stringhe in modo tale che siano &quot;appese&quot; al nostro file, senza cancellare nulla, basta usare il comando &amp;gt;&amp;gt; anziché &amp;gt;.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Anche l&#39;operatore di input può essere cambiato (ridirezionato) mediante l&#39;operatore&lt;b&gt; &amp;lt;.&lt;/b&gt; Possiamo creare uno stream di input che proviene da un file scelto da noi. Proviamo un esempio molto semplice ed efficace: vogliamo scrivere tutte le nostre spese in un file con i prezzi e i nomi degli oggetti comprati. Di &amp;nbsp;volta in volta immettiamo nuovi prezzi con a fianco il nome del prodotto mediante l&#39;uso di&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;cat &amp;gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;nomeFile&lt;/span&gt;&lt;/b&gt;. Ora vogliamo ordinare il tutto per prezzo minore, controllando quali sono state le nostre spese meno care. Bene ora possiamo utilizzare il comando:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;sort &amp;lt; ProvaA &amp;gt; ProvaB&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Dove il file &lt;b&gt;ProvaA&lt;/b&gt; contiene tutte le nostre spese alla &lt;b&gt;rinfusa&lt;/b&gt;, così come sono state immesse e &lt;b&gt;ProvaB&lt;/b&gt; è un &lt;b&gt;file vuoto&lt;/b&gt;. &amp;nbsp;Quando la shell ci restituisce il prompt dei comandi, digitiamo&lt;br /&gt;
&lt;b&gt;cat ProvaB&lt;/b&gt;&lt;br /&gt;
Ecco qui tutte le nostre spese ordinate in modo crescente!&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjajGI3tQrASU-_V-d84o-BKl1SJJUQ2PRfOG1xQFrwNM-2WhjkBp9gpXKKskfgFF2CKdOBKJ3rfXLNkKqA-hyxgzq0gf794MpW_pxiEeeQ-vaZepd3Y-k3I7ougyWQ8AgvDBAm9Fc1Xgg/s1600/Schermata-3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;282&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjajGI3tQrASU-_V-d84o-BKl1SJJUQ2PRfOG1xQFrwNM-2WhjkBp9gpXKKskfgFF2CKdOBKJ3rfXLNkKqA-hyxgzq0gf794MpW_pxiEeeQ-vaZepd3Y-k3I7ougyWQ8AgvDBAm9Fc1Xgg/s400/Schermata-3.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Il terminale ordina prova A (comando sort &amp;lt; ProvaA) dato che l&#39;input non è più la tastiera ma il file nominato &quot;ProvaA&quot;. Dopodiché tutto il file, ordinato, va come output in ProvaB e dunque viene scritto lì. Se digitate su terminale &quot;&lt;b&gt;man sort&lt;/b&gt;&quot; si aprirà la pagina del manuale integrato UNIX che vi spiegherà la sintassi del comando e le varie opzioni applicabili.&lt;br /&gt;
Ad esempio se vogliamo partire da un campo (in questo caso un campo corrisponde ad una colonna), anziché dal primo campo scritto, basta far seguire il sort da due numeri:&lt;br /&gt;
&lt;b&gt;+n -m;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;n&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&amp;gt;&amp;gt; verrà preso il primo carattere &amp;nbsp;della n+1 colonna (o campo);&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;m&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&amp;gt;&amp;gt; determina il carattere finale, preso alla m-esima colonna (o campo);&lt;br /&gt;
Nel nostro esempio, ordiniamo gli acquisti per nome. Basterà fare:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;sort +1 -2 &amp;lt; ProvaB &amp;gt; ProvaC&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;+1&amp;nbsp;&lt;/span&gt;&lt;/b&gt;--&amp;gt; Dato che la prima colonna del nome è il secondo campo (dunque con il nostro +1 il terminale si prende il primo carattere della colonna numero n+1 = 2)&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;-2 &lt;/span&gt;-&lt;/b&gt;-&amp;gt; L&#39;ultimo carattere è quello dalla seconda colonna, dunque -2.&lt;br /&gt;
Il terminale ordinerà in base all&#39;ordine comune delle lettere, dalla a alla z, partendo dal primo carattere della seconda &amp;nbsp;colonna&amp;nbsp;(indicato con il +1)&amp;nbsp;e finendo all&#39;ultimo della stessa (indicato come -2).&lt;br /&gt;
&lt;br /&gt;
Se volessimo raggruppare i campi in base a delimitatori diversi dallo spazio, che è il delimitatore di default, basta aggiungere il flag &quot;&lt;b&gt;-t[delim]&lt;/b&gt;&quot; ad esempio creiamo un file con dei dipendenti nel formato descritto in foto;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO-qu9agCON6AogQg2mKrQffiIlub3Lcs94qBFGh24ajWTthUilQwjC4jHm0oSg33nraHJvC_jV2B90R8KYjaI70ybFp0d99YyHCt9Uq0ohgQgYWLjOuND3mtQtPzZlLXZX8drH8-vZ0Q/s1600/Schermata-42222.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO-qu9agCON6AogQg2mKrQffiIlub3Lcs94qBFGh24ajWTthUilQwjC4jHm0oSg33nraHJvC_jV2B90R8KYjaI70ybFp0d99YyHCt9Uq0ohgQgYWLjOuND3mtQtPzZlLXZX8drH8-vZ0Q/s400/Schermata-42222.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
scrivendo:&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;sort -t: +1 -2 ProvaD&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
avremo gli impiegati ordinati per matricola, dato che ora il terminale non conta più gli spazi come campi ma li dividerà con il delimitatore inserito. (nel nostro caso &#39;&lt;b&gt;:&lt;/b&gt;&#39;).&lt;br /&gt;
&lt;br /&gt;
Link delle parti precedenti:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Malato...Terminale parte prima:&amp;nbsp;&lt;a href=&quot;http://saloonsoft.blogspot.com/2011/09/malatoterminale.html&quot;&gt;qui&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Malato...Terminale parte seconda:&amp;nbsp;&lt;a href=&quot;http://saloonsoft.blogspot.com/2011/09/malatoterminale-parte-2.html&quot;&gt;qui&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Malato...Terminale parte terza:&amp;nbsp;&lt;a href=&quot;http://saloonsoft.blogspot.com/2011/10/malatoterminale-parte-3.html&quot;&gt;qui&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Nella quinta parte vedremo l&#39;uso del comando grep e un&#39;anteprima sui permessi.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/5163907640036802048/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2011/12/malato-terminale-parte-4.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/5163907640036802048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/5163907640036802048'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2011/12/malato-terminale-parte-4.html' title='Malato... Terminale [Parte 4]'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12635476657694272810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3pRkPppQcYWf579Qm4ft_lSuLq5TtChdITKtgZiR8N4tyoxHePMLQHYttFbKVgKufUVbJw6Wj7eKYD_V9zhXWC5h3IPujeNm9TuRPUbObREQ3SyQGMFY8S3dYrTzX7D7C0jrFKmNX108/s72-c/terminale+pt+4.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-714402559096668453</id><published>2011-11-25T13:04:00.001-08:00</published><updated>2011-11-25T13:11:51.769-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Codice Sorgente"/><category scheme="http://www.blogger.com/atom/ns#" term="Doom 3"/><category scheme="http://www.blogger.com/atom/ns#" term="Downloads"/><category scheme="http://www.blogger.com/atom/ns#" term="id Software"/><title type='text'>Codice Sorgente di Doom 3</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzFYmSg91uV6QyB_cSY6mJ2VfMsfvXubOjep5QeqgrykR7nJ75bgmfccz3tDzAQkbAQs5COSE-lCyOSo2R-ZyAc6gHCDr9Utw6IKadP7-ftQgFLXRpY7_BBqEuqovz9S7KxiJTU6IeQDo/s1600/Doom-3-source-code1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;214&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzFYmSg91uV6QyB_cSY6mJ2VfMsfvXubOjep5QeqgrykR7nJ75bgmfccz3tDzAQkbAQs5COSE-lCyOSo2R-ZyAc6gHCDr9Utw6IKadP7-ftQgFLXRpY7_BBqEuqovz9S7KxiJTU6IeQDo/s320/Doom-3-source-code1.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
E&#39; da un paio di giorni che circola in rete il codice scritto in C++ di questo famosissimo gioco...&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Infatti la id Software ha rilasciato il codice sorgente in rete, permettendo agli utenti di compilarlo e &quot;analizzarlo&quot; a proprio piacimento. Seguono il link per scaricare il codice sorgente (1) e un sito che ho trovato, forse un pò datato, con varie informazioni sullo sviluppo di Doom 3 e Quake 4 (le loro SDK per la precisione) (2).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(1)&amp;nbsp;&lt;a href=&quot;https://github.com/TTimo/doom3.gpl&quot;&gt;Download Source Code&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
(2)&lt;a href=&quot;http://www.iddevnet.com/&quot;&gt;SDK info&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/714402559096668453/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2011/11/codice-sorgente-di-doom-3.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/714402559096668453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/714402559096668453'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2011/11/codice-sorgente-di-doom-3.html' title='Codice Sorgente di Doom 3'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12635476657694272810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzFYmSg91uV6QyB_cSY6mJ2VfMsfvXubOjep5QeqgrykR7nJ75bgmfccz3tDzAQkbAQs5COSE-lCyOSo2R-ZyAc6gHCDr9Utw6IKadP7-ftQgFLXRpY7_BBqEuqovz9S7KxiJTU6IeQDo/s72-c/Doom-3-source-code1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-5729643804516293997</id><published>2011-11-01T05:00:00.000-07:00</published><updated>2011-12-27T14:47:09.799-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dropbox"/><category scheme="http://www.blogger.com/atom/ns#" term="GB"/><category scheme="http://www.blogger.com/atom/ns#" term="gratis"/><category scheme="http://www.blogger.com/atom/ns#" term="megaupload"/><category scheme="http://www.blogger.com/atom/ns#" term="rapidshare"/><category scheme="http://www.blogger.com/atom/ns#" term="skydrive"/><category scheme="http://www.blogger.com/atom/ns#" term="wetransfer"/><title type='text'>Filesharing senza limiti con Wetransfer</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzsd80KJgu97JQFCftP74Sh92hUucaBZDQNIBgCJK1fo-Mrjn66lShXnEukRtDe8n3JWbHLoGHg2EgaBs4dONr6EJv2bpmh2sYTo6dU4SY_KkPX2UUExd8wsqeaY8U_aBUZ34_uVZTfD8/s1600/img_3738.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzsd80KJgu97JQFCftP74Sh92hUucaBZDQNIBgCJK1fo-Mrjn66lShXnEukRtDe8n3JWbHLoGHg2EgaBs4dONr6EJv2bpmh2sYTo6dU4SY_KkPX2UUExd8wsqeaY8U_aBUZ34_uVZTfD8/s320/img_3738.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Da sempre la condivisione di file (specialmente di grosse dimensioni) è stato un problema per tutti coloro che non avendo la possibilità di scambiarsi file manualmente avevano la necessità di farlo via internet.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Fino ad oggi servizi di file hosting come Megaupload (www.megaupload.com), SkyDrive (skydrive.live.com) o Dropbox (www.dropbox.com) hanno permesso (parzialmente) di risolvere tale problema. molte però, ad oggi, le limitazioni di tali servizi; esempi sono i prezzi e le limitazioni per inviare file a più utenti ed in particolar modo il fatto che tutti avessero un tetto massimo per le dimensioni dei file... Ebbene molti hanno pensato di usare programmi come hjsplit per dividere i file in parti più piccole e consentite dal servizio di file sharing ma pensate alla scomodita di caricare singoli pacchetti ad uno ad uno nel caso di un file di oltre 1GB.&lt;br /&gt;
&lt;br /&gt;
Wetranfer (www.wetransfer.com) è un servizio internet TOTALMENTE GRATUITO che non necessita neppure di registrazione (e che nonostante tutto ciò è sicurissiomo grazie all&#39;adozione del protocollo HTTPS) che ci permette di inviare (anche ad utenti multipli) file di dimensioni fino a 2GB... Come?&lt;br /&gt;
Semplice: il sito web è composto di un unica semplice ed intuitiva schermata dove basterà inserire il file da inviare (o i file grazie all&#39;opzione di inserimento multiplo), l&#39;indirizzo e-mail del destinatario (o dei destinatari, distanziando i vari indirizzi con uno spazio), la nostra e-mail e volendo anche un messaggio opzionale, et voilà il gioco è fatto :)&lt;br /&gt;
&lt;br /&gt;
Cosa aspettate a provarlo??&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/5729643804516293997/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2011/11/filesharing-senza-limiti-con-wetransfer.html#comment-form' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/5729643804516293997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/5729643804516293997'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2011/11/filesharing-senza-limiti-con-wetransfer.html' title='Filesharing senza limiti con Wetransfer'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzsd80KJgu97JQFCftP74Sh92hUucaBZDQNIBgCJK1fo-Mrjn66lShXnEukRtDe8n3JWbHLoGHg2EgaBs4dONr6EJv2bpmh2sYTo6dU4SY_KkPX2UUExd8wsqeaY8U_aBUZ34_uVZTfD8/s72-c/img_3738.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-6970456959279040049</id><published>2011-10-29T07:23:00.000-07:00</published><updated>2011-10-29T07:24:13.709-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hash"/><category scheme="http://www.blogger.com/atom/ns#" term="hashing doppio"/><category scheme="http://www.blogger.com/atom/ns#" term="tabelle hash"/><title type='text'>Tecnica dell&#39;Hashing Doppio</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuZFm7sF_nQ35hzFkvVHNPoUsQc6Cw9NIq6FDhyphenhyphenJK4lER5zy6kSIpBjEle6uc3KP4NJOEUjvy2-H0Jx30v68SleB6BXR8jLc4eY2I4eGgSpZfZ4cV34vW3dPFAZQBityRiJwPrmOB1HLY/s1600/HashDoppioGenerale.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;139&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuZFm7sF_nQ35hzFkvVHNPoUsQc6Cw9NIq6FDhyphenhyphenJK4lER5zy6kSIpBjEle6uc3KP4NJOEUjvy2-H0Jx30v68SleB6BXR8jLc4eY2I4eGgSpZfZ4cV34vW3dPFAZQBityRiJwPrmOB1HLY/s320/HashDoppioGenerale.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
L&#39;hashing doppio fa parte dei tipi di funzione che possiamo usare per gestire una tabella hash con indirizzamento aperto..&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Una delle tante tecniche di per gestire le collisioni in delle tabelle hash prevede l&#39;utilizzo dell&#39;indirizzamento aperto, che si basa su un&#39;idea molto semplice: occupare i posti rimasti vuoti. &amp;nbsp;Mentre con le liste di collisione gestiamo le chiavi che mirano ad una stessa cella dell&#39;array aggiungendole in una opportuna lista (di chiavi) corrispondete alla cella in questione, la tecnica dell&#39;indirizzamento aperto mira a fare occupare una cella del nostro array non ancora occupata da un&#39;altra chiave, anche se non è la cella che spetta alla chiave inserita. Il tutto non viene fatto in modo casuale, ma secondo un preciso algoritmo(presente nei metodi di inserimento e di ricerca) che fa spostare la destinazione della nostra chiave, in un&#39;altra; se quest&#39;altra è vuota allora la chiave viene memorizzata, altrimenti il processo reitera fin quando non si memorizza la chiave o si ispeziona tutto l&#39;array, scoprendo che è pieno (per andare all&#39;articolo dell&#39;indirizzamento aperto clicca &lt;a href=&quot;http://saloonsoft.blogspot.com/2011/10/metodo-dellindirizzamento-aperto-per-le.html&quot;&gt;QUI&lt;/a&gt;)&lt;br /&gt;
Tra le varie tecniche dell&#39;indirizzamento aperto vi è l&#39;hashing doppio, che fa dipendere l&#39;algoritmo che genera la nuova posizione della chiave da una funzione hash. Viene denominato hashing doppio dato che, se usiamo tabelle hash, si sottintende che stiamo usando una funzione hash per smistare la nostra chiave e dato che facciamo dipendere il riallocamento in caso di collisione da un&#39;altra funzione hash, le funzioni diventano due.&lt;br /&gt;
Passiamo ad un esempio: h(f) è la nostra chiave hash applicata su f, una parola. Definiamo la funzione hash:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQtr6k4zR_72Uivr5aRu_KLwWmlZXNTrPTO-Dgdkyw5SSlafkwBr6Tt72aZJ7vK-Lfah1_raEEnNRVrBqkJFfw8S4KIOtC7pVTAgYUwMWvuQZCm4m3sF1X58RE3BOGcktSIhO_C3Coa04/s1600/funzioneHash.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQtr6k4zR_72Uivr5aRu_KLwWmlZXNTrPTO-Dgdkyw5SSlafkwBr6Tt72aZJ7vK-Lfah1_raEEnNRVrBqkJFfw8S4KIOtC7pVTAgYUwMWvuQZCm4m3sF1X58RE3BOGcktSIhO_C3Coa04/s1600/funzioneHash.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
La funzione in pratica somma il valore ascii di ogni lettera che forma la parola f e poi ne fa il modulo m, dove m è la dimensione della tabella. Nella formula X sono le lettere che vanno dalla posizione 0 alla posizione dim-1 della nostra parola.&lt;br /&gt;
Ad esempio con m=11 e f = ANNA avremo:&lt;br /&gt;
A=65 +&lt;br /&gt;
N=78 +&lt;br /&gt;
N=78 +&lt;br /&gt;
A=65&lt;br /&gt;
= 286 = 0 (mod 11)&lt;br /&gt;
&lt;br /&gt;
Questa funzione hash ha restituito 0 così potremo assegnare la voce &quot;ANNA&quot; nella posizione 0 della nostra tabella hash. Ora se volessimo inserire NANA, avremo lo stesso risultato. Se le collisioni vengono gestite mediante liste di collisione metteremo semplicemente NANA in coda nella lista presente nella tabella hash alla posizione 0.&lt;br /&gt;
Proviamo a gestire la collisione con l&#39;indirizzamento aperto e in modo particolare con l&#39;hashing doppio. Un doppio hashing è definito in genere da questa formula:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7Sp46fc7cFTr2Dq1q59CHlSegtv-hQsfAR1-AiHWd1agpBD1c3NX-g8o_o1C2ThdKzKIBz_6b199O9GGX__AOwHmwx3G3QV2SgFmkKX6yA0l-k-6tIgpgZqLfWnxL_9Y0VMXezDr07uI/s1600/HashingDoppio.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7Sp46fc7cFTr2Dq1q59CHlSegtv-hQsfAR1-AiHWd1agpBD1c3NX-g8o_o1C2ThdKzKIBz_6b199O9GGX__AOwHmwx3G3QV2SgFmkKX6yA0l-k-6tIgpgZqLfWnxL_9Y0VMXezDr07uI/s1600/HashingDoppio.png&quot; /&gt;&lt;/a&gt;mod m&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Ho indicato con H la funzione di hashing doppio che, come vedete, opera sia su f che sull&#39;indice i. Essa è composta dalle due funzioni hash h1 e h2. In questo modo, se due chiavi collidono si andrà ad occupare un posto libero nella struttura, andando a scandirla. Ora definiamo le chiavi hash h1 e h2:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2tw97HyjEUWXmBzrlw5g_qsOSST7w4bmyt48ygv6QAPPQxAAra7M1iKclJhfsfNFsLajoJ9oglydJxqKr3DZqj0397clhMTuWDHd5nX-2S9IGZwkwQ1Vhucm7UwOgzugr0SYPR_U5sjw/s1600/hashDoppio1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2tw97HyjEUWXmBzrlw5g_qsOSST7w4bmyt48ygv6QAPPQxAAra7M1iKclJhfsfNFsLajoJ9oglydJxqKr3DZqj0397clhMTuWDHd5nX-2S9IGZwkwQ1Vhucm7UwOgzugr0SYPR_U5sjw/s1600/hashDoppio1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjoqqmMvpoUUEHagkLTt3NaS1Nw8mYXx2X3C_iWGeRp7CDbBLGMC0oK_JTYO_0ZsDXI2nM0UcGOPAjj3rkSaGq9RruUl_afnmxXu-Jjy0cBA53H27MBuyiPdvkTfD1RMPcmnsruApgCGU/s1600/hashDoppio2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjoqqmMvpoUUEHagkLTt3NaS1Nw8mYXx2X3C_iWGeRp7CDbBLGMC0oK_JTYO_0ZsDXI2nM0UcGOPAjj3rkSaGq9RruUl_afnmxXu-Jjy0cBA53H27MBuyiPdvkTfD1RMPcmnsruApgCGU/s1600/hashDoppio2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Cambiamo la dimensione a 21 o qualsiasi numero che preferite, proporzionato in modo opportuno alla quantità di dati da inserire, e facciamo dipendere la funzione hash h2 dalla prima, cambiando il modulo (da modulo m andiamo a modulo m-1) e addizionando 1 al risultato finale di questa funzione.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Inserendo la parola ANNA:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-CPuY6RV7XHBsfnU7QFoTZ4GcIsdt8XnyeO7xG3vQRD-MLZ5pNGrJCwQ28swbhxI6AK2ulD0QHYA-wUBUsXPipNG470OWwySY7KgziYhi_JN0rhcJ-1MJS8STjQ6v7Wvr5sS6D60s3eo/s1600/hashingDoppio.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-CPuY6RV7XHBsfnU7QFoTZ4GcIsdt8XnyeO7xG3vQRD-MLZ5pNGrJCwQ28swbhxI6AK2ulD0QHYA-wUBUsXPipNG470OWwySY7KgziYhi_JN0rhcJ-1MJS8STjQ6v7Wvr5sS6D60s3eo/s1600/hashingDoppio.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
(286 = 13 mod 21)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Dato che all&#39;inserimento di NANA, il posto è già occupato da ANNA, viene incrementato l&#39;indice i della funzione hashing doppio che da 0 passa a 1 (controlla l&#39;algoritmo dell&#39;indirizzamento aperto &lt;a href=&quot;http://saloonsoft.blogspot.com/2011/10/metodo-dellindirizzamento-aperto-per-le.html&quot;&gt;QUI&lt;/a&gt;)&amp;nbsp;avendo così:&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
h1=13 (286 = 13 (mod 21) );&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
h2=14 (13 (mod 20) + 1);&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
H=6 (13+14 = 27 = 6 (mod 21) );&lt;br /&gt;
nella chiamata di funzione con i che vale 1.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNg2kTzB-vB2rnjZUKrmj8IjXpZxsSk0CO0O0vo-cuG8ffafZoJBAnJe23fOYwJciXgeuf1dVnOArUXx-4z7CIW4WRJLIZzBw24Byl8Bn6AeNivOjfrYOs_m8tabfxvFuuXNqobthN3Tg/s1600/hashingDoppio2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNg2kTzB-vB2rnjZUKrmj8IjXpZxsSk0CO0O0vo-cuG8ffafZoJBAnJe23fOYwJciXgeuf1dVnOArUXx-4z7CIW4WRJLIZzBw24Byl8Bn6AeNivOjfrYOs_m8tabfxvFuuXNqobthN3Tg/s1600/hashingDoppio2.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
E&#39; stato, così, assegnato un nuovo posto alla parola NANA, passando in rassegna le celle ancora disponibili risultanti dalla funzione Hashing Doppio.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/6970456959279040049/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2011/10/tecnica-dellhashing-doppio.html#comment-form' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/6970456959279040049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/6970456959279040049'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2011/10/tecnica-dellhashing-doppio.html' title='Tecnica dell&#39;Hashing Doppio'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12635476657694272810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuZFm7sF_nQ35hzFkvVHNPoUsQc6Cw9NIq6FDhyphenhyphenJK4lER5zy6kSIpBjEle6uc3KP4NJOEUjvy2-H0Jx30v68SleB6BXR8jLc4eY2I4eGgSpZfZ4cV34vW3dPFAZQBityRiJwPrmOB1HLY/s72-c/HashDoppioGenerale.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1732869837318058082.post-1629191012264161202</id><published>2011-10-29T07:01:00.000-07:00</published><updated>2011-10-29T07:04:33.743-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="algoritmo"/><category scheme="http://www.blogger.com/atom/ns#" term="hash"/><category scheme="http://www.blogger.com/atom/ns#" term="hashing doppio"/><category scheme="http://www.blogger.com/atom/ns#" term="indirizzamento aperto"/><category scheme="http://www.blogger.com/atom/ns#" term="scansione lineare"/><category scheme="http://www.blogger.com/atom/ns#" term="scansione quadratica"/><category scheme="http://www.blogger.com/atom/ns#" term="tabelle hash"/><title type='text'>Metodo dell&#39;indirizzamento aperto per le Tabelle Hash</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbODevWYjKjWD-AobqbH3u3A_a2wKoXu1Z-QtN5DbuiWPTrZ6RvP0quIvJGKJZAdKX11j-kVbbAIaexgcEJVKi_hqcF2vZn5zPp5JyeQaaEIdpI6ajZdUlsoZRgBtlN3GiPRKylwt57lA/s1600/HashGenerale.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;181&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbODevWYjKjWD-AobqbH3u3A_a2wKoXu1Z-QtN5DbuiWPTrZ6RvP0quIvJGKJZAdKX11j-kVbbAIaexgcEJVKi_hqcF2vZn5zPp5JyeQaaEIdpI6ajZdUlsoZRgBtlN3GiPRKylwt57lA/s320/HashGenerale.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Un metodo per gestire le collisioni quando si ha a che fare con le tabelle hash è chiamato indirizzamento aperto.&amp;nbsp;Al contrario delle liste di collisioni che mirano a memorizzare più oggetti aventi le stesse celle di destinazione in un&#39;unica cella mediante delle liste, il metodo dell&#39;indirizzamento aperto, in caso di collisione di due oggetti, scansisce la tabella mediante un indice i...&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;La scansione dipende dal metodo utilizzato, come vedremo in seguito. Un algoritmo generico per le Tabelle Hash implementate con l&#39;indirizzamento aperto è il seguente:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;classe&lt;/span&gt; TabellaHashAperta&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;dati:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: magenta;&quot;&gt;&lt;i&gt;vettore&lt;/i&gt; v&lt;/span&gt; di dimensione dim in cui ogni cella contiene una coppia (dato,chiave)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;da implementare:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: magenta;&quot;&gt;funzione f&lt;/span&gt;&lt;/i&gt; che determina il tipo di indirizzamento usato&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;operazioni elementari:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;u&gt;insert&lt;/u&gt;(elemento e,chiave k)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;for i=0 to dim-1 do&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;if(v[f(k,i)].elemento=null) then&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; v[f(k,i)]&amp;lt;-----(e,k)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;errore&lt;/b&gt; tabella piena &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;//se non esco mai con return&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;u&gt;search&lt;/u&gt;(chiave k)-----&amp;gt;elemento&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;for i=0 to m-1 do&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;if(v[f(k,i)].chiave=k)then&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return v[f(k,i)].elemento&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;return null &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;//non ho trovato l&#39;elemento con la chiave k&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
L&#39;indirizzamento aperto (e quindi la funzione f(k,i) ) può essere di vari tipi:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Scansione lineare: definita da&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJmSWmqAocB-DzbHfoSNcLHlFQot7OCuKAgr1CgneBW_i49IzF8f9VM7KWDiWv4Gu8omxR5d7__IPIbsaE2L0K-0LQrJf8Hj9HynUivPkMltGRa1YPbbruBVZVfajKUO6FchCoGmrF2Ew/s1600/ScansioneLineare.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJmSWmqAocB-DzbHfoSNcLHlFQot7OCuKAgr1CgneBW_i49IzF8f9VM7KWDiWv4Gu8omxR5d7__IPIbsaE2L0K-0LQrJf8Hj9HynUivPkMltGRa1YPbbruBVZVfajKUO6FchCoGmrF2Ew/s1600/ScansioneLineare.png&quot; /&gt;&lt;/a&gt;tale che i sia compresa tra 0 e minore di dim.&lt;/li&gt;
&lt;li&gt;Scansione quadratica: definita da&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6ITwlCVkXP9E5seS7DlfAiY43aM5FnQH6aOnR9tnD2WrNkHSm1UBbUUwgiho4XGUzAf8-iEoZ9vBnOyCECqELiY4JAV_Z_hwUZLEm3e8wwTrNE0pNEqquHPlQ0RhCoiV7L5BsHSkDa1M/s1600/ScansioneQuadratica.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6ITwlCVkXP9E5seS7DlfAiY43aM5FnQH6aOnR9tnD2WrNkHSm1UBbUUwgiho4XGUzAf8-iEoZ9vBnOyCECqELiY4JAV_Z_hwUZLEm3e8wwTrNE0pNEqquHPlQ0RhCoiV7L5BsHSkDa1M/s1600/ScansioneQuadratica.png&quot; /&gt;&lt;/a&gt;tale che i sia compresa tra 0 e minore di dim.&lt;/li&gt;
&lt;li&gt;Hashing doppio: definito da&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7P3-n4Z1VJp13F9fxBsahnlukVDeVFcIu3kHMs61ywYqRm7oF5ECvC7a50VkYo1G6epKKytwqhJYVMlA8UdXR6A6PSlvxB01TGE4ZZYl8oXug2-Rs6idu3kPp0VJb5xm6duMf8mvBlzE/s1600/HashingDoppio.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7P3-n4Z1VJp13F9fxBsahnlukVDeVFcIu3kHMs61ywYqRm7oF5ECvC7a50VkYo1G6epKKytwqhJYVMlA8UdXR6A6PSlvxB01TGE4ZZYl8oXug2-Rs6idu3kPp0VJb5xm6duMf8mvBlzE/s1600/HashingDoppio.png&quot; /&gt;&lt;/a&gt;mod dim. Con h1 e h2 due funzioni hash.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://saloonsoft.blogspot.com/feeds/1629191012264161202/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://saloonsoft.blogspot.com/2011/10/metodo-dellindirizzamento-aperto-per-le.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/1629191012264161202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1732869837318058082/posts/default/1629191012264161202'/><link rel='alternate' type='text/html' href='http://saloonsoft.blogspot.com/2011/10/metodo-dellindirizzamento-aperto-per-le.html' title='Metodo dell&#39;indirizzamento aperto per le Tabelle Hash'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12635476657694272810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbODevWYjKjWD-AobqbH3u3A_a2wKoXu1Z-QtN5DbuiWPTrZ6RvP0quIvJGKJZAdKX11j-kVbbAIaexgcEJVKi_hqcF2vZn5zPp5JyeQaaEIdpI6ajZdUlsoZRgBtlN3GiPRKylwt57lA/s72-c/HashGenerale.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>