Html https://keopx.net/ es Ordenar Array con caracteres especiales en JavaScript https://keopx.net/blog/ordenar-array-con-caracteres-especiales-en-javascript <span>Ordenar Array con caracteres especiales en JavaScript</span> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-hidden field__item"><h3>Introducción</h3> <p>Los caracteres especiales como pueden ser las ñ o las tildes producen verdaderos dolores de cabeza. En este caso vamos a utilizar una función para reemplazar dichos caracteres antes de compararlo y posteriormente lo volver a colocar como corresponde.</p> <p><strong>Funciones de sustitución</strong></p> <p>Vamos a sustituir todo el <strong>array</strong> antes de compararlo:</p> <pre> <code class="language-javascript">for (var y=0; y vector[y] = vector[y].toString().replace(/Á|É|Í|Ó|Ú|Ñ/g,function (str,offset,s) { str =str=="Á"?"A{":str=="É"?"E{":str=="Í"?"I{":str=="Ó "?"O{":str=="Ú"?"U{":str=="Ñ"?"N{":"N{" return (str) } ) }</code></pre><p>Procedemos a ordenar el array</p> <p>Una vez ordenado pones otra vez los caracteres de forma correcta:</p> <pre> <code class="language-javascript">for (var z=0; z vector[z] = vector[z].toString().replace(/A{|E{|I{|O{|U{|N{/g,function (str,offset,s) { str =str=="A{"?"Á":str=="E{"?"É":str=="I{"?"Í":str=="O{"?"Ó":str=="U{"?"Ú":str=="N{"?"Ñ":"Ñ" return (str) } ) }</code></pre><p>Referencia:</p> <p><a href="http://www.forosdelweb.com/f13/manipular-array-247815/index2.html">http://www.forosdelweb.com/f13/manipular-array-247815/index2.html </a></p> </div> <span><span>keopx</span></span> <span><time datetime="2009-08-01T17:25:52+02:00" title="Sábado, Agosto 1, 2009 - 17:25">Sáb, 01/08/2009 - 17:25</time> </span> <div class="field field--name-field-tax-cat field--type-entity-reference field--label-above"> <div class="field__label">Categoria</div> <div class="field__items"> <div class="field__item"><a href="/categoria/html" hreflang="es">Html</a></div> <div class="field__item"><a href="/categoria/programacion" hreflang="es">Programación</a></div> </div> </div> <div class="field field--name-field-tax-tag field--type-entity-reference field--label-above"> <div class="field__label">Tag</div> <div class="field__items"> <div class="field__item"><a href="/tag/html" hreflang="es">Html</a></div> <div class="field__item"><a href="/tag/javascript" hreflang="es">JavaScript</a></div> <div class="field__item"><a href="/tag/programacion" hreflang="es">Programación</a></div> </div> </div> <section data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comentarios</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=121&amp;2=field_comments&amp;3=comment" token="sqxErlOrosirytOaCUqzMbVKHAWLN7r2ZuBET21uUeQ"></drupal-render-placeholder> </div> </div> </section> Sat, 01 Aug 2009 15:25:52 +0000 keopx 121 at https://keopx.net Recopilación de Hojas de Referencia: https://keopx.net/blog/recopilacion-de-hojas-de-referencia <span>Recopilación de Hojas de Referencia:</span> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Guías de referencia para diferenentes usos: Para eso : <strong>Línea de comandos:</strong></p> <ul><li><a href="http://www.ss64.com/nt/index.html" title="Windows NT/XP Command Line Reference">Windows NT/XP Command Line Reference</a></li> <li><a href="http://www.ss64.com/bash/index.html" title="Bash Command Line Reference">BASH Command Line Reference</a></li> <li><a href="http://www.csulb.edu/%7Emurdock/dosindex.html" title="DOS Commands">DOS Commands</a></li> </ul><p><strong>Bases de datos: </strong></p> <ul><li><a href="http://www.ilovejackdaniels.com/cheat-sheets/mysql-cheat-sheet/" title="MySQL Cheat Sheet">MySQL Cheat Sheet</a></li> <li><a href="http://www.nparikh.org/unix/mysql.php" title="MySQL Reference List">MySQL Reference List</a></li> <li><a href="http://www.vttoth.com/oracle.htm" title="Oracle Cheat Sheet">Oracle Cheat Sheet</a></li> <li><a href="http://www.yagc.ndo.co.uk/cheatsheets/plsql_cheatsheet.html" title="Oracle PL/SQL Cheat Sheet">Oracle PL/SQL Cheat Sheet</a></li> <li><a href="http://www.larsditzel.de/9iquickref.pdf" title="Oracle 9i Server Reference">Oracle 9i Server Reference</a> (PDF)</li> <li><a href="http://www.ss64.com/ora/index.html">Oracle 9i Command Reference</a></li> <li><a href="http://www.petefreitag.com/cheatsheets/postgresql/" title="PostgreSQL Cheat Sheet">PostgreSQL Cheat Sheet</a></li> <li><a href="http://www.3gwt.net/demo/SQL_redux.html" title="SQL Cheat Sheet">SQL Cheat Sheet</a></li> <li><a href="http://www.ss64.com/sql/index.html" title="SQL Server 2005 Commands">SQL Server 2005 Commands</a></li> </ul><p><strong>Programación:</strong></p> <ul><li><a href="http://www.digilife.be/quickreferences/QRC/Ada%20Syntax%20Card.pdf" title="Ada Syntax Card">Ada Syntax Card</a> (PDF)</li> <li><a href="http://www.ilovejackdaniels.com/asp/asp-vbscript-cheat-sheet/" title="ASP/VBScript Cheat Sheet">ASP/VBScript Cheat Sheet</a></li> <li><a href="http://cs.fit.edu/%7Emmahoney/cse2050/how2cpp.html" title="C++ Language Summary">C++ Language Summary</a></li> <li><a href="http://www.dreamincode.net/downloads/ref_sheets/cpp_reference_sheet.pdf" title="C++ Reference Sheet">C++ Reference Sheet</a> (PDF)</li> <li><a href="http://www.linuxsoftware.co.nz/cppcontainers.html" title="C++ Containers Cheat Sheet">C++ Containers Cheat Sheet</a></li> <li><a href="http://www.quadrantbiz.com/docs/csharpref.pdf" title="C# Language Reference">C# Language Reference</a></li> <li><a href="http://www.digilife.be/quickreferences/QRC/Delphi%20Technical%20Reference%20Card%207.20.pdf" title="Delphi Technical Reference Card">Delphi Technical Reference Card</a> (PDF)</li> <li><a href="http://lesliefranke.com/sandbox/ref/javacheatsheet.html" title="Java Syntax Cheat Sheet">Java Syntax Cheat Sheet</a></li> <li><a href="http://whatis.techtarget.com/definition/0,,sid9_gci826135,00.html" title="Java Quick Reference">Java Quick Reference</a> (PDF)</li> <li><a href="http://www4.ncsu.edu/%7Ekaltofen/courses/Languages/JavaExamples/cpp_vs_java/" title="Java Reference for C++">Java Reference for C++</a></li> <li><a href="http://java.sun.com/products/jsp/syntax/2.0/card20.pdf">JSP 2.0 Syntax Reference Sheet</a> (PDF)</li> <li><a href="http://www.stdout.org/%7Ewinston/latex/latexsheet.pdf" title="LaTEX Reference Card">LaTEX Reference Card</a> (PDF)</li> <li><a href="http://juerd.nl/site.plp/perlcheat" title="PERL Cheat Sheet">PERL Cheat Sheet</a></li> <li><a href="http://heron.snell.clarkson.edu/it/perlrefcard.pdf" title="PERL Reference Card">PERL Reference Card</a> (PDF)</li> <li><a href="http://www.mnlab.cs.depaul.edu/%7Eehab/Courses/TDC568/resources/PerlQuickRef.pdf" title="PERL Regular Expression Quick Reference">PERL Regular Expression Quick Reference</a> (PDF)</li> <li><a href="http://search.cpan.org/%7Enwclark/perl-5.8.7/pod/perlcheat.pod" title="PERL Reference Guide">PERL Reference Guide</a></li> <li><a href="http://www.ilovejackdaniels.com/cheat-sheets/php-cheat-sheet/" title="Jack Daniels PHP Cheet Sheet">PHP Cheat Sheet</a></li> <li><a href="http://www.blueshoes.org/en/developer/php_cheat_sheet" title="Blue Shoes PHP Developer Cheat Sheet">PHP Developer Cheat Sheet</a></li> <li><a href="http://www-128.ibm.com/developerworks/library/l-cheatsheet3.html" title="Python 101 Cheat Sheet">Python 101 Cheat Sheet</a></li> <li><a href="http://www.yukoncollege.yk.ca/%7Ettopper/COMP118/rCheatSheet.html" title="Python Cheat Sheet">Python Cheat Sheet</a></li> <li><a href="http://www.onlamp.com/python/excerpt/PythonPocketRef/examples/python.pdf" title="Python Quick Reference">Python Quick Reference</a> (PDF)</li> <li><a href="http://ruby.cenophobie.com/RubyCheat.pdf" title="Ruby Cheat Sheet">Ruby Cheat Sheet</a> (PDF)</li> <li><a href="http://www.threaded.com/ruby_cheatsheet.htm" title="Ruby Reference Sheet">Ruby Reference</a></li> <li><a href="http://www.ilovejackdaniels.com/cheat-sheets/ruby-on-rails-cheat-sheet/" title="Ruby on Rails Reference Sheet">Ruby on Rails Reference Sheet</a></li> </ul><p>Unix/Linux:</p> <ul><li><a href="http://people.debian.org/%7Edebacle/refcard/refcard-en-a4.pdf" title="Debian Linux Reference Guide">Debian Linux Reference Guide</a> (PDF)</li> <li><a href="http://www.unixguide.net/linux/linuxshortcuts.shtml" title="Linux Shortcuts and Commands">Linux Shortcuts and Commands</a></li> <li><a href="http://homepage.powerup.com.au/%7Esquadron/linux_manual.pdf" title="One Page Linux Manual">One Page Linux Manual</a> (PDF)</li> <li><a href="http://www.gasmi.net/docs/tcp.html" title="TCP Ports List">TCP Ports List</a></li> <li><a href="http://www.rain.org/%7emkummel/unix.html">Treebeard’s Unix Cheat Sheet</a></li> <li><a href="http://www.pixelbeat.org/cmdline.html" title="Unix Command Line Tips">Unix Command Line Tips</a></li> </ul><p><strong>Desarollo web: </strong></p> <ul><li><a href="http://actionscriptcheatsheet.com/pdf/actionsscript_cheat_sheet_letter.pdf" title="Actionscript Cheat Sheet">Actionscript 2.0 Cheat Sheet</a> (PDF)</li> <li><a href="http://www.actionscriptcheatsheet.com/jpg/as3cs_flash_display.jpg" title="Actionscript 3.0 Cheat Sheet">Actionscript 3.0 Cheat Sheet</a> (PDF)</li> <li><a href="http://book.cakephp.org/3.0/en/tutorials-and-examples.html">CakePHP</a><strong><a href="http://cakephp.org/files/cakesheet.pdf"> </a></strong></li> <li><a href="http://websitesetup.org/css3-cheat-sheet/" title="CSS Cheat Sheet">CSS Cheat Sheet</a></li> <li><a href="http://refcards.com/download/bj/css2.pdf" title="CSS 2 Reference Card">CSS 2 Reference Card</a> (PDF)</li> <li><a href="http://www.ilovejackdaniels.com/cheat-sheets/css-cheat-sheet/" title="CSS Reference Sheet">CSS Reference Sheet</a></li> <li><a href="http://www.dustindiaz.com/css-shorthand/" title="CSS Shorthand Guide">CSS Shorthand Guide</a></li> <li><a href="http://wiht.link/css3_information" title="CSS3 - Intro, Guides &amp; Resources">CSS3 - Intro, Guides &amp; Resources</a></li> <li><a href="http://www.inmensia.com/files/pictures/internal/CheatSheetDrupal4.7.png" title="Drupal 4.7 Cheat Sheet">Drupal 4.7 Cheat Sheet</a></li> <li><a href="http://www.thejackol.com/htaccess-cheatsheet/" title=".htaccess Cheat Sheet">.htaccess Cheat Sheet</a></li> <li><a href="http://www.angelfire.com/nm/thehtmlsource/html/cheatsheet.html" title="HTML Cheat Sheet">HTML Cheat Sheet</a></li> <li><a href="http://refcards.com/download/bj/DOMHtml-2.pdf" title="HTML Dom Quick reference Card">HTML Dom Quick Reference Card</a> (PDF)</li> <li><a href="http://www.ilovejackdaniels.com/javascript/javascript-cheat-sheet/" title="Javascript Cheat Sheet">Javascript Cheat Sheet</a></li> <li><a href="http://javascript-reference.info/" title="Javascript Quick Reference">Javascript Quick Reference</a></li> <li><a href="http://www.werelight.com/docs/JavaScript_Quick_Reference.htm" title="Javascript Reference Page">Javascript Reference Page</a></li> <li><a href="http://www.define-web.com/jquery_cheat_sheet/jquery_cheat_sheet_080306_v1.pdf" title="JQuery Cheat Sheet">JQuery Cheat Sheet</a> (PDF)</li> <li><a href="http://www.define-web.com/jquery_cheat_sheet/jquery_cheat_sheet_080306_v1_pg2.pdf" title="JQuery Reference">JQuery Reference</a> (PDF)</li> <li><a href="http://www.snook.ca/archives/javascript/prototype_disse/" title="Prototype Reference (PNG y PDF)">Prototype </a><a href="http://www.snook.ca/archives/javascript/prototype_disse/" title="Prototype Reference (PNG y PDF)">Reference</a> (PNG y PDF)</li> <li><a href="http://www.ilovejackdaniels.com/apache/mod_rewrite-cheat-sheet/" title="Mod_Rewrite Cheat Sheet">Mod_Rewrite Cheat Sheet</a></li> <li><a href="http://slash7.com/cheats/scriptaculous_fx1.pdf" title="Scriptaculous Combination Effects Field Guide">Scriptaculous Combination Effects Field Guide</a> (PDF)</li> <li><a href="http://www.modularmedia.com/xhtml_standards/xhtmlcheatsheet.html" title="XHTML Cheat Sheet">XHTML Cheat sheet</a></li> <li><a href="http://csstidy.sourceforge.net/xhtml.php" title="XHTML Reference">XHTML Reference</a></li> <li><a href="http://www.petefreitag.com/cheatsheets/xhtml/" title="XHTML &amp; HTML Cheat Sheet">XHTML &amp; HTML Cheat Sheet</a></li> <li><a href="http://www.digilife.be/quickreferences/QRC/XML%20Syntax%20Quick%20Reference.pdf" title="XML Syntax Quick Reference">XML Syntax Quick Reference</a> (PDF)</li> <li><a href="http://www.digilife.be/quickreferences/QRC/XML%20Schema%20-%20Structures.pdf" title="XML Schema Reference">XML Schema Reference</a> (PDF)</li> <li><a href="http://www.digilife.be/quickreferences/QRC/XSLT%20and%20XPath%20Quick%20Reference.pdf" title="XSLT and XPath Quick Reference">XSLT and XPath Quick Reference</a> (PDF)</li> </ul><p><strong>Temas variados: </strong></p> <ul><li><a href="http://www.petefreitag.com/cheatsheets/ascii-codes/" title="Ascii Codes Cheat Sheet">Ascii Codes Cheat Sheet</a></li> <li><a href="http://www.slac.stanford.edu/grp/cd/soft/cvs/cvs_cheatsheet.html" title="CVS Cheat Sheet">CVS Cheat Sheet</a></li> <li><a href="http://www.ilovejackdaniels.com/cheat-sheets/regular-expressions-cheat-sheet/" title="Regular Expressions Cheat Sheet">Regular Expressions Cheat Sheet</a></li> <li><a href="http://www.ilovejackdaniels.com/cheat-sheets/colour-chart/" title="RGB Hex Colour Chart">RGB Hex Colour Chart</a></li> <li><a href="http://www.cs.put.poznan.pl/csobaniec/Papers/svn-refcard.pdf" title="Subversion Quick Reference">Subversion Quick Reference</a> (PDF)</li> <li><a href="http://www.tug.org/texshowcase/cheat.pdf" title="Theoretical Computer Science Cheat Sheet">Theoretical Computer Science Cheat Sheet</a> (PDF)</li> <li><a href="http://www.digilife.be/quickreferences/QRC/UML%20Quick%20Reference%20Card.pdf" title="UML Quick Reference Card">UML Quick Reference Card</a> (PDF)</li> <li><a href="http://www.holub.com/goodies/uml/index.html" title="UML Cheat Sheet">UML Cheat Sheet</a></li> <li><a href="http://lagmonster.org/docs/vi2.html" title="Vi Cheat Sheet">Vi Cheat Sheet</a></li> <li><a href="http://www.tuxfiles.org/linuxhelp/vimcheat.html" title="Vim Commands Cheat Sheet">Vim Commands Cheat Sheet</a></li> <li><a href="http://www.burtleburtle.net/justine/Tech/xcomm.html" title="XEmacs Command Cheat Sheet">XEmacs Commands Cheat Sheet</a></li> </ul><p><strong>Además</strong>:</p> <ul><li><a class="l" href="http://www.lugod.org/presentations/gimp-saclug.pdf"><strong>The Gimp</strong> Cheat Sheet</a></li> <li><a class="l" href="http://planetozh.com/download/refcards/Gimp.pdf"><strong>Gimp</strong> Quick Reference Card v.1.0</a></li> <li><a class="l" href="http://sentidoweb.com/2006/10/31/170-cheat-sheets-para-desarrolladores-web.php">170 <strong>cheat sheets</strong> para desarrolladores web</a> - Sentido Web</li> <li><a href="http://www.smashingmagazine.com/2006/10/30/cheat-sheet-round-up-ajax-css-latex-ruby/" rel="bookmark">Cheat Sheet Round-Up: <strong>Ajax, CSS, LaTeX, Ruby…</strong></a> - Smashing Magazine</li> <li><a class="l" href="http://www.google.com/help/cheatsheet.html"><strong>Google</strong> Help : Cheat Sheet</a></li> <li><a class="l" href="http://lesliefranke.com/files/reference/firefoxcheatsheet.html"><strong>Mozilla Firefox</strong> Cheat Sheet</a></li> <li><a class="l" href="http://microformats.org/wiki/cheat-sheet"><strong>Microformats</strong></a></li> </ul><p><strong>Enlaces de Interes:</strong></p> <ul><li><a href="http://www.cheat-sheets.org/" title="www.cheat-sheets.org">www.cheat-sheets.org/</a></li> <li><a href="http://www.scottklarr.com/topic/95/javascriptajax-cheat-sheets/" title="http://www.scottklarr.com/">http://www.scottklarr.com/</a></li> <li><a href="http://whatis.techtarget.com/definition/0,,sid9_gci826135,00.html" title="Otro mas">Otro mas</a></li> </ul></div> <span><span>keopx</span></span> <span><time datetime="2008-05-29T19:11:46+02:00" title="Jueves, Mayo 29, 2008 - 19:11">Jue, 29/05/2008 - 19:11</time> </span> <div class="field field--name-field-tax-cat field--type-entity-reference field--label-above"> <div class="field__label">Categoria</div> <div class="field__items"> <div class="field__item"><a href="/categoria/css" hreflang="es">CSS</a></div> <div class="field__item"><a href="/categoria/html" hreflang="es">Html</a></div> <div class="field__item"><a href="/categoria/programacion" hreflang="es">Programación</a></div> </div> </div> <div class="field field--name-field-tax-tag field--type-entity-reference field--label-above"> <div class="field__label">Tag</div> <div class="field__items"> <div class="field__item"><a href="/tag/css" hreflang="es">CSS</a></div> <div class="field__item"><a href="/tag/php" hreflang="es">php</a></div> <div class="field__item"><a href="/tag/database" hreflang="es">Database</a></div> <div class="field__item"><a href="/tag/base-de-datos" hreflang="es">Base de datos</a></div> <div class="field__item"><a href="/tag/programacion" hreflang="es">Programación</a></div> <div class="field__item"><a href="/tag/gnu-linux" hreflang="es">GNU Linux</a></div> <div class="field__item"><a href="/tag/linux" hreflang="es">Linux</a></div> <div class="field__item"><a href="/tag/software-libre" hreflang="es">Software Libre</a></div> </div> </div> <section data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comentarios</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=12&amp;2=field_comments&amp;3=comment" token="3B36SVw9p91AoZqz8vRNb7G_6Z_FqmDZWb6HVL3Q_Z4"></drupal-render-placeholder> </div> </div> </section> Thu, 29 May 2008 17:11:46 +0000 keopx 12 at https://keopx.net