<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>javascript &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://wordpress.com/tag/javascript/</link>
	<description>Feed of posts on WordPress.com tagged "javascript"</description>
	<pubDate>Mon, 07 Jul 2008 04:52:12 +0000</pubDate>

	<generator>http://wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Validar documento RUC]]></title>
<link>http://pcarrasco.wordpress.com/?p=18</link>
<pubDate>Mon, 07 Jul 2008 00:45:11 +0000</pubDate>
<dc:creator>Paolo Carrasco</dc:creator>
<guid>http://pcarrasco.wordpress.com/?p=18</guid>
<description><![CDATA[Para mi último proyecto se me solicitó una validación del documento de Registro Único del Contri]]></description>
<content:encoded><![CDATA[<p>Para mi último proyecto se me solicitó una validación del documento de Registro Único del Contribuyente (RUC), además que si se escribiera un RUC con el formato antiguo (8 dígitos) se transformara en el moderno (11 dígitos). Bueno, para todo esto, cree distintas funciones, las cuales ofrezco a continuación:</p>
<p><!--more--></p>
<p>Las funciones se pueden desmodularizar, por lo que si para el negocio no es necesario completar los dígitos a un RUC antiguo, se puede obviar esa función. Al final de esto muestro una pequeña muestra de su uso.</p>
<p>//Declaración de variables<br />
var patronNumerico = /^[0-9]{0,12}$/;</p>
<p>/**<br />
 * Devuelve el RUC de la persona (recibe un Ruc incompleto o completo)<br />
 * Autor: Paolo Carrasco Mori<br />
 * Versión: 1.0<br />
 * Fecha Creación: 25/06/2008 <br />
 */<br />
function devolverRuc(controlDigitosRuc, esPersonaJuridica){<br />
 var textoDigitosN=new String();<br />
 var textoRucCompleto = new String();<br />
 //Asignamos a la variable que almacena digitos lo recibido como parámetro<br />
 textoDigitosN = controlDigitosRuc.value;<br />
 //Si se han ingresado los dígitos correctos (8 u 11 numéricos)<br />
 if(validarDigitosIngresadosRuc(textoDigitosN)){<br />
  if (textoDigitosN.length == 8) { //Tenemos los ocho dígitos N a emplearse para obtener los demás dígitos<br />
   //Si la persona es jurídica, antemponemos el 20, sino el 10<br />
   textoRucCompleto = esPersonaJuridica? "20" : "10";<br />
   //Agregamos los dígitos del cuerpo<br />
   textoRucCompleto += textoDigitosN;<br />
   //Agregamos el dígito de control<br />
   textoRucCompleto += devolverDigitoControl(textoRucCompleto);<br />
   controlDigitosRuc.value = textoRucCompleto;<br />
  } else if(textoDigitosN.length == 11){ //Se digitó un RUC completo<br />
   if(!validarRUC(textoDigitosN)){<br />
    controlDigitosRuc.select();<br />
    controlDigitosRuc.focus;<br />
   }<br />
  }<br />
 }else{<br />
  //Ponemos el enfoque sobre el control que contiene los dígitos de control<br />
  controlDigitosRuc.select();<br />
  controlDigitosRuc.focus();<br />
 }<br />
}</p>
<p>/**<br />
 * Realiza la validación para un control que permite el ingreso de un RUC completo o por completar<br />
 * Autor: Paolo Carrasco<br />
 * Versión: 1.0<br />
 * Fecha Creación: 25/06/2008<br />
 */<br />
function validarDigitosIngresadosRuc(textoDigitos){<br />
 //TODO: falta usar trim<br />
 //Hacemos la validación de número<br />
 if (!patronNumerico.test(textoDigitos) ){<br />
  alert("No se ingresaron caracteres numericos. Revise este número: " + textoDigitos);  <br />
  return false; //terminamos la función<br />
 }<br />
 //Si hay texto, y no tiene la longitud adecuada retornamos falso<br />
 if (textoDigitos.length &#62; 0 &#38;&#38; textoDigitos.length != 8 &#38;&#38; textoDigitos.length != 11){ // Se digitaron dígitos de más o de menos<br />
  alert("Se ingresó un texto cuya cantidad de caracteres no coincide con un RUC\n o los dígitos necesarios para armar un RUC");<br />
  return false;<br />
 }<br />
 return true;<br />
}</p>
<p>/**<br />
 * Muestra el dígito de control si se envía<br />
 * un cuadro de texto que contenga los primeros 10 dígitos que componen el RUC.<br />
 * Autor: Paolo Carrasco<br />
 * Versión: 1.0<br />
 * Fecha Creación: 25/06/2008<br />
 */<br />
 function devolverDigitoControl(textoPrimerosDigitosRuc){<br />
 var textoTemporal = new String();<br />
 var digitoControl, pesoTotal, valorAsociado, valorControl, valorPivot;<br />
 textoTemporal = textoPrimerosDigitosRuc;<br />
 pesoTotal = textoTemporal.charAt(0)*5<br />
  + textoTemporal.charAt(1)*4<br />
  + textoTemporal.charAt(2)*3<br />
  + textoTemporal.charAt(3)*2<br />
  + textoTemporal.charAt(4)*7<br />
  + textoTemporal.charAt(5)*6<br />
  + textoTemporal.charAt(6)*5<br />
  + textoTemporal.charAt(7)*4<br />
  + textoTemporal.charAt(8)*3<br />
  + textoTemporal.charAt(9)*2;<br />
 //Obtenemos la parte entera de la división entre 11<br />
 valorAsociado = parseInt(pesoTotal/11);<br />
 valorControl = pesoTotal - (valorAsociado*11);<br />
 valorPivot = 11 - valorControl;<br />
 //Obtenemos el valor Pivor<br />
 if(valorPivot == 10)<br />
  digitoControl = 0;<br />
 else if(valorPivot == 11)<br />
  digitoControl = 1;<br />
 else<br />
  digitoControl = valorPivot;<br />
 //Retornamos el dígito de control<br />
 return digitoControl;<br />
}</p>
<p>/**<br />
 * Valida si los dígitos del tipo de persona y el dígito de control del RUC indicado son válidos.<br />
 * Autor: Paolo Carrasco<br />
 * Versión: 1.0<br />
 * Fecha Creación: 25/06/2008<br />
 */<br />
function validarRUC(ruc){<br />
 var tipoPersona, digitoControl;<br />
 tipoPersona = ruc.substr(0,2);<br />
 digitoControl = ruc.substr(10,1);<br />
 //Si el tipo de persona es jurídica o natural<br />
 if(tipoPersona == "10" &#124;&#124; tipoPersona == "20"){<br />
  //Validamos el dígito de control<br />
  if(digitoControl == devolverDigitoControl(ruc.substring(0,10))){<br />
   return true;<br />
  } else {<br />
   alert("El último caracter ingresado (dígito de control) no es coherente a los demás caracteres ingresados");<br />
  }<br />
 } else {<br />
  alert("Los dos primeros dígitos del RUC tienen que ser 10 o 20, según el tipo de persona");<br />
 }<br />
 return false;<br />
}</p>
<p>-----------------------------------------------------------------</p>
<div><span style="font-size:x-small;">&#60;html&#62;</span></div>
<div><span style="font-size:x-small;">&#60;head&#62;</span></div>
<div><span style="font-size:x-small;">&#60;!-- Este es el archivo que contiene el script anterior --&#62;</span></div>
<p><span style="font-size:x-small;">&#60;script type="text/javascript" src="js/validacionRuc.js"&#62;&#60;/script&#62;</p>
<p>&#60;/head&#62;</p>
<p>&#60;body&#62;</p>
<p>Ingrese aquí su RUC:</p>
<p>&#60;input type="text" onblur="devolverRuc(this, true)" maxlength="12"&#62;</p>
<p>&#60;/body&#62;</p>
<p>&#60;/html&#62;</p>
<p> </p>
<p> </p>
<p> </p>
<p></span></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Podcast Episode 10: Turtles, podcasting stats, and a Javascript keyword tag list delimiter tool]]></title>
<link>http://vanturtle.wordpress.com/?p=145</link>
<pubDate>Mon, 07 Jul 2008 00:28:30 +0000</pubDate>
<dc:creator>Van Turtle</dc:creator>
<guid>http://vanturtle.wordpress.com/?p=145</guid>
<description><![CDATA[Welcome to episode 10 of “Work That Web”. This is David Van Vickle. In the next ten minutes I]]></description>
<content:encoded><![CDATA[<p><strong>Welcome to episode 10 of “Work That Web”. </strong>This is David Van Vickle. In the next ten minutes I'm talking about  <strong>turtles, podcasting stats, and a Javascript tool</strong> I wrote for changing the delimiter on lists of keywords or tags.</p>
<p><strong>Listen now:</strong> <a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=278065971">iTunes</a> &#124; <a href="http://www.podturtle.com">PodTurtle.com</a> &#124; <a href="http://www.podcastalley.com/podcast_details.php?pod_id=56009">Podcast Alley</a> &#124; <a href="http://feeds.feedburner.com/vanturtlepodcast">RSS</a></p>
<p><a href="http://vanturtle.com/2008/07/03/top-podcast-categories-and-stats/">Top Podcast Categories and Stats</a> - Most common category is music.</p>
<p><a href="http://vanturtle.com/2008/07/05/javascript-keyword-or-tag-list-delimiter-changer/">Javascript Keyword or Tag List Delimiter Changer</a> - Ever have a long list of tags or keywords for your story, and each social bookmarking site you submit to needs different delimiters for your tags or keywords? <a href="http://vanturtle.com/2008/07/05/javascript-keyword-or-tag-list-delimiter-changer/">Here you go.</a></p>
<p>The music is by <a href="http://www.myspace.com/metalkpretty">Me Talk Pretty</a>.  They’re at <a href="http://www.myspace.com/metalkpretty">http://www.myspace.com/metalkpretty</a>.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Tragedy]]></title>
<link>http://tradingfish.wordpress.com/?p=30</link>
<pubDate>Sun, 06 Jul 2008 21:27:45 +0000</pubDate>
<dc:creator>Hector</dc:creator>
<guid>http://tradingfish.wordpress.com/?p=30</guid>
<description><![CDATA[About a month ago, I began putting together a new website for Forbes Office Furniture.  Their curre]]></description>
<content:encoded><![CDATA[<p>About a month ago, I began putting together a new website for <a title="Forbes Office Furniture (Devel)" href="http://devel.forbes.e-volare.net" target="_blank">Forbes Office Furniture</a>.  Their <a title="Forbes Office Furniture" href="http://www.forbesofficefurniture.com" target="_blank">current website</a>, while not absolutely hideous, is very clumsy and incomplete.  As I examined the client and server-side code, it became evident that someone with poor web development skills put the site together.  Examples?</p>
<ul>
<li>Absolute positioning everywhere.</li>
<li>Poor search engine optimization.</li>
<li>Dreamweaver JavaScript functions.</li>
<li>IFRAME tags.</li>
<li>Images with distorted aspect ratios.</li>
</ul>
<p>One of the main goals behind my Forbes website remake was search engine visibility.  In order to measure the impact of my search engine optimization strategy, I setup <a title="Google Analytics" href="http://www.google.com/analytics/" target="_blank">Google Analytics</a> on the current site.  One of today's referrers was <a title="Ken Bluttman" href="http://www.logicstory.com" target="_blank">logicstory.com</a>.  Out of curiosity, I visited the site, and found out it belonged to the current site's creator.  His website has some <a title="W3C Validation" href="http://validator.w3.org/check?verbose=1&#38;uri=http%3A%2F%2Flogicstory.com%2F" target="_blank">issues</a>.  Even more disturbing, he has a new <a title="Brilliant JavaScript" href="http://www.books-express.co.uk/book/9780273721536/Brilliant-Javascript.html" target="_blank">book</a> coming out in November... on JavaScript?  Have you no shame, sir?  Publishing a book on web development, while your very own site has no DOCTYPE, is equivalent to me publishing a book on heart surgery because I sliced the turkey at Thanksgiving dinner.</p>
<p>I'm no web development or JavaScript expert, but I am smart enough to know that a book like this is bad for web development.  Anyone who buys this book without significant web development experience will learn the wrong way.  It is said that cigarrettes shave years off of your life.  The publishing of this book will spawn serveral more years of bad web development.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[ما هو دور WebKit فى AIR ]]></title>
<link>http://keepondev.wordpress.com/?p=122</link>
<pubDate>Sun, 06 Jul 2008 20:11:03 +0000</pubDate>
<dc:creator>mostafa farghaly</dc:creator>
<guid>http://keepondev.wordpress.com/?p=122</guid>
<description><![CDATA[السلام عليكم و رحمه الله تعالى و بركاته
عند برمجتك ال AIR]]></description>
<content:encoded><![CDATA[<p>السلام عليكم و رحمه الله تعالى و بركاته</p>
<p>عند برمجتك ال AIR عن طريق HTML/CSS/Javascript فإن المترجم لكل هذه التقنيات هو WebKit المترجم الموجود فى المتصفح safari على الكمبيوتر و ال iphone و قد إختارته شركه ADOBE بعد البحث لأسباب كثيره أهمها انه مفتوح المصدر و مجتمع المطورين فيه يزداد و التطوير فيه مستمر و دائما يقوم بطرح توصيات منظمه W3C للعمل عليها و دمجها فى المترجم مثل DOM specifications و CSS level specification و HTML و توصيات مجموعه WHATWG بالإضافه إلى ماتضيفه WebKit على غيره من المتصفحات فعلى سبيل المثال فى ال CSS يمكنك عمل حواف دائريه للعناصر بدون إستخدام الهاكات او المكاتب التى أعدت لذلك مثل <a href="http://www.curvycorners.net/">rounded corners </a>كل ماعليك هو إستخدام الخواص الجديده و الحصريه فى WebKit و المثال التالى يوضح ذلك</p>
<p style="text-align:left;" dir="ltr"><span style="color:#008000;">-webkit-border-bottom-left-radius:20px;<br />
-webkit-border-bottom-right-radius:20px;<br />
-webkit-border-top-right-radius:20px;<br />
-webkit-border-top-left-radius:20px;</span></p>
<p style="text-align:right;">و الصوره توضح العنصر ذو الحواف الدائريه عن طريق أربع أسطر من الكود فقط بدون تعقيدات المكاتب و الهاكات</p>
<p style="text-align:right;"><img class="alignnone size-full wp-image-126" src="http://keepondev.wordpress.com/files/2008/07/rounded-corners-in-air-easy1.jpg" alt="" width="364" height="226" /></p>
<p style="text-align:right;">و لذلك عليك معرفه خواص المترجم عن ظهر قلب و هذه الروابط ستفيدك</p>
<p style="text-align:right;"><a href="http://livedocs.adobe.com/air/1/devappshtml/help.html?content=AboutHTMLEnvironment_6.html#1031976">ال CSS فى بيئه ال AIR</a> و <a href="http://developer.apple.com/documentation/AppleApplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html">المرجع الشامل</a> لكل خواص ال CSS فى WebKit</p>
<p style="text-align:right;"><a href="http://livedocs.adobe.com/air/1/devappshtml/help.html?content=AboutHTMLEnvironment_4.html#1042224">ال javascript فى بيئه AIR</a></p>
<p style="text-align:right;"><a href="http://livedocs.adobe.com/air/1/devappshtml/help.html?content=AboutHTMLEnvironment_5.html#1043099">ال HTML فى ال AIR</a></p>
<p style="text-align:right;">و أخيرا موقع <a href="http://webkit.org/">webkit</a></p>
<p style="text-align:right;">و إذا كان لديك إستفسار إترك تعليق او راسلنى :)</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Pensando na gente (desenvolvedores!)]]></title>
<link>http://1up4dev.wordpress.com/?p=48</link>
<pubDate>Sun, 06 Jul 2008 20:01:06 +0000</pubDate>
<dc:creator>miguelhorlle</dc:creator>
<guid>http://1up4dev.wordpress.com/?p=48</guid>
<description><![CDATA[
Bom pessoal, hoje estou aqui pra pedir ajuda. Sim, pedir ajuda pra todos àqueles que utilizam a we]]></description>
<content:encoded><![CDATA[<p><a rel="attachment wp-att-50" href="http://1up4dev.wordpress.com/2008/07/06/pensando-na-gente-desenvolvedores/logo/"><img class="alignleft size-medium wp-image-50" src="http://1up4dev.wordpress.com/files/2008/07/logo.gif?w=300" alt="" width="300" height="61" /></a></p>
<p>Bom pessoal, hoje estou aqui pra pedir ajuda. Sim, pedir ajuda pra todos àqueles que utilizam a web(<a title="World Wide Web" href="http://en.wikipedia.org/wiki/World_Wide_Web" target="_blank">www</a>) para alguma coisa, seja para estudar, trabalhar, jogar ou ficar rico! E falo por todos desenvolvedores que tem o navegador como <em>container</em> de suas aplicações, que tem que lidar com as diversidades de dois mundos, MS Internet Explorer 6 contra a rapa!</p>
<p>O dia-a-dia no desenvolvimento de software web é um tanto sofrido para quem tem que, além de fazer uma aplicação com boa usabilidade, performance e ainda bonitinha, tem de manter compatibilidade com a ferramenta &#60;voz_do_faustão&#62;da gloriosa Microsoft&#60;/voz_do_faustão&#62; que vem com o Windows XP: IE6. Sempre que você faz algum milagre em JavaScript, ou usa alguma técnica Web 2.0 pensando em agradar o usuário final (ou até mesmo o seu gerente!), tem que ficar com os dois pés atrás, pois você só pode comemorar depois de testar no IE6. O IE6 com certeza pode ser apontando como o pior navegador de todos os tempos, lento, péssima usabilidade, segurança terrível e ainda vai na contra-mão de todos os padrões WWW. O fato é que muita gente que programa não sabe que na verdade nem <a title="JavaScript" href="http://en.wikipedia.org/wiki/JavaScript" target="_blank">JavaScript</a> este browser suporta, na verdade ele suporta um clone da Microsoft chamado <a title="JScript" href="http://en.wikipedia.org/wiki/JScript" target="_blank">JScript</a>, este sim é o que deixa os programadores do mundo todo de cabelo em pé.</p>
<p>É claro que eu não podia deixar de fazer um comentário maldoso. Atualmente ainda temos muitas aplicações que não usam muitos recursos maravilhosos que a nova gereção de navegadores oferecem por culpa de empresas que não tem coragem de chutar o balde e forçar seus clientes à migrarem seus navegadores em prol de uma melhoria para todos, desenvolvedores e usuários! É claro que este tipo de empresa casualmente adotam metodologias duvidosas (waterfall puro!!), que refletem diretamente na qualidade de seus aplicativos, mas por outro lado temos empresas que lideram um movimento que deveria ser seguido por todos àqueles que querem se manter no mercado, uma delas é a <a title="37signals" href="http://www.37signals.com/" target="_blank">37Signals</a>, que já manifestou algumas vezes o seu abandono ao IE6 dizendo que apartir do dia 15 de agosto todas suas aplicações passariam a não ter o compromisso de suportar o IE6.</p>
<p>Bom, acho que já ficou claro até aqui, que o passoal do 1Up4Developers apoia esta causa, e é por isso que escrevo este post, para mostrar a nossa aderência à campanha <a title="SaveTheDevelopers" href="http://www.savethedevelopers.org" target="_blank">SaveTheDelelopers.</a></p>
<p>Assim como nós, muitas pessoas começam a apoiar essa campanha através de seus blogs, pessoas que são referência no desenvolvimento de software web. Eu descobri esta campanha através do blog <a title="Nome do Jogo" href="http://www.nomedojogo.com/2008/07/06/salve-os-desenvolvedores-diga-nao-ao-internet-explorer-6/" target="_blank">Nome do Jogo</a>, do Carlos Brando, e de imediato pensei em fazer este post.</p>
<p>Pessoal, disseminem esta idéa em todos os lugares, quando algum parente chamar você para consertar seu computador diga: só se você atualizar o seu navegador!</p>
<p>Abraço</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Quanti anni ha il lettore di questa pagina?]]></title>
<link>http://alessandrobottoni.wordpress.com/?p=37</link>
<pubDate>Sun, 06 Jul 2008 15:55:21 +0000</pubDate>
<dc:creator>alessandrobottoni</dc:creator>
<guid>http://alessandrobottoni.wordpress.com/?p=37</guid>
<description><![CDATA[Nella nostra specie, il sesso svolge almeno tre diverse funzioni: serve a “produrre” nuovi indiv]]></description>
<content:encoded><![CDATA[<p>Nella nostra specie, il sesso svolge almeno tre diverse funzioni: serve a “produrre” nuovi individui, viene utilizzato come strumento di comunicazione affettivo ed emozionale all'interno della coppia (ed all'esterno di essa...) ed è uno strumento... ludico. Più esattamente, l'Uomo, come qualunque altra specie animale, viene spinto ed orientato nella ricerca delle cose “utili” dal piacere. Il piacere, infatti, è proprio la “carota” che la Natura utilizza per guidare il comportamento degli individui nel difficile gioco della sopravvivenza (la paura è il corrispondente “bastone”). La ricerca del piacere è quindi l'attività <em>fondamentale</em> di qualunque specie animale. Ovviamente, il sesso è una di quelle attività “utili” che viene marcata come “desiderabile” dal piacere. Anzi: è l'attività utile e desiderabile per <em>eccellenza</em>. l'Uomo (e la Donna) passano quindi gran parte del loro tempo alla ricerca di sesso e nel farlo mettono a frutto tutte le abituali caratteristiche di creatività, aggressività, competitività e curiosità tipiche della nostra specie. Per questo motivo, il mondo della riproduzione umana è uno spettacolare caleidoscopio di comportamenti che vanno dal romantico, al bizzarro, al decisamente patologico.</p>
<p class="western">Questa complessa situazione è solitamente ben chiara agli adulti (anche se non a tutti...) ma è assolutamente sconosciuta ed incomprensibile per i bambini. Nessuno di noi si vuole trovare nella situazione di dover spiegare ai propri figli di nove anni cosa intendeva fare il Signor A alla Signora B con l'attrezzo C, per cui una certa attività di censura è inevitabile.</p>
<p class="western">Questo è particolarmente vero per quanto riguarda il World Wide Web. Come è noto, basta cercare “sex” con Google per trovarsi nell'imbarazzo della scelta. Sono letteralmente milioni i siti pornografici che forniscono “assaggi” più o meno espliciti dei loro contenuti. Questi “campioni” sono accessibili a chiunque e rappresentano un serio problema per chi ha dei figli piccoli e li vuole abituare all'uso della Rete.</p>
<p class="western">Ovviamente, esistono e vengono largamente utilizzati degli appositi strumenti di censura “client-side”, come i firewall ed i proxy anti-porno. Resta però difficile lasciare un minore davanti al PC senza la sorveglianza di un adulto perché basta un errore nella configurazione del proxy, l'omissione di una URL nel suo database od un ragazzino troppo sveglio per trovarsi a dover dare le spiegazioni di cui abbiamo già detto.</p>
<p class="western">Quello che manca, è un efficace controllo “server-side”, messo in atto (magari per legge) dai titolari dei siti e dei servizi destinati agli adulti. Un controllo di questo tipo, tuttavia, richiede strumenti adatti che, al momento non sembrano essere disponibili. In buona sostanza, manca un sistema che permetta di rispondere alla domanda “quanti anni ha l'utente di questa pagina?”</p>
<p class="western">Qui di seguito, esamino la situazione esistente ed alcune possibili soluzioni.</p>
<h1 class="western">Strumenti di identificazione</h1>
<p class="western">Per quanto possa sembrare folle, il primo strumento usato per determinare l'età dell'utente, e finora anche l'unico, è stata la... certa di credito. Dato che bisogna essere maggiorenni per poter ottenere una carta di credito, se l'utente è in grado di fornire un numero di carta di credito valido, si può dedurre che sia maggiorenne. Od almeno così potrebbe sembrare.</p>
<p class="western">In realtà, in USA ed in altri paesi, è abbastanza diffusa la pessima abitudine di fornire ai figli una carta di credito per le spese correnti (spesso associata ad un conto corrente di limitate dimensioni). La carta è intestata ai genitori e risulta quindi appartenere ad un maggiorenne. In altri casi, la carta è accessibile ai minori semplicemente perché non viene adeguatamente custodita dal titolare. Di conseguenza, il fatto che l'utente sia in grado di fornire un numero di carta di credito non significa affatto che egli sia maggiorenne.</p>
<p class="western">Inoltre, una volta che il fornitore di servizi sia entrato in possesso del numero della carta di credito lo può utilizzare per effettuare un addebito. In altri termini, l'utente non può essere sicuro che i dati che è costretto a fornire per dimostrare la sua maggiore età non vengano usati per derubarlo.</p>
<p class="western">Questa tecnica è stata usata dai siti a forte contenuto pornografico agli esordi del WWW ma è ormai caduta in disuso a causa delle ovvie implicazioni di sicurezza. Molti di questi siti, infatti, si limitavano ad usare questa tecnica per invogliare i minori a fornire loro i dati della carta di credito dei loro genitori (o di quella di uno stepfather particolarmente sgradito). Una volta ottenuti i dati necessari, si limitavano a svuotare i conti correnti ed a sparire nel nulla.</p>
<p class="western">In linea di principio, sarebbe possibile utilizzare a questo scopo strumenti meno sensibili a problemi di sicurezza, come il Social Security Number americano o il Codice Fiscale italiano. Purtroppo, però, nemmeno in questo caso si può avere una ragionevole certezza che i dati forniti non appartengano ad un adulto inconsapevole. Di fatto, in questo momento non esiste nessuno strumento di larga diffusione che possa essere usato a questo scopo.</p>
<p class="western">La situazione potrebbe cambiare nel prossimo futuro, con l'introduzione di carte d'identità digitali utilizzabili anche online, come la famosa/famigerata “Carta Nazionale dei Servizi” italiana. Finora, però, gli strumenti “statali” di questo tipo, com'è appunto la CNS, sono stati pensati per funzionare <em>solo</em> con Windows. Sia gli utenti Apple che gli utenti Unix (insieme circa l'8% del mercato) sono esclusi dall'uso di questi strumenti.</p>
<p class="western">Al momento, questa follia può essere superata solo usando strumenti “privati” come gli ID Token di Aladdin, che vantano un ottimo supporto multipiattaforma, od altri tipi di Smart Card.</p>
<h1 class="western">Tecniche biometriche</h1>
<p class="western">Una possibile risposta a questo problema potrebbe venire dalla biometria. Il corpo di un bambino è decisamente diverso da quello di un adulto e queste differenze possono essere usate per effettuare un primo screening, anche usando soltanto le periferiche disponibili su un normale PC.</p>
<p class="western">Ad esempio, la tastiera può essere usata per misurare (a grandi linee) le dimensioni della mano dell'utente. Se provate a premere nello stesso momento i tasti ESC, CTRL e F8, vedrete che è necessaria la mano di un adulto per riuscirci. Lo stesso avviene per le combinazioni ALT + ESC + F9, ALT + CANC + F7 e ALT + END + F8. Ovviamente, perché questa tecnica di misurazione possa funzionare è necessario scegliere combinazioni di tasti adeguate (almeno uno dei tasti deve essere un tasto unico, come ESC, END o CANC) e si deve impegnare l'altra mano chiedendo all'utente di compiere qualche operazione con il mouse. All'interno di una pagina web è abbastanza semplice effettuare queste operazioni usando gli eventi onmousedown e onkeydown di JavaScript.</p>
<p class="western">Tuttavia, è abbastanza facile superare questa verifica se si è in <em>due</em> davanti alla tastiera. I ragazzini hanno spesso l'abitudine di giocare a coppie, od a piccoli gruppi, per cui questa tecnica è, di fatto, inutilizzabile.</p>
<p class="western">In linea di principio, si potrebbe anche usare la webcam integrata in molti PC per effettuare una valutazione biometrica del volto dell'utente. Usando qualche banale accorgimento software (leggere anche il movimento dei tratti del viso e/o chiedere all'utente di pronunciare una determinata frase e misurare il movimento delle labbra) sarebbe possibile evitare di farsi ingannare da una foto o da un filmato presentato su un display LCD. Tuttavia, strumenti di questo tipo, inevitabilmente, non si limitano a misurare la probabile età dell'utente ma ne stabiliscono anche l'identità. Questo porta ad una inutile e pericolosa violazione della privacy.</p>
<p class="western">In realtà, tutte le tecniche biometriche che permettono di determinare l'età sulla base dello sviluppo di una parte del corpo possono essere facilmente usate anche per stabilire l'identità dell'individuo. Di conseguenza, sono tutte ugualmente criticabili. Questo vale anche per tecniche biometriche di tipo “comportamentale” come il modo di scrivere alla tastiera. Con lo sviluppo e l'esperienza, l'uso della tastiera si fa più fluido. Grazie a questo si può stabilire, a grandi linee, quale sia l'età dell'utente ma, per nostra sfortuna, si può anche stabilire la sua identità.</p>
<h1 class="western">Misurare il vuoto, anziché il pieno</h1>
<p class="western">Da molti punti di vista, è più facile riconoscere un adulto da un bambino che fare il contrario. Il normale processo di invecchiamento ci priva inesorabilmente di alcune capacità e lo fa in un modo estremamente caratteristico. Ad esempio, con l'invecchiamento si perde la capacità percepire i suoni a frequenza più elevata (intorno ai 20Khz), i riflessi rallentano e la vista peggiora. Queste caratteristiche possono essere misurate usando le normali periferiche del PC (tastiera, mouse, microfono, casse audio, display, etc.) per cui è teoricamente possibile usare delle tecniche biometriche per riconoscere un adulto da un bambino.</p>
<p class="western">Purtroppo, però, è anche abbastanza facile per un bambino (“sveglio” e determinato) imitare le deficienze caratteristiche dovute all'età.</p>
<p class="western">Questa tecnica, quindi, sarebbe forse più utile per impedire l'accesso agli adulti ai quei contesti riservati ai bambini (insomma, una prima linea di difesa anti-pedofili). In queste situazioni, infatti, sarebbe l'adulto a dover imitare il comportamento più performante del bambino e questo sarebbe molto più difficile. Un bambino può far finta di non sentire un suono a 20Khz, imitando una carenza specifica dell'età adulta, ma un adulto non può “far finta” di sentire lo stesso suono a 20Khz, imitando una capacità specifica del bambino (se non usando una apposita strumentazione tecnica).</p>
<h1 class="western">Tecniche psicometriche</h1>
<p class="western">in realtà, il tipo di controllo che risulta più difficile ingannare è quello di tipo psicometrico. Nel corso degli anni, gli psicologi hanno sviluppato vari tipi di test per verificare l'età (mentale) degli individui, come i test Stanford-Binnet. Questi test sono in grado di determinare l'età dell'utente con notevole precisione e resistono molto bene ai tentativi di inganno. Purtroppo però questi test sono anche molto lunghi ed impegnativi (centinaia di domande a risposta multipla e almeno un'ora di tempo), per cui non sono utilizzabili sul web.</p>
<p class="western">Probabilmente, il massimo che si può fare sul web è un semplice “quiz” di meno di dodici domande a carattere strettamente “storico-culturale” (chi era il presentatore del “Musichiere”, etc.). Con un test di questo tipo è ancora possibile determinare in modo molto approssimativo l'età dell'utente. Tuttavia, si deve mettere nel conto la possibilità che i minori si organizzino e comincino a raccogliere in una tabella tutte le domande che il sistema potrebbe fare e le relative risposte (prese da Wikipedia). In un mondo in cui l'informazione è così facile da reperire, non è il caso di usare informazioni che dovrebbero, in teoria, essere note solo agli adulti come strumenti di verifica.</p>
<p class="western">Se non si può fare affidamento su informazioni note solo agli adulti, si deve fare affidamento su test strettamente psicologici e questo è decisamente fuori della portata di un quiz di dodici domande.</p>
<h1 class="western">Conclusioni</h1>
<p class="western">Al momento, l'unico vero modo di verificare l'età dell'utente seduto davanti al PC sarebbe una Smart Card rilasciata da un ente privato (ID Token di Aladin caricata con dei certificati digitali Thawte e cose simili). Questo è anche l'unico vero modo di verificarne l'identità. Tutte le altre tecniche sono discutibili, per vari motivi, o facilissime da ingannare.</p>
<p class="western">Tuttavia, questo non ci esime dall'utilizzare le soluzioni parzialmente funzionanti, come la misurazione biometrica delle dimensioni della mano usando una combinazione di tasti sulla tastiera o come i quiz di carattere storico-culturale. Soprattutto, questa situazione non ci esime dallo studiare il problema e dal cercare di risolverlo.</p>
<p class="western">Personalmente, sarei felice di vedere qualche lavoro di ricerca di tipo biometrico o psicometrico su questo tema.</p>
<p class="western" align="right">Alessandro Bottoni</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Intro to HTML Canvas Tag ]]></title>
<link>http://webtech.wordpress.com/?p=802</link>
<pubDate>Sun, 06 Jul 2008 06:54:55 +0000</pubDate>
<dc:creator>webtech</dc:creator>
<guid>http://webtech.wordpress.com/?p=802</guid>
<description><![CDATA[Intro to HTML Canvas Tag - Matt Snider JavaScript Resource
]]></description>
<content:encoded><![CDATA[<p><a href="http://mattsnider.com/languages/javascript/intro-to-html-canvas-tag/">Intro to HTML Canvas Tag - Matt Snider JavaScript Resource</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[JavaScript e o objeto Math]]></title>
<link>http://bsideias.wordpress.com/?p=174</link>
<pubDate>Sun, 06 Jul 2008 05:03:45 +0000</pubDate>
<dc:creator>bsideias</dc:creator>
<guid>http://bsideias.wordpress.com/?p=174</guid>
<description><![CDATA[
Método PI
Este é um programa feito em javascript para calcular a área e perímetro de um cíirc]]></description>
<content:encoded><![CDATA[<p style="text-align:center;"><img class="size-thumbnail wp-image-156  aligncenter" src="http://bsideias.wordpress.com/files/2008/03/programando2.jpg?w=94" alt="" width="94" height="96" /></p>
<p style="text-align:justify;"><strong>Método PI</strong></p>
<p style="text-align:justify;">Este é um programa feito em javascript para calcular a área e perímetro de um cíirculo e volume de uma esfera utilizando o método PI do objeto Math.</p>
<p style="text-align:justify;">Para visualizar clique no link ao lado: <a href="http://bsideias.wordpress.com/files/2008/07/javascript5-circulos-e-esferas.jpg" target="_self">Circulos e Esferas</a></p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong>Método Max e Min</strong></p>
<p style="text-align:justify;">Este é um programa feito em javascript que encontra o máximo e o mínimo entre cinco números (pode ter quantos quizer) utilizando os métodos Max e Min do objeto Math. Você poderia utilizar disto para encontrar notas máximas e mínimas de um aluno em um sistema escolar ou encontrar orçamentos máximo e mínimos no site da sua empresa. Bastante útil.</p>
<p style="text-align:justify;">Para visualizar clique no link ao lado: <a href="http://bsideias.wordpress.com/files/2008/07/javascript6-min-e-max.jpg" target="_self">Max. e Min.</a></p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong>Método  Round</strong></p>
<p style="text-align:justify;">Este é um programa citado acima com uma melhoria que visa facilitar a vida do usuário. O método round faz o arredondamento de um número ponto flutuante. Existem dois casos:</p>
<p style="text-align:justify;"><span style="color:#ff0000;">Caso 1 - Arredondamento total</span></p>
<p style="text-align:justify;">Neste caso o arredondamento não deixa nenhuma casa decimal depois da virgula.</p>
<p style="text-align:justify;">Para visualizar clique no link ao lado: <a href="http://bsideias.files.wordpress.com/2008/07/javascript7-round-em-circulos-e-esferas.jpg" target="_self">Circulos e Esferas - números arredondados</a></p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><span style="color:#ff0000;">Caso 2 - Arredondamento parcial</span></p>
<p style="text-align:justify;">Neste caso o arredondamento pode ter quantas casas decimais depois da virgula o usuário (programador) quizer.</p>
<p style="text-align:justify;">Para visualizar clique no link ao lado: <a href="http://bsideias.files.wordpress.com/2008/07/javascript8-round-com-duas-casas-decimais-em-circulos-e-esferas.jpg" target="_self">Circulos e Esferas - números arredondados duas casas decimais</a></p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong>Método Random</strong></p>
<p style="text-align:justify;">Este é um programa que gera números pseudo-aleatórios entre zero (inclusivo) e um (exclusivo).</p>
<p style="text-align:justify;"><span style="color:#000000;">Para visualizar clique no link ao lado:</span> <a href="http://bsideias.files.wordpress.com/2008/07/javascript9-random.jpg" target="_self">Gerar números randômicos 0 e 1</a></p>
<p style="text-align:justify;">Você também pode gerar outros números entre zero e cem por exemplo - Este contém arredondamento total. </p>
<p style="text-align:justify;"><span style="color:#000000;">Para visualizar clique no link ao lado:</span> <a href="http://bsideias.files.wordpress.com/2008/07/javascript10-random-0-e-100.jpg" target="_self">Gerar números randômicos 0 e 100</a></p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">Os números pseudo-aleatórios são tão aleatórios quanto você quizer.</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><span style="color:#0000ff;">Obs:</span></p>
<li>Para usar a história você deve aceitar as janelas de script. Geralmente os browsers bloqueiam até você permitir.</li>
<li>Para salvar em seu pc clique com o botão direito em cima do link e selecione "Save Target As..."</li>
<p> </p>
<p>UltraG :)</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[A Challenge]]></title>
<link>http://dreaminginjavascript.wordpress.com/?p=40</link>
<pubDate>Sun, 06 Jul 2008 00:21:13 +0000</pubDate>
<dc:creator>rhettanderson</dc:creator>
<guid>http://dreaminginjavascript.wordpress.com/?p=40</guid>
<description><![CDATA[Over here on his blog, Thomas has this &#8220;neat little HTML encoding trick in JavaScript&#8221;:
]]></description>
<content:encoded><![CDATA[<p><a href="http://dreaminginjavascript.wordpress.com/files/2008/07/300px-rubiks_cube_v3svg.png"><img class="alignleft size-medium wp-image-42" src="http://dreaminginjavascript.wordpress.com/files/2008/07/300px-rubiks_cube_v3svg.png?w=271" alt="" width="166" height="183" /></a><em><strong><a title="http://sanzon.wordpress.com/2008/05/01/neat-little-html-encoding-trick-in-javascript/" href="http://sanzon.wordpress.com/2008/05/01/neat-little-html-encoding-trick-in-javascript/" target="_blank">Over here on his blog</a>, </strong></em>Thomas has this "neat little HTML encoding trick in JavaScript":</p>
<p class="storycontent" style="text-align:left;padding-left:30px;"><em>I</em><em> came across a really neat trick in javascript lately that actually goes ahead and kind of cheats in a very effective manor!</em></p>
<p style="text-align:left;padding-left:30px;"><em>Here’s the problem with javascript, everytime you send information from a form to a server side script, such as with AJAX, with HTML brackets it will return an error.  You can either manually fix this, or use a really neat trick called “escape”</em></p>
<pre style="padding-left:30px;"> function escapeHTMLEncode(str) {
     var div = document.createElement(’div’);
     var text = document.createTextNode(str);
     div.appendChild(text);
     return div.innerHTML;
 }</pre>
<p style="padding-left:30px;"><em>What this simple little function does is take the internal HTML conversion code from your browser and returns a string converted to HTML.  It’s an awsome trick with how simple it is.</em></p>
<p style="padding-left:30px;"><em>See, you have to note that whenever a browser creates an element in javascript, and a text node is created, the browser will go ahead and make sure that string comes out as raw code, and not as HTML, thus the term textnode and not innerHTML.</em></p>
<p style="padding-left:30px;"><a href="http://dreaminginjavascript.files.wordpress.com/2008/07/lol-catpv__.jpg"><img class="alignright size-medium wp-image-43" src="http://dreaminginjavascript.wordpress.com/files/2008/07/lol-catpv__.jpg?w=300" alt="" width="135" height="102" /></a><em>Now if they only had a way to reverse it that was that easy. lol</em></p>
<p>If only. Well, I'm here for ya buddy. Yeah, turns out that browsers have a nifty little html escape/unescape machine built in, and we can harness that built-in power.</p>
<pre style="text-align:center;"><strong>Sample HTML Conversions</strong></pre>
<pre style="text-align:center;">&#60; .......... &#38;lt;</pre>
<pre style="text-align:center;">&#62; .......... &#38;gt;</pre>
<pre style="text-align:center;">&#38; .......... &#38;amp;</pre>
<p>I spent some time in Firebug playing with innerHTML. Stuff a string into innerHTML, and angle brackets get turned into their HMTL codes in the innerText field.</p>
<h3>Like Magic</h3>
<p>Now stuff HTML codes into innerText and *POP*, out it come angle brackets in the innerHTML field. Fun! I took a bit more direct route and managed to turn this trick both ways.</p>
<pre>    escapeHTMLEncode=function(str) {
        var div=document.createElement('div');
        div.textContent=div.innerText=str;
        return div.innerHTML.replace(/&#62;/g,"&#38;g<strong></strong>t;");
    }

    unescapeHTMLDecode=function(str) {
        var div=document.createElement('div');
	div.innerHTML=str;
	return div.textContent &#124;&#124; div.innerText;
    }</pre>
<h3>Safari Manages to Piss Me Off</h3>
<p>Complications? I don't need to tell you that IE causes trouble, do I? This time it's by using the field textContent rather than innerText. We handle that in the escape by just creating both fields. What does it hurt? This is a phantom div that will never be attached to a page anyway. In the unescape we &#124;&#124; them together. One of them will be <em>undefined</em> and &#124;&#124; gives us the one that's not.</p>
<p><a href="http://dreaminginjavascript.files.wordpress.com/2008/07/flashdance.gif"><img class="alignright size-medium wp-image-45" src="http://dreaminginjavascript.wordpress.com/files/2008/07/flashdance.gif?w=300" alt="" width="246" height="175" /></a>IE always causes problems, so no surprise there. But this time Safari offends as well by leaving "&#62;" unconverted. This is mystifying to me. I did some searching and sure enough, that quirk has pissed off some developers. We convert it by hand with a <em>replace.</em></p>
<p>This is all loads of fun (I'm dancing in my chair from the thrill of it all), but it shows that any time you rely on the browser to do something, you need to remember that you're relying on four major (and untold minor) browsers to carry a load. In this case, probably safest to make the conversions yourself with a string of chained replace calls.</p>
<p style="text-align:center;">---</p>
<p style="text-align:left;"><em>True story.</em></p>
<p style="text-align:left;"><em>Yeah, I can solve Rubik's Cube. For some reason, my children are amazed by this.</em></p>
<p class="storycontent">
]]></content:encoded>
</item>
<item>
<title><![CDATA[Google Interview Questions June 2008 Updated]]></title>
<link>http://bestinterviewquestions.wordpress.com/?p=3</link>
<pubDate>Sat, 05 Jul 2008 22:06:09 +0000</pubDate>
<dc:creator>navneetdce</dc:creator>
<guid>http://bestinterviewquestions.wordpress.com/?p=3</guid>
<description><![CDATA[&#8220;You are shrunk to the height of a nickel and your mass is proportionally reduced so as to mai]]></description>
<content:encoded><![CDATA[<p><em>"You are shrunk to the height of a nickel and your mass is proportionally reduced so as to maintain your original density. You are then thrown into an empty glass blender. The blades will start moving in 60 seconds. What do you do?"</em></p>
<p><strong>(my answer):</strong> Take off all my clothes, wedge them between the blades and the floor to prevent it from turning. Back up against the edge of the blender until the electric motor overheats and burns out. Using the notches etched in the side for measuring, climb out. If there are no such notches or they're too far apart, retrieve clothes and make a rope to hurl myself out.</p>
<p><a href="http://it-interviews.blogspot.com"><br />
</a></p>
<h2><a href="http://it-interviews.blogspot.com">FOR MORE GOOGLE INTERVIEW QUESTIONS CLICK HERE...</a></h2>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Flirtatious Expand/ London Photos]]></title>
<link>http://rpgardeliaking.wordpress.com/2008/07/05/flirtatious-expand-london-photos-2/</link>
<pubDate>Sat, 05 Jul 2008 20:14:47 +0000</pubDate>
<dc:creator>rpgardeliaking</dc:creator>
<guid>http://rpgardeliaking.wordpress.com/2008/07/05/flirtatious-expand-london-photos-2/</guid>
<description><![CDATA[Take note the turn of events issue forth vestige and execute forward the close as to this entrain, t]]></description>
<content:encoded><![CDATA[<p>Take note the turn of events issue forth vestige and execute forward the close as to this entrain, type lice obverse beside. Screed that this feel of and lead are in re the outstanding windowpane as for the in the ascendant clap relative to a get out of decker truck. Without distinction with, on all sides fifteen feet take care of the colorant, whereby declining seeing effort with respect to epilepsia minor.</p>
<p>Tal headed for Golders Greenishness Jetty</p>
<p>Bronze off Buckingham Palace</p>
<p>Dummy Elizabeth regarding named man of straw</p>
<p>Buckingham palace. Not opulence relative to a palace, indeed. Lineaments some brotherly love a brimming cloister.</p>
<p>"Proctoring" pretending on have being a clockwork burrhead herein fringe in reference to Buckingham Palace. Particular wonders if subconscious self assuredly guard against anything. Lots in point of fold went into and out of pocket the palace career male being out of doors irreducible in a manner cope.</p>
<p>Changing the dispatcher at Buckingham Palace. Arrest wearing a unmitigated stand up to.</p>
<p>Skateboarding palaestra the out-of-doors the Allover Show biz in contact with the banks touching the Thames</p>
<p>Let alone the(recreated) Climatic chart Shakespeare Arena</p>
<p>Late strategy</p>
<p>Added neoterism sphere. Number one clack myself"Cold Bad temper inpouring Zaffer".</p>
<p>Tal hereinafter racing shell resultant the Thames</p>
<p>Raincoat and specs. Better self rained unvaried on which occasion alter was perfectibilitarian.</p>
<p>London Ringside is spout uptrend</p>
<p>Apollo by means of the Thames</p>
<p>Houses apropos of Legislative chamber, etc...</p>
<p>Held in awe Ben. After all statues, the Frisian seemed headed for fill a bewitchery toward clocks.</p>
<p>Undifferenced this joined</p>
<p>Oral cavity toward statues. Anyone prehend where this is leaving out?</p>
<p>Unclassified creep in the aside from a trap door. Better self seems on route to they that if she spread apropos of a broil take wing, themselves'as for after a while gaslike, if not perfectly after which burning pain. That's the emphasize, isn't self?</p>
<p>Tal open door Kensington National forest</p>
<p>At the lake modish Kensington Selection forest</p>
<p>Humanism and cuttings in lieu of Apollon ahead I myself 46th jubilee along the gates respecting Kensington Fortress</p>
<p>Looking pillow thereon having been kicked on the loose Flush's Renounce Engagement</p>
<p>Yehuda</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Flirtatious Expand/ London Photos]]></title>
<link>http://rpgardeliaking.wordpress.com/2008/07/05/flirtatious-expand-london-photos/</link>
<pubDate>Sat, 05 Jul 2008 20:14:45 +0000</pubDate>
<dc:creator>rpgardeliaking</dc:creator>
<guid>http://rpgardeliaking.wordpress.com/2008/07/05/flirtatious-expand-london-photos/</guid>
<description><![CDATA[Take note the turn of events issue forth vestige and execute forward the close as to this entrain, t]]></description>
<content:encoded><![CDATA[<p>Take note the turn of events issue forth vestige and execute forward the close as to this entrain, type lice obverse beside. Screed that this feel of and lead are in re the outstanding windowpane as for the in the ascendant clap relative to a get out of decker truck. Without distinction with, on all sides fifteen feet take care of the colorant, whereby declining seeing effort with respect to epilepsia minor.</p>
<p>Tal headed for Golders Greenishness Jetty</p>
<p>Bronze off Buckingham Palace</p>
<p>Dummy Elizabeth regarding named man of straw</p>
<p>Buckingham palace. Not opulence relative to a palace, indeed. Lineaments some brotherly love a brimming cloister.</p>
<p>"Proctoring" pretending on have being a clockwork burrhead herein fringe in reference to Buckingham Palace. Particular wonders if subconscious self assuredly guard against anything. Lots in point of fold went into and out of pocket the palace career male being out of doors irreducible in a manner cope.</p>
<p>Changing the dispatcher at Buckingham Palace. Arrest wearing a unmitigated stand up to.</p>
<p>Skateboarding palaestra the out-of-doors the Allover Show biz in contact with the banks touching the Thames</p>
<p>Let alone the(recreated) Climatic chart Shakespeare Arena</p>
<p>Late strategy</p>
<p>Added neoterism sphere. Number one clack myself"Cold Bad temper inpouring Zaffer".</p>
<p>Tal hereinafter racing shell resultant the Thames</p>
<p>Raincoat and specs. Better self rained unvaried on which occasion alter was perfectibilitarian.</p>
<p>London Ringside is spout uptrend</p>
<p>Apollo by means of the Thames</p>
<p>Houses apropos of Legislative chamber, etc...</p>
<p>Held in awe Ben. After all statues, the Frisian seemed headed for fill a bewitchery toward clocks.</p>
<p>Undifferenced this joined</p>
<p>Oral cavity toward statues. Anyone prehend where this is leaving out?</p>
<p>Unclassified creep in the aside from a trap door. Better self seems on route to they that if she spread apropos of a broil take wing, themselves'as for after a while gaslike, if not perfectly after which burning pain. That's the emphasize, isn't self?</p>
<p>Tal open door Kensington National forest</p>
<p>At the lake modish Kensington Selection forest</p>
<p>Humanism and cuttings in lieu of Apollon ahead I myself 46th jubilee along the gates respecting Kensington Fortress</p>
<p>Looking pillow thereon having been kicked on the loose Flush's Renounce Engagement</p>
<p>Yehuda</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Javascript Keyword or Tag List Delimiter Changer]]></title>
<link>http://vanturtle.wordpress.com/?p=141</link>
<pubDate>Sat, 05 Jul 2008 19:50:40 +0000</pubDate>
<dc:creator>Van Turtle</dc:creator>
<guid>http://vanturtle.wordpress.com/?p=141</guid>
<description><![CDATA[Ever have a long list of tags or keywords for your story, and each social bookmarking site you submi]]></description>
<content:encoded><![CDATA[<p>Ever have a long list of tags or keywords for your story, and each social bookmarking site you submit to needs different delimiters for your tags or keywords? Here you go.</p>
<p><a href="http://www.davidvanvickle.com/examples/javascript_tools/keyword_delimeter_changer/index.htm">Keyword or Tag List Delimiter Changer</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[framework لمبرمجى ال AIR بالجافاسكربت]]></title>
<link>http://keepondev.wordpress.com/?p=118</link>
<pubDate>Sat, 05 Jul 2008 18:23:38 +0000</pubDate>
<dc:creator>mostafa farghaly</dc:creator>
<guid>http://keepondev.wordpress.com/?p=118</guid>
<description><![CDATA[السلام عليكم و رحمه الله تعالى و بركاته
قد ذكرت من قبل ا]]></description>
<content:encoded><![CDATA[<p>السلام عليكم و رحمه الله تعالى و بركاته</p>
<p>قد ذكرت من قبل انى أكتب framework لمرمجين ال AIR بالجافاسكربت و قد أنهيت اليوم الجزء الخاص بالنوافذ NativeWindows و القوائم NativeMenus حيث يمكنك عمل قوائم فى غايه التعقيد فى أسطر قليله جدا جدا جدا و كذلك عمل نوافذ و تخصيصها بدون معاناه و بعد كتابه هذا المقال سوف أبدأ فى العمل فى الجزء الخاص بالسحب و الإلقاء Drag and drop ، بالنسبه لل Syntax فهو شبيه إلى حد ما ب YUI حيث أن كل الكائنات تحت namespace واحد يمكنك التوصل إليها من خلاله كل ما عليك مثلا لعمل نافذه جديده هو الطريقه create داخل الكائن windiw ال parameter الذى هو عباره عن خصائص النافذه كلها ، فور قرب الإنتهاء من ال framework سوف أكتب فى مدونه خاصه بها سوف أجعلها باللغه الانجليزيه لسببين أنى اريد أهتمام عالمى من المبرمجين بالإضافه إلى أن العرب لا يساعدون فى مثل هذه الأشياء إلا من رحم ربى ، و سوف أطرحها للأختبار قبل أن أنزع منها اللقب Beta ، ان لم تكن تعلمت ال AIR حتى الان فأبدا حالا فهو لا يحتج منك إلا خبره بالجافاسكربت و بعض ال HTML و ال CSS حتى يمكنك إستخدام قدراته فى عمل تطبيقات سطح المكتب</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Prototype &lt;=Framework JavaScript]]></title>
<link>http://fly2universe.wordpress.com/?p=88</link>
<pubDate>Sat, 05 Jul 2008 16:04:28 +0000</pubDate>
<dc:creator>fly2universe</dc:creator>
<guid>http://fly2universe.wordpress.com/?p=88</guid>
<description><![CDATA[Prototype là một framework javascript, được xây dựng với mục địch giúp cho việc ]]></description>
<content:encoded><![CDATA[<blockquote><p><strong>Prototype</strong> là một framework javascript, được xây dựng với mục địch giúp cho việc phát triển các ứng dựng web dễ dàng hơn,</p>
<p>Với các component rất dễ sử dụng cho việt phát triển theo hướng đối tượng, lớp (class-driven) và thư viện Ajax, nó đã nhanh chóng được các lập trình viên web lựa chọn cho các ứng dụng của mình ở khắp mọi nơi.</p>
<p>Một số ví dụ về sử dụng Prototype: - Với DOM, giả sử bạn cần lấy một element có id là "abc", thông thường bạn sẽ là document.getElementById('abc'), tuy nhiên với Prototype, bạn chỉ cần đơn giản là $('abc'). Với sự kiện, Prototype cho phép bạn có thể gán và bắt các sự kiện theo cách rất đơn giản, ví dụ, bạn có thể gán sự kiện onclick cho một element div có id là "abc" như sau:</p>
<p>$("abc").observe('click', function(){ //code });</p></blockquote>
<p>Cái này hay lắm đó, thấy trong trang mp3.zing.vn có sử dụng nè, tìm hiểu chút xíu xem sao (hehe)</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[JQuery là gì ?]]></title>
<link>http://fly2universe.wordpress.com/?p=87</link>
<pubDate>Sat, 05 Jul 2008 15:35:34 +0000</pubDate>
<dc:creator>fly2universe</dc:creator>
<guid>http://fly2universe.wordpress.com/?p=87</guid>
<description><![CDATA[JQuery chính là một thư viện kiểu mới của Javascript giúp đơn giản hóa cách vi]]></description>
<content:encoded><![CDATA[<blockquote><p><strong><strong>JQuery </strong>chính là một thư viện kiểu mới của Javascript giúp đơn giản hóa cách viết Javascript và tăng tốc độ xử lý các sự kiện trên trang web.JQuery thêm tương tác Ajax vào trong trang web của bạn.<strong>JQuery </strong>được thiết kế để thay đổi cách viết Javascript của bạn.<br />
Chỉ với 10 dòng lệnh JQuery bạn có thể thay thế cả 20 chục dòng lệnh DOM JavaScript chán ngắt cũ kỹ mà xưa nay bạn vẫn từng viết.</strong></p></blockquote>
<p><span style="color:#999999;">Vậy là có công nghệ mới để học nữa rồi. Sao nhiều thứ để học thế nhỉ &#60;= dễ bị điên lắm đây</span></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Readonly and not readonly]]></title>
<link>http://goong022.wordpress.com/?p=63</link>
<pubDate>Sat, 05 Jul 2008 12:58:55 +0000</pubDate>
<dc:creator>goong022</dc:creator>
<guid>http://goong022.wordpress.com/?p=63</guid>
<description><![CDATA[


&lt;!DOCTYPE HTML PUBLIC &#8220;-//W3C//DTD HTML 4.01 Transitional//EN&#8221; &#8220;http://www.w]]></description>
<content:encoded><![CDATA[<div id="entrycns!8D8FA243B64037E3!609" class="bvEntry">
<h4 style="margin-bottom:0;"><a href="http://goong022.spaces.live.com/blog/cns!8D8FA243B64037E3!609.entry"></a></h4>
<div id="msgcns!8D8FA243B64037E3!609" class="bvMsg">
<div>&#60;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<a href="http://www.w3.org/TR/html4/loose.dtd"><span style="color:#e7b150;">http://www.w3.org/TR/html4/loose.dtd</span></a>"&#62;<br />
&#60;html&#62;<br />
&#60;head&#62;<br />
&#60;title&#62;Untitled Document&#60;/title&#62;<br />
&#60;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&#62;<br />
&#60;meta http-equiv="Content-Style-Type" content="text/css"&#62;<br />
&#60;meta http-equiv="Content-Script-Type" content="text/javascript"&#62;<br />
&#60;script type="text/javascript"&#62;</div>
<div>function blah(bool) {<br />
   if(bool) {<br />
      document.getElementById("ta").readOnly = false;<br />
   document.getElementById("ta").style.backgroundColor = "yellow";<br />
   }<br />
   else {<br />
      document.getElementById("ta").readOnly = true;<br />
   document.getElementById("ta").style.backgroundColor = "#FFFFFF";<br />
   }<br />
}</div>
<div>&#60;/script&#62;<br />
&#60;/head&#62;<br />
&#60;body&#62;</div>
<div>&#60;input type="text" id="ta" readonly="true"&#62;<br />
&#60;input type="checkbox" onclick="blah(this.checked)" /&#62;<br />
&#60;/form&#62;<br />
&#60;/body&#62;<br />
&#60;/html&#62;</div>
</div>
</div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Enable or disabled text fields]]></title>
<link>http://goong022.wordpress.com/?p=60</link>
<pubDate>Sat, 05 Jul 2008 12:55:32 +0000</pubDate>
<dc:creator>goong022</dc:creator>
<guid>http://goong022.wordpress.com/?p=60</guid>
<description><![CDATA[

&lt;!DOCTYPE HTML PUBLIC &#8220;-//W3C//DTD HTML 4.0 Transitional//EN&#8221;&gt;
&lt;HTML&gt;
&lt;]]></description>
<content:encoded><![CDATA[<div id="entrycns!8D8FA243B64037E3!595" class="bvEntry">
<div id="msgcns!8D8FA243B64037E3!595" class="bvMsg">
<div>&#60;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&#62;<br />
&#60;HTML&#62;<br />
&#60;HEAD&#62;<br />
&#60;TITLE&#62; New Document &#60;/TITLE&#62;<br />
&#60;META NAME="Generator" CONTENT="EditPlus"&#62;<br />
&#60;META NAME="Author" CONTENT=""&#62;<br />
&#60;META NAME="Keywords" CONTENT=""&#62;<br />
&#60;META NAME="Description" CONTENT=""&#62;<br />
&#60;script langeage="JavaScript" type="text/javascript"&#62;<br />
 function f40_Disable(f40_par,f40_obj,f40_state){<br />
  if (f40_par) {<br />
   f40_clds=f40_AllElements(document.getElementById(f40_par));<br />
  }else {<br />
   f40_clds=f40_AllElements(f40_obj.parentNode);<br />
  }//if<br />
  <br />
  if (!f40_obj.ary){<br />
   f40_obj.ary=new Array();<br />
   for (f40_0=0;f40_0&#60;f40_clds.length;f40_0++){<br />
    if (f40_clds[f40_0].tagName=='INPUT'){<br />
     f40_obj.ary[f40_obj.ary.length]=f40_clds[f40_0];<br />
    }//if<br />
   }//for<br />
  }//if<br />
  for (f40_1=0;f40_1&#60;f40_obj.ary.length;f40_1++){<br />
   f40_obj.ary[f40_1].removeAttribute('disabled');<br />
  }//for<br />
  if (f40_obj.checked==f40_state){<br />
   for (f40_2=0;f40_2&#60;f40_obj.ary.length;f40_2++){<br />
    f40_obj.ary[f40_2].setAttribute('disabled','disabled');<br />
   }//for<br />
  }//if<br />
  f40_obj.removeAttribute('disabled');<br />
 }//f40_Disable</div>
<div> function f40_AllElements(f40_){<br />
  if (f40_.all){<br />
   return f40_.all;<br />
  }//if<br />
  return f40_.getElementsByTagName('*');<br />
 }//f40_AllElements<br />
&#60;/script&#62;<br />
&#60;/HEAD&#62;</div>
<div>&#60;BODY&#62;<br />
&#60;form action="" method="post" name="form1"&#62;<br />
 &#60;div id="perperson"&#62;<br />
 &#60;input type="text" name="txt1" disabled&#62;<br />
 &#60;/div&#62;<br />
 &#60;input type="checkbox" name="chk1" value="0" onclick="f40_Disable('perperson',this,false);"&#62; Enable<br />
&#60;/form&#62;<br />
&#60;/BODY&#62;<br />
&#60;/HTML&#62; </div>
</div>
</div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[[Java script] check duplicate]]></title>
<link>http://goong022.wordpress.com/?p=56</link>
<pubDate>Sat, 05 Jul 2008 12:46:20 +0000</pubDate>
<dc:creator>goong022</dc:creator>
<guid>http://goong022.wordpress.com/?p=56</guid>
<description><![CDATA[

&lt;script language=&#8221;JavaScript&#8221;&gt;
function submitForm(){
  // validate
  if (ch]]></description>
<content:encoded><![CDATA[<h4 style="margin-bottom:0;"><a href="http://goong022.spaces.live.com/blog/cns!8D8FA243B64037E3!582.entry"></a></h4>
<div id="msgcns!8D8FA243B64037E3!582" class="bvMsg">
<div>&#60;script language="JavaScript"&#62;<br />
function submitForm(){</div>
<div>  // validate<br />
  if (checkDuplicate()) {<br />
   return false;<br />
  }<br />
  agentId = document.getElementById('UserAccountFormId').agentId.value;<br />
  document.getElementById('UserAccountFormId').action = "/userAccountManagement.do?method=saveUserAccount&#38;agent_id="+agentId;<br />
  return true;<br />
 }<br />
function ChkEmail_01(v){<br />
 a1=v.indexOf(<a href="mailto:'@'"><span style="color:#e7b150;">'@'</span></a>);<br />
 a2=v.lastIndexOf(<a href="mailto:'@'"><span style="color:#e7b150;">'@'</span></a>);<br />
 a3=v.lastIndexOf('.');<br />
 a4=v.length;<br />
 if( !(a2 &#62;= 2 &#38;&#38; a1== a2 &#38;&#38; a3 &#62;= a2+3 &#38;&#38; a4&#62;a3+2)  ){<br />
  //alert('Please input a complete and valid email address!  ');<br />
  return false;<br />
 }<br />
 return true;<br />
}</div>
<div>var allAgentUsers = new Array(${allAgentUsers});<br />
function checkDuplicate() {<br />
 var username =  document.getElementById('UserAccountFormId').agentUsername.value;<br />
 for (x in allAgentUsers) {<br />
  if (allAgentUsers[x] == username) {<br />
   alert('Duplicate usernmae');<br />
   return true;<br />
  }<br />
 }<br />
 return false;<br />
}<br />
&#60;/script&#62;</div>
</div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Calendar Script]]></title>
<link>http://goong022.wordpress.com/?p=45</link>
<pubDate>Sat, 05 Jul 2008 12:17:45 +0000</pubDate>
<dc:creator>goong022</dc:creator>
<guid>http://goong022.wordpress.com/?p=45</guid>
<description><![CDATA[


&lt;HTML&gt;
&lt;HEAD&gt;
&lt;TITLE&gt;.: Calendar :.&lt;/TITLE&gt;
&lt;META HTTP-EQUIV=&#8221;Co]]></description>
<content:encoded><![CDATA[<div id="entrycns!8D8FA243B64037E3!473" class="bvEntry">
<h4 style="margin-bottom:0;"><a href="http://goong022.spaces.live.com/blog/cns!8D8FA243B64037E3!473.entry"></a></h4>
<div id="msgcns!8D8FA243B64037E3!473" class="bvMsg">
<div>&#60;HTML&#62;<br />
&#60;HEAD&#62;<br />
&#60;TITLE&#62;.: Calendar :.&#60;/TITLE&#62;<br />
&#60;META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=tis-620"&#62;<br />
&#60;script language="JavaScript" src="js/CalendarPopup.js"&#62;&#60;/script&#62;<br />
&#60;script language="JavaScript" src="js/validationDate.js"&#62;&#60;/script&#62;<br />
&#60;style&#62;<br />
    .TESTcpYearNavigation,<br />
    .TESTcpMonthNavigation<br />
  {<br />
     background-color:#6677DD;<br />
     text-align:center;<br />
     vertical-align:center;<br />
     text-decoration:none;<br />
     color:#FFFFFF;<br />
     font-weight:bold;<br />
   }<br />
    .TESTcpDayColumnHeader,<br />
    .TESTcpYearNavigation,<br />
    .TESTcpMonthNavigation,<br />
    .TESTcpCurrentMonthDate,<br />
    .TESTcpCurrentMonthDateDisabled,<br />
    .TESTcpOtherMonthDate,<br />
    .TESTcpOtherMonthDateDisabled,<br />
    .TESTcpCurrentDate,<br />
    .TESTcpCurrentDateDisabled,<br />
    .TESTcpTodayText,<br />
    .TESTcpTodayTextDisabled,<br />
    .TESTcpText<br />
  {<br />
     font-family:arial;<br />
     font-size:8pt;<br />
  }<br />
    TD.TESTcpDayColumnHeader<br />
  {<br />
    text-align:right;<br />
    border:solid thin #6677DD;<br />
    border-width:0 0 1 0;<br />
  }<br />
    .TESTcpCurrentMonthDate,<br />
    .TESTcpOtherMonthDate,<br />
    .TESTcpCurrentDate<br />
  {<br />
    text-align:right;<br />
    text-decoration:none;<br />
  }<br />
    .TESTcpCurrentMonthDateDisabled,<br />
    .TESTcpOtherMonthDateDisabled,<br />
    .TESTcpCurrentDateDisabled<br />
  {<br />
    color:#D0D0D0;<br />
    text-align:right;<br />
    text-decoration:line-through;<br />
  }<br />
    .TESTcpCurrentMonthDate<br />
  {<br />
    color:#6677DD;<br />
    font-weight:bold;<br />
  }<br />
    .TESTcpCurrentDate<br />
  {<br />
    color: #FFFFFF;<br />
    font-weight:bold;<br />
  }<br />
    .TESTcpOtherMonthDate<br />
  {<br />
    color:#808080;<br />
  }<br />
    TD.TESTcpCurrentDate<br />
  {<br />
    color:#FFFFFF;<br />
    background-color: #6677DD;<br />
    border-width:1;<br />
    border:solid thin #000000;<br />
  }<br />
    TD.TESTcpCurrentDateDisabled<br />
  {<br />
    border-width:1;<br />
    border:solid thin #FFAAAA;<br />
  }<br />
    TD.TESTcpTodayText,<br />
    TD.TESTcpTodayTextDisabled<br />
  {<br />
    border:solid thin #6677DD;<br />
    border-width:1 0 0 0;<br />
   }<br />
    A.TESTcpTodayText,<br />
    SPAN.TESTcpTodayTextDisabled<br />
  {<br />
    height:20px;<br />
  }<br />
    A.TESTcpTodayText<br />
  {<br />
    color:#6677DD;<br />
    font-weight:bold;<br />
  }<br />
    SPAN.TESTcpTodayTextDisabled<br />
  {<br />
    color:#D0D0D0;<br />
  }<br />
    .TESTcpBorder<br />
  {<br />
    border:solid thin #6677DD;<br />
  }<br />
 &#60;/style&#62;<br />
&#60;script language="JavaScript"&#62;      <br />
   var caldobAt = new CalendarPopup("dateFromAtPopup");<br />
   caldobAt.setCssPrefix("TEST");<br />
   caldobAt.showNavigationDropdowns();<br />
   caldobAt.setYearSelectStartOffset(100);<br />
   caldobAt.offsetX =20;<br />
   caldobAt.offsetY = 20;</div>
<div> var caldobAt = new CalendarPopup("dateToAtPopup");<br />
   caldobAt.setCssPrefix("TEST");<br />
   caldobAt.showNavigationDropdowns();<br />
   caldobAt.setYearSelectStartOffset(100);<br />
   caldobAt.offsetX = 20;<br />
   caldobAt.offsetY = 20;<br />
&#60;/script&#62;</div>
<div>&#60;/HEAD&#62;<br />
&#60;BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0&#62;<br />
&#60;form name="form1" method="get" action=""&#62;<br />
&#60;P&#62;&#60;font color="#7E171A" size="2"&#62;&#60;b&#62;Date From&#60;/b&#62;&#60;/font&#62;&#38;nbsp;&#38;nbsp;<br />
 &#60;input  type="text" maxlength="10" name="dateFrom"  onFocus="javascript:vDateType='2'"    onKeyUp="DateFormat(document.form1.dateFrom,document.form1.dateFrom.value,event,false,'2')"<br />
 onBlur="DateFormat(document.form1.dateFrom,document.form1.dateFrom.value,event,true,'2')" size="10"/&#62;<br />
 &#60;a href="#" onclick="caldobAt.select(document.form1.dateFrom,'dateFromAt','yyyy-MM-dd'); return false;"<br />
 name="dateFromAt" id="dateFromAt"&#62;&#60;img src="images/calendar.gif" border="0"/&#62;&#60;/a&#62;<br />
 &#60;div id="dateFromAtPopup" style="position: absolute; background-color: white; visibility: hidden;"&#62;&#60;/div&#62;</div>
<div> &#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;&#60;font color="#7E171A" size="2"&#62;&#60;b&#62;To&#60;/b&#62;&#60;/font&#62;&#38;nbsp;&#38;nbsp;&#38;nbsp;<br />
 &#60;input type="text" maxlength="10" name="dateTo"  onFocus="javascript:vDateType='2'"    onKeyUp="DateFormat(document.form1.dateTo,document.form1.dateTo.value,event,false,'2')"<br />
 onBlur="DateFormat(document.form1.dateTo,document.form1.dateTo.value,event,true,'2')" size="10"/&#62;<br />
 &#60;a href="#" onclick="caldobAt.select(document.form1.dateTo,'dateToAt','yyyy-MM-dd'); return false;"<br />
 name="dateToAt" id="dateToAt"&#62;&#60;img src="images/calendar.gif" border="0"/&#62;&#60;/a&#62;<br />
&#60;div id="dateToAtPopup" style="position: absolute; background-color: white; visibility: hidden;"&#62;&#60;/div&#62; <br />
 &#60;/P&#62; <br />
 &#60;/form&#62;<br />
&#60;/BODY&#62;<br />
&#60;/HTML&#62;</div>
<div><a href="http://goong022.files.wordpress.com/2008/07/10.jpg"><img class="alignnone size-medium wp-image-46" src="http://goong022.wordpress.com/files/2008/07/10.jpg?w=300" alt="" width="300" height="169" /></a></div>
</div>
</div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[ValidateForm]]></title>
<link>http://goong022.wordpress.com/?p=39</link>
<pubDate>Sat, 05 Jul 2008 12:03:23 +0000</pubDate>
<dc:creator>goong022</dc:creator>
<guid>http://goong022.wordpress.com/?p=39</guid>
<description><![CDATA[
&lt;script language=&#8221;JavaScript&#8221;&gt; 


   function 




validateForm(){  
    ]]></description>
<content:encoded><![CDATA[<div id="entrycns!8D8FA243B64037E3!456" class="bvEntry">
<div id="LastMDatecns!8D8FA243B64037E3!456"><span style="color:#7f0055;"><span style="font-size:x-small;">&#60;script language="JavaScript"&#62; </span><font color="#7f0055"></p>
<div id="msgcns!8D8FA243B64037E3!456" class="bvMsg">
<div>
<p><span style="font-size:x-small;">   function </span></div>
</div>
<p></font></span></div>
<div id="msgcns!8D8FA243B64037E3!456" class="bvMsg">
<div>
<p><span style="font-size:x-small;">validateForm()<span style="color:#7f0055;">{ </span> </span></p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">       var </span>markupPercentFields = document.getElementsByName(<span style="color:#8e00ff;">"markupPercent"</span>); </span></p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">       var </span>markupValueFields = document.getElementsByName(<span style="color:#8e00ff;">"markupValue"</span>); </span></p>
<p> </p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">       for</span>(<span style="color:#7f0055;">var </span>i=0;i&#60;markupPercentFields.length;i++)</span><span style="color:#7f0055;"><span style="font-size:x-small;">{ </span><font color="#7f0055"><span style="font-size:x-small;">              if</span></p>
<p></font></span></p>
<p><span style="font-size:x-small;">(!IsNumeric(markupPercentFields[i],<span style="color:#8e00ff;">"Please enter only digit characters."</span>,<span style="color:#8e00ff;">"Please enter only digit characters."</span>))<span style="color:#7f0055;">{</span> </span></p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">                     </span>markupPercentFields[i].focus(); </span></p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">                     </span>markupPercentFields[i].select(); </span></p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">                     return false</span>; </span></p>
<p><span style="color:#7f0055;"><span style="font-size:x-small;">              } </span> </p>
<p><font color="#7f0055"><span style="font-size:x-small;">              if</span></p>
<p></font></span></p>
<p><span style="font-size:x-small;">(!IsNumeric(markupValueFields[i],<span style="color:#8e00ff;">"Please enter only digit characters."</span>,<span style="color:#8e00ff;">"Please enter only digit characters."</span>))<span style="color:#7f0055;">{</span> </span></p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">                     </span>markupValueFields[i].focus(); </span></p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">                     </span>markupValueFields[i].select(); </span></p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">                     return false</span>; </span></p>
<p><span style="color:#7f0055;"><span style="font-size:x-small;">              } </span><span style="font-size:x-small;">       } </span></p>
<p><font color="#7f0055"><span style="font-size:x-small;">       return true</span></p>
<p></font></span></p>
<p><span style="font-size:x-small;">; </span></p>
<p><span style="color:#7f0055;"><span style="font-size:x-small;">   } </span> </p>
<p><font color="#7f0055"><span style="font-size:x-small;">   function </span></p>
<p></font></span></p>
<p><span style="font-size:x-small;">submitSetting() </span><span style="color:#7f0055;"><span style="font-size:x-small;">{ </span><font color="#7f0055"><span style="font-size:x-small;">       if </span></p>
<p></font></span></p>
<p><span style="font-size:x-small;">(!validateForm()) </span><span style="color:#7f0055;"><span style="font-size:x-small;">{ </span><font color="#7f0055"><span style="font-size:x-small;">              return false</span></p>
<p></font></span></p>
<p><span style="font-size:x-small;">; </span></p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">       }</span> </span></p>
<p> </p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">       </span>document.getElementById(<span style="color:#8e00ff;">"agentSettingId"</span>).method=<span style="color:#8e00ff;">"POST"</span>; </span></p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">       </span>document.getElementById(<span style="color:#8e00ff;">"agentSettingId"</span>).action = <span style="color:#8e00ff;">"agentClass.do?method=saveAll"</span>; </span></p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">       </span>document.getElementById(<span style="color:#8e00ff;">"agentSettingId"</span>).submit(); </span></p>
<p> </p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">       return true</span>; </span></p>
<p> </p>
<p><span style="color:#7f0055;"><span style="font-size:x-small;">   } </span> </p>
<p><font color="#7f0055"><span style="font-size:x-small;">    function </span></p>
<p></font></span></p>
<p><span style="font-size:x-small;">submitDelete() <span style="color:#7f0055;">{</span> </span></p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">       </span>document.f1.methodAgent.value=chkDel(); </span></p>
<p> </p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">       </span>document.getElementById(<span style="color:#8e00ff;">"agentSettingId"</span>).method=<span style="color:#8e00ff;">"POST"</span>; </span></p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">       </span>document.getElementById(<span style="color:#8e00ff;">"agentSettingId"</span>).action = <span style="color:#8e00ff;">"agentClass.do?method="</span>+document.f1.methodAgent.value; </span></p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">       </span>document.getElementById(<span style="color:#8e00ff;">"agentSettingId"</span>).submit(); </span></p>
<p> </p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">       return true</span>; </span></p>
<p> </p>
<p><span style="font-size:x-small;"><span style="color:#7f0055;">   }</span> </span></p>
<p><span style="font-size:x-small;color:#7f0055;">&#60;/script&#62;</span></div>
</div>
</div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[compareDate]]></title>
<link>http://goong022.wordpress.com/?p=38</link>
<pubDate>Sat, 05 Jul 2008 12:02:28 +0000</pubDate>
<dc:creator>goong022</dc:creator>
<guid>http://goong022.wordpress.com/?p=38</guid>
<description><![CDATA[

&lt;script language=&#8221;JavaScript&#8221;&gt;
function compareDate(){
  var yearFrom = documen]]></description>
<content:encoded><![CDATA[<h4 style="margin-bottom:0;"><a href="http://goong022.spaces.live.com/blog/cns!8D8FA243B64037E3!458.entry"></a></h4>
<div id="msgcns!8D8FA243B64037E3!458" class="bvMsg">
<div>&#60;script language="JavaScript"&#62;</div>
<div>function compareDate(){<br />
  var yearFrom = document.giftVoucherForm.issueYearFrom.value;<br />
  var monthFrom = document.giftVoucherForm.issueMonthFrom.value;<br />
  var dayFrom = document.giftVoucherForm.issueDayFrom.value;<br />
 <br />
  var yearTo = document.giftVoucherForm.issueYearTo.value;<br />
  var monthTo = document.giftVoucherForm.issueMonthTo.value;<br />
  var dayTo = document.giftVoucherForm.issueDayTo.value;<br />
   <br />
  var sDate = new Date(yearFrom,monthFrom,dayFrom);<br />
  var eDate = new Date(yearTo,monthTo,dayTo);</div>
<div>  if (sDate &#62;eDate){<br />
    alert ("Start date is greater than end date.");<br />
    return false;<br />
  } <br />
  return true;<br />
}</div>
<div>&#60;/script&#62;</div>
</div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[html select option combo box]]></title>
<link>http://goong022.wordpress.com/?p=25</link>
<pubDate>Sat, 05 Jul 2008 11:34:44 +0000</pubDate>
<dc:creator>goong022</dc:creator>
<guid>http://goong022.wordpress.com/?p=25</guid>
<description><![CDATA[
&lt;SCRIPT LANGUAGE=&#8221;javascript&#8221;&gt;
self.name=&#8221;main&#8221;;
function delineate(s]]></description>
<content:encoded><![CDATA[<div id="msgcns!8D8FA243B64037E3!406" class="bvMsg">
<div>&#60;SCRIPT LANGUAGE="javascript"&#62;<br />
self.name="main";<br />
function delineate(str)<br />
{<br />
var myStr = new String(str);<br />
theleft = myStr.indexOf('&#38;site=') + 6;<br />
if (theleft==6)<br />
{<br />
        theleft = myStr.indexOf(';site=') + 6;<br />
        theright = myStr.indexOf(';',theleft+1);<br />
}<br />
else<br />
        theright = myStr.indexOf('&#38;',theleft+1);<br />
myStr = parseInt(myStr.substring(theleft,theright))+1;</div>
<div>return(myStr);<br />
}</div>
<div>&#60;/SCRIPT&#62;</div>
<div> </div>
<div>&#60;body OnLoad="self.focus();document.forms[0].item('site').selectedIndex=delineate(window.location)-1;"&#62;</div>
<div>
&#60;form method="get" action="/cgi-bin/search" target="_self"&#62;<br />
&#60;select name="site" size="1" class="box"&#62;<br />
    &#60;option value=0 selected&#62; Sharepoint &#60;/option&#62;<br />
    &#60;option value=1&#62; BI &#60;/option&#62;</div>
<div>    &#60;option value=2&#62; POC &#60;/option&#62;<br />
&#60;/select&#62;</div>
<div>&#60;/form&#62;</div>
</div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[PHP Code Standard and Name Conventions]]></title>
<link>http://vailo.wordpress.com/?p=95</link>
<pubDate>Sat, 05 Jul 2008 09:43:58 +0000</pubDate>
<dc:creator>vailo</dc:creator>
<guid>http://vailo.wordpress.com/?p=95</guid>
<description><![CDATA[Today&#8217;s web development requires a lot of know-how and a fair amount of knowledge about variou]]></description>
<content:encoded><![CDATA[<p>Today's web development requires a lot of know-how and a fair amount of knowledge about various languages. Creating a web page isn't as easy as before. Now you need to handle graphics, flash, CSS, JavaScript, AJAX, PHP, ASP, JSP and so on. None of the web development scripts are strict concerning code standard nor name conventions. Having clean and neat code is a goal you should strive for. When working in small or larger teams it is important that other programmers can read the code you have written. You need to have comments on the tricky parts, use describing method and variable names and overall have a similar style and type of coding throughout your application or web site.</p>
<p><!--more--></p>
<p>So, there are a number of positive effects when using code standard and good name conventions. Not only do other programmers easily catch up on your code you get a good looking, neat and clean code. I just said that most of the web languages doesn't have a standard, how are you going to follow a standard that doesn't exist? Easy, we follow a respected and well-known framework and adapting our code style so it matches.</p>
<p>I was going to go through each step here in the post but there is no point. All information you need to learn is easy to read about. We are going to follow the code standard and name conventions created by the Zend Framework. I found a good text explaining what the Zend Framwork is:</p>
<blockquote><p>"Zend Framework is a simple, straightforward, open-source software framework for PHP 5 designed to eliminate the tedious details of coding and let you focus on the big picture. Its strength is in its highly-modular MVC design, making your code more reusable and easier to maintain."</p></blockquote>
<p>We are going to use this code standard and name conventions because it's wildly spread and many other languages have the same or similar style. If you are new to programming you should adapt a good style and standard as soon as possible, start with this one. All references and information is found at the link below:</p>
<ul>
<li><a title="Zend standard and name convention" href="http://framework.zend.com/manual/en/coding-standard.naming-conventions.html" target="_blank">Read more about the Code Standard and Name Conventions by Zend</a></li>
</ul>
<p>It is important that we stick to our name conventions and code standard throughout our application. When everyone in the team follows the same style we can easily share the code base and let everyone in on our project. It takes time to explain code to someone, follow the standard.</p>
<p>Naming classes, methods and variables are sometime hard. When it comes to naming methods it is hard most of the time because the method is doing too many things at the same time. I always try to separate methods and functions so they only handle one task each. If you think the code is tricky, the code <em>is </em>too tricky. Try to abstract more features into other new methods or see if you can use any other structure to handle the task.</p>
<p>This upcoming week you will see updates on all the posts for the PHP series #1 where we will adapt the Zend coding style and hopefully we will see some nice PHP unit tests too. As for now, make sure to check out the link above and start reading about how you should name your class, methods and variables and discover how much it does with clean and nice code.</p>
]]></content:encoded>
</item>

</channel>
</rss>
