<?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: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-13917564</id><updated>2012-01-27T18:55:56.288+01:00</updated><category term='jsn'/><category term='dom'/><category term='javascript'/><category term='WINCE'/><category term='IEJst'/><category term='S.T.A.L.K.E.R.: Clear Sky'/><category term='JS IoC'/><category term='singleton'/><category term='uIoC'/><category term='compact framework'/><category term='ADSL'/><category term='typeof'/><category term='john resig'/><category term='directory'/><category term='Presentation Business Behaviour'/><category term='getElementsByClassName'/><category term='Recensioni'/><category term='Mutators'/><category term='duff device'/><category term='c#'/><category term='3.5'/><category term='design pattern'/><category term='Flash'/><category term='Games'/><category term='accessibility'/><category term='getElementByClassName'/><category term='benchmark accuracy'/><category term='X3: Terran Conflict'/><category term='Private'/><category term='24ways07'/><category term='invite'/><category term='Action Script'/><category term='xhttprequest'/><category term='leggibilità'/><category term='xp'/><category term='usability'/><category term='MooTools'/><category term='rant'/><category term='faster device'/><category term='crossbrowser'/><category term='dependency injection'/><category term='user32.dll'/><category term='linq'/><category term='visual studio 2008'/><category term='CF2.0'/><category term='subscriber'/><category term='IoC'/><category term='ajax'/><category term='jsunit'/><category term='meebo'/><category term='files'/><category term='as 3.0'/><category term='banker'/><category term='setAttribute'/><category term='codeplex'/><category term='trojan'/><category term='xmlhttp'/><category term='replace'/><category term='query syntax'/><category term='inversion of control'/><category term='DI'/><category term='visual studio'/><category term='observer'/><category term='publisher'/><category term='Webservice'/><category term='teatro'/><category term='filesystem'/><category term='adobe flex'/><category term='stuartlangridge'/><category term='container'/><category term='Ruby'/><category term='base'/><category term='orcas'/><category term='ninja'/><category term='misurestanding'/><category term='invitation'/><category term='radiohead'/><category term='RAWUW'/><category term='factory'/><category term='addEvent'/><category term='Bleach'/><category term='joost'/><category term='duck typing'/><category term='avg'/><category term='screencast'/><category term='keeto'/><title type='text'>Kenta blog 2.0</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>60</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-13917564.post-4353985988269307609</id><published>2011-10-11T19:32:00.000+02:00</published><updated>2011-10-11T20:20:05.538+02:00</updated><title type='text'>Mootools AOP and how to use AOP for Profiling Mootools Classes</title><content type='html'>In my last post about &lt;a href="http://mykenta.blogspot.com/2011/10/mootools-private-pattern-mutator.html"&gt;Mootools private pattern mutator&lt;/a&gt;, I've show how to use &lt;a href="http://keetology.com/blog/"&gt;keeto&lt;/a&gt;'s &lt;a href="https://github.com/keeto/mootools-pattern-mutators/blob/master/Source/Class.PatternMutators.js"&gt;patternmutator &lt;/a&gt;to inject a private object into mootools methods.&lt;br /&gt;Using this private object it is then possible to add private properties and methods which are accessible only to methods decorated with 'private'.&lt;br /&gt;&lt;br /&gt;As noted by &lt;a href="http://fragged.org/"&gt;coda&lt;/a&gt; in the &lt;a href="http://mykenta.blogspot.com/2011/10/mootools-private-pattern-mutator.html#comments"&gt;comment section&lt;/a&gt;, pattern mutators is now included in mootools 2.0.&lt;br /&gt;PatternMutator is also the base of my &lt;a href="https://gist.github.com/1278659"&gt;kenta.AOP&lt;/a&gt; Class for Mootools that I'm going to introduce, and as a bonus I will show how to use kenta.AOP to create a simple &lt;a href="https://gist.github.com/1275736"&gt;Mootools Class Profiler&lt;/a&gt;.&lt;br /&gt;&lt;b&gt;What kenta.AOP is?&lt;/b&gt;&lt;br /&gt;kenta.AOP is simple way to handle &lt;a href="http://en.wikipedia.org/wiki/Aspect-oriented_programming"&gt;AOP&lt;/a&gt; in MooTools for debugging purpose.&lt;br/&gt;In particular kenta.AOP handles method invocation by rewriting all Mootools class, allowing you to intercept these methods before and after the execution.&lt;br /&gt;You can then use the event parameter to cancel the method's execution or hijack the method's return value.&lt;br /&gt;kenta.AOP uses Mootools Events in a Publish-Subscribe pattern to let you write any modules you want.&lt;br/&gt;In this post I will show you kenta.AOP.Profile to better demonstrate what kenta.AOP can do.&lt;br /&gt;&lt;br /&gt;I wrote kenta.AOP as a little project to better understand patternmutator and AOP myself, but since it might be useful for other people I will share this snippet. piece of code.&lt;br /&gt;&lt;b&gt;What kenta.AOP is not?&lt;/b&gt;It is not a complete AOP Framework. In particular kenta.AOP can't handle property access and it doesn't perform exception handling by design; it also overwrites all MooTools class methods, so I advise against using it for production-code :)&lt;br /&gt;&lt;br /&gt;the complete code of kenta.AOP is here:&lt;br /&gt;&lt;script src="https://gist.github.com/1278659.js?file=kenta.AOP.js"&gt;&lt;/script&gt;kenta.AOP provides a global AOP object that fire two events: 'pre' and 'post', that you can use to listen and hijack methods.&lt;br /&gt;Even if kenta.AOP listens all Mootools class method, it is designed to fire only if the Class has a 'Aspect' property&lt;br /&gt;&lt;br /&gt;I guess you are wondering what kenta.AOP can be useful for, so here's a little example of how this code can be useful for debugging:&lt;br /&gt;&lt;script src="https://gist.github.com/1275736.js?file=kenta.AOP.Profile.js"&gt;&lt;/script&gt;with an example:&lt;br /&gt;&lt;iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/zwr2t/1/embedded/"&gt;&lt;/iframe&gt;&lt;br /&gt;Since Profiling don't require to overwrite the return value I will show you another example:&lt;br /&gt;&lt;iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/G8ehu/embedded/"&gt;&lt;/iframe&gt;&lt;br /&gt;and another one in which we cancel the method execution:&lt;br /&gt;&lt;iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/8QX9D/1/embedded/"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-4353985988269307609?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/4353985988269307609/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=4353985988269307609' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/4353985988269307609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/4353985988269307609'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2011/10/mootools-aop-and-how-to-use-aop-for.html' title='Mootools AOP and how to use AOP for Profiling Mootools Classes'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-27443028236190871</id><published>2011-10-09T17:02:00.000+02:00</published><updated>2011-10-09T17:02:42.423+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='Private'/><category scheme='http://www.blogger.com/atom/ns#' term='Mutators'/><category scheme='http://www.blogger.com/atom/ns#' term='design pattern'/><category scheme='http://www.blogger.com/atom/ns#' term='MooTools'/><category scheme='http://www.blogger.com/atom/ns#' term='keeto'/><title type='text'>Mootools private pattern mutator</title><content type='html'>Not too long ago I wrote this &lt;a href="https://gist.github.com/"&gt;gist&lt;/a&gt; to add a sort of private properties / private methods to &lt;a href="http://mootools.net/"&gt;Mootools&lt;/a&gt; 1.2.x:&lt;br /&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/511069.js"&gt; &lt;/script&gt;As of Mootools 1.3 this gist won't work anymore, but I've wrote another one as alternative, it requires &lt;a href="http://keetology.com/"&gt;Mark Obcena&lt;/a&gt;'s &lt;a href="https://github.com/keeto/mootools-pattern-mutators/blob/master/Source/Class.PatternMutators.js"&gt;PatternMutators.js&lt;/a&gt; that you can find here: &lt;a href="https://github.com/keeto/mootools-pattern-mutators/blob/master/Source/Class.PatternMutators.js"&gt;keeto.PatternMutators.js&lt;/a&gt;:&lt;br /&gt;&lt;script src="https://gist.github.com/855443.js"&gt; &lt;/script&gt;&lt;b&gt;How it works?&lt;/b&gt;&lt;p&gt;In the first version, the one for the 1.2.x branch of Mootools, if you Implements Private, what happens under the hood is that it create a property using Mootools $uid to get a unique-id per istance on a not-accessible outside of Class.Mutators.Private function, then it rewrote all the method of your instance passing the associated property as the last parameter of your function so that you can use it to store/retrieve private properties or even methods.&lt;/p&gt;&lt;p&gt;Since there's no way to automate the cleaning of all the objects/methods you can add, it need also to add a '~' method that you need to call on your destructor so it will not leak memory.I decided to use this ugly syntax: ['~']() because it need to stand out of your code, in a way to remember you that you are using an ugly hack to create privates and because is easier to remember something so strange ;)&lt;/p&gt;&lt;p&gt;For the 1.3 and upper branches of Mootools(yep, still work on &lt;a href="http://mootools.net/blog/2011/09/10/mootools-1-4-0/"&gt;1.4.x&lt;/a&gt;) I decided to use a different, not compatible, way to achieve the same objective, so I based my mutators on keeto's patternMutator, for a number of reasons, basically cleaner syntax, re-using of existing code (keeto's one), and only methods marked with 'private' are now overwritten.You can see an example right here:&lt;/p&gt;&lt;iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/qUkX6/embedded/"&gt;&lt;/iframe&gt;The code is slighly different, instead of Implements:[Private], you have to explicity mark the method you would like to use private properties or methods by adding 'private ' ahead of your method name, but other things remains unchanged.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-27443028236190871?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/27443028236190871/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=27443028236190871' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/27443028236190871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/27443028236190871'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2011/10/mootools-private-pattern-mutator.html' title='Mootools private pattern mutator'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-8420632021416225752</id><published>2011-02-02T19:24:00.001+01:00</published><updated>2011-02-02T21:27:59.215+01:00</updated><title type='text'>Post Mortem of a big js project (Part I)</title><content type='html'>Well, it seems ages since the last time I updated my blog, I really think is time to shove some dust off my blog.&lt;br /&gt;&lt;br /&gt;Where did I'm vanished?&lt;br /&gt;&lt;br /&gt;I was really busy on a project, in which I put lot of effort, I'm now to a point where I can consider the project to be quite stable so I can finally relax and return back here to write something about this.&lt;br /&gt;&lt;br /&gt;I thought it was a good idea to write a post-mortem of this project.&lt;br /&gt;&lt;br /&gt;Well. Let's start.&lt;br /&gt;&lt;br /&gt;I was told to rewrite a really complex application originally written in vanilla javascript, because it needs to change it's UI.&lt;br /&gt;&lt;br /&gt;After a little talk to the original application writer we comes to the conclusion that we can't only extend the old application to support the new UI but we need a total rewrite from scratch.&lt;br /&gt;&lt;br /&gt;We only had something like 6 months to rewrite an application that was written in the span of 3 years with lots of features, in the meanwhile we even need to introduce more feature that wasn't expected to be introduced 3 years ago.&lt;br /&gt;&lt;br /&gt;We immediately thought that we need to plan ahead what we will have to develop.&lt;br /&gt;&lt;br /&gt;So we split the project in 2 big parts, the front-end and the back-end using an "MVC/MVP" approach, &lt;br /&gt;in this way while he was concentrating on his parts, I could developing the new UI.&lt;br /&gt;&lt;br /&gt;Both of us were sure that we needed to use a framework or a library to ease our work.&lt;br /&gt;&lt;br /&gt;So we start to seek for the framework / library that was better suited for our needs.&lt;br /&gt;&lt;br /&gt;He was quite sure to take jquery, but I was confident that we needed a better way to write our code, because, after all, it was one of our biggest problem.&lt;br /&gt;&lt;br /&gt;The old application teach us that it was extremely important to write our code in a future proof way.&lt;br /&gt;&lt;br /&gt;So, since I saw the benefits of good Object Oriented in my C# experience, I thought that we needed something that could force both to write more reusable code, enforcing the Object Oriented way to write javascript code.&lt;br /&gt;&lt;br /&gt;With OO code we could have easily apply the TDD techniques that we both wanted.&lt;br /&gt;&lt;br /&gt;After this considerations, It was pretty natural to me to follow the MooTools path, and I can tell you now that was a wise choice :)&lt;br /&gt;&lt;br /&gt;Immediately after we started writing our firsts objects we feel the needs to automatize some tasks, like the merging of our little class file into a big script.&lt;br /&gt;&lt;br /&gt;So I start to wrote the tool (a c# page) to merge together the classes, and to run our JSSpec page.&lt;br /&gt;In the process of writing this page I included JSCoverage to made the code coverage of our tests, and I think this move was really smart, because we discovered that JSCoverage fails if it finds a syntax error in the code.&lt;br /&gt;So technically it was as if we had a javascript compiler, that tells us that something was wrong even before running the page, not only that but it was amazing because JSCoverage returns the row where the syntax error was founded! &lt;br /&gt;&lt;br /&gt;With a few tools we have TDD, BDD, Code coverage and syntax error applied to our js project. Marvelous.&lt;br /&gt;&lt;br /&gt;Speaking of tools I found mootools really handy when we need to do a profiling of our application, it was as simple as writing a mootools mutator (&lt;a href="https://gist.github.com/570711"&gt;https://gist.github.com/570711&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;... but I'm seeing that this post is becoming too long, so I think I will continue it another day. bye ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-8420632021416225752?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/8420632021416225752/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=8420632021416225752' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/8420632021416225752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/8420632021416225752'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2011/02/post-mortem-of-big-js-project-part-i.html' title='Post Mortem of a big js project (Part I)'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-5525095394507448529</id><published>2009-12-28T20:50:00.003+01:00</published><updated>2009-12-28T21:55:42.279+01:00</updated><title type='text'>Recensione Irex Iliad (1a edizione)</title><content type='html'>&lt;p&gt;Ho recentemente acquistato tramite &lt;a href="http://ebookstore.simplicissimus.it/index.php?language_code=it"&gt;simplicissimus &lt;/a&gt;questo magnifico lettore di e-book (&lt;a href="http://ebookstore.simplicissimus.it/iliad_1st_edition_refurbished?category_id=48"&gt;ad un prezzo fortemente scontato&lt;/a&gt;), la scelta è caduta su di lui principalmente per un solo motivo: la dimensione del display.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Infatti, a differenza di altri, questo lettore ospita uno schermo da ben 8 pollici con tecnologia e-ink a 16 tonalità di grigio e una risoluzione di 768x1024 pixel.&lt;br /&gt;A suo favore dispone di una penna wacom per scrivere, questo significa due cose:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;non è un dispositivo touchscreen, senza pennetta non potete usare le caratteristiche touch&lt;/li&gt;&lt;br /&gt;&lt;li&gt;non ha strati aggiuntivi al di sopra dello schermo e-ink e quindi non avrete problemi di riflessi&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Come si può vedere dall' immagine qui sotto è molto sottile, molto più di un libro anche se come peso è di poco più leggero (pesa circa 450 grammi)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;img src="http://imgur.com/LJa8q.jpg" title="Iliad di lato n73 e n80" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Sicuramente in un e-book reader conta come prima cosa la leggibilità del testo, ed è questo il punto di forza dell’ Iliad, la grandezza del monitor, e l’ ottimo supporto di base ai pdf, permette di leggere in maniera agevole questo formato.&lt;br /&gt;E' possibile zoomare, ed effettuare il pan (lo spostamento) del pdf usando il pennino, è possibile anche vedere il pdf in landscape, inoltre aprendo un qualsiasi documento si ricarica l' ultima pagina visitata&lt;br /&gt;Molto comoda la funzione di annotazione sui pdf tramite pennino per prendere appunti mentre si legge.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Oltre al pdf il lettore supporta una manciata di altri formati utili quali testo (.txt) e pagina web(.html) quest’ ultima utilizzando minimo (la build di firefox per dispositivi pocket) e mobipocket (.prc) supporta inoltre immagini e permette di annotare su di esse (jpeg,bmp e png)&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Dispone di piccole casse integrate (e uscita cuffie ;) ) e ha il wifi integrato (supporta fino al &lt;span style="font-weight:bold;"&gt;WPA 1&lt;/span&gt;)&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Inoltre è possibile interagire con il sistema operativo sottostante (linux) per installare applicazioni, ce ne sono poche ma buone, le più utili sono sicuramente:&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.mobileread.com/forums/showpost.php?p=447722&amp;postcount=29"&gt;pViewer &lt;/a&gt;&lt;/span&gt;: un lettore pdf alternativo che permette di fare il reflow del testo contenuto in un pdf anziché usare lo zoom normale contenuto nel lettore di default&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.mobileread.com/forums/showthread.php?t=22491"&gt;iNewsStand&lt;/a&gt;&lt;/span&gt;: permette di sincronizzarsi con il proprio account &lt;a href="http://www.feedbooks.com/"&gt;feedbooks &lt;/a&gt;(gratuito) per scaricare diverse news da internet come fossero giornali (basta un feed rss)&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://wiki.mobileread.com/wiki/FBReader"&gt;FBReader &lt;/a&gt;&lt;/span&gt;che permette all’ Iliad di supportare svariati formati aggiuntivi &lt;br /&gt;la triade &lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.mobileread.com/forums/showthread.php?t=12861"&gt;calendario – agenda contatti e todo list &lt;/a&gt;&lt;/span&gt;&lt;br /&gt;sono disponibili inoltre per gli smanettoni  un&lt;span style="font-weight:bold;"&gt; &lt;a href="http://www.mobileread.com/forums/showthread.php?t=30183"&gt;file manager&lt;/a&gt;&lt;/span&gt;, una &lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.mobileread.com/forums/attachment.php?attachmentid=13598"&gt;shell&lt;/a&gt;&lt;/span&gt;, un &lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.mobileread.com/forums/showthread.php?t=10225"&gt;server ssh&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;ed altri ancora che si possono reperire &lt;a href="http://wiki.mobileread.com/wiki/Iliad_Software#Organizer_Package"&gt;a questo indirizzo&lt;/a&gt; &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Diverse persone hanno messo mano ai &lt;a href="http://developer.irexnet.com/repo/applications/ipdf/trunk/?q=repo/applications/ipdf/trunk"&gt;sorgenti del lettore pdf&lt;/a&gt; di base (ipdf) creando delle modifiche ad hoc ed è possibile usare questi lettori andando a sostituire l’ originale con &lt;a href="http://www.mobileread.com/forums/showpost.php?p=368732&amp;postcount=31" title="ipdf pack"&gt;uno di questi&lt;/a&gt; (consiglio di utilizzare &lt;a href="http://forum.simplicissimus.it/irex-iliad/backup-e-restore-di-ipdf-originale/"&gt;questo script&lt;/a&gt; da me creato prima di procedere all’ installazione di un lettore diverso)&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;L’ interfaccia grafica è pensata per poter accedere ai vari menù utilizzando semplicemente i tasti funzione dell’ Iliad, evitando di usare il pennino per risparmiare batteria e non dover staccare le mani dal dispositivo.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;img src="http://i.imgur.com/ZBwtY.jpg" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Il pennino risulta comunque utilissimo per interagire con le finestre dei vari programmi aggiuntivi e per prendere note sui pdf o sulle immagini, con un precisione che è ottima.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;Parliamo ora dei difetti:&lt;/strong&gt;&lt;br /&gt;Una durata della batteria breve rispetto ad altri dispositivi e, in particolare, della seconda versione dell’ Iliad anche se per una persona normale, ovvero che legge soprattutto alla sera, o in pausa pranzo, il difetto è “poco sentito”, nel senso che ci si può veramente godere di lunghe sessioni di lettura senza paura che la batteria si esaurisca, e comunque il lettore è utilizzabile mentre è in carica (anche se, per colpa dell’ adattatore, potrebbe risultare un po’ scomodo se non si ha una presa vicina) e una carica si completa in circa 3 ore.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Come tutti i dispositivi di questo tipo esiste un effetto di persistenza residua a video (chiamato effetto ghosting), faccio però notare che è praticamente impercettibile mentre si legge, infatti il problema è maggiore quando il display usa tutta la gamma di grigio (per esempio per mostrare un’ immagine) e subito dopo si passa in una pagina normale (scritte nere su pagina bianca), oppure quando ci sono grosse intestazioni scure e la pagina successiva ha un carattere più piccolo, ma tra una pagina e l’altra di un testo questo effetto è nullo o praticamente impercettibile.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Il difetto più grande è forse il fatto che la barra a sinistra può risultare scomoda per persone che hanno difficoltà ad usare la mano sinistra;&lt;br /&gt;si riesce comunque ad utilizzare il dispositivo però si deve appoggiarlo per cambiare pagina.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;L’ iliad sembra attirare la polvere e di conseguenza, inevitabili ditate &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Il software base dell’ Iliad è scarno, ma con un paio di link è facile sapere quali applicativi installare e la procedura da eseguire per installarli, che richiede però alcune conoscenze tecniche che per alcuni può essere un ostacolo.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Ma passiamo ora alle cose interessanti, ovvero come si vede nell' Iliad:&lt;br /&gt;&lt;br /&gt;Questa è la pagina iniziale del romanzo "Abissi d' acciaio" di Isaac Asimov così come viene visualizzata con il lettore di default (da notare un leggero effetto ghosting, non vi preoccupate, la fotocamera è più sensibile dell' occhio umano :P ):&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p id="primaImmagine"&gt;&lt;br /&gt;&lt;img src="http://imgur.com/to5NG.jpg" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Zoomando attorno al testo si vedrà così:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;img src="http://imgur.com/5wgWt.jpg" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Mentre usando il lettore ipdf fullscreen, usando lo stesso zoom si vede in questo modo:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;img src="http://imgur.com/5caZQ.jpg" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Siccome usare il pan è molto scomodo non vi mostro lo zoom su una porzione di testo (che comunque è perfetto), invece vi propongo come si vede utilizzando pViewer con il livello 1 di zoom (a livello 0 è identico alla &lt;a href="#primaImmagine"&gt;prima immagine&lt;/a&gt;)&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;img src="http://imgur.com/ft5cI.jpg" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;pViewer livello 2 di zoom&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;img src="http://imgur.com/Fi4Kv.jpg" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;pViewer livello 3 di zoom&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;img src="http://imgur.com/VZAH2.jpg" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;pViewer livello 4 di zoom&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;img src="http://imgur.com/z7Lry.jpg" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-weight:bold;"&gt;Conclusioni:&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Monitor molto grande che permette un lettura agevole anche se perde la tascabilità (ma è sempre pur meglio di portarsi addietro un netbook solo per leggere), scarsa durata della batteria (anche se &lt;a href="http://www.mobileread.com/forums/showthread.php?t=30794"&gt;esiste il metodo per potenziare la batteria&lt;/a&gt; perdendo ovviamente la garanzia), pennino per scrivere e annotare sui pdf ma pochezza di software di base (nessun supporto ai segnalibri multipli, nessun supporto al fullscreen) fanno dell' Iliad un lettore ebook formidabile per gli smanettoni, ma un po fastidioso, soprattutto all' inizio per i neofiti che non hanno voglia di cercar in internet come colmarne le lacune e che preferirebbero solo accendere e leggere.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-5525095394507448529?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.irextechnologies.com/products/iliad' title='Recensione Irex Iliad (1a edizione)'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/5525095394507448529/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=5525095394507448529' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/5525095394507448529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/5525095394507448529'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2009/12/recensione-irex-iliad-1a-edizione.html' title='Recensione Irex Iliad (1a edizione)'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-1249464509711226664</id><published>2009-11-10T22:19:00.004+01:00</published><updated>2009-11-10T22:36:49.221+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><category scheme='http://www.blogger.com/atom/ns#' term='ADSL'/><title type='text'>Problemi ADSL? Non c’è problema! Li ignoriamo!</title><content type='html'>Scrivo questo post per sfogarmi un po’  dalla rabbia accumulata in questi giorni.&lt;br /&gt;&lt;br /&gt;Sono abbonato con il mio operatore ADSL da circa 3 anni ormai l’ attivazione è avvenuta infatti il  21 febbraio 2007, e considerando che avevo fatto la richiesta in data 9 novembre 2006 posso considerarmi fortunato, poco più di tre mesi per tirare un cavo solo dati :)&lt;br /&gt;&lt;br /&gt;C’è da dire che mi sono orientato verso questo operatore per una tanto decantata banda minima garantita che mi avrebbe permesso di utilizzare la linea di casa per un uso professionale, e devo ammettere che per i primi due anni non ho avuto granché problemi, se non forse due o tre guasti nel suddetto arco temporale risolti in meno di ventiquattro ore.&lt;br /&gt;&lt;br /&gt;I veri problemi sono iniziati da quando quest’ azienda ha cambiato politica, infatti ha introdotto nel suo listino delle linee, passatemi il termine, “castrate” del p2p introducendo, per altro, delle policy di QoS (Qualità del Servizio) che hanno, dal mio punto di vista, peggiorato la situazione, non tanto per il fatto del QoS in se, quanto per via che fornendo linee a minor prezzo si è creata una situazione per cui  le linee sono di fatto sature.&lt;br /&gt;&lt;br /&gt;Ciò che affermo è facilmente riscontrabile dai grafici che tale azienda mette a disposizione di tutti, questo avrebbe dovuto far scattare un fanalino d’ allarme in chi gestisce l’azienda e far si che si prendesse provvedimenti.&lt;br /&gt;&lt;br /&gt;Evidentemente di  provvedimenti non ne sono stati presi  o comunque sia non in modo significativo visto che il problema è cresciuto, per ciò che mi riguarda, in maniera esponenziale.&lt;br /&gt;&lt;br /&gt;Nell’ ultimo periodo, infatti, ho un guasto che mette down la mia linea anche per lungo tempo, in particolare sono  in una situazione dove la mia linea ADSL (che, da contratto, dovrebbe viaggiare a 7 Mega) o non viaggia proprio, o quelle volte che riesco ad accedere ad internet va a velocità risibili, ciò mi impedisce l’ uso professionale di cui sopra, ma non solo, mi crea dei disagi notevoli dal momento che non riesco di fatto ad utilizzare i seguenti servizi:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;Mail&lt;/strong&gt;:  il servizio basilare per chi è nel campo dell’ IT, il serviizio di mail non mi è accessibile&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Banking&lt;/strong&gt;: Ho un conto online è mi è necessario poterci accedere in qualsiasi istante, poiché è il mio unico modo di gestire il mio conto corrente, quindi ho difficoltà nel mandare pagamenti tramite bonifico, fare trading online, fare ricariche telefoniche  ecc..&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Videoconferenza&lt;/strong&gt;: Mi è impossibile chiamare tramite Skype non solo la mia ragazza che sento ogni sera (che adesso sono costretto a sentirla solamente per telefono), ma anche con persone che mi permettono di lavorare o di approfondire tematiche relative al mondo IT e che aumenterebbero il mio know-how&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Tutte le risorse IT disponibili in internet&lt;/strong&gt; (google gruppi, stackoverflow, reddit, ecc): non avendo accesso alla documentazione relativa ai strumenti informatici che utilizzo per programmare mi viene fortemente limitata la mia &lt;span style="font-style:italic;"&gt;produttività casalinga&lt;/span&gt; :)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Servizi di blogging&lt;/strong&gt;: Non posso accedere ad HTML.it, per cui non riesco a scrivere nel Blog in cui collaboro, questo mi crea un danno d’ immagine: potrebbe sembrare che io abbia voluto prendere un impegno che non rispetto&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Servizi di connessione remota&lt;/strong&gt;: non posso utilizzare ne VNC o RDP ne tantomeno servizi minori come ssh e telnet&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Ricapitolando ho danni economici, danni dal punto di vista lavorativo, danni di immagine e danni morali, nonché perdite di tempo, tempo che ho perso inutilmente per cercare di capire se il problema era mio oppure no (cambio di router, cambio di cavi, cambio di configurazione dei router, test su diversi sistemi operativi ecc...)&lt;br /&gt;Per tutti questi motivi e considerato che avevo aperto il guasto il cinque ottobre e a tutt’ oggi (più di un mese!) il guasto si ripresenta tale e quale e da allora ad oggi ogni giorno la linea va in DOWN (numerosi &lt;span style="font-style:italic;"&gt;LCP down&lt;/span&gt; visibili dal log del router) per diverse ore, spesso quando ne ho bisogno, i pacchetti che “pingo” vengono persi sistematicamente, la velocità non si avvicina minimamente a quella contrattuale, ho deciso di inviare la qui sotto riportata diffida ad adempiere:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Diffida ad adempiere ( avvalendosi della risoluzione di diritto concessa dall' art.1454 del codice civile )&lt;br /&gt;Alla spettabile&lt;br /&gt;Signora Ditta che mi porta l’ adsl in casa&lt;br /&gt;&lt;br /&gt;Io sottoscritto&lt;br /&gt;Cristian&lt;br /&gt;Carlesso&lt;br /&gt;Via dei matti numero 0&lt;br /&gt;&lt;br /&gt;con la presente Vi INTIMO di provvedere all'adempimento del contratto con Voi&lt;br /&gt;stipulato relativo alla linea adsl associata al numero contratto&lt;span style="font-style:italic;"&gt; che poi sarebbe il mio&lt;/span&gt; riguardante il servizio di fornitura in modo continuativo del servizio ADSL &lt;span style="font-style:italic;"&gt;Specifico del mio caso&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Adempimento che da parte vostra è venuto meno con il guasto verificatosi in data 05/10/2009 e regolarmente segnalato al&lt;br /&gt;vostro Servizio Clienti contattato tramite form on-line&lt;br /&gt;in data 05/10/2009. Ma nonostante tale segnalazione ad oggi sono spiacente di&lt;br /&gt;constatare che non avete ancora provveduto alla relativa riparazione.&lt;br /&gt;&lt;br /&gt;Visto che gli usi non prevedono termini più lunghi, per il ritorno da parte&lt;br /&gt;Vostra all'adempimento del contratto già citato con la presente è richiesto un termine&lt;br /&gt;massimo di 15 giorni dalla Vostra ricezione della presente intimazione, facendo fede il timbro postale. &lt;br /&gt;Decorso inutilmente tale termine il contratto di fornitura del servizio adsl &lt;span style="font-style:italic;"&gt;Specifico del mio caso&lt;/span&gt; stipulato con Voi sarà considerato risoluto di diritto, ai sensi&lt;br /&gt;dell'art. 1454 del codice civile, con la cui presente intendo avvalermi.&lt;br /&gt;Chiedo inoltre la massima celerità nel rendere disponibile dopo la risoluzione&lt;br /&gt;del contratto il numero di linea ad oggi impegnato dal contratto ADSL in essere con Voi.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Adesso se entro quindici giorni dal ricevimento della raccomandata non mi aggiustano la linea il contratto si risolverà per l’ articolo 1454, articolo che impone il rispetto dei vincoli contrattuali, ora vedremo se mi aggiusteranno la linea, comunque sia vi terrò aggiornati, poiché sembra che scrivere un po’ di righe sulla cosa mi abbia aiutato a far calmare i bollenti spiriti, si , perché anche in questo momento (da un paio di ore) sono sconnesso da internet (sfilza di LCP down nel router)…&lt;br /&gt;&lt;br /&gt;Speriamo bene! ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-1249464509711226664?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/1249464509711226664/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=1249464509711226664' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1249464509711226664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1249464509711226664'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2009/11/problemi-adsl-non-ce-problema-li.html' title='Problemi ADSL? Non c’è problema! Li ignoriamo!'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-7857868666047826276</id><published>2009-07-08T20:13:00.001+02:00</published><updated>2009-07-08T20:13:54.158+02:00</updated><title type='text'>So, I want to learn at least a functional languag....hey, wait! I already know it! XSLT!</title><content type='html'>So, &lt;em&gt;latelly &lt;/em&gt;on the web I've read about functional languages and how they will simplify the way to write complex multithreading/multicore programs, so I think that for be a good developer I need to learn at least one functional language, just for understand what is all this about.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;WHY FP?&lt;/strong&gt;&lt;br /&gt;The bigger benefit from Functional Programming is that since in this style of programming the output depends only from the input parametesr, function have no side effects, and this allow simpler multithreading.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;HOW FP WORKS?&lt;/strong&gt;&lt;br /&gt;Basically you describe a set of function ad tell the function what output give based on its input parameters.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;but, hey! wait! if in the last sentence you substitute set of &lt;em&gt;function &lt;/em&gt;with set of &lt;em&gt;templates &lt;/em&gt;and &lt;em&gt;input parameters&lt;/em&gt; with &lt;em&gt;matches&lt;/em&gt; you can get that the concept here is very similar of how XSLT works...&lt;br /&gt;&lt;br /&gt;In fact, in xslt a given template when feeded with the same input always produce the same output!&lt;br /&gt;Xslt,by the way, under the hood use multithreading so seems that xslt have a lot in common with functional programming language...&lt;br /&gt;&lt;br /&gt;mmm...&lt;br /&gt;&lt;br /&gt;So, to recap, you can say that XSLT templates are the equivalent of FP functions...&lt;br /&gt;... not quite really, since XSLT templates can't be passed across templates by refence ...&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;TILL...&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;... I found &lt;a href="http://fxsl.sourceforge.net/articles/FuncProg/Functional%20Programming.html"&gt;this paper &lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;The examples are not very clear (and font-size are weird on that site), so I write a little Example XSLT here:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&lt;font color="#009900"&gt;&amp;lt;!-- Here I define a defn namespace, we will need it to define our function--&amp;gt;&lt;br /&gt;&lt;/font&gt;&amp;lt;xsl:stylesheet version="1.0"&lt;br /&gt;xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&lt;br /&gt;xmlns:defn="my-functional-xslt-example"&lt;br /&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;xsl:output method = "text" /&amp;gt;&lt;br /&gt;&lt;font color="#009900"&gt;&lt;br /&gt;&amp;lt;!-- here I will define 2 functions add3 and add4 --&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;lt;defn:add3 /&amp;gt;&lt;br /&gt;&amp;lt;xsl:template match="defn:add3"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:param name="parameter" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:value-of select="3+$parameter" /&amp;gt;&lt;br /&gt;&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;defn:add4 /&amp;gt;&lt;br /&gt;&amp;lt;xsl:template match="defn:add4"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:param name="parameter" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:value-of select="4+$parameter" /&amp;gt;&lt;br /&gt;&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;&lt;font color="#009900"&gt;&lt;br /&gt;&amp;lt;!-- ok, now I will define a function that accept a reference of another function and execute that --&amp;gt;&lt;br /&gt;&lt;/font&gt;&amp;lt;xsl:template name="execute"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;xsl:param name="function" select="/.."/&amp;gt;&lt;br /&gt;&amp;lt;xsl:param name="parameter" /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;xsl:variable name="result"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:apply-templates select ="$function" &amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:with-param name="parameter" select="$parameter" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xsl:apply-templates&amp;gt;&lt;br /&gt;&amp;lt;/xsl:variable&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;xsl:value-of select="$result" /&amp;gt;&lt;br /&gt;&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;xsl:template match="/"&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="#009900"&gt;&amp;lt;!-- ok, now I will obtain the reference of our function, and I will store that in two variables --&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;lt;xsl:variable name = "add3" select = "document('')/*/defn:add3" /&amp;gt;&lt;br /&gt;&amp;lt;xsl:variable name = "add4" select = "document('')/*/defn:add4" /&amp;gt;&lt;br /&gt;&lt;font color="#009900"&gt;&lt;br /&gt;&amp;lt;!-- and this is how call the function passing add3 --&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;lt;xsl:call-template name="execute" &amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:with-param name="function" select="$add3" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:with-param name="parameter" select="10" /&amp;gt;&lt;br /&gt;&amp;lt;/xsl:call-template&amp;gt;&lt;br /&gt;&lt;font color="#009900"&gt;&lt;br /&gt;&amp;lt;!-- and this is how call the function passing add4--&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;lt;xsl:call-template name="execute" &amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:with-param name="function" select="$add4" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:with-param name="parameter" select="20" /&amp;gt;&lt;br /&gt;&amp;lt;/xsl:call-template&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;So seems simple (but verbose) to pass around function references.&lt;br /&gt;&lt;br /&gt;You will argue that this example works only on MSXML, but on the &lt;a href="http://fxsl.sourceforge.net/articles/FuncProg/Functional%20Programming.html"&gt;FXSL page&lt;/a&gt; you will found the saxon / xalan corrispondence.&lt;br /&gt;&lt;br /&gt;on msxml you can obtain a similar results using &lt;a href="http://msdn.microsoft.com/en-us/library/ms256042.aspx"&gt;msxml:script &lt;/a&gt; but this require a little javascript code and JSCRIPTxxx.dll and ,for example on pda, this could be a issue.&lt;br /&gt;&lt;br /&gt;So, at the end I can say I already know at least a functional programming language... a sort of... or not? ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-7857868666047826276?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/7857868666047826276/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=7857868666047826276' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/7857868666047826276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/7857868666047826276'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2009/07/so-i-want-to-learn-at-least-functional.html' title='So, I want to learn at least a functional languag....hey, wait! I already know it! XSLT!'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-2382526715340053677</id><published>2009-02-10T20:37:00.003+01:00</published><updated>2009-02-10T21:13:14.259+01:00</updated><title type='text'>[jsn] isNative: a.k.a. the windmill war</title><content type='html'>Long long time ago me and Andrea Giammarchi have nothing better to do to understand if there was a way to understand if you were using a &lt;em&gt;safe function&lt;/em&gt; in javascript or if you use a &lt;em&gt;fake one&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;We try very hard to make something reliable, and without fail we manage to crack every single code we wrote.&lt;br /&gt;&lt;br /&gt;I gave up but since then every now and then I recall that days in which we enjoyed this &lt;a href="http://en.wikipedia.org/wiki/Tilting_at_windmills"&gt;"windmill war"&lt;/a&gt;.&lt;br /&gt;Since when I gave up I had an idea, I just tried to see if that I can work out something to make that idea work.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;What IDEA?&lt;/h3&gt;&lt;br /&gt;Basically since we cannot know if a function is real I thought to make the browser fail if I try to eval some code, make the eval code call himself in an infinite loops.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;eval = function(str){&lt;br /&gt; eval(str);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;eval("alert('hello, proof');"); //too much recursion on FF, stack overflow on IE ;)&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Basically if I extend this logic to all the string evaluating function &lt;br /&gt;(Function object, eval, Object.eval, setTimeout, setInterval) made them using only one function It should work.&lt;br /&gt;&lt;br /&gt;example:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;eval = function(){&lt;br /&gt; return function(code){&lt;br /&gt;  (new Function(""+code))();&lt;br /&gt; }&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;in this way if I try to use eval to rewrite Function I just can't because Function is called inside eval for the same principle of the first snippet I posted.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;So why a windmill war?&lt;/h3&gt;&lt;br /&gt;Caching.&lt;br /&gt;Function caching to be precise, &lt;br /&gt;in javascript I can write this code:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var f = eval&lt;br /&gt;&lt;br /&gt;eval = function(str){&lt;br /&gt;alert("I' m an evil functions! bwahahaha!");&lt;br /&gt; f(str);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So I don't need to use Function anymore to rewrote eval, I just Spoof the code, &lt;br /&gt;I can send The spoofed code around using http request (for example a src in images...).&lt;br /&gt;&lt;br /&gt;To recap, bear this in mind:&lt;br /&gt;&lt;span style="font-weight:bold;color:green;text-variant:small-caps"&gt;Javascript is so powerful in the way it leaves you modify its behaviour that is totally unreliable.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-2382526715340053677?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://webreflection.blogspot.com/2009/02/about-isnative-is-wasting-time.html' title='[jsn] isNative: a.k.a. the windmill war'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/2382526715340053677/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=2382526715340053677' title='3 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/2382526715340053677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/2382526715340053677'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2009/02/jsn-isnative-aka-windmill-war.html' title='[jsn] isNative: a.k.a. the windmill war'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-2084635463946845819</id><published>2008-11-16T12:31:00.002+01:00</published><updated>2008-11-16T12:34:55.662+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='codeplex'/><category scheme='http://www.blogger.com/atom/ns#' term='john resig'/><category scheme='http://www.blogger.com/atom/ns#' term='IEJst'/><category scheme='http://www.blogger.com/atom/ns#' term='benchmark accuracy'/><title type='text'>[jsn] IE Javascript REAL speed tester</title><content type='html'>After reading &lt;a href="http://ejohn.org/blog/accuracy-of-javascript-time/"&gt;the John Resig post about javascript time accuracy&lt;/a&gt;, I decided to make a simple IE wrapper that expose throught the window.external interface an high resolution timer for testing IE Javascript performance&lt;br /&gt;&lt;br /&gt;The project is a very basic .net 3.5 window form project written using VS 2008 express,&lt;br /&gt;it will require .net 3.5 installed.&lt;br /&gt;&lt;br /&gt;I released the project on codeplex, you can found it at &lt;a href="http://www.codeplex.com/IEJst"&gt;http://www.codeplex.com/IEJst&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-2084635463946845819?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.codeplex.com/IEJst' title='[jsn] IE Javascript REAL speed tester'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/2084635463946845819/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=2084635463946845819' title='4 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/2084635463946845819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/2084635463946845819'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2008/11/jsn-ie-javascript-real-speed-tester.html' title='[jsn] IE Javascript REAL speed tester'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-4078339969126778234</id><published>2008-11-10T21:22:00.006+01:00</published><updated>2008-11-10T21:59:10.369+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='avg'/><category scheme='http://www.blogger.com/atom/ns#' term='trojan'/><category scheme='http://www.blogger.com/atom/ns#' term='user32.dll'/><category scheme='http://www.blogger.com/atom/ns#' term='xp'/><category scheme='http://www.blogger.com/atom/ns#' term='banker'/><title type='text'>AVG Aggiornamento kamikaze del 9/11/2008 ripristino XP</title><content type='html'>Ieri Avg ha rilasciato un aggiornamento a dir poco kamikaze, infatti per un falso positivo, Avg rileva la user32.dll come malevola ed affetta da un trojan ... e chiede di rimuoverla, ovviamente una buona parte di utenti si è trovato a dir : "Sì, rimuovila pure, grassie!"&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;Poi al riavvio del pc non son più riusciti ad accedere ad XP (...chissà come mai...)&lt;br /&gt;&lt;br /&gt;Allora vediamo di far notare con chiarezza la cosa:&lt;br /&gt;&lt;em&gt; Se AVG vi dice che il file &lt;b&gt;user32.dll&lt;/b&gt; è infetto da "PSW. banker4.APSA" (o qualcosa di simile) non cancellate, ne spostate nulla!!!&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Il mio consiglio è di passare ad Avira free (http://www.free-av.com/) che si è dimostrato recentemente migliore di avg / avast, se invece volete rimanere ad avg mettete il file c:\windows\system32\user32.dll tra le eccezioni dell' antivirus...&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Ho inavvertitamente cancellato user32.dll e non mi parte il pc, e adesso???&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Allora, semplicemente prendete il cd di installazione di XP (&lt;em&gt;dovete averlo ;)&lt;/em&gt; ) e inseritelo, assicuratevi che il vostro BIOS permetta l'avvio da CD/DVD rom e riavviate il pc.&lt;br /&gt;&lt;br /&gt;Vi verrà chiesto se volete avviare da cd, premete invio per proseguire&lt;br /&gt;aspettate un po che carichi il menù, ad un certo punto vi verrà chiesto qualcosa, &lt;br /&gt;voi premete R per entrare in console di riparazione e ripristino&lt;br /&gt;a questo punto dovrebbe venirvi scritto qualcos' altro, non ricordo voi continuate finché uscira una roba con dei numeri, nella maggior parte dei casi premete 1 (la spiegazione è sicuramente troppo tecnica)&lt;br /&gt;&lt;br /&gt;bene&lt;br /&gt;ora guardate, quello è un prompt XD &lt;br /&gt;ammiratelo con &lt;em&gt;sacro rispetto&lt;/em&gt; per 2 minuti dopodiché digitate (premendo invio ogni comando)&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;D:&lt;br /&gt;&lt;br /&gt;dir /ad&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;se tra le cose che vi vengono scritte c'è un I386 proseguite al punto G&lt;br /&gt;altrimenti provate scrivendo&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;E:&lt;br /&gt;&lt;br /&gt;dir /ad&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;se prima non c'era qui dovrebbe esservi un I386, altrimenti andate avanti con l'alfabeto finché troverete la prima I386 dopodichè potete anche voi passar al punto "G"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Punto G&lt;/b&gt;&lt;br /&gt;a sto punto scrivete (ricordo sempre l'invio)&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;cd I386&lt;br /&gt;&lt;br /&gt;expand user32.dl_ c:&lt;br /&gt;&lt;br /&gt;copy c:\user32.dll c:\windows\system32&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;da notare l'underscore (il trattino di sottolineatura) nel comando expand&lt;br /&gt;&lt;br /&gt;bene ora potete riavviare e una volta fatto potete (S)cancellare il file user32.dll in c:\ (non quello in c:\windows\system32 però)&lt;br /&gt;&lt;br /&gt;se AVG vi tedia ancora dicendo che c'è un virus fate la famosa "finta da pomi" (cioè ignoratelo)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-4078339969126778234?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/4078339969126778234/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=4078339969126778234' title='4 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/4078339969126778234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/4078339969126778234'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2008/11/avg-aggiornamento-kamikaze-del-9112008.html' title='AVG Aggiornamento kamikaze del 9/11/2008 ripristino XP'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-8834058464641051761</id><published>2008-09-30T21:10:00.005+02:00</published><updated>2008-09-30T21:30:54.631+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='X3: Terran Conflict'/><category scheme='http://www.blogger.com/atom/ns#' term='S.T.A.L.K.E.R.: Clear Sky'/><category scheme='http://www.blogger.com/atom/ns#' term='Recensioni'/><category scheme='http://www.blogger.com/atom/ns#' term='Games'/><title type='text'>Vi presento un nuovo recensIONISTA di giochi! :D</title><content type='html'>Ho iniziato una collaborazione con il sito &lt;a href="http://www.gameszone.it"&gt;Gameszone.it&lt;/a&gt;, per cui scrivo per loro alcune recensioni di giochi che provo in anteprima :D&lt;br /&gt;I primi 2 giochi che ho avuto in carico di recensire sono &lt;em&gt;S.T.A.L.K.E.R.: Clear Sky&lt;/em&gt; e &lt;em&gt;X3: Terran Conflict&lt;/em&gt;.&lt;br /&gt;Il primo è il prequel molto atteso di &lt;em&gt;S.t.a.l.k.e.r.: Shadow of Chernobyl&lt;/em&gt;, che è un FPS con alcuni elementi RPG di stampo survival horror, il secondo invece è una simulazione di vita nello spazio, che in realtà è anch' essa a sua volta un seguito, in particolare trattasi di un' espansione standalone di &lt;em&gt;X3: Reunion&lt;/em&gt;; &lt;br /&gt;&lt;em&gt;X3&lt;/em&gt; mi ricorda per certi versi un gioco del '94 dove si colonizzava lo spazio (che volevo fare lo sborone citandolo, ma che in questo momento non mi sovviene il nome) comunque mentre quello era un gioco strategico a turni questo è tutto in real time, ma real time vero, tutto calcolato in tempo reale.&lt;br /&gt;&lt;br /&gt;Entrambi i giochi sfoggiano una grafica mostruosa, e sono pure avidi di risorse, Stalker al massimo dettaglio fa fare fatica al mio nuovo PC (un &lt;em&gt;quadcore&lt;/em&gt; con 4gb di ram e una &lt;em&gt;8800gt&lt;/em&gt;!!!) comunque, giochi a parte, per me è stata un esperienza nuova, vedere pubblicate le proprie recensioni dà una soddisfazione senza eguali, è stata una gioia dedicarmici e spero in futuro di poterlo fare sempre più, vi invito,&lt;br /&gt;se vi interessa, a leggere le recensioni di &lt;a href="http://www.gameszone.it/pc/review.php?id=589"&gt;S.T.A.L.K.E.R.: Clear Sky&lt;/a&gt; e di &lt;br /&gt;&lt;a href="http://www.gameszone.it/pc/review.php?id=591"&gt;X3: Terran Conflict&lt;/a&gt;&lt;br /&gt;e di lasciare, in caso, qualche commento qui, suggerimenti, critiche, idee eccetera tutto è bene accetto.&lt;br /&gt;&lt;br /&gt;Ps. Questa piccola avventura ha già portato i suoi frutti, infatti sto migliorando il mio modo di scrivere, che era arrugginito dalla sindrome SMS / Chat.&lt;br /&gt;Risulta infatti difficile scrivere un qualcosa correttamente dopo essersi (MALE!) abituati alla scrittura veloce da messaggini, mail e sms vari, son però contento perché tutto torna utile :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-8834058464641051761?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/8834058464641051761/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=8834058464641051761' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/8834058464641051761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/8834058464641051761'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2008/09/vi-presento-un-nuovo-recensionista-di.html' title='Vi presento un nuovo recensIONISTA di giochi! :D'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-165189619249419428</id><published>2008-07-08T11:58:00.003+02:00</published><updated>2008-07-08T12:47:34.836+02:00</updated><title type='text'>Dustin Diaz Programming Brain Teaser</title><content type='html'>TEST : http://www.dustindiaz.com/programming-brain-teaser/&lt;br /&gt;&lt;br /&gt;A solution:&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;arr.join("")&lt;br /&gt;.replace(/(.)(\1)((\1)+)/g,'$1$1[$3]')&lt;br /&gt;.split("")&lt;br /&gt;.join(" ")&lt;br /&gt;.replace(/\[\ /g,"&amp;lt;span&amp;gt;")&lt;br /&gt;.replace(/\ \]/g,"&amp;lt;/span&amp;gt;")&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;obviously it can be simplified, but for me that's enought ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-165189619249419428?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.dustindiaz.com/programming-brain-teaser/' title='Dustin Diaz Programming Brain Teaser'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/165189619249419428/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=165189619249419428' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/165189619249419428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/165189619249419428'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2008/07/dustin-diaz-programming-brain-teaser.html' title='Dustin Diaz Programming Brain Teaser'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-4088190406326481103</id><published>2008-05-04T14:13:00.002+02:00</published><updated>2008-05-04T14:15:50.506+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='leggibilità'/><title type='text'>pensavo di scrivere male... e invece!</title><content type='html'>Questo è il risultato del test applicato sul mio blog,&lt;br /&gt;è un test di leggibilità, come potete vedere per leggere il mio blog non occorre essere indottrinati :D, buon per voi, :lol:!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.criticsrant.com/bb/reading_level.aspx"&gt;&lt;img style="border: none;" src="http://www.criticsrant.com/bb/readinglevel/img/undergrad.jpg" alt="blog readability test" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-4088190406326481103?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/4088190406326481103/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=4088190406326481103' title='4 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/4088190406326481103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/4088190406326481103'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2008/05/pensavo-di-scrivere-male-e-invece.html' title='pensavo di scrivere male... e invece!'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-457956457939993221</id><published>2008-02-09T03:28:00.000+01:00</published><updated>2008-02-09T03:31:08.482+01:00</updated><title type='text'>MEGA SCOOP!!!</title><content type='html'>Fonti certe mi hanno confermato che sta per tornare in pompa magna niente popò di meno che il &lt;a href="http://veroprogrammatore.blogspot.com/"&gt;Vero programmatore&lt;/a&gt; più scoppiettante che mai..&lt;br /&gt;Dovrà darsi forza per recuperare un anno di inattività, ma son certo che ce la farà,&lt;br /&gt;mi auguro solo che non sparisca subito di nuovo...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-457956457939993221?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://veroprogrammatore.blogspot.com/' title='MEGA SCOOP!!!'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/457956457939993221/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=457956457939993221' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/457956457939993221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/457956457939993221'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2008/02/mega-scoop.html' title='MEGA SCOOP!!!'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-8752307417058666341</id><published>2008-01-22T22:45:00.002+01:00</published><updated>2008-05-21T00:51:55.326+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='jsn'/><category scheme='http://www.blogger.com/atom/ns#' term='inversion of control'/><category scheme='http://www.blogger.com/atom/ns#' term='JS IoC'/><category scheme='http://www.blogger.com/atom/ns#' term='IoC'/><category scheme='http://www.blogger.com/atom/ns#' term='dependency injection'/><title type='text'>[jsn]A simple JS IoC example code</title><content type='html'>Inspired by &lt;a href="http://ninject.org/"&gt;Ninject&lt;/a&gt; &lt;a href="http://ninject.org/users-guide.html"&gt;documentation&lt;/a&gt; I decided to port the c# example code to my JS IoC.&lt;br /&gt;Here are the code:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var&lt;br /&gt;shuriken = {&lt;br /&gt; hit:function(who){alert("pierced the "+who+" armor");}&lt;br /&gt;},&lt;br /&gt;&lt;br /&gt;sword = {&lt;br /&gt; hit:function(who){alert("Chopped the "+who+" in half");}&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;function Samurai(weapon){ &lt;br /&gt; return {&lt;br /&gt;  Attack:function(who){   &lt;br /&gt;    weapon.hit(who);   &lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;container.register("samurai",Samurai);&lt;br /&gt;var warrior1 = container.byConstructor("samurai",shuriken),&lt;br /&gt;    warrior2 = container.byConstructor("samurai",sword);&lt;br /&gt;   &lt;br /&gt;   warrior1.Attack("The evildoers");&lt;br /&gt;   warrior2.Attack("The evildoers");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So simple, So clear!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-8752307417058666341?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://ninject.org/users-guide.html' title='[jsn]A simple JS IoC example code'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/8752307417058666341/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=8752307417058666341' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/8752307417058666341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/8752307417058666341'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2008/01/simple-js-ioc-example-code.html' title='[jsn]A simple JS IoC example code'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-1830869845577842761</id><published>2008-01-22T22:13:00.002+01:00</published><updated>2008-05-21T00:52:26.507+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='jsn'/><category scheme='http://www.blogger.com/atom/ns#' term='inversion of control'/><category scheme='http://www.blogger.com/atom/ns#' term='JS IoC'/><category scheme='http://www.blogger.com/atom/ns#' term='dependency injection'/><category scheme='http://www.blogger.com/atom/ns#' term='MooTools'/><title type='text'>[jsn]JS IoC on GoogleCode!</title><content type='html'>Today I moved my JS IoC source on &lt;a href="http://code.google.com/p/jsioc/downloads/list"&gt;GoogleCode&lt;/a&gt;,&lt;br /&gt;and for the occasion i made a little change in the code, so now &lt;a href="http://mykenta.blogspot.com/2007/09/kentaioc-js-ioc-library-english-version.html"&gt;JS IoC&lt;/a&gt;&lt;br /&gt;is perfectly compatible with MooTools ( I tested the beta, but it should work on the current also ) with the Class Module selected.&lt;br /&gt;So now you have 2 choice, or use the old (and perfectly working) code and use &lt;br /&gt;&lt;a href="http://webreflection.blogspot.com"&gt;Andrea Giammarchi&lt;/a&gt; extend script (I put that also on Google Code) or if you &lt;br /&gt;already use MooTools you can simply take the 1.0MT version and you're ready to go!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-1830869845577842761?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://code.google.com/p/jsioc/downloads/list' title='[jsn]JS IoC on GoogleCode!'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/1830869845577842761/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=1830869845577842761' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1830869845577842761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1830869845577842761'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2008/01/js-ioc-on-googlecode.html' title='[jsn]JS IoC on GoogleCode!'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-719664036063490900</id><published>2008-01-08T21:34:00.000+01:00</published><updated>2008-01-10T00:18:22.521+01:00</updated><title type='text'>Human Japanese</title><content type='html'>Chi mi conosce sà che il mio nickname deriva da quel gran maestro che è&lt;br /&gt;&lt;a href="http://it.wikipedia.org/wiki/Kentaro_Miura"&gt;Kentaro Miura&lt;/a&gt;, autore del celebre &lt;a href="http://www.google.com/search?q=berserk"&gt;Berserk&lt;/a&gt; manga che non molto tempo fa ha spopolato&lt;br /&gt;in tutto il mondo.&lt;br /&gt;&lt;br /&gt;Negli anni ho imparato a coltivare una passione per quel bel paese che si chiama Giappone, che ha una cultura tanto diversa dalla nostra, che per molti diventa quasi difficile comprenderla.&lt;br /&gt;&lt;br /&gt;Il Giappone mi ha sempre affascinato, il mio desiderio è di farci visita un giorno,&lt;br /&gt;prima però sarà bene che almeno impari le basi della loro lingua, altrimenti farei &lt;br /&gt;solamente una grama figura.&lt;br /&gt;&lt;br /&gt;Ho cercato di imparare la lingua un po per volta, provando varie strade, tra cui &lt;br /&gt;una è ascoltare i podcast (eccezionali sono quelli di &lt;a href="http://www.japanesepod101.com/"&gt;japanesepod101&lt;/a&gt;), reperire documentazione in internet e guardare qualche anime in lingua con i sottotitoli&lt;br /&gt;(che è un esperienza che consiglio vivamente a tutti, l' espressività dei giapponesi nel doppiare gli anime non è paragonabile a niente al mondo).&lt;br /&gt;&lt;br /&gt;Purtroppo senza una scuola di giapponese è molto difficile imparare questa lingua che sembra ostica, ma che in realtà per certi versi è più facile di tante altre lingue.&lt;br /&gt;&lt;br /&gt;Per chi, come me, ha un po di dimestichezza con l' inglese il compito risulta facilitato per la quantità di informazioni che è possibile reperire in internet.&lt;br /&gt;&lt;br /&gt;L' altro giorno, un po per caso mi sono imbattuto in un sito che vende un prodotto software per imparare questa lingua, incuriosito ho notato che non solo era possibile scaricare la demo, ma è anche possibile provare gratuitamente in internet &lt;a href="http://www.humanjapanese.com/preview/HumanJapanese.aspx"&gt;una versione live&lt;/a&gt;&lt;br /&gt;che riproduce fedelmente la versione per pc, seppur in maniera limitata.&lt;br /&gt;&lt;br /&gt;Di primo impatto, essendo un professionista del web ho notato come il sito fosse ben fatto sia a livello grafico sia testando il sito con Firefox, Explorer e Safari.&lt;br /&gt;&lt;br /&gt;Leggendo poi le lezioni disponibili online ho deciso di scaricare la demo gratuita, scoprendo che l'unica limitazione imposta era relativa al tempo, in pratica è possibile controllare tutte le lezioni(e i relativi esercizi) contenuti.&lt;br /&gt;&lt;br /&gt;Mi sono poi soffermato su alcuni dettagli tecnici, ovvero che il programma è fatto in .NET (presuppongo in c#) e che non è null' altro che un custom browser che fa girare le pagine delle lezioni, i test invece sono scritti in Flash, quindi è richiesto il player di Adobe.&lt;br /&gt;&lt;br /&gt;A differenza di software didattici analoghi e costosi (per esempio &lt;a href="http://www.rosettastone.com/"&gt;Rosetta Stone&lt;/a&gt;) dove si cerca di insegnare la lingua per associazioni mentali, Human Japanese si propone come una guida, una specie di libro, che ci permette di seguire un filo logico per imparare il giapponese, ed è questo che mi ha colpito maggiormente di questo software (forse perchè è ciò che stavo cercando io).&lt;br /&gt;&lt;br /&gt;Questo unito al fatto che il software ha un prezzo veramente basso ($24.95) mi ha fatto propendere al suo acquisto.&lt;br /&gt;&lt;br /&gt;Per finire aggiungo che per i blogger c'è la possibilità di un ulteriore sconto a patto che scriviate un articolo su tale software (potete anche parlarne male), di 10$.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-719664036063490900?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.humanjapanese.com' title='Human Japanese'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/719664036063490900/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=719664036063490900' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/719664036063490900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/719664036063490900'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2008/01/human-japanese.html' title='Human Japanese'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-9173024385250162182</id><published>2007-12-22T19:50:00.000+01:00</published><updated>2007-12-22T19:58:25.999+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Bleach'/><title type='text'>Bleach, The Film</title><content type='html'>I'm going to make a film on Bleach, obviusly I gonna to interprete Kurosaki Ichigo, &lt;br /&gt;did you think I'm joking? ok, take a screenshoot of the film:&lt;br /&gt;&lt;br /&gt;&lt;embed src="http://backend.deviantart.com/embed/view.swf" type="application/x-shockwave-flash" width="450" flashvars="id=72711507&amp;width=1337" height="610"&gt;&lt;/embed&gt;&lt;br/&gt;&lt;a href="http://www.deviantart.com/deviation/72711507/"&gt;Me, Hollow&lt;/a&gt; by ~&lt;a  href="http://kentaromiura.deviantart.com/"&gt;kentaromiura&lt;/a&gt; on &lt;a href="http://www.deviantart.com"&gt;deviant&lt;/a&gt;&lt;a href="http://www.deviantart.com"&gt;ART&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ps. ok, i was kidding, but if someone would make a film on Bleach, please take me in consideration, I'm the Perfect Kurosaki Ichigo ;D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-9173024385250162182?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/9173024385250162182/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=9173024385250162182' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/9173024385250162182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/9173024385250162182'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/12/bleach-film.html' title='Bleach, The Film'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-2010614756602888963</id><published>2007-12-04T20:21:00.002+01:00</published><updated>2008-05-21T00:41:09.569+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='accessibility'/><category scheme='http://www.blogger.com/atom/ns#' term='usability'/><category scheme='http://www.blogger.com/atom/ns#' term='24ways07'/><category scheme='http://www.blogger.com/atom/ns#' term='stuartlangridge'/><title type='text'>24ways - Capturing Caps Lock</title><content type='html'>Today i read this interesting Post on 24 ways: &lt;a href="http://24ways.org/2007/capturing-caps-lock"&gt;Capturing caps lock&lt;/a&gt;&lt;br /&gt;Stuart use the Shift status to understand if Caps Lock in On or Off,&lt;br /&gt;is a very good script, but it miss some particular cases:&lt;br /&gt;&lt;br /&gt;when someone type the ascii code using ALT + code,&lt;br /&gt;for example ALT + 65 is the same to write capital A,&lt;br /&gt;so if we wrote ALT 65 on the form, the form alert us that we have CAPS lock on :D&lt;br /&gt;Since i think nobody wrote password using Ascii code (unless they write strange character) this code is a big usability and accessibility tricks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-2010614756602888963?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://24ways.org/2007/capturing-caps-lock' title='24ways - Capturing Caps Lock'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/2010614756602888963/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=2010614756602888963' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/2010614756602888963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/2010614756602888963'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/12/24ways-capturing-caps-lock.html' title='24ways - Capturing Caps Lock'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-1717735713165894635</id><published>2007-10-29T22:43:00.002+01:00</published><updated>2008-05-21T00:53:00.433+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='jsn'/><category scheme='http://www.blogger.com/atom/ns#' term='getElementsByClassName'/><category scheme='http://www.blogger.com/atom/ns#' term='getElementByClassName'/><title type='text'>[jsn]getElementByClass revisited</title><content type='html'>Today me and my friends Andr3a had a talk about getElementsByClassName,&lt;br /&gt;I had the idea to write my own implementation since 1 year ago,&lt;br /&gt;in that time I first saw firefox document.evaluate and I blogged to remind myself that I must wrote a better implementation.&lt;br /&gt;The original one was based on Dustin Diaz works.&lt;br /&gt;Seems that the day is come for me, so I've taken my previous work and i've done a lot of optimization, i think now is one of the fastest that you can find around the net&lt;br /&gt;...here the code:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;getElementsByClassName.js&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;/*Kentaromiura 1.0 version*/&lt;br /&gt;document.getElementsByClassName = function(searchClass,tag,node){&lt;br /&gt; var p = function(){&lt;br /&gt;  if([].push)return function(a,b){a.push(b)};&lt;br /&gt;  return function(a,b){a[a.length]=b}&lt;br /&gt; }();&lt;br /&gt; &lt;br /&gt; node = node || document;&lt;br /&gt; tag = tag || '*';&lt;br /&gt; &lt;br /&gt; if(document.evaluate){&lt;br /&gt;  var xpr = document.evaluate([".//",tag,"[contains(concat(' ',@class,' '),' ",searchClass," ')]"].join(''),node, null, 0, null),&lt;br /&gt;  t = true,&lt;br /&gt;  els = new Array();&lt;br /&gt;  while(t=xpr.iterateNext()){&lt;br /&gt;   p(els,t);&lt;br /&gt;  }&lt;br /&gt;  return els;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; var els = node.getElementsByTagName(tag),&lt;br /&gt; pattern = new RegExp(["(^|\\s)",searchClass,"(\\s|$)"].join('')), &lt;br /&gt; ce = new Array();&lt;br /&gt;&lt;br /&gt; for (var i = 0, max = els.length; i &lt; max; i++) {&lt;br /&gt;  if(pattern.test(els[i].className))&lt;br /&gt;   p(ce,els[i]);&lt;br /&gt; }&lt;br /&gt; return ce;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Tomorrow I will test it more, for now i only can say that it will work on&lt;br /&gt;IE7, FF 2.0.x.x and safari 3.0.3 &lt;br /&gt;Teoretically it should work with IE4+, NN 7+,opera 8+ ff 1+ but keep this as not sure&lt;br /&gt;since I can't test it right now.&lt;br /&gt;So if you can leave a comment with your browser I would be grateful.&lt;br /&gt;&lt;br /&gt;Ps. since I share my ideas with andr3a, he had wrote his own implementation,&lt;br /&gt;it is very similar to my approach but it's different in some way, so be sure to &lt;a href="http://www.devpro.it/code/133.html"&gt;take a look at his work&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;bye ;D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-1717735713165894635?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://mykenta.blogspot.com/2006/05/getelementbyclass.html' title='[jsn]getElementByClass revisited'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/1717735713165894635/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=1717735713165894635' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1717735713165894635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1717735713165894635'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/10/getelementbyclass-revisited.html' title='[jsn]getElementByClass revisited'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-710253863390095415</id><published>2007-10-20T22:57:00.000+02:00</published><updated>2007-10-20T23:03:52.951+02:00</updated><title type='text'>post informativo: eliminazione adsense</title><content type='html'>Come potete notare ho eliminato adsense dal mio blog, mi è servito nel breve periodo in cui l'ho utilizzato a fare alcune statistiche, ho lasciato comunque la barra di ricerca di google perchè ho visto che è stata utilizzata diverse volte.&lt;br /&gt;&lt;br /&gt;ho aggiunto comunque analitycs per vedere se il blog necessita di modifiche al layout o se, come penso, i contenuti sono accessibili senza troppi problemi..&lt;br /&gt;&lt;br /&gt;sto inoltre rivalutando l'ipotesi di riabilitare i commenti anonimi in un futuro prossimo, faccio però notare che l'iscrizione a blogger è gratuita.&lt;br /&gt;&lt;br /&gt;Alla prossima&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-710253863390095415?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/710253863390095415/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=710253863390095415' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/710253863390095415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/710253863390095415'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/10/post-informativo-eliminazione-adsense.html' title='post informativo: eliminazione adsense'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-7675580744486368316</id><published>2007-10-14T19:56:00.002+02:00</published><updated>2008-05-21T00:53:28.125+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jsn'/><category scheme='http://www.blogger.com/atom/ns#' term='Action Script'/><category scheme='http://www.blogger.com/atom/ns#' term='as 3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='adobe flex'/><category scheme='http://www.blogger.com/atom/ns#' term='Presentation Business Behaviour'/><category scheme='http://www.blogger.com/atom/ns#' term='Flash'/><title type='text'>[jsn]Adobe Flex Presentation - Behaviour - Business Logic</title><content type='html'>Before I start I would say that I never seen an action script line &lt;br /&gt;before today, day in which I started playing around with FLEX.&lt;br /&gt;&lt;br /&gt;Since the Hello World example is old fashioned, I have the great idea to start &lt;br /&gt;with something a bit harder, but just a bit since I want to separate my action script&lt;br /&gt;code from the mxml.&lt;br /&gt;basically i would to use mxml as a presentation layer,&lt;br /&gt;an external file for all the logic (I called it BI.as)&lt;br /&gt;and another AS file for handle the behaviour of my code&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Seems that doing so i didn't respect the K&amp;R commandments #0 that is&lt;br /&gt;&lt;cite&gt;c:\&gt; Thou shalt not start to learn a language without write THE proper hello world&lt;blink&gt;_&lt;/blink&gt;&lt;/cite&gt;&lt;br /&gt;&lt;br /&gt;so, for that, i had to pay a big pain!&lt;br /&gt;but in the end I'll be forgive and I come to a solution.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;here the MXML:&lt;br /&gt;&lt;b&gt;kentatest.mxml&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version="1.0"?&gt;&lt;br /&gt;&amp;lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" &lt;span style="color:orange;font-weight:bold"&gt;creationComplete="oncreation();"&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;mx:Script source="BI.as" /&amp;gt;&lt;br /&gt;&amp;lt;mx:Script source="behaviour.as" /&amp;gt;&lt;br /&gt;    &amp;lt;mx:Panel title="kenta template" paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10"&amp;gt;&lt;br /&gt;        &amp;lt;mx:TextArea id="area1" /&amp;gt;&lt;br /&gt;        &amp;lt;mx:Button id="btnSubmit" label="Submit"  /&amp;gt;&lt;br /&gt;    &amp;lt;/mx:Panel&amp;gt;&lt;br /&gt;&amp;lt;/mx:Application&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;and here the code, first the Business logic file:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;BI.as&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public function hello():void{&lt;br /&gt; area1.text='Hello.kenta()';&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and now the Behaviour file:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;behaviour.as&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color:orange;font-weight:bold"&gt;private function oncreation():void{&lt;/span&gt;&lt;br /&gt; btnSubmit.addEventListener('click', function (event:MouseEvent):void{&lt;br /&gt;  hello();&lt;br /&gt; });&lt;br /&gt;&lt;span style="color:orange;font-weight:bold"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;so in the end seems that I did i...what?!? why I put that lines in orange?&lt;br /&gt;basically it was the fault that cause all of my pain trying doing this, without that lines&lt;br /&gt;nothing work.&lt;br /&gt;that lines is the same thing of write &lt;q&gt;&amp;lt;body onload="oncreation"&lt;/q&gt;&lt;br /&gt;on a HTML page.&lt;br /&gt;&lt;br /&gt;so even if I can't completely separate actionscript code from the mxml presentation,&lt;br /&gt;in this way I can add events externally in the behaviour file,&lt;br /&gt;after that i tried to use addEventListener('creationComplete',...&lt;br /&gt;but seems that flex didn't recognise the addEventListener function.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-7675580744486368316?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/7675580744486368316/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=7675580744486368316' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/7675580744486368316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/7675580744486368316'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/10/adobe-flex-presentation-behaviour.html' title='[jsn]Adobe Flex Presentation - Behaviour - Business Logic'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-9131579176982009316</id><published>2007-10-09T22:03:00.000+02:00</published><updated>2007-10-09T22:05:50.516+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='radiohead'/><title type='text'>Sorry? what time is now in UK?</title><content type='html'>&lt;blockquote&gt;&lt;br /&gt;THANK YOU FOR ORDERING IN RAINBOWS. THIS IS AN UPDATE.&lt;br /&gt;&lt;br /&gt;YOUR UNIQUE ACTIVATION CODE(S) WILL BE SENT OUT TOMORROW MORNING (UK TIME).  THIS WILL TAKE YOU STRAIGHT TO THE DOWNLOAD AREA.&lt;br /&gt;&lt;br /&gt;HERE IS SOME INFORMATION ABOUT THE DOWNLOAD:&lt;br /&gt;&lt;br /&gt;THE ALBUM WILL COME AS A 48.4MB ZIP FILE CONTAINING 10 X 160KBPS DRM FREE MP3s.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Just because I simply can't wait!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-9131579176982009316?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/9131579176982009316/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=9131579176982009316' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/9131579176982009316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/9131579176982009316'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/10/sorry-what-time-is-now-in-uk.html' title='Sorry? what time is now in UK?'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-1373785082119004898</id><published>2007-09-15T11:22:00.000+02:00</published><updated>2007-09-15T23:48:16.091+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='compact framework'/><category scheme='http://www.blogger.com/atom/ns#' term='IoC'/><category scheme='http://www.blogger.com/atom/ns#' term='WINCE'/><category scheme='http://www.blogger.com/atom/ns#' term='CF2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='uIoC'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>uIoC - A WINCE IOC library for compact framework 2.0</title><content type='html'>In these days at workplace i'm working on a WINCE project, &lt;br /&gt;I had to do some optimization to my old code and I wish to make it more readable, &lt;br /&gt;so bearing in mind this I start to &lt;a href="http://www.google.com"&gt;Google&lt;/a&gt; around&lt;br /&gt;searching for an IoC container/framework that works on Compact framework 2.0 but&lt;br /&gt;I was embittered since i cannot find any IoC implementation for Compact Framework.&lt;br /&gt;Since i haven't special needs instead of using frameworks like spring.net or Windsor&lt;br /&gt;i would use something simple but straightforward, like &lt;a href="http://www.picocontainer.org/"&gt;picocontainer&lt;/a&gt;&lt;br /&gt; or this one ;D : &lt;br /&gt; &lt;a href="http://mykenta.blogspot.com/2007/09/kentaioc-js-ioc-library-english-version.html"&gt;kentaIOC&lt;/a&gt; &lt;br /&gt;I start to thought how complex could be to write my own IoC implementation for Compact Framework, I was dazzled when I see that what i needed was so simple to achieve!&lt;br /&gt;&lt;br /&gt;So i write my own implementation that let register object and initialize that by constructor.&lt;br /&gt;&lt;br /&gt;For now is very basic, need some extra works but since, at least for me, &lt;br /&gt;it do its dirty work i thought to share my efford.&lt;br /&gt;&lt;br /&gt;I think somebody can find it useful, so&lt;br /&gt;i opened a project on codeplex, you can find the project page at this address:&lt;br /&gt;&lt;a href="http://www.codeplex.com/uIoC"&gt;uIoc&lt;/a&gt; and you can download the source &lt;br /&gt;&lt;a href="http://www.codeplex.com/uIoC/Release/ProjectReleases.aspx?ReleaseId=7097"&gt;on the Release page&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-1373785082119004898?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/1373785082119004898/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=1373785082119004898' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1373785082119004898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1373785082119004898'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/09/uioc-wince-ioc-library-for-compact.html' title='uIoC - A WINCE IOC library for compact framework 2.0'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-5687048913219341525</id><published>2007-09-06T22:23:00.002+02:00</published><updated>2008-05-21T00:53:54.075+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='jsn'/><category scheme='http://www.blogger.com/atom/ns#' term='jsunit'/><title type='text'>[jsn]Configuring JSUnit for Visual Studio 200X</title><content type='html'>I want to share this things, because today it take me a while to get the hang of it.&lt;br /&gt;I now going to explain how to integrate &lt;a href="http://www.jsunit.net/"&gt;JSUnit&lt;/a&gt; into your visual studio 2005/2008 Express/Standard/* version.&lt;br /&gt;the procedure is the same, so now I show you what you need:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;br /&gt;JSUnit, &lt;a href="https://sourceforge.net/project/showfiles.php?group_id=28041"&gt;get the latest version here&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;A copy of &lt;a href="http://msdn.microsoft.com/vstudio/express/"&gt;Visual Studio&lt;/a&gt; (I tried on Express, Standard and Professional) 200X,&lt;br /&gt;i not tried with 2003, but for what I remember the procedure is the same&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.mozilla.com/en-US/"&gt;Mozilla firefox&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;I only get this method work on firefox, probably because an IE restriction on file: protocol,&lt;br /&gt;is not mandatory but i reccomend to install this both plugin for Firefox:&lt;br /&gt;&lt;a href="http://www.getfirebug.com/"&gt;Firebug&lt;/a&gt; and &lt;a href="http://chrispederick.com/work/web-developer/"&gt;web developer toolbar&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Ok, &lt;br /&gt;&lt;ol&gt;&lt;li&gt;open up Visual Studio&lt;/li&gt;&lt;br /&gt;&lt;li&gt;On the menu go under Tools (Alt+T)- External Tools (E)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Click on the Add button&lt;/li&gt;&lt;br /&gt;&lt;li&gt;in the title box write "JSUnit"&lt;/li&gt;&lt;br /&gt;&lt;li&gt;click on the "..." button to search your firefox executable (probably under "C:\Program Files\Mozilla Firefox\firefox.exe") and fill the Command Box&lt;/li&gt;&lt;br /&gt;&lt;li&gt;on the Arguments box write "file://path/to/jsUnit/testRunner.html?testPage=$(ItemPath)&amp;autoRun=true"&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Click on the OK button&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;where path/to/jsUnit is the path where you install your jsunit copy.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;to test it open the file&lt;br /&gt;path/to/jsUnit/tests/jsUnitAssertionTests and from Tools select JSUnit.&lt;br /&gt;&lt;br /&gt;ps.following the instruction on &lt;a href="http://www.javascriptlint.com/docs/running_from_your_ide.htm"&gt;this page&lt;/a&gt;&lt;br /&gt;you can also install &lt;a href="http://www.javascriptlint.com/"&gt;javascript lint&lt;/a&gt; :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-5687048913219341525?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/5687048913219341525/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=5687048913219341525' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/5687048913219341525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/5687048913219341525'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/09/configuring-jsunit-for-visual-studio.html' title='[jsn]Configuring JSUnit for Visual Studio 200X'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-8845336510162320769</id><published>2007-09-04T11:40:00.001+02:00</published><updated>2007-09-04T13:43:16.678+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='inversion of control'/><category scheme='http://www.blogger.com/atom/ns#' term='IoC'/><category scheme='http://www.blogger.com/atom/ns#' term='dependency injection'/><category scheme='http://www.blogger.com/atom/ns#' term='DI'/><category scheme='http://www.blogger.com/atom/ns#' term='container'/><category scheme='http://www.blogger.com/atom/ns#' term='factory'/><category scheme='http://www.blogger.com/atom/ns#' term='duck typing'/><title type='text'>KentaIoC - A js IOC library - english version</title><content type='html'>&lt;p class="warning"&gt;&lt;br /&gt;Thanks to Rey9999 for this marvelous translation.&lt;br /&gt;original document here: &lt;a href="http://mykenta.blogspot.com/2007/09/kentaioc-js-ioc-library.html"&gt;Italian version&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p id="IOCpreamble"&gt;&lt;br /&gt;&lt;br /&gt;Lately I've been using an &lt;a href="http://www.castleproject.org/container/documentation/v1rc3/concepts/ioc.html"&gt;&lt;acronym title="Inversion of Control"&gt;IOC&lt;/acromyn&gt;&lt;/a&gt; framework at my workplace and I grabbed the potential of such an approach right from the start, since it lets you keeping conceptually separated its own classes. To achieve this, we follow a single concept: to separate the logic that keeps the classes externally bound.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Often, in traditional programming, an object "A" inside a method configures another object "B", before calling some other method of the latter. With Inversion of Control instead, object "A" will never need to configure object "B", but it will simply call it directly.&lt;br /&gt;&lt;br /&gt;Probably I was not clear enough, so I invite whoever wishes to understand better this matter to deeper study this topic elsewhere - I will now pragmatically concentrate on writing some code which will let us use the &lt;acronym title="Inversion of Control"&gt;IOC&lt;/acronym&gt; with javascript.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;span class="question"&gt;How do we set up the &lt;acronym title="Inversion of Control"&gt;IOC&lt;/acromyn&gt;?&lt;/span&gt;&lt;br /&gt;Usually we have a class "A", keeping inside a member "B" extending a known interface: this way, even if "A" does not know the actual implementation of "B", it can communicate with it, as between "A" and "B" there's a kind of "contract" defined by the interface.&lt;br /&gt;&lt;span class="question"&gt;&lt;br /&gt;Sure, but in Javascript there are no interfaces, so programming through interfaces is impossible!&lt;/span&gt;&lt;br /&gt;Of course, this is the first problem that I will write about. Let me first recall that &lt;acronym title="javascript"&gt;JS&lt;/acronym&gt; is a dynamic language and it has no Strict Typing (even if &lt;a href="http://webreflection.blogspot.com/2007/05/javastrict-strict-type-arguments.html"&gt;Andr3a will surely argue&lt;/a&gt;). Technically, it could be possible to simulate interfaces using &lt;acronym title="javascript"&gt;JS&lt;/acronym&gt; - but this would violate the &lt;acronym title="Keep it Simple,Stupid"&gt;KISS&lt;/acronym&gt; principle, so looking for an alternative I will use a different approach, which even being completely unrelated to interfaces, lets us work with this architecture all the same.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This concept is called &lt;a href="http://en.wikipedia.org/wiki/Duck_typing"&gt;Duck typing&lt;/a&gt;, that is: if our class moves like a duck and has wings as a duck, then for us it's a duck (even if it is actually a pheasant).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Another topic must be explained along with IOC: &lt;a href="http://en.wikipedia.org/wiki/Dependency_injection"&gt;Dependency Injection&lt;/a&gt;, which basically says that an object "C" which knows neither objects "A" or "B" will be in charge of putting "the right B" inside "A". "C" is also our container.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="question"&gt;What exactly does a container do?&lt;/span&gt;&lt;br /&gt;A container wraps a table uniquely identifying an object instance (usually components:  tiny objects which do a single thing - but do it RIGHT), associating an ID to it.&lt;br /&gt;&lt;span class="question"&gt;Yeah, right, but isn't it right about time to show some code?&lt;/span&gt;&lt;br /&gt;Here's how we can easily manage a container:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var c={};&lt;br /&gt;//configuration of c&lt;br /&gt;    c.B={getMessage:function(){return "test Container"}}&lt;br /&gt;    &lt;br /&gt;    //A doesn't know exactly B it only know that B have getMessage(duck typing approach)&lt;br /&gt;    var A = {&lt;br /&gt;        B:c.B,//A doesn't have the implementation of B,it rely on C to have the correct one.&lt;br /&gt;        test:function(){alert(this.B.getMessage())}&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    A.test();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span class="question"&gt;Excuse me, but from what I understood so far, isn't "C" just a hashtable?&lt;/span&gt;&lt;br /&gt;Well, no. Actually I'm introducing a concept at a time - assuming "C" is really a hashtable, to get a correct management of the IOC, the container must do more than that.&lt;br /&gt;&lt;br /&gt;Depending on the configuration, the container must be able to instance the correct object (&lt;a href="http://en.wikipedia.org/wiki/Factory_method"&gt;Factory&lt;/a&gt;). Here's where injecion comes in: our container must be able to inject the object inside another object.&lt;br /&gt;&lt;br /&gt;Each framework use different methodologies to inject dependencies. The two most common ways, which you will surely find in every framework, are injection by constructor and injection by setter. To keep things simple, my scrypt depends from the &lt;a href="http://www.devpro.it/code/160.html"&gt;extend script by Andrea Giammarchi&lt;/a&gt;, so make sure to include before your script.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var A ={&lt;br /&gt;    test:function(){alert(this.B.getMessage())}//duck typing &lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;var container = {&lt;br /&gt;    C : {},&lt;br /&gt; register:function (id,component){&lt;br /&gt;  this.C[id]=component;&lt;br /&gt; },&lt;br /&gt; find: function (id){&lt;br /&gt;  return this.C[id];&lt;br /&gt; },&lt;br /&gt; bySetter: function(){&lt;br /&gt;     var id=arguments[0];&lt;br /&gt;     &lt;br /&gt;     var Obj = this.find(id);&lt;br /&gt;     &lt;br /&gt;     for(var i=1,max=arguments.length;i&amp;lt;max;i++  ){&lt;br /&gt;     Obj = Obj.extend(arguments[i]);&lt;br /&gt;     &lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;     return Obj;&lt;br /&gt;     &lt;br /&gt;    },&lt;br /&gt;    byConstructor : function(){&lt;br /&gt;  &lt;br /&gt; var id = arguments[0];&lt;br /&gt; var pars = new Array();&lt;br /&gt; for(var i=1,max=arguments.length;i&amp;lt;max;i++  )&lt;br /&gt;  pars.push(arguments[i]);&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt; var Obj=this.find(id);&lt;br /&gt; return Obj.apply(Obj,pars);&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*Start setter configuration*/&lt;br /&gt;container.register(&amp;#39;AS&amp;#39;,A);&lt;br /&gt;&lt;br /&gt;container.register(&amp;#39;BS&amp;#39;,{getMessage:function(){return &amp;#39;Hello setter injection!&amp;#39;}});&lt;br /&gt;container.register(&amp;#39;BS2&amp;#39;,{getMessage:function(){return &amp;#39;Hello setter injection #2!&amp;#39;}});&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;container.bySetter(&amp;#39;AS&amp;#39;,{&amp;#39;B&amp;#39;:container.find(&amp;#39;BS&amp;#39;)}).test();&lt;br /&gt;container.bySetter(&amp;#39;AS&amp;#39;,{&amp;#39;B&amp;#39;:container.find(&amp;#39;BS2&amp;#39;)}).test();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/*Constructor injection example*/&lt;br /&gt;function AC(B){&lt;br /&gt;&lt;br /&gt;return {&lt;br /&gt;test:function(){alert(B.getMessage())}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;container.register(&amp;#39;BC&amp;#39;,{getMessage:function(){return &amp;#39;Hello constructor injection &amp;#39;}});&lt;br /&gt;container.register(&amp;#39;AC&amp;#39;,AC);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;container.byConstructor(&amp;#39;AC&amp;#39;,container.find(&amp;#39;BC&amp;#39;)).test();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The reusable part of the script above is the container I wrote. It lets us register the components using &lt;b&gt;register(id, component)&lt;/b&gt;, as well as searching already registered components with &lt;b&gt;find(id)&lt;/b&gt;.&lt;br /&gt;Last but not least, it lets you injecting by constructor with &lt;b&gt;byConstructor(id,parameters)&lt;/b&gt; and injecting dependencies through a setter with &lt;b&gt;bySetter(id,setterObject)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;Finally, thanks to Andrea Giammarchi, you can find the code here: &lt;a href="http://www.devpro.it/code/164.html"&gt;http://www.devpro.it/code/164.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-8845336510162320769?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://mykenta.blogspot.com/2007/09/kentaioc-js-ioc-library.html' title='KentaIoC - A js IOC library - english version'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/8845336510162320769/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=8845336510162320769' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/8845336510162320769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/8845336510162320769'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/09/kentaioc-js-ioc-library-english-version.html' title='KentaIoC - A js IOC library - english version'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-1137253982259053681</id><published>2007-09-02T13:01:00.001+02:00</published><updated>2007-09-04T13:45:27.032+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='inversion of control'/><category scheme='http://www.blogger.com/atom/ns#' term='IoC'/><category scheme='http://www.blogger.com/atom/ns#' term='dependency injection'/><category scheme='http://www.blogger.com/atom/ns#' term='DI'/><category scheme='http://www.blogger.com/atom/ns#' term='container'/><category scheme='http://www.blogger.com/atom/ns#' term='factory'/><category scheme='http://www.blogger.com/atom/ns#' term='duck typing'/><title type='text'>KentaIoC - A js IOC library</title><content type='html'>&lt;p class="warning"&gt;&lt;br /&gt;&lt;a href="http://mykenta.blogspot.com/2007/09/kentaioc-js-ioc-library-english-version.html"&gt;English version&lt;/a&gt;)&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p id="IOCpreamble"&gt;&lt;br /&gt;Ultimamente a lavoro sto usando un framework &lt;a href="http://www.castleproject.org/container/documentation/v1rc3/concepts/ioc.html"&gt;&lt;acronym title="Inversion of Control"&gt;IOC&lt;/acromyn&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;e fin da subito ho capito le potenzialità di un simile approccio, il quale permette&lt;br /&gt;di separare concettualmente le proprie classi.&lt;br /&gt;Per fare ciò ci si basa su un unico concetto, separare la logica che lega le classi esternamente.&lt;br /&gt;&lt;br /&gt;Mentre nella programmazione tradizionale spesso accade che un oggetto A all' interno di un metodo configuri un oggetto B prima di invocare qualche metodo di ques'ultimo,&lt;br /&gt;con l' Inversion of Control A non dovrà mai configurare B ma invocarlo direttamente.&lt;br /&gt;&lt;br /&gt;probabilmente mi sono spiegato male e invito chi desiderasse capire meglio il concetto ad approfondire in maniera teorica l' argomento altrove in quanto ora mi concentrerò in maniera pragmatica nella scrittura di un codice che permetta l'utilizzo della &lt;acronym title="Inversion of Control"&gt;IOC&lt;/acromyn&gt; in javascript.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;span class="question"&gt;In che modo si mette in piedi l'&lt;acronym title="Inversion of Control"&gt;IOC&lt;/acromyn&gt;?&lt;/span&gt;&lt;br /&gt;normalmente avremo una classe A che contiene al suo interno un membro B&lt;br /&gt;che estende un interfaccia nota, in questo modo anche se A non conosce l'effettiva implementazione di B può dialogare con B poichè tra A e B c'è in piedi un contratto definito dall' interfaccia.&lt;br /&gt;&lt;span class="question"&gt;Si, ma in javascript non esiste il concetto di interfaccie, quindi la programmazione attraverso interfaccie non si può usare!&lt;/span&gt;&lt;br /&gt;Ovviamente questo è il primo problema da affrontare, e a questo aggiungo che &lt;acronym title="javascript"&gt;JS&lt;/acronym&gt; è un linguaggio dinamico e non ha lo Strict Type (non è un linguaggio fortemente tipizzato), anche se &lt;a href="http://webreflection.blogspot.com/2007/05/javastrict-strict-type-arguments.html"&gt;Andr3a sicuramente mi smentirà&lt;/a&gt;. volendo sarebbe possibile simulare le interfaccie in &lt;acronym title="javascript"&gt;JS&lt;/acronym&gt; ma questo andrebbe contro il concetto &lt;acronym title="Keep it Simple,Stupid"&gt;KISS&lt;/acronym&gt;, quindi cercando un alternativa userò un concetto che nonostante non c'entri nulla con le interfaccie permette di lavorare lo stesso con questa metodologia.&lt;br /&gt;Questo concetto che andrò a introdurre è il &lt;a href="http://en.wikipedia.org/wiki/Duck_typing"&gt;Duck typing&lt;/a&gt;,&lt;br /&gt; ovvero se la nostra classe si muove come un fagiano e ha le ali di un fagiano allora per noi è un fagiano, anche se in realtà è un aquila.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Al pari con la IOC c'è un altro concetto, quello della &lt;a href="http://en.wikipedia.org/wiki/Dependency_injection"&gt;Dependency Injection&lt;/a&gt;&lt;br /&gt;che in pratica dice che un oggetto C che non conosce ne A ne B si occuperà di mettere "il giusto B" all' interno di A&lt;br /&gt;C è inoltre il nostro Container.&lt;br /&gt;&lt;span class="question"&gt;Cosa fà esattamente un container?&lt;/span&gt;&lt;br /&gt;Un container mantiene al suo interno una tabella che indica in maniera univoca un istanza di un oggetto(normalmente sono dei componenti, ovvero dei mini oggetti che fanno solo una cosa, ma la fanno bene) associandogli un identificativo.&lt;br /&gt;&lt;span class="question"&gt;Si, vabbè, ma non è ora di far vedere un po di codice?&lt;/span&gt;&lt;br /&gt;Ecco come si può gestire facilmente un container.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var c={};&lt;br /&gt;//configuration of c&lt;br /&gt;    c.B={getMessage:function(){return "test Container"}}&lt;br /&gt;    &lt;br /&gt;    //A doesn't know exactly B it only know that B have getMessage(duck typing approach)&lt;br /&gt;    var A = {&lt;br /&gt;        B:c.B,//A doesn't have the implementation of B,it rely on C to have the correct one.&lt;br /&gt;        test:function(){alert(this.B.getMessage())}&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    A.test();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span class="question"&gt;Ma da quel che ho capito C è solo un hashtable?&lt;/span&gt;&lt;br /&gt;No, in realtà sto introducendo un concetto alla volta, se è vero che C è un hashtable&lt;br /&gt;a tutti gli effetti, per avere una corretta gestione della IoC il container deve fare altro.&lt;br /&gt;In base alla configurazione, il container deve poter istanziare il corretto oggetto (&lt;a href="http://en.wikipedia.org/wiki/Factory_method"&gt;Factory&lt;/a&gt;)&lt;br /&gt;ed è qui che entra in azione l'injection, il nostro container deve poter iniettare l'oggetto all' interno di un altro oggetto.&lt;br /&gt;I vari framework hanno varie metodologie per iniettare le dipendenze, sicuramente le 2 più usate e che troverete in qualsiasi framework sono l'iniezione per costruttore e per setter.&lt;br /&gt;per semplificare le cose il mio script dipende dall' &lt;a href="http://www.devpro.it/code/160.html"&gt;extend script di andrea giammarchi&lt;br /&gt;&lt;/a&gt;, assicuratevi quindi di includerlo in testa al vostro script&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var A ={&lt;br /&gt;    test:function(){alert(this.B.getMessage())}//duck typing &lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;var container = {&lt;br /&gt;    C : {},&lt;br /&gt; register:function (id,component){&lt;br /&gt;  this.C[id]=component;&lt;br /&gt; },&lt;br /&gt; find: function (id){&lt;br /&gt;  return this.C[id];&lt;br /&gt; },&lt;br /&gt; bySetter: function(){&lt;br /&gt;     var id=arguments[0];&lt;br /&gt;     &lt;br /&gt;     var Obj = this.find(id);&lt;br /&gt;     &lt;br /&gt;     for(var i=1,max=arguments.length;i&amp;lt;max;i++  ){&lt;br /&gt;     Obj = Obj.extend(arguments[i]);&lt;br /&gt;     &lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;     return Obj;&lt;br /&gt;     &lt;br /&gt;    },&lt;br /&gt;    byConstructor : function(){&lt;br /&gt;  &lt;br /&gt; var id = arguments[0];&lt;br /&gt; var pars = new Array();&lt;br /&gt; for(var i=1,max=arguments.length;i&amp;lt;max;i++  )&lt;br /&gt;  pars.push(arguments[i]);&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt; var Obj=this.find(id);&lt;br /&gt; return Obj.apply(Obj,pars);&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*Start setter configuration*/&lt;br /&gt;container.register(&amp;#39;AS&amp;#39;,A);&lt;br /&gt;&lt;br /&gt;container.register(&amp;#39;BS&amp;#39;,{getMessage:function(){return &amp;#39;Hello setter injection!&amp;#39;}});&lt;br /&gt;container.register(&amp;#39;BS2&amp;#39;,{getMessage:function(){return &amp;#39;Hello setter injection #2!&amp;#39;}});&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;container.bySetter(&amp;#39;AS&amp;#39;,{&amp;#39;B&amp;#39;:container.find(&amp;#39;BS&amp;#39;)}).test();&lt;br /&gt;container.bySetter(&amp;#39;AS&amp;#39;,{&amp;#39;B&amp;#39;:container.find(&amp;#39;BS2&amp;#39;)}).test();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/*Constructor injection example*/&lt;br /&gt;function AC(B){&lt;br /&gt;&lt;br /&gt;return {&lt;br /&gt;test:function(){alert(B.getMessage())}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;container.register(&amp;#39;BC&amp;#39;,{getMessage:function(){return &amp;#39;Hello constructor injection &amp;#39;}});&lt;br /&gt;container.register(&amp;#39;AC&amp;#39;,AC);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;container.byConstructor(&amp;#39;AC&amp;#39;,container.find(&amp;#39;BC&amp;#39;)).test();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;La parte riutilizzabile dello script sopra è il container che ho scritto.&lt;br /&gt;Il suddetto container permette di registrare i componenti usando &lt;span style="font-weight:bold;"&gt;register(id,component)&lt;/span&gt;&lt;br /&gt;di cercare i componenti già registrati &lt;span style="font-weight:bold;"&gt;find(id)&lt;/span&gt;&lt;br /&gt;permette infine di iniettare per costruttore &lt;span style="font-weight:bold;"&gt;byConstructor (id,parameters)&lt;/span&gt;&lt;br /&gt;e di iniettare le dipendenze tramite setters &lt;span style="font-weight:bold;"&gt;bySetter(id,setterObject)&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;Grazie ad Andrea Giammarchi potete scaricare il codice da qui : &lt;a href="http://www.devpro.it/code/164.html"&gt;http://www.devpro.it/code/164.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-1137253982259053681?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/1137253982259053681/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=1137253982259053681' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1137253982259053681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1137253982259053681'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/09/kentaioc-js-ioc-library.html' title='KentaIoC - A js IOC library'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-4326391127447804566</id><published>2007-07-30T19:13:00.000+02:00</published><updated>2007-07-30T19:35:32.581+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='files'/><category scheme='http://www.blogger.com/atom/ns#' term='filesystem'/><category scheme='http://www.blogger.com/atom/ns#' term='directory'/><category scheme='http://www.blogger.com/atom/ns#' term='3.5'/><category scheme='http://www.blogger.com/atom/ns#' term='linq'/><title type='text'>LINQ e Filesystem</title><content type='html'>La potenza di linq è veramente incredibile,&lt;br /&gt;linq è utilizzabile già su molti tipi come ad esempio i vettori di stringhe,&lt;br /&gt;come ho dimostrato &lt;a href="http://mykenta.blogspot.com/2007/07/visual-studio-2008-and-framework-35_3096.html"&gt;nel post precedente&lt;/a&gt;, si può utilizzare questa caratteristica,&lt;br /&gt;assieme ad un altra nuova features di VS 2008 ovvero gli &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/03/13/new-orcas-language-feature-extension-methods.aspx"&gt;extension method&lt;/a&gt; per interrogare in maniera intelligente il filesystem&lt;br /&gt;&lt;br /&gt;ad esempio, supponiamo di voler selezionare alcuni files in base ad un espressione regolare, sappiamo che Directory.getFiles ritorna un Array di String..&lt;br /&gt;&lt;br /&gt;sarebbe bello poter aggiungere un metodo generico per validare una stringa rispetto a una regular expression.. &lt;br /&gt;scopriamo che grazie all' aggiunta del extension method è possibile.&lt;br /&gt;Tutto ciò che dobbiamo fare è creare una classe statica e aggiungere i nostri metodi statici in questo modo:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public static class extension {&lt;br /&gt;    public static bool Match(this string me, string regExp){&lt;br /&gt;    System.Text.RegularExpressions.Regex rg= &lt;br /&gt;        new System.Text.RegularExpressions.Regex(regExp);&lt;br /&gt;&lt;br /&gt;    return rg.IsMatch(me);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;il this prima del string me aggiunge questa funzione a tutte le stringhe &lt;br /&gt;sarà quindi possibile ora fare "".Match("") !!!&lt;br /&gt;Supponiamo di avere la seguente cartella C:\TEST:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://img62.imageshack.us/img62/6808/direza3.png" /&gt;&lt;br /&gt;&lt;br /&gt;proviamo ora a leggere dalla directory c:\TEST tutti i files che terminano con txt&lt;br /&gt;e facciamoci tornare un po di proprietà del file&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var selection = &lt;br /&gt;            &lt;br /&gt;  from file in System.IO.Directory.GetFiles("C:\\TEST")&lt;br /&gt;  where file.Match("txt$")&lt;br /&gt;  select new {&lt;br /&gt;     Path = file,&lt;br /&gt;     Name = new System.IO.FileInfo(file).Name,&lt;br /&gt;     CreationDate = new System.IO.FileInfo(file).CreationTime,&lt;br /&gt;     Directory = new System.IO.FileInfo(file).DirectoryName    &lt;br /&gt;  };&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;gridview1.DataSource = selection;&lt;br /&gt;gridview1.DataBind();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;testiamo ed ecco il risultato:&lt;br /&gt;&lt;img src="http://img238.imageshack.us/img238/8501/dire1nb0.png"/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-4326391127447804566?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/4326391127447804566/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=4326391127447804566' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/4326391127447804566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/4326391127447804566'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/07/linq-e-filesystem.html' title='LINQ e Filesystem'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-5952268019625723879</id><published>2007-07-30T18:01:00.000+02:00</published><updated>2007-07-30T18:31:53.673+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='query syntax'/><category scheme='http://www.blogger.com/atom/ns#' term='3.5'/><category scheme='http://www.blogger.com/atom/ns#' term='linq'/><category scheme='http://www.blogger.com/atom/ns#' term='orcas'/><category scheme='http://www.blogger.com/atom/ns#' term='visual studio 2008'/><title type='text'>Visual studio 2008 and framework 3.5</title><content type='html'>In questi giorni sto smanettando con la nuova versione di visual studio e soprattutto con &lt;a href="http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx"&gt;LINQ&lt;/a&gt; e le &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/04/21/new-orcas-language-feature-query-syntax.aspx"&gt;query syntax&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;per esempio supponiamo di avere una lista di nomi e cognomi in questo formato "cognome nome" e di volere ordinare per nome..&lt;br /&gt;un operazione che può sembrare semplice ma che in realtà è piu complicata del previsto..&lt;br /&gt;&lt;br /&gt;utilizzando le &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/04/21/new-orcas-language-feature-query-syntax.aspx"&gt;query syntax&lt;/a&gt; e usando &lt;a href="http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx"&gt;LINQ&lt;/a&gt; è possibile risolvere quest' operazione in poche righe ad esempio:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var developers = new String[]{&lt;br /&gt;"Carlesso Cristian",&lt;br /&gt;"Giammarchi Andrea",&lt;br /&gt;"Scott Guthrie"&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;var selections = from dev in developers&lt;br /&gt;orderby dev.Split(' ')[1]&lt;br /&gt;select dev;&lt;br /&gt;&lt;br /&gt;gridview1.DataSource = selections;&lt;br /&gt;gridview1.DataBind();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;vediamo passo per passo quello che ho fatto:&lt;br /&gt;con&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var developers = new String[]{&lt;br /&gt;..&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;ho definito un vettore di 3 stringhe nel formato "cognome nome"&lt;br /&gt;da notare che ho utilizzato var anzichè l' equivalente String[]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var selections = from dev in developers&lt;br /&gt;orderby dev.Split(' ')[1]&lt;br /&gt;select dev;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;ecco in tutto il suo splendore la query syntax, &lt;br /&gt;tradotta in italiano equivarebbe a qualcosa come:&lt;br /&gt;per ogni stringa contenuta all' interno di developers creami una variabile temporanea&lt;br /&gt;dev che contiene la stringa, poi ordinami le stringhe in base &lt;br /&gt;alla parte a destra dello split ottenuto considerando spazio come token&lt;br /&gt;e ritornami il risultato all' interno di selections&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;gridview1.DataSource = selections;&lt;br /&gt;gridview1.DataBind();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;con queste 2 istruzioni andiamo a popolare un gridview di una pagina aspx&lt;br /&gt;&lt;br /&gt;lanciamo il debug e vediamo in output il seguente risultato:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://img57.imageshack.us/img57/6773/res1ix3.png" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;bello ma non mi piace molto il titolo della colonna della GridView.. Item non ha molto senso dopotutto...&lt;br /&gt;perciò torniamo sul codice e modifichiamo la query in &lt;br /&gt;&lt;pre&gt;&lt;br /&gt;        var selections = from dev in developers&lt;br /&gt;                         orderby dev.Split(' ')[1]&lt;br /&gt;                         select new {Developer = dev};&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;cosi facendo abbiamo rinominato la colonna.... &lt;br /&gt;&lt;img src="http://img54.imageshack.us/img54/2827/res1iq8.png"/&gt;&lt;br /&gt;e nel frattempo vi ho mostrato qualcosa che sarà molto più utile in uno dei prossimi post..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-5952268019625723879?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx' title='Visual studio 2008 and framework 3.5'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/5952268019625723879/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=5952268019625723879' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/5952268019625723879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/5952268019625723879'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/07/visual-studio-2008-and-framework-35_3096.html' title='Visual studio 2008 and framework 3.5'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-2717221650021944475</id><published>2007-07-02T00:59:00.000+02:00</published><updated>2007-07-30T18:01:01.449+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='teatro'/><title type='text'>Giulietta e Romeo 2003</title><content type='html'>Se non ricordo male nel mio primo post in questo Blog dissi che avrei parlato di Teatro...&lt;br /&gt;solo oggi, con grande ritardo, inizio a proporre i miei vecchi spettacoli scolastici&lt;br /&gt;&lt;br /&gt;Ecco il link al mio primo spettacolo uploadato,&lt;br /&gt;questa è ciò che considero la mia peggior interpretazione,&lt;br /&gt;dizione da paura(con notabile intercalare dialettico),&lt;br /&gt;sono riuscito a dimenticare una battuta e recitavo con dei maghi, anzi oserei dire&lt;br /&gt;dei professionisti, dell' impallaggio (ovvero quando l'attore che recita ha una persona davanti che lo nasconde),&lt;br /&gt;siamo andati troppo veloci e ho probabilmente creato troppo rumore e mi muovevo troppo,&lt;br /&gt;dopotutto è teatro scolastico ma questa mia interpretazione è ben al di sotto delle mie reali capacità artistiche, anche se lo spettacolo successivo(recitato subito dopo) andò molto meglio.&lt;br /&gt;Purtroppo non esiste ripresa del 2 spettacolo.&lt;br /&gt;Degno di nota alcuni attori che recitavano con me.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;..Ma nulla in confronto al duo formato dal sottoscritto e il grandissimo Filippetto ...che però proporrò più avanti&lt;br /&gt;(non appena verrò in possesso degli originali)&lt;br /&gt;&lt;a href="http://video.google.it/videoplay?docid=-282866708194920993&amp;hl=it"&gt;Buona visione&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-2717221650021944475?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://video.google.it/videoplay?docid=-282866708194920993&amp;hl=it' title='Giulietta e Romeo 2003'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/2717221650021944475/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=2717221650021944475' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/2717221650021944475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/2717221650021944475'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/07/giulietta-e-romeo-2003.html' title='Giulietta e Romeo 2003'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-1827017059155024765</id><published>2007-05-30T23:04:00.000+02:00</published><updated>2007-05-30T23:21:44.974+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misurestanding'/><title type='text'>Sometimes is better to be wrong</title><content type='html'>Recently i found that the net could be &lt;br /&gt;a very tricky place, &lt;br /&gt;expecially when different people write different things &lt;br /&gt;and some of this are wrong,&lt;br /&gt;sometimes happen to miss the point in a discussion.&lt;br /&gt;&lt;br /&gt;so web 2.0 and social bookmark can make you a &lt;a href="http://bluedot.us/Url.aspx?url=http%3a%2f%2fwww.schneier.com%2fblog%2farchives%2f2007%2f04%2fjavascript_hija_1.html%23c160667"&gt;flamewarrior&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;I'm a developer, i know lots of developer and in my experience i can say&lt;br /&gt;that for a developer is very hard to admit when he's wrong.&lt;br /&gt;&lt;br /&gt;So the point here is to undestand what is wrong, in my case i was talking about a different argoument, and i'm happy to be wrong, cause i learnt something new.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-1827017059155024765?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.schneier.com/blog/archives/2007/04/javascript_hija_1.html#c160667' title='Sometimes is better to be wrong'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/1827017059155024765/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=1827017059155024765' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1827017059155024765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1827017059155024765'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/05/sometimes-is-better-to-be-wrong.html' title='Sometimes is better to be wrong'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-1382430543999449406</id><published>2007-04-29T22:36:00.000+02:00</published><updated>2007-04-30T17:42:30.013+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='ninja'/><category scheme='http://www.blogger.com/atom/ns#' term='meebo'/><title type='text'>Javascript ninja</title><content type='html'>recently i found this post in meeblog:&lt;br /&gt;http://blog.meebo.com/?page_id=254&lt;br /&gt;&lt;br /&gt;scrolling down to the end there is a simple test..&lt;br /&gt;&lt;br /&gt;I think that that test is a bit confused, very vague... probably they do on purpose &lt;br /&gt;&lt;br /&gt;now i gave the *REAL* (imho) answer to their question, &lt;br /&gt;because i think that they are a good exercise ^_^;;&lt;br /&gt;I hope doing so don't cause problems (I don't want enemy)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. When does div.setAttribute(”###”) not equal div.###?&lt;br /&gt;&lt;br /&gt;this question is vague... here some right answer(on angle brackets my suppposition):&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;always because ### is not a valid javascript&lt;br /&gt;&lt;br /&gt;[if ### is a placeholder for a word]&lt;br /&gt;since div is not defined if ### contains only character valid for a variable (i.e not -)&lt;br /&gt;the error returned is always ("div is not defined");&lt;br /&gt;so they are not equal when ### contains not valid javascript character for a object property.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[if they means DomNode.setAttribute]&lt;br /&gt;since setAttribute want 2 parameter (name and value) &lt;br /&gt;and since the value here is not showned then the first should raise a not enought argument error&lt;br /&gt;the second one simply do nothing so they are always different.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. What’s the difference between these two statements:&lt;br /&gt;&lt;br /&gt;    a. var x = 3;&lt;br /&gt;    b. x = 3; &lt;br /&gt;&lt;br /&gt;[in global scope] there are no difference&lt;br /&gt;[elsewhere] the first one create a private variable instead the second use (or create) a global variable.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. What’s the difference between:&lt;br /&gt;&lt;br /&gt;    a. !!(obj1 &amp;&amp; obj2)&lt;br /&gt;    b. (obj1 &amp;&amp; obj2) &lt;br /&gt;&lt;br /&gt;al 2 expression return always the same error:obj1 is not defined&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[if we suppose that obj1 and obj2 are defined] &lt;br /&gt;&lt;br /&gt;AND [if they are in using in a test (for example in a if condition)]&lt;br /&gt;they are always the same since the condition automatically cast them as boolean value&lt;br /&gt;&lt;br /&gt;[elsewhere] if they are in an assignment statement the difference is pretty simple&lt;br /&gt;&lt;br /&gt;in the first case the returned value is true if both obj1 and obj2 are defined and not equals to false,undefined,null,0 or ''&lt;br /&gt;ELSE the return value of this expression is false&lt;br /&gt;&lt;br /&gt;in the second case if obj1 is equal to false,undefined,null,0 or '' the result is obj1 else is obj2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. Write a one-line piece of JavaScript code that concatenates all strings passed into a function:&lt;br /&gt;&lt;br /&gt;    function concatenate(/*any number of strings*/) {&lt;br /&gt;&lt;br /&gt;        var string = /*your one line here*/&lt;br /&gt;        return string;&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;since in one line you could write all the code you want(separating with ; )&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;you could do something like &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var string  = [''];(function(a){for(var i=0,max=a.length;i&amp;lt;max;i++)string[string.length]=a[i];})(arguments);string=string.join('');&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;5. What do these two examples have in common?&lt;br /&gt;&lt;br /&gt;  Example 1:&lt;br /&gt;&lt;br /&gt;    var obj = document.getElementById(’adiv’);&lt;br /&gt;    document.getElementById(’adiv’).ptr = obj; &lt;br /&gt;&lt;br /&gt;  Example 2:&lt;br /&gt;&lt;br /&gt;    function assignClick() {&lt;br /&gt;        var el = document.createElement(’div’);&lt;br /&gt;&lt;br /&gt;        function handleClick() {&lt;br /&gt;            el.innerHTML = ‘clicked!’;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        el.attachEvent(”onclick”, handleClick);&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;both do nothing,&lt;br /&gt;notice that the first could gave an error if there is not an element in the dom with the name adiv or if the node exists but the function is called before the dom is totally parsed (before oncontentload),&lt;br /&gt;the second give an error if executed in an&lt;br /&gt;application/xhtml +xml if the browser is not firefox since innerHTML&lt;br /&gt;should don't exist(firefox is weird here)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-1382430543999449406?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blog.meebo.com/?page_id=254' title='Javascript ninja'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/1382430543999449406/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=1382430543999449406' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1382430543999449406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1382430543999449406'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/04/javascript-ninja.html' title='Javascript ninja'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-2873986856793783738</id><published>2007-03-20T00:46:00.000+01:00</published><updated>2007-03-20T00:49:18.600+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Webservice'/><category scheme='http://www.blogger.com/atom/ns#' term='RAWUW'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><title type='text'>RAWUW - Ruby Ajax &amp; Webservice UI for Windows</title><content type='html'>&lt;blockquote&gt;..&lt;p&gt;  In this post I show you how you can use Ajax to develop with a HTML UI with Ruby &lt;/p&gt; &lt;p&gt;  Recently I started developing with ruby, with the Windows version to be precise. &lt;/p&gt; &lt;p&gt;  I'm very busy at the moment so I need to develop as fast as I can. &lt;/p&gt; &lt;p&gt;  I needed a way to design an User Interface with the minimum efford  and, since I haven't Internet nor Tk installed on my Windows Machine  and I wouldn't spend many time to learn another library to draw  something on the screen, I looked around the documentation for  something that I already knew.. &lt;/p&gt; &lt;p&gt;  I saw that Ruby lets you play with WIN32OLE,  particularly with  InternetExplorer.Application (also known as a WebBrowser control). &lt;/p&gt; &lt;p&gt;  In C# you can write a class and expose its properties and methods  through the window.external object of the WebBrowser control so that  you can use it in javascript &lt;/p&gt; &lt;p&gt;  I haven't found a simply way to do this with Ruby. &lt;/p&gt; &lt;p&gt;  So I thought how I can associate browser events to ruby code .. I  needed a Bridge .. Hey, wait ..AJAX!! &lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;a href="http://kentaromiura.dyndns.tv/rawuw.htm"&gt;Read More!&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-2873986856793783738?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://kentaromiura.dyndns.tv/rawuw.htm' title='RAWUW - Ruby Ajax &amp; Webservice UI for Windows'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/2873986856793783738/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=2873986856793783738' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/2873986856793783738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/2873986856793783738'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/03/rawuw-ruby-ajax-webservice-ui-for.html' title='RAWUW - Ruby Ajax &amp; Webservice UI for Windows'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-1348773101847308569</id><published>2007-03-15T17:32:00.000+01:00</published><updated>2007-03-15T18:54:18.218+01:00</updated><title type='text'>recensione joost (1 parte)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_M-9VmpY0msQ/Rfl1dZSSQWI/AAAAAAAAABY/Pmg0pNoHjWM/s1600-h/J_07blog_Nettwerk_MyJ.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://3.bp.blogspot.com/_M-9VmpY0msQ/Rfl1dZSSQWI/AAAAAAAAABY/Pmg0pNoHjWM/s320/J_07blog_Nettwerk_MyJ.jpg" alt="" id="BLOGGER_PHOTO_ID_5042190405682217314" border="0" /&gt;&lt;/a&gt;Ecco la prima parte della mia personalissima recensione a Joost, la recensione sarà in 2 lingue, italiano  e inglese&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Cos' è Joost&lt;/span&gt;&lt;br /&gt;Il progetto Joost, conosciuto in passato come The Venice Project,&lt;br /&gt;è un progetto degli stessi autori di &lt;a href="http://it.wikipedia.org/wiki/Skype"&gt;Skype&lt;/a&gt; e &lt;a href="http://it.wikipedia.org/wiki/Kazaa"&gt;Kazaa &lt;/a&gt;ovvero Janus Friis e Ikals Zennstrom.&lt;br /&gt;Il progetto è molto interessante poichè mira a diventare la piattaforma di diffusione di contenuti video del futuro.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_M-9VmpY0msQ/RfhrrZSSQTI/AAAAAAAAABA/zuOn1CTR1jA/s1600-h/J_01blog_OTF_nav.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://2.bp.blogspot.com/_M-9VmpY0msQ/RfhrrZSSQTI/AAAAAAAAABA/zuOn1CTR1jA/s320/J_01blog_OTF_nav.jpg" alt="" id="BLOGGER_PHOTO_ID_5041898176107397426" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;L' obiettivo è ricreare la senzazione di guardare la TV, sfruttando le tecnologie attuali,&lt;br /&gt;lo streaming dei dati utilizza infatti usa un protocollo &lt;a href="http://it.wikipedia.org/wiki/P2p"&gt;P2P&lt;/a&gt; e i video sono compressi in formato &lt;a href="http://it.wikipedia.org/wiki/H264"&gt;h264 &lt;/a&gt;e trasmessi in tempo reale al momento della richiesta.&lt;br /&gt;La parte più interessante di tutto ciò è che è basato sulla Mozilla Platform,&lt;br /&gt;esattamente come &lt;a href="http://www.spreadfirefox.com/"&gt;Firefox&lt;/a&gt;, questo dovrebbe bastare per far capire che in futuro usciranno plugin e skin per questo programma, oltre ad essere un punto di certezza per la stabilità dell' applicazione.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_M-9VmpY0msQ/Rfhtx5SSQVI/AAAAAAAAABQ/-3x9XtB3H1k/s1600-h/J_04blog_WBR_nav_info.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://4.bp.blogspot.com/_M-9VmpY0msQ/Rfhtx5SSQVI/AAAAAAAAABQ/-3x9XtB3H1k/s320/J_04blog_WBR_nav_info.jpg" alt="" id="BLOGGER_PHOTO_ID_5041900486799802706" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Il progetto, così come Skype mira ad essere gratuito e già da ora i gestori di Joost hanno stretto accordi con diversi fornitori dei contenuti per assicurare il buon esito del progetto, la piattaforma Joost attira molto sia perchè&lt;br /&gt;dietro ad esso c'e' un gruppo che si è già affermato con applicazioni di successo,&lt;br /&gt;sia perchè all' interno dei contenuti sono presenti dei minispot pubblicitari di qualche secondo che garantiscono ai provider di contenuti i costi di gestione e attirano persone interessate a lucrarci, in un articolo apparso sul &lt;i&gt;Time&lt;/i&gt; i 2 creatori stima no che entro 2/3  anni&lt;br /&gt;avremo a disposizione 5000 canali!!!&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_M-9VmpY0msQ/Rfhr6ZSSQUI/AAAAAAAAABI/b9xM-hj1600/s1600-h/J_03blog_OTF_MyJ.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://2.bp.blogspot.com/_M-9VmpY0msQ/Rfhr6ZSSQUI/AAAAAAAAABI/b9xM-hj1600/s320/J_03blog_OTF_MyJ.jpg" alt="" id="BLOGGER_PHOTO_ID_5041898433805435202" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I video hanno un ottima qualità, come potete vedere dai screenshot allegati a questo post, e sono suddivisi per "Canali", già da ora sono disponibili canali molto interessanti come ad Esempio Fifth gear, un canale inglese che fa recensioni di Automobili, Ci sono vari canali musicali ed alcuni canali di MTV, c'e' un canale (BONG) che trasmette Anime giapponesi(!!)&lt;br /&gt;nella seconda parte della recensione farò una panoramica dei canali disponibili, al momento della stesura e spiegherò il funzionamento delle varie parti che compongono questo software, compresi gli attuali plug-in disponibili(la figura qui a fianco ne mostra alcuni)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-1348773101847308569?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/1348773101847308569/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=1348773101847308569' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1348773101847308569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1348773101847308569'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/03/recensione-joost-1-parte.html' title='recensione joost (1 parte)'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_M-9VmpY0msQ/Rfl1dZSSQWI/AAAAAAAAABY/Pmg0pNoHjWM/s72-c/J_07blog_Nettwerk_MyJ.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-4900128251581754860</id><published>2007-03-05T12:37:00.000+01:00</published><updated>2007-03-05T12:42:30.185+01:00</updated><title type='text'>Google dom translator scriptlet</title><content type='html'>Andr3a Giammarchi write a good pieces of code, i make a scriplet to anydays use..&lt;br /&gt;&lt;br /&gt;just save &lt;a href='javascript:function ap(a,b){a.appendChild(b);};function GT(translate,lan,def){GT.Call=function(link){function get(i){return lang[s.item(s.selectedIndex).firstChild.nodeValue][i]};function join(){return a.join.call(arguments,"")};var a=new Array(2),e=document.charset||document.characterSet,f=window.encodeURIComponent||window.encodeURI||escape,s=link.parentNode.firstChild,t=((window.getSelection&amp;&amp;window.getSelection())||(document.getSelection&amp;&amp;document.getSelection())||(document.selection&amp;&amp;document.selection.createRange&amp;&amp;document.selection.createRange().text));if(s.selectedIndex){a=[get(0),get(1)];link.href=join("http://translate.google.com/translate",t!=""?join("_t?text=",f(t)):join("?u=",f(location.href)),"&amp;hl=",lan||a[1],"&amp;langpair=",a[0],"|",a[1],"&amp;tbb=1&amp;ie=",e);};return!!s.selectedIndex;};function create(name){return document.createElement(name)};function text(value){return document.createTextNode(value)};var lang={"ARA - ENG":["ar","en"],"KOR - ENG":["ko","en"],"ENG - ARA":["en","ar"],"ENG - FRA":["en","fr"],"ENG - RUS":["en","ru"],"PRT - ENG":["pt","en"],"DEU - ENG":["de","en"],"CHN - ENG":["zh","en"],"FRA - ENG":["fr","en"],"ENG - CHN S":["en","zh-CN"],"ENG - JPN":["en","ja"],"ENG - ESP":["en","es"],"RUS - ENG":["ru","en"],"CHN S - CHN T":["zh-CN","zh-TW"],"FRA - DEU":["fr","de"],"ENG - CHN T":["en","zh-TW"],"ENG - ITA":["en","it"],"ENG - DEU":["en","de"],"ESP - ENG":["es","en"],"CHN T - CHN S":["zh-TW","zh-CN"],"JPN - ENG":["ja","en"],"ENG - KOR":["en","ko"],"ENG - PRT":["en","pt"],"ITA - ENG":["it","en"],"DEU - FRA":["de","fr"]},div=create("div"),link=create("a"),option=create("option"),select=create("select");div.appendChild(select);div.appendChild(link);link.href="#GT";link.target="_blank";link.onclick=function(){return GT.Call(this)};ap(link,text(translate||"Translate"));ap(select,option);for(var key in lang){if(key.indexOf("-")&gt;0){option=create("option");ap(option,text(key));ap(select,option);if(key===def)option.selected="selected";}};return div;};ap(document.body,GT("Translate","en","ITA - ENG"));'&gt;this link&lt;/a&gt; on you preferites sites &lt;br /&gt;and use where you want.&lt;br /&gt;Click on it to test it&lt;br /&gt;I tried on FF and IE7, enjoy ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-4900128251581754860?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://webreflection.blogspot.com/2007/03/dom-google-translator.html' title='Google dom translator scriptlet'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/4900128251581754860/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=4900128251581754860' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/4900128251581754860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/4900128251581754860'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/03/google-dom-translator-scriptlet.html' title='Google dom translator scriptlet'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-7464249805646006953</id><published>2007-03-04T20:36:00.000+01:00</published><updated>2007-03-04T20:44:28.229+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='joost'/><category scheme='http://www.blogger.com/atom/ns#' term='invitation'/><category scheme='http://www.blogger.com/atom/ns#' term='invite'/><title type='text'>Project venic...I mean joost</title><content type='html'>I received a beta tester invite for this marvelous program, in these days i m trying it&lt;br /&gt;and soon i will post a review of this product, stay tuned..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-7464249805646006953?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.joost.com' title='Project venic...I mean joost'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/7464249805646006953/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=7464249805646006953' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/7464249805646006953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/7464249805646006953'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2007/03/project-venici-mean-joost.html' title='Project venic...I mean joost'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-1109208442030911397</id><published>2006-12-07T22:42:00.000+01:00</published><updated>2007-03-05T18:04:00.941+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='design pattern'/><category scheme='http://www.blogger.com/atom/ns#' term='singleton'/><category scheme='http://www.blogger.com/atom/ns#' term='screencast'/><title type='text'>KentaKast #01 Design pattern</title><content type='html'>Ecco il mio primo screencast, il primo di una serie dedicata ai design pattern in javascript&lt;br /&gt;in questo screencast parlerò del &lt;a href="http://it.wikipedia.org/wiki/Singleton"&gt;Singleton&lt;/a&gt;&lt;br /&gt;Se avrà successo ne seguiranno degli altri..&lt;br /&gt;&lt;a href="http://www.digitalexperience.eu/upload/karl/kentakast.avi" onclick="play1()"&gt;Buona visione&lt;/a&gt;&lt;br /&gt;&lt;span id="stub"&gt;&lt;/span&gt;&lt;br /&gt;&lt;script language="javascript"&gt;function play1(){document.getElementById("stub").innerHTML='&lt;object id="mediaPlayer" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" height="300" width="400"&gt;&lt;param name="autoStart" value="true"&gt;&lt;param name="url" value="http://www.digitalexperience.eu/upload/karl/kentakast.avi"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;param name="uiMode" value="full"&gt;&lt;param name="loop" value="false"&gt;&lt;embed id="WindowsmediaPlayer" type="application/x-mplayer2" src="http://www.digitalexperience.eu/upload/karl/kentakast.avi" height="300" width="400"&gt;&lt;/embed&gt;&lt;/object&gt;';return false;}&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-1109208442030911397?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.digitalexperience.eu/upload/karl/kentakast.avi' title='KentaKast #01 Design pattern'/><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/1109208442030911397/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=1109208442030911397' title='6 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1109208442030911397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/1109208442030911397'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2006/12/kentakast-01-design-pattern.html' title='KentaKast #01 Design pattern'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-116309343735024468</id><published>2006-11-09T18:23:00.000+01:00</published><updated>2006-11-15T16:06:01.798+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhttprequest'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='xmlhttp'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='crossbrowser'/><title type='text'></title><content type='html'>latest version of getXDOC don't work in IE 4 because in IE 4&lt;br /&gt;try catch are not supported, but IE4 also know the CC&lt;br /&gt;so we need a check for this..&lt;br /&gt;and how can we make try catch invisible to IE4?&lt;br /&gt;using a 'simple' eval&lt;br /&gt;IE4 still don't work well, but is the better I can do ^_^;;&lt;br /&gt;&lt;br /&gt;Also notice that the correct object for a XHR is&lt;br /&gt;&lt;pre&gt;Msxml2.XMLHTTP, not DOMDocument!&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;getXDOC modified version:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;function getXDOC(){&lt;br /&gt;if(typeof(window.XMLHttpRequest)!='undefined')&lt;br /&gt;return new XMLHttpRequest();&lt;br /&gt;&lt;br /&gt;/*@cc_on&lt;br /&gt;&lt;br /&gt;if(!(@_jscript_version&amp;lt;4)){&lt;br /&gt;return eval('(function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0");}catch(e__x){return new ActiveXObject("Msxml2.XMLHTTP.3.0");}}())');&lt;br /&gt;}&lt;br /&gt;@*/&lt;br /&gt;return new ActiveXObject('Msxml2.XMLHTTP.3.0');&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Sorry Andrea, I use conditional compilation again -.-&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-116309343735024468?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/116309343735024468/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=116309343735024468' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/116309343735024468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/116309343735024468'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2006/11/latest-version-of-getxdoc-dont-work-in.html' title=''/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-116246974175846217</id><published>2006-11-02T13:12:00.000+01:00</published><updated>2006-11-15T21:53:37.780+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xhttprequest'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='xmlhttp'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='crossbrowser'/><title type='text'>Final method to obtain a dom Document ?</title><content type='html'>after the reading of &lt;a href="http://blogs.msdn.com/xmlteam/archive/2006/10/23/using-the-right-version-of-msxml-in-internet-explorer.aspx"&gt;this post on IE Blog talking about using the right version of msxml&lt;/a&gt; I come of a possible solution to get the XMLHttpRequest:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;function getXDOC(){&lt;br /&gt;//W3C native Object&lt;br /&gt;if (window.XMLHttpRequest)return new XMLHttpRequest();&lt;br /&gt;&lt;br /&gt;//IE 4.0 fallback [try..catch]&lt;br /&gt;var progIDs=[];&lt;br /&gt;progIDs[0]='Msxml2.XMLHTTP.3.0';&lt;br /&gt;var i = 0;&lt;br /&gt;/*@cc_on&lt;br /&gt;progIDs = [ 'Msxml2.XMLHTTP.6.0', 'Msxml2.XMLHTTP.3.0']; //6.0 is better of 3.0&lt;br /&gt;for (; i &amp;lt; progIDs.length; i++) {&lt;br /&gt; try{&lt;br /&gt;@*/&lt;br /&gt;  if (window.ActiveXObject){&lt;br /&gt;   var xmlDOM = new ActiveXObject(progIDs[i]);&lt;br /&gt;   xmlDOM.setProperty("SelectionLanguage", "XPath");//because 3.0 default is XSLPattern&lt;br /&gt;                 return xmlDOM;&lt;br /&gt;  }&lt;br /&gt;/*@cc_on&lt;br /&gt; }&lt;br /&gt; catch (ex) {&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;@*/     &lt;br /&gt;return null;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Enjoy ;)&lt;br /&gt;&lt;br /&gt;Ps. stay tuned for a corrected version..&lt;br /&gt;Update:&lt;br /&gt;http://mykenta.blogspot.com/2006/11/latest-version-of-getxdoc-dont-work-in.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-116246974175846217?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/116246974175846217/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=116246974175846217' title='8 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/116246974175846217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/116246974175846217'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2006/11/final-method-to-obtain-dom-document.html' title='Final method to obtain a dom Document ?'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-116047856966651475</id><published>2006-10-10T13:03:00.000+02:00</published><updated>2006-11-15T21:54:46.698+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='publisher'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='subscriber'/><category scheme='http://www.blogger.com/atom/ns#' term='observer'/><category scheme='http://www.blogger.com/atom/ns#' term='base'/><title type='text'>Observer Subscriber in Base</title><content type='html'>I was playing with Dean Edwards &lt;a href="http://dean.edwards.name/base/Base.js" description="Base"&gt;Base&lt;/a&gt; and I would to implement&lt;br /&gt;the Observer Subscriver pattern.&lt;br /&gt;I wrote this Observer implementation:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;//Clone method&lt;br /&gt;Base.prototype.clone=function(){return new Base(this);}&lt;br /&gt;&lt;br /&gt;//Define the Observer class&lt;br /&gt;var Observer= Base.extend({&lt;br /&gt;subscribe:function (obj,evt){&lt;br /&gt; //if(!this["on"+evt])this["on"+evt]=[];&lt;br /&gt; if(typeof(this["on"+evt]) === "undefined")this["on"+evt]=[];&lt;br /&gt; this["on"+evt].push(obj);&lt;br /&gt;},&lt;br /&gt;raise:function (evt){&lt;br /&gt;var list=this["on"+evt];&lt;br /&gt;&lt;br /&gt; if(list){&lt;br /&gt; var max=list.length;&lt;br /&gt; for(var i=0;i&amp;lt;max;i++)&lt;br /&gt;  //if(list[i].update)list[i].update();&lt;br /&gt;  if(typeof(list[i].update)!=="undefined")list[i].update();&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;});&lt;br /&gt;//Define the subscriber class&lt;br /&gt;var Subscriber = Base.extend({update:function(){alert("update() must be implemented");}});&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and this little test&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;/*Simple example of implementation*/&lt;br /&gt;&lt;br /&gt;//Istantantiate a Observer&lt;br /&gt;var observer= new Observer();&lt;br /&gt;&lt;br /&gt;//Define a Event&lt;br /&gt;observer.evt=function(){&lt;br /&gt;//do stuff&lt;br /&gt;this.raise("evt");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//Istantiate a Subscriber&lt;br /&gt;var subscriber1=new Subscriber();&lt;br /&gt;//Clone a Subscriber&lt;br /&gt;var subscriber2=subscriber1.clone();&lt;br /&gt;&lt;br /&gt;//define a custom update function&lt;br /&gt;subscriber2.update=function(){&lt;br /&gt;alert("here update() was implemented");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//subscribe our 2 object&lt;br /&gt;observer.subscribe(subscriber1,"evt");&lt;br /&gt;observer.subscribe(subscriber2,"evt");&lt;br /&gt;&lt;br /&gt;//Raise the event&lt;br /&gt;observer.evt();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Base is Great, it was so simple!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update!&lt;/b&gt;&lt;br /&gt;As I said in the comment this wasn't a correct implementation.&lt;br /&gt;&lt;br /&gt;A correct(I hope) is the follow implementation:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;//Clone method&lt;br /&gt;Base.prototype.clone=function(){return new Base(this);}&lt;br /&gt;&lt;br /&gt;var Observer = Base.extend({&lt;br /&gt;update:function(evt){&lt;br /&gt;alert("update() must be defined");&lt;br /&gt;}&lt;br /&gt;});&lt;br /&gt;var Subject = Base.extend({&lt;br /&gt;&lt;span style="text-decoration: line-through;"&gt;observers:[],&lt;/span&gt;&lt;br /&gt;&lt;span style="color:red;"&gt;constructor:function(){this.observers=new Array();},&lt;/span&gt;&lt;br /&gt;registerObserver:function(obj){&lt;br /&gt;this.observers.push(obj);&lt;br /&gt;return obj;&lt;br /&gt;},&lt;br /&gt;unregisterObserver:function(obj){&lt;br /&gt;if(this.observers.length&amp;gt;0)&lt;br /&gt; var tmp=this.observers.pop();&lt;br /&gt; if (tmp!==obj){&lt;br /&gt;  var max=this.observers.length;&lt;br /&gt;  for(var i=0;i&amp;lt;max;i++)&lt;br /&gt;   if(this.observers[i]===obj){this.observers[i]=tmp;break;}&lt;br /&gt; }&lt;br /&gt; return this;&lt;br /&gt;},&lt;br /&gt;notifyObserver:function(evt){&lt;br /&gt;var max=this.observers.length;&lt;br /&gt;for(var i=0;i&amp;lt;max;i++)&lt;br /&gt; this.observers[i].update(evt);&lt;br /&gt;}&lt;br /&gt;});&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And so the Test:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;/*Example:*/&lt;br /&gt;var subject = new Subject();&lt;br /&gt;subject.x=0;&lt;br /&gt;subject.add=function(){&lt;br /&gt;this.x++;&lt;br /&gt;this.notifyObserver();&lt;br /&gt;}&lt;br /&gt;var observer1 = new Observer();&lt;br /&gt;var observer2 =observer1.clone();&lt;br /&gt;observer1.update=function(){alert("now x is "+subject.x);}&lt;br /&gt;observer2.update=function(){alert("something happened on subject")}&lt;br /&gt;&lt;br /&gt;subject.registerObserver(observer1);&lt;br /&gt;subject.registerObserver(observer2);&lt;br /&gt;subject.add();&lt;br /&gt;subject.unregisterObserver(observer2);&lt;br /&gt;subject.add();&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-116047856966651475?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/116047856966651475/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=116047856966651475' title='3 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/116047856966651475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/116047856966651475'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2006/10/observer-subscriber-in-base.html' title='Observer Subscriber in Base'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-116013380720092198</id><published>2006-10-06T13:08:00.000+02:00</published><updated>2006-11-15T21:55:45.578+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='typeof'/><category scheme='http://www.blogger.com/atom/ns#' term='crossbrowser'/><title type='text'>typeof and Typeof</title><content type='html'>&lt;a href="http://dean.edwards.name/weblog/2006/05/prototype-and-base"&gt;Dean Edwards&lt;/a&gt;  point me out that &lt;a href="http://www.uselesspickles.com/blog/2006/06/02/javascripts-regex-has-an-identity-crisis/"&gt;typeof doesn’t always work&lt;/a&gt; so &lt;a href="http://dean.edwards.name/weblog/2006/05/prototype-and-base#comment7488"&gt;I come to a solution&lt;/a&gt; to this issue.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;function isFunction(x){&lt;br /&gt;return&lt;br /&gt; typeof(x)==="function" &amp;&amp;amp; &lt;br /&gt;  (typeof(x.toSource)==="undefined" || x.toSource().charAt(0)!="/")&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;basically it control if is a function (&lt;q&gt;typeof(x)==="function"&lt;/q&gt;)&lt;br /&gt;and if is a gecko browser (&lt;q&gt;typeof(x.toSource)==="undefined"&lt;/q&gt;)&lt;br /&gt;it control if is a RegExp(&lt;q&gt;x.toSource().charAt(0)!="/"&lt;/q&gt;).&lt;br /&gt;&lt;br /&gt;So I wrote my simple Typeof function&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;function Typeof(what){&lt;br /&gt;switch(what){&lt;br /&gt; case Object:return "Object";&lt;br /&gt; case Function:return "Function";&lt;br /&gt; case Array:return "Array";&lt;br /&gt; case String:return "String";&lt;br /&gt; case Boolean:return "Boolean";&lt;br /&gt; case Number:return "Number";&lt;br /&gt; case RegExp:return "RegExp";&lt;br /&gt; case Date:return "Date";&lt;br /&gt; case Error:return "Error";&lt;br /&gt; case Math:return "object";&lt;br /&gt; case null:return "null";&lt;br /&gt;}&lt;br /&gt;if(typeof(what)==="function" &amp;&amp;amp; (typeof(what.toSource)!=="undefined" &amp;&amp;amp; what.toSource().charAt(0)=="/"))return "object"; //regex for moz&lt;br /&gt;return typeof(what);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Enjoy ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-116013380720092198?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/116013380720092198/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=116013380720092198' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/116013380720092198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/116013380720092198'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2006/10/typeof-and-typeof.html' title='typeof and Typeof'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-115650936322882094</id><published>2006-08-25T14:34:00.000+02:00</published><updated>2006-11-15T21:57:27.854+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='faster device'/><category scheme='http://www.blogger.com/atom/ns#' term='duff device'/><title type='text'>kentaromiura fastest device (duff's device optimized)</title><content type='html'>&lt;pre&gt;&lt;br /&gt;function kentaromiuraFastestDevice(iterations) {&lt;br /&gt;&lt;br /&gt;var testVal=iterations;&lt;br /&gt;if(parseInt(iterations/8)){&lt;br /&gt; var n=iterations%8;&lt;br /&gt; do{  &lt;br /&gt;  --testVal; //do stuff&lt;br /&gt;  --testVal; //do stuff&lt;br /&gt;  --testVal; //do stuff  &lt;br /&gt;  --testVal; //do stuff  &lt;br /&gt;  --testVal; //do stuff  &lt;br /&gt;  --testVal; //do stuff  &lt;br /&gt;  --testVal; //do stuff  &lt;br /&gt;  --testVal; //do stuff&lt;br /&gt; }while(testVal!=n);&lt;br /&gt;}&lt;br /&gt;while(testVal--){&lt;br /&gt; //do stuff&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-115650936322882094?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/115650936322882094/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=115650936322882094' title='4 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/115650936322882094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/115650936322882094'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2006/08/kentaromiura-fastest-device-duffs.html' title='kentaromiura fastest device (duff&apos;s device optimized)'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-115339170736840427</id><published>2006-07-20T12:29:00.000+02:00</published><updated>2006-11-15T21:58:13.750+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='setAttribute'/><category scheme='http://www.blogger.com/atom/ns#' term='dom'/><category scheme='http://www.blogger.com/atom/ns#' term='crossbrowser'/><title type='text'>standardise IE setAttribute (Part 2)</title><content type='html'>I go back to this subject because I've done some improvements to&lt;br /&gt;the custom comment script that should Standardise IE 5.x setAttribute,&lt;br /&gt;I create no other Object that could collide, look:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;document.createElement &lt;span class="jshoperators"&gt;=&lt;/span&gt; &lt;span class="jshglobals"&gt;function&lt;/span&gt;(cE,interface){&lt;br /&gt;&lt;span class="jshcomments"&gt;//this is for DOM node not dinamically created&lt;/span&gt;&lt;br /&gt;onload&lt;span class="jshoperators"&gt;=&lt;/span&gt;&lt;span class="jshglobals"&gt;function&lt;/span&gt;(){&lt;br /&gt;&lt;span class="jshglobals"&gt;var&lt;/span&gt; list&lt;span class="jshoperators"&gt;=&lt;/span&gt;document.all;&lt;br /&gt;&lt;span class="jshglobals"&gt;var&lt;/span&gt; &lt;span class="jshmethods"&gt;max&lt;/span&gt;&lt;span class="jshoperators"&gt;=&lt;/span&gt;list.&lt;span class="jshproperties"&gt;length&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span class="jshglobals"&gt;while&lt;/span&gt;(&lt;span class="jshoperators"&gt;--&lt;/span&gt;&lt;span class="jshmethods"&gt;max&lt;/span&gt;)&lt;br /&gt;{&lt;br /&gt;list[&lt;span class="jshmethods"&gt;max&lt;/span&gt;].getAttribute&lt;span class="jshoperators"&gt;=&lt;/span&gt;interface.getAttribute;&lt;br /&gt;list[&lt;span class="jshmethods"&gt;max&lt;/span&gt;].setAttribute&lt;span class="jshoperators"&gt;=&lt;/span&gt;interface.setAttribute;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;span class="jshcomments"&gt;//HTML node&lt;/span&gt;&lt;br /&gt;list[&lt;span class="jshnumbers"&gt;0&lt;/span&gt;].getAttribute&lt;span class="jshoperators"&gt;=&lt;/span&gt;interface.getAttribute;&lt;br /&gt;list[&lt;span class="jshnumbers"&gt;0&lt;/span&gt;].setAttribute&lt;span class="jshoperators"&gt;=&lt;/span&gt;interface.setAttribute;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="jshglobals"&gt;return&lt;/span&gt; &lt;span class="jshglobals"&gt;function&lt;/span&gt; (tagName) {&lt;br /&gt;&lt;span class="jshglobals"&gt;var&lt;/span&gt; element &lt;span class="jshoperators"&gt;=&lt;/span&gt; cE(tagName);&lt;br /&gt;element.getAttribute&lt;span class="jshoperators"&gt;=&lt;/span&gt;interface.getAttribute;&lt;br /&gt;element.setAttribute&lt;span class="jshoperators"&gt;=&lt;/span&gt;interface.setAttribute;&lt;br /&gt;&lt;br /&gt;&lt;span class="jshglobals"&gt;return&lt;/span&gt; element;&lt;br /&gt;}&lt;br /&gt;}(document.createElement,{&lt;br /&gt;&lt;br /&gt;getAttribute:&lt;span class="jshglobals"&gt;function&lt;/span&gt; (attribute) {&lt;br /&gt;&lt;br /&gt;&lt;span class="jshglobals"&gt;switch&lt;/span&gt;(attribute){&lt;br /&gt;case &lt;span class="jshstrings"&gt;"class"&lt;/span&gt;: attribute &lt;span class="jshoperators"&gt;=&lt;/span&gt; &lt;span class="jshstrings"&gt;"className"&lt;/span&gt;;&lt;span class="jshglobals"&gt;break&lt;/span&gt;;&lt;br /&gt;case &lt;span class="jshstrings"&gt;"for"&lt;/span&gt;: attribute &lt;span class="jshoperators"&gt;=&lt;/span&gt; &lt;span class="jshstrings"&gt;"htmlFor"&lt;/span&gt;;&lt;span class="jshglobals"&gt;break&lt;/span&gt;;&lt;br /&gt;case &lt;span class="jshstrings"&gt;"style"&lt;/span&gt;: &lt;span class="jshglobals"&gt;return&lt;/span&gt; &lt;span class="jshglobals"&gt;this&lt;/span&gt;.style.cssText;&lt;span class="jshglobals"&gt;break&lt;/span&gt;;&lt;br /&gt;case &lt;span class="jshstrings"&gt;"type"&lt;/span&gt;:&lt;span class="jshglobals"&gt;return&lt;/span&gt;(&lt;span class="jshglobals"&gt;this&lt;/span&gt;.id)&lt;span class="jshoperators"&gt;?&lt;/span&gt;((document.getElementById)&lt;span class="jshoperators"&gt;?&lt;/span&gt;document.getElementById(&lt;span class="jshglobals"&gt;this&lt;/span&gt;.id):document.all[&lt;span class="jshglobals"&gt;this&lt;/span&gt;.id]).type:&lt;span class="jshglobals"&gt;this&lt;/span&gt;.type;&lt;span class="jshglobals"&gt;break&lt;/span&gt;;&lt;br /&gt;case &lt;span class="jshstrings"&gt;"accesskey"&lt;/span&gt;:&lt;span class="jshglobals"&gt;return&lt;/span&gt; &lt;span class="jshglobals"&gt;this&lt;/span&gt;.accessKey;&lt;span class="jshglobals"&gt;break&lt;/span&gt;;&lt;br /&gt;case &lt;span class="jshstrings"&gt;"maxlength"&lt;/span&gt;:&lt;span class="jshglobals"&gt;return&lt;/span&gt; &lt;span class="jshglobals"&gt;this&lt;/span&gt;.maxLength;&lt;span class="jshglobals"&gt;break&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;span class="jshglobals"&gt;return&lt;/span&gt; &lt;span class="jshglobals"&gt;this&lt;/span&gt;[attribute];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;,setAttribute:&lt;span class="jshglobals"&gt;function&lt;/span&gt; (attribute, value) {&lt;br /&gt;&lt;br /&gt;&lt;span class="jshglobals"&gt;switch&lt;/span&gt;(attribute){&lt;br /&gt;case &lt;span class="jshstrings"&gt;"name"&lt;/span&gt;:&lt;span class="jshglobals"&gt;return&lt;/span&gt; document.createElement(&lt;span class="jshglobals"&gt;this&lt;/span&gt;.outerHTML.&lt;span class="jshmethods"&gt;replace&lt;/span&gt;(/name=[a-zA-Z]+/,&lt;span class="jshstrings"&gt;" "&lt;/span&gt;).&lt;span class="jshmethods"&gt;replace&lt;/span&gt;(&lt;span class="jshstrings"&gt;"&amp;gt;"&lt;/span&gt;,&lt;span class="jshstrings"&gt;" name="&lt;/span&gt;&lt;span class="jshoperators"&gt;+&lt;/span&gt;value&lt;span class="jshoperators"&gt;+&lt;/span&gt;&lt;span class="jshstrings"&gt;"&amp;gt;"&lt;/span&gt;));&lt;br /&gt;case &lt;span class="jshstrings"&gt;"class"&lt;/span&gt;: attribute &lt;span class="jshoperators"&gt;=&lt;/span&gt; &lt;span class="jshstrings"&gt;"className"&lt;/span&gt;;&lt;span class="jshglobals"&gt;break&lt;/span&gt;;&lt;br /&gt;case &lt;span class="jshstrings"&gt;"for"&lt;/span&gt;: attribute &lt;span class="jshoperators"&gt;=&lt;/span&gt; &lt;span class="jshstrings"&gt;"htmlFor"&lt;/span&gt;;&lt;span class="jshglobals"&gt;break&lt;/span&gt;;&lt;br /&gt;case &lt;span class="jshstrings"&gt;"type"&lt;/span&gt;:&lt;br /&gt;&lt;span class="jshglobals"&gt;var&lt;/span&gt; me&lt;span class="jshoperators"&gt;=&lt;/span&gt;&lt;span class="jshglobals"&gt;this&lt;/span&gt;.parentNode;&lt;br /&gt;&lt;br /&gt;&lt;span class="jshglobals"&gt;if&lt;/span&gt;(&lt;span class="jshoperators"&gt;!&lt;/span&gt;/id=/.&lt;span class="jshmethods"&gt;test&lt;/span&gt;(&lt;span class="jshglobals"&gt;this&lt;/span&gt;.outerHTML))&lt;br /&gt;&lt;span class="jshglobals"&gt;this&lt;/span&gt;.id&lt;span class="jshoperators"&gt;=&lt;/span&gt;&lt;span class="jshglobals"&gt;this&lt;/span&gt;.uniqueID;&lt;br /&gt;&lt;span class="jshglobals"&gt;if&lt;/span&gt;(me){&lt;br /&gt;&lt;span class="jshglobals"&gt;this&lt;/span&gt;.outerHTML&lt;span class="jshoperators"&gt;=&lt;/span&gt;&lt;span class="jshglobals"&gt;this&lt;/span&gt;.outerHTML.&lt;span class="jshmethods"&gt;replace&lt;/span&gt;(/type=[a-zA-Z]+/,&lt;span class="jshstrings"&gt;" "&lt;/span&gt;).&lt;span class="jshmethods"&gt;replace&lt;/span&gt;(&lt;span class="jshstrings"&gt;"&amp;gt;"&lt;/span&gt;,&lt;span class="jshstrings"&gt;" type="&lt;/span&gt;&lt;span class="jshoperators"&gt;+&lt;/span&gt;value&lt;span class="jshoperators"&gt;+&lt;/span&gt;&lt;span class="jshstrings"&gt;"&amp;gt;"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="jshglobals"&gt;var&lt;/span&gt; t&lt;span class="jshoperators"&gt;=&lt;/span&gt;me.childNodes;&lt;br /&gt;&lt;span class="jshglobals"&gt;var&lt;/span&gt; &lt;span class="jshmethods"&gt;max&lt;/span&gt;&lt;span class="jshoperators"&gt;=&lt;/span&gt;t.&lt;span class="jshproperties"&gt;length&lt;/span&gt;;&lt;br /&gt;&lt;span class="jshglobals"&gt;for&lt;/span&gt;(&lt;span class="jshglobals"&gt;var&lt;/span&gt; i&lt;span class="jshoperators"&gt;=&lt;/span&gt;&lt;span class="jshnumbers"&gt;0&lt;/span&gt;;i&amp;lt;&lt;span class="jshmethods"&gt;max&lt;/span&gt;;i&lt;span class="jshoperators"&gt;++&lt;/span&gt;)&lt;br /&gt;&lt;span class="jshglobals"&gt;if&lt;/span&gt;(t[i].id&lt;span class="jshoperators"&gt;==&lt;/span&gt;&lt;span class="jshglobals"&gt;this&lt;/span&gt;.id){&lt;br /&gt;t[i].getAttribute&lt;span class="jshoperators"&gt;=&lt;/span&gt;&lt;span class="jshglobals"&gt;this&lt;/span&gt;.getAttribute;&lt;br /&gt;t[i].setAttribute&lt;span class="jshoperators"&gt;=&lt;/span&gt;&lt;span class="jshglobals"&gt;this&lt;/span&gt;.setAttribute;   &lt;br /&gt;}&lt;br /&gt;}&lt;span class="jshglobals"&gt;else&lt;/span&gt; &lt;span class="jshglobals"&gt;this&lt;/span&gt;.type&lt;span class="jshoperators"&gt;=&lt;/span&gt;value;&lt;br /&gt;&lt;br /&gt;&lt;span class="jshglobals"&gt;return&lt;/span&gt;;&lt;span class="jshglobals"&gt;break&lt;/span&gt;;&lt;br /&gt;case &lt;span class="jshstrings"&gt;"accesskey"&lt;/span&gt;:&lt;span class="jshglobals"&gt;this&lt;/span&gt;.accessKey&lt;span class="jshoperators"&gt;=&lt;/span&gt;value;&lt;span class="jshglobals"&gt;return&lt;/span&gt;;&lt;span class="jshglobals"&gt;break&lt;/span&gt;;&lt;br /&gt;case &lt;span class="jshstrings"&gt;"style"&lt;/span&gt;: &lt;span class="jshglobals"&gt;this&lt;/span&gt;.style.cssText &lt;span class="jshoperators"&gt;=&lt;/span&gt;value;&lt;span class="jshglobals"&gt;return&lt;/span&gt;;&lt;span class="jshglobals"&gt;break&lt;/span&gt;;&lt;br /&gt;case &lt;span class="jshstrings"&gt;"maxlength"&lt;/span&gt;:&lt;span class="jshglobals"&gt;this&lt;/span&gt;.maxLength&lt;span class="jshoperators"&gt;=&lt;/span&gt;value;&lt;span class="jshglobals"&gt;return&lt;/span&gt;;&lt;span class="jshglobals"&gt;break&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="jshglobals"&gt;if&lt;/span&gt;(attribute.&lt;span class="jshmethods"&gt;indexOf&lt;/span&gt;(&lt;span class="jshstrings"&gt;"on"&lt;/span&gt;)&lt;span class="jshoperators"&gt;==&lt;/span&gt;&lt;span class="jshnumbers"&gt;0&lt;/span&gt;){&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="jshglobals"&gt;this&lt;/span&gt;[attribute] &lt;span class="jshoperators"&gt;=&lt;/span&gt; &lt;span class="jshglobals"&gt;function&lt;/span&gt;(){&lt;span class="jshglobals"&gt;&lt;span class="jshmethods"&gt;eval&lt;/span&gt;&lt;/span&gt;(value)};&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;span class="jshglobals"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;span class="jshglobals"&gt;this&lt;/span&gt;[attribute] &lt;span class="jshoperators"&gt;=&lt;/span&gt; value;&lt;br /&gt;}&lt;br /&gt;});&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;to use it just insert this line of code:&lt;br /&gt;&lt;!--[if lt IE 7]&gt;&lt;script language="javascript" type="text/javascript" src="test.js"&gt;&lt;/script&gt;&lt;![endif]--&gt;&lt;br /&gt;&amp;lt;!--[if lt IE 7]&amp;gt;&amp;lt;script language="javascript" type="text/javascript" src="IEDOM.js"&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;![endif]--&amp;gt;&lt;br /&gt;&lt;br /&gt;where IEDOM.js is the name of the script ..&lt;br /&gt;Enjoy!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;P.s. Look at http://www.devpro.it/JSL/ for a Great Library (&lt;br /&gt;I would make a post for who don't want to Prototypize Object but won't use this great library!!&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;Update:&lt;br /&gt;there are two known issues with this library:&lt;br /&gt;first, if you use innerHTML instead of createElement you don't have the standard setAttribute,&lt;br /&gt;so the solution is getting the node you are adding and extending the methods to each node it has&lt;br /&gt;&lt;br /&gt;the second issue is the setAttribute("name") not updating dom. You was forced to return the correct node with setAttribute, so&lt;br /&gt;&lt;br /&gt;var t=document.getElementById("x");&lt;br /&gt;var n=t.setAttribute("name","usrname");&lt;br /&gt;if(n)t=n;&lt;br /&gt;&lt;br /&gt;now t is correct ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-115339170736840427?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/115339170736840427/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=115339170736840427' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/115339170736840427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/115339170736840427'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2006/07/standardise-ie-setattribute-part-2.html' title='standardise IE setAttribute (Part 2)'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-115261218249717333</id><published>2006-07-11T11:22:00.000+02:00</published><updated>2006-11-15T21:58:55.843+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='crossbrowser'/><category scheme='http://www.blogger.com/atom/ns#' term='replace'/><title type='text'>Another Pearl in the Javascript World</title><content type='html'>&lt;p&gt;He Done It!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;After my &lt;a href="http://mykenta.blogspot.com/2006/04/standardizzare-setattribute-on-ie.html"&gt;IE setAttribute solution&lt;/a&gt; (&lt;a href="http://rey9999.altervista.org/kenta/framework_0.1.zip"&gt;get here the complete solution along with my framework&lt;/a&gt;)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://www.devpro.it/" rel="his personal website"&gt;Andrea Giammarchi&lt;/a&gt; wrote a solution for the replace method, now you can use replace with a function as parameter, and is Standard ECMA compatible!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://www.3site.it/CAXXATE/replace.html"&gt;Try it&lt;/a&gt; or &lt;a href="http://www.devpro.it/javascript_id_124.html"&gt;Get It!&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;It works on IE 5.x+, FF, NN,Opera, Safari, Konqueror , &lt;/p&gt;&lt;br /&gt;&lt;p&gt;currently I haven't the complete compatibility list because is in a test state.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Now Javascript world is &lt;strong&gt;more&lt;/strong&gt; standard!!! ;)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;ECMA define that the function get the follow parameters&lt;/p&gt;&lt;br /&gt;&lt;p&gt;a)the Match of Regex passed as 1st argument &lt;/p&gt;&lt;br /&gt;&lt;p&gt;b)the N submatch (also known as parenthetical matches) with 0&amp;lt;N&amp;lt;99 &lt;/p&gt;&lt;br /&gt;&lt;p&gt;c)position of the match in the original string &lt;/p&gt;&lt;br /&gt;&lt;p&gt;d)the original string &lt;/p&gt;&lt;br /&gt;&lt;p&gt;so "a12b34".replace(/[0-9][0-9]/g,function(a,b,c){return (Number(a)+1);}) must return "a13b35" in all the browser ;)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-115261218249717333?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/115261218249717333/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=115261218249717333' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/115261218249717333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/115261218249717333'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2006/07/another-pearl-in-javascript-world.html' title='Another Pearl in the Javascript World'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-114734523547863845</id><published>2006-05-11T12:59:00.000+02:00</published><updated>2006-11-15T22:01:07.003+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='addEvent'/><title type='text'>addEvent</title><content type='html'>//Cannot be detached&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;function addEvent(obj,type,fn){&lt;br /&gt;/*@cc_on obj.attachEvent('on'+type,function(){fn.apply(obj)});if(0){ @*/&lt;br /&gt;obj.addEventListener( type, fn, false );&lt;br /&gt;/*@cc_on } @*/&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-114734523547863845?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/114734523547863845/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=114734523547863845' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/114734523547863845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/114734523547863845'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2006/05/addevent.html' title='addEvent'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-114682670336690138</id><published>2006-05-05T12:56:00.000+02:00</published><updated>2007-10-29T23:05:47.485+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='getElementByClassName'/><title type='text'>getElementByClass</title><content type='html'>this code is now obsolete, take a look at &lt;a href="http://mykenta.blogspot.com/2007/10/getelementbyclass-revisited.html"&gt; this one &lt;/a&gt; to a better one, thanks.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;document.getElementsByClassName = function(searchClass,node,tag)&lt;br /&gt;{ &lt;br /&gt;&lt;br /&gt;if(node == null)node=document;&lt;br /&gt;var ce = new Array();&lt;br /&gt;if(tag==null || tag=='*')tag='*';&lt;br /&gt;var els = new Array();&lt;br /&gt;if (tag=='*' &amp;&amp;amp;amp; document.evaluate){&lt;br /&gt;var xpr=document.evaluate("//*",document, null, 0, null);&lt;br /&gt;var t=true;&lt;br /&gt; while (t=xpr.iterateNext()){&lt;br /&gt; if(els.push)&lt;br /&gt;  els.push(t);&lt;br /&gt; else&lt;br /&gt;  els[els.length]=t;&lt;br /&gt; };&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;els = node.getElementsByTagName(tag);&lt;br /&gt;var elsLen = els.length;&lt;br /&gt;var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");&lt;br /&gt;var i;var j;&lt;br /&gt;for (i = 0, j = 0; i &amp;lt; elsLen; i++) {&lt;br /&gt; if ( pattern.test(els[i].className) )&lt;br /&gt;  if (ce.push)&lt;br /&gt;   ce.push(els[i]);&lt;br /&gt;  else&lt;br /&gt;   ce[j++] = els[i];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;return ce;&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-114682670336690138?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/114682670336690138/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=114682670336690138' title='4 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/114682670336690138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/114682670336690138'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2006/05/getelementbyclass.html' title='getElementByClass'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-114561690434636038</id><published>2006-04-21T12:24:00.000+02:00</published><updated>2006-11-15T15:58:28.419+01:00</updated><title type='text'>standardizzare setAttribute on IE</title><content type='html'>setAttribute lavora in maniera strana su IE,&lt;br /&gt;fà quello che deve fare, ovvero cambiare dei valori di alcune proprietà,&lt;br /&gt;ma essendo che vengono modificate le proprietà di un oggetto JScript,&lt;br /&gt;alcune parole come class, for hanno un nome diverso..&lt;br /&gt;&lt;br /&gt;dopo aver letto l'articolo su &lt;a href="http://delete.me.uk/2004/09/ieproto.html"&gt;delete.me.uk&lt;/a&gt;&lt;br /&gt;ho deciso di utilizzare il metodo ben spiegato per risolvere&lt;br /&gt;i problemi su class,for e style e l'associazione di eventi on...&lt;br /&gt;&lt;br /&gt;ho usato un commento condizionale, includendo il codice sotto riportato si ottiene un setAttribute piu' standard.&lt;br /&gt;&lt;pre style="border: 1px solid silver; background-color: rgb(206, 206, 206);"&gt;&lt;br /&gt;/*@cc_on&lt;br /&gt;Element = function () {};&lt;br /&gt;&lt;br /&gt;Element.prototype.getAttribute = function (attribute) {&lt;br /&gt;  if (attribute == "class") attribute = "className";&lt;br /&gt;  if (attribute == "for") attribute = "htmlFor";&lt;br /&gt;  if (attribute == "style") return this.style.cssText;&lt;br /&gt;  else  return this[attribute];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Element.prototype.setAttribute = function (attribute, value) {&lt;br /&gt;  if (attribute == "class") attribute = "className";&lt;br /&gt;  if (attribute == "for") attribute = "htmlFor";&lt;br /&gt;  if (attribute == "style") this.style.cssText =value;&lt;br /&gt;  else&lt;br /&gt;  if(value.indexOf("on")!=0)&lt;br /&gt;   this[attribute] = function(){eval(value)};&lt;br /&gt;  else&lt;br /&gt;  this[attribute] = value;&lt;br /&gt;}&lt;br /&gt;var __IEcreateElement = document.createElement;&lt;br /&gt;&lt;br /&gt;document.createElement = function (tagName) {&lt;br /&gt;&lt;br /&gt;  var element = __IEcreateElement(tagName);&lt;br /&gt;&lt;br /&gt;  element.getAttribute=interface.getAttribute;&lt;br /&gt;  element.setAttribute=interface.setAttribute;&lt;br /&gt;&lt;br /&gt;  return element;&lt;br /&gt;}&lt;br /&gt;var interface = new Element;&lt;br /&gt;onload=function(){&lt;br /&gt; var list=document.all;&lt;br /&gt; var max=list.length;&lt;br /&gt; &lt;br /&gt; while(--max)&lt;br /&gt; {&lt;br /&gt;  list[max].getAttribute=interface.getAttribute;&lt;br /&gt;  list[max].setAttribute=interface.setAttribute;&lt;br /&gt;  &lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;@*/&lt;br /&gt;&lt;/pre&gt;naturalmente per aggiungere un evento nell'onload dovrete poi usare una funzione del genere:&lt;br /&gt;&lt;br /&gt;function addLoadEvent(func) {&lt;br /&gt;    var oldonload = window.onload;&lt;br /&gt;    if (typeof oldonload != 'function') {&lt;br /&gt;        window.onload = func;&lt;br /&gt;    }&lt;br /&gt;    else {&lt;br /&gt;        window.onload = function() {&lt;br /&gt;            oldonload();&lt;br /&gt;            func();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-114561690434636038?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/114561690434636038/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=114561690434636038' title='4 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/114561690434636038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/114561690434636038'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2006/04/standardizzare-setattribute-on-ie.html' title='standardizzare setAttribute on IE'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-114501255535745412</id><published>2006-04-14T13:00:00.000+02:00</published><updated>2006-11-15T15:58:28.327+01:00</updated><title type='text'>InnerDom</title><content type='html'>WHY INNERDOM&lt;br /&gt;&lt;br /&gt;Some months ago I found that innerHTML is not a standard way to manipulate HTML. Actually it is a proprietary implementation followed by many browser, althought it's very close to a de-facto standard and a lot faster that DOM actions.&lt;br /&gt;So I learnt what could replace innerHTML as the combinations of createElement, insertBefore or the better replaceChild, setAttribute; so I wrote the code this way...&lt;br /&gt;&lt;br /&gt;However I felt the need to write HTML directly into a node in a single step.&lt;br /&gt;So I thought and I wrote a function &lt;span style="font-family: courier new;"&gt;ResToDom&lt;/span&gt; that appends an object&lt;span style="font-family: courier new;"&gt; &lt;span style="font-family: georgia;"&gt;&lt;/span&gt;&lt;/span&gt;in eval-notation&lt;br /&gt;down to a node. Recently I felt it wasn't enough.&lt;br /&gt;What I really needed was a function that used that EVAL-Notation object and replace a node (as innerHTML does). I rewrite the whole &lt;span style="font-family: courier new;"&gt;resToDom &lt;/span&gt;into &lt;span style="font-family: courier new;"&gt;innerDom &lt;/span&gt;(i used two different names as the functions are different).&lt;br /&gt;&lt;br /&gt;Innerdom takes an object in EVAL notation and tries to convert it into HTML.&lt;br /&gt;this object has 2 special properties:&lt;br /&gt;&lt;br /&gt;TAG "the name of the tag to create"&lt;br /&gt;INNER "what tag contains"&lt;br /&gt;&lt;br /&gt;If &lt;span style="font-family: courier new;"&gt;innerDom &lt;/span&gt;finds an array it concatenates the nodes into a single node, so if used to write:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;document.getElementById("node").innerHTML="&lt;/span&gt;&lt;a style="font-family: courier new;" name="aa"&gt;aaa&lt;/a&gt;&lt;span style="font-family: courier new;"&gt; &lt;/span&gt;&lt;b style="font-family: courier new;"&gt;&amp;lt;b&amp;gt;some bold text&amp;lt;b/&amp;gt;&lt;/b&gt;&lt;span style="font-family: courier new;"&gt;";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;now you can write it as:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;innerDom("node",[{TAG:'a',name:'aa'},' ',{TAG:'b',INNER:'some bold text'}]);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Isn't that sw33t?&lt;br /&gt;&lt;br /&gt;why EvaL-Notation?&lt;br /&gt;&lt;br /&gt;because JSON it nowadays very frequently used joint with AJAx.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://freeforumzone.leonardo.it/viewmessaggi.aspx?f=19716&amp;amp;idd=177"&gt;Here the Code&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-114501255535745412?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/114501255535745412/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=114501255535745412' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/114501255535745412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/114501255535745412'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2006/04/innerdom.html' title='InnerDom'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-114406094409648090</id><published>2006-04-03T12:33:00.000+02:00</published><updated>2006-11-15T15:58:28.125+01:00</updated><title type='text'>Kentaromiura CrazyCorner 0.1 alpha(Gatsu)</title><content type='html'>I've recentelly find  Krazy Corner (www.mswebpeople.com/krazy.html)&lt;br /&gt;and i like some things but there was  other things that i don't like,&lt;br /&gt;example if i' ve already a site i don't want to rewrite it all from scratch adding a lot of&lt;br /&gt;extra HTML tag, so i write myself a function that write that code for me ;)&lt;br /&gt;&lt;br /&gt;i used span instead of b tag because that seems me better,&lt;br /&gt;the source is HERE :&lt;br /&gt;&lt;a href="http://freeforumzone.leonardo.it/viewmessaggi.aspx?f=19716&amp;idd=174"&gt;http://freeforumzone.leonardo.it/viewmessaggi.aspx?f=19716&amp;amp;idd=174&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;there isn't a live test page avaible yet nor a zip file,sorry but just&lt;br /&gt;put test.html , crazycorner.css and crazycorner.js&lt;br /&gt;in the same directory and enjoy ;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I don't use innerHTML in this library ,so i should have high compatibility..&lt;br /&gt;I test successful in&lt;br /&gt;Netscape 7.2,&lt;br /&gt;Ie 6.0sp2,&lt;br /&gt;FF1.5,    (it should work on 1.0 too because NN have the same gecko)&lt;br /&gt;opera 8.51&lt;br /&gt;&lt;br /&gt;..&lt;br /&gt;I'm waiting for a lot of comments!&lt;br /&gt;&lt;br /&gt;EDIT:&lt;br /&gt;as Alessandro Fulciniti told me the original idea of Krazy Corners is of Stu Nicholls.(&lt;a href="http://www.cssplay.co.uk/boxes/krazy.html"&gt;http://www.cssplay.co.uk/boxes/krazy.html&lt;/a&gt;)&lt;br /&gt;as soon as possible i release a live-test page&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-114406094409648090?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/114406094409648090/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=114406094409648090' title='3 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/114406094409648090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/114406094409648090'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2006/04/kentaromiura-crazycorner-01-alphagatsu.html' title='Kentaromiura CrazyCorner 0.1 alpha(Gatsu)'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-113352298604026341</id><published>2005-12-02T12:23:00.000+01:00</published><updated>2006-11-15T15:58:28.031+01:00</updated><title type='text'>10 funzioni base Javascript ^_^;;</title><content type='html'>sono rimasto attratto da &lt;a href="http://www.dustindiaz.com/top-ten-javascript/"&gt;Questo post&lt;/a&gt; a tal punto che ho deciso di segnalarlo,&lt;br /&gt;ma non ero pienamente soddisfatto del codice segnalato, cosi' ho deciso di ottimizzarlo un attimino ;)&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px solid silver; color: steelblue; background-color: rgb(236, 236, 236);"&gt;/* Reference Article:&lt;br /&gt;Dustin Diaz:&lt;br /&gt;http://www.dustindiaz.com/top-ten-javascript/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Optimizations made by kentaromiura, you could implement duff faster device for more optimization if you would.&lt;br /&gt;http://mykenta.blogspot.com&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/* addEvent: simplified event attachment */&lt;br /&gt;function addEvent( obj, type, fn ) {&lt;br /&gt;if (obj.addEventListener) {&lt;br /&gt;obj.addEventListener( type, fn, false );&lt;br /&gt;EventCache.add(obj, type, fn);&lt;br /&gt;}&lt;br /&gt;else if (obj.attachEvent) {&lt;br /&gt;obj["e"+type+fn] = fn;&lt;br /&gt;obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }&lt;br /&gt;obj.attachEvent( "on"+type, obj[type+fn] );&lt;br /&gt;EventCache.add(obj, type, fn);&lt;br /&gt;}&lt;br /&gt;else {&lt;br /&gt;obj["on"+type] = obj["e"+type+fn];&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;var EventCache = function(){&lt;br /&gt;var listEvents = [];&lt;br /&gt;return {&lt;br /&gt;listEvents : listEvents,&lt;br /&gt;add : function(node, sEventName, fHandler){&lt;br /&gt;listEvents.push(arguments);&lt;br /&gt;},&lt;br /&gt;flush : function(){&lt;br /&gt;var item;&lt;br /&gt;var i= listEvents.length - 1;&lt;br /&gt;//for(i = listEvents.length - 1; i &gt;= 0; i = i - 1)&lt;br /&gt;if(i!=-1)&lt;br /&gt;do{&lt;br /&gt;item = listEvents[i];&lt;br /&gt;if(item[0].removeEventListener){&lt;br /&gt;item[0].removeEventListener(item[1], item[2], item[3]);&lt;br /&gt;};&lt;br /&gt;if(item[1].substring(0, 2) != "on"){&lt;br /&gt;item[1] = "on" + item[1];&lt;br /&gt;};&lt;br /&gt;if(item[0].detachEvent){&lt;br /&gt;item[0].detachEvent(item[1], item[2]);&lt;br /&gt;};&lt;br /&gt;item[0][item[1]] = null;&lt;br /&gt;}while(--i&gt;-1);&lt;br /&gt;}&lt;br /&gt;};&lt;br /&gt;}();&lt;br /&gt;addEvent(window,'unload',EventCache.flush);&lt;br /&gt;&lt;br /&gt;////////////// window 'load' attachment&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;function addLoadEvent(func) {&lt;br /&gt;var oldonload = window.onload;&lt;br /&gt;&lt;br /&gt;if (typeof window.onload != 'function') {&lt;br /&gt;window.onload = func;&lt;br /&gt;}&lt;br /&gt;else {&lt;br /&gt;window.onload = function() {&lt;br /&gt;oldonload();&lt;br /&gt;func();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;*/&lt;br /&gt;function addLoadEvent(func) {&lt;br /&gt;var oldonload = window.onload;&lt;br /&gt;if (typeof oldonload != 'function') {&lt;br /&gt;window.onload = func;&lt;br /&gt;}&lt;br /&gt;else {&lt;br /&gt;window.onload = function() {&lt;br /&gt;oldonload();&lt;br /&gt;func();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* grab Elements from the DOM by className */&lt;br /&gt;function getElementsByClass(searchClass,node,tag) {&lt;br /&gt;var classElements = new Array();&lt;br /&gt;if ( node == null )&lt;br /&gt;node = document;&lt;br /&gt;if ( tag == null )&lt;br /&gt;tag = '*';&lt;br /&gt;var els = node.getElementsByTagName(tag);&lt;br /&gt;var elsLen = els.length;&lt;br /&gt;var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");&lt;br /&gt;&lt;br /&gt;//AAARGH ORROR i &amp;&amp;amp; j are defined global!!&lt;br /&gt;//THIS SLOW DOWN the code and would cause weird behaviour !!(think in a Multithreading program!!)&lt;br /&gt;&lt;br /&gt;/*for (i = 0, j = 0; i &lt; i =" 0;" j =" 0;" return="" classelements="" toggle="" an="" element="" s="" display="" function="" obj="" var="" el="" would="" use="" switch="" for="" more="" optimization="" but="" i="" think="" is="" ininfluent="" due="" to="" the="" shorten="" dom="" trick="" already="" used=""&gt;&lt;kenta&gt;&lt;br /&gt;if ( el.display != 'none' ) {&lt;br /&gt;//alert('ok');&lt;br /&gt;el.display = 'none';&lt;br /&gt;}&lt;br /&gt;else {&lt;br /&gt;el.display = '';&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* insert an element after a particular node */&lt;br /&gt;/*function insertAfter(parent, node, referenceNode) {&lt;br /&gt;parent.insertBefore(node, referenceNode.nextSibling);&lt;br /&gt;}*/&lt;br /&gt;function insertAfter(parent, node, referenceNode){&lt;br /&gt;&lt;br /&gt;if(referenceNode.nextSibling)&lt;br /&gt;{&lt;br /&gt;parent.insertBefore(node, referenceNode.nextSibling);&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;parent.appendChild(node);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;/*&lt;br /&gt;I prefer the following form ;) however this function throw an error when node.parentNode don't exist (eg.when you don't pass a DOM-Node ;)&lt;br /&gt;&lt;br /&gt;function insertAfter2(node, referenceNode){&lt;br /&gt;&lt;br /&gt;if(referenceNode.nextSibling)&lt;br /&gt;{&lt;br /&gt;referenceNode.parentNode.insertBefore(node, referenceNode.nextSibling);&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;referenceNode.parentNode.appendChild(node);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;*/&lt;br /&gt;/* Array prototype, matches value in array: returns bool */&lt;br /&gt;Array.prototype.inArray = function (value) {&lt;br /&gt;&lt;br /&gt;var i=this.length-1;&lt;br /&gt;if(i&gt;-1)&lt;br /&gt;do&lt;br /&gt;{&lt;br /&gt;//alert('i'+i+')'+this[i])&lt;br /&gt;if (this[i] === value) {&lt;br /&gt;return true;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;while(--i&gt;-1);&lt;br /&gt;&lt;br /&gt;return false;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;/* get, set, and delete cookies */&lt;br /&gt;function getCookie( name ) {&lt;br /&gt;var cook=document.cookie&lt;br /&gt;var start = cook.indexOf( name + "=" );&lt;br /&gt;var len = start + name.length + 1;&lt;br /&gt;if ( ( !start ) &amp;&amp;amp; ( name != cook.substring( 0, name.length ) ) ) {&lt;br /&gt;return null;&lt;br /&gt;}&lt;br /&gt;if ( start == -1 ) return null;&lt;br /&gt;var end = cook.indexOf( ";", len );&lt;br /&gt;if ( end == -1 ) end = cook.length;&lt;br /&gt;return unescape( cook.substring( len, end ) );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function setCookie( name, value, expires, path, domain, secure ) {&lt;br /&gt;var today = new Date();&lt;br /&gt;today.setTime( today.getTime() );&lt;br /&gt;if ( expires ) {&lt;br /&gt;//expires = expires * 1000 * 60 * 60 * 24;&lt;br /&gt;expires*=86400000;&lt;br /&gt;}&lt;br /&gt;var expires_date = new Date( today.getTime() + (expires) );&lt;br /&gt;document.cookie = name+"="+escape( value ) +&lt;br /&gt;( ( expires ) ? ";expires="+expires_date.toGMTString() : "" ) + //expires.toGMTString()&lt;br /&gt;( ( path ) ? ";path=" + path : "" ) +&lt;br /&gt;( ( domain ) ? ";domain=" + domain : "" ) +&lt;br /&gt;( ( secure ) ? ";secure" : "" );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function deleteCookie( name, path, domain ) {&lt;br /&gt;if ( getCookie( name ) ) document.cookie = name + "=" +&lt;br /&gt;( ( path ) ? ";path=" + path : "") +&lt;br /&gt;( ( domain ) ? ";domain=" + domain : "" ) +&lt;br /&gt;";expires=Thu, 01-Jan-1970 00:00:01 GMT";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* quick getElement reference&lt;br /&gt;look for the comment for the code ^_^; */&lt;endloop) if="" typeof="" string="" element="arguments[i];" i="" break="" return="" elements=""&gt;&lt;kenta&gt;&lt;endloop) if="" typeof="" string="" element="arguments[i];" i="" break="" return="" elements=""&gt;&lt;kenta&gt;&lt;endloop) if="" typeof="" string="" element="arguments[i];" i="" break="" return="" elements=""&gt;&lt;kenta&gt;&lt;endloop) if="" typeof="" string="" element="arguments[i];" i="" break="" return="" elements=""&gt;&lt;/endloop)&gt;&lt;/kenta&gt;&lt;/endloop)&gt;&lt;/kenta&gt;&lt;/endloop)&gt;&lt;/kenta&gt;&lt;/endloop)&gt;&lt;/kenta&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-113352298604026341?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/113352298604026341/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=113352298604026341' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/113352298604026341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/113352298604026341'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2005/12/10-funzioni-base-javascript.html' title='10 funzioni base Javascript ^_^;;'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-113335171420811233</id><published>2005-11-30T12:49:00.000+01:00</published><updated>2006-11-15T15:58:27.949+01:00</updated><title type='text'>modifiche alla classe che gestisce la trasformazione XSL</title><content type='html'>mi sono accorto della possibilita di effettuare delle modifiche&lt;br /&gt;alla classe che avevo proposto &lt;a href="http://mykenta.blogspot.com/2005/07/cclasse-per-trasformazioni-xmlxsl.html"&gt;QUI&lt;/a&gt;&lt;br /&gt;cambiando un paio di funzioni:&lt;br /&gt;&lt;br /&gt;:&lt;br /&gt;&lt;blockquote style="border: 1px solid grey; font-size: 10px;"&gt;public string newFromXslUri(string xml,string xsluri)&lt;br /&gt;      {&lt;br /&gt;          System.Xml.Xsl.XslTransform xt = new XslTransform();&lt;br /&gt;          xt.Load(xsluri);     &lt;br /&gt;          XPathDocument xd = new XPathDocument(new System.IO.StringReader(xml));&lt;br /&gt;          System.Text.StringBuilder sb = new System.Text.StringBuilder();         &lt;br /&gt;          xt.Transform(xd.CreateNavigator(),new System.Xml.Xsl.XsltArgumentList(),new System.IO.StringWriter(sb));&lt;br /&gt;          return sb.ToString();&lt;br /&gt;      }&lt;br /&gt;   &lt;br /&gt;      public string newFromstr(string xml,string xsl)&lt;br /&gt;      {&lt;br /&gt;          System.Xml.Xsl.XslTransform xt = new XslTransform();&lt;br /&gt;          XPathDocument xs = new XPathDocument(new System.IO.StringReader(xsl));&lt;br /&gt;          xt.Load(xs.CreateNavigator());         &lt;br /&gt;          XPathDocument xd = new XPathDocument(new System.IO.StringReader(xml));&lt;br /&gt;          System.Text.StringBuilder sb = new System.Text.StringBuilder();         &lt;br /&gt;          xt.Transform(xd.CreateNavigator(),new System.Xml.Xsl.XsltArgumentList(),new System.IO.StringWriter(sb));&lt;br /&gt;          return sb.ToString();&lt;br /&gt;      }&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-113335171420811233?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/113335171420811233/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=113335171420811233' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/113335171420811233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/113335171420811233'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2005/11/modifiche-alla-classe-che-gestisce-la.html' title='modifiche alla classe che gestisce la trasformazione XSL'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-113076183708036232</id><published>2005-10-31T13:24:00.000+01:00</published><updated>2006-11-15T15:58:27.795+01:00</updated><title type='text'>SteamBoy di Otomo</title><content type='html'>ieri sera ho visto SteamBoy, e devo dire che sono rimasto&lt;br /&gt;molto deluso, il prodotto non e' male di per se&lt;br /&gt;ma secondo il mio modestissimo parere e' stato sopravvalutato.&lt;br /&gt;la storia non sviluppa necessariamente le sottotrame&lt;br /&gt;e a volte risulta confusionaria, senza parlare di alcuni spunti&lt;br /&gt;(come la scena degli specchi) che poi non sono piu' stati ripresi&lt;br /&gt;sucessivamente, &lt;br /&gt;il montaggio poi sembra un opera di un chirurgo pazzo, &lt;br /&gt;si perde il senso globale dell' opera e si rimane piu' &lt;br /&gt;che spiazzati,&lt;br /&gt;nulla da dire sui disegni che risultano molto curati&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;in finale sento di dare solamente un 6 a questo film poiche' &lt;br /&gt;per come ne parlava la critica doveva essere qualcosa di eccezionale.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-113076183708036232?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/113076183708036232/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=113076183708036232' title='3 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/113076183708036232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/113076183708036232'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2005/10/steamboy-di-otomo.html' title='SteamBoy di Otomo'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-112963453949512872</id><published>2005-10-18T13:09:00.000+02:00</published><updated>2006-11-15T15:58:27.703+01:00</updated><title type='text'>Playstation 3, XBox 360, Revolution Prospettive per il futuro</title><content type='html'>Dopo aver provato la Psp posso ipotizzare cosa succederà&lt;br /&gt;in questi anni a venire;&lt;br /&gt;fino ad adesso infatti Nintendo ha stradominato il mercato &lt;br /&gt;delle console Portatili con il suo Game Boy, &lt;br /&gt;mentre Sony con la sua PlayStation domina incontrastata nel settore&lt;br /&gt;Home. dopo aver letto &lt;a href="http://punto-informatico.it/p.asp?i=55639"&gt;questo articolo su PI&lt;/a&gt;&lt;br /&gt;mi sono fermato un momento a pensare..&lt;br /&gt;&lt;br /&gt;il fatto che la Psp &lt;a href="http://punto-informatico.it/p.asp?i=55236"&gt;sia stata craccata&lt;/a&gt; &lt;br /&gt;rende questa console aperta (un po come il Gp32 ^_^;;) basta guardare &lt;a href="http://psp-news.dcemu.co.uk/"&gt;in questo menu sulla sinistra&lt;/a&gt;&lt;br /&gt;per rendersi conto di quante applicazioni siano già state sviluppate&lt;br /&gt;(e sono attualmente in fase di sviluppo)&lt;br /&gt;cio', secondo me, porterà la Psp ad essere la console piu' venduta &lt;br /&gt;e porterà Sony al dominio del settore Portatile..&lt;br /&gt;&lt;br /&gt;girando la medaglia Sony potrebbe perdere moltissimo campo nel settore Home,&lt;br /&gt;perdendo punti sul rivale Xbox 360 ..&lt;br /&gt;..&lt;br /&gt;..&lt;br /&gt;&lt;br /&gt;aspettando &lt;a href="http://en.wikipedia.org/wiki/Nintendo_Revolution"&gt;Revolution&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;infatti la grande N potrebbe(ed ha tutte le carte in regola,soprattutto l'esperienza) per diventare il colosso in questo campo, voci infatti sostengono che N5 sarà una "piattaforma libera" .. staremo a vedere&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-112963453949512872?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/112963453949512872/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=112963453949512872' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/112963453949512872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/112963453949512872'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2005/10/playstation-3-xbox-360-revolution.html' title='Playstation 3, XBox 360, Revolution Prospettive per il futuro'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-112903044085953263</id><published>2005-10-11T13:23:00.000+02:00</published><updated>2006-11-15T15:58:27.600+01:00</updated><title type='text'>PSP L' inizio della mia fine!</title><content type='html'>Ho comperato ieri la PSP&lt;br /&gt;ho speso 249 euro con il film in UMD Van Helsing incluso,&lt;br /&gt;ho avuto modo di provarla per un po e ho potuto stilare un po di punti&lt;br /&gt;PRO / CONTRO quest'aggeggino infernale.&lt;br /&gt;&lt;br /&gt;&gt;PROs&lt;br /&gt;&lt;br /&gt;ha una definizione splendida, si rimane stupiti veramente dalle immagini&lt;br /&gt;ha un bel OS&lt;br /&gt;supporta Mp3 e Mp4&lt;br /&gt;&lt;br /&gt;il video dei kasabian dei topi&lt;br /&gt;la versione 2.0 del firmware ha un browser&lt;br /&gt;CONTRO:&lt;br /&gt;prezzo troppo alto&lt;br /&gt;nessun gioco allegato(nemmeno demo)&lt;br /&gt;non c'e' una funzione ScreenShot per salvare foto dello schermo&lt;br /&gt;i video debbono essere importati tramite un programmino che li rinomina..&lt;br /&gt;&lt;br /&gt;..i 3 dead pixel :sob:&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-112903044085953263?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/112903044085953263/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=112903044085953263' title='3 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/112903044085953263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/112903044085953263'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2005/10/psp-l-inizio-della-mia-fine.html' title='PSP L&apos; inizio della mia fine!'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-112721572571833651</id><published>2005-09-20T13:24:00.000+02:00</published><updated>2006-11-15T15:58:27.407+01:00</updated><title type='text'>nuovo AJAX Sgrassa Suocero</title><content type='html'>grazie alla libreria di Antr3a &lt;a href="http://www.devpro.it/javascript_id_92.html"&gt;LoadVars&lt;/a&gt;&lt;br /&gt;ho implementato una piccola pagina in AJAX:&lt;br /&gt;ecco la pagina 1.aspx(o la parte essenziale da mettere nell'head dopo aver incluso il LoadVars)&lt;br /&gt;&lt;div style="color:#5f9ea0"&gt;&lt;br /&gt;  &amp;lt;script type="text/javascript"&gt;&lt;br /&gt;            // istanzio l' oggetto javascript&lt;br /&gt;            var mioLV = new LoadVars();&lt;br /&gt;   &lt;br /&gt;            // dichiaro cosa fare a caricamento avvenuto&lt;br /&gt;            // tramite la funzione onLoad&lt;br /&gt;           mioLV.onLoad = function(s) // s e' una booleana di conferma caricamento dati&lt;br /&gt;            {&lt;br /&gt;                if(s) // se il caricamento e' avvenuto con successo&lt;br /&gt;                {&lt;br /&gt;                    document.getElementById("div1").innerHTML=this.res;&lt;br /&gt;                    delete this.res;&lt;br /&gt;                    &lt;br /&gt;                }&lt;br /&gt;                else // problemi durante il caricamento dati&lt;br /&gt;                {&lt;br /&gt;                    alert('Problemi durante il caricamento dati');&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            &lt;br /&gt;            // funzione da richiamare a pagina caricata&lt;br /&gt;            function startExample() {&lt;br /&gt;                // carico il file di testo&lt;br /&gt;               &lt;br /&gt;                mioLV.base=2;&lt;br /&gt;                &lt;br /&gt;                mioLV.sendAndLoad('page.aspx',mioLV,"GET");&lt;br /&gt;                &lt;br /&gt;            }&lt;br /&gt;             function doajax(){&lt;br /&gt;             mioLV.base=document.getElementById("valueZ").value;&lt;br /&gt;             alert(mioLV.base);&lt;br /&gt;             mioLV.sendAndLoad('webform3.aspx',mioLV,"GET");&lt;br /&gt;             }&lt;br /&gt;             &lt;br /&gt;  &amp;lt;/script&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;e bisogna aggiungere nella pagina le seguenti input :&lt;br /&gt;&lt;div style="color:red;"&gt;&lt;br /&gt;&amp;lt;INPUT id="valueZ" type="text"&gt;&amp;lt;INPUT  type="button" value="Button" &lt;br /&gt;onclick="javascript:doajax();"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;la page.aspx sarà una pagina completamente vuota, nel suo codeBehind scriviamo:&lt;br /&gt;&lt;div style="color:blue;"&gt;&lt;br /&gt; private void Page_Load(object sender, System.EventArgs e)&lt;br /&gt;  { string tc="";&lt;br /&gt;   &lt;br /&gt;   if(Request.Params["base"]!=null)&lt;br /&gt;   tc= Request.Params["base"].ToString();&lt;br /&gt;   &lt;br /&gt;   Response.Clear();&lt;br /&gt;   Response.ContentType="text";&lt;br /&gt;   &lt;br /&gt;   //Response.Write("res="+tc+" HEHEHEHE");&lt;br /&gt;   string op="&amp;lt;div style=\"border:1px solid silver\"&gt;paramentro passato= "+tc+" &amp;lt;/div&gt;";&lt;br /&gt;   Response.Write("res="+Server.UrlEncode(op)+"QS="+Request.QueryString.ToString());&lt;br /&gt;   &lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-112721572571833651?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/112721572571833651/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=112721572571833651' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/112721572571833651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/112721572571833651'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2005/09/nuovo-ajax-sgrassa-suocero.html' title='nuovo AJAX Sgrassa Suocero'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-112021639324408622</id><published>2005-07-01T13:07:00.000+02:00</published><updated>2006-11-15T15:58:27.317+01:00</updated><title type='text'>[c#]classe per trasformazioni xml/xsl</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/1487/1243/1600/21.gif"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/1487/1243/320/21.gif" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;ecco una classe che restituisce un documento xml formattato secondo un foglio di stile XML&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt; /// &amp;lt;summary&amp;gt;&lt;br /&gt; /// La classe TrasformXML fornisce 4 metodi che permettono di effettuare una trasformazione XSLT &lt;br /&gt; /// i metodi ritornano una stringa XML valida oppure una stringa di errore&lt;br /&gt; /// i 4 metodi servono per effettuare trasformazioni da stringhe xml oppure da file&lt;br /&gt; /// ritorna molto utile nel caso l'XML venga generato runtime (per esempio pescando i dati da un DB)&lt;br /&gt; /// oppure quando si hanno i fogli di stile salvati in un DB , cosi' non occorre salvare un file temporaneo&lt;br /&gt; /// &amp;lt;/summary&amp;gt;&lt;br /&gt; sealed public class TrasformXML&lt;br /&gt; {&lt;br /&gt;  //La classe non ha costruttore poiche' non serve Istanziarla per usarla&lt;br /&gt;  //in maniera simile ai metodi della classe Math&lt;br /&gt;  public string fromXmlUri(string xmluri,string xsl)&lt;br /&gt;  {&lt;br /&gt;   &lt;br /&gt;   try&lt;br /&gt;   {&lt;br /&gt;    &lt;br /&gt;    XslTransform xt = new XslTransform();&lt;br /&gt;&lt;br /&gt;    System.Xml.XmlDocument doc = new System.Xml.XmlDocument();&lt;br /&gt;    doc.LoadXml(xsl);&lt;br /&gt;&lt;br /&gt;    xt.Load(doc.CreateNavigator());&lt;br /&gt;    &lt;br /&gt;    XPathDocument xp = new XPathDocument(xmluri);&lt;br /&gt;    &lt;br /&gt;    StringBuilder message =new StringBuilder();&lt;br /&gt;    xt.Transform(xp,null,new StringWriter(message),null);&lt;br /&gt;    &lt;br /&gt;    return message.ToString();&lt;br /&gt;   }&lt;br /&gt;   catch(Exception er)&lt;br /&gt;   {&lt;br /&gt;    return er.ToString();&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  public string fromXslUri(string xml,string xsluri)&lt;br /&gt;  {&lt;br /&gt;   System.Xml.Xsl.XslTransform xt = new XslTransform();&lt;br /&gt;   &lt;br /&gt;   ASCIIEncoding asc = new ASCIIEncoding();&lt;br /&gt;   byte[] firstString = asc.GetBytes(xml);&lt;br /&gt;&lt;br /&gt;   MemoryStream st = new MemoryStream(firstString.Length);&lt;br /&gt;   st.Write(firstString,0,firstString.Length);&lt;br /&gt;   st.Seek(0, SeekOrigin.Begin);&lt;br /&gt;   &lt;br /&gt;   System.Xml.XPath.XPathDocument xp = new XPathDocument(st);&lt;br /&gt;   try&lt;br /&gt;   {&lt;br /&gt;&lt;br /&gt;    xt.Load(xsluri);&lt;br /&gt;    StringBuilder message =new StringBuilder();&lt;br /&gt;    xt.Transform(xp,null,new StringWriter(message),null);&lt;br /&gt;    &lt;br /&gt;    return message.ToString();&lt;br /&gt;&lt;br /&gt;   }&lt;br /&gt;   catch(Exception er)&lt;br /&gt;   {&lt;br /&gt;    return er.ToString();&lt;br /&gt;   &lt;br /&gt;   }&lt;br /&gt;   finally&lt;br /&gt;   {&lt;br /&gt;    //Libero le risorse &lt;br /&gt;    xp=null;&lt;br /&gt;    st=null;&lt;br /&gt;    firstString=null;&lt;br /&gt;    asc=null;&lt;br /&gt;    xt=null;&lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt;  &lt;br /&gt;  }&lt;br /&gt;  public string fromUrl(string xmluri,string xsluri)&lt;br /&gt;  {&lt;br /&gt;   try&lt;br /&gt;   {&lt;br /&gt;    XslTransform xt = new XslTransform();&lt;br /&gt;    xt.Load(xsluri);&lt;br /&gt;    XPathDocument xp = new XPathDocument(xmluri);&lt;br /&gt;    StringBuilder message =new StringBuilder();&lt;br /&gt;    xt.Transform(xp,null,new StringWriter(message),null);&lt;br /&gt;    return message.ToString();&lt;br /&gt;   }&lt;br /&gt;   catch(Exception er)&lt;br /&gt;   {&lt;br /&gt;    return er.ToString();&lt;br /&gt;   &lt;br /&gt;   }&lt;br /&gt;  &lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  public string fromStr(string xml, string xsl)&lt;br /&gt;  {&lt;br /&gt;&lt;br /&gt;   System.Xml.Xsl.XslTransform xt = new XslTransform();&lt;br /&gt;   ASCIIEncoding asc = new ASCIIEncoding();&lt;br /&gt;   byte[] firstString = asc.GetBytes(xml);&lt;br /&gt;   MemoryStream st = new MemoryStream(firstString.Length);&lt;br /&gt;   st.Write(firstString,0,firstString.Length);&lt;br /&gt;   st.Seek(0, SeekOrigin.Begin);&lt;br /&gt;   System.Xml.XPath.XPathDocument xp = new XPathDocument(st);&lt;br /&gt;&lt;br /&gt;   try&lt;br /&gt;   {&lt;br /&gt;    System.Xml.XmlDocument doc = new System.Xml.XmlDocument();&lt;br /&gt;    &lt;br /&gt;    doc.LoadXml(xsl);&lt;br /&gt;    xt.Load(doc.CreateNavigator());&lt;br /&gt;    StringBuilder message =new StringBuilder();&lt;br /&gt;    xt.Transform(xp,null,new StringWriter(message),null);&lt;br /&gt;    return message.ToString();&lt;br /&gt;   }&lt;br /&gt;   catch(Exception er)&lt;br /&gt;   {&lt;br /&gt;    return er.ToString();&lt;br /&gt;   &lt;br /&gt;   }&lt;br /&gt;   finally&lt;br /&gt;   {&lt;br /&gt;    //Libero le risorse &lt;br /&gt;    st=null;&lt;br /&gt;    xp=null;&lt;br /&gt;    firstString=null;&lt;br /&gt;    asc=null;&lt;br /&gt;    xt=null;&lt;br /&gt;    &lt;br /&gt;   }&lt;br /&gt;  &lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-112021639324408622?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/112021639324408622/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=112021639324408622' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/112021639324408622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/112021639324408622'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2005/07/cclasse-per-trasformazioni-xmlxsl.html' title='[c#]classe per trasformazioni xml/xsl'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-111993987875504275</id><published>2005-06-28T08:15:00.000+02:00</published><updated>2006-11-15T15:58:27.215+01:00</updated><title type='text'>[.Net]Finestre a Scomparsa</title><content type='html'>Ispirato da una giuovine fanziulla ho provato a scrivere una splash-screen&lt;br /&gt;con VS2005b2 , ho visto che non c'era differenza con la versione 1.1 e che&lt;br /&gt;funziona senza problemi.&lt;br /&gt;&lt;br /&gt;Bisogna utilizzare la proprietà Opacity del Form una proprietà che va da 0.0(trasparente)a 1.0 (visibile)&lt;br /&gt;&lt;br /&gt;settiamo a 0% la proprietà nel form &lt;br /&gt;&lt;br /&gt;mettiamo 2 timer ,attivando il primo,e in quest' ultimo scriviamo:&lt;br /&gt;&lt;br /&gt;[c#]&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;if(this.Opacity&lt;1.0)&lt;br /&gt;   this.Opacity+=0.1;&lt;br /&gt;else{&lt;br /&gt;   timer1.Enable=false;&lt;br /&gt;   timer2.Enable=true;&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;[vb]&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;if Me.Opacity&lt;1 &lt;br /&gt;then&lt;br /&gt;   Me.Opacity+=0,1&lt;br /&gt;else&lt;br /&gt;   timer1.Enable=false&lt;br /&gt;   timer2.Enable=true&lt;br /&gt;end if &lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;nel secondo scriviamo&lt;br /&gt;[c#]&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;if(this.Opacity&gt;0.0)&lt;br /&gt;   this.Opacity-=0.1;&lt;br /&gt;else{&lt;br /&gt;  this.Close();&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;[vb]&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;if Me.Opacity&gt;0,0&lt;br /&gt;then&lt;br /&gt;   Me.Opacity-=0,1&lt;br /&gt;else&lt;br /&gt;  Me.Close()&lt;br /&gt;end if&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;avviamo e vedremo il nostro Form apparire Magicamente e sparire nella stessa Maniera&lt;br /&gt;:ciauz:&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-111993987875504275?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/111993987875504275/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=111993987875504275' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/111993987875504275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/111993987875504275'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2005/06/netfinestre-scomparsa.html' title='[.Net]Finestre a Scomparsa'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-111987150688991556</id><published>2005-06-27T13:20:00.000+02:00</published><updated>2006-11-15T15:58:27.137+01:00</updated><title type='text'>26 giugno 2005 concerto dei Gem Boy</title><content type='html'>il  mio primo loro concerto dal Vivo!!&lt;br /&gt;era da quando avevo 16 anni che ne volevo vedere uno e non ho mai potuto per&lt;br /&gt;vari motivi!!&lt;br /&gt;sono eccezionali, sia dal punto di vista tecnico, sia&lt;br /&gt;dal punto di vista artistico/intrattenitoriale [la crusca attinge da me per i nuovi lemmi]&lt;br /&gt;&lt;br /&gt;da attore quale sono posso solamente che apprezzare la semplicità&lt;br /&gt;con cui si esibiscono sul palco, e &lt;br /&gt;a come riescono a dirigere uno spettacolo nonostante&lt;br /&gt;interventi puramente aleatori che accadono durante lo spettacolo,&lt;br /&gt;un orgia di divertimento allo stato puro,&lt;br /&gt;mi sono divertito come non mai e consiglio a chiunque la visione&lt;br /&gt;immediata di un loro Live (io ero sotto le transenne e li ho visti da vicinissimo)&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;MITICI!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-111987150688991556?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/111987150688991556/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=111987150688991556' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/111987150688991556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/111987150688991556'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2005/06/26-giugno-2005-concerto-dei-gem-boy.html' title='26 giugno 2005 concerto dei Gem Boy'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-111961328000926335</id><published>2005-06-24T13:38:00.000+02:00</published><updated>2006-11-15T15:58:27.044+01:00</updated><title type='text'></title><content type='html'>&lt;span style="font-weight:bold;"&gt;CREARE UN DATASET CON INDICE AUTOINCREMENTANTE in C#&lt;/span&gt;&lt;br /&gt;ed ecco il primo post Tecnico!!&lt;br /&gt;una semplice funzione che aggiunge una colonna con un indice ad un dataset che ne e' privo ^_^;;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;br /&gt;//Devo Passare un Dataset dove aggiungero' la colonna e il nome della Tabella del ds&lt;br /&gt;//dove aggiungere la riga&lt;br /&gt;&lt;br /&gt;private DataSet returnIndexDS(DataSet ds1,string nomeTabella){&lt;br /&gt;&lt;br /&gt;// creo il dataset&lt;br /&gt;DataSet ds = new DataSet();&lt;br /&gt;&lt;br /&gt;// aggiungo la colonna&lt;br /&gt;DataColumn countColumn = new DataColumn("N.",System.Type.GetType("System.Int32"));&lt;br /&gt;&lt;br /&gt;//Creo la colonna Indice Autoincrementante&lt;br /&gt;countColumn.AutoIncrement = true;&lt;br /&gt;countColumn.AutoIncrementSeed = 1;&lt;br /&gt;countColumn.AutoIncrementStep = 1;&lt;br /&gt;countColumn.ReadOnly = true;&lt;br /&gt;&lt;br /&gt;//aggiungo tabella e riga&lt;br /&gt;ds.Tables.Add(nomeTabella);&lt;br /&gt;ds.Tables[nomeTabella].Columns.Add(countColumn);&lt;br /&gt;&lt;br /&gt;//faccio il merge con i dati originali&lt;br /&gt;ds.Merge(ds1,false,MissingSchemaAction.Add);&lt;br /&gt;&lt;br /&gt;//ritorno il nuovo dataset&lt;br /&gt;return ds;&lt;br /&gt;&lt;br /&gt;} &lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-111961328000926335?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/111961328000926335/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=111961328000926335' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/111961328000926335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/111961328000926335'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2005/06/creare-un-dataset-con-indice.html' title=''/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-111961133407470271</id><published>2005-06-24T13:04:00.000+02:00</published><updated>2006-11-15T15:58:26.877+01:00</updated><title type='text'></title><content type='html'>&lt;span style="font-weight:bold;"&gt;Kentaromiura e' arrivato!!&lt;/span&gt;&lt;br /&gt;il primo Blog Ufficiale di Kentaromiura e' quiiii..&lt;br /&gt;&lt;br /&gt;no, non e' un blog che parla del famoso Mangaka ma di un pseudoProgrammatore Italiano&lt;br /&gt;che ha l'abitudine di postare in siti come html.it ^_^;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;e questa e' solo l'introduzione a questo contenitore di pensieri analogici/digitali&lt;br /&gt;magari posterò roba tecnica, altre volte puttanate, altre volte parlero del teatro &lt;br /&gt;o magari non parlero' proprio..[ho sentito gente fare un aola a codeste mie parole]&lt;br /&gt;&lt;br /&gt;a prossimamente..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-111961133407470271?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/111961133407470271/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=111961133407470271' title='3 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/111961133407470271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/111961133407470271'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2005/06/kentaromiura-e-arrivato-il-primo-blog.html' title=''/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13917564.post-111959509576854462</id><published>2005-06-24T08:30:00.000+02:00</published><updated>2006-11-15T15:58:26.754+01:00</updated><title type='text'>go go blog!</title><content type='html'>Ecco alcune pillole che ho pubblicato in giro per il uèb ...&lt;br /&gt;[per ora sono solo su HTML.it]&lt;br /&gt;&lt;br /&gt;&lt;a href="http://forum.html.it/forum/showthread.php?s=&amp;threadid=456483" target="_blank"&gt;&lt;b&gt;Programmazione Multithreading - Concetto di semafori (flag)&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://forum.html.it/forum/showthread.php?s=&amp;amp;threadid=655927" target="_blank"&gt;&lt;b&gt;C/C++ - Formattazione del testo in ambienti UNIX&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://forum.html.it/forum/showthread.php?threadid=477366" target="_blank"&gt;&lt;b&gt;C/C++ - Lavorare con i file (I/O alto e basso livello)&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://forum.html.it/forum/showthread.php?s=&amp;threadid=753477"&gt;C - Header e funzioni della Libreria Standard ANSI&lt;/a&gt;&lt;br /&gt;&lt;a href="http://forum.html.it/forum/showthread.php?s=&amp;threadid=781899"&gt;D - Panoramica sul Linguaggio&lt;/a&gt;&lt;br /&gt;&lt;a href="http://forum.html.it/forum/showthread.php?s=&amp;threadid=536334"&gt;Template in PHP&lt;/a&gt;&lt;br /&gt;&lt;a href="http://forum.html.it/forum/showthread.php?s=&amp;threadid=832592"&gt;Prado ovvero Php.Net&lt;/a&gt;&lt;br /&gt;&lt;a href="http://forum.html.it/forum/showthread.php?s=&amp;threadid=884583"&gt;Worst Practices - Abitudini da Evitare&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13917564-111959509576854462?l=mykenta.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mykenta.blogspot.com/feeds/111959509576854462/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13917564&amp;postID=111959509576854462' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/111959509576854462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13917564/posts/default/111959509576854462'/><link rel='alternate' type='text/html' href='http://mykenta.blogspot.com/2005/06/go-go-blog.html' title='go go blog!'/><author><name>Cristian Carlesso</name><uri>https://profiles.google.com/106793366889837207162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-nAqQI-QI63E/AAAAAAAAAAI/AAAAAAAAAAA/3lXp4q0Q8wA/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
