<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Diego La Monica</title>
	<atom:link href="http://diegolamonica.info/feed/" rel="self" type="application/rss+xml" />
	<link>http://diegolamonica.info</link>
	<description>Software, standards, accessibilità, usabilità &#38; Web 2.0</description>
	<lastBuildDate>Wed, 28 Mar 2012 08:00:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Build a simple semantically valid carousel from scratch (part 4)</title>
		<link>http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-scratch-part-4/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=build-a-simple-semantically-valid-carousel-from-scratch-part-4</link>
		<comments>http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-scratch-part-4/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 08:00:09 +0000</pubDate>
		<dc:creator>Diego La Monica</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[carousel]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[progressive enhancement]]></category>
		<category><![CDATA[semantic]]></category>

		<guid isPermaLink="false">http://diegolamonica.info/?p=469</guid>
		<description><![CDATA[In the latest weeks we had discuss about a simple semantic carousel that will suite perfectly the concept of Progressive Enhancement. Then, how I&#8217;ve promised in the previous article, we will animate the carousel implementing the methods moveNext, movePrev and apply some animations to the carousel. Some basic concepts First of all let&#8217;s discuss the [...]]]></description>
			<content:encoded><![CDATA[<p>In the latest weeks we had discuss about a <a title="Build a simple semantically valid carousel from scratch (part 1)" href="http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-the-scratch-part-1/">simple semantic carousel</a> that will suite perfectly the concept of <a title="Build a simple semantically valid carousel from scratch (part 2)" href="http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-scratch-part-2/">Progressive Enhancement</a>. Then, how I&#8217;ve promised <a title="Build a simple semantically valid carousel from scratch (part 3)" href="http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-scratch-part-3/">in the previous article</a>, we will animate the carousel implementing the methods moveNext, movePrev and apply some animations to the carousel.</p>
<p><span id="more-469"></span></p>
<h3>Some basic concepts</h3>
<p>First of all let&#8217;s discuss the animations effects:</p>
<ul>
<li>When you click the “next” link:</li>
<ol>
<li>the first next invisible item in the carousel will become the far item on the right</li>
<li>the far item on the right will become the near item on the right</li>
<li>the near item on the right will become the current item</li>
<li>the current item will become the near left item</li>
<li>the near left item will become the far left item</li>
<li>the far left item will disappear.</li>
</ol>
<li>When you click the “previous” link:</li>
<ol>
<li>the first previous invisible item in the carousel will become the far item on the left</li>
<li>the far left item will become the near left item</li>
<li>the near left item will become the current item</li>
<li>the current item will become the near right item</li>
<li>the near right item will become the far right item</li>
<li>the far right item will go out of the view.</li>
</ol>
<li>When the current item is the first list item the “previous” link will not work.</li>
<li>When the current item is the last list item the “next” link will not work</li>
</ul>
<h3>Items behavior</h3>
<p>When the central item and the far right item of the carousel will become the near left item and the near right item they will adapt their size to the midSize width/height and will be appplied a transparency as defined in <strong>midOpacity</strong> property.</p>
<p><a href="http://diegolamonica.info/wp-content/uploads/2012/03/3DCarousel-Animation.png"><img class="alignnone size-full wp-image-472" title="Carousel animation" src="http://diegolamonica.info/wp-content/uploads/2012/03/3DCarousel-Animation.png" alt="" width="685" height="480" /></a></p>
<p>Meanwhile the <em>Current Item</em> and the right far item will become the <em>Near item</em> both left and right, the near left item will become the far left item reducing its size to the far left item applying the opacity defined in the <strong>minOpacity</strong>.</p>
<p>The <em>Near item</em> on the right will become the <em>Current Item</em> and will be resized to the maximum size defined in <strong>maxSize</strong> its new opacity is defined in <strong>maxOpacity</strong>.</p>
<p>Because the behaviors of each element is similar to the others, all them must move from a location to another, change their opacity and size, we&#8217;ll build a single method that will manage this behavior:</p>
<pre class="code js">function moveTo( $selector, $margin, $opacity, $w, $h, $last ){
    $inProgress = true;
    if($last){

        var $updateFunction = function(){
            hideTheExceding();
            locateElements();
        }
    }else{
        updateFunction = null;
    }
    jQuery($selector, ul).animate({
        marginLeft: $margin,
        opacity: $opacity,
        width: $w,
        height: $h
    }, options.speed, $updateFunction);
}</pre>
<p>The above method will accept:</p>
<ol>
<li>the CSS Selector, used to point to the exact item of the carousel,</li>
<li>the destination where it must reach to the end,</li>
<li>the final opacity,</li>
<li>the final width and final height,</li>
<li>a boolean value that will tell to the method if it is the last moving animation so (after it) we can call the methods to correct every strange carousel behavior!</li>
</ol>
<h3>The movePrev and moveNext methods</h3>
<p>As you can see in the <strong>moveTo()</strong> method we set a variable “<strong>$inProgress = true</strong>” so we can block the as I call them “compulsive link clicking user” (<em>users that when found a link clicks twice! :-)</em> )</p>
<p>So the first thing we have to do in both methos <strong>movePrev</strong> and <strong>moveNext</strong> is to check the status of <strong>$inProgress</strong> and if true we will exit without do anything.</p>
<p>As written in the above “basic concepts”, we have to ignore the click also if the current item of the carousel is the first or the last.</p>
<pre class="code js">if($elements&lt;$currentVisibleItem+2) return;</pre>
<p>The <strong>moveNext</strong> method will be:</p>
<pre class="code js">function moveNext(event) {
    event.preventDefault();
    if($inProgress) return;
    var $elements = jQuery('&gt;li', ul).length;
    if($elements&lt;$currentVisibleItem+2) return;
    $currentVisibleItem+=1;
    var $nextItem = $currentVisibleItem+2;
    var $nextToShow = '&gt;li:nth-child(' + ($nextItem+1) + ')';

    jQuery($nextToShow, ul).css({
        opacity: '0.1',
        display: 'block',
        marginLeft: (jQuery(ul).innerWidth() + options.minSize)+ 'px',
        width: 0,
        height: 0
    });
    moveTo('&gt;.far.before', -options.minSize, 0, 0, 0, false);
    moveTo('&gt;.near.before', $farXL, options.minOpacity, options.minSize, options.minSize, false);
    moveTo('&gt;.current', $nearXL, options.midOpacity, options.midSize, options.midSize, false);
    moveTo('&gt;.near.after', $currentX, options.maxOpacity, options.maxSize, options.maxSize, $nextItem==$elements+1);
    moveTo('&gt;.far.after', $nearXR, options.midOpacity, options.midSize, options.midSize, $nextItem==$elements);
    moveTo($nextToShow, $farXR, options.minOpacity, options.minSize, options.minSize, true);

}</pre>
<p>The <strong>movePrev</strong> behavior is similar but in the other sense.</p>
<p>Well all the thinghs are done and our simple semantic carousel is complete and you can see it in a <a href="http://diegolamonica.info/demo/simple-semantic-carousel/final.htm">working demo</a> there you can take a look to the HTML, CSS and Javascript developed in this tutorial (and in the previouses).</p>
<p>Obviously we can apply a lot of optimizations, features and customizing further the carousel like <a href="http://diegolamonica.info/demo/simple-semantic-carousel/final-extended.htm">adding the title of the image in a label under the carousel</a>&#8230; But why to make things complicated in a simple tutorial?</p>
<p>Now you can use it as is or begin from here to get your enterprise complex carousel plugin to show your images, news or whatever you want. Just tell me how did you use it and remember to tell the others how  I&#8217;ve helped you with this simple tutorial! I will apreciate it a lot!</p>
<p>Have a nice week and see you here soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-scratch-part-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build a simple semantically valid carousel from scratch (part 3)</title>
		<link>http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-scratch-part-3/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=build-a-simple-semantically-valid-carousel-from-scratch-part-3</link>
		<comments>http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-scratch-part-3/#comments</comments>
		<pubDate>Tue, 20 Mar 2012 06:48:48 +0000</pubDate>
		<dc:creator>Diego La Monica</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[carousel]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[progressive enhancement]]></category>

		<guid isPermaLink="false">http://diegolamonica.info/?p=463</guid>
		<description><![CDATA[After we&#8217;ve made a proof analysis of the Carousel, thinking about it&#8217;s structure and making it strictly semantic, we&#8217;ve discussed about the presentation using only CSS if javascript would not be available. The result is acceptable and works fine in the most browsers. But in this article we will wet our hands into jQuery and [...]]]></description>
			<content:encoded><![CDATA[<p>After we&#8217;ve made <a title="Build a simple semantically valid carousel from scratch (part 1)" href="http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-the-scratch-part-1/">a proof analysis of the Carousel</a>, thinking about it&#8217;s structure and making it strictly semantic, we&#8217;ve discussed <a title="Build a simple semantically valid carousel from scratch (part 2)" href="http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-scratch-part-2/">about the presentation using only CSS</a> if javascript would not be available. The result is acceptable and works fine in the most browsers. But in this article we will wet our hands into jQuery and make our Carousel really cool!<span id="more-463"></span></p>
<p>First of all, we have to understand the basis of <a href="http://docs.jquery.com/Plugins/Authoring">jQuery plugin developement</a>.</p>
<p>To make something as a jQuery plugin you have to declare it as a jQuery function.</p>
<pre class="code js">jQuery.fn.myPlugin = function(options){
}</pre>
<p>in this way we can call myPlugin as it were a jQuery object method.</p>
<pre class="code js">jQuery('#my-element').myPlugin();</pre>
<p>Cool! True?</p>
<p><strong>myPlugin</strong> method would be called in the selected object context. In the above case <strong>#my-element</strong> (remember that the prototype of each element has been modified by jQuery) would be the “this” object inside the method or, if the selector embrace more elements of the DOM, it will be an array of jQuery elements.</p>
<p>Usually a jQuery plugin will return the &#8220;this&#8221; object to grant the chainability. So, to ensure that our plugin will work with both single object and array of objects, we can just use the syntax:</p>
<pre class="code js">jQuery.fn.myPlugin = function(options){
    return this.each(function(){ /* Our plugin code goes here */ });
}</pre>
<p>The above function executed on each item of the array or to the single selected item by the CSS selector will manipulate the DOM node to make our carousel true.</p>
<h2>Developing the carousel</h2>
<p>Let&#8217;s start our plugin implementation thinking about what informations will be unchangeable by the user and which one should be computed then plugin options.</p>
<p>The size of items as described in the analysis is not specified, so we should define them in the configuration phase. Same for the opacity and for the speed of animation. Considered that we should think as the most of jQuery plugins were developed, they store a set of default options so if the user would define only some of them it can do it and the plugin will care about merging the two objects and get a complet set for the new options object.</p>
<pre class="code js">var defaultOptions = {
    maxSize: 120,
    midSize: 110,
    minSize: 80,
    maxOpacity: 1,
    midOpacity: 0.6,
    minOpacity: 0.3,
    speed: 1500
}

if(options==null) options = [];
options = jQuery.extend(defaultOptions, options);</pre>
<p>using extend method against merge, you will merge the defaultOptions object overriding its value with those one defined in the options object.</p>
<p>Another significant element that we will reuse inside the script would be the base object that will be always an equivalent of this but never overrided by the this regardles to the context.</p>
<p>Now let&#8217;s build simply the core of our plugin.</p>
<p>First of all we create the two navigation links:</p>
<pre class="code js">jQuery(base).
    prepend('&lt;a class="nav go-prev" href="#"&gt;Prev&lt;/a&gt;&lt;a href="#" class="nav go-next"&gt;Next&lt;/a&gt;');
    jQuery('.nav',base).css({
        height: jQuery(base).innerHeight() + 'px',
        display: 'block'
    });
    jQuery('&gt;.nav.go-prev', base).css('float','left').click(movePrev);
    jQuery('&gt;.nav.go-next', base).css('float','right').click(moveNext);</pre>
<p>Then we will reset the style rules defined in the css:</p>
<pre class="code js">jQuery(base).css('overflow', 'hidden');
jQuery('&gt;ul',base).css({
    marginLeft: jQuery('&gt;.nav', base).outerWidth() + 'px',
    width: (jQuery(base).innerWidth() - jQuery('&gt;.nav', base).outerWidth()*2) + 'px',
    padding: 0,
    height: jQuery(base).innerHeight() + 'px',
    display: 'block'
});</pre>
<p>then invoking 2 methods: one that is able to hide the list items not currently visible, the other that will organize the elements in the ul area.</p>
<pre class="code js">hideTheExceding();
locateElements();</pre>
<p><strong>hideTheExceding()</strong> will cycle for each item of the array and will apply the defined opacity for the visible items and:</p>
<ol>
<li>hide the elements actually not visible,</li>
<li>set to current the class for the central item,</li>
<li>set to near the class for the items placed on the direct side of the current item</li>
<li>set to far the class for the items farest from the current.</li>
</ol>
<p><strong>LocateElements()</strong> will place the items in the area considering that:</p>
<ul>
<li>the current item will be placed to the center of the screen and will be sized ,</li>
<li>the far item will be placed to the border of the carousel with a margin of 10px</li>
<li>the near item will be placed between the two above items.</li>
</ul>
<p>the location will be calculating the median of each item. For example the .current item will be placed in the centre of the screen. To calculate how (x,y) coords must be placed we get the half of the container (ul) inner width and subtract the half outer width for the current item.</p>
<pre>CurrentX = (ULWidth – CurrentWidth)/2</pre>
<p>The computing of FarX position would differ if located to the left or to the right of the page. In case of element located to the left we&#8217;ll place it 10px far from the border. If On the right it will be placed however on 10px from the border but we must set the position as:</p>
<pre>FarXR = ULWidth - 10px - MinSize</pre>
<p>The middle item will be placed just in the middle of two items. To calculate it we have to calculate the median of each item and then identify an exact point in the middle of them. The NearItem median is equidistant from the <em>CurrentItem median</em> and <em>FarItem median</em> but you have to calculate half medium size to place the nearItem centered respect to its median.</p>
<p>In this article we have placed the items in the carousel, in the next article we will see how to animate the carousel Elements implementing the moveNext and movePrev methods.</p>
<p><a href="http://diegolamonica.info/demo/simple-semantic-carousel/js.htm">An example is available here</a>.</p>
<p>Have a nice working week and stay tuned&#8230; I&#8217;ll come back soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-scratch-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build a simple semantically valid carousel from scratch (part 2)</title>
		<link>http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-scratch-part-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=build-a-simple-semantically-valid-carousel-from-scratch-part-2</link>
		<comments>http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-scratch-part-2/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 08:00:10 +0000</pubDate>
		<dc:creator>Diego La Monica</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[carousel]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[semantic]]></category>

		<guid isPermaLink="false">http://diegolamonica.info/?p=459</guid>
		<description><![CDATA[In the previous part of this article we had structured the HTML for our carousel, it has a strongly semantic structure. But it is only HTML. In this article we will discuss how to implement an acceptable style sheet in absence of Javascript in honor of Progressive Enhancement! Styling the elements. The goal of this [...]]]></description>
			<content:encoded><![CDATA[<p>In <a title="Build a simple semantically valid carousel from scratch (part 1)" href="http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-the-scratch-part-1/">the previous part of this article</a> we had structured the HTML for our carousel, it has a strongly semantic structure. But it is only HTML. In this article we will discuss how to implement an acceptable style sheet in absence of Javascript in honor of Progressive Enhancement!</p>
<p><span id="more-459"></span></p>
<p><a href="http://diegolamonica.info/wp-content/uploads/2012/03/3D-Carousel.png"><img class="alignnone size-full wp-image-455" title="Scratch #1 - Simple carousel" src="http://diegolamonica.info/wp-content/uploads/2012/03/3D-Carousel.png" alt="" width="685" height="480" /></a></p>
<h2>Styling the elements.</h2>
<p>The goal of this series of article is to get a carousel as shown in the above image and as described in <a title="Build a simple semantically valid carousel from scratch (part 1)" href="http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-the-scratch-part-1/">the previous part of this article</a>. But in absence of Javascript, we need to make something that can be graceful as is and, in the limit of the semantic (no further tag must be introduced to the structure) we can think to something like this:</p>
<p><a href="http://diegolamonica.info/wp-content/uploads/2012/03/scratch-carousel-css.png"><img class="alignnone size-full wp-image-462" title="scratch-carousel-css" src="http://diegolamonica.info/wp-content/uploads/2012/03/scratch-carousel-css.png" alt="" width="674" height="263" /></a></p>
<p>The size of my carousel would be 600 pixels width and 200 pixel height. Just to debug the occupation in the page I set its background color to a light safe color grey and a border to a little bit darker gray than the background. Just to ensure that all the contained elements will fit the entire size i will set the padding to 0.</p>
<p>Of course, the margin is set to auto to auto-center the container into the area he was placed. But I should set it to occupy the entire width of the contained area. I can just do it by removing width property. The <strong>overflow: auto</strong> property is set  to ensure that the carousel (or at least its content) would be usable without Javascript too. Yes! I&#8217;m minding <a title="A List Apart - Understanding Progressive Enhancement" href="http://www.alistapart.com/articles/understandingprogressiveenhancement">Progressive Enhancement</a>. Then let&#8217;s format the unordered list and its list items! The first thing we would do is to reset the common list container and list items default styles:</p>
<pre class="code css">#my-carousel ul,
#my-carousel li{
    padding: 0;
    list-style: none;
    list-style-type: none;
}</pre>
<p>Then we will make sure that the UL will fit the entire area and resetting its margin.</p>
<pre class="code css">#my-carousel ul{
    position: relative;
    width: 100%;
    margin: 0;
}</pre>
<p>And in the end, we want to display just the 5 elements from the list no one more!</p>
<p>Each item will occupy a 20% of the available space including eventual margin, so we define a width of 16% of total width and a margin on both left and right of 2%.</p>
<p>Using the box-sizing property we ensure that the 16% of the content will count the 1px border too and an hypothetical internal padding. In the following way we make a cross-browser box-sizing. To avoid the overflow of the contents just tell it to be hidden.</p>
<pre class="code css">#my-carousel li{
    display: block;
    border: 1px solid #ccc;
    overflow: hidden;
    width: 16%;
    margin: 2%;
    float: left;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    height: 100px;
}</pre>
<p>If you want you can <a title="Improving jQuery Infinite Carousel (part two)" href="http://diegolamonica.info/demo/simple-semantic-carousel/css.htm">see the stylized carousel in action</a>. In the next week we will build our jQuery Simple Semantic Carousel Plug-in.</p>
<p>Stay tuned and happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-scratch-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Build a simple semantically valid carousel from scratch (part 1)</title>
		<link>http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-the-scratch-part-1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=build-a-simple-semantically-valid-carousel-from-the-scratch-part-1</link>
		<comments>http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-the-scratch-part-1/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 08:00:17 +0000</pubDate>
		<dc:creator>Diego La Monica</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Varie]]></category>
		<category><![CDATA[carousel]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[scratch]]></category>

		<guid isPermaLink="false">http://diegolamonica.info/?p=454</guid>
		<description><![CDATA[In the latest day I wonder how to build a carousel like iTunes coverflow but more simpler. First of all we&#8217;ll make a checklist of requirements, second we&#8217;ll make a scratch of the carousel, third we&#8217;ll analyze each element of the scratch, which is their role in the context and at the end we will [...]]]></description>
			<content:encoded><![CDATA[<p>In the latest day I wonder how to build a carousel like iTunes coverflow but more simpler.</p>
<p>First of all we&#8217;ll make a checklist of requirements, second we&#8217;ll make a scratch of the carousel, third we&#8217;ll analyze each element of the scratch, which is their role in the context and at the end we will develop the jQuery solution.</p>
<p><span id="more-454"></span></p>
<h2>Requirements and scratches</h2>
<p>Our carousel should have 5 visible elements at time: one in the center and other on both sides of central element. The elements would become transparent as they assumes a far position from the center of the carousel. The distant elements, must be smaller than the intermediate elements, which in turn must be smaller than the central element.</p>
<p>Starting with the above idea in mind, I made a scratch of the carousel as you can see in the image below.</p>
<p><a href="http://diegolamonica.info/wp-content/uploads/2012/03/3D-Carousel.png"><img class="alignnone size-full wp-image-455" title="Scratch #1 - Simple carousel" src="http://diegolamonica.info/wp-content/uploads/2012/03/3D-Carousel.png" alt="" width="685" height="480" /></a></p>
<p>So, we have a main container that encloses our carousel, the item container and two navigation elements placed on both left and right sides of the carousel, inside the main container.</p>
<p>Items into the carousel will be classified depending on their current position:</p>
<ul>
<li>Current Item is the current visible item in the carousel</li>
<li>Near Item is the first item near the carousel, placed in the middle of our carousel..</li>
<li>Far Item is the item at the border of the carousel</li>
</ul>
<p>At this point is obviously clear how to structure the carousel to make it semantically valid.</p>
<ol>
<li>The carousel is a list of items. Sorted? Unordered? It does not matter, it could matter only if think that the information inside the carousel makes their sense if read sequentially, else we can use an unordered list.</li>
<li>The navigation items are simply hyperlinks to nothing.</li>
<li>The main container is a “div” element. It can host inline elements and blocklevel elements (the unodered list) and inline elements (the hyperlinks).</li>
</ol>
<p>I was just thinking about that:</p>
<p><a href="http://diegolamonica.info/wp-content/uploads/2012/03/3DCarousel-HTML.png"><img class="alignnone size-full wp-image-456" title="Scratch #2 - HTML Elements" src="http://diegolamonica.info/wp-content/uploads/2012/03/3DCarousel-HTML.png" alt="" width="685" height="480" /></a></p>
<p>But what we need to create by hand? And what not?</p>
<p>We will create the main container and the unordered list too, but we will not create the navigation links because they will be produced by javascript.</p>
<pre class="code xml">&lt;div id="my-carousel"&gt;
    &lt;ul&gt;
        &lt;li&gt;Item #1&lt;/li&gt;
        &lt;li&gt;Item #2&lt;/li&gt;
        &lt;li&gt;Item #3&lt;/li&gt;
        &lt;li&gt;Item #4&lt;/li&gt;
        &lt;li&gt;Item #5&lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;</pre>
<p>The above structure, without stylesheet and javascript, will be semantically valid. The next week we will produce the CSS and wetting our hands with jQuery plugin developement.</p>
<p>Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://diegolamonica.info/build-a-simple-semantically-valid-carousel-from-the-scratch-part-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Improving jQuery Infinite Carousel (part two)</title>
		<link>http://diegolamonica.info/improving-jquery-infinite-carousel-part-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=improving-jquery-infinite-carousel-part-2</link>
		<comments>http://diegolamonica.info/improving-jquery-infinite-carousel-part-2/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 08:00:07 +0000</pubDate>
		<dc:creator>Diego La Monica</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Varie]]></category>
		<category><![CDATA[carousel]]></category>
		<category><![CDATA[infinite carousel]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[swipe]]></category>
		<category><![CDATA[tablet]]></category>

		<guid isPermaLink="false">http://diegolamonica.info/?p=451</guid>
		<description><![CDATA[Just few days ago I described how to make the Infinite Carousel flexible. In this tutorial I would like to describe you how to solve some bugs introduced by the previous article (just an improvement) and how to implement the swipe event into this carousel. Issue #1 &#8220;the truncated images count as full view images&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>Just few days ago I described <a title="Improving jQuery Infinite Carousel (part one)" href="http://diegolamonica.info/improving-jquery-infinite-carousel-part-1/">how to make the Infinite Carousel flexible</a>. In this tutorial I would like to describe you how to solve some bugs introduced by the previous article (just an improvement) and how to implement the swipe event into <a href="http://diegolamonica.info/demo/flexible-infinite-carousel/">this carousel</a>.</p>
<p><span id="more-451"></span></p>
<h2>Issue #1 &#8220;the truncated images count as full view images&#8221;</h2>
<p>Each item has an exact size, in our case it is 105px x 105px. So if the wrapper of the carousel has a width multiple of 105px nothing goes wrong. But if the wrapper is bitter greater than multiple of 105px (for example 317px), the pagination break to work properly. This is because in an exact point of the script we are counting the number of contained items in the wrapper rounded by excess ( ceil function in javascript ).</p>
<p>So what we need to do, teorically, is just to change the used method from <strong>ceil</strong> (rounding by excess) to <strong>floor</strong> (rounding by defect) in the following instruction:</p>
<pre class="code js">$wrapper.visible = Math.ceil($wrapper.innerWidth() / singleWidth),</pre>
<p>This will solve all our problems.</p>
<h3>Issue #2 &#8220;Handling the swipe&#8221;</h3>
<p>Managing the swipe gesture is not so simple, than we could proceed in two ways.</p>
<p>The first is to handle the touchstart/touchend events, identify the gesture calculating the angle of movement and in dependence of it raising the exact event (swipe to left, swipe to right). How to do that?</p>
<p>The way i thing it would be correct to manage the swipe is:</p>
<ol>
<li>handling the touchstart event to grab the first point where the touch begins</li>
<li>handling the touchmove event to grab all the points where the user is swiping</li>
<li>for each time that the touchmove event is raised, you have to calculate if all points are on the same line with tollerance. If it is not so we keep care to untrack the next movements and release all user resource.</li>
<li>reached the minimum distance and ensured that the user is swiping (the above point 3) we can raise a custom event onSwipe where you can describe the distance from the base point, the speed,   the angle the start point and the end point.</li>
</ol>
<div>Too hard? Well let&#8217;s make the things simplest!</div>
<p>Another much simpler way to do this, is integrating the <a href="http://plugins.jquery.com/project/Touchwipe-iPhone-iPad-wipe-gesture">jQuery Touchwipe plugin</a> into our pages and leave it the hard work. This plugin works almost fine but it is acceptable for our goal.</p>
<p>It can manage the 4 directions (left, right, up and down) we need just the left and right direction. But what do it not do?</p>
<p>It does not give us the speed, angle or if the gesture is exactly a swipe: you could make a wavy movement and the swipe will be raised if the X or Y distance between start point and end point will be at least the minimum defined.</p>
<p>So the only things we need to do are:</p>
<ol>
<li>Creating just 2 new methods in the Carousel Javascript: <strong>gotoNext()</strong> and <strong>gotoPrev()</strong> just after the <strong>gotoPage()</strong> method. Is goal is to move the carousel to the next page and to the previous page.</li>
<li>Including in our pages the jQuery Touchwipe plugin</li>
<li>Attaching it to the carousel and</li>
<li>Configuring its behavior.</li>
</ol>
<p>The gotoNext and gotoPrev methods will be simply:</p>
<pre class="code js">function gotoNext(){
return gotoPage(currentPage+1);
};

function gotoPrev(){
return gotoPage(currentPage-1);
};</pre>
<p>Then we have to attach the  swipe plugin to the wrapper then configure its behavior in this way:</p>
<pre class="code js">$wrapper.touchwipe({
wipeLeft: function(){
gotoNext();
},
wipeRight: function(){
gotoPrev();
}
});</pre>
<p>Our plugin now works with swipe and buttons on touchscreen that implements the touch events and works with navigation buttons on desktop browser and mobile device that does not support the touch (but support at least javascript :-) ).</p>
<p>I made a <a href="http://diegolamonica.info/wp-content/uploads/2012/02/swipe-flexible-infinite-carousel.zip">package with the full source code</a> (css, javascript, dependencies and used html), and a <a href="http://diegolamonica.info/demo/swipe-flexible-infinite-carousel/">working demo</a>.</p>
<p>Happy coding to all!</p>
]]></content:encoded>
			<wfw:commentRss>http://diegolamonica.info/improving-jquery-infinite-carousel-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Improving jQuery Infinite Carousel (part one)</title>
		<link>http://diegolamonica.info/improving-jquery-infinite-carousel-part-1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=improving-jquery-infinite-carousel-part-1</link>
		<comments>http://diegolamonica.info/improving-jquery-infinite-carousel-part-1/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 08:00:07 +0000</pubDate>
		<dc:creator>Diego La Monica</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[carousel]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[flexible]]></category>
		<category><![CDATA[improvements]]></category>
		<category><![CDATA[infinite carousel]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[tablet]]></category>

		<guid isPermaLink="false">http://diegolamonica.info/?p=446</guid>
		<description><![CDATA[Recently i was looking for a jQuery Carousel and the most interesting I found was the one proposed by jQuery For Designers, but it has a lot of limitations that I would bypass because I&#8217;d like to use the carousel in a full block context and second because I want use the &#8220;Swipe&#8221; touch gesture [...]]]></description>
			<content:encoded><![CDATA[<p>Recently i was looking for a jQuery Carousel and the most interesting I found was <a title="jQuery Infinite Carousel" href="http://jqueryfordesigners.com/jquery-infinite-carousel/">the one</a> proposed by <a href="http://jqueryfordesigners.com/">jQuery For Designers</a>, but it has a lot of limitations that I would bypass because I&#8217;d like to use the carousel in a full block context and second because I want use the &#8220;Swipe&#8221; touch gesture to scroll the carousel (tablet context).  Let&#8217;s see how I&#8217;ve solved them and improved the Carousel!</p>
<h3><span id="more-446"></span>Issue #1: &#8220;fixed carousel width should be flexible to the width of the container&#8221;</h3>
<p>In the <a href="http://jqueryfordesigners.com/demo/infinite-carousel.html">original file</a> (read the source code), you can observe that the <strong>.infiniteCarousel</strong> class properties sets the width to 395 pixels, and the contained item to 315 pixels:</p>
<pre class="code css">.infiniteCarousel {
  width: 395px;
  position: relative;
}

.infiniteCarousel .wrapper {
  width: 315px; /* .infiniteCarousel width - (.wrapper margin-left + .wrapper margin-right) */
  overflow: auto;
  min-height: 10em;
  margin: 0 40px;
  position: absolute;
  top: 0;
}</pre>
<p>To make the carousel flexible, I&#8217;ve changed those two class properties into the new ones:</p>
<pre class="code css">.infiniteCarousel {
  min-width: 395px; /* now this is the minimal allowed width */
  width: 100%; /* adapt the width to the container */
  position: relative;
}

.infiniteCarousel .wrapper {
  min-width: 315px; /* .infiniteCarousel width - (.wrapper margin-left + .wrapper margin-right) */
  overflow: auto;
  min-height: 10em;
  margin: 0 40px;
  position: relative;
  top: 0;
}</pre>
<p>Then I made a minor change to the &#8220;<strong>.infiniteCarousel .arrow</strong>&#8221; CSS rule, because a less than symbol (&#8220;&lt;&#8221;) appears in the middle of my screen.</p>
<pre class="code css">text-indent: -9999px;</pre>
<p>With the above code we have solved the first issue. But now we have introduced a new issue. You can notice it only if you are looking at the new carousel through a tablet browser. Which one? Let&#8217;s rotate your tablet by 90° (obiviously if your tablet has the rotation sensor!!! :) ) and take a look to the carousel. You&#8217;ve seen the breaking issue? No? Try to use the left and right arrow buttons of the carousel!</p>
<p>What? Which one of you told me that the issue is in the desktop browser window resizing too? Yes I know! We have to solve that first.</p>
<h3>Issue #2 (raised by resolution of Issue #1): &#8220;Window resizing/tablet rotation causes the carousel to not work properly&#8221;</h3>
<p>Supposing that you have understand how the original infinite Carousel works (there&#8217;s no better read than take a look to <a href="http://jqueryfordesigners.com/jquery-infinite-carousel/">the original post</a>)  let&#8217;s alter the javascript.</p>
<p>The first thing we need to handle is the resize event of the window and keep the carousel object context we create to recalculate some information that changes during resize. So, let&#8217;s create the handler into the &#8220;<strong>infiniteCarousel</strong>&#8221; function.</p>
<pre class="code js">$(window).resize(recalculateAfterResize);</pre>
<p>but what need to be calculated after the resize event?</p>
<ol>
<li>the width of visible area;</li>
<li>the number of pages which the carousel has;</li>
<li>the empty items;</li>
<li>the cloned items;</li>
</ol>
<p>Well so the first thing we have in that function will be the removal of the nodes with class <strong>.cloned</strong> and <strong>.empty</strong> to ensure to have a clean (original) condition.</p>
<pre class="code js">$('.empty', $wrapper).remove();
$('.cloned', $wrapper).remove();</pre>
<p>After that we perform the tasks #1 and #2 of the above list.</p>
<pre class="code js">$items = $slider.find('&gt; li');
$wrapper.visible = Math.ceil($wrapper.innerWidth() / singleWidth), // note: doesn't include padding or border
$wrapper.pages = Math.ceil($items.length / $wrapper.visible);</pre>
<p>Let&#8217;s count the number of empty items to create.</p>
<pre class="code js">// 1. Pad so that 'visible' number will always be seen, otherwise create empty items
if (($items.length % $wrapper.visible) != 0) {
$slider.append(repeat('&lt;li /&gt;', $wrapper.visible - ($items.length % $wrapper.visible)));
$items = $slider.find('&gt; li');
}</pre>
<p>Clone the required items:</p>
<pre class="code js">// 2. Top and tail the list with 'visible' number of items, top has the last section, and tail has the first
$items.filter(':first').before($items.slice(- $wrapper.visible).clone().addClass('cloned'));
$items.filter(':last').after($items.slice(0, $wrapper.visible).clone().addClass('cloned'));</pre>
<p>Then reset the scroll to the first available item of the carousel:</p>
<pre class="code js">$items = $slider.find('&gt; li'); // reselect
$wrapper.scrollLeft(singleWidth * $wrapper.visible);
page = 1</pre>
<p>At this point we should have a method like that:</p>
<pre class="code js">function recalculateAfterResize(){
    // Reset to the original carousel condition
    $('.empty', $wrapper).remove();
    $('.cloned', $wrapper).remove();
    $items = $slider.find('&gt; li');
    $wrapper.visible = Math.ceil($wrapper.innerWidth() / singleWidth), // note: doesn't include padding or border
    $wrapper.pages = Math.ceil($items.length / $wrapper.visible);
    // 1. Pad so that 'visible' number will always be seen, otherwise create empty items
    if (($items.length % $wrapper.visible) != 0) {
        $slider.append(repeat('&lt;li /&gt;', $wrapper.visible - ($items.length % $wrapper.visible)));
        $items = $slider.find('&gt; li');
    }
    // 2. Top and tail the list with 'visible' number of items, top has the last section, and tail has the first
    $items.filter(':first').before($items.slice(- $wrapper.visible).clone().addClass('cloned'));
    $items.filter(':last').after($items.slice(0, $wrapper.visible).clone().addClass('cloned'));
    $items = $slider.find('&gt; li'); // reselect
    $wrapper.scrollLeft(singleWidth * $wrapper.visible);
    page = 1;
}</pre>
<p>Just put it after the declaration section inside the &#8220;<strong>return this.each</strong>&#8221; function and remove the following variables from declaration section:</p>
<ul>
<li>visible</li>
<li>pages</li>
</ul>
<p>The last thing to do is to remove the redundant code (all the code identified by the comments <strong>//1. &#8230;</strong> , <strong>//2. &#8230;</strong> and <strong>//3. &#8230;</strong> ) then substitute the removed blocks with a single call to the above function <strong>recalculateAfterResize()</strong>;</p>
<p>For a cleaner reading I have separated the code in three files: CSS, Javascript and HTML. You can find them in the <a href="http://diegolamonica.info/wp-content/uploads/2012/02/flexible-infinite-carousel.zip">example file</a> or look at the <a href="http://diegolamonica.info/demo/flexible-infinite-carousel/">demo</a> that I just made for you!</p>
<p>In the next article i will describe how manage the swipe effect in the simplest way and improve some other minor things in the Carousel! Stay tuned. And happy Coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://diegolamonica.info/improving-jquery-infinite-carousel-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disattivare la verifica del certificato di sicurezza su WordPress</title>
		<link>http://diegolamonica.info/disattivare-la-verifica-del-certificato-di-sicurezza-su-wordpress/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=disattivare-la-verifica-del-certificato-di-sicurezza-su-wordpress</link>
		<comments>http://diegolamonica.info/disattivare-la-verifica-del-certificato-di-sicurezza-su-wordpress/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 19:00:05 +0000</pubDate>
		<dc:creator>Diego La Monica</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[certificate verify failed]]></category>
		<category><![CDATA[Feed RSS]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[SSL certificate problem]]></category>
		<category><![CDATA[WP HTTP Error]]></category>

		<guid isPermaLink="false">http://diegolamonica.info/?p=445</guid>
		<description><![CDATA[In questi giorni mi è capitato di dovermi confrontare con la gestione dei feed RSS prodotti da GitHub che stranamente da WordPress non vengono letti correttamente. Interrogando qualsiasi altro feed da WordPress tutto funziona regolarmente ma considerando che GitHub fornisce i suoi feed RSS su protocollo sicuro http (HTTPS), ne ho dedotto che il problema [...]]]></description>
			<content:encoded><![CDATA[<p>In questi giorni mi è capitato di dovermi confrontare con la gestione dei feed RSS prodotti da GitHub che stranamente da WordPress non vengono letti correttamente.</p>
<p><span id="more-445"></span>Interrogando qualsiasi altro feed da WordPress tutto funziona regolarmente ma considerando che GitHub fornisce i suoi feed RSS su protocollo sicuro http (HTTPS), ne ho dedotto che il problema fosse proprio nel certificato.</p>
<p>Forse perchè l&#8217;authority per la certificazione non risulta tra quelle previste dal server su cui risiede WordPress, oppure perchè c&#8217;è una qualsiasi altra configurazione del server che non consente una validazione del Certificato di Sicurezza, il risultato è che non sarebbe possibile interrogare un feed RSS di GitHhub, ottenendo in compenso questo simpatico messaggio di errore:</p>
<pre><strong>RSS Error</strong>:
WP HTTP Error: SSL certificate problem, verify that the CA cert is OK.
Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed</pre>
<p>Ma come ben sapete &#8220;non è possibile&#8221; non fa parte del mio vocabolario, quindi mi sono spulciato il codice della classe Http di WordPress e facendo un po&#8217; di reverse engignering sono arrivato alla soluzione del problema.</p>
<p>Per evitare che WordPress faccia la verifica del certificato basta mettere nel file functions del proprio tema questa semplice riga di codice:</p>
<pre class="code php">add_filter('https_ssl_verify', '__return_false');</pre>
]]></content:encoded>
			<wfw:commentRss>http://diegolamonica.info/disattivare-la-verifica-del-certificato-di-sicurezza-su-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Suggerimenti sull&#8217;uso di SVN/TRAC</title>
		<link>http://diegolamonica.info/suggerimenti-sulluso-di-svntrac/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=suggerimenti-sulluso-di-svntrac</link>
		<comments>http://diegolamonica.info/suggerimenti-sulluso-di-svntrac/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 11:45:25 +0000</pubDate>
		<dc:creator>Diego La Monica</dc:creator>
				<category><![CDATA[Corsi e Seminari]]></category>
		<category><![CDATA[buone pratiche]]></category>
		<category><![CDATA[corsi]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://diegolamonica.info/?p=444</guid>
		<description><![CDATA[Qualche mese fa ho tenuto una sessione formativa prettamente pratica sull&#8217;utilizzo di SVN per lo sviluppo in team e TRAC per la gestione delle anomaile. Le slide che seguono sono da ritenersi più un how-to e best practice sull&#8217;utilizzo dei due strumenti. Mi auguro che il materiale sia di vostro gradimento.]]></description>
			<content:encoded><![CDATA[<p>Qualche mese fa ho tenuto una sessione formativa prettamente pratica sull&#8217;utilizzo di SVN per lo sviluppo in team e TRAC per la gestione delle anomaile.</p>
<p><span id="more-444"></span></p>
<p>Le slide che seguono sono da ritenersi più un how-to e best practice sull&#8217;utilizzo dei due strumenti.</p>
<iframe src="http://www.slideshare.net/slideshow/embed_code/11267212" width="565" height="462" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe><br/><br/>
<p>Mi auguro che il materiale sia di vostro gradimento.</p>
]]></content:encoded>
			<wfw:commentRss>http://diegolamonica.info/suggerimenti-sulluso-di-svntrac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Come aggiornare un repository Github attraverso il proxy</title>
		<link>http://diegolamonica.info/come-aggiornare-un-repository-github-attraverso-il-proxy/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=come-aggiornare-un-repository-github-attraverso-il-proxy</link>
		<comments>http://diegolamonica.info/come-aggiornare-un-repository-github-attraverso-il-proxy/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 09:58:01 +0000</pubDate>
		<dc:creator>Diego La Monica</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[configurazione]]></category>
		<category><![CDATA[Github]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[netcat]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://diegolamonica.info/?p=442</guid>
		<description><![CDATA[Non utilizzando sempre lo stesso computer e la stessa connessione ad internet, mi capita talvolta di dover effettuare gli aggiornamenti del repository di ALPHA attraverso un proxy aziendale. Per riuscire però ad effettuare i commit attraverso il Proxy che non consente l&#8217;acceso ssh al server github.com ho fatto diverse ricerche su internet, provando le più [...]]]></description>
			<content:encoded><![CDATA[<p>Non utilizzando sempre lo stesso computer e la stessa connessione ad internet, mi capita talvolta di dover effettuare gli aggiornamenti del <a href="https://github.com/diegolamonica/ALPHA/">repository di ALPHA</a> attraverso un proxy aziendale.</p>
<p>Per riuscire però ad effettuare i commit attraverso il Proxy che non consente l&#8217;acceso ssh al server github.com ho fatto diverse ricerche su internet, provando le più diverse strade.</p>
<p><span id="more-442"></span></p>
<p>C&#8217;era chi suggeriva di creare un file wrapper per il proxy seguendo un procedimento alquanto semplice:</p>
<ul>
<li>Installare netcat</li>
<li>creare uno script da shell collocandolo nella directory bin/ dell&#8217;utente che riportava in sintesi questo comando &#8220;<strong>nc -x${PROXY_IP}:${PROXY_PORT} -X5 $*</strong>&#8220;</li>
<li>configurare il parametro <strong>core.gitproxy</strong> indicando il nome del file precedentemenet creato.</li>
</ul>
<p>Per me non ha funzionato e comunque questa procedura a mio avviso poteva essere  semplificata ulteriormente utilizzando questi due semplici comandi eseguiti da shell.</p>
<pre class="code shell">EXPORT http_proxy=http://myproxy:8080
EXPORT https_proxy=http://myproxy:8080</pre>
<p>Non li metterei come valori persistenti perchè, usando il notebook su diverse reti rischierei di non raggiungere il proxy specificato con conseguenza dell&#8217;interruzione della navigazione.</p>
<p>Comunque non ha funzionato. Quindi ho cercato una nuova soluzione al problema.</p>
<p>Un altro sito suggeriva di usare l&#8217;url proposto da github nella versione <strong>https</strong> al posto di quello <strong>ssh</strong>.</p>
<p>Ho fatto un tentativo e non riuscivo nemmeno a clonare il repository remoto ricevendo come risposta &#8220;<em><strong>warning: remote HEAD refers to nonexistent ref, unable to checkout.</strong></em>&#8220;. Quindi ho temuto che fosse un problema del mio repository remoto. Per fortuna anche con il <a href="https://github.com/jquery/jquery">repository di JQuery</a> mi segnalava lo stesso errore. E lo faceva con qualsiasi repository provassi a clonare. Quindi il repository non aveva problemi.</p>
<p>Ho provato a fare un mix tra le soluzioni &#8220;installazione netcat&#8221; e &#8220;https al posto di ssh&#8221; ma comunque non ho avuto il risultato sperato quindi ho continuato nella ricerca della soluzione fino ad incappare in <a href="http://bettercodes.org/answers/working-with-git">questa discussione</a>!</p>
<p>Grazie a quanto è scritto nella discussione precedente ho cominciato a fare un po&#8217; di prove giocando sull&#8217;url per la richiesta del repository.</p>
<p>La soluzione in fondo era più semplice di quanto si pensasse.</p>
<p>Partendo dall&#8217;url di aggiornamento del repository fornito da github in formato https (https://user@github.com/user/repository.git), ho inserito anche la password dell&#8217;account github e ho fatto viaggiare la richiesta su protocollo http (<strong>non sicuro</strong>). Quindi l&#8217;url utilizzato in fine è stato:</p>
<pre class="code shell"><strong>http:</strong>//user<strong>:password</strong>@github.com/user/repository.git</pre>
<p>In questo modo ha funzionato tutto correttamente e sono libero di aggiornare il mio framework da, come direbbero gli americani, &#8220;ognidove&#8221;! :)</p>
]]></content:encoded>
			<wfw:commentRss>http://diegolamonica.info/come-aggiornare-un-repository-github-attraverso-il-proxy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Se anche i privati potessero scaricare l&#8217;IVA</title>
		<link>http://diegolamonica.info/se-anche-i-privati-potessero-scaricare-l-iva/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=se-anche-i-privati-potessero-scaricare-l-iva</link>
		<comments>http://diegolamonica.info/se-anche-i-privati-potessero-scaricare-l-iva/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 08:06:16 +0000</pubDate>
		<dc:creator>Diego La Monica</dc:creator>
				<category><![CDATA[Varie]]></category>
		<category><![CDATA[affari]]></category>
		<category><![CDATA[evasione]]></category>
		<category><![CDATA[finanza]]></category>
		<category><![CDATA[lavoro]]></category>
		<category><![CDATA[manovra]]></category>
		<category><![CDATA[pensioni]]></category>
		<category><![CDATA[politica]]></category>

		<guid isPermaLink="false">http://diegolamonica.info/?p=440</guid>
		<description><![CDATA[Di questi tempi, con la crisi che ci attanaglia, siamo diventati tutti esperti di politica socio-economica, economia internazionale e squali della finanza mondiale! Mi domando quindi perchè non potrei partecipare anche io al dibattito nazionale? Non sarò un esperto di economia ma, visto che parlano tutti di economia, penso di non aver minor diritto di [...]]]></description>
			<content:encoded><![CDATA[<p>Di questi tempi, con la crisi che ci attanaglia, siamo diventati tutti esperti di politica socio-economica, economia internazionale e squali della finanza mondiale!</p>
<p>Mi domando quindi perchè non potrei partecipare anche io al dibattito nazionale? Non sarò un esperto di economia ma, visto che parlano tutti di economia, penso di non aver minor diritto di altri a chiacchierare. Non lo farò con la voce ma ci proverò con questo articolo sul mio blog. Almeno non sarete costretti ad ascoltarmi!<span id="more-440"></span></p>
<p>Non mi soffermerò a lamentarmi dei parlamentari che guadagnano 2 volte quello che guadagnano gli altri parlamentari in altri paesi d&#8217;Europa. Una persona che lavora al servizio del paese merita ogni centesimo che prende, se lavora bene.</p>
<p>Non voglio raccontare del sistema Europa che non vuole salvare l&#8217;Italia o del conto alla rovescia che ci separa dal defaul in stile profezia Maya.</p>
<p>Non voglio lamentarmi delle pensioni, perchè, già quando iniziai a lavorare, ero consapevole che quanto versavo nelle casse dell&#8217;ente previdenziale sarebbe andato a favore dei pensionati attuali e che il Paese non avrebbe potuto garantirmi alcuna pensione,  trovandosi l&#8217;Italia in una fase di invecchiamento.</p>
<p>Io ho voglia di chiacchierare in materia di evasione fiscale. Questa trascurata materia per la quale tutti dicono che è complicato. Lo sarà certamente non lo metto in dubbio ma sono un po&#8217; perplesso su come si apporccia al problema.</p>
<p>Dunque, l&#8217;ammontare dell&#8217;evasione fiscale in italia è <a href="http://www.blitzquotidiano.it/photogallery/mappa-evasione-fiscale-italia-950179/">mediamente del 38%</a>, ovvero <a href="http://www.nanopress.it/economia/2011/12/12/italia-in-trent-anni-l-evasione-fiscale-si-e-quintuplicata_P5125819.html">275.000 miliardi di euro</a> (!!!). Magari saranno miliardi di lire? Può darsi, non sono un esperto di finanza, allora vuol dire che l&#8217;evasione fiscale in italia ammonta a <strong>circa 150 Miliardi di Euro</strong>? Ovvero <strong>6 volte la manovra</strong> &#8220;Salva Italia&#8221; varata dal Governo Monti!!!</p>
<p>Beh, io sarò un semplicione, un superficiale e uno che fantastica troppo ma&#8230; se il Governo consentisse anche ai privati di scaricare l&#8217;IVA che scenario si presenterebbe?</p>
<p>Sì la prima cosa che salterebbe all&#8217;occhio è che l&#8217;IVA è uno degli incassi più redditizi che lo stato ha e quindi se si toglie quella è tutto il sistema che va a gambe all&#8217;aria.</p>
<p>Però se la persona potesse scaricare il costo di un bene, un servizio o quanto altro così come fanno le aziende e poi scaricare (o meglio recuperare) una parte dell&#8217;IVA versata alle casse dello stato (anche un misero 20% di quanto viene anticipato in fase d&#8217;acquisto, ovvero il 2.5% di quel 21% attuale), chiunque vorrebbe ricevere fattura, scontrino e ricevuta per qualsiasi servizio ricevuto!</p>
<p>Gli evasori sarebbero costretti ad uscire allo scoperto perchè a quel punto sarebbero denunciati direttamente da chi riceve il servizio! Non credete?</p>
<p>Avrò detto tante cavolate sicuramente e me ne scuso con gli economisti, politici e affaristi di ogni sorta, ma un cittadino onesto che paga le tasse e rispetta la legge ha tutto il diritto di dire la sua! Siamo pur sempre in Democrazia!</p>
]]></content:encoded>
			<wfw:commentRss>http://diegolamonica.info/se-anche-i-privati-potessero-scaricare-l-iva/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

